(I hope this is in the right forum; posting here because a related thread was posted here as well).
I'm running MiKTeX and TexNicCenter, I wonder if someone could help me with the following:
I want to use the gastex-package to draw automata. Gastex uses postscript, which makes it incompatible with pdftex. However, I really need to compile with pdftex, because I also want to use the microtype-package.
So, I included the pst-pdf-package in my preamble, and set up TexNicCenter according to the instructions I found in this thread: http://www.latex-community.org/forum/vi ... ?f=4&t=785. But, there is a problem:
Gastex requires that commands are embedded in a {picture}-environment, while pst-pdf requires the a {pspicture} to work properly. I tried to embed the former into the latter, but that doesn't work. Whatever I try, I keep ending up with a blank pdf, and pdftex complaining about the use of \special's.
Can anyone tell me where I'm going wrong? A working example is attached below.
thanks,
Niels
Code: Select all
%example automaton, taken from the gastex homepage
%to be compiled with pdftex, using the appropriate output profile as specified in Thorsten's post in the other thread
\documentclass{article}
\usepackage{gastex}
\usepackage{pst-pdf}
\usepackage{microtype} %not relevant now, but this is what it's all about
\begin{document}
\begin{center}
%\begin{postscript} %a {postscript} shell around the {picture} environment does not work
\begin{picture}(85,33)(-20,-28) %changing this to a {pspicture} environment causes gastex commands to stop working
\put(-20,-28){\framebox(85,33){}}
\gasset{Nadjust=w,Nadjustdist=2,Nh=6,Nmr=1}
\node[Nmarks=i](A)(0,0){idle}
\node(B)(50,0){wait}
\node(C)(50,-20){wait}
\node[Nmarks=r](D)(0,-20){critical}
\drawedge(A,B){req1:=true}
\drawedge(B,C){turn:=2}
\drawedge[syo=-1,eyo=-1](C,D){turn=1?}
\drawedge[syo=1,eyo=1,ELside=r](C,D){req2=false?}
\drawedge(D,A){req1:=false}
\end{picture}
%\end{postscript}
\end{center}
\end{document}