# Removing lines from Syntactic tree in tikz-qtree

I'm trying to remove the lines under the V heads (connecting V to "likes"). I've tried one solution: adding the line

\tikzset{every tree node/.style={align=center, anchor=north}}


which let me get replace some of the lower lines with \\ but I can't do this universally. Any help is appreciated.

\documentclass{article}
\usepackage{tikz, tikz-qtree}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{tikzpicture}
\Tree
[.TP
[.DP \edge[roof]; \node (J) {John}; ]
[.T$'$
[.T ]
[.\emph{v}P
[.DP \edge[roof]; \node (Jtrace) {$<$John$>$}; ]
[.\emph{v}$'$
[.\emph{v}
[.V \node(V1){likes}; ]
[.\emph{v} ]
]
[.VP
[.V \node(V2){$<$likes$>$}; ]
[.DP \edge[roof]; {Mary} ]
]
]
]
]
]

\draw[->] (Jtrace) [in=-90,out=-90,looseness=1.5]  to (J);
\draw[->] (V2) [in=-90,out=-90]  to (V1);
\end{tikzpicture}

\end{document}

• Welcome! Note that qtree is another package and not relevant here as far as I can tell. You can format code by highlighting it and clicking {} or using ctrl+k. – cfr Nov 3 '16 at 4:24
• Do you want something like no edge from parent? (I don't really use tikz-qtree, so I might be getting the name wrong but take a look in the documentation.) – cfr Nov 3 '16 at 4:26
• Can you explain why you can't use \\ universally? It works just fine for the V nodes in your example. – Jason Zentz Nov 3 '16 at 4:41
• Specifically, [.\node(V1){V\\likes}; ] and [.\node(V2){V\\$<$likes$>$}; ] should work fine, right? – Jason Zentz Nov 3 '16 at 4:45

## 1 Answer

You can't use the construct [.V\\\node(V1){likes};] which I assume is what you were trying to do. As Jason notes in the comment, you can instead use [.\node(V1){V\\likes};] which achieves exactly what you want.

\documentclass{article}
\usepackage{tikz, tikz-qtree}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
\begin{tikzpicture}
\Tree
[.TP
[.DP \edge[roof]; \node (J) {John}; ]
[.T$'$
[.T ]
[.\emph{v}P
[.DP \edge[roof]; \node (Jtrace) {$<$John$>$}; ]
[.\emph{v}$'$
[.\emph{v}
[.\node(V1){V\\likes}; ]
[.\emph{v} ]
]
[.VP
[.\node(V2){V\\$<$likes$>$}; ]
[.DP \edge[roof]; {Mary} ]
]
]
]
]
]
\draw[->] (Jtrace) [in=-90,out=-90,looseness=1.5]  to (J);
\draw[->] (V2) [in=-90,out=-90]  to (V1);
\end{tikzpicture}

\end{document}