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

share|improve this question
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

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer

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.