GasTeX: Graphs and Automata Simplified in TeX
version 2.3
Last update: May 5, 2002
JasTeX :
the long-awaited graphical interface in Java
for GasTeX.
Introduction and examples
GasTeX is a set of LaTeX macros which allow to draw very easily
graphs, automata, nets, diagrams, etc... under the picture environment
of LaTeX. A picture with gastex basically consists of nodes and edges.
Here are a few examples of pictures that are easily defined with
gastex.
Download
In order to use gastex you should download the following files:
- gastex.sty (05/05/02)
which contains the definition of all the TeX macros,
- gastex.pro (05/05/02)
which contains all the postscript procedures (this file could be in your
working folder but it is best placed where the tex.pro file is),
- gastex.txt (05/05/02)
the short documentation for gastex, you may also look directly in the
file gastex.sty where all macros are documented,
- ex-gastex.tex (05/05/02) some examples to test your
installation
- gastex may be used with prosper in order to produce very
nice animated slides. Here is a simple
example . (New: 03/01/02)
Feedback
I hope you will find gastex helpful. Let me know if you have any
problem or suggestion to improve gastex.
If you are using gastex, I'd like to know it so please send me an email and if you
wish I'll let you know about new versions if any (I don't intend to
spend much time in the near future).
Remarks
- pdflatex and gastex : gastex does not work with pdflatex since it produces
postscript code and pdflatex does not know what to do with it. (New: 03/01/02)
Solution: Use latex and then ps2pdf.
I don't know whether it is possible to
translate my postscript code into pdf code. The problem is that I'm
using postscript to make some computations and not only to draw the
picture. I would appreciate the help of a pdf guru on this. -
This new version of gastex has been completely rewritten. It is
much more powerful than version 1.0. You need to use a compatible mode
if you wish to use old pictures with this new version. See the files gastex.txt and ex-gastex.tex
to learn more about this compatibility.
- The perl script GasTeX1to2.pl allows
you to translate most gastex 1.0 pictures to gastex 2.0 syntax. Just use
this perl script as a filter on your file.
- gastex mainly generates postscript so the pictures cannot be seen
with a dvipreviewer. One should use a postscript printer or a
postscript previewer (which usually allows also to print on
nonpostscript printers).
- I have only tested gastex with dvips.
- In case you need the old version, it is still available here .
History since version 2.0
version 2.3: (New:
05/05/02)
- Added the parameter ELdistC (y or n)
allowing to specify whether the distance (ELdist) is between the
center (y) of the label and the edge or between the side (n) of the
label and the edge. The behaviour of previous gastex versions
corresponds to the setting (n) which is therefore the default.
- Added the macro \drawqbpedge allowing to specify the auxiliary
point of a quadratic Bezier curve with two angles instead of the
absolute coordinates required by \drawqbedge.
- Added parameters sxo, syo, exo, eyo (offsets in \unitlength).
They define offsets for the virtual starting and ending points of an
edge with respect to the centers of the starting and ending nodes.
- Improved drawing for arrowheads (in gastex.pro). First, the
direction of the arrowhead is better for curved edges. Second, when
several arrowheads are drawn they follow the curve. Previously, they
followed the tangent at the ending point of the edge which was bad for
curved edges.
version 2.2:
(03/01/02)
- Added the options slide and paper to the
package.
In order to get the default settings for
slides, use
\usepackage[slide]{gastex}
The default settings for papers is obtained with
\usepackage[paper]{gastex}
or
- Added new option loopCW to define whether
loops are in clockwise direction or not.
- Fix a TeX error (Arithmetic overflow) that
occurred when using \drawedge(A,B){} with two nodes A and B having the
same coordinates.
Now, in this case, an error message is issued
in the log and the macro \drawedge(A,B){} is ignored.
version 2.1:
- New macros to draw directly circles,
rectanges, ovals, lines and bezier curves.
\drawcircle, \drawrect, \drawoval,
\drawline, \drawqbezier, \drawcbezier
All these macros uses gasset options and in
particular:
Nframe, Nfill, linecolor, fillcolor, dash,
AHnb, etc...
- Compatibility mode for pspictpg up to v0.6
Fix the bug which occured sometimes when using
Nw=0,Nh=0.
version 2.01:
- Fix an error that occured in v2.0 when
using Nfill=y without defining previously fillgray or fillcolor.
The following default setting has been added.
\gasset{fillgray=0,Nfill=n} % Not filled but
black if filled
Known problems
and (hopefully) solutions
- GasTeX and German (21/10/99):
Frank Goertzen (frank.goertzen@unibw-muenchen.de) has reported that
when using gastex together with german an error may occur when running
dvips if the german package is loaded first.
Solution: load gastex before german:
\usepackage{gastex}
\usepackage{german}
I have no idea concerning the cause of this error.
- Zero width or height (07/03/00): A postscript error may
occur when using Nw=0,Nh=0.
Solution: Use a small value instead of 0, e.g. Nw=0.1,Nh=0.1
Fixed in version 2.1
- gasset and tabular (27/10/00):
Using gasset inside a tabular or an array produces an error. (New: 03/01/02)
The reason is that I'm using the "&" symbol
as a marker in order to process gasset options.
Solution: Include the whole picture
inside an mbox.
\begin{tabular}{c}
\mbox{\begin{picture}(10,20)(-5,-5)
\gasset{ELdist=0}
\node(A)(0,0){1}\drawloop(A){$a$}
\end{picture}}
\end{tabular}
- pdflatex and gastex: gastex does
not work with pdflatex since it produces postscript code and pdflatex
does not know what to do with it. (New:
03/01/02)
Solution: Use latex and then ps2pdf.