[OS X TeX] finite state machines

Ross Moore ross at ics.mq.edu.au
Mon Dec 29 23:50:20 CET 2008

Hi Art,

On 30/12/2008, at 6:58 AM, Art Werschulz wrote:

> Hi.
> What do people generally use for producing the diagrams for finite  
> state automata?  I'm currently using xymatrix.  Is there anything  
> better?

Are you using the PostScript back-end with Xy-pic ?
This allows circles, ellipses, etc. with arbitrary sizes,
whereas the default backend uses just font-pieces at
a fixed set of sizes.

> I need to produce circular (and double-circular) nodes that are  
> just big enough to hold a given chunk of text, e.g., something like  
> \node{$q_1$} or \acceptnode{$q_3$}.

With the PostScript backend, the width and height of the box
containing the words become the major and minor axes for the ellipse.
This means that you'll probably still need to grow the size of
this box using e.g., *++{<text>} , with 1 or more '+' signs,
depending on how long the <text> of your nodes.

But be careful. If every node has different dimensions,
this actually looks quite scrappy. Generally it is better
to establish a (small) fixed set of sizes for your nodes
and just stick to choosing from these.


> I also would like to draw ovals that are just big enough to  
> surround a larger chnuk of text, such as \ovalnode{Door closed}.

Sure. Xy-pic is designed for this kind of thing,
Ovals are not ellipses, but "round-rectangles".
These are easier to control -- consult the Xy-pic Reference manual.

> Suggestions?  Thanks.

Hope this helps,


Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the macostex-archives mailing list