0% found this document useful (0 votes)
21 views3 pages

GasTeX Guide: Automata in LaTeX

Uploaded by

mir.cazasu27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

GasTeX Guide: Automata in LaTeX

Uploaded by

mir.cazasu27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GasTeX: Graphs and Automata Simplified in TEX

Paul Gastin
LMF, ENS Paris-Saclay
[Link]@[Link]

v3.0

Abstract

This is a very minimal startup guide including some examples.

For the documentation, please see [Link]


The package consists of two files [Link] and [Link].

• [Link] contains the definition of all GasTeX macros. This file could be in your
working folder but it is best placed where .sty files are, e.g.,
.../texmf-dist/tex/latex/gastex/[Link]
or
.../texmf-local/tex/latex/gastex/[Link]

• [Link] which contains all the postscript procedures used to actually draw the
pictures. This file could be in your working folder but it is best placed where .pro
files are, e.g.,
.../texmf-dist/dvips/gastex/[Link]
or
.../texmf-local/dvips/gastex/[Link]

This documentation file simply contains a few simple examples on how to make figures
with GasTeX. It should be compiled with

pdflatex --shell-escape [Link]


or
pdflatex --enable-write18 [Link]

1
The first example below is a 2-way deterministic finite state transducer. It consists of a
gpicture environment which contains the GasTeX commands for nodes and transitions.

⊢/ε, +1 a/ε, +1 ⊣/ε, +1 a/ε, +1

b/ε, +1 b/ε, +1 a/ε, +1


q0 q1 q2 q3

b/ε, +1 b/ε, −1 b/ε, −1

q6 q5 q4
b/ε, +1 b/ε, −1

a/ε, +1 a/b, −1 a/a, −1

The second one is in Figure 1. The pictures have been defined at the beginning of the
LATEX document, with the name and ignore optional parameters given to the gpicture
environment. These pictures are generated but not inserted immediately. Instead, the
\gusepicture command allows to include each named picture, possibly multiple times
at different places.
All pictures defined in gpicture environments are compiled and stored in a file called
[Link], one picture per page. These pictures could be included in any LATEX
file, possibly another LATEX file which need not use the GasTeX package, simply by using
\includegraphics as follows:

\includegraphics[page=2,scale=0.6]{[Link]}
p u v
ρ0 p1
ρ1
p2
ρ2
p3
ρ4 ρ3
p4
q

This is convenient for instance when sending the LATEX file to Arxiv or to an editor
(journal, proceedings) which does not allow the --shell-escape option when compiling
with pdflatex. Actually, GasTeX does this automatically for you. When loading the
package, set the recompilepics option to false as follows:

\usepackage[pdflatex,recompilepics=false]{gastex}

then you may compile without the --shell-escape option

pdflatex [Link]

and GasTeX automatically calls \includegraphics to include the pictures that have been
previously generated and stored in the file [Link].

2
p u v p u v
ρ0 p1 ρ0 p1
ρ1 ρ1
p2 p2
ρ2 ρ2
p3 p3
ρ4 ρ3 ρ4 ρ3
p4 p5 p4
ρ5 q
q

Figure 1: Decomposition of a left-right run and a left-left run over the product w = uv.

You might also like