3

I want to draw a constituent tree for a sentence ending with a full stop, but this gives errors in qtree. This is the example without a full stop. Now I want to add a full stop to the end, which is connected with the root node S.

\begin{figure}
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] ]
\end{figure}

Can this be done with qtree?

1 Answer 1

2

You can use

\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] {.} ]

with qtree

enter image description here

or with tikz-qtree

enter image description here

Or maybe better

\documentclass[border=5mm]{standalone}
\usepackage{tikz-qtree}
\begin{document}
\tikzset{frontier/.style={distance from root=90pt},level distance=30pt}
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] [.\node[shape=coordinate,yshift=1ex]{}; {.} ] ]
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .