circus.sty 3.15 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
% -- circus.sty version 1 -------------------------------------------------

% Comments, complaints, and suggestions to
%
% Jim.Woodcock@comlab.ox.ac.uk
%
% Acknowledgements to Jim Davies and Mike Spivey.
%
% Changed on 4.7.02 by Ana Cavalcanti to include: \circnameset
%
% -- circus.sty -----------------------------------------------------------

\def\fileversion{1.0}
\def\filedate{01/07/17}

\NeedsTeXFormat{LaTeX2e}

\ProvidesPackage{circus}[{\filedate\space\fileversion\space circus package}]

% -- options -----------------------------------------------------------

\newif\if@cm@ \@cm@false
\newif\if@lucida@ \@lucida@false
\newif\if@times@ \@times@false
\newif\if@color@ \@color@false
\newif\if@csp@ \@csp@false

\DeclareOption{cm}{\@cm@true\@lucida@false\@times@false}
\DeclareOption{lucida}{\@cm@false\@lucida@true\@times@false}
\DeclareOption{times}{\@cm@false\@lucida@false\@times@true}
\DeclareOption{color}{\@color@true}
\DeclareOption{csp}{\@csp@true}

\ExecuteOptions{cm} \ProcessOptions

\RequirePackageWithOptions{zed}

\@ifpackageloaded{csp}{\relax}{%
\RequirePackageWithOptions{csp}}

%\RequirePackage{my-a4}

\newenvironment{circus}{\begin{zed}}{\end{zed}}%

\def\fuzz{{\large\it f\kern0.1em}{\normalsize\sc uzz}}
\let\Fuzz=\fuzz

\makeatletter

\def\demo{\par\vbox\bgroup\begingroup\quote}

\def\gives{\endquote\endgroup\egroup}

\def\enddemo{\global\@ignoretrue}

\def\symtab{\setbox0=\vbox\bgroup \def\\{\cr}
\halign\bgroup\strut$##$\hfil&\quad##\hfil\cr}

\def\endsymtab{\crcr\egroup\egroup \dimen0=\ht0 \divide\dimen0 by2
\advance\dimen0 by\ht\strutbox \splittopskip=\ht\strutbox
\vbadness=10000 \predisplaypenalty=0
$$\halign{##\cr\hbox to\linewidth{%
\valign{##\vfil\cr
\setbox1=\vsplit0 to\dimen0 \unvbox1\cr
\noalign{\hfil}\unvbox0\cr
\noalign{\hfil}}}\cr
\noalign{\prevdepth=\dp\strutbox}}$$
\global\@ignoretrue}

\makeatother

%%ignore \block \endblock

\newcommand{\mathsl}[1]{\hbox{\slshape #1}}

\newcommand{\Circus}{{\sf\slshape Circus}}

\newcommand{\circbegin}{\mathbf{begin}}
\newcommand{\circstate}{\mathbf{state}}
\newcommand{\circchannel}{\mathbf{channel}}
\newcommand{\circchanset}{\mathbf{chanset}}
\newcommand{\circnameset}{\mathbf{nameset}}
\newcommand{\circcon}{\mathbf{con}}
\newcommand{\circelse}{[\!]}
\newcommand{\circend}{\mathbf{end}}
\newcommand{\circfi}{\mathbf{fi}}
\newcommand{\circif}{\mathbf{if}}
\newcommand{\circdo}{\mathbf{do}}
\newcommand{\circod}{\mathbf{od}}
\newcommand{\circmu}{\mu}
\newcommand{\circprocess}{\mathbf{process}}
\newcommand{\circthen}{\rightarrow}
\newcommand{\circvar}{\mathbf{var}}
\newcommand{\circval}{\mathbf{val}}
\newcommand{\circres}{\mathbf{res}}
\newcommand{\circvres}{\mathbf{vres}}
\newcommand{\circvalres}{\circvres}
\newcommand{\boolean}{{\mathbb B}}
\newcommand{\freetype}[1]{\mathsf{#1}}

\newcommand{\Semi}{\hbox{\large ;}}

\newcommand{\lchanset}{\{\!|}
\newcommand{\rchanset}{|\!\}}
\newcommand{\linter}{|\!|\hspace{-4pt}[}
\newcommand{\rinter}{]\hspace{-4pt}|\!|}

\def\II{\hbox{\texttt{\slshape I \kern -7.5pt I}}}
\def\circledR{{\mathhexbox\msafam@72 }}