# qtree: missing { inserted

\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.

-

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
@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