Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following problem: I have tikz with tikz-qtree installed. Hence, if I draw a tree with q-tree it works perfectly. However, I have to recycle one drawing done without q-tree, so that the code looks like

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[every node/.style={circle,draw},level 1/.style={sibling distance=30mm},level 2/.style={sibling distance=10mm}]
\node {A}
 child { node {B} 
 child { node {E} }
 child { node {F} child { node {K} } child { node {L} } child { node {M}}}
 child { node {G} }}
 child { node {C} 
 child {node {H}}}
 child { node {D} child {node {I}} child {node {J} child {node {N}} child  {node {O}}}}
 ;
 \end{tikzpicture}
 \end{document}

This usually works if you don't have qtree installed, but if you do, then the level distance is ignored and the third level nodes z1 and t1 will overlap with each other. Is there any quick solution for that?

TIA!

share|improve this question
1  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. I had to make several changes to your code to get it to compile and when I did then I found no difference in placement of the nodes. It's more than likely that the changes I made were significant so a compilable example would really help here. –  Andrew Stacey Jun 11 '12 at 9:04
    
First you need to replace \node by node –  Alain Matthes Jun 11 '12 at 9:32
    
I'm without a compiler at the moment, but I just copypasted a standard example here from SE, since I tried, and it doesn't work if you have \usepackage{tikz-qtree}. Then you remove it, and everything magically works. Sorry for this. –  Alessio Jun 11 '12 at 9:49
    
Not a problem! It's just so that folk can best help. Which version of tikz-qtree are you using? Also, now that you have 11 reputation here you can upload images - that would be extremely useful as I'm still getting no difference in the positioning. –  Andrew Stacey Jun 11 '12 at 9:56
add comment

1 Answer

I see.. actually I found the issue: the latest version of tikz-qtree has some issues with level-specific styles if compiled on an old mac distribution. I upgrade my MacTex from 2009 to 2011 and it worked.

share|improve this answer
    
Well done for finding the answer yourself. –  Andrew Stacey Jun 11 '12 at 18:22
    
@AndrewStacey But how disable tikz-qtree temporarily? When tikz-qtree is loaded, then edges starts only from east, north, west and south. How in the same document draw a tree with tikz and a another with tikz-qtree ? –  Alain Matthes Jun 12 '12 at 7:45
    
@Altermundus I noticed that but didn't mention it as it seemed a minor point relative to what Alessio was seeing. I think it's a good question, but am not sure if it should be a new question or an addendum to this one. –  Andrew Stacey Jun 12 '12 at 8:26
    
@AndrewStacey Without tikz-qtree, the result is not the same, therefore tikz and tikz-qtree do not play well together. –  Alain Matthes Jun 12 '12 at 8:43
    
@Altermundus This has now been asked as: tex.stackexchange.com/q/66884/86 –  Andrew Stacey Aug 13 '12 at 8:37
add comment

Your Answer

 
discard

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.