diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/petri-nets/pntext.sty |
Initial commit
Diffstat (limited to 'macros/generic/petri-nets/pntext.sty')
-rw-r--r-- | macros/generic/petri-nets/pntext.sty | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/macros/generic/petri-nets/pntext.sty b/macros/generic/petri-nets/pntext.sty new file mode 100644 index 0000000000..1f337cfe5d --- /dev/null +++ b/macros/generic/petri-nets/pntext.sty @@ -0,0 +1,70 @@ +% This file is part of the Petri-nets packages. See file README for +% copyright notice. + +\ProvidesPackage{pntext} + +\typeout{ ** Petri-nets / text commands ** } + +% numbers sets + +\usepackage{amsfonts} + +\newcommand{\mathset}[1]{\relax\ifmmode\mathbb #1\else$\mathbb #1$\fi} +\newcommand{\setN}{\mathset{N}} +\newcommand{\setZ}{\mathset{Z}} +\newcommand{\setQ}{\mathset{Q}} +\newcommand{\setR}{\mathset{R}} +\newcommand{\setC}{\mathset{C}} + +% places status + +\newcommand{\placestatus}[1]{{\sf #1}} +\newcommand{\eplace}{\placestatus{e}} +\newcommand{\iplace}{\placestatus{i}} +\newcommand{\xplace}{\placestatus{x}} + +% synchronisation, restriction and tie + +\newcommand{\sy}{\relax + \ifmmode\mathop{\bf sy}\else{\bf sy}\fi} +\newcommand{\rs}{\relax + \ifmmode\mathop{\bf rs}\else{\bf rs}\fi} +\newcommand{\tie}{\relax + \ifmmode\mathop{\bf tie}\else{\bf tie}\fi} + +% scoping + +\newcommand{\lscope}{\relax + \ifmmode\left[\mskip -2.05\thinmuskip\left[\else$\lscope$\fi} +\newcommand{\Lscope}{\relax\ifmmode\left.\left.\fi} +\newcommand{\rscope}{\relax + \ifmmode\right]\mskip -2.05\thinmuskip\right]\else$\rscope$\fi} +\newcommand{\Rscope}{\relax\ifmmode\right.\right.\fi} +\newcommand{\scope}{} % just to test its existence +\def\scope #1#2{\relax + \ifmmode\lscope#1:#2\rscope\else$\lscope#1:#2\rscope$\fi} + +% choice operator + +\newcommand{\choice}{\relax\ifmmode + \mathop{\raise -.2ex\hbox{$\Box$}}\else{\raise -.2ex\hbox{$\Box$}}\fi} + +% B(PB)^2 logo + +\newcommand{\bpn}{\mbox{B(PN)$^2$}} + +% B(PN)^2 syntax + +\newcommand{\bpnkw}[1]{{\bf #1}} % keyword +\newcommand{\bpnnt}[1]{{\sf #1}} % non-terminal + +% Mnet mapping function + +\newcommand{\mnet}{\mbox{\sf Mnet}} + +% Var and Val + +\newcommand{\Val}{\relax\ifmmode{V\mskip-1.6\thinmuskip al}% + \else{\it Val}\fi} +\newcommand{\Var}{\relax\ifmmode{V\mskip-1.5\thinmuskip ar}% + \else{\it Var}\fi} |