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
|
Introduction
JFLAP is a popular Java program for experimenting with finite state machines,
Turing machines and other concepts from Formal Languages and Automata Theory.
Version 7 of JFLAP can export JPG, PNG, GIF, BMP, or SVG images. JFLAP2TikZ is
a groovy script that converts a JFLAP jff file representing a finite automaton,
pushdown automaton, or Turing machine into a LaTeX file depicting the automaton
graphically using TikZ.
Requirements
To use JFLAP2TikZ you will need Java installed. Additionally, you may find it
useful to have Groovy installed as well. You will need to download either
jflap2tikz.jar (if you only have Java installed) or jflap2tikz.groovy (if you
also have groovy installed).
Usage
JFLAP2TikZ is invoked from the command line with:
java -jar jflap2tikz.jar -i example.jff
or:
groovy jflap2tikz.groovy -i example.jff
In the above cases the output will be written to the console. Use the -h option
to see the full usage information, which is also given below.
usage: jflap2tikz [options]
Version 1.1
-d,--accepting-distance <distance> Distance, in pt, between the circles of an
accepting state (default is 2)
-g,--grid <size> Round positions so that they are on a
grid. If a size is given it sets the
spacing of the grid (default is 20.0)
-h,--help Show usage information and quit
-i,--input-file <filename> Name of a JFLAP jff file representing a
finite automaton, pushdown automaton, or
Turing machine. If a file is not given
standard input will be used.
-l,--arrow-length <length> Length of arrows in points (default is 9)
-o,--output-file <filename> Name of a file for writing output. If this
file already exists it will be
overwritten.
-r,--rotate Rotate labels along edges
-s,--scale <x> 1 pixel in JFLAP = x points in LaTeX
(default is 1.0)
-w,--arrow-width <width> Width of arrows in points (default is 6)
License
JFLAP2TikZ and its documentation are licensed under an MIT style license
Copyright (c) 2009,2014 Andrew Mertz and William Slough
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|