[OS X TeX] multiline label on TikZ path

Art Werschulz agw at comcast.net
Mon Jan 19 16:23:14 CET 2009


Hi once again.

I would like to have a multiline label on an edge appearing in a TikZ  
path.  I guessed at the following syntax:
    \begin{tikzpicture}[shorten >=1pt,on grid,auto,initial text=]
      \node[state] (2) {$q_2$};
      \path[->]
      (2) edge [loop right] node {$0,\varepsilon\to0\\ 1,\varepsilon 
\to1$} ();
    \end{tikzpicture}
hoping that the labels $0,\varepsilon\to0$ and $1,\varepsilon\to1$  
would appear as separate labeling lines on the loop,
but it didn't work; it was as if the \\ was not there.

I tried a few other tricks (using \hbox, \vbox, \par, and the like).   
The combinations that didn't produce error msgs also didn't produce  
the right output.

What should one do to get such multiline labels on an edge in a path?

Thanks once again.

Art Werschulz
207 Stoughton Avenue, Cranford  NJ 07016-2838
(908) 272-1146






More information about the macostex-archives mailing list