I'm trying to draw a derivation tree for a simple grammar using tikz-qtree.
Here is my current code:
\documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows,calc} \usepackage{tikz-qtree} % ---------- \begin{document} \begin{tikzpicture} \tikzset{grow'=right} \tikzset{every tree node/.style={anchor=base west}} \Tree [.$SS$ [.$(S)$ $()$] [.$(S)$ [.$((S))$ $(())$] ] ] \end{tikzpicture} \end{document} My intended result looks like this:
-(S)------------() -/ -/ -/ -/ -/ SS -\ -\ -\ -\ -\ -\ -(S)---------((S))----------(()) When I compile the document, I get a bunch of missing end brace complaints "./main.tex:21: Missing } inserted", but the square brackets in the \Tree are balanced as far as I can see.
What am I doing wrong?



