I need a node in the head element of a qroof in tikz-qtree (using tikz-qtree-compat). I need the 'np' to be a node so I can draw an arrow to it. However, the following breaks:
\documentclass[10pt]{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\begin{document}
\begin{tikzpicture}
\Tree [ .TP I [ .T' T[past] [ .\node(vp){vP}; { } [ .v' v\\saw [ .VP { } [ .V' V(saw) \qroof{a man}.\node(nP){nP} ] ] ] ] ] ]
\end{tikzpicture}
\end{document}
The error is: Undefined control sequence \node(nP)nP
.
Any ideas on how to accomplish a node there?
Best Answer
There are limits to the direct compatibility of
qtree
commands. The\qroof
command is emulated with the\node
command, which is why it can't use a\node
as its label. Buttikz-qtree
has its own method for doing roof structures. You should use this for more complex roofs:P.S. I also cleaned up some of your formatting: you should use
\1
for formatting bar levels instead of just'
.