summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/presentation.sty
blob: 53eb139fe7a81cd896a1db613b11023d4bcf3a22 (plain)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
%%
%% 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}[2007/09/03 v0.9e presentation for semantic macros]

\RequirePackage{keyval}[1997/11/10]
\def\pres@default@precedence{1000}
\def\setDefaultPrecedence#1{\def\pres@default@precedence{#1}}
\def\pres@initial@precedence{1000}
\def\setInitialPrecedence#1{\def\pres@initial@precedence{#1}}
\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\setDefaultLeftBracket#1{\def\pres@default@lbrack{#1}}
\def\setDefaultRightBracket#1{\def\pres@default@rbrack{#1}}
\def\PrecSet#1{\def\pres@default@precedence{#1}}
\def\PrecWrite#1{\ifnum\pres@current@precedence>\pres@p\else{#1}\fi}
\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}{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
{\setkeys{mi}{#1}\prep@keys@mi\clearkeys
\PrecWrite\pres@lbrack% write bracket if necessary
#2{\edef\pres@current@precedence{\pres@pi}#3}#4%
\PrecWrite\pres@rbrack}
\newcommand{\mixfixa}[5][]%key, pre, arg, post, assocop
{\setkeys{mi}{#1}\prep@keys@mi\clearkeys%
\PrecWrite\pres@lbrack{#2}{\@assoc\pres@pi{#5}{#3}}{#4}\PrecWrite\pres@rbrack}
\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}}%
\let\pres@pii@key=\relax}
\newcommand{\mixfixii}[6][]%key, pre, arg1, mid, arg2, post
{\setkeys{mii}{#1}\prep@keys@mii\clearkeys%
\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
{\setkeys{mii}{#1}\prep@keys@mii\clearkeys%
\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
{\setkeys{mii}{#1}\prep@keys@mii\clearkeys%
\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}{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
{\setkeys{miii}{#1}\prep@keys@miii\clearkeys%
\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{\prefix}[3][]%key, fn, arg
{\setkeys{mi}{#1}\prep@keys@mi\clearkeys
#2\PrecWrite\pres@lbrack% write bracket if necessary
{\edef\pres@current@precedence{\pres@pi}#3}%
\PrecWrite\pres@rbrack}
\newcommand{\postfix}[3][]%key, fn, arg
{\setkeys{mi}{#1}\prep@keys@mi\clearkeys
\PrecWrite\pres@lbrack% write bracket if necessary
{\edef\pres@current@precedence{\pres@pi}#3}%
\PrecWrite\pres@rbrack{#2}}
\newcommand{\prefixa}[4][]{\mixfixa[#1]{#2}{#3}{}{#4}}
\newcommand{\postfixa}[4][]{{#1}\mixfixa[#1]{}{#3}{#2}{#4}}
\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}}
\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}%
\let\@tmpop=#2}}%update the function
\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{1000}
\PackageError{presentation}{undefined egroup #1, assuming value 1000}%
{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}{1000}.}}%
{\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}
\def\MOD@namedef#1{\expandafter\def\csname MOD@name@#1\endcsname}
\def\MOD@name[#1]#2{#2\def\@test{#2}\ifx\@test\empty\else\MOD@namedef{#1}{#2}\fi}
\def\vname{\@ifnextchar[\MOD@name{\MOD@name[]}}
\def\vnref#1{\csname MOD@name@#1\endcsname}
\def\hrcr#1#2{\hyperlink{#1@\mod@id}{#2}}
\endinput
%%
%% End of file `presentation.sty'.