diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-07 20:49:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-07 20:49:10 +0000 |
commit | ddfe3a4eaf95167482e923d4da3de2917a7dbfbb (patch) | |
tree | 0acc1bb60b37392451f5e79e00c33c487c19abcf /Master/texmf-dist/tex/latex/stex/presentation | |
parent | a04ae5a947a6b06bc717719f6ad63e6de5cb5af6 (diff) |
stex (7apr16)
git-svn-id: svn://tug.org/texlive/trunk@40320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/presentation')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/presentation/presentation.sty | 84 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml | 364 |
2 files changed, 57 insertions, 391 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty index 0b0362bf30c..3692af31642 100644 --- a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty +++ b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty @@ -7,32 +7,40 @@ %% presentation.dtx (with options: `package') %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{presentation}[2012/01/28 v1.0 presentation for semantic macros] +\ProvidesPackage{presentation}[2016/04/06 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} -\def\PrecSet#1{\def\pres@default@precedence{#1}} +\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}} -\newcommand{\prefix}[3][]%key, fn, arg +\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}\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack} -\newcommand{\postfix}[3][]%key, fn, arg +{#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} -\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack{#2}} -\newcommand{\funapp}[2]{\prefix{#1}{#2}} +\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% @@ -49,7 +57,7 @@ \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 +\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% @@ -58,10 +66,16 @@ \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}% -\let\@tmpop=#2}}%update the function -\newcommand{\mixfixa}[5][]%key, pre, arg, post, assocop +\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}} @@ -71,19 +85,26 @@ \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 +\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 +\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{\mixfixai}[7][]%key, pre, arg1, mid, arg2, post, assocop +\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}}% @@ -101,42 +122,42 @@ \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 +\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 +\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 +\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 +\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{#3}{#4}}\pres@rbrack} -\newcommand{\postfixa}[4][]%keys, fn, arg, sep -{\prepost@clearkeys\setkeys{prepost}{#1} -\pres@lbrack{\@assoc\pres@pi@key{#3}{#4}}\pres@rbrack{#2}} -\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} -\newcommand{\assoc}[3][]{\mixfixa[#1]{}{#3}{}{#2}} +\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} @@ -150,8 +171,17 @@ been set by \protect\setegroup before, e.g. by \protect\setegroup{an}{0}.}}% {\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{\arrayline}[2]{#1#2\\} -\newcommand{\arraycell}[1]{#1&} +\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,{\x@mrow} +\def\endx@mrow#1{\\} +\def\pmrowh#1{\expandafter\@gobble\x@mrowh#1\endx@mrowh,} +\def\x@mrowh#1,{\x@mrowh} +\def\endx@mrowh#1{\\\hline} +\newcommand\parraylineh[2]{#1#2\\\hline} +\newcommand\parraycell[1]{#1&} \endinput %% %% End of file `presentation.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml deleted file mode 100644 index c0154aaa9b3..00000000000 --- a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml +++ /dev/null @@ -1,364 +0,0 @@ -# -*- CPERL -*- -package LaTeXML::Package::Pool; -use strict; -use LaTeXML::Package; -DefMacro('\iprec','1000000'); -DefMacro('\niprec','-1000000'); -DefConstructor('\crossrefOp[]{}', - "?#2(<ltx:XMApp role='CROSSREFOP'>" - . "<ltx:XMTok role='CROSSREFOP' cr='?#1(#1)(fun)'/>" - . "<ltx:XMWrap>#2</ltx:XMWrap>" - ."</ltx:XMApp>)()", - requireMath=>1); - -DefMacro('\prefix[]{}{}','\@prefix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); -DefConstructor('\@prefix OptionalKeyVals:mi {}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . "argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "#2" - . "<m:mrow>" - . "<m:mo fence='true'>(</m:mo>" - . "#3" - . "<m:mo fence='true'>)</m:mo>" - . "</m:mrow>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { - #Default argument precedence is -\infty - my $keyval = $_[1]->getArg(1); - $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); - applyPrecedencePreferences(@_); - }, - properties=>sub { getSymmdefProperties($_[1]); }); -DefMacro('\postfix []{}{}','\@postfix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); -DefConstructor('\@postfix OptionalKeyVals:mi {}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - ."argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mrow>" - . "<m:mo fence='true'>(</m:mo>" - . "#3" - . "<m:mo fence='true'>)</m:mo>" - . "</m:mrow>" - . "#2" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { - #Default argument precedence is -\infty - my $keyval = $_[1]->getArg(1); - $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); - applyPrecedencePreferences(@_); - }, - properties=>sub { getSymmdefProperties($_[1]); }); -DefConstructor('\funapp{}{}','<ltx:XMApp>#1#2</ltx:XMApp>'); -our $max_arguments = 10; #Currently max 10 arguments to \symdef. -DefKeyVal('mi','lbrack','Semiverbatim'); -DefKeyVal('mi','rbrack','Semiverbatim'); -DefKeyVal('mi','p','Semiverbatim'); -DefKeyVal('mi','pi','Semiverbatim'); -DefKeyVal('mi','pii','Semiverbatim'); #Why are we using this at mixfixai ? -DefKeyVal('mi','cd','Semiverbatim'); -DefKeyVal('mi','name','Semiverbatim'); -DefKeyVal('mi','nobrackets','Semiverbatim'); -sub argument_precedence { - my ($keyval) = @_; - my $attr = 'pi'; - my @precs = (); - foreach (1..$max_arguments) { - if (defined KeyVal($keyval,$attr)) { - push @precs, ToString(KeyVal($keyval,$attr)) - } else { - push @precs, ""; - } - $attr = $attr.'i'; - } - return join(" ",@precs)." "; -} -sub applyPrecedencePreferences { - my ($stomach,$whatsit) = @_; - my @args = $whatsit->getArgs; - my $keyvals = shift @args; - return unless (defined $keyvals); - my %kvhash = %{$keyvals->getKeyVals}; - #Default p (operator precedence) if not set: - my $default_precedence = LookupValue('default_precedence'); - $keyvals->setValue('p',$default_precedence) unless defined($keyvals->getValue('p')); - return unless (exists $kvhash{'nobrackets'}); - $keyvals->setValue('p',1000000); - $keyvals->setValue('pi',-1000000); - $keyvals->setValue('pii',-1000000); - $keyvals->setValue('piii',-1000000); - return; -}#$ -DefMacro('\mixfixi[]{}{}{}', - '\@mixfixi[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}'); -DefConstructor('\@mixfixi OptionalKeyVals:mi {}{}{}', - "<omdoc:rendering" - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')')" - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixa[]{}{}{}{}', - '\@mixfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}' - . '{\ensuremath{\crossrefOp[fun]{\ensuremath{#5 }}}}'); -DefConstructor('\@mixfixa OptionalKeyVals:mi {}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')')>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#5</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#4" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefKeyVal('mii','lbrack','Semiverbatim'); -DefKeyVal('mii','rbrack','Semiverbatim'); -DefKeyVal('mii','p','Semiverbatim'); -DefKeyVal('mii','pi','Semiverbatim'); -DefKeyVal('mii','pii','Semiverbatim'); -DefKeyVal('mii','cd','Semiverbatim'); -DefKeyVal('mii','name','Semiverbatim'); -DefKeyVal('mii','nobrackets','Semiverbatim'); -DefMacro('\mixfixii[]{}{}{}{}{}', - '\@mixfixii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}'); -DefConstructor('\@mixfixii OptionalKeyVals:mi {}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . "argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4 #5 #6" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixia[]{}{}{}{}{}{}', - '\@mixfixia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}' - . '{\ensuremath{\crossrefOp[fun]{#7}}}'); -DefConstructor('\@mixfixia OptionalKeyVals:mii {}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#7</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#6" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixai[]{}{}{}{}{}{}', - '\@mixfixai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - .'{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - .'{\ensuremath{\crossrefOp[fun]{#6}}}' - .'{\ensuremath{\crossrefOp[fun]{#7}}}'); -DefConstructor('\@mixfixai OptionalKeyVals:mi {}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#7</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#4 #5 #6" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefKeyVal('miii','lbrack','Semiverbatim'); -DefKeyVal('miii','rbrack','Semiverbatim'); -DefKeyVal('miii','p','Semiverbatim'); -DefKeyVal('miii','pi','Semiverbatim'); -DefKeyVal('miii','pii','Semiverbatim'); -DefKeyVal('miii','piii','Semiverbatim'); -DefKeyVal('miii','cd','Semiverbatim'); -DefKeyVal('miii','name','Semiverbatim'); -DefKeyVal('miii','nobrackets','Semiverbatim'); -DefMacro('\mixfixiii[]{}{}{}{}{}{}{}', - '\@mixfixiii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' - . '{\ensuremath{\crossrefOp[fun]{#8}}}'); -DefConstructor('\@mixfixiii OptionalKeyVals:mi {}{}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4 #5 #6 #7 #8" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixaii[]{}{}{}{}{}{}{}{}', - '\@mixfixaii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' - . '{\ensuremath{\crossrefOp[fun]{#8}}}' - . '{\ensuremath{\crossrefOp[fun]{#9}}}'); -DefConstructor('\@mixfixaii OptionalKeyVals:mi {}{}{}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#9</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#4 #5 #6 #7 #8" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixiai[]{}{}{}{}{}{}{}{}', - '\@mixfixiai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' - . '{\ensuremath{\crossrefOp[fun]{#8}}}' - . '{\ensuremath{\crossrefOp[fun]{#9}}}'); -DefConstructor('\@mixfixiai OptionalKeyVals:mi {}{}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#9</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#6 #7 #8" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\mixfixiia[]{}{}{}{}{}{}{}{}', - '\@mixfixiia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' - . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' - . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' - . '{\ensuremath{\crossrefOp[fun]{#8}}}' - . '{\ensuremath{\crossrefOp[fun]{#9}}}'); -DefConstructor('\@mixfixiia OptionalKeyVals:mi {}{}{}{}{}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . " argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mo egroup='fence' fence='true'>(</m:mo>" - . "#2 #3 #4 #5 #6" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#9</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "#8" - . "<m:mo egroup='fence' fence='true'>)</m:mo>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { applyPrecedencePreferences(@_);}, - properties=>sub { getSymmdefProperties($_[1]); });#$ -DefMacro('\prefixa[]{}{}{}','\@prefixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); -DefConstructor('\@prefixa OptionalKeyVals:mi {}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - . "argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "#2" - . "<m:mrow>" - . "<m:mo fence='true'>(</m:mo>" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#4</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "<m:mo fence='true'>)</m:mo>" - . "</m:mrow>" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { - #Default argument precedence is -\infty - my $keyval = $_[1]->getArg(1); - $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); - applyPrecedencePreferences(@_); - }, - properties=>sub { getSymmdefProperties($_[1]); }); -DefMacro('\postfixa []{}{}{}','\@postfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); -DefConstructor('\@postfixa OptionalKeyVals:mi {}{}{}', - "<omdoc:rendering " - . "?&defined(&KeyVal(#1,'p'))(precedence='&KeyVal(#1,'p')') " - ."argprec='&argument_precedence(#1)'>" - . "<m:mrow>" - . "<m:mrow>" - . "<m:mo fence='true'>(</m:mo>" - . "<omdoc:iterate name='args' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')>" - . "<omdoc:separator>#4</omdoc:separator>" - . "<omdoc:render name='arg' " - . "?&defined(&KeyVal(#1,'pi'))(precedence='&KeyVal(#1,'pi')')/>" - . "</omdoc:iterate>" - . "<m:mo fence='true'>)</m:mo>" - . "</m:mrow>" - . "#2" - . "</m:mrow>" - ."</omdoc:rendering>", - afterDigest=>sub { - #Default argument precedence is -\infty - my $keyval = $_[1]->getArg(1); - $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); - applyPrecedencePreferences(@_); - }, - properties=>sub { getSymmdefProperties($_[1]); }); -RawTeX(' -\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} -\newcommand{\assoc}[3][]{\mixfixa[#1]{}{#3}{}{#2}} -'); -DefConstructor('\arrayline{}{}','<ltx:XMRow>#1<ltx:XMCell>#2</ltx:XMCell></ltx:XMRow>'); -DefConstructor('\arraycell{}','<ltx:XMCell>#1</ltx:XMCell>'); -1; |