I'm trying to compile the tree below and its working.
The problem is that whenever I change the label of DP or LP to \#P
(i.e. \node(\#P) {\#P}; \#
), I get the following error message:
! Missing \endcsname inserted.
<to be read again>
\#
l.17 ...LP}; L [.YP Y [.FP ] ] ] ] ] ] ]
]
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
Missing character: There is no # in font nullfont!
Missing character: There is no P in font nullfont!
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz-qtree-compat}
\tikzset{every tree node/.style={baseline=(top.base), level distance=2em, sibling distance=4em, align=center, parent anchor=south, child anchor=north, anchor=north}, sibling distance=15pt}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture} [inv/.style={overlay, coordinate }]
\Tree [.XP X [.ZP Z [.\node(DP) {DP}; D [.\node(LP) {LP}; L [.YP Y [.FP ] ] ] ] ] ] ] ]
\node [ right=1cm of DP,font=\itshape] (X) {Blah};
\draw[<-] (X.west) -- (DP);
\node [ right=1cm of LP,font=\itshape] (X) {Blah};
\draw[<-] (X.west) -- (LP);
\end{tikzpicture}
\end{document}
\#
instead of just#
? – Jasper Habicht Feb 19 '18 at 13:22