
Eu tenho a seguinte árvore na qual a licença mais à esquerda está fora de sincronia:
\documentclass{minimal}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}
\tikzset{level 1+/.style={level distance=3\baselineskip}}
\tikzset{level 2+/.style={level distance=2\baselineskip}}
\tikzset{frontier/.style={distance from root=8\baselineskip}}
\tikzset{every tree node/.style={align=left, anchor=north}}
\tikzset{every leaf node/.append style={text depth=0pt}}
\Tree[.S
[.NP er\\he ]
[.NP
[.Det das\\the ]
[.N Buch\\book ] ]
[.NP
[.Det der\\the ]
[.N Frau\\woman ] ]
[.V gibt\\gives ] ]
\end{tikzpicture}
\end{document}
eu segui
alinhando várias árvores à linha de base
e adicionado \tikzset{every leaf node/.append style={text depth=0pt}}
, mas isso não tem nenhum efeito.
Responder1
Se você estiver disposto a usar o poderosoforest
pacote (usa internamente PGF/TikZ):
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
parent anchor=south,
child anchor=north,
align=left,
base=bottom
},
where n children=0{tier=word}{}
[S
[NP [er\\he] ]
[NP
[Det [das\\the] ]
[N [Buch\\book] ]
]
[NP
[Det [der\\the] ]
[N [Frau\\woman] ]
]
[V [gibt\\gives] ]
]
\end{forest}
\end{document}
Para centralizar todo o conteúdo do nó, altere align=left para align=center (é claro, isso pode ser feito apenas para as folhas ou caso a caso).
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={
parent anchor=south,
child anchor=north,
align=center,
base=bottom
},
where n children=0{tier=word}{}
[S
[NP [er\\he] ]
[NP
[Det [das\\the] ]
[N [Buch\\book] ]
]
[NP
[Det [der\\the] ]
[N [Frau\\woman] ]
]
[V [gibt\\gives] ]
]
\end{forest}
\end{document}
A opção base=bottom
, na verdade, não é necessária aqui, pois todas as suas folhas possuem duas linhas.