[OS X TeX] FSA via TikZ

Art Werschulz agw at comcast.net
Tue Dec 30 22:30:34 EST 2008


Hi.

On Dec 30, 2008, at 9:05 PM, David Watson wrote:

> Perhaps this is what you want?
>
> \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 [bend left] node {0} (q3)
>   (q3) edge [bend left] node {0,1} (q2);
> \end{tikzpicture}
> \end{center}
> \end{document}

Thanks.

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






More information about the MacOSX-TeX mailing list