%%
%% This is file `presentation.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% presentation.dtx  (with options: `package')
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{presentation}[2019/03/20 v1.0 presentation for semantic macros]
\DeclareOption*{}
\ProcessOptions
\RequirePackage{keyval}[1997/11/10]
\RequirePackage{amsmath}
\def\pres@default@precedence{0}
\def\pres@infty{1000000}
\def\pres@infty@minusone{999999}
\def\iprec{\pres@infty}
\def\niprec{-\pres@infty}
\def\pres@initial@precedence{0}
\def\pres@current@precedence{\pres@initial@precedence}
\def\pres@default@lbrack{(}\def\pres@lbrack{\pres@default@lbrack}
\def\pres@default@rbrack{)}\def\pres@rbrack{\pres@default@rbrack}
\newcommand\withpreci[1]{\edef\pres@current@precedence{#1}}
\newcommand\withprecii[1]{\edef\pres@current@precedence{#1}}
\newcommand\withpreciii[1]{\edef\pres@current@precedence{#1}}
\newcommand\PrecSet[1]{\edef\pres@default@precedence{#1}}
\def\PrecWrite#1{\ifnum\pres@p>\pres@current@precedence\else{#1}\fi}
\def\PrepostPrecWrite#1{\ifnum\pres@p@key>\pres@infty@minusone\else{#1}\fi}
\def\prepost@clearkeys{\def\pres@p@key{\pres@default@precedence}\def\pres@pi@key{\niprec}
\def\pres@lbrack{\pres@default@lbrack}\def\pres@rbrack{\pres@default@rbrack}}
\define@key{prepost}{lbrack}{\def\pres@lbrack{#1}}
\define@key{prepost}{rbrack}{\def\pres@lbrack{#1}}
\define@key{prepost}{p}{\def\pres@p@key{#1}}
\define@key{prepost}{pi}{\def\pres@pi@key{#1}}
\define@key{prepost}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}%
\def\pres@pi@key{-\pres@infty}}
\newcommand\prefix[3][]%key, fn, arg
{\prepost@clearkeys\setkeys{prepost}{#1}
{#2}\PrepostPrecWrite\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\PrepostPrecWrite\pres@rbrack}
\newcommand\postfix[3][]%key, fn, arg
{\prepost@clearkeys\setkeys{prepost}{#1}
\PrepostPrecWrite\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\PrepostPrecWrite\pres@rbrack{#2}}
\def\clearkeys{\let\pres@p@key=\relax
\let\pres@pi@key=\relax%
\let\pres@pi@key=\relax%
\let\pres@pii@key=\relax%
\let\pres@piii@key=\relax}
\define@key{mi}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}%
\def\pres@pi@key{-\pres@infty}}
\define@key{mi}{lbrack}{\def\pres@lbrack@key{#1}}
\define@key{mi}{rbrack}{\def\pres@lbrack@key{#1}}
\define@key{mi}{p}{\def\pres@p@key{#1}}
\define@key{mi}{pi}{\def\pres@pi@key{#1}}
\def\prep@keys@mi%
{\edef\pres@lbrack{\@ifundefined{pres@lbrack@key}\pres@default@lbrack\pres@lbrack@key}
\edef\pres@rbrack{\@ifundefined{pres@rbrack@key}\pres@default@rbrack\pres@rbrack@key}
\edef\pres@p{\@ifundefined{pres@p@key}\pres@default@precedence\pres@p@key}
\edef\pres@pi{\@ifundefined{pres@pi@key}\pres@p\pres@pi@key}}
\newcommand\mixfixi[4][]%key, pre, arg, post
{\clearkeys\setkeys{mi}{#1}\prep@keys@mi%
\PrecWrite\pres@lbrack%
#2{\edef\pres@current@precedence{\pres@pi}#3}#4%
\PrecWrite\pres@rbrack}
\def\@assoc#1#2#3{% precedence, function, argv
\let\@tmpop=\relax% do not print the function the first time round
\@for\@I:=#3\do{\@tmpop% print the function
{\edef\pres@current@precedence{#1}\@I}%
\def\@tmpop{#2}}}%update the function
\newcommand\mixfixa[5][]%key, pre, arg, post, assocop
{\clearkeys\setkeys{mi}{#1}\prep@keys@mi%
\PrecWrite\pres@lbrack{#2}{\@assoc\pres@pi{#5}{#3}}{#4}\PrecWrite\pres@rbrack}
\newcommand\mixfixA[5][]%key, pre, arg, post, assocop
{\clearkeys\setkeys{mi}{#1}\prep@keys@mi%
\renewcommand\do[1]{\@assoc\pres@pi{#5}{##1}{#5}\tabularnewline}%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\begin{array}{l}\docsvlist{#3}\end{array}}%
#4\PrecWrite\pres@rbrack}
\define@key{mii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}%
\def\pres@pi@key{-\pres@infty}\def\pres@pii@key{-\pres@infty}}
\define@key{mii}{lbrack}{\def\pres@lbrack@key{#1}}
\define@key{mii}{rbrack}{\def\pres@lbrack@key{#1}}
\define@key{mii}{p}{\def\pres@p@key{#1}}
\define@key{mii}{pi}{\def\pres@pi@key{#1}}
\define@key{mii}{pii}{\def\pres@pii@key{#1}}
\def\prep@keys@mii{\prep@keys@mi%
\edef\pres@pii{\@ifundefined{pres@pii@key}\pres@p\pres@pii@key}}
\newcommand\mixfixii[6][]%key, pre, arg1, mid, arg2, post
{\clearkeys\setkeys{mii}{#1}\prep@keys@mii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\edef\pres@current@precedence{\pres@pii}#5}#6%
\PrecWrite\pres@rbrack}
\newcommand\mixfixia[7][]%key, pre, arg1, mid, arg2, post, assocop
{\clearkeys\setkeys{mii}{#1}\prep@keys@mii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\@assoc\pres@pii{#7}{#5}}#6%
\PrecWrite\pres@rbrack}
\newcommand\mixfixiA[7][]%key, pre, arg1, mid, arg2, post, assocop
{\clearkeys\setkeys{mii}{#1}\prep@keys@mii%
\renewcommand\do[1]{\@assoc\pres@pi{#7}{##1}{#7}\tabularnewline}%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\begin{array}{l}\docsvlist{#5}\end{array}}#6%
\PrecWrite\pres@rbrack}
\newcommand\mixfixai[7][]%key, pre, arg1, mid, arg2, post, assocop
{\clearkeys\setkeys{mii}{#1}\prep@keys@mii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\@assoc\pres@pi{#7}{#3}}%
#4{\edef\pres@current@precedence{\pres@pii}#5}#6%
\PrecWrite\pres@rbrack}
\define@key{miii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}%
\def\pres@pi@key{-\pres@infty}
\def\pres@pii@key{-\pres@infty}
\def\pres@pii@key{-\pres@infty}}
\define@key{miii}{lbrack}{\def\pres@lbrack@key{#1}}
\define@key{miii}{rbrack}{\def\pres@lbrack@key{#1}}
\define@key{miii}{p}{\def\pres@p@key{#1}}
\define@key{miii}{pi}{\def\pres@pi@key{#1}}
\define@key{miii}{pii}{\def\pres@pii@key{#1}}
\define@key{miii}{piii}{\def\pres@piii@key{#1}}
\def\prep@keys@miii{\prep@keys@mii%
\edef\pres@piii{\@ifundefined{pres@piii@key}{\pres@p}{\pres@piii@key}}}
\newcommand\mixfixiii[8][]%key, pre, arg1, mid1, arg2, mid2, arg3, post
{\clearkeys\setkeys{miii}{#1}\prep@keys@miii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\edef\pres@current@precedence{\pres@pii}#5}%
#6{\edef\pres@current@precedence{\pres@pii}#7}#8%
\PrecWrite\pres@rbrack}
\newcommand\mixfixaii[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, sep
{\clearkeys\setkeys{miii}{#1}\prep@keys@miii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\@assoc\pres@pi{#9}{#3}}%
#4{\edef\pres@current@precedence{\pres@pii}#5}%
#6{\edef\pres@current@precedence{\pres@pii}#7}#8%
\PrecWrite\pres@rbrack}
\newcommand\mixfixiai[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, assocop
{\clearkeys\setkeys{miii}{#1}\prep@keys@miii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\@assoc\pres@pi{#9}{#5}}%
#6{\edef\pres@current@precedence{\pres@pii}#7}#8%
\PrecWrite\pres@rbrack}
\newcommand\mixfixiia[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post,assocop
{\clearkeys\setkeys{miii}{#1}\prep@keys@miii%
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}%
#4{\edef\pres@current@precedence{\pres@pii}#5}%
#6{\@assoc\pres@pi{#9}{#7}}#8%
\PrecWrite\pres@rbrack}
\newcommand\prefixa[4][]%keys, fn, arg, sep
{\prepost@clearkeys\setkeys{prepost}{#1}%
{#2}\pres@lbrack{\@assoc\pres@pi@key{#4}{#3}}\pres@rbrack}
\newcommand\postfixa[4][]%keys, fn, arg, sep
{\prepost@clearkeys\setkeys{prepost}{#1}%
\pres@lbrack{\@assoc\pres@pi@key{#4}{#3}}\pres@rbrack{#2}}
\newcommand\infix[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}}
\newcommand\assoc[3][]{\mixfixa[#1]{}{#3}{}{#2}}
\def\setegroup#1#2{\expandafter\def\csname #1@egroup\endcsname{#2}}
\def\elide#1#2#3{\@ifundefined{#1@egroup}%
{\def\@elevel{0}
\PackageError{presentation}{undefined egroup #1, assuming value 0}%
{When calling \protect\elide{#1}... the elision group #1 has be have\MessageBreak
been set by \protect\setegroup before, e.g. by \protect\setegroup{an}{0}.}}%
{\edef\@elevel{\csname #1@egroup\endcsname}}%
\ifnum\@elevel>#2\else{#3}\fi}
\def\provideEdefault#1#2{\expandafter\def\csname#1@edefault\endcsname{#2}
\@ifundefined{this@module}{}%
{\expandafter\g@addto@macro\this@module{\expandafter\def\csname#1@edefault\endcsname{#2}}}}
\def\setEdefault#1#2{\expandafter\def\csname #1@edfault\endcsname{#2}}
\def\fromEcontext#1{\csname #1@edefault\endcsname}
\newcommand\parray[2]{\begin{array}{#1}#2\end{array}}
\newcommand\parrayline[2]{#1#2\\}
\newcommand\prmatrix[1]{\begin{matrix}#1\end{matrix}}
\def\pmrow#1{\expandafter\@gobble\x@mrow#1\endx@mrow,}
\def\x@mrow#1,{&#1\x@mrow}
\def\endx@mrow#1{\\}
\def\pmrowh#1{\expandafter\@gobble\x@mrowh#1\endx@mrowh,}
\def\x@mrowh#1,{&#1\x@mrowh}
\def\endx@mrowh#1{\\\hline}
\newcommand\parraylineh[2]{#1#2\\\hline}
\newcommand\parraycell[1]{#1&}
\endinput
%%
%% End of file `presentation.sty'.
