4

I have a syntax tree with angle brackets to represent movement:

\begin{tikzpicture}
\Tree [ 
  .TP [ 
     .T' \node{T+verb}; [
        .vP \qroof{`ana}.DP [
          .v' \node{v+{\textlangle}verb{\textrangle}}; [
             .VP [
                .V' \node{V+{\textlangle}verb{\textrangle}}; \qroof{taalib}.DP 
             ]
          ]
        ]
     ]
  ]
]

\end{tikzpicture}

I need to draw arrows between the three nodes, but the example from the tikz-qtree documentation doesn't work; using

\draw[semithick,->] (V+{\textlangle}verb{\textrangle}).. controls +(south west:5)
      and +(south:5) .. (v+{\textlangle}verb{\textrangle});

I get:

! TeX capacity exceeded, sorry [input stack size=5000].
\font@name ->
                 \OT1/cmr/m/n/10 
l.23 ...ick,->] (V+{\textlangle}verb{\textrangle})
                                                                  ..controls +(south west:5)...
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

I'm guessing that using symbols in the node names messes it up. Can I specify one thing for display and another to use as the node name? Or is there another way to fix this?

  • 2
    It is always nice if you post minimal working examples (MWE), and not just snippets. That way I wouldn't have had to find out myself that I had to load tikz-qtree-compat and textcomp in addition to tikz-qtree. – Torbjørn T. Dec 2 '11 at 21:58
6

When creating a node, there are different delimiters for different purposes:

\node[options](node name){node content};

Any options regarding e.g., the look of the node is specified in square brackets. The node name, which can be used as a coordinate for drawing, is specified in parenthesis. Finally the content of the node, that text which is actually shown in your picture, is specified in braces.

\documentclass{standalone}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat,textcomp}

\begin{document}
\begin{tikzpicture}
\Tree [ 
  .TP [ 
     .T' \node{T+verb}; [
        .vP \qroof{`ana}.DP [
          .v' \node(A){v+{\textlangle}verb{\textrangle}}; [
             .VP [
                .V' \node(B){V+{\textlangle}verb{\textrangle}}; \qroof{taalib}.DP 
             ]
          ]
        ]
     ]
  ]
]
\draw [thick,red] (A) to[out=270,in=180] (B);
\end{tikzpicture}
\end{document}

enter image description here

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.