I'm trying to draw movement arrows in the following tree (it works with the \qtree package) :
\Tree [.CP [\qroof{which book on syntax}.DP ] [.C' [.C will ] [.TP [\qroof{The students}.DP ] [.T' [.<T> will ] [.V' [.V buy ] [\qroof{which book on syntax}.DP ] ] ] ] ] ]
I've tried to implement the neat explanation in Alan Munn's answer on this thread More efficient way to draw movement arrow to roof in tikz-qtree, but I made a mistake somewhere, and I don't know where :
\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\tikzset{every tree node/.style={align=center, anchor=north}}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\Tree
[.CP
[.DP \edge[roof]; \node (x) {which book on syntax}; ]
[.C$' $
[.C {will} ; ]
[.TP
[.DP \edge[roof]; {The students}; ]
[.T'
[.$<$T$>$ {will}; ]
[.V$'$
[.V {buy}; ]
[.DP \edge[roof]; \node (y) {which book on syntax} ]
]
]
]
]
]
\draw[->] (y) [in=-90,out=-90,looseness=1.5] to (x);
\end{tikzpicture}
\end{document}
The error message I'm getting is:
! Package pgf Error: No shape named y is known. See the pgf package documentation for explanation.
I've tried to find the answer in the pgf manual, but since this is a mix of tikz and qtree, I just can't seem to find it. I'm posting it here on the off-chance that it's visible immediately to the experienced eye.
