<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [OS X TeX] multiline label on TikZ
path</title></head><body>
<div>At 10:23 AM -0500 1/19/09, Art Werschulz wrote:</div>
<blockquote type="cite" cite>Hi once again.<br>
<br>
I would like to have a multiline label on an edge appearing in a TikZ
path.  I guessed at the following syntax:</blockquote>
<blockquote type="cite" cite>   \begin{tikzpicture}[shorten
>=1pt,on grid,auto,initial text=]<br>
     \node[state] (2) {$q_2$};<br>
     \path[->]<br>
     (2) edge [loop right] node
{$0,\varepsilon\to0\\ 1,\varepsilon\to1$} ();</blockquote>
<blockquote type="cite" cite>   \end{tikzpicture}<br>
hoping that the labels $0,\varepsilon\to0$ and $1,\varepsilon\to1$
would appear as separate labeling lines on the loop,<br>
but it didn't work; it was as if the \\ was not there.</blockquote>
<div><br></div>
<div>Try putting it in an array environment.</div>
<div><br></div>
<div><tt><font color="#000000">\begin{tikzpicture}[shorten >=1pt,on
grid,auto,initial text=]<br>
     \node[state] (2) {$q_2$};<br>
     \path[->]<br>
     (2) edge [loop right] node {$\begin{array}{c}
0,\varepsilon\to0\\ 1,\varepsilon\to1\end{array}$}
();</font></tt></div>
<div><tt><font color="#000000">  
\end{tikzpicture}</font></tt></div>
<div><br></div>
<div>Alan</div>
<div><br></div>
<div><br></div>
<div>P.S. It would help to post complete, runnable minimal examples
(with \begin{document}\end{document} etc.  which also show which
tikz libraries you are loading.</div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div>Alan Munn<x-tab>      
</x-tab><x-tab>       
</x-tab><x-tab>       
</x-tab><x-tab>       
</x-tab><x-tab>       
</x-tab><x-tab>       
</x-tab>amunn@msu.edu<br>
Department of Linguistics<br>
and Germanic, Slavic, Asian and African Languages<x-tab>
</x-tab><x-tab>       
</x-tab>Tel.<x-tab>    </x-tab>517-355-7491<br>
Michigan State University, East Lansing MI 48824
USA<x-tab>       
</x-tab>Fax<x-tab>     </x-tab>517-432-2736</div>
</body>
</html>