summaryrefslogtreecommitdiff
path: root/graphics/finomaton/README
blob: a75818c57718f94a831890115dfb233553b340df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

                Finomaton - Draw Finite State Machines
                ======================================


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

Finomaton comes WITHOUT ANY WARRANTY.


     Requirements
     ------------

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
point.

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
         \convertMPtoPDF{graph.1}{1}{1}

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

   *) pdflatex (requires ConTeXt):

         \usepackage{graphics}
         \convertMPtoPDF{graph.1}{1}{1}

   *) tex:

         \special{psfile=graph.1}

   *) latex:

         \usepackage{graphics}
         \includegraphics{graph.1}

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


     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

         http://www.ctan.org


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