TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got

\Tree [.CP [.TP [.NP [.D the ] [.N woman ] [.CP [.TP [.NP [.N who
] ] [.VP [.V stole ] [.NP [.D my ] [.N necklace ] ] ] ] ] ] [.VP
[.V entered ] ] ] ]

which gives me a nice tree, but the last leaf nodes (e.g. from N to woman) have a line connecting. Can I remove that one?

share|improve this question
Please always post code that begins with \documentclass{...} and ends with \end{document}, a so-called minimal working example (MWE). Once you've got this, it's easy to add a picture of the output to the question as well, which makes it more accessible for potential answerers. – doncherry Oct 3 '12 at 21:07
up vote 4 down vote accepted

Yes, you can remove this by doing the following:

Add the line

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

This allows node labels to have line breaks in them.

Then make all your terminal nodes be part of the node label itself:

\tikzset{every tree node/.style={align=center, anchor=north}}
\Tree [.CP [.TP [.NP [.D\\the ] [.N\\woman ] [.CP [.NP [.N\\who
] ] [.TP [.NP\\t ]  [.VP [.V\\stole ] [.NP [.D\\my ] [.N\\necklace ] ] ] ] ] ] [.VP
[.V\\entered ] ] ] ]

output of code

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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