%D \module %D [ file=cont-00a, %D versie=1995.10.10, %D naam=\CONTEXT\ Systeem Macro's (a), %D auteur=J. Hagen, %D datum=\huidigedatum, %D copyright=J. Hagen] % % Copyright Notice / 1996 % % This module is part of the ConTeXt distribution. This % macropackage will be put in the public domain as soon as the % source is fully documented. % % This module is to be used as a whole and may not be adapted % without knowledge of the authors. No separate parts may be % distributed. % % Non-commercial (educational) institutions are hereby granted % to use this module. Commercial use is only permitted after % written permission. % % Errors can be reported to the authors and will be solved as % soon as possible. Suggestions are welcome. % % copyright : PRAGMA % authors : J. Hagen / A.F. Otten % address : Postbox 125 % 8000 AC Zwolle % The Netherlands % telephone : 038 4 229 775 % e-mail : pragma@pi.net % further documentation is removed \def\abortinputifdefined#1% {\ifx#1\undefined \let\next=\relax \else \let\next=\endinput \fi \next} \abortinputifdefined\writestatus \newcount\protectionlevel \ifx\protect\undefined \def\protect{\message{}} \fi \let\globalprotect=\protect \def\unprotect% {\ifnum\protectionlevel=0 \edef\doprotectcharacters% {\catcode`@=\the\catcode`@\relax \catcode`!=\the\catcode`!\relax \catcode`?=\the\catcode`?\relax}% \catcode`@=11 \catcode`!=11 \catcode`?=11 \let\protect=\doprotect \fi \advance\protectionlevel by 1\relax \ifnum\protectionlevel>1 \message{}% \fi} \def\doprotect% {\ifnum\protectionlevel=1 \doprotectcharacters \let\protect=\globalprotect \fi \ifnum\protectionlevel>1 \message{}% \fi \advance\protectionlevel by -1\relax} \unprotect \chardef\@@escape = 0 \chardef\@@begingroup = 1 \chardef\@@endgroup = 2 \chardef\@@mathshift = 3 \chardef\@@alignment = 4 \chardef\@@endofline = 5 \chardef\@@parameter = 6 \chardef\@@superscript = 7 \chardef\@@subscript = 8 \chardef\@@ignore = 9 \chardef\@@space = 10 \chardef\@@letter = 11 \chardef\@@other = 12 \chardef\other = 12 \chardef\@@active = 13 \chardef\active = 13 \chardef\@@comment = 14 \newcount\scratchcounter \let\dodoglobal=\relax \let\redoglobal=\relax \def\doglobal% {\let\redoglobal=\global \def\dodoglobal% {\let\redoglobal=\relax \let\dodoglobal=\relax \global}} \def\newcounter#1% {\dodoglobal\def#1{0}} \def\dodododoincrement(#1,#2)% {\ifx#1\undefined \def#1{0}% \fi \scratchcounter=#2\relax \scratchcounter=\incrementsign\scratchcounter \advance\scratchcounter by #1\relax \dodoglobal\edef#1{\the\scratchcounter}} \def\dododoincrement#1% {\dodododoincrement(#1,1)} \def\dodoincrement(#1% {\doifnextcharelse{,} {\dodododoincrement(#1} {\dodododoincrement(#1,1}} \def\doincrement#1% {\def\incrementsign{#1}% \doifnextcharelse{(} {\dodoincrement} {\dododoincrement}} \def\increment% {\doincrement+} \def\decrement% {\doincrement-} \def\!!!next {next} \def\!!!default {default} \def\!!!compare {compare} \def\!!!unknown {unknown} \def\!!!do {do} \def\!!!em {em} \def\!!!dodo {dodo} \def\!!!pt {pt} \def\!!!complex {complex} \def\!!!start {start} \def\!!!simple {simple} \def\!!!stop {stop} \def\!!!width {width} \def\!!!plus {plus} \def\!!!height {height} \def\!!!minus {minus} \def\!!!depth {depth} \def\!!!dummy {dummy} \def\!!zeropoint {0pt} \def\@@maxcard {65536} \def\!!klein {klein} \def\!!passend {passend} \def\!!middel {middel} \def\!!ruim {ruim} \def\!!groot {groot} \def\!!geen {geen} \newcount\!counta \def\!stringa{} \dimendef\!dimena=0 \chardef\!boxa=0 \newcount\!countb \def\!stringb{} \dimendef\!dimenb=2 \chardef\!boxb=2 \newcount\!countc \def\!stringc{} \dimendef\!dimenc=4 \chardef\!boxc=4 \newcount\!countd \def\!stringd{} \dimendef\!dimend=6 \chardef\!boxd=6 \newcount\!counte \def\!stringe{} \dimendef\!dimene=8 \chardef\!boxe=8 \newcount\!countf \def\!stringf{} \newdimen\!widtha \newdimen\!heighta \newif\if!donea \newdimen\!widthb \newdimen\!heightb \newif\if!doneb \def\gobbleoneargument #1{} \def\gobbletwoarguments #1#2{} \def\gobblethreearguments #1#2#3{} \def\gobblefourarguments #1#2#3#4{} \def\gobblefivearguments #1#2#3#4#5{} \def\gobblesixarguments #1#2#3#4#5#6{} \def\gobblesevenarguments #1#2#3#4#5#6#7{} \def\gobbleeightarguments #1#2#3#4#5#6#7#8{} \def\gobbleninearguments #1#2#3#4#5#6#7#8#9{} \let\endoflinetoken=^^M \def\doifnextcharelse#1#2#3% {\let\charactertoken=#1% \def\!stringa{#2}% \def\!stringb{#3}% \futurelet\nexttoken\inspectnextcharacter} \def\inspectnextcharacter% {\ifx\nexttoken\spacetoken \let\localnext\reinspectnextcharacter \else\ifx\!stringc\endoflinetoken \let\localnext\reinspectnextcharacter \else\ifx\nexttoken\charactertoken \let\localnext\!stringa \else \let\localnext\!stringb \fi\fi\fi \localnext} \def\:{\let\spacetoken= } \: \def\:{\reinspectnextcharacter} \expandafter\def\: {\futurelet\nexttoken\inspectnextcharacter} \def\setvalue#1% {\expandafter\def\csname#1\endcsname} \def\setgvalue#1% {\expandafter\gdef\csname#1\endcsname} \def\setevalue#1% {\expandafter\edef\csname#1\endcsname} \def\setxvalue#1% {\expandafter\xdef\csname#1\endcsname} \def\getvalue#1% {\csname#1\endcsname} \def\letvalue#1% {\expandafter\let\csname #1\endcsname} \def\resetvalue#1% {\setvalue{#1}{}} \def\ifundefined#1% {\expandafter\ifx\csname#1\endcsname\relax}% \def\!doifundefined% {\bgroup \let\donottest=\dontprocesstest \ifundefined} \def\doifundefinedelse#1#2#3% {\!doifundefined{#1}% \egroup#2% \else \egroup#3% \fi} \def\doifdefinedelse#1#2#3% {\!doifundefined{#1}% \egroup#3% \else \egroup#2% \fi} \def\doifundefined#1#2% {\!doifundefined{#1}% \egroup#2% \else \egroup \fi} \def\doifdefined#1#2% {\!doifundefined{#1}% \egroup \else \egroup#2% \fi} \def\docheckonedefined#1% {\!doifundefined{#1}% \egroup\!doneafalse \else \egroup \fi} \def\doifalldefinedelse#1#2#3% {\bgroup \!doneatrue \processcommalist[#1]\docheckonedefined \if!donea \egroup#2% \else \egroup#3% \fi} \def\dontprocesstest#1% {@rubish@} \def\doprocesstest#1% {#1} \long\def\doif#1#2#3% {\let\donottest=\dontprocesstest \edef\!stringa{#1}% \edef\!stringb{#2}% \let\donottest=\doprocesstest \ifx\!stringa\!stringb #3% \fi} \long\def\doifnot#1#2#3% {\let\donottest=\dontprocesstest \edef\!stringa{#1}% \edef\!stringb{#2}% \let\donottest=\doprocesstest \ifx\!stringa\!stringb \else #3% \fi} \long\def\doifelse#1#2#3#4% {\let\donottest=\dontprocesstest \edef\!stringa{#1}% \edef\!stringb{#2}% \let\donottest=\doprocesstest \ifx\!stringa\!stringb #3% \else #4% \fi} \long\def\doifemptyelse#1#2#3% {\def\!stringa{#1}% \ifx\!stringa\empty #2% \else #3% \fi} \long\def\doifempty#1#2% {\def\!stringa{#1}% \ifx\!stringa\empty #2% \fi} \long\def\doifnotempty#1#2% {\def\!stringa{#1}% \ifx\!stringa\empty \else #2% \fi} \def\!dodocheckiteminset#1% {\edef\!stringb{#1}% \ifx\!stringa\!stringb \!doneatrue \let\!docheckiteminset=\gobbleoneargument \fi} \def\!doifinsetelse#1#2% {\let\donottest=\dontprocesstest \!doneafalse \edef\!stringa{#1}% \ifx\!stringa\empty \else \let\!docheckiteminset=\!dodocheckiteminset \processcommalist[#2]\!docheckiteminset \fi \let\donottest=\doprocesstest \if!donea} \long\def\doifinsetelse#1#2#3#4% {\!doifinsetelse{#1}{#2}% #3% \else #4% \fi} \long\def\doifinset#1#2#3% {\!doifinsetelse{#1}{#2}% #3% \fi} \long\def\doifnotinset#1#2#3% {\!doifinsetelse{#1}{#2}% \else #3% \fi} \def\!dododocommoncheck#1% {\edef\!stringb{#1}% \ifx\!stringa\!stringb \!doneatrue \let\!docommoncheck\gobbleoneargument \let\!dodocommoncheck\gobbleoneargument \fi} \def\!doifcommonelse#1#2% {\!doneafalse \let\donottest\dontprocesstest \let\!dodocommoncheck\!dododocommoncheck \def\!docommoncheck##1% {\edef\!stringa{##1}% \def\commalistelement{##1}% \processcommalist[#2]\!dodocommoncheck}% \processcommalist[#1]\!docommoncheck \let\donottest\doprocesstest \if!donea} \long\def\doifcommonelse#1#2#3#4% {\!doifcommonelse{#1}{#2}% #3% \else #4% \fi} \long\def\doifcommon#1#2#3% {\!doifcommonelse{#1}{#2}% #3% \fi} \long\def\doifnotcommon#1#2#3% {\!doifcommonelse{#1}{#2}% \else #3% \fi} \newcount\commalevel \def\processcommaitem#1#2,% {\if]#1% \let\nextcommaitem=\relax \else\if]#2% \let\nextcommaitem=\relax \else\ifx\spacetoken#2% \csname\!!!next\the\commalevel\endcsname{#1}% \let\nextcommaitem=\processcommaitem \else \csname\!!!next\the\commalevel\endcsname{#1#2}% \let\nextcommaitem=\processcommaitem \fi\fi\fi \nextcommaitem} \def\processcommalist[#1]#2% {\advance\commalevel by 1\relax \expandafter\def\csname\!!!next\the\commalevel\endcsname{#2}% \processcommaitem#1,],\relax \advance\commalevel by -1\relax} \def\processcommacommand[#1]% {\edef\commacommand{#1}% \toks0=\expandafter{\expandafter[\commacommand]}% \expandafter\processcommalist\the\toks0 } \def\processcommalistwithparameters[#1]#2% {\def\docommando##1{#2[##1]}% \processcommalist[#1]\docommando} \newcount\processlevel \def\!compareprocessactionA[#1=>#2]% {\edef\!stringb{#1}% \ifx\!stringb\!!!default #2% \fi} \def\!compareprocessactionB[#1=>#2]% {\edef\!stringb{#1}% \ifx\!stringa\!stringb \def\commalistelement{#1}% #2% \let\!doprocessaction=\gobbleoneargument \else\ifx\!stringb\!!!unknown \def\commalistelement{#1}% #2% \fi\fi} \def\processaction[#1]#2[#3]% {\let\donottest=\dontprocesstest \edef\!stringa{#1}% \let\donottest=\doprocesstest \ifx\!stringa\empty \let\!compareprocessaction=\!compareprocessactionA \else \let\!compareprocessaction=\!compareprocessactionB \fi \def\!doprocessaction##1% {\!compareprocessaction[##1]}% \processcommalist[#3]\!doprocessaction} \def\!compareprocessactionC[#1=>#2][#3]% {\edef\!stringa{#1}% \edef\!stringb{#3}% \ifx\!stringa\!stringb \def\commalistelement{#3}% #2% \let\!doprocessaction=\gobbleoneargument \let\!dodoprocessaction=\gobbleoneargument \else\ifx\!stringa\!!!unknown \def\commalistelement{#3}% #2% \fi\fi} \def\processfirstactioninset[#1]#2[#3]% {\edef\!stringa{#1}% \ifx\!stringa\empty \processaction[][#3]% \else \def\!doprocessaction##1% {\def\!dodoprocessaction####1% {\!compareprocessactionC[####1][##1]}% \processcommalist[#3]\!dodoprocessaction}% \processcommalist[#1]\!doprocessaction \fi} \def\!compareprocessactionD[#1=>#2][#3]% {\edef\!stringa{#1}% \edef\!stringb{#3}% \ifx\!stringa\!stringb \def\commalistelement{#3}% #2% \let\!dodoprocessaction=\gobbleoneargument \else\ifx\!stringa\!!!unknown \def\commalistelement{#3}% #2% \fi\fi} \def\processallactionsinset[#1]#2[#3]% {\edef\!stringa{#1}% \ifx\!stringa\empty \processaction[][#3]% \else \advance\processlevel by 1\relax \setvalue{\!!!do\the\processlevel}##1% {\def\!dodoprocessaction####1% {\!compareprocessactionD[####1][##1]}% \processcommalist[#3]\!dodoprocessaction}% \processcommalist[#1]{\getvalue{\!!!do\the\processlevel}}% \advance\processlevel by -1\relax \fi} \def\dogetfirstcharacter#1#2\\% {\def\firstcharacter{#1}} \def\getfirstcharacter#1% {\edef\!stringa{#1}% \expandafter\dogetfirstcharacter\!stringa\\} \long\def\!doifinstringelse#1#2#3#4% {\def\!!doifinstringelse##1#1##2##3\war% {\if##2@% #4% \else #3% \fi}% \!!doifinstringelse#2#1@@\war} \def\doifinstringelse% {\ExpandBothAfter\!doifinstringelse} \def\doifnumberelse#1% {\getfirstcharacter{#1}% \@EA\!doifinstringelse\firstcharacter{1234567890}} \def\makerawcommalist[#1]#2% {\def\appendtocommalist##1% {\doifelse{#2}{} {\edef#2{##1}} {\edef#2{#2,##1}}}% \def#2{}% \processcommalist[#1]\appendtocommalist} \def\rawprocesscommaitem#1,% {\if]#1% \let\nextcommaitem=\relax \else \csname\!!!next\the\commalevel\endcsname{#1}% \let\nextcommaitem=\rawprocesscommaitem \fi \nextcommaitem} \def\rawprocesscommalist[#1]#2% {\advance\commalevel by 1\relax \expandafter\def\csname\!!!next\the\commalevel\endcsname{#2}% \expandafter\rawprocesscommaitem#1,],\relax \advance\commalevel by -1\relax} \def\rawdoifinsetelse#1#2% {\doifinstringelse{,#1,}{,#2,}} \def\!rawprocessaction[#1][#2]% {\def\!!rawprocessaction##1,#1=>##2,##3\war% {\if##3@\else \def\!processaction{##2}% \fi}% \!!rawprocessaction,#2,#1=>,@\war} \def\rawprocessaction[#1]#2[#3]% {\edef\!stringa{#1}% \edef\!stringb{undefined}% \let\!processaction=\!stringb \ifx\!stringa\empty \!rawprocessaction[default][#3]% \else \expandafter\!rawprocessaction\expandafter[\!stringa][#3]% \ifx\!processaction\!stringb \!rawprocessaction[unknown][#3]% \fi \fi \ifx\!processaction\!stringb \else \!processaction \fi} \def\defineconstant#1% {\setvalue{!!#1}{#1}} \def\definehiddenconstant#1% {\setvalue{!!!#1}{#1}} \def\definevariable#1% {\setvalue{??#1}{@@#1}} \newif\ifsomeinterface \def\defineinterface[#1]% {\def\currentdefineinterface% {!!interface!!#1}} \def\redefinecommand#1#2% {\doifnot{#1}{#2} {\setvalue{#2}{\getvalue{#1}}}} \def\redefineconstant#1#2% {\doifundefined{!!#2} {\doifundefined{\currentdefineinterface} {\setvalue{\currentdefineinterface}{\!!!dummy=>\!!!dummy}}% \rawdoifinsetelse{#2=>#1}{\getvalue{\currentdefineinterface}} {} {\setevalue{\currentdefineinterface}% {\getvalue{\currentdefineinterface},#2=>#1}}}} \def\dodosetinterface% {\def\doswapinterface##1% {\doifnot{##1}{}{\dodoswapinterface##1\\}}% \processcommacommand[\getvalue{\currentinterface}]\doswapinterface} \def\resetinterface% {\ifsomeinterface \def\dodoswapinterface##1=>##2\\% {\setvalue{!!##1}{##1}% \setvalue{!!##2}{##2}}% \dodosetinterface \someinterfacefalse \fi} \def\complexsetinterface[#1]% {\resetinterface \doifdefinedelse{!!interface!!#1}% {\def\currentinterface% {!!interface!!#1}% \def\dodoswapinterface##1=>##2\\% {\setvalue{!!##1}{##2}% \setvalue{!!##2}{##1}}% \dodosetinterface \someinterfacetrue} {\writestatus{interface}{#1 is undefined}}} \def\simplesetinterface% {\resetinterface} \def\setinterface% {\complexorsimple{setinterface}} \def\dosetvalue#1#2#3% {\!doifundefined{!!#2}% \egroup \@EA\def\csname#1#2\endcsname% {#3}% \else \egroup \@EA\def\csname#1\csname !!#2\endcsname\endcsname% {#3}% \fi} \def\dosetevalue#1#2#3% {\!doifundefined{!!#2}% \egroup \@EA\edef\csname#1#2\endcsname% {#3}% \else \egroup \@EA\edef\csname#1\csname !!#2\endcsname\endcsname% {#3}% \fi} \def\docopyvalue#1#2#3% {\!doifundefined{!!#3}% \egroup \@EA\def\csname#1#3\endcsname% {\csname#2#3\endcsname}% \else \egroup \@EA\def\csname#1\csname !!#3\endcsname\endcsname% {\csname#2\csname !!#3\endcsname\endcsname}% \fi} \def\doresetvalue#1#2% {\dosetvalue{#1}{#2}{}} \def\dogetvalue#1#2% {\csname#1\csname !!#2\endcsname\endcsname} \def\!doassign#1[#2][#3=#4=#5]% {\let\donottest=\dontprocesstest \edef\!stringa{#5}% \edef\!stringb{\relax}% \let\donottest=\doprocesstest \ifx\!stringa\!stringb \writestatus {instelling} {'=' ontbreekt na '#3' in regel \the\inputlineno}% \else #1{#2}{#3}{#4}% \fi} \def\doassign[#1][#2]% {\!doassign\dosetvalue[#1][#2==\relax]} \def\doeassign[#1][#2]% {\!doassign\dosetevalue[#1][#2==\relax]} \def\undoassign[#1][#2]% {\!doassign\doresetvalue[#1][#2==\relax]} \def\doassignempty[#1][#2=#3]% {\doifundefined{#1#2} {\dosetvalue{#1}{#2}{#3}}} \def\dogetparameters#1[#2]#3[#4]% {\def\!dogetparameter##1% {\!doassign#1[#2][##1==\relax]}% \processcommalist[#4]\!dogetparameter} \def\getparameters% {\dogetparameters\dosetvalue} \def\geteparameters% {\dogetparameters\dosetevalue} \def\forgetparameters% {\dogetparameters\doresetvalue} \let\getexpandedparameters=\geteparameters \def\getemptyparameters[#1]#2[#3]% {\def\!dogetemptyparameter##1% {\doassignempty[#1][##1]}% \processcommalist[#3]\!dogetemptyparameter} \def\copyparameters[#1]#2[#3]#4[#5]% {\doifnot{#1}{#3} {\def\docopyparameter##1% {\docopyvalue{#1}{#3}{##1}}% \processcommalist[#5]\docopyparameter}} \def\doifassignmentelse#1% {\doifinstringelse{=}{#1}} \def\commalistsize{0} \def\!dogetcommalistsize#1[#2]% {\scratchcounter=0\relax \def\docommando##1% {\advance\scratchcounter by 1\relax}% #1[#2]\docommando \edef\commalistsize{\the\scratchcounter}} \def\getcommalistsize% {\!dogetcommalistsize\processcommalist} \def\getcommacommandsize% {\!dogetcommalistsize\processcommacommand} \def\!dogetfromcommalist#1% {\advance\scratchcounter by -1\relax \ifnum\scratchcounter=0\relax \def\commalistelement{#1}% \fi} \def\getfromcommalist[#1]#2[#3]% {\scratchcounter=#3\relax \let\commalistelement=\empty \processcommalist[#1]\!dogetfromcommalist} \def\getfromcommacommand[#1]#2[#3]% {\scratchcounter=#3\relax \let\commalistelement=\empty \processcommacommand[#1]\!dogetfromcommalist} \def\dosingleargument#1[#2]% {#1[#2]} \def\dodoubleargument#1[#2]#3[#4]% {#1[#2][#4]} \def\dotripleargument#1[#2]#3[#4]#5[#6]% {#1[#2][#4][#6]} \def\doquadrupleargument#1[#2]#3[#4]#5[#6]#7[#8]% {#1[#2][#4][#6][#8]} \def\doquintupleargument#1% {\def\dodoquintupleargument[##1]##2[##3]##4[##5]##6[##7]##8[##9]% {#1[##1][##3][##5][##7][##9]}% \dodoquintupleargument} \def\dosingleargumentwithset#1% {\def\dodosinglewithset[##1]% {\def\dododosinglewithset####1% {#1[####1]}% \processcommalist[##1]\dododosinglewithset}% \dosingleargument\dodosinglewithset}% \def\dodoublewithset#1#2% {\def\dododoublewithset[##1][##2]% {\doifnot{##1}{} {\def\dodododoublewithset####1% {#2[####1][##2]}% \processcommalist[##1]\dodododoublewithset}}% #1\dododoublewithset}% \def\dodoubleemptywithset% {\dodoublewithset\dodoubleempty} \def\dodoubleargumentwithset% {\dodoublewithset\dodoubleargument} \def\dotriplewithset#1#2% {\def\dodotriplewithset[##1][##2][##3]% {\doifnot{##1}{} {\def\dododotriplewithset####1% {#2[####1][##2][##3]}% \processcommalist[##1]\dododotriplewithset}}% #1\dodotriplewithset}% \def\dotripleemptywithset% {\dotriplewithset\dotripleempty} \def\dotripleargumentwithset% {\dotriplewithset\dotripleargument} \def\complexorsimple#1% {\doifnextcharelse{[} {\firstargumenttrue\getvalue{\!!!complex#1}} {\firstargumentfalse\getvalue{\!!!simple#1}}} \def\complexorsimpleempty#1% {\doifnextcharelse{[} {\firstargumenttrue\getvalue{\!!!complex#1}} {\firstargumentfalse\getvalue{\!!!complex#1}[]}} \newif\iffirstargument \newif\ifsecondargument \newif\ifthirdargument \newif\iffourthargument \newif\iffifthargument \newif\ifparameters \def\!!checkparameters#1=#2#3\war% {\if#2@\parametersfalse\else\parameterstrue\fi} \def\checkparameters[#1]% {\!!checkparameters#1=@@\war} \def\setnameofcommand#1% {\bgroup \escapechar=-1\relax \xdef\nameofcommand{\string#1}% \egroup} \def\definewithnameofcommand#1#2% {\setnameofcommand{#2}% \@EA\def\@EA#2\@EA{\@EA#1\@EA{\nameofcommand}}} \def\definecomplexorsimple% {\definewithnameofcommand\complexorsimple} \def\definecomplexorsimpleempty% {\definewithnameofcommand\complexorsimpleempty} \def\dogetargument#1#2% {\doifnextcharelse{[} {#1\dodogetargument} {#2\dodogetargument[]}} \def\dosingleempty#1% {\def\dodogetargument% {#1}% \dogetargument\firstargumenttrue\firstargumentfalse} \def\dodoubleempty#1% {\def\dodogetargument[##1]% {\def\dodogetargument% {#1[##1]}% \dogetargument\secondargumenttrue\secondargumentfalse}% \dogetargument\firstargumenttrue\firstargumentfalse} \def\dotripleempty#1% {\def\dodogetargument[##1]% {\def\dodogetargument[####1]% {\def\dodogetargument {#1[##1][####1]}% \dogetargument\thirdargumenttrue\thirdargumentfalse}% \dogetargument\secondargumenttrue\secondargumentfalse}% \dogetargument\firstargumenttrue\firstargumentfalse} \def\doquadrupleempty#1% {\def\dodogetargument[##1]% {\def\dodogetargument[####1]% {\def\dodogetargument[########1]% {\def\dodogetargument% {#1[##1][####1][########1]}% \dogetargument\fourthargumenttrue\fourthargumentfalse}% \dogetargument\thirdargumenttrue\thirdargumentfalse}% \dogetargument\secondargumenttrue\secondargumentfalse}% \dogetargument\firstargumenttrue\firstargumentfalse} \def\doquintupleempty#1% {\def\dodogetargument[##1]% {\def\dodogetargument[####1]% {\def\dodogetargument[########1]% {\def\dodogetargument[################1]% {\def\dodogetargument% {#1[##1][####1][########1][################1]}% \dogetargument\fifthargumenttrue\fifthargumentfalse}% \dogetargument\fourthargumenttrue\fourthargumentfalse}% \dogetargument\thirdargumenttrue\thirdargumentfalse}% \dogetargument\secondargumenttrue\secondargumentfalse}% \dogetargument\firstargumenttrue\firstargumentfalse} \def\@@irecurse{@@irecurse} \def\@@nrecurse{@@nrecurse} \def\@@srecurse{@@srecurse} \def\@@crecurse{@@crecurse} \newcount\outerrecurse \def\recursedepth% {\the\outerrecurse} \def\dostepwiserecurse#1#2#3% {\global\advance\outerrecurse by 1 \scratchcounter=#1\setevalue{\@@irecurse\recursedepth}{\the\scratchcounter}% \scratchcounter=#2\setevalue{\@@nrecurse\recursedepth}{\the\scratchcounter}% \scratchcounter=#3\setevalue{\@@srecurse\recursedepth}{\the\scratchcounter}% \let\next=\donorecurse \ifnum#3>0\relax\ifnum#2<#1\relax \else \setevalue{\@@crecurse\recursedepth}{>}% \let\next=\dodorecurse \fi\fi \ifnum#3<0\relax\ifnum#1<#2\relax \else \setevalue{\@@crecurse\recursedepth}{<}% \let\next=\dodorecurse \fi\fi \next} \long\def\donorecurse#1% {} \long\def\dodorecurse#1% {\ifnum\getvalue{\@@irecurse\recursedepth} \getvalue{\@@crecurse\recursedepth} \getvalue{\@@nrecurse\recursedepth}\relax \global\advance\outerrecurse by -1\relax \let\next=\relax \else \def\next% {\edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}% #1% \edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}% \scratchcounter=\getvalue{\@@irecurse\recursedepth}% \advance\scratchcounter by \getvalue{\@@srecurse\recursedepth}\relax \setevalue{\@@irecurse\recursedepth}{\the\scratchcounter}% \dodorecurse{#1}}% \fi \next} \def\dorecurse#1% {\dostepwiserecurse{1}{#1}{1}} \def\for#1=#2\to#3\step#4\do#5% {\dostepwiserecurse{#2}{#3}{#4} {\edef#1{\recurselevel}% #5% \edef#1{\recurselevel}}} \def\assigndimension#1#2#3#4#5% {\processaction [#1] [ \!!klein=>#2=#3, \!!middel=>#2=#4, \!!groot=>#2=#5, \!!geen=>#2=\!!zeropoint, -\!!klein=>#2=-#3, -\!!middel=>#2=-#4, -\!!groot=>#2=-#5, \!!!unknown=>#2=#1]} \def\assignalfadimension#1#2#3#4#5% {\processaction [#1] [ \!!klein=>\edef#2{#3}, \!!middel=>\edef#2{#4}, \!!groot=>\edef#2{#5}, \!!geen=>\edef#2{0}, \!!!unknown=>\edef#2{#1}]} \def\assignvalue#1#2#3#4#5% {\processaction [#1] [ \!!klein=>\def#2{#3}, \!!middel=>\def#2{#4}, \!!groot=>\def#2{#5}, \!!!unknown=>\def#2{#1}]} \def\assignifempty#1#2% {\doifnot{#1}{} {\def#1{#2}}} \def\assignwidth#1#2#3% {\doifelse{#2}{} {\setbox0=\hbox{#3}% #1=\wd0} {\doifinsetelse{#2}{\!!passend,\!!ruim} {\setbox0=\hbox{#3}% #1=\wd0 \doif{#2}{\!!ruim} {\advance#1 by 1em}}% {#1=#2}}}% \def\doconvertargument#1>{} \def\convertargument#1\to#2% {\def\convertedargument{#1}% \dodoglobal\edef#2% {\expandafter\doconvertargument\meaning\convertedargument}} \let\@EA=\expandafter \def\simpleExpandFirstAfter#1% {\edef\!stringa{#1}% \@EA\ExpandCommand\@EA{\!stringa}} \def\complexExpandFirstAfter[#1]% {\edef\!stringa{#1}% \@EA\ExpandCommand\@EA[\!stringa]} \def\ExpandFirstAfter#1% {\def\ExpandCommand{#1}% \complexorsimple{ExpandFirstAfter}} \def\ExpandSecondAfter#1#2#3% {\def\!stringa{#2}% \edef\!stringb{#3}% \@EA#1\@EA{\@EA\!stringa\@EA}\@EA{\!stringb}} \def\ExpandBothAfter#1#2#3% {\edef\!stringa{#2}% \edef\!stringb{#3}% \@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA\!stringa\@EA}\@EA{\!stringb}} \def\ExpandAfter#1#2% {\edef\!stringa{#2}% \@EA#1\@EA{\!stringa}} \def\ConvertToConstant#1#2#3% {\expandafter\convertargument\expandafter{#2}\to\!stringa \expandafter\convertargument\expandafter{#3}\to\!stringb #1{\!stringa}{\!stringb}} \def\doifconstantelse#1% {\!counta=\escapechar \escapechar=-1 \convertargument--#1\to\!stringc \convertargument--!!\to\!stringd \escapechar=\!counta \doifinstringelse{\!stringd}{\!stringc}} \def\doConvertConstantAfter#1% {\doifconstantelse{#1}% {\edef\!stringa{#1}}% {\convertargument#1\to\!stringa \doifdefinedelse{!!\!stringa}% {\edef\!stringa{\getvalue{!!\!stringa}}}% {\edef\!stringa{\!!!unknown}}}} \def\simpleConvertConstantAfter#1% {\doConvertConstantAfter{#1}% \@EA\ConvertCommand\@EA{\!stringa}} \def\complexConvertConstantAfter[#1]% {\doConvertConstantAfter{#1}% \@EA\ConvertCommand\@EA[\!stringa]} \def\ConvertConstantAfter#1% {\def\ConvertCommand{#1}% \complexorsimple{ConvertConstantAfter}} \def\writestring% {\immediate\write100} \def\writeline% {\immediate\write100{}} \def\statuswidth{15} \def\writestatus#1#2% {\bgroup \def\doshowmessage##1##2!!% {\doifelse{##1}{?} {\loop \advance\!counta by 1 \ifnum\!counta<\statuswidth\relax \edef\messagecontentA{\messagecontentA\space}% \repeat} {\advance\!counta by 1 \ifnum\!counta<\statuswidth \edef\messagecontentA{\messagecontentA##1}% \fi \doshowmessage##2!!}}% \edef\messagecontentA{}% \edef\messagecontentB{#2}% voor het geval \!counta in #2 zit \!counta=0\relax \doshowmessage#1?!!% \doifelse{#1}{}% {\def\next{\space}}% {\def\next{:}}% \immediate\write100{\messagecontentA\space\next\space\messagecontentB}% \egroup} \writestatus{laden}{Context Systeem Macro's (a)} \protect