Debian Codegraph @

texmf-dist/tex/generic/petri-nets/pntext.sty

raw
1 % This file is part of the Petri-nets packages. See file README for
2 % copyright notice.
3
4 \ProvidesPackage{pntext}
5
6 \typeout{ ** Petri-nets / text commands ** }
7
8 % numbers sets
9
10 \usepackage{amsfonts}
11
12 \newcommand{\mathset}[1]{\relax\ifmmode\mathbb #1\else$\mathbb #1$\fi}
13 \newcommand{\setN}{\mathset{N}}
14 \newcommand{\setZ}{\mathset{Z}}
15 \newcommand{\setQ}{\mathset{Q}}
16 \newcommand{\setR}{\mathset{R}}
17 \newcommand{\setC}{\mathset{C}}
18
19 % places status
20
21 \newcommand{\placestatus}[1]{{\sf #1}}
22 \newcommand{\eplace}{\placestatus{e}}
23 \newcommand{\iplace}{\placestatus{i}}
24 \newcommand{\xplace}{\placestatus{x}}
25
26 % synchronisation, restriction and tie
27
28 \newcommand{\sy}{\relax
29 \ifmmode\mathop{\bf sy}\else{\bf sy}\fi}
30 \newcommand{\rs}{\relax
31 \ifmmode\mathop{\bf rs}\else{\bf rs}\fi}
32 \newcommand{\tie}{\relax
33 \ifmmode\mathop{\bf tie}\else{\bf tie}\fi}
34
35 % scoping
36
37 \newcommand{\lscope}{\relax
38 \ifmmode\left[\mskip -2.05\thinmuskip\left[\else$\lscope$\fi}
39 \newcommand{\Lscope}{\relax\ifmmode\left.\left.\fi}
40 \newcommand{\rscope}{\relax
41 \ifmmode\right]\mskip -2.05\thinmuskip\right]\else$\rscope$\fi}
42 \newcommand{\Rscope}{\relax\ifmmode\right.\right.\fi}
43 \newcommand{\scope}{} % just to test its existence
44 \def\scope #1#2{\relax
45 \ifmmode\lscope#1:#2\rscope\else$\lscope#1:#2\rscope$\fi}
46
47 % choice operator
48
49 \newcommand{\choice}{\relax\ifmmode
50 \mathop{\raise -.2ex\hbox{$\Box$}}\else{\raise -.2ex\hbox{$\Box$}}\fi}
51
52 % B(PB)^2 logo
53
54 \newcommand{\bpn}{\mbox{B(PN)$^2$}}
55
56 % B(PN)^2 syntax
57
58 \newcommand{\bpnkw}[1]{{\bf #1}} % keyword
59 \newcommand{\bpnnt}[1]{{\sf #1}} % non-terminal
60
61 % Mnet mapping function
62
63 \newcommand{\mnet}{\mbox{\sf Mnet}}
64
65 % Var and Val
66
67 \newcommand{\Val}{\relax\ifmmode{V\mskip-1.6\thinmuskip al}%
68 \else{\it Val}\fi}
69 \newcommand{\Var}{\relax\ifmmode{V\mskip-1.5\thinmuskip ar}%
70 \else{\it Var}\fi}