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

Possible Duplicate:
tikz-qtree spoils tikz trees

When I draw a tree using TikZ, for example

  \tikzset{every node/.style={draw,circle}}
    \node {}
      child { node {} }
      child { node {} };

I get this:

enter image description here

However, if I also load the package tikz-qtree the edges are anchored differently and, arguably, worse:

enter image description here

How can I get around this? I'd like to use qtree but I also want the trees to look nice.

share|improve this question

marked as duplicate by Loop Space, Stefan Kottwitz Nov 28 '12 at 9:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The package has a section commented with defaults appropriate for linguistic trees -- I smell weirdness by design. – Raphael Nov 27 '12 at 18:33
up vote 4 down vote accepted

As you notes in the comments, this is by design, since linguistic trees (which is what tikz-qtree was designed for) are usually plain text. You can fix this by changing the default edge to parent path:

edge from parent/.style=
         {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}}
share|improve this answer
I will look into that tomorrow at work, so just a quick comment: if it were by design inside tikz-qtree, that would be fine with me. But changing all TikZ trees, that's a bug, isn't it? – Raphael Nov 27 '12 at 21:37
Now that tikz-qtree seems to have a lot of wider appeal, it could be considered a bug. For most linguistics needs the issue won't come up. – Alan Munn Nov 27 '12 at 22:05
Part of the problem is that tikz-qtree is designed so that you don't require a tikzpicture environment to draw a \Tree; if you set the relevant parameters locally within a \Tree you can't override them globally in the way that would be useful for the main user base. (I'm not saying the problem is unsolvable, but that there isn't an obviously simple fix.) – Alan Munn Nov 27 '12 at 22:38
Can't they define "qtree styles" which the \Tree syntax would use under the hood? Then it would not change the behaviour of other trees and would be both globally and locally overridable. That would be similar to the automata library then. – Raphael Nov 28 '12 at 11:55

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