[OS X TeX] FSA via TikZ
Art Werschulz
agw at comcast.net
Tue Dec 30 19:40:33 EST 2008
Hi.
I'm asymptotically approaching what I want here. However, I have one
problem with the following example:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,positioning}
\begin{document}
\begin{center}
\begin{tikzpicture}[shorten >=1pt,node distance=1in,on grid,auto,
initial text=]
\node[state,initial] (q1) {$q_1$};
\node[state,accepting] (q2) [right=of q1] {$q_2$};
\node[state] (q3) [right=of q2] {$q_3$};
\path[->]
(q1) edge [loop above] node {0} ()
edge node {1} (q2)
(q2) edge [loop above] node {1} ()
edge node [above right] {1} (q3)
(q3) edge node [below left] {0,1} (q2);
\end{tikzpicture}
\end{center}
\end{document}
This gives a double-arrow from q2 to q3; the top is labelled with 0
and the bottom is labelled with 0,1.
I want two arrows: one from q2 to q3, labelled with 0, and one from q3
to q2, labelled with 0,1.
How does one make this happen?
Thanks.
Art Werschulz
207 Stoughton Avenue, Cranford NJ 07016-2838
(908) 272-1146
More information about the MacOSX-TeX
mailing list