Labels are missing in the Tree
up vote
0
down vote
favorite
In the following tree, the labels are concatenated to their parent node. For example in the first branch of the tree from left, I would like to have "the" as a leaf, but it sticks to D (its parent). This is the LaTeX code I use:
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
forestset{.style={for tree={parent anchor=south, child anchor=north,align=center,inner sep=2pt}}}
begin{forest}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
Note: The code is taken from https://msu.edu/~amunn/latex/sharelatex-trees-forest-v1.pdf
This is the result of the code:

But I would like the results would be like this:

How can I fix this to have a tree like this:?
diagrams forest trees
add a comment |
up vote
0
down vote
favorite
In the following tree, the labels are concatenated to their parent node. For example in the first branch of the tree from left, I would like to have "the" as a leaf, but it sticks to D (its parent). This is the LaTeX code I use:
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
forestset{.style={for tree={parent anchor=south, child anchor=north,align=center,inner sep=2pt}}}
begin{forest}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
Note: The code is taken from https://msu.edu/~amunn/latex/sharelatex-trees-forest-v1.pdf
This is the result of the code:

But I would like the results would be like this:

How can I fix this to have a tree like this:?
diagrams forest trees
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In the following tree, the labels are concatenated to their parent node. For example in the first branch of the tree from left, I would like to have "the" as a leaf, but it sticks to D (its parent). This is the LaTeX code I use:
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
forestset{.style={for tree={parent anchor=south, child anchor=north,align=center,inner sep=2pt}}}
begin{forest}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
Note: The code is taken from https://msu.edu/~amunn/latex/sharelatex-trees-forest-v1.pdf
This is the result of the code:

But I would like the results would be like this:

How can I fix this to have a tree like this:?
diagrams forest trees
In the following tree, the labels are concatenated to their parent node. For example in the first branch of the tree from left, I would like to have "the" as a leaf, but it sticks to D (its parent). This is the LaTeX code I use:
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
forestset{.style={for tree={parent anchor=south, child anchor=north,align=center,inner sep=2pt}}}
begin{forest}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
Note: The code is taken from https://msu.edu/~amunn/latex/sharelatex-trees-forest-v1.pdf
This is the result of the code:

But I would like the results would be like this:

How can I fix this to have a tree like this:?
diagrams forest trees
diagrams forest trees
edited Dec 3 at 17:01
asked Dec 3 at 16:50
woody
1135
1135
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17
add a comment |
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
Are you looking for something like this?
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
[TP
[DP [D,label=above left:the] [NP [N,label=above left:man
]]]
[T'
[T,label=above left:will ]
[VP
[V,label=above left:eat ]
[DP [D,label=above left:a ] [NP [N,label=above left:burger ]]]
]
]
]
end{forest}
end{document}

Thanks for updating your question. You only need to make what you put in .style known to your tree.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
for tree={parent anchor=south, child
anchor=north,align=center,inner sep=2pt}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
end{document}

I do not know where you got .style... from, I am not saying it is wrong but I have not seen it before. If you want every tree to have some universal for tree, consider using
forestset{default preamble={
for tree={...}
}
}
as discussed on p. 7 of the manual.
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
It is wrong marmot anddefault preambleshould be used. See page 99 of the Forest manual. @woody
– cfr
Dec 4 at 0:16
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
Are you looking for something like this?
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
[TP
[DP [D,label=above left:the] [NP [N,label=above left:man
]]]
[T'
[T,label=above left:will ]
[VP
[V,label=above left:eat ]
[DP [D,label=above left:a ] [NP [N,label=above left:burger ]]]
]
]
]
end{forest}
end{document}

Thanks for updating your question. You only need to make what you put in .style known to your tree.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
for tree={parent anchor=south, child
anchor=north,align=center,inner sep=2pt}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
end{document}

