Comprehensive TeX Archive Network

Direc­tory tex-archive/graphics/finomaton

                Finomaton - Draw Finite State Machines

This is free software, and you are welcome to redistribute it under certain
conditions; see "COPYING" for more information.



You need Tcl/Tk and MetaPost.

     Using Finomaton

Start Finomaton:

         wish finomaton.tcl   +  RETURN

To add states, click "New state" and then on the canvas. Click "Select" and
then on the states to select and move them. Analogous for lines and text
items. Add a line, and you see three circles: two end-points, and one control

When you click on a state or somewhere on the canvas, control points become
invisible. When you select a line, its control points become visible and can be
moved. Add a second control point to a line by clicking "Control point" and
then on a line. Any item can be removed by clicking "Remove" and then on the
item you want to remove, or by selecting an item and then pressing "DEL". To
obtain a straight line, remove its control points.

Select multiple items and toggle selections by holding CONTROL while clicking
on an item. Click "|" to assign all selected items the X-coordinate of the
first selected item (analogous for "--" and Y-coordinate). Press "h" to spread
(i.e., make equidistant between leftmost and rightmost) selected items
horizontally, "v" to spread vertically.

Double-click on a state, text item or line for attributes. States have a label
for display on the canvas, and a "TeX" attribute that can contain any valid
TeX-string. If specified, it is used instead of the canvas label when
exporting. Include the TeX-command "\strut" if states turn out too small.

Lines can have labels. The label will be typeset nearby the line (depending on
the anchor position you choose), and you can choose a percentage to select how
far along the line the label will be placed.  The label will NOT be displayed
on the canvas, and a setting of 50% does NOT necessarily mean the optical
mid-point of the line.

States act like magnets for control points. When you move a state, all its
attached control points move with it. If you move a control point by using the
arrow keys, it is not affected by magnetic states.

Via "File => Settings...", you adjust parameters that affect the MetaPost
output. These settings are saved on a per-file basis.

     Typesetting the Generated Graph

Having exported a graph to MetaPost-format, say "graph.mp", you:

a) Invoke MetaPost:

         mpost graph.mp   ("mp graph.mp" on some systems)

   This creates a new (PostScript) file, "graph.1".

b) Include "graph.1" in TeX and LaTeX-documents:

   *) pdftex (requires ConTeXt):

         \input supp-pdf.tex

         Syntax is \convertMPtoPDF {filename} {x scale} {y scale}.

   *) pdflatex (requires ConTeXt):


   *) tex:


   *) latex:


You can also try dvips, dvipdf, gs and ps2pdf on generated graphs and

     Key bindings

     Ctrl + m    Export MetaPost...
     Ctrl + o    Open...
     Ctrl + s    Save
     Alt  + x    Exit

     DEL         Remove selected items
     c           Control point
     e           Select
     h           Spread selected items horizontally
     l           New line
     r           Remove
     s           New state
     t           New text
     v           Spread selected items vertically
     x           Same X coordinate for all selected items
     y           Same Y coordinate for all selected items

When you use Ctrl + m, you are prompted for a file name only on the first
export. The same path is used when you use the binding again.

For batch-conversions, use

     ./finomaton.tcl -exportmp file1.fin file2.fin ...

to create file1.mp, file2.mp, ... . If a file's suffix is not "fin",
then ".mp" is appended to the filename.

     Latest Version and Contact

The latest version of Finomaton is available from


Good luck,
Markus Triska (triska@gmx.at)
October 9th, 2003


Name Notes


Name Size Date Notes
COPYING 17992 2006-07-11 18:09
ChangeLog 815 2007-06-21 14:59
README 4350 2007-06-20 17:03
TODO 473 2007-06-17 13:00
fi­no­ma­ton.tcl 50699 2007-06-21 14:05

Down­load the con­tents of this pack­age in one zip archive (70.6k).

Fi­no­ma­ton – Com­fort­ably draw and type­set fi­nite state ma­chines

Fi­no­ma­ton is a TCL pro­gram that al­lows users to com­fort­ably draw and type­set fi­nite state ma­chines (au­tomata). The re­sult­ing graphs can be ex­ported to plain and sub­se­quently be in­cluded in TeX and LaTeX doc­u­ments for ex­cel­lent type­set­ting qual­ity. In con­trast to many other pack­ages, the mouse can be used to in­ter­ac­tively move ob­jects around. States are mag­netic to fa­cil­i­tate con­nec­tion, and any TeX com­mand can be em­bed­ded in the la­bels of states and lines.

Pack­age De­tailsFi­no­ma­ton
Li­censeGNU Gen­eral Public Li­cense
Copy­right2003,2006,2007 Markus Triska
Main­tainerMarkus Triska
Topics fi­nite-state ma­chines, au­tomata, la­belled graphs, etc.
Guest Book Sitemap Contact