% This file is part of the Petri-nets packages. See file README for
% copyright notice.

\message{ ** Petri-nets / text commands ** }
\input pnversion

% math sets

\newfam\setfam \def\setfont{\fam\setfam\tenset}
\font\tenset=bbm10 \font\sevenset=bbm7 \font\fiveset=bbm5
\textfont\setfam=\tenset
\scriptfont\setfam=\sevenset
\scriptscriptfont\setfam=\fiveset

\def\mathset #1{{\setfont #1}}
\def\setN{{\setfont N}}
\def\setZ{{\setfont Z}}
\def\setQ{{\setfont Q}}
\def\setR{{\setfont R}}
\def\setC{{\setfont C}}

% places status

\def\placestatus #1{{\ss #1}}
\def\eplace{\placestatus{e}}
\def\iplace{\placestatus{i}}
\def\xplace{\placestatus{x}}

% synchronisation, restriction and tie

\def\sy{\relax
  \ifmmode\mathop{\bf sy}\else{\bf sy}\fi}
\def\rs{\relax
  \ifmmode\mathop{\bf rs}\else{\bf rs}\fi}
\def\tie{\relax
  \ifmmode\mathop{\bf tie}\else{\bf tie}\fi}

% scoping

\def\lscope{\relax
  \ifmmode\left[\mskip -2.05\thinmuskip\left[\else$\lscope$\fi}
\def\Lscope{\relax\ifmmode\left.\left.\fi}
\def\rscope{\relax
  \ifmmode\right]\mskip -2.05\thinmuskip\right]\else$\scope$\fi}
\def\Rscope{\relax\ifmmode\right.\right.\fi}
\def\scope #1#2{\lscope#1:#2\rscope}

% choice operator

\def\choice{\relax\ifmmode
  \mathbin{\mathpalette\choicebody{}}%
  \else${\choice}$\fi}

\def\choicebody #1#2{\vcenter{\hrule
  \hbox{\vrule$#1\phantom{*}$\vrule}\vss\hrule}}

% B(PB)^2 logo

\def\bpn{\hbox{B(PN)$^2$}}

% B(PN)^2 syntax

\def\bpnkw #1{{\bf #1}} % keyword
\def\bpnnt #1{{\ss #1}} % non-terminal

% Mnet mapping function

\def\mnet{\hbox{\sf Mnet}}

% Var and Val

\def\Val{\relax\ifmmode{V\mskip-1.6\thinmuskip al}%
  \else{\it Val}\fi}
\def\Var{\relax\ifmmode{V\mskip-1.5\thinmuskip ar}%
  \else{\it Var}\fi}