I do not know where you got .style... from, I am not saying it is wrong but I have not seen it before. If you want every tree to have some universal for tree, consider using
forestset{default preamble={
for tree={...}
}
}
as discussed on p. 7 of the manual.
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
It is wrong marmot anddefault preambleshould be used. See page 99 of the Forest manual. @woody
– cfr
Dec 4 at 0:16
add a comment |
up vote
3
down vote
Are you looking for something like this?
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
[TP
[DP [D,label=above left:the] [NP [N,label=above left:man
]]]
[T'
[T,label=above left:will ]
[VP
[V,label=above left:eat ]
[DP [D,label=above left:a ] [NP [N,label=above left:burger ]]]
]
]
]
end{forest}
end{document}

Thanks for updating your question. You only need to make what you put in .style known to your tree.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
for tree={parent anchor=south, child
anchor=north,align=center,inner sep=2pt}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
end{document}

I do not know where you got .style... from, I am not saying it is wrong but I have not seen it before. If you want every tree to have some universal for tree, consider using
forestset{default preamble={
for tree={...}
}
}
as discussed on p. 7 of the manual.
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
It is wrong marmot anddefault preambleshould be used. See page 99 of the Forest manual. @woody
– cfr
Dec 4 at 0:16
add a comment |
up vote
3
down vote
up vote
3
down vote
Are you looking for something like this?
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
[TP
[DP [D,label=above left:the] [NP [N,label=above left:man
]]]
[T'
[T,label=above left:will ]
[VP
[V,label=above left:eat ]
[DP [D,label=above left:a ] [NP [N,label=above left:burger ]]]
]
]
]
end{forest}
end{document}

Thanks for updating your question. You only need to make what you put in .style known to your tree.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
for tree={parent anchor=south, child
anchor=north,align=center,inner sep=2pt}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
end{document}

I do not know where you got .style... from, I am not saying it is wrong but I have not seen it before. If you want every tree to have some universal for tree, consider using
forestset{default preamble={
for tree={...}
}
}
as discussed on p. 7 of the manual.
Are you looking for something like this?
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
[TP
[DP [D,label=above left:the] [NP [N,label=above left:man
]]]
[T'
[T,label=above left:will ]
[VP
[V,label=above left:eat ]
[DP [D,label=above left:a ] [NP [N,label=above left:burger ]]]
]
]
]
end{forest}
end{document}

Thanks for updating your question. You only need to make what you put in .style known to your tree.
documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{forest}
begin{document}
begin{forest}
for tree={parent anchor=south, child
anchor=north,align=center,inner sep=2pt}
[TP
[DP [D\the] [NP [N\man ]]]
[T'
[T\will ]
[VP
[V\eat ]
[DP [D\a ] [NP [N\burger ]]]
]
]
]
end{forest}
end{document}

I do not know where you got .style... from, I am not saying it is wrong but I have not seen it before. If you want every tree to have some universal for tree, consider using
forestset{default preamble={
for tree={...}
}
}
as discussed on p. 7 of the manual.
edited Dec 3 at 18:46
answered Dec 3 at 16:58
marmot
82k492175
82k492175
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
It is wrong marmot anddefault preambleshould be used. See page 99 of the Forest manual. @woody
– cfr
Dec 4 at 0:16
add a comment |
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
It is wrong marmot anddefault preambleshould be used. See page 99 of the Forest manual. @woody
– cfr
Dec 4 at 0:16
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
Yeah, exactly, something like this but a bit cleaner and tidier (I updated my question with example)
– woody
Dec 3 at 17:03
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
@woody I made an update. Is that closer to what you want?
– marmot
Dec 3 at 18:46
1
1
It is wrong marmot and
default preamble should be used. See page 99 of the Forest manual. @woody– cfr
Dec 4 at 0:16
It is wrong marmot and
default preamble should be used. See page 99 of the Forest manual. @woody– cfr
Dec 4 at 0:16
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463003%2flabels-are-missing-in-the-tree%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please could you make your examples compilable? It makes it much easier and less pitfall-strewn to help.
– cfr
Dec 4 at 0:17