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.

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

Can this be done with qtree?


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

\tikzset{frontier/.style={distance from root=90pt},level distance=30pt}
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] [.\node[shape=coordinate,yshift=1ex]{}; {.} ] ]

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.