5
\documentclass{standalone}
\usepackage{qtree}

\begin{document}
        \Tree [.A 
                    [.B [.D a] a [.E b]]    
                    [.C [.D c] b [.D c]] 
                    [.B [.D b]] 
              ]
\end{document}

Trying to compile this yields "missing {" error.

9

You need to put whitespaces before the inner right brackets

\documentclass{standalone}
\usepackage{qtree}

\begin{document}
        \Tree [.A 
                    [.B [.D a ] a [.E b ]]    
                    [.C [.D c ] b [.D c ]] 
                    [.B [.D b ]]
              ]
\end{document}
  • Why would that make a difference? And is it an issue peculiar to qtree, or does the same kind of problem apply more generally? – LarsH Jul 9 '13 at 18:41
  • 1
    @LarsH That's probably how the author decided to parse the input. I guess it looks for the next character and it sees b] if you don't put a whitespace. Regarding the generality, it depends on the convenience, with a guarantee of whitespace you don't need to check if the argument has any closing brace during the input parsing. But TikZ based ones are often much more flexible. – percusse Jul 9 '13 at 19:07

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.