I need to use tikz-qtree
instead of qtree
, but I noticed that trees are annoyingly uneven. Compare the following tree created with tikz-qtree
:
% !TEX TS-program = latex
\documentclass[11pt]{article}
\usepackage{tikz, tikz-qtree, pst-node, pst-asr, graphicx}
\tikzset{every tree node/.style={align=center, anchor=north}}
%\usepackage{qtree}
\begin{document}
\Tree [ [ [ $\sqrt{\textsc{Root}}$ {\scshape Voice} ] [.{\scshape Asp} ] ] [.{\scshape Tns} ] ]
\end{document}
with the following created with qtree
:
% !TEX TS-program = latex
\documentclass[11pt]{article}
%\usepackage{tikz, tikz-qtree, pst-node, pst-asr, graphicx}
%\tikzset{every tree node/.style={align=center, anchor=north}}
\usepackage{qtree}
\begin{document}
\Tree [. [. [. $\sqrt{\textsc{Root}}$ {\scshape Voice} ] [.{\scshape Asp} ] ] [.{\scshape Tns} ] ]
\end{document}
Is it possible to compiles trees with tikz-qtree
as nice as those with qtree
somehow?
Best Answer
EDIT (Now with 3 solutions)
qtree
+tikzmark
If you just need to draw arrows later, you can use
tikzmark
withqtree
. At least, the following seems to work:forest
I would also use Forest, but would definitely recommend the
linguistics
library which providesnice empty nodes
and suitable edges out-of-the-box. To align the terminal nodes, you can add a phantom with zero width but appropriate height.For example,
tikz-qtree
If you prefer to stick with
tikz-qtree
, you should wait to see what Alan Munn can come up with. I've only ever usedqtree
andforest
, so the best I can do withtikz-qtree
isNote
Forest does take some time to learn and the syntax is a bit different, so it is not something to attempt at the end of a large project, deadline looming, for sure.