summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/petri-nets/pndraw.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:02:26 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:02:26 +0000
commit048e080abeec202eff94a248440707c29174dc2f (patch)
tree9b8de03c52a955f1b2125a9adea45d494e0fa84f /Master/texmf-dist/tex/latex/petri-nets/pndraw.sty
parent32bab6927929e2ba62a4ec9d54664eea7260ad16 (diff)
petri-nets
git-svn-id: svn://tug.org/texlive/trunk@1190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/petri-nets/pndraw.sty')
-rw-r--r--Master/texmf-dist/tex/latex/petri-nets/pndraw.sty54
1 files changed, 54 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/petri-nets/pndraw.sty b/Master/texmf-dist/tex/latex/petri-nets/pndraw.sty
new file mode 100644
index 00000000000..f3f460fdaea
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/petri-nets/pndraw.sty
@@ -0,0 +1,54 @@
+% This file is part of the Petri-nets packages. See file README for
+% copyright notice.
+
+\ProvidesPackage{pndraw}
+
+\newenvironment{petrinet}{\beginnet}{\endnet}
+
+%%
+%% running standard LaTeX
+%%
+
+\begingroup
+ \catcode`\:=11
+ \gdef\input:pndraw{\input pndraw.tex
+ \endinput}
+ \expandafter\ifx\csname pdfoutput\endcsname\relax
+ \aftergroup\input:pndraw
+ \fi
+\endgroup
+
+%%
+%% running pdfLaTeX
+%%
+
+\input pnversion
+
+\usepackage{graphicx}
+
+\newcounter{pncount}
+\setcounter{pncount}{0}
+
+\catcode`\:=11
+{\catcode`\^^M=\active \let^^M=\relax %
+ \global\def\net:drop #1^^M{}%
+ \global\def\beginnet #1(#2)(#3){\bgroup%
+ \let\pst=\net:drop%
+ \let\place=\net:drop%
+ \let\trans=\net:drop%
+ \let\store=\net:drop%
+ \let\module=\net:drop%
+ \let\source=\net:drop%
+ \let\text=\net:drop%
+ \let\link=\net:drop%
+ \let\arc=\net:drop%
+ \let\label=\net:drop%
+ \let\showbb=\net:drop%
+ \catcode`\^^M=\active\let^^M=\relax}}
+\catcode`\:=12
+
+\def\endnet{\egroup
+ \addtocounter{pncount}{1}%
+ \includegraphics{\jobname-fig\thepncount.pdf}}
+
+\immediate\write18{pn2pdf \jobname}