diff options
Diffstat (limited to 'tex')
94 files changed, 86838 insertions, 0 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex new file mode 100644 index 000000000..5f051a5d7 --- /dev/null +++ b/tex/context/base/colo-ini.tex @@ -0,0 +1,1423 @@ +%D \module
+%D [ file=colo-ini,
+%D version=1997.4.1,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Color Macros}
+
+\unprotect
+
+%D Color support is not present in \TEX. Colorful output can
+%D however be accomplished by using specials. This also means
+%D that this support depends on the \DVI\ driver used. At the
+%D moment this module was written, still no decent standard on
+%D color specials has been agreed upon. We therefore decided to
+%D implement a mechanism that is as independant as possible of
+%D drivers.
+%D
+%D Color support shares with fonts that is must be implemented
+%D in a way that permits processing of individual \DVI\ pages.
+%D Furthermore it should honour grouping. The first condition
+%D forces us to use a scheme that keeps track of colors at
+%D page boundaries. This can be done by means of \TEX's
+%D marking mechanism (\type{\mark}).
+%D
+%D When building pages, \TEX\ periodically looks at the
+%D accumulated typeset contents and breaks the page when
+%D suitable. At that moment, control is transfered to the
+%D output routine. This routine takes care of building the
+%D pagebody and for instance adds headers and footers. The page
+%D can be broken in the middle of some colored text, but
+%D headers and footers are often in black upon white or
+%D background. If colors are applied there, they definitely
+%D are used local, which means that they don't cross page
+%D borders.
+%D
+%D Boxes are handled as a whole, which means that when we
+%D apply colors inside a box, those colors don't cross page
+%D boundaries, unless of course boxes are split or unboxed.
+%D Especially in interactive texts, colors are often used in
+%D such a local way: in boxes (buttons and navigational tools)
+%D or in the pagebody (backgrounds).
+%D
+%D So we can distinguish local colors, that don't cross
+%D pages from global colors, of which we can end many pages
+%D later. The color macros will treat both types in a different
+%D way, thus gaining some speed.
+%D
+%D This module also deals with gray scales. Because similar
+%D colors can end up in the same gray scale when printed in
+%D black and white, we also implement a palet system that deals
+%D with these matters. Because of fundamental differences
+%D between color and gray scale printing, in \CONTEXT\ we also
+%D differ between these. For historic reasons |<|we first
+%D implemented gray scales using patterns of tiny periods|>|
+%D and therefore called them {\em rasters}. So don't be
+%D surprised if this term shows up.
+
+\startmessages dutch library: colors
+ title: kleur
+ 1: systeem -- is globaal actief
+ 2: systeem -- is lokaal actief
+ 3: -- is niet gedefinieerd
+ 4: systeem -- wordt geladen
+ 5: onbekend systeem --
+ 6: palet -- is beschikbaar
+ 7: palet -- is niet beschikbaar
+ 8: (verkeerde) specificatie -- bij -- wordt zwart
+ 9: -- kleurruimte wordt niet ondersteund
+ 10: -- kleurruimte wordt ondersteund
+ 11: kleur wordt vertaald in grijs
+\stopmessages
+
+\startmessages english library: colors
+ title: color
+ 1: system -- is global activated
+ 2: system -- is local activated
+ 3: -- is not defined
+ 4: system -- is loaded
+ 5: unknown system --
+ 6: palette -- is available
+ 7: palette -- is not available
+ 8: (invalid) specification -- at color -- becomes black
+ 9: -- color space is not supported
+ 10: -- color space is supported
+ 11: color is converted to gray
+\stopmessages
+
+\startmessages german library: colors
+ title: farbe
+ 1: system -- ist global aktiviert
+ 2: system -- ist lokal aktiviert
+ 3: -- ist undefiniert
+ 4: system -- ist geladen
+ 5: unbekanntes System --
+ 6: palette -- ist verfuegbar
+ 7: palette -- ist nicht verfuegbar
+ 8: (ungueltige) Spezifikation -- bei Farbe -- wird schwarz
+ 9: -- Farbraum wird nicht unterstuetzt
+ 10: -- Farbraum wird unterstuetzt
+ 11: Farbe wird in Grau umgewandelt
+\stopmessages
+
+%D \macros
+%D {definecolor}
+%D {}
+%D
+%D We will enable users to specify colors in \kap{RGB} and
+%D \kap{CMYK} color spaces or gray scales using
+%D
+%D \showsetup{\y!definecolor}
+%D
+%D For example:
+%D
+%D \starttypen
+%D \definecolor [SomeKindOfRed] [r=.8,g=.05,b=.05]
+%D \stoptypen
+%D
+%D Such color specifications are saved in a macro in the
+%D following way:
+%D
+%D \starttypen
+%D \setvalue{\??cr name}{R:r:g:b}
+%D \setvalue{\??cr name}{C:c:m:y:k}
+%D \setvalue{\??cr name}{K:k}
+%D \stoptypen
+%D
+%D Gray scales are specified with the \type{k} parameter,
+%D the same as used in \kap{CMYK} specifications.
+
+\def\colorlist{}
+
+\def\@@cl@@z{0}
+\def\@@cl@@o{1}
+
+\def\definecolor%
+ {\dodoubleargument\dodefinecolor}
+
+\def\dodefinecolor[#1][#2]%
+ {\redoglobal\addtocommalist{#1}\colorlist
+ \doifassignmentelse{#2}
+ {\let\@@cl@@r=\@@cl@@z\let\@@cl@@g=\@@cl@@z\let\@@cl@@b=\@@cl@@z
+ \let\@@cl@@c=\@@cl@@z\let\@@cl@@m=\@@cl@@z\let\@@cl@@y=\@@cl@@z
+ \let\@@cl@@k=\@@cl@@z
+ \getparameters[\??cl @@][#2]%
+ \doifelse{\@@cl@@r\@@cl@@g\@@cl@@b}{\@@cl@@z\@@cl@@z\@@cl@@z}
+ {\doifelse{\@@cl@@c\@@cl@@m\@@cl@@y}{\@@cl@@z\@@cl@@z\@@cl@@z}
+ {\doifelse{\@@cl@@k}{\@@cl@@z}
+ {\showmessage{\m!colors}{8}{{[#2]},#1}%
+ \redoglobal\setevalue{\??cr#1}{K:\@@cl@@z}}
+ {\redoglobal\setevalue{\??cr#1}{K:\@@cl@@k}}}
+ {\redoglobal\setevalue{\??cr#1}{C:\@@cl@@c:\@@cl@@m:\@@cl@@y:\@@cl@@k}}}
+ {\redoglobal\setevalue{\??cr#1}{R:\@@cl@@r:\@@cl@@g:\@@cl@@b}}}
+ {\doifdefinedelse{\??cr#2}
+ {\redoglobal\setevalue{\??cr#1}{\getvalue{\??cr#2}}}
+ {\showmessage{\m!colors}{3}{#1}}}%
+ \dodoglobal\setvalue{#1}{\color[#1]}}
+
+%D The names of colors are stored in a comma separated list
+%D only for the purpose of showing them with \type{\showcolor}.
+%D
+%D Colors can be defined global by using \type{\doglobal},
+%D like in
+%D
+%D \startbuffer
+%D \doglobal\definecolor [SomeKindOfRed] [r=.8,g=.05,b=.05]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D This color shows up as \color[SomeKindOfRed]{some kind
+%D of red}.
+
+%D \macros
+%D {setupcolor}
+%D {}
+%D
+%D Color definitions can be grouped in files with the name:
+%D
+%D \starttypen
+%D \f!colorprefix-identifier.tex
+%D \stoptypen
+%D
+%D where \type{\f!colorprefix} is {\tttf \f!colorprefix}. Loading
+%D such a file is done by
+%D
+%D \showsetup{\y!setupcolor}
+%D
+%D Some default colors are specified in \type{colo-rgb.tex},
+%D which is loaded into the format by:
+%D
+%D \starttypen
+%D \setupcolor[rgb]
+%D \stoptypen
+
+\def\colorstyle{}
+
+\def\setupcolor%
+ {\dosingleargument\dosetupcolor}
+
+\def\dosetupcolor[#1]%
+ {\doifnot{#1}{\colorstyle}
+ {\def\colorstyle{#1}%
+ \def\dodosetupcolor##1%
+ {\readsysfile{\f!colorprefix##1}%
+ {\showmessage{\m!colors}{4}{\colorstyle}}
+ {\showmessage{\m!colors}{5}{\colorstyle}}}%
+ \processcommalist[#1]\dodosetupcolor}}
+
+%D When typesetting for paper, we prefer using the \kap{CMYK}
+%D color space, but for on||screen viewing we prefer \kap{RGB}
+%D (the previous implementation supported only this scheme).
+%D Independant of such specifications, we support some automatic
+%D conversions:
+%D
+%D \startopsomming[opelkaar]
+%D \som convert all colors to \kap{RGB}
+%D \som convert all colors to \kap{CMYK}
+%D \som convert all colors to gray scales
+%D \stopopsomming
+%D
+%D We also support optimization of colors to gray scales.
+%D
+%D \startopsomming[verder]
+%D \som reduce gray colors to gray scales
+%D \stopopsomming
+%D
+%D These options are communicated by means of:
+
+\newif\ifRGBsupported
+\newif\ifCMYKsupported
+\newif\ifconverttoGRAY
+\newif\ifpreferGRAY
+\newif\ifGRAYprefered
+\newif\ifreduceCMYK
+
+%D The last boolean controls reduction of \kap{CMYK} to
+%D \kap{CMY} colors. When set to true, the black component
+%D is added to the other ones.
+
+%D Color modes are entered using the next set of commands.
+%D The \type{\stop} alternatives are implemented in a way
+%D that permits non||grouped use.
+
+\def\dostartcolormodeR#1:#2:#3\od%
+ {\bgroup
+ \def\@@cl@@r{#1}\def\@@cl@@g{#2}\def\@@cl@@b{#3}%
+ \ifpreferGRAY\ifx\@@cl@@r\@@cr@@g\ifx\@@cl@@r\@@cl@@b
+ \GRAYpreferedtrue
+ \fi\fi\fi
+ \ifGRAYprefered
+ \dostartgraycolormode\@@cl@@r
+ \else\ifRGBsupported
+ \dostartrgbcolormode\@@cl@@r\@@cl@@g\@@cl@@b
+ \else\ifCMYKsupported
+ \convertRGBtoCMYK\@@cl@@r\@@cl@@g\@@cl@@b
+ \dostartcmykcolormode\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \else
+ \convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b
+ \dostartgraycolormode\@@cl@@k
+ \fi\fi\fi
+ \egroup}
+
+\def\dostartcolormodeC#1:#2:#3:#4\od%
+ {\bgroup
+ \def\@@cl@@c{#1}\def\@@cl@@m{#2}\def\@@cl@@y{#3}\def\@@cl@@k{#4}%
+ \ifpreferGRAY\ifx\@@cl@@k\@@cl@@z\ifx\@@cl@@c\@@cr@@m\ifx\@@cl@@c\@@cl@@y
+ \GRAYpreferedtrue
+ \fi\fi\fi\fi
+ \ifGRAYprefered
+ \dostartgraycolormode\@@cl@@c
+ \else\ifCMYKsupported
+ \ifreduceCMYK
+ \convertCMYKtoCMY\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \dostartcmykcolormode\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \else
+ \dostartcmykcolormode\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \fi
+ \else\ifRGBsupported
+ \convertCMYKtoRGB\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \dostartrgbcolormode\@@cl@@r\@@cl@@g\@@cl@@b
+ \else
+ \convertCMYKtoGRAY\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k
+ \dostartgraycolormode\@@cl@@k
+ \fi\fi\fi
+ \egroup}
+
+\def\dostartcolormodeK#1\od%
+ {\dostartgraycolormode{#1}}
+
+%D Prefering gray is not the same as converting to gray. Conversion treats
+%D each color components in a different way, while prefering is just a
+%D reduction and thus a space||saving option.
+
+%D \macros
+%D {startcolormode,stopcolormode}
+%D
+%D We use \type{\stopcolormode} to reset the color in
+%D whatever color space and do so by calling the corresponding
+%D special. Both commands can be used for fast color
+%D switching, like in colored verbatim,
+
+\def\dostartcolormode#1:%
+ {\getvalue{dostartcolormode#1}}
+
+\def\startcolormode#1%
+ {\doifcolorelse{#1}
+ {\getcurrentcolorspecs{#1}%
+ \expandafter\dostartcolormode\currentcolorspecs\od}
+ {\dostopcolormode}}
+
+\def\stopcolormode%
+ {\dostopcolormode}
+
+%D We use some reserved names for local color components.
+%D Consistent use of these scratch variables saves us
+%D unneccessary hash entries.
+%D
+%D \starttypen
+%D \@@cl@@r \@@cl@@g \@@cl@@b
+%D \@@cl@@c \@@cl@@m \@@cl@@y \@@cl@@k
+%D \@@cl@@k
+%D \stoptypen
+%D
+%D We implement several conversion routines.
+%D
+%D \starttypen
+%D \convertRGBtoCMYK {r} {g} {b}
+%D \convertRGBtoGRAY {r} {g} {b}
+%D \convertCMYKtoRGB {c} {m} {y} {k}
+%D \convertCMYKtoGRAY {c} {m} {y} {k}
+%D \convertCMYKtoCMY {c} {m} {y} {k}
+%D \stoptypen
+%D
+%D The relation between \kap{Gray}, \kap{RGB} and \kap{CMYK}
+%D is:
+%D
+%D \plaatsformule[-]
+%D \startformule
+%D G = .30r + .59g + .11b
+%D = 1.0 - \min(1.0,\ .30c + .59m + .11y + k)
+%D \stopformule
+%D
+%D When converting from \kap{CMYK} to \kap{RGB} we use the
+%D formula:
+%D
+%D \plaatsformule[-]
+%D \startformule
+%D \eqalign
+%D {r &= 1.0 - \min(1.0,\ c+k) \cr
+%D g &= 1.0 - \min(1.0,\ m+k) \cr
+%D b &= 1.0 - \min(1.0,\ y+k)}
+%D \stopformule
+%D
+%D In the conversion routine the color components are calculated
+%D in three digits precision.
+
+\def\realcolorvalue#1%
+ {\ifnum #1<10 0.00\the#1%
+ \else\ifnum#1<100 0.0\the#1%
+ \else\ifnum#1<1000 0.\the#1%
+ \else 1\fi\fi\fi}
+
+\def\doconvertCMYKtoRGB#1\k#2\to#3%
+ {\scratchdimen=#1\s!pt
+ \advance\scratchdimen by #2\s!pt\relax
+ \ifdim\scratchdimen>1\s!pt
+ \scratchdimen=-1\s!pt
+ \else
+ \scratchdimen=-\scratchdimen
+ \fi
+ \advance\scratchdimen by 1\s!pt
+ \multiply\scratchdimen by 1000
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard
+ \edef#3{\realcolorvalue\scratchcounter}}
+
+\def\convertCMYKtoRGB#1#2#3#4%
+ {\doconvertCMYKtoRGB#1\k#4\to\@@cl@@r
+ \doconvertCMYKtoRGB#2\k#4\to\@@cl@@g
+ \doconvertCMYKtoRGB#3\k#4\to\@@cl@@b}
+
+\def\doconvertRGBtoCMYK#1\to#2%
+ {\scratchdimen=#1\s!pt
+ \multiply\scratchdimen by 1000
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard
+ \scratchcounter=-\scratchcounter
+ \advance\scratchcounter by 1000
+ \edef#2{\realcolorvalue\scratchcounter}}
+
+\def\convertRGBtoCMYKvalue#1#2#3%
+ {\doconvertRGBtoCMYK#1\to\@@cl@@c
+ \doconvertRGBtoCMYK#2\to\@@cl@@m
+ \doconvertRGBtoCMYK#3\to\@@cl@@y
+ \let\@@cl@@k=\@@cl@@z}
+
+\def\convertRGBtoGRAY#1#2#3%
+ {\scratchdimen=#1\s!pt
+ \scratchdimen=300\scratchdimen
+ \scratchcounter=\scratchdimen
+ \scratchdimen=#2\s!pt
+ \scratchdimen=590\scratchdimen
+ \advance\scratchcounter by \scratchdimen
+ \scratchdimen=#3\s!pt
+ \scratchdimen=110\scratchdimen
+ \advance\scratchcounter by \scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard
+ \edef\@@cl@@k{\realcolorvalue\scratchcounter}}
+
+\def\convertCMYKtoGRAY#1#2#3#4%
+ {\convertCMYKtoRGB{#1}{#2}{#3}{#4}%
+ \convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b}
+
+\def\doconvertCMYKtoCMY#1\k#2\to#3%
+ {\scratchdimen=#1\s!pt
+ \advance\scratchdimen by #2\s!pt\relax
+ \ifdim\scratchdimen>1\s!pt
+ \scratchdimen=1\s!pt
+ \else
+ \scratchdimen=\scratchdimen
+ \fi
+ \multiply\scratchdimen by 1000
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard
+ \edef#3{\realcolorvalue\scratchcounter}}
+
+\def\convertCMYKtoCMY#1#2#3#4%
+ {\doconvertCMYKtoCMY#1\k#4\to\@@cl@@c
+ \doconvertCMYKtoCMY#2\k#4\to\@@cl@@m
+ \doconvertCMYKtoCMY#3\k#4\to\@@cl@@y
+ \let\@@cl@@k=\@@cl@@z}
+
+%D We already mentioned that colors interfere with building
+%D the pagebody. This means that when the page is composed,
+%D the colors temporary have to be reset. After the page is
+%D shipped out, we have to revive the current color.
+%D
+%D We use \type{\marks} to keep track of colors across page
+%D boundaries. Unfortunately standard \TEX\ supports only one mark,
+%D and using this one for color support only would be a waste.
+%D We therefore use an adapted version of J.~Fox's multiple mark
+%D mechanism as (re|)|implemented in \module{supp-mrk}.
+
+\doifdefinedelse{newmark}
+ {\newmark\colormark}
+ {\def\colormark#1{}}
+
+%D Using this mark mechanism with lots of colors has one
+%D major drawback: \TEX's memory tends to overflow when
+%D very colorful text is stored in a global box. Even worse is that
+%D the processing time grows considerably. We therefore support
+%D local as well as global color switching.
+%D
+%D Of the next macros, \type{\popcolor} is to be used after
+%D the actual \type{\shipout} and \type{\startcolorpage} and
+%D \type{\stopcolorpage} are called when entering and leaving
+%D the \type{\pagebody} builder. In case of emergencies
+%D \type{\pushcolor} can be used to undo the current color,
+%D for instance when insertions are appended to the page.
+
+%D Before we present the color macros, we first define the
+%D setup command. This command takes care of setting up the
+%D booleans that control local and global behavior and
+%D conversion to other color spaces.
+
+\newif\ifincolor
+\newif\iflocalcolor
+
+\def\setupcolors%
+ {\dosingleargument\dosetupcolors}
+
+\def\dosetupcolors[#1]%
+ {\getparameters[\??cl][#1]%
+ \doifelse{\@@clconversie}{\v!ja}
+ {\preferGRAYtrue}
+ {\preferGRAYfalse}%
+ \doifelse{\@@clrgb}{\v!nee}
+ {\showmessage{\m!colors}{9}{\v!rgb}\RGBsupportedfalse}
+ {\showmessage{\m!colors}{10}{\v!rgb}\RGBsupportedtrue}%
+ \doifelse{\@@clcmyk}{\v!nee}
+ {\showmessage{\m!colors}{9}{\v!cmyk}\CMYKsupportedfalse}
+ {\showmessage{\m!colors}{10}{\v!cmyk}\CMYKsupportedtrue}%
+ \ifRGBsupported
+ \converttoGRAYfalse
+ \else\ifCMYKsupported
+ \converttoGRAYfalse
+ \else
+ \converttoGRAYtrue
+ \showmessage{\m!colors}{11}{}%
+ \fi\fi
+ \processaction
+ [\@@clstatus]
+ [\v!globaal=>\incolortrue\localcolorfalse
+ \showmessage{\m!colors}{1}{\colorstyle},
+ \v!lokaal=>\incolortrue\localcolortrue
+ \showmessage{\m!colors}{2}{\colorstyle},
+ \v!start=>\let\@@clstatus=\v!globaal
+ \incolortrue\localcolorfalse
+ \showmessage{\m!colors}{1}{\colorstyle},
+ \v!stop=>\incolorfalse\localcolorfalse]}
+
+%D \macros
+%D {doifcolorelse}
+%D {}
+%D
+%D Switching to a color is done by means of the following
+%D command. Later on we will explain the use of palets. We
+%D define ourselves a color conditional first.
+
+\def\currentpalet{}
+
+\def\doifcolorelse#1%
+ {\doifdefinedelse{\??cr\currentpalet#1}}
+
+\def\getcurrentcolorspecs#1%
+ {\edef\currentcolorspecs{\getvalue{\??cr\currentpalet#1}}}
+
+%D \macros
+%D {localstartcolor,localstopcolor}
+%D {}
+%D
+%D Simple color support, that is without nesting, is provided
+%D by:
+
+\def\localstartcolor[#1]%
+ {\ifincolor
+ \localcolortrue
+ \doglobalstartcolor[#1]%
+ \fi}
+
+\def\localstopcolor%
+ {\ifincolor
+ \doglobalstopcolor
+ \fi}
+
+%D \macros
+%D {startcolor,stopcolor}
+%D {}
+%D
+%D The more save method, the one that saves the current color
+%D state and returns to this state afterward, is activated by:
+%D
+%D \showsetup{\y!startcolor}
+
+\def\startcolor[#1]%
+ {\ifincolor
+ \doglobalstartcolor[#1]%
+ \fi}
+
+\def\stopcolor%
+ {\ifincolor
+ \doglobalstopcolor
+ \fi}
+
+%D This macros call the global color switching ones. Starting
+%D a global, i.e. a possible page boundary crossing, color
+%D mode also sets a \type{\mark} in \TEX's internal list.
+
+\newcount\colorlevel
+
+\setvalue{\??cl0C}{} % saved color
+\setvalue{\??cl0S}{} % stop command
+
+\def\dodoglobalstartcolor[#1]%
+ {\xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
+ \global\advance\colorlevel by 1
+ \setxvalue{\??cl\the\colorlevel C}{#1}%
+ \debuggerinfo{\m!colors}
+ {start #1 at level \the\colorlevel}%
+ \doifelsenothing{#1}
+ {\setxvalue{\??cl\the\colorlevel C}{\currentcolor}%
+ \setgvalue{\??cl\the\colorlevel S}{\donoglobalstopcolor}}
+ {\doifelse{#1}{\currentcolor}
+ {\setgvalue{\??cl\the\colorlevel S}{\donoglobalstopcolor}}
+ {\doifcolorelse{#1}
+ {\docolormark{#1}%
+ \setgvalue{\??cl\the\colorlevel S}{\dodoglobalstopcolor}%
+ \startcolormode{#1}}
+ {\setgvalue{\??cl\the\colorlevel S}{\donoglobalstopcolor}%
+ \showmessage{\m!colors}{3}{#1}}}}}
+
+\def\doglobalstartcolor[#1]%
+ {\ifnum\colorlevel=0
+ \doifelsenothing{#1}
+ {\setgvalue{\??cl\the\colorlevel S}{}}
+ {\dodoglobalstartcolor[#1]}%
+ \else
+ \dodoglobalstartcolor[#1]%
+ \fi
+ \ignorespaces}
+
+\def\donoglobalstopcolor%
+ {\ifnum\colorlevel>0
+ \xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
+ \debuggerinfo{\m!colors}
+ {stop \currentcolor\normalspace at level \the\colorlevel}%
+ \global\advance\colorlevel by -1
+ \fi}
+
+\def\dodoglobalstopcolor%
+ {\ifnum\colorlevel>0
+ \donoglobalstopcolor
+ \xdef\previouscolor{\getvalue{\??cl\the\colorlevel C}}%
+ \ifnum\colorlevel=0
+ \docolormark{}%
+ \stopcolormode
+ \else % let's do a bit redundant testing here
+ \docolormark{\previouscolor}%
+ \doifelsenothing{\previouscolor}
+ {\dostopcolormode}
+ {\doifcolorelse{\previouscolor}
+ {\doifnot{\currentcolor}{\previouscolor}
+ {\startcolormode{\previouscolor}}}
+ {\dostopcolormode}}%
+ \fi
+ \fi}
+
+\def\doglobalstopcolor%
+ {\getvalue{\??cl\the\colorlevel S}}
+
+%D We don't use grouping and save each stop alternative. This
+%D permits be especially useful in for instance local color
+%D support in verbatim. Using \type{\bgroup}||\type{\egroup}
+%D pairs could interfere with calling commands
+
+%D This color mechanism takes care of nested colors, like in:
+%D
+%D \startbuffer
+%D \kleur[groen]{groen \kleur[groen]{groen \kleur[rood]{rood}} groen}
+%D \kleur[groen]{groen \kleur[]{groen \kleur[rood]{rood}} groen}
+%D \kleur[groen]{groen \kleur[rood]{rood \kleur[rood]{rood}} groen}
+%D \kleur[groen]{groen \kleur[groen]{groen \kleur[]{groen}} groen}
+%D \kleur[groen]{groen \kleur[rood]{rood} groen}
+%D \kleur[groen]{groen \kleur[]{groen} groen}
+%D \kleur[]{zwart \kleur[rood]{rood} zwart}
+%D \kleur[]{zwart}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D Crossing page boundaries is of course also handled.
+%D Undefined or empty color specifications are treated as
+%D efficient as possible.
+%D
+%D \startbuffer
+%D \startkleur[groen]
+%D [groen] \input tufte [groen] \par
+%D \startkleur[]
+%D [groen] \input knuth [groen] \par
+%D \startkleur[rood]
+%D [rood] \input tufte [rood] \par
+%D \startkleur[geel]
+%D [geel] \input knuth [geel] \par
+%D \stopkleur
+%D [rood] \input tufte [rood] \par
+%D \stopkleur
+%D [groen] \input knuth [groen] \par
+%D \stopkleur
+%D [groen] \input tufte [groen] \par
+%D \stopkleur
+%D \stopbuffer
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D These quotes are typeset by saying:
+%D
+%D \typebuffer
+%D
+%D Out of efficiency we only use marks when needed. The next
+%D macro tries to find out if indeed a mark should be set.
+%D This macro uses the boolean \type{\ifinpagebody}, which can
+%D be defined and set in the module that handles the pagebody.
+
+\ifx\ifinpagebody\undefined \newif\ifinpagebodytrue \fi
+
+\def\docolormark#1%
+ {\ifinpagebody \else
+ \iflocalcolor \else
+ \dodocolormark{#1}%
+ \fi
+ \fi}
+
+\let\lastcolormark=\empty
+
+\def\dodocolormark#1%
+ {\doifnot{#1}{\lastcolormark}
+ {\colormark{#1}%
+ \xdef\lastcolormark{#1}}}
+
+%D \macros
+%D {pushcolor, popcolor}
+%D {}
+%D
+%D Pushing the current state in the output routine simply comes
+%D to resetting the color to black, while popping restores the
+%D color state to that of before the break.
+
+\def\pushcolor%
+ {\stopcolormode}
+
+\def\popcolor%
+ {\doifsomething{\botcolormark}
+ {\debuggerinfo{\m!colors}{popping \botcolormark}%
+ \startcolormode{\botcolormark}}}
+
+\def\popsplitcolor%
+ {\getsplitmarks\colormark % hier wel
+ \doifsomething{\botcolormark}
+ {\debuggerinfo{\m!colors}{split popping \botcolormark}%
+ \startcolormode{\botcolormark}}}
+
+%D \macros
+%D {startcolorpage, stopcolorpage}
+%D {}
+%D
+%D Local use can be forced with the next two macros. Nesting
+%D is still supported but colors are no longer marked.
+
+\def\startcolorpage%
+ {\bgroup
+ \def\docolormark##1{}%
+ \edef\savedcolorlevel{\the\colorlevel}%
+ \ifnum\colorlevel>0
+ \stopcolormode
+ \fi
+ \global\colorlevel=0\relax}
+
+\def\stopcolorpage%
+ {\global\colorlevel=\savedcolorlevel\relax
+ \egroup}
+
+%D \macros
+%D {color,gray}
+%D {}
+%D
+%D This leaves the simple color command:
+%D
+%D \showsetup{\y!color}
+%D \showsetup{\y!gray}
+%D
+%D Which can be used straightforward: \color[groen]{green as gras}.
+%D We want color support to be similar to font support and
+%D therefore implement \type{\color} as:
+
+\unexpanded\def\color[#1]%
+ {\groupedcommand
+ {\startcolor[#1]}
+ {\stopcolor}}
+
+\unexpanded\def\gray[#1]%
+ {\groupedcommand
+ {\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}
+ {\stopcolor}}
+
+%D This implementation enables use of defined colors like:
+%D
+%D \starttypen
+%D Look at the {\brightgreen bright} side of life and get
+%D yourself no \red{red} head!
+%D \stoptypen
+
+%D \macros
+%D {colorvalue, grayvalue}
+%D {}
+%D
+%D We can typeset the color components using \type{\colorvalue} and
+%D \type{\grayvalue}. The commands:
+%D
+%D \startbuffer
+%D color value of SomeKindOfRed: \colorvalue{SomeKindOfRed} \crlf
+%D gray value of SomeKindOfRed: \grayvalue{SomeKindOfRed}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D show us:
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+
+\def\realcolorformat#1%
+ {\ifnum#1<10 0.00\the#1%
+ \else\ifnum#1<100 0.0\the#1%
+ \else\ifnum#1<1000 0.\the#1%
+ \else 1.000\fi\fi\fi}
+
+\def\colorformatseparator{ }
+
+\def\dodoformatcolor#1%
+ {\scratchdimen=#1\s!pt\relax
+ \ifdim\scratchdimen>1\s!pt
+ \scratchdimen=1\s!pt
+ \fi
+ \multiply\scratchdimen by 1000
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard \relax
+ \realcolorformat\scratchcounter}
+
+\def\doformatcolorR#1:#2:#3\od%
+ {\dodoformatcolor{#1}\colorformatseparator
+ \dodoformatcolor{#2}\colorformatseparator
+ \dodoformatcolor{#3}}
+
+\def\doformatcolorC#1:#2:#3:#4\od%
+ {\dodoformatcolor{#1}\colorformatseparator
+ \dodoformatcolor{#2}\colorformatseparator
+ \dodoformatcolor{#3}\colorformatseparator
+ \dodoformatcolor{#4}}
+
+\def\doformatcolorK#1\od%
+ {\dodoformatcolor{#1}}
+
+\def\doformatcolor#1:%
+ {\getvalue{doformatcolor#1}}
+
+\def\colorvalue#1%
+ {\doifcolorelse{#1}
+ {\getcurrentcolorspecs{#1}%
+ \expandafter\doformatcolor\currentcolorspecs\od}
+ {}}
+
+\def\doformatgrayR#1:#2:#3\od%
+ {\convertRGBtoGRAY{#1}{#2}{#3}%
+ \dodoformatcolor\@@cl@@k}
+
+\def\doformatgrayC#1:#2:#3:#4\od%
+ {\convertCMYKtoGRAY{#1}{#2}{#3}{#4}%
+ \dodoformatcolor\@@cl@@k}
+
+\def\doformatgrayK#1\od%
+ {\dodoformatcolor{#1}}
+
+\def\doformatgray#1:%
+ {\getvalue{doformatgray#1}}
+
+\def\grayvalue#1%
+ {\doifcolorelse{#1}
+ {\getcurrentcolorspecs{#1}%
+ \expandafter\doformatgray\currentcolorspecs\od}
+ {}}
+
+%D \macros
+%D {locatstartraster,localstopraster,
+%D startraster,stopraster}
+%D {}
+%D
+%D The previous conversions are not linear and treat each color
+%D component according to human perception curves. Pure gray
+%D (we call them rasters) has equal color components. In
+%D \CONTEXT\ rasters are only used as backgrounds and these
+%D don't cross page boundaries in the way color does. Therefore
+%D we don't need stacks and marks. Just to be compatible with
+%D color support we offer both 'global' and 'local' commands.
+
+\def\localstartraster[#1]%
+ {\doifinstringelse{.}{#1}
+ {\dostartgraymode{#1}}
+ {\dostartgraymode{\@@rsraster}}}
+
+\def\localstopraster%
+ {\dostopgraymode}
+
+\def\startraster%
+ {\localstartraster}
+
+\def\stopraster%
+ {\localstopraster}
+
+%D In this documentation we will not go into too much details
+%D on palets. Curious users can find more information on this
+%D topic in \uit[use of color].
+%D
+%D At the moment we implemented color in \CONTEXT\ color
+%D printing was not yet on the desktop. In spite of this lack our
+%D graphics designer made colorfull illustrations. When printed
+%D on a black and white printer, distinctive colors can come
+%D out equally gray. We therefore decided to use only colors
+%D that were distinctive in colors as well as in black and
+%D white print.
+%D
+%D Although none of the graphic packages we used supported
+%D logical colors and global color redefition, we build this
+%D support into \CONTEXT. This enabled us to experiment and
+%D also prepared us for the future.
+
+%D \macros
+%D {definepalet}
+%D {}
+%D
+%D Colors are grouped in palets. The colors in such a palet can
+%D have colorful names, but best is to use names that specify
+%D their use, like {\em important} or {\em danger}. As a sort
+%D of example \CONTEXT\ has some palets predefined,
+%D like:\voetnoot{At the time I wrote the palet support, I was
+%D reading 'A hort history of time' of S.~Hawkins, so that's
+%D why we stuck to quarks.}
+%D
+%D \starttypen
+%D \definepalet
+%D [alfa]
+%D [ top=rood:7,
+%D bottom=groen:6,
+%D up=blauw:5,
+%D down=cyaan:4,
+%D strange=magenta:3,
+%D charm=geel:2]
+%D \stoptypen
+%D
+%D It's formal definition is:
+%D
+%D \showsetup{\y!definepalet}
+%D
+%D Visualized, such a palet looks like:
+%D
+%D \startbuffer[palet]
+%D \showpalet [alfa] [horizontaal,naam,nummer,waarde]
+%D \stopbuffer
+%D
+%D \startregelcorrectie
+%D \haalbuffer[palet]
+%D \stopregelcorrectie
+%D
+%D This bar shows both the color and gray alternatives of the
+%D palet components (not visible in black and white print).
+
+\def\definepalet%
+ {\dodoubleargument\dodefinepalet}
+
+\def\dodefinepalet[#1][#2]%
+ {\setvalue{\??pa#1}{}%
+ \showmessage{\m!colors}{6}{#1}%
+ \def\dodododefinepalet[##1=##2]%
+ {\doifvaluesomething{\??pa#1}
+ {\setevalue{\??pa#1}{\getvalue{\??pa#1},}}%
+ \setevalue{\??pa#1}{\getvalue{\??pa#1}##1}%
+ \doifdefinedelse{\??cr##2}
+ {\setevalue{\??cr#1:##1}{\getvalue{\??cr##2}}}
+ {\setevalue{\??cr#1:##1}{G:0}}}%
+ \def\dododefinepalet##1%
+ {\dodododefinepalet[##1]}%
+ \processcommalist[#2]\dododefinepalet}
+
+%D \macros
+%D {setuppalet}
+%D {}
+%D
+%D Colors are taken from the current palet, if defined.
+%D Setting the current palet is done by:
+%D
+%D \showsetup{\y!setuppalet}
+
+\def\currentpalet{}
+
+\def\setuppalet%
+ {\dosingleempty\dosetuppalet}
+
+\def\dosetuppalet[#1]%
+ {\doifelsenothing{#1}
+ {\def\currentpalet{}}
+ {\doifelsevaluenothing{\??pa#1}
+ {\showmessage{\m!colors}{7}{#1}%
+ \def\currentpalet{}}
+ {\def\currentpalet{#1:}}}}
+
+%D \macros
+%D {showpalet}
+%D {}
+%D
+%D The previous visualization was typeset with:
+%D
+%D \typebuffer[palet]
+%D
+%D This commands is defined as:
+%D
+%D \showsetup{\y!showpalet}
+
+\def\showpalet%
+ {\dodoubleargument\doshowpalet}
+
+\def\doshowpalet[#1][#2]%
+ {\doifdefined{\??pa#1}
+ {\doifinsetelse{\v!vertikaal}{#2}
+ {\showverticalpalet[#1][#2]}
+ {\showhorizontalpalet[#1][#2]}}}
+
+\def\showhorizontalpalet[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \!!widtha=\hsize
+ \doifinsetelse{\v!naam}{#2}
+ {\!!widthb=5em}
+ {\!!widthb=\!!zeropoint}
+ \advance\!!widtha by -\!!widthb
+ \getcommacommandsize[\getvalue{\??pa#1}]
+ \divide\!!widtha by \commalistsize
+ \setuppalet[#1]
+ \doifinset{\v!nummer}{#2}%
+ {\def\doshowpalet##1%
+ {\hbox to \!!widtha{\hss\strut##1\hss}}
+ \hbox{\hskip\!!widthb\processpalet[#1]\doshowpalet}
+ \endgraf}
+ \def\doshowpalet##1%
+ {\color[##1]{\vrule\!!width\!!widtha\!!height\ht\strutbox}}
+ \hbox
+ {\ifdim\!!widthb>\!!zeropoint\relax
+ \hbox to \!!widthb{\hss#1\hskip.75em}%
+ \fi
+ \processpalet[#1]\doshowpalet}
+ \endgraf
+ \def\doshowpalet##1%
+ {\gray[##1]{\vrule\!!width\!!widtha\!!depth\dp\strutbox}}
+ \hbox{\hskip\!!widthb\processpalet[#1]\doshowpalet}
+ \endgraf
+ \doifinset{\v!waarde}{#2}
+ {\def\doshowpalet##1%
+ {\vbox
+ {\hsize\!!widtha
+ \vskip.25ex
+ \everypar{\strut}
+ \veryraggedcenter
+ \let\colorformatseparator=\endgraf
+ \colorvalue{##1}}}
+ \hbox{\hskip\!!widthb\processpalet[#1]\doshowpalet}}}}
+
+\def\showverticalpalet[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet[#1]
+ \def\rule%
+ {\vrule\!!width3em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \doifinsetelse{\v!nummer}{#2}
+ {\!!widthb=5em}
+ {\!!widthb=\!!zeropoint}
+ \advance\!!widtha by \!!widthb
+ \doifinset{\v!naam}{#2}
+ {\hbox{\hskip\!!widthb\hbox to 6em{\hss\strut#1\hss}}
+ \endgraf}
+ \def\doshowpalet##1%
+ {\hbox
+ {\ifdim\!!widthb>\!!zeropoint
+ \hbox to \!!widthb{\hss##1\hskip.75em}%
+ \fi
+ \color[##1]{\rule}%
+ \gray[##1]{\rule}%
+ \doifinset{\v!waarde}{#2}%
+ {\hbox to 7em{\hskip.75em\colorvalue{##1}\hss}}}
+ \endgraf}
+ \processpalet[#1]\doshowpalet}}
+
+\def\processpalet[#1]%
+ {\processcommacommand[\getvalue{\??pa#1}]}
+
+%D \macros
+%D {definecolorgroup}
+%D {}
+%D
+%D The naming of the colors in this palet suggests some
+%D ordening, which in turn is suported by color grouping.
+%D
+%D \starttypen
+%D \definecolorgroup
+%D [rood]
+%D [1.00:0.90:0.90,
+%D 1.00:0.80:0.80,
+%D 1.00:0.70:0.70,
+%D 1.00:0.55:0.55,
+%D 1.00:0.40:0.40,
+%D 1.00:0.25:0.25,
+%D 1.00:0.15:0.15,
+%D 0.90:0.00:0.00]
+%D \stoptypen
+%D
+%D In such a color group colors are numbered from~$1$ to~$n$.
+%D
+%D \showsetup{\y!definecolorgroup}
+%D
+%D This kind of specification is not only more compact than
+%D defining each color separate, it also loads faster and takes
+%D less bytes.
+
+\def\definecolorgroup%
+ {\dotripleempty\dodefinecolorgroup}
+
+\def\dodefinecolorgroup[#1][#2][#3]%
+ {\ifthirdargument
+ \processaction
+ [#2]
+ [ \v!cmyk=>\edef\currentcolorspace{C},
+ \v!rgb=>\edef\currentcolorspace{R},
+ \v!gray=>\edef\currentcolorspace{K},
+ \s!unknown=>\edef\currentcolorspace{R}]%
+ \scratchcounter=0
+ \def\dododefinecolorgroup##1%
+ {\advance\scratchcounter by 1
+ \setevalue{\??cr#1:\the\scratchcounter}{\currentcolorspace:##1}}%
+ \processcommalist[#3]\dododefinecolorgroup
+ \else
+ \doifinstringelse{:}{#2}
+ {\definecolorgroup[#1][\v!rgb][#2]}
+ {\doloop
+ {\doifdefinedelse{\??cr#2:\recurselevel}
+ {\setevalue{\??cr#1:\recurselevel}%
+ {\getvalue{\??cr#2:\recurselevel}}}
+ {\exitloop}}}%
+ \fi}
+
+%D \macros
+%D {showcolorgroup}
+%D {}
+%D
+%D We can show the group by:
+%D
+%D \startbuffer
+%D \showcolorgroup [blauw] [horizontaal,naam,nummer,waarde]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or in color:
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D which uses:
+%D
+%D \showsetup{\y!showcolorgroup}
+
+\def\showcolorgroup%
+ {\dodoubleargument\doshowcolorgroup}
+
+\def\doshowcolorgroup[#1][#2]%
+ {\doifdefined{\??cr#1:1}
+ {\doifinsetelse{\v!vertikaal}{#2}
+ {\showverticalcolorgroup[#1][#2]}
+ {\showhorizontalcolorgroup[#1][#2]}}}
+
+\def\showhorizontalcolorgroup[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \!!widtha=\hsize
+ \setuppalet
+ \!!counta=0
+ \dorecurse{15}
+ {\doifdefined{\??cr#1:\recurselevel}{\advance\!!counta by 1}}
+ \doifinsetelse{\v!naam}{#2}
+ {\!!widthb=5em}
+ {\!!widthb=\!!zeropoint}
+ \advance\!!widtha by -\!!widthb
+ \divide\!!widtha by \!!counta
+ \doifinset{\v!nummer}{#2}
+ {\hbox
+ {\hskip\!!widthb
+ \dorecurse{\!!counta}
+ {\hbox to \!!widtha{\hss\strut\recurselevel\hss}}}
+ \endgraf}
+ \hbox
+ {\ifdim\!!widthb>\!!zeropoint
+ \hbox to \!!widthb{\hss#1\hskip.75em}%
+ \fi
+ \dorecurse{\!!counta}
+ {\vbox
+ {\hsize\!!widtha
+ \color[#1:\recurselevel]
+ {\vrule\!!width\!!widtha\!!height\ht\strutbox}
+ \endgraf
+ \gray[#1:\recurselevel]
+ {\vrule\!!width\!!widtha\!!depth\dp\strutbox}}}}%
+ \endgraf
+ \doifinset{\v!waarde}{#2}
+ {\hbox
+ {\hskip\!!widthb
+ \dorecurse{\!!counta}
+ {\vbox
+ {\hsize\!!widtha
+ \vskip.25ex
+ \everypar{\strut}
+ \veryraggedcenter
+ \let\colorformatseparator=\endgraf
+ \colorvalue{#1:\recurselevel}}}}}}}
+
+\def\showverticalcolorgroup[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet
+ \def\rule%
+ {\vrule\!!width2.5em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \doifinsetelse{\v!nummer}{#2}
+ {\!!widthb=2em}
+ {\!!widthb=\!!zeropoint}
+ \doifinset{\v!naam}{#2}
+ {\hbox{\hskip\!!widthb\hbox to 5em{\hss\strut#1\hss}}
+ \endgraf}
+ \dorecurse{15}
+ {\doifdefined{\??cr#1:\recurselevel}
+ {\hbox
+ {\ifdim\!!widthb>\!!zeropoint
+ \hbox to \!!widthb{\hss\recurselevel\hskip.75em}%
+ \fi
+ \color[#1:\recurselevel]{\rule}%
+ \gray[#1:\recurselevel]{\rule}%
+ \doifinset{\v!waarde}{#2}%
+ {\hbox to 7em{\hskip.75em\colorvalue{#1:\recurselevel}\hss}}}
+ \endgraf}}}}
+
+%D There are ten predefined color groups, like
+%D \color[groen]{\em groen}, \color[rood]{\em rood},
+%D \color[blauw]{\em blauw}, \color[cyaan]{\em cyaan},
+%D \color[magenta]{\em magenta} and \color[geel]{\em geel}.
+%D
+%D \startregelcorrectie
+%D \hbox to \hsize
+%D {\hss
+%D \showcolorgroup [rood] [vertikaal,naam,nummer]\hss
+%D \showcolorgroup [groen] [vertikaal,naam]\hss
+%D \showcolorgroup [blauw] [vertikaal,naam]\hss
+%D \showcolorgroup [cyaan] [vertikaal,naam]\hss
+%D \showcolorgroup [magenta] [vertikaal,naam]\hss
+%D \showcolorgroup [geel] [vertikaal,naam]\hss}
+%D \stopregelcorrectie
+%D
+%D These groups are used to define palets {\em alfa} upto {\em
+%D zeta}. As long as we don't use colors from the same row, we
+%D get ourselves distinctive palets. By activating such a palet
+%D one gains access to its members {\em top} to {\em charm} (of
+%D course one should use more suitable names than these).
+%D
+%D \startregelcorrectie
+%D \hbox to \hsize
+%D {\showpalet [alfa] [vertikaal,naam,nummer]\hss
+%D \showpalet [beta] [vertikaal,naam]\hss
+%D \showpalet [gamma] [vertikaal,naam]\hss
+%D \showpalet [delta] [vertikaal,naam]\hss
+%D \showpalet [epsilon] [vertikaal,naam]\hss
+%D \showpalet [zeta] [vertikaal,naam]}
+%D \stopregelcorrectie
+%D
+%D By using the keyword \type{\v!waarde} the individual color
+%D components are shown too. When printed in color, these
+%D showcases show both the colors and the gray value.
+
+%D \macros
+%D {comparepalet}
+%D {}
+%D
+%D There are some more testing macros available:
+%D
+%D \startbuffer
+%D \comparepalet [alfa]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D shows the palet colors against a background:
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D The formal definition is:
+%D
+%D \showsetup{\y!comparepalet}
+
+\def\comparepalet%
+ {\dosingleargument\docomparepalet}
+
+\def\docomparepalet[#1]%
+ {\doifdefined{\??pa#1}
+ {\hbox
+ {\dodocomparepalet\color[#1]%
+ \quad
+ \dodocomparepalet\gray[#1]}}}
+
+\def\dodocomparepalet#1[#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet[#2]
+ \getcommacommandsize[\getvalue{\??pa#2}]
+ \!!widtha=2em\relax
+ \hsize=\commalistsize\!!widtha
+ \def\rule%
+ {\vrule\!!width.5\!!widtha\!!height2.25ex\!!depth-.75ex}
+ \def\dododocomparepalet##1%
+ {\hbox
+ {\setbox0=\hbox
+ {#1[##1]{\vrule\!!width\hsize\!!height3ex}}%
+ \wd0=\!!zeropoint\box0
+ \hbox to \hsize
+ {\def\dododocomparepalet####1%
+ {\hbox to \!!widtha
+ {\hss#1[####1]{\rule}\hss}}%
+ \processcommacommand[\getvalue{\??pa#2}]\dododocomparepalet}}
+ \endgraf}
+ \processcommacommand[\getvalue{\??pa#2}]\dododocomparepalet}}
+
+%D \macros
+%D {comparecolorgroup}
+%D {}
+%D
+%D The similar command:
+%D
+%D \startbuffer
+%D \comparecolorgroup [blauw]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D shows color groups:
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D this commands are defined as:
+%D
+%D \showsetup{\y!comparecolorgroup}
+
+\def\comparecolorgroup%
+ {\dosingleargument\docomparecolorgroup}
+
+\def\docomparecolorgroup[#1]%
+ {\doifdefined{\??cr#1:1}
+ {\hbox
+ {\dodocomparecolorgroup\color[#1]%
+ \quad
+ \dodocomparecolorgroup\gray[#1]}}}
+
+\def\dodocomparecolorgroup#1[#2]%
+ {\localvbox
+ {\!!counta=0
+ \dorecurse{15}
+ {\doifdefined{\??cr#2:\recurselevel}{\advance\!!counta by 1}}
+ \!!widtha=2em\relax
+ \hsize=\!!counta\!!widtha
+ \def\rule%
+ {\vrule\!!width.5\!!widtha\!!height2.25ex\!!depth-.75ex}
+ \def\dododocomparecolorgroup##1%
+ {\hbox to \hsize
+ {\setbox0=\hbox
+ {#1[#2:##1]{\vrule\!!width\hsize\!!height3ex}}%
+ \wd0=\!!zeropoint\box0
+ \hbox to \hsize
+ {\hss\dorecurse{\!!counta}{#1[#2:\recurselevel]{\rule}\hss}}}
+ \endgraf}
+ \dorecurse{\!!counta}{\dododocomparecolorgroup\recurselevel}}}
+
+%D \macros
+%D {showcolor}
+%D {}
+%D
+%D But let's not forget that we also have the more traditional
+%D non||related colors. These show up after:
+%D
+%D \starttypen
+%D \showcolor [name]
+%D \stoptypen
+%D
+%D Where \type{name} for instance can be \type{rgb}.
+%D
+%D \showsetup{\y!showcolor}
+
+\def\showcolor[#1]%
+ {\bgroup
+ \setupcolor[#1]
+ \stelwitruimtein[\v!geen]
+ \def\rule%
+ {\vrule\!!width4em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \def\docommand##1%
+ {\hbox
+ {\gray[##1]{\rule}\quad
+ \color[##1]{\rule}\quad
+ \grayvalue{##1}\quad
+ \hbox to 12em{\colorvalue{##1}\hss}%
+ \strut##1}
+ \endgraf}
+ \processcommacommand[\colorlist]\docommand
+ \egroup}
+
+%D We default to the colors defined in \module{colo-rgb} and
+%D support both \kap{RGB} and \kap{CMYK} output.
+
+\setupcolor
+ [\v!rgb]
+
+\setupcolors
+ [\c!status=\v!stop,
+ \c!conversie=\v!ja,
+ \c!rgb=\v!ja,
+ \c!cmyk=\v!ja]
+
+%D As we can see, color support is turned off by default.
+%D Reduction of gray colors to gray scales is turned on.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex new file mode 100644 index 000000000..3ea42994e --- /dev/null +++ b/tex/context/base/colo-rgb.tex @@ -0,0 +1,365 @@ +%D \module
+%D [ file=colo-rgb,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=RGB,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Just to give users a start we define some colors. While
+%D switching fonts is as international as can be, thanks to the
+%D mnemonics, naming colors is very interface dependant. To
+%D support international setups, we define both english and
+%D interface dependant colors. We use the color inheritance
+%D mechanisms to implement the interface dependant ones.
+
+%D First we define some simple primary \kap{RGB} and \kap{CMYK}
+%D colors. All colors are defined in \kap{RGB} color space.
+
+\definecolor [red] [r=1, g=0, b=0]
+\definecolor [green] [r=0, g=1, b=0]
+\definecolor [blue] [r=0, g=0, b=1]
+
+\definecolor [cyan] [r=0, g=1, b=1]
+\definecolor [magenta] [r=1, g=0, b=1]
+\definecolor [yellow] [r=1, g=1, b=0]
+
+\definecolor [white] [r=1, g=1, b=1]
+\definecolor [black] [r=0, g=0, b=0]
+
+\definecolor [darkred] [r=.8, g=0, b=0]
+\definecolor [middlered] [r=.9, g=0, b=0]
+\definecolor [lightred] [r=1, g=0, b=0]
+
+\definecolor [darkgreen] [r=0, g=.6, b=0]
+\definecolor [middlegreen] [r=0, g=.8, b=0]
+\definecolor [lightgreen] [r=0, g=1, b=0]
+
+\definecolor [darkblue] [r=0, g=0, b=.8]
+\definecolor [middleblue] [r=0, g=0, b=.9]
+\definecolor [lightblue] [r=0, g=0, b=1]
+
+\definecolor [darkcyan] [r=.6, g=.8, b=.8]
+\definecolor [middlecyan] [r=0, g=.8, b=.8]
+
+\definecolor [darkmagenta] [r=.8, g=.6, b=.8]
+\definecolor [middlemagenta] [r=1, g=0, b=.6]
+
+\definecolor [darkyellow] [r=.8, g=.8, b=.6]
+\definecolor [middleyellow] [r=1, g=1, b=.2]
+
+\definecolor [darkgray] [r=.5, g=.5, b=.5]
+\definecolor [middlegray] [r=.7, g=.7, b=.7]
+\definecolor [lightgray] [r=.9, g=.9, b=.9]
+
+%D These colors are mapped to interface dependant colornames.
+
+\startinterface dutch
+
+ \definecolor [rood] [red]
+ \definecolor [groen] [green]
+ \definecolor [blauw] [blue]
+
+ \definecolor [cyaan] [cyan]
+ \definecolor [magenta] [magenta]
+ \definecolor [geel] [yellow]
+
+ \definecolor [wit] [white]
+ \definecolor [zwart] [black]
+
+ \definecolor [donkerrood] [darkred]
+ \definecolor [middelrood] [middlered]
+ \definecolor [lichtrood] [lightred]
+
+ \definecolor [donkergroen] [darkgreen]
+ \definecolor [middelgroen] [middlegreen]
+ \definecolor [lichtgroen] [lightgreen]
+
+ \definecolor [donkerblauw] [darkblue]
+ \definecolor [middelblauw] [middleblue]
+ \definecolor [lichtblauw] [lightblue]
+
+ \definecolor [donkercyaan] [darkcyan]
+ \definecolor [middelcyaan] [middlecyan]
+
+ \definecolor [donkermagenta] [darkmagenta]
+ \definecolor [middelmagenta] [middlemagenta]
+
+ \definecolor [donkergeel] [darkyellow]
+ \definecolor [middelgeel] [middleyellow]
+
+ \definecolor [donkergrijs] [darkgray]
+ \definecolor [middengrijs] [middlegray]
+ \definecolor [lichtgrijs] [lightgray]
+
+\stopinterface
+
+\startinterface german
+
+ \definecolor [rot] [red]
+ \definecolor [gruen] [green]
+ \definecolor [blau] [blue]
+
+ \definecolor [cyan] [cyan]
+ \definecolor [magenta] [magenta]
+ \definecolor [gelb] [yellow]
+
+ \definecolor [weiss] [white]
+ \definecolor [schwarz] [black]
+
+ \definecolor [dunkelrot] [darkred]
+ \definecolor [mittelrot] [middlered]
+ \definecolor [hellrot] [lightred]
+
+ \definecolor [dunkelgruen] [darkgreen]
+ \definecolor [mittelgruen] [middlegreen]
+ \definecolor [hellgruen] [lightgreen]
+
+ \definecolor [dunkelblau] [darkblue]
+ \definecolor [mittelblau] [middleblue]
+ \definecolor [hellblau] [lightblue]
+
+ \definecolor [dunkelcyan] [darkcyan]
+ \definecolor [mittelcyan] [middlecyan]
+
+ \definecolor [dunkelmagenta] [darkmagenta]
+ \definecolor [mittelmagenta] [middlemagenta]
+
+ \definecolor [dunkelgelb] [darkyellow]
+ \definecolor [mittelgelb] [middleyellow]
+
+ \definecolor [dunkelgrau] [darkgray]
+ \definecolor [mittelgrau] [middlegray]
+ \definecolor [hellgrau] [lightgray]
+
+\stopinterface
+
+%D Like colors, we first define the english colorgroups. These
+%D colorgroups are tuned for distinctive gray scale printing.
+
+\definecolorgroup
+ [gray]
+ [0.95:0.95:0.95,
+ 0.90:0.90:0.90,
+ 0.80:0.80:0.80,
+ 0.70:0.70:0.70,
+ 0.60:0.60:0.60,
+ 0.50:0.50:0.50,
+ 0.40:0.40:0.40,
+ 0.30:0.30:0.30,
+ 0.20:0.20:0.20,
+ 0.10:0.10:0.10,
+ 0.00:0.00:0.00]
+
+\definecolorgroup
+ [red]
+ [1.00:0.90:0.90,
+ 1.00:0.80:0.80,
+ 1.00:0.70:0.70,
+ 1.00:0.55:0.55,
+ 1.00:0.40:0.40,
+ 1.00:0.25:0.25,
+ 1.00:0.15:0.15,
+ 0.90:0.00:0.00]
+
+\definecolorgroup
+ [green]
+ [0.90:1.00:0.90,
+ 0.70:1.00:0.70,
+ 0.50:1.00:0.50,
+ 0.30:1.00:0.30,
+ 0.15:0.90:0.15,
+ 0.00:0.80:0.00,
+ 0.00:0.65:0.00,
+ 0.00:0.50:0.00]
+
+\definecolorgroup
+ [blue]
+ [0.90:0.95:1.00,
+ 0.80:0.90:1.00,
+ 0.55:0.85:1.00,
+ 0.30:0.80:1.00,
+ 0.15:0.75:1.00,
+ 0.00:0.70:1.00,
+ 0.00:0.55:1.00,
+ 0.00:0.40:1.00]
+
+\definecolorgroup
+ [cyan]
+ [0.80:1.00:1.00,
+ 0.60:1.00:1.00,
+ 0.30:1.00:1.00,
+ 0.00:0.95:0.95,
+ 0.00:0.85:0.85,
+ 0.00:0.75:0.75,
+ 0.00:0.60:0.60,
+ 0.00:0.50:0.50]
+
+\definecolorgroup
+ [magenta]
+ [1.00:0.90:1.00,
+ 1.00:0.80:1.00,
+ 1.00:0.65:1.00,
+ 1.00:0.50:1.00,
+ 1.00:0.35:1.00,
+ 1.00:0.15:1.00,
+ 0.90:0.05:0.90,
+ 0.80:0.00:0.80]
+
+\definecolorgroup
+ [yellow]
+ [1.00:1.00:0.70,
+ 1.00:1.00:0.00,
+ 1.00:0.85:0.05,
+ 1.00:0.70:0.00,
+ 1.00:0.55:0.00,
+ 0.95:0.40:0.00,
+ 0.80:0.30:0.00,
+ 0.60:0.30:0.00]
+
+\definecolorgroup
+ [red*]
+ [1.00:0.95:0.95,
+ 1.00:0.90:0.90,
+ 1.00:0.80:0.80,
+ 1.00:0.70:0.70,
+ 1.00:0.60:0.60,
+ 1.00:0.50:0.50,
+ 1.00:0.40:0.40,
+ 1.00:0.30:0.30]
+
+\definecolorgroup
+ [green*]
+ [0.95:1.00:0.95,
+ 0.90:1.00:0.90,
+ 0.80:1.00:0.80,
+ 0.70:1.00:0.70,
+ 0.60:1.00:0.60,
+ 0.50:1.00:0.50,
+ 0.40:1.00:0.40,
+ 0.30:1.00:0.30]
+
+\definecolorgroup
+ [blue*]
+ [0.95:0.95:1.00,
+ 0.90:0.90:1.00,
+ 0.80:0.80:1.00,
+ 0.70:0.70:1.00,
+ 0.60:0.60:1.00,
+ 0.50:0.50:1.00,
+ 0.40:0.40:1.00,
+ 0.30:0.30:1.00]
+
+\definecolorgroup
+ [yellow*]
+ [1.00:1.00:0.10,
+ 1.00:1.00:0.00,
+ 0.90:0.90:0.00,
+ 0.80:0.80:0.00,
+ 0.70:0.70:0.00,
+ 0.60:0.60:0.00,
+ 0.50:0.50:0.00,
+ 0.40:0.40:0.00]
+
+%D For the sake of implementing interface dependant color
+%D groups we support colorgroup duplication.
+
+\startinterface dutch
+ \definecolorgroup [grijs] [gray]
+ \definecolorgroup [rood] [red]
+ \definecolorgroup [groen] [green]
+ \definecolorgroup [blauw] [blue]
+ \definecolorgroup [cyaan] [cyan]
+ \definecolorgroup [magenta] [magenta]
+ \definecolorgroup [geel] [yellow]
+ \definecolorgroup [rood*] [red*]
+ \definecolorgroup [groen*] [green*]
+ \definecolorgroup [blauw*] [blue*]
+ \definecolorgroup [geel*] [yellow*]
+\stopinterface
+
+\startinterface german
+ \definecolorgroup [grau] [gray]
+ \definecolorgroup [rot] [red]
+ \definecolorgroup [gruen] [green]
+ \definecolorgroup [blau] [blue]
+ \definecolorgroup [cyan] [cyan]
+ \definecolorgroup [magenta] [magenta]
+ \definecolorgroup [gelb] [yellow]
+ \definecolorgroup [rot*] [red*]
+ \definecolorgroup [gruen*] [green*]
+ \definecolorgroup [blau*] [blue*]
+ \definecolorgroup [gelb*] [yellow*]
+\stopinterface
+
+%D The next set of color palets is quite language independant.
+%D These palets are meant as examples.
+
+\definepalet
+ [alfa]
+ [ top=red:7,
+ bottom=green:6,
+ up=blue:5,
+ down=cyan:4,
+ strange=magenta:3,
+ charm=yellow:2]
+
+\definepalet
+ [beta]
+ [ top=red:7,
+ bottom=green:5,
+ up=blue:3,
+ down=cyan:6,
+ strange=magenta:2,
+ charm=yellow:1]
+
+\definepalet
+ [gamma]
+ [ top=red:2,
+ bottom=green:5,
+ up=blue:3,
+ down=cyan:6,
+ strange=magenta:7,
+ charm=yellow:4]
+
+\definepalet
+ [delta]
+ [ top=yellow*:5,
+ bottom=yellow*:3,
+ up=yellow*:2,
+ down=magenta:6,
+ strange=blue:4,
+ charm=blue:1]
+
+\definepalet
+ [epsilon]
+ [ top=cyan:7,
+ bottom=cyan:5,
+ up=blue:3,
+ down=yellow:6,
+ strange=yellow:4,
+ charm=yellow:2]
+
+\definepalet
+ [zeta]
+ [ top=red:6,
+ bottom=green:5,
+ up=blue:7,
+ down=cyan:4,
+ strange=magenta:3,
+ charm=yellow:2]
+
+%D The next four colors are used for typesetting verbatim \TEX\
+%D in color.
+
+\definecolor [texcolorone] [middlered]
+\definecolor [texcolortwo] [middlegreen]
+\definecolor [texcolorthree] [middleblue]
+\definecolor [texcolorfour] [darkyellow]
+
+\endinput
diff --git a/tex/context/base/cont-de.tex b/tex/context/base/cont-de.tex new file mode 100644 index 000000000..df2896b08 --- /dev/null +++ b/tex/context/base/cont-de.tex @@ -0,0 +1,22 @@ +%D \module
+%D [ file=cont-en,
+%D version=1997.08.19,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ German Format Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\catcode`\{=1
+\catcode`\}=2
+
+\def\defaultinterface{german}
+
+\input context.tex
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex new file mode 100644 index 000000000..5720142a5 --- /dev/null +++ b/tex/context/base/cont-en.tex @@ -0,0 +1,22 @@ +%D \module
+%D [ file=cont-en,
+%D version=1997.08.19,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ English Format Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\catcode`\{=1
+\catcode`\}=2
+
+\def\defaultinterface{english}
+
+\input context.tex
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex new file mode 100644 index 000000000..355cd14a3 --- /dev/null +++ b/tex/context/base/cont-log.tex @@ -0,0 +1,108 @@ +%D \module
+%D [ file=cont-log,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=\TEX\ Logos,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+
+\writestatus{loading}{Context TeX Logos}
+
+%D The system that is used to typeset this text is called \TEX,
+%D typeset with an lowered~E. From te beginning of \TEX,
+%D authors of macro packages adapted this raising and lowering
+%D style. In this module we define some of those logos.
+
+\unprotect
+
+\def\TeX%
+ {T%
+ \kern-.1667em\lower.5ex\hbox{E}%
+ \kern-.125emX}
+
+\def\ConTeXt%
+ {C\kern-.0333emO\kern-.0333emN\kern-.0333em\TeX\kern-.0333emT}
+
+\def\PPCHTeX%
+ {PPCH\TeX}
+
+\def\LaTeX%
+ {{L%
+ \kern-.30em\raise.3ex\hbox{\tfxx A}%
+ \kern-.18em\TeX}}
+
+\def\TaBlE%
+ {T%
+ \kern-.27em\lower.5ex\hbox{A}%
+ \kern-.18em B%
+ \kern-.1em\lower.5ex\hbox{L}%
+ \kern-.075em E}
+
+\def\PiCTeX%
+ {P%
+ \kern-.12em\lower.5ex\hbox{I}%
+ \kern-.075em C%
+ \kern-.11em\TeX}
+
+\def\AMSswitch#1%
+ {$\fam2\ifdim\korpsgrootte>1.1em\scriptstyle\fi#1$}
+
+\def\AmSTeX%
+ {\AMSswitch A%
+ \kern-.1667em\lower.5ex\hbox{\AMSswitch M}%
+ \kern-.125em\AMSswitch S%
+ -\TeX}
+
+\def\LamSTeX%
+ {L%
+ \kern-.4em\raise.3ex\hbox{\AMSswitch A}%
+ \kern-.25em\lower.4ex\hbox{\AMSswitch M}%
+ \kern-.1em{\AMSswitch S}%
+ -\TeX}
+
+\def\MetaFont% \hbox prevents missing - warning in YandYTEX
+ {\hbox{\font\logofont=logo10 at \korpsgrootte\logofont METAFONT}}
+
+\def\MetaPost% \hbox prevents missing - warning in YandYTEX
+ {\hbox{\font\logofont=cmss10 at \korpsgrootte\logofont METAPOST}}
+
+%D \macros
+%D {TEX, METAFONT, METAPOST,
+%D PICTEX, TABLE,
+%D CONTEXT, PPCHTEX,
+%D AMSTEX, LATEX, LAMSTEX}
+%D {}
+%D
+%D We define the funny written ones as well as th eless
+%D error prone upper case names (in \CONTEXT\ we tend to
+%D write all user defined commands, like abbreviations, in
+%D uppercase.)
+
+\def\METAFONT {\MetaFont}
+\def\METAPOST {\MetaPost}
+\def\PPCHTEX {\PPCHTeX}
+\def\CONTEXT {\ConTeXt}
+
+\def\TEX {\TeX}
+\def\LATEX {\LaTeX}
+\def\PICTEX {\PiCTeX}
+\def\TABLE {\TaBlE}
+\def\AMSTEX {\AmSTeX}
+\def\LAMSTEX {\LamSTeX}
+
+%D And this is how they show up: \TeX, \MetaFont, \MetaPost,
+%D \PiCTeX, \TaBlE, \ConTeXt, \PPCHTeX, \AmSTeX, \LaTeX,
+%D \LamSTeX. We also define some logos for the programs that
+%D we wrote and use at \PRAGMA: \TeX EDIT, \TeX FORM, \TeX
+%D ADRES, \TeX SPELL, \TeX UTIL.
+
+\def\TEXEDIT {\TeX EDIT}
+\def\TEXFORM {\TeX FORM}
+\def\TEXADRES {\TeX ADRES}
+\def\TEXSPELL {\TeX SPELL}
+\def\TEXUTIL {\TeX UTIL}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/cont-nl.tex b/tex/context/base/cont-nl.tex new file mode 100644 index 000000000..d8a2a602e --- /dev/null +++ b/tex/context/base/cont-nl.tex @@ -0,0 +1,22 @@ +%D \module
+%D [ file=cont-en,
+%D version=1997.08.19,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ Dutch Format Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\catcode`\{=1
+\catcode`\}=2
+
+\def\defaultinterface{dutch}
+
+\input context.tex
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/cont-usr.tex b/tex/context/base/cont-usr.tex new file mode 100644 index 000000000..8cb6d7a11 --- /dev/null +++ b/tex/context/base/cont-usr.tex @@ -0,0 +1,51 @@ +%D \module
+%D [ file=cont-usr,
+%D version=1997.10.05,
+%D title=\CONTEXT\ User Format Specifications,
+%D subtitle=System Specific Setups,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D In this file users can specify what hyphenation patterns
+%D they want to load into the format file.
+
+\unprotect
+
+% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans
+% \installlanguage [\s!da] [\c!status=\v!start] % danish
+ \installlanguage [\s!de] [\c!status=\v!start] % german
+ \installlanguage [\s!en] [\c!status=\v!start] % english
+% \installlanguage [\s!fi] [\c!status=\v!start] % finnish
+ \installlanguage [\s!fr] [\c!status=\v!start] % french
+% \installlanguage [\s!it] [\c!status=\v!start] % italian
+ \installlanguage [\s!nl] [\c!status=\v!start] % dutch
+% \installlanguage [\s!no] [\c!status=\v!start] % norwegian
+% \installlanguage [\s!pl] [\c!status=\v!start] % polish
+% \installlanguage [\s!pt] [\c!status=\v!start] % portuguese
+% \installlanguage [\s!sp] [\c!status=\v!start] % spanish
+% \installlanguage [\s!sv] [\c!status=\v!start] % swedish
+% \installlanguage [\s!tr] [\c!status=\v!start] % turkish
+
+% \appendtoks \language[\s!nl]\to \everyjob
+% \appendtoks \language[\s!en]\to \everyjob
+% \appendtoks \language[\s!de]\to \everyjob
+% \appendtoks \language[\s!fr]\to \everyjob
+% \appendtoks \language[\s!sp]\to \everyjob
+% \appendtoks \language[\s!it]\to \everyjob
+% \appendtoks \language[\s!da]\to \everyjob
+% \appendtoks \language[\s!pt]\to \everyjob
+% \appendtoks \language[\s!sv]\to \everyjob
+% \appendtoks \language[\s!pl]\to \everyjob
+% \appendtoks \language[\s!fi]\to \everyjob
+% \appendtoks \language[\s!af]\to \everyjob
+% \appendtoks \language[\s!no]\to \everyjob
+% \appendtoks \language[\s!tr]\to \everyjob
+
+\appendtoks \mainlanguage[\currentlanguage] \to \everyjob
+
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/context.rme b/tex/context/base/context.rme new file mode 100644 index 000000000..553088fdc --- /dev/null +++ b/tex/context/base/context.rme @@ -0,0 +1,48 @@ +There are currently three interfaces available:
+
+ cont-en the english version
+ cont-de the german version
+ cont-nl the dutch version
+
+One should compile one of these (or all) into a fmt file.
+When one uses the main file,
+
+ context the undefined version
+
+TeX ask for an interface language as well as a message
+language. Here one has to specify the full name (english,
+german, dutch) or use the default (enter).
+
+By default only the english hyphenation patterns are loaded,
+unless more are enabled in:
+
+ cont-usr the typesetting language specifications
+
+Furthermore, users can preset commands etc in the file
+
+ cont-sys a system file loaded at runtime
+
+For questions and remarks on ConTeXt, one can subscribe to
+the list:
+
+ ntg-context@ntg.nl
+
+by sending the message
+
+ subscribe ntg-context
+
+to the list server:
+
+ majordomo@ntg.nl
+
+One can find more info at:
+
+ www.ntg.nl/context
+
+or on CTAN in the ConTeXt directory.
+
+Don't hesitate to ask questions. ConTeXt can do a lot, and
+the manuals are always way behind and incomplete.
+
+Hans Hagen
+pragma@pi.net
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex new file mode 100644 index 000000000..b36a02f78 --- /dev/null +++ b/tex/context/base/context.tex @@ -0,0 +1,150 @@ +%D \module
+%D [ file=context,
+%D version=1995.10.10,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ Format Generation,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Welcome to the main module. When this module is ran through
+%D \type{initex} or \type{tex -i} or \type{whatevertex} using
+%D \type{whatever switch}, the \CONTEXT\ format file is
+%D generated. During this process the user is asked for an
+%D interface language. Supplying \type{dutch} will generate a
+%D dutch version of \CONTEXT, supplying \type{english} will of
+%D course end op in a english version.
+%D
+%D First we load the system modules. These implement a lot of
+%D manipulation macros. The first one loads \PLAIN\ \TEX, as
+%D minimal as possible.
+
+\input syst-tex.tex
+\input syst-gen.tex
+\input syst-ext.tex
+\input syst-new.tex
+
+%D After this we're ready for the multi||lingual interface
+%D modules.
+
+\input mult-ini.tex
+\input mult-sys.tex
+\input mult-con.tex
+\input mult-com.tex
+
+%D Now we're ready for some general support modules. These
+%D modules implement some basic typesetting functionality.
+
+\input supp-ini.tex
+\input supp-fil.tex
+\input supp-ver.tex
+\input supp-box.tex
+\input supp-mrk.tex
+\input supp-vis.tex
+\input supp-mul.tex
+\input supp-fun.tex
+\input supp-pdf.tex
+\input supp-spe.tex
+\input supp-mps.tex
+\input supp-tpi.tex
+
+%D \CONTEXT\ does not implement its own table handling. We
+%D just go for the best there is and load \TABLE. Just to be
+%D sure we do it here, before we redefine \type{|}.
+
+\doinputonce{table}
+
+%D Here comes the last support module.
+
+\input supp-lan.tex
+
+%D The next three modules do what their names state. They
+%D load additional definition modules when needed.
+
+\input lang-ini.tex
+\input spec-ini.tex
+\input colo-ini.tex
+
+%D For the moment we load a lot of languages. In the future
+%D we'll have to be more space conservative.
+
+\input lang-lab.tex
+
+\input lang-alt.tex
+\input lang-ana.tex
+\input lang-art.tex
+\input lang-bal.tex
+\input lang-cel.tex
+\input lang-ger.tex
+\input lang-grk.tex
+\input lang-hnl.tex
+\input lang-ind.tex
+\input lang-ita.tex
+\input lang-sla.tex
+\input lang-ura.tex
+
+%D The special modules need some additional macro's:
+
+\input spec-mis.tex
+
+%D Next we load some core macro's. These implement the
+%D macros' that are seen by the users.
+
+\input core-gen.tex
+\input core-mak.tex
+\input core-fil.tex
+\input core-ver.tex
+\input core-vis.tex
+\input core-con.tex
+\input core-rul.tex
+\input core-tab.tex
+\input core-fil.tex
+\input core-01a.tex
+
+%D Of course we do need fonts. There are no \TFM\ files
+%D loaded yet, so the format file is independant of their
+%D content. Here we also redefine \type{\it} as {\it italic}
+%D instead of italian.
+
+\input font-ini.tex
+
+%D Now we're ready for more core modules.
+
+\input core-fnt.tex
+\input core-not.tex
+
+\input core-01b.tex
+\input core-01c.tex
+\input core-01d.tex
+\input core-01e.tex
+
+\input core-02a.tex
+\input core-02b.tex
+% core-02c.tex
+\input core-02d.tex
+
+%D Except from english, no hyphenation pattersn are loaded
+%D yet. Users can specify their needs in the next module:
+
+\input cont-usr.tex
+
+%D The next two modules implement some additional
+%D functionality concenring classes of documents and output.
+%D These modules probably will be replaced some day.
+
+\input docs-ini.tex
+\input list-ini.tex
+
+%D \TEX\ related logo's are always typeset in a special way.
+%D Here they come:
+
+\input cont-log.tex
+
+%D Dumping the format is all that's left to be done.
+
+\dump
+
\ No newline at end of file diff --git a/tex/context/base/core-01a.tex b/tex/context/base/core-01a.tex new file mode 100644 index 000000000..263c6d982 --- /dev/null +++ b/tex/context/base/core-01a.tex @@ -0,0 +1,15745 @@ +%D \module
+%D [ file=core-01a,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=1A (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% \ifinfloat \ifinpagebody \ifintable \ifincolumns etc naar
+% core-sta(tus)
+
+% nieuw/nb:
+%
+% in handleiding: eerste in set float [hier..] telt!
+% [hier,altijd] en niet [altijd,hier]
+%
+% \switchnaarkorps[globaal] voor bv grote figuren in klein
+% \interactiebuttons[][]
+% lijstalternatieven: e, f,g
+% \lastreference
+
+% kopletter: letter=,tekstletter=\bfa,nummerletter=\bf (anders ook \bfa)
+
+% in handleiding vermelden dat \definieerinteractiemenu 3 args behoeft!
+% in handleiding: \steloffsetin vervangen door \stellayoutin
+% in handleiding: \stellayoutin optie [markering=aan]
+% in handleiding: \stellayoutin schaalt naar paginamaten
+% in handleiding: \stellayoutin optie [plaats=midden|..zijdig]
+% in handleiding: \stelinteractieschermin optie [..wit=, ..=passend]
+% in handleiding: \stelinteractieschermin optie [..offset=, ..=passend]
+% in handleiding: \definieerpapierformaat [A3,S3456][..]
+% in handleiding: \stellayoutin optie [breedte|hoogte=passend]
+% in handleiding: meer achtergrond opties
+% in handleiding: \stelregelsin[inspringen=ja,nee,even,oneven]
+% in handleiding: \stelkolommenin[optie=achtergrond]
+% in handleiding: \omlijnd[breedte=passend,uitlijnen=midden] (auto mode)
+% in handleiding: \omlijnd[achtergrondcommando ...]
+% in handleiding: \stelhoofdin[status=hoog]
+% in handleiding: \stellijstin[koppeling=aan] % interactieve optie, was standaard aan, nu uit
+% in handleiding: \stelvoetin[voor=,na=,strut=]
+% in handleiding: \stelmenuin[][links=,rechts=,midden=,voor=,...]
+
+% in handleiding: \definecolorgroup[a][b]
+% \stelinteractiebalkin[symbool=ja|nee]
+% \stelinteractiemenuin[zelfdepagina|onbekendeverwijzing=ja|nee|leeg|geen]
+% \definieerconversie[aa][*,**,***]
+% \stelkopin[eigennummer=ja]
+
+% in handleiding: \definieeroverlay[naam]{commando}
+% in handleiding: \plaatsonderelkaar
+%
+% in handleiding preview bij figuren
+
+% nb: als subpage: dan ook op eerste pag nummer ophogen (i.g.v. \standaardopmaak)
+% execute command interactive commands
+
+% \stelsubpaginanummerin[reset]
+% \bepaallijstkenmerken
+% \bepaalregisterkenmerken
+
+% in handleiding cmyk/rgb/k
+% in handleiding: \raggedright etc fontswitch afhankelijk (em)
+
+\newevery \everycorps \EveryCorps % just to be sure
+
+\appendtoks \setnormalbaselines \to \everycorps
+\appendtoks \setstrut \to \everycorps
+\appendtoks \settopskip \to \everycorps
+\appendtoks \setmaxdepth \to \everycorps
+\appendtoks \stelinspringenin \to \everycorps
+\appendtoks \stelblankoin \to \everycorps
+\appendtoks \stelwitruimtein \to \everycorps
+
+% \appendtoks .. \to \everypar
+% \appendtoks .. \to \everypar
+% \appendtoks .. \to \everypar
+
+% kan elders ook worden gebruikt i.i.g ongeveer
+% \v!tekst EN \c!tekst etc checken
+
+\unprotect
+
+\def\gobbleassigndimen#1\\{}
+
+\def\assigndimen#1#2%
+ {\afterassignment\gobbleassigndimen#1=#2\!!zeropoint\\}
+
+\protect
+
+\writestatus{loading}{Context Core Macros (a)}
+
+\unprotect
+
+\startmessages dutch library: systems
+ title: systeem
+ 1: laden hulpfile uitgesteld (typemode)
+ 2: -- geladen
+ 3: probeer LaTeX eens
+ 4: commando -- is al gedefinieerd
+ 5: macro's uit -- geladen
+ 6: geen macro's in -- gevonden
+ 7: macro's uit -- reeds geladen
+ 8: nieuwe versie hulpfile, tweede run nodig
+ 9: -- niet gevonden/geplaatst
+ 10: gebruik geen em in --
+ 11: aanmaken basale hulpfile
+ 12: de hulpfile is niet gesorteerd, gebruik texutil
+ 13: markering -- gedefinieerd --
+ 14: geforceerde paginaovergang in lijst voor --
+ 15: wegschrijven buffer --
+ 16: inlezen buffer --
+ 17: verbatim inlezen buffer --
+ 18: synoniem -- -- bestaat niet
+ 19: betekenissen (synoniemen) van -- geladen
+ 20: betekenissen (sorteren) van -- geladen
+\stopmessages
+
+\startmessages english library: systems
+ title: system
+ 1: loading utility-file postponed (typemode)
+ 2: -- loaded
+ 3: try LaTeX
+ 4: command -- is already defined
+ 5: macros of -- loaded
+ 6: no macros found in --
+ 7: macros of -- already loaded
+ 8: new version of utility file, second pass needed
+ 9: -- not found/processed
+ 10: don't use em in --
+ 11: building simple utility-file
+ 12: the utility-file is not sorted, use texutil
+ 13: mark -- defined --
+ 14: forced newpage in list at --
+ 15: saving buffer --
+ 16: typesetting buffer --
+ 17: typesetting verbatim buffer --
+ 18: synonym -- -- does not exist
+ 19: meaning (synonyms) of -- loaded
+ 20: meaning (sorts) of -- loaded
+\stopmessages
+
+\startmessages german library: systems
+ title: system
+ 1: Laden der Hilfsdatei verschoben (tippenmodus)
+ 2: -- geladen
+ 3: Versuche LaTeX
+ 4: Befehl -- ist bereits definiert
+ 5: Makros in -- geladen
+ 6: Keine Makros in -- gefunden
+ 7: Makros in -- bereits geladen
+ 8: Neue Version der Hilfsdatei, zweiter Durchlauf benoetigt
+ 9: -- nicht gefunden/verarbeitet
+ 10: Benutzte kein em in --
+ 11: Erstelle einfache Hilfdatei
+ 12: Die Hilfdatei ist nicht sortiert, verwende texutil
+ 13: Beschriftung -- definiert --
+ 14: Erzwungendes Seitenumbruch in Liste bei --
+ 15: Speichere Buffer --
+ 16: Setzte Buffer --
+ 17: Setzte tippen-Buffer --
+ 18: Synonym -- -- existiert nicht
+ 19: Bedeutung (synonyme) von -- geladen
+ 20: Bedeutung (sortieren) von -- geladen
+\stopmessages
+
+\startmessages dutch library: references
+ title: verwijzingen
+ 1: verwijzing -- onbekend
+ 2: dubbele verwijzing -- op pagina --
+\stopmessages
+
+\startmessages english library: references
+ title: references
+ 1: unknown reference --
+ 2: duplicate reference -- on page --
+\stopmessages
+
+\startmessages german library: references
+ title: referenzen
+ 1: unbekannte Referenz --
+ 2: doppelte Referenz -- auf Seite --
+\stopmessages
+
+\startmessages dutch library: textblocks
+ title: tekstblokken
+ 1: nieuwe versie, tweede run nodig
+ 2: wegschrijven blokken naar --
+ 3: inlezen blokken uit --
+ 4: er is een tweede run nodig
+ 5: -- niet verborgen
+ 6: -- verborgen en verwerkt
+ 7: -- verborgen
+ 8: -- gehandhaafd
+ 9: -- niet gehandhaafd
+ 10: -- geladen en verwerkt
+ 11: -- geladen en geplaatst
+ 12: -- overgeslagen
+\stopmessages
+
+\startmessages english library: textblocks
+ title: textblocks
+ 1: new version, second pass needed
+ 2: writing blocks to --
+ 3: reading blocks from --
+ 4: second pass needed
+ 5: -- not hidden
+ 6: -- hidden and processed
+ 7: -- hidden
+ 8: -- typeset
+ 9: -- not typeset
+ 10: -- loaded and processed
+ 11: -- loaded and typeset
+ 12: -- skipped
+\stopmessages
+
+\startmessages german library: textblocks
+ title: textblock
+ 1: neue Version, zweiter Durchlauf benoetigt
+ 2: schreibe Bloecke zu --
+ 3: lese Bloecke von --
+ 4: zweiter Durchlauf benoetigt
+ 5: -- nicht verborgen
+ 6: -- verborgen und verarbeitet
+ 7: -- verborgen
+ 8: -- gesetzt
+ 9: -- nicht gesetzt
+ 10: -- geladen und verarbeitet
+ 11: -- geladen und gesetzt
+ 12: -- ausgelassen
+\stopmessages
+
+\startmessages dutch library: floatblocks
+ title: plaatsblokken
+ 1: -- hernummerd / -- => --
+ 2: -- bewaard
+ 3: -- verplaatst
+ 4: -- geplaatst
+ 5: volgorde aangepast
+ 6: maximaal -- boven
+ 7: maximaal -- onder
+ 8: minder dan -- regels
+ 9: volgorde verstoord
+ 10: -- begrensd
+ 11: geen blok opgegeven
+ 12: niet gedefinieerd
+\stopmessages
+
+\startmessages english library: floatblocks
+ title: floatblocks
+ 1: -- renumbered / -- => --
+ 2: -- saved
+ 3: -- moved
+ 4: -- placed
+ 5: order adapted
+ 6: n of top floats limited to --
+ 7: n of bottom floats limited to --
+ 8: less than -- lines
+ 9: order disturbed
+ 10: -- limited
+ 11: no block given
+ 12: undefined
+\stopmessages
+
+\startmessages german library: floatblocks
+ title: Gleitobjektbloecke
+ 1: -- neu nummeriert / -- => --
+ 2: -- gespeichert
+ 3: -- verschoben
+ 4: -- plaziert
+ 5: Reihenfolge angepasst
+ 6: Anz. der oberen Gleitobjekte beschraengt auf --
+ 7: Anz. der unteren Gleitobjekte beschraengt auf --
+ 8: weniger als -- zeilen
+ 9: Reigenfolge gestoert
+ 10: -- begrenzt
+ 11: kein Block gegeben
+ 12: undefiniert
+\stopmessages
+
+\startmessages dutch library: layouts
+ title: layout
+ 1: teksthoogte aangepast met -- op pagina --
+ 2: -- maal uitgestelde tekst tussengevoegd
+ 3: -- maal tekst plaatsen uitstellen
+ 4: margeblokken actief
+ 5: margeblokken inactief
+ 6: subpagina reeks -- verwerkt (aantal --)
+ 7: beeldmerken berekenen
+ 8: achtergronden berekenen
+ 9: momenteen maximaal -- niveaus in opsommingen
+\stopmessages
+
+\startmessages english library: layouts
+ title: layout
+ 1: textheight adapted with -- at page --
+ 2: -- times postponed text placed
+ 3: -- times text postponed
+ 4: marginblocks active
+ 5: marginblocks inactive
+ 6: subpage set -- processed (size --)
+ 7: calculating logospace
+ 8: calculating backgrounds
+ 9: currently no more than -- levels in itimezations
+\stopmessages
+
+\startmessages german library: layouts
+ title: Layout
+ 1: Texthoehe angepasst mit -- auf Seite --
+ 2: -- mal verschobener Text plaziert
+ 3: -- mal Text verschoben
+ 4: marginalbloecke aktiv
+ 5: marginalbloecke inaktiv
+ 6: Unterseitenfolge -- verarbeitet (Groesse --)
+ 7: berechne Platz des Logo
+ 8: berechne Hintergrund
+ 9: z.Z. nicht mehr als -- Niveaus in Posten
+\stopmessages
+
+\startmessages dutch library: structures
+ title: structuur
+ 1: begin van sectieblok --
+ 2: eind van sectieblok --
+\stopmessages
+
+\startmessages english library: structures
+ title: structure
+ 1: begin of sectionblock --
+ 2: end of sectionblock --
+\stopmessages
+
+\startmessages german library: structures
+ title: struktur
+ 1: Begin des Abschnittsblock --
+ 2: Ende des Abschnittsblock --
+\stopmessages
+
+\CONTEXTtrue % Now we know that we can use ConTeXt commands.
+
+% \def\teststatus{stop}
+%
+% \def\doiftrue {\iftrue}
+% \def\doiffalse {\iffalse}
+%
+% \def\setstatus#1#2%
+% {\doifelse{\getvalue{#1\c!status}}{\v!start}
+% {\let#2=\doiftrue}
+% {\let#2=\doiffalse}}
+%
+% \setstatus{test}\iftest
+%
+% \iftest
+% \message{JA}
+% \else
+% \message{NEE}
+% \fi
+
+% om problemen te voorkomen:
+%
+% \ascii => \@@ascii@@
+% \asciiA => \@@ascii@@A
+% \asciiB => \@@ascii@@B
+
+% Nodig i.v.m. inspringen eerste alineas
+
+\def\explicithmode%
+ {\unhbox\voidb@x}
+
+% Nodig voor gebruikers
+
+\def\geentest{\donottest}
+
+% Dit moet nog ergens een plaats krijgen:
+
+\def\stelfactorenin%
+ {\stelwitruimtein
+ \stelblankoin
+ \settopskip
+ \setmaxdepth}
+
+% Nog doen:
+%
+% \goodbreak -> \allowbreak en \dosomebreak{..} in koppen
+%
+% bij koppen zowieso: \blanko[reset]
+
+% Nog in commando verwerken:
+%
+% \voorkeur … la \blanko
+%
+% Om ongewenste witruimte te voorkomen kan met \dosomebreak{\break}
+% een \penalty v¢¢r witruimte worden geplaatst.
+
+\def\dosomebreak#1%
+ {\skip0=\lastskip
+ \removelastskip
+ %\type{#1}%
+ #1\relax
+ \ifdim\skip0=\!!zeropoint
+ \else
+ \vskip\skip0
+ \fi}
+
+% beter, vooral in \vbox; nog in \pagina toepassen s!
+
+\def\doifoutervmode#1%
+ {\ifvmode\ifinner\else#1\fi\fi}
+
+\def\dosomebreak#1%
+ {\doifoutervmode
+ {\skip0=\lastskip
+ \removelastskip
+ %\leavevmode\type{#1}%
+ #1\relax
+ \ifdim\skip0=\!!zeropoint % else interference with footnotes
+ \else
+ \vskip\skip0
+ \fi}}
+
+% Idem:
+%
+% \springin
+
+%\def\noindentation% vervallen
+% {\EveryPar
+% {\ifdim\parindent=\!!zeropoint
+% \else
+% \bgroup
+% \setbox0=\lastbox
+% \egroup
+% \fi
+% \EveryPar{}}}
+
+\newif\ifindentation \indentationtrue % documenteren, naar buiten
+
+\let\checkindentation=\relax
+
+\def\donoindentation%
+ {\ifdim\parindent=\!!zeropoint
+ \else
+ \bgroup
+ \setbox0=\lastbox
+ \egroup
+ \fi}
+
+\def\noindentation%
+ {\indentationfalse
+ \def\checkindentation%
+ {\donoindentation
+ \let\checkindentation=\indentationtrue}}
+
+\def\indentation%
+ {\ifvmode
+ \ifdim\parindent=\!!zeropoint
+ \else
+ \hskip\parindent
+ \fi
+ \fi}
+
+% vergeten
+
+% \def\forgetall%
+% {\everypar{}% % i.v.m. sidefloats
+% \let\par=\endgraf % i.v.m. getpar etc
+% \stelwitruimtein[\v!geen]%
+% \stelinspringenin[\v!geen]%
+% \leftskip\!!zeropoint
+% \rightskip\!!zeropoint
+% \relax}
+%
+% \def\forgetparindent%
+% {\everypar{}%
+% \voorwit\!!zeropoint % toegevoegd
+% \parindent\!!zeropoint}
+
+\def\forgeteverypar%
+ {\everypar{}}
+
+\def\forgeteverypar%
+ {\everypar{\the\neverypar}}
+
+\def\forgetparindent%
+ {\forgeteverypar
+ \stelinspringenin[\v!geen]}
+
+\def\forgetparskip%
+ {\stelwitruimtein[\v!geen]}
+
+\def\forgetbothskips%
+ {\leftskip\!!zeropoint
+ \rightskip\!!zeropoint\relax}
+
+\def\forgetspacing%
+ {\emergencystretch\!!zeropoint\relax}
+
+\def\forgetall%
+ {\let\par=\endgraf % i.v.m. getpar etc
+ \forgetparskip
+ \forgetparindent
+ \forgetbothskips
+ \forgetspacing} % i.v.m. funny spacing in pagebody
+
+\def\localvbox#1#%
+ {\vbox#1\bgroup
+ \forgetparskip
+ \setlocalhsize
+ \hsize=\localhsize
+ \forgetparindent
+ \forgetbothskips
+ \forgeteverypar
+ \let\next=}
+
+% ach ja
+
+\unexpanded\def\dostartattributes#1%
+ {\begingroup % geen \bgroup, anders in mathmode lege \hbox
+ \doifdefinedelse{#1\c!kleur}
+ {\def\colorattribute{\getvalue{#1\c!kleur}}}
+ {\let\colorattribute=\empty}%
+ \doifdefinedelse{#1\c!letter}
+ {\def\fontattribute{\getvalue{#1\c!letter}}}
+ {\let\fontattribute=\empty}%
+ \startcolor[\colorattribute]%
+ \doconvertfont{\fontattribute}}
+
+\unexpanded\def\dostopattributes%
+ {\stopcolor
+ \endgroup}
+
+\unexpanded\def\doattributes#1#2%
+ {\dostartattributes{#1}{#2}\dostopattributes}
+
+% \dotextprefix{tekst}
+%
+% als {tekst} niet leeg is: tekst~
+
+\def\dotextprefix#1%
+ {\ConvertToConstant\doifnot{#1}{}{#1~}}
+
+\def\herhaal {\dorepeat}
+\def\herhaler {\repeater}
+\def\herhaalmetcommando {\dorepeatwithcommand}
+
+% This permits things like ^\index{hans}^, where hans is
+% duplicated in the text.
+
+\newif\ifduplicate
+
+\bgroup
+\gdef\checkduplication% in line with Knuth
+ {\ifmmode
+ \def\next{^}%
+ \else
+ \let\next=\startduplication
+ \fi
+ \next}
+\gdef\insideduplication%
+ {\ifmmode
+ \def\next{^}%
+ \else
+ \let\next=\egroup
+ \fi
+ \next}
+\catcode`\^=\@@active
+\gdef\enableduplication%
+ {\catcode`\^=\@@active
+ \let^=\checkduplication}
+\gdef\disableduplication%
+ {\catcode`\^=\@@superscript}
+\gdef\startduplication%
+ {\bgroup
+ \duplicatetrue
+ \let^=\insideduplication}
+\egroup
+
+\def\verbatim#1%
+ {\convertargument#1\to\ascii\ascii}
+
+% mogelijke optimalisaties:
+%
+% \ifx ...\else ...\fi
+% \ifvisible ... \fi
+
+% De opbouw van deze file
+%
+% Deze file bevat naast de verschillende Pragma-Macro's ook
+% helpinformatie bij deze macro's en templates. Een blok
+% helpinformatie wordt gekenmerkt door een %I.
+%
+% Een blok kan zijn opgedeeld in pagina's. In dat geval is
+% %I vervangen door %P. De eerste regel van een blok bevat
+% de titel van de informatie.
+%
+% Een template (voorgedefinieerde structuur) wordt gekenmerkt
+% door %T. Ook hier bevat de eerste regel een titel,
+% eventueel gevolgd door een mnemonic.
+%
+% Zowel de helpinformatie als de templates zijn in het
+% programma TeXEdit oproepbaar.
+%
+% Het programma TeXEdit kan t.z.t. worden ingesteld met
+% behulp van de onderstaande, door %S voorafgegane,
+% setupcommando's. Vooralsnog is een en ander 'hard' in het
+% programma geprogrammeerd.
+
+%S InputFile \input
+%S InputFile \omgeving \environment
+%S InputFile \projekt \project
+%S InputFile \produkt \product
+%S InputFile \onderdeel \component
+%S
+%S CheckStrings \start \stop
+%S CheckStrings \begin \end
+%S CheckStrings \begin \eind
+%S
+%S CheckChars { }
+%S CheckChars [ ]
+%S CheckChars ( )
+%S
+%S CheckChar $
+
+% Het <pagina>-karakter (FormFeed), wordt omgezet in \par
+
+\edef\oldlinefeed{\the\catcode`\^^L}
+
+\catcode`\^^L=\oldlinefeed
+
+\catcode`\^^L=\@@endofline
+
+%I n=Struts
+%I c=\strut,\setnostrut,\setstrut,\toonstruts
+%I
+%I Struts zijn onzichtbare 'karakters' met alleen een hoogte
+%I en diepte. De volgende commando's hebben betrekking op
+%I struts
+%I
+%I \strut
+%I \setstrut
+%I \setnostrut
+%I \toonstruts
+
+\def\toonstruts%
+ {\setteststrut}
+
+% Hieronder volgen enkele instellingen en macro's ten behoeve
+% van de interlinie en \strut. De waarden 2.8, 0.07, 0.72 en
+% 0.28 zijn ooit eens ontleend aan INRS-TEX en moeten wellicht
+% nog eens instelbaar worden.
+%
+% \lineheight : de hoogte van een regel
+% \spacing{getal} : instellen interlinie
+% \normalbaselines : instellen regelafstend
+%
+% \setstrut : instellen \strut
+% \setnostrut : resetten \strut, \endstrut, \begstrut
+%
+% \setteststrut : instellen zichtbare struts
+% \resetteststrut : instellen onzichtbare struts
+%
+% \setfontparameters : instellen na fontset
+%
+% De hoogte van een regel (\lineheight) is gelijk aan de
+% som van de hoogte (\ht) en diepte (\dp) van \strutbox.
+%
+% \strut : denkbeeldig blokje met hoogte en diepte
+%
+% Een \hbox kan als deze aan het begin van een regel staat
+% een breedte \hsize krijgen. Dit is soms te voorkomen met het
+% commando \leavevmode. Binnen een \vbox geeft dit echter
+% niet altijd het gewenste resultaat, vandaar het commando
+%
+% \leaveoutervmode
+
+% Pas op: niet zomaar \topskip en \baselineskip aanpassen
+% en zeker niet \widowpenalty. Dit kan ernstige gevolgen
+% hebben voor kolommen.
+%
+% Enige glue kan op zich geen kwaad, echter als blanko=vast,
+% dan moet ook de rek 0 zijn. Binnen kolommen is rek ook
+% niet bepaald mooi. Een hele kleine waarde (0.025) voldoet,
+% omdat een positieve glue eindeloos rekbaar is.
+
+\newdimen\strutdimen
+\newdimen\lineheight
+\newdimen\openlineheight
+
+\def\strutheightfactor {.72}
+\def\strutdepthfactor {.28}
+
+\def\baselinefactor {2.8}
+\def\baselinegluefactor {0}
+
+\def\normallineheight {\baselinefactor ex}
+
+\def\strutheight {0pt}
+\def\strutdepth {0pt}
+\def\strutwidth {0pt}
+
+\def\spacingfactor {1}
+
+\def\topskipfactor {1.0}
+\def\maxdepthfactor {0.4}
+
+\let\systemtopskipfactor = \topskipfactor
+\let\systemmaxdepthfactor = \maxdepthfactor
+
+% De onderstaande definitie wordt in de font-module overruled
+
+\ifx\globalcorpssize\undefined
+ \newdimen\globalcorpssize \globalcorpssize=12pt
+\fi
+
+% door een \dimen. Dit is geen probleem omdat (1) de default
+% korpsgrootte 12pt is en (2) de fonts nog niet geladen zijn
+% en de instellingen bij het laden nogmaals plaatsvinden.
+
+\def\settopskip%
+ {\topskip=
+ \systemtopskipfactor\globalcorpssize
+ \ifr@ggedbottom\!!plus5\globalcorpssize\fi
+ \relax}
+
+\def\setmaxdepth%
+ {\maxdepth=\systemmaxdepthfactor\globalcorpssize}
+
+\def\normalbaselines%
+ {\baselineskip\normalbaselineskip
+ \lineskip\normallineskip
+ \lineskiplimit\normallineskiplimit}
+
+\def\setnormalbaselines%
+ {\lineheight=\normallineheight
+ \openlineheight=\spacingfactor\lineheight
+ \normalbaselineskip=
+ \openlineheight
+ \!!plus\baselinegluefactor\openlineheight
+ \!!minus\baselinegluefactor\openlineheight
+ \normallineskip\!!onepoint\relax
+ \normallineskiplimit\!!zeropoint\relax
+ \normalbaselines}
+
+\def\setspacingfactor#1\to#2\by#3\\%
+ {\strutdimen=#2pt\relax
+ \strutdimen=#3\strutdimen
+ \edef#1{\withoutpt{\the\strutdimen}}}
+
+\def\spacing#1%
+ {\edef\spacingfactor{#1}%
+ \setspacingfactor\systemtopskipfactor\to\topskipfactor\by#1\\%
+ \setspacingfactor\systemmaxdepthfactor\to\maxdepthfactor\by#1\\%
+ \setnormalbaselines
+ \setstrut}
+
+\def\setstrutdimen#1#2#3% % een strut is n.m maal ex
+ {\strutdimen=\normallineheight % wat niet per se \lineheight
+ \strutdimen=#2\strutdimen % is omdat een strut lokaal
+ \strutdimen=#3\strutdimen % kan afwijken van de globale
+ \edef#1{\the\strutdimen}} % strut
+
+\let\normalstrut=\strut
+
+% The double \hbox construction enables us to \backtrack
+% boxes.
+
+\def\setstrut%
+ {\setstrutdimen\strutheight\strutheightfactor\spacingfactor
+ \setstrutdimen\strutdepth\strutdepthfactor\spacingfactor
+ \let\strut=\normalstrut
+ \setbox\strutbox=\normalhbox
+ {\normalhbox
+ {\vrule
+ \!!width \strutwidth
+ \!!height \strutheight
+ \!!depth \strutdepth
+ \kern-\strutwidth}}}
+
+\def\setteststrut%
+ {\def\strutwidth{.8pt}%
+ \setstrut}
+
+\def\begstrut%
+ {\ifdim\ht\strutbox=\!!zeropoint\relax\else
+ \strut
+ \normalpenalty\!!tenthousand
+ \normalhskip\!!zeropoint
+ \ignorespaces
+ \fi}
+
+\def\endstrut%
+ {\ifdim\ht\strutbox=\!!zeropoint\relax\else
+ \unskip
+ \normalpenalty\!!tenthousand
+ \normalhskip\!!zeropoint
+ \strut
+ \fi}
+
+\def\setnostrut%
+ {\setbox\strutbox=\normalhbox{\normalhbox{}}%
+ \def\strut{}%
+ \def\endstrut{}%
+ \def\begstrut{}}
+
+\def\resetteststrut%
+ {\let\strutwidth=\!!zeropoint
+ \setstrut}
+
+\def\setfontparameters%
+ {\the\everycorps}
+
+% \setnormalbaselines
+% \setstrut
+% \settopskip
+% \setmaxdepth
+% \the\EveryFontSwitch
+
+\newskip\oldbaselineskip
+\newskip\oldlineskip
+\newskip\oldlineskiplimit
+
+\newif\ifinterlineskipoff
+
+\def\offinterlineskip%
+ {\ifinterlineskipoff\else
+ \interlineskipofftrue
+ \oldbaselineskip=\baselineskip
+ \oldlineskip=\lineskip
+ \oldlineskiplimit=\lineskiplimit
+ \fi
+ \baselineskip-1000\p@ % knuth's value
+ \lineskip\z@ % knuth's value
+ \lineskiplimit\maxdimen} % knuth's value
+
+\def\oninterlineskip%
+ {\ifinterlineskipoff
+ \baselineskip=\oldbaselineskip
+ \lineskip=\oldlineskip
+ \lineskiplimit=\oldlineskiplimit
+ \fi}
+
+\def\leaveoutervmode%
+ {\ifvmode\ifinner\else
+ \leavevmode
+ \fi\fi}
+
+%D \macros
+%D {getnoflines}
+%D {}
+%D
+%D Het commando \type{\getnoflines} converteert een hoogte
+%D (dimensie) in een aantal regels en kent dit toe aan
+%D \type{\noflines}.
+%D
+%D \starttypen
+%D \getnoflines{dimensie}
+%D \stoptypen
+%D
+%D Er wordt gedeeld door \type{\openlineheight} en een hoogte
+%D van~0pt komt overeen met 0~regels.
+
+\newcount\noflines
+
+\def\getnoflines#1%
+ {\dimen0=#1\relax
+ \ifdim\dimen0=\!!zeropoint\relax
+ \noflines=0\relax
+ \else
+ \divide\dimen0 by \openlineheight
+ \noflines=\dimen0
+ \advance\noflines by 1\relax
+ \fi}
+
+
+% We passen ook de \displayskip's wat aan (nog eens uitzoeken):
+
+\def\displayskipsize#1#2%
+ {#1\lineheight\!!plus#2\lineheight\!!minus#2\lineheight}
+
+\def\displayskipfactor {1.0}
+\def\displayshortskipfactor {0.8}
+
+\def\displayskipgluefactor {0.3}
+\def\displayshortskipgluefactor {0.2}
+
+\def\abovedisplayskipsize% doet niets ?
+ {\displayskipsize\displayskipfactor\displayskipgluefactor}
+
+\def\belowdisplayskipsize% doet niets ?
+ {\displayskipsize\displayskipfactor\displayskipgluefactor}
+
+\def\abovedisplayshortskipsize%
+ {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor}
+
+\def\belowdisplayshortskipsize%
+ {\displayskipsize\displayshortskipfactor\displayshortskipgluefactor}
+
+\def\setdisplayskip#1#2#3%
+ {#1=#2\relax
+ \advance#1 by -\parskip
+ \advance#1 by -#3\relax}
+
+\def\setdisplayskips%
+ {\setdisplayskip\abovedisplayskip\abovedisplayskipsize\baselineskip
+ \setdisplayskip\belowdisplayskip\belowdisplayskipsize\!!zeropoint
+ \setdisplayskip\abovedisplayshortskip\abovedisplayshortskipsize\baselineskip
+ \setdisplayskip\belowdisplayshortskip\belowdisplayshortskipsize\!!zeropoint}
+
+% We stellen enkele penalties anders in dan Plain TEX:
+
+\widowpenalty=2000 % was: 1000
+\clubpenalty=2000 % was: 800
+
+% Bovendien definieren we enkele extra \fill's:
+
+\def\hfilll%
+ {\hskip\!!zeropoint\!!plus1filll}
+
+\def\vfilll%
+ {\vskip\!!zeropoint\!!plus1filll}
+
+% De onderstaande hulpmacro's moeten nog eens instelbaar worden
+% gemaakt.
+
+\def\tfskipsize{1em\relax}
+
+\def\tfkernsize{1ex\relax}
+
+\def\tfskip%
+ {{\tf\hskip\tfskipsize}}
+
+\def\tfkern%
+ {{\tf\kern\tfkernsize}}
+
+% Dit hoort eigenlijk thuis onder het kopje boodschappen cq,
+% meldingen.
+
+\def\mindermeldingen%
+ {\hbadness=10000
+ \hfuzz=\maxdimen
+ \vbadness=10000
+ \vfuzz=\maxdimen}
+
+% Utility-file
+%
+% De onderstaande macro's ondersteunen het gebruik van de
+% zogeheten utility-file. Alle extern onder te brengen
+% informatie wordt opgeslagen in de file \jobname.tui, tenzij
+% er selectief pagina's worden gezet. In dat geval wordt de
+% file \jobname.tmp gebruikt. Informatie wordt ingelezen uit
+% de file \jobname.tuo, welke door TeXUtil wordt aangemaakt.
+
+% Bepaalde commando's worden als string weggeschreven. Deze
+% zijn aan het eind van deze file gedefinieerd.
+
+% Om een opbouw van spaties te voorkomen (???) moet ^^M een
+% andere betekenis krijgen:
+%
+% \catcode`\^^M=14 (comment)
+%
+% read file
+%
+% \catcode`\^^M=5 (end of line)
+
+\newwrite\uti
+\newif\ifutilitydone
+
+\def\@@utilityerrormessage%
+ {\showmessage{\m!systems}{8}{}%
+ \global\let\@@utilityerrormessage=\relax}
+
+\def\thisisutilityversion#1%
+ {\doifnot{\utilityversion}{#1}%
+ {\@@utilityerrormessage
+ \resetutilities
+ \endinput}}
+
+\def\writeutilitycommand#1%
+ {\write\uti{c \string#1}}
+
+\def\openutilities%
+ {\immediate\openout\uti=\jobname
+ \ifselecteren
+ .\f!temporaryextension
+ \else
+ .\f!inputextension
+ \fi
+ \immediate\writeutilitycommand%
+ {\thisisutilityversion{\utilityversion}}}
+
+\def\closeutilities%
+ {\savenofsubpages
+ \savenofpages
+ \immediate\closeout\uti}
+
+\def\utilityresetlist{}
+
+\def\addutilityreset#1%
+ {\addtocommalist{\s!reset#1}\utilityresetlist}
+
+\def\resetutilities%
+ {\processcommacommand[\utilityresetlist]\getvalue}
+
+% #1=type
+% #2=file
+% #3=melding
+
+% #4=voor
+% #5=na
+
+% Er wordt gegroepeerd. Als binnen een lijst (bijvoorbeeld) de
+% \leftskip is aangepast, maar nog geen \par is gegeven, dan
+% geldt buiten de groep de oude \leftskip. Aan #5 kan dan
+% ook \par worden meegegeven om de paragraaf af te sluiten.
+
+\newif\ifdoinpututilities
+\newif\ifunprotectutilities % voor't geval er \v!xxxxxx's zijn
+
+\def\utilitycheckmessage%
+ {\showmessage{\m!systems}{12}{}%
+ \global\let\utilitycheckmessage=\relax}
+
+\def\saveutilityline#1 #2\txen% tricky maar ok, want achter \command
+ {\if #1c% commands % in \ascii staat een spatie; #1 kan
+ \write\scratchwrite{#2}% % \par in stringvorm zijn (eof)!
+ \else\if#1s% synoniems
+ \utilitycheckmessage
+ \else\if#1r% registers
+ \utilitycheckmessage
+ \fi\fi\fi}
+
+\def\checkutilityfile%
+ {\doiflocfileelse{\jobname.\f!outputextension}
+ {}
+ {\doiflocfileelse{\jobname.\f!inputextension}
+ {\bgroup
+ \showmessage{\m!systems}{11}{}%
+ \openout\scratchwrite=\jobname.\f!outputextension
+ \openlocin\scratchread{\jobname.\f!inputextension}%
+ \def\doprocessline%
+ {\ifeof\scratchread
+ \def\doprocessline{\closein\scratchread}%
+ \else
+ \read\scratchread to \ascii
+ \convertcommand\ascii\to\ascii
+ \expandafter\saveutilityline\ascii\txen
+ \fi
+ \doprocessline}%
+ \doprocessline
+ \closeout\scratchwrite
+ \egroup}
+ {}}}
+
+\long\def\doutilities#1#2#3#4#5% % introduceren in utility file
+ {%\ifprocessingverbatim
+ % \showmessage{\m!systems}{1}{}%
+ %\else
+\restorecatcodes
+ \resetutilities
+ \def\docommando##1% % zo kunnen meerdere dingen
+ {\getvalue{\s!set##1}}% % in een pass worden gedaan,
+ \processcommacommand[#1]\docommando % zie bijvoorbeeld lijsten
+ \begingroup
+ \footnotesenabledfalse
+ \doinpututilitiestrue
+ \global\utilitydonefalse
+ \catcode`\%=\@@comment\relax
+ \pushendofline % geeft problemen zodra andere file wordt ingelezen
+ \ifunprotectutilities % nog nodig ?
+ \unprotect
+ \fi
+ \ifnum\catcode`\@=\@@active \else
+ \catcode`\@=\@@letter % permits expanded commands with \@'s
+ \fi
+ \ifnum\catcode`\!=\@@active \else
+ \catcode`\!=\@@letter % permits multilingual constants
+ \fi
+ #4\readjobfile{#2.\f!outputextension}{}{}#5%
+ \relax
+ \ifunprotectutilities
+ \protect
+ \fi
+ \popendofline
+ \ifutilitydone\else
+ \doifnot{#3}{}
+ {\showmessage{\m!systems}{9}{{#3}}%
+ \ifvoorlopig
+ \blanko
+ \type{[\currentmessagetext]}%
+ \blanko
+ \fi}%
+ \fi
+ \endgroup
+ }%\fi}
+
+% Commando's ten behoeve van two-pass lists. In principe
+% kan alles in een keer worden ingelezen. Omdat de macro's
+% groeien is de kans groot dat het (main) geheugen door
+% (de)allocatie volloopt. Vandaar dat we het toch maar niet
+% doen.
+%
+% \definetwopasslist{\s!xxx}
+%
+% \gettwopassdata{\s!xxx}
+% \getfrompassdata{\s!xxx}{n} n=index (getal)
+% \findtwopassdata{\s!xxx}{tag} bijvoorbeeld {label:}
+% \iftwopassdatafound
+% \twopassdata
+%
+% \twopassentry{\s!xxx}{nr}{data} nr alleen voor testdoeleinden
+
+\def\alltwopasslists{}
+
+\newif\iftwopassdatafound
+
+\def\twopassentry#1%
+ {\executeifdefined{@@#1\s!pass}\gobbletwoarguments}
+
+\def\definetwopasslist#1%
+ {\doifundefined{#1:\s!list}
+ {\addtocommalist{#1}\alltwopasslists
+ \doglobal\addutilityreset{#1\s!pass}%
+ \setgvalue{\s!set#1\s!pass}%
+ {\setgvalue{@@#1\s!pass}####1####2%
+ {\debuggerinfo{\m!systems}{twopass data #1 - ####1 = ####2}%
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}####2,}}}%
+ \setgvalue{\s!reset#1\s!pass}%
+ {\setgvalue{@@#1\s!pass}####1####2{}}%
+ \getvalue{\s!reset#1\s!pass}}}
+
+\def\doloadtwopassdata#1%
+ {\doifundefined{#1:\s!list}
+ {\setgvalue{#1:\s!list}{}%
+ \doutilities{#1\s!pass}{\jobname}{}{}{}%
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}0,0}}}
+
+\def\loadtwopassdata%
+ {\processcommacommand[\alltwopasslists]\doloadtwopassdata}
+
+\def\twopassdata{}
+
+\def\dogettwopassdata[#1,#2]#3%
+ {\doifelse{#1}{0}
+ {\twopassdatafoundfalse}
+ {\twopassdatafoundtrue
+ \setxvalue{#3:\s!list}{#2}%
+ \edef\twopassdata{#1}}}
+
+\def\gettwopassdata#1%
+ {\edef\!!stringa{\getvalue{#1:\s!list}}%
+ \debuggerinfo{\m!systems}{twopass get #1 - \!!stringa}%
+ \expandafter\dogettwopassdata\expandafter[\!!stringa]{#1}}
+
+\def\dofindtwopassdata#1#2%
+ {\edef\!!stringa{,\getvalue{#1:\s!list}}%
+ \debuggerinfo{\m!systems}{twopass find #2 - \!!stringa}%
+ \def\dodofindtwopassdata[##1,##2#2##3,##4]%
+ {\def\twopassdata{##3}%
+ \doifelse{##3}{}
+ {\twopassdatafoundfalse}
+ {\twopassdatafoundtrue}}%
+ \@EA\dodofindtwopassdata\@EA[\!!stringa,#2,#2,]}
+
+\def\findtwopassdata%
+ {\ExpandBothAfter\dofindtwopassdata}
+
+\def\dogetfirsttwopassdata[#1,#2]#3%
+ {\doifelse{#1}{0}
+ {\twopassdatafoundfalse}
+ {\twopassdatafoundtrue
+ \edef\twopassdata{#1}}}
+
+\def\getfirsttwopassdata#1%
+ {\edef\!!stringa{\getvalue{#1:\s!list}}%
+ \expandafter\dogetfirsttwopassdata\expandafter[\!!stringa]{#1}}
+
+\def\getlasttwopassdata#1%
+ {\edef\twopassdata{0}\twopassdatafoundfalse
+ \newcounter\noftwopassitems
+ \def\docommando##1%
+ {\doifnot{##1}{0}
+ {\increment\noftwopassitems
+ \edef\twopassdata{##1}\twopassdatafoundtrue}}%
+ \processcommacommand[\getvalue{#1:\s!list}]\docommando}
+
+\def\getfromtwopassdata#1#2%
+ {\getfromcommacommand[\getvalue{#1:\s!list}][#2]%
+ \doifelsenothing{\commalistelement}
+ {\twopassdatafoundfalse}
+ {\twopassdatafoundtrue
+ \let\twopassdata=\commalistelement}}
+
+% Maten
+%
+% De onderstaande instellingen worden gebruikt voor het
+% vastleggen van de zetspiegel en marges.
+
+\voffset=0pt % setting this to -1in let's go metapost crazy
+\hoffset=0pt % setting this to -1in let's go metapost crazy
+
+\newdimen\papierhoogte
+\newdimen\papierbreedte
+
+\newdimen\printpapierhoogte
+\newdimen\printpapierbreedte
+
+\newdimen\zethoogte
+\newdimen\zetbreedte
+
+\newdimen\teksthoogte
+\newdimen\tekstbreedte
+
+\newdimen\kopwit \kopwit=2cm
+\newdimen\rugwit \rugwit=2cm
+
+\newdimen\hoofdhoogte \hoofdhoogte=2cm
+\newdimen\voethoogte \voethoogte=2cm
+
+\newdimen\kopkopwit \kopkopwit=0cm
+
+\newdimen\kopoffset \kopoffset=\!!zeropoint
+\newdimen\rugoffset \rugoffset=\!!zeropoint
+
+\newdimen\linkermargebreedte \linkermargebreedte=3cm
+\newdimen\rechtermargebreedte \rechtermargebreedte=\linkermargebreedte
+
+\newdimen\linkerrandbreedte \linkerrandbreedte=3cm
+\newdimen\rechterrandbreedte \rechterrandbreedte=\linkerrandbreedte
+
+\newdimen\bovenhoogte \bovenhoogte=1cm
+\newdimen\onderhoogte \onderhoogte=\bovenhoogte
+
+\def\margeafstand%
+ {\@@lymargeafstand}
+
+\def\randafstand%
+ {\@@lyrandafstand}
+
+\def\margebreedte%
+ {\@@lymarge}
+
+\def\randbreedte%
+ {\@@lyrand}
+
+\def\linkerrandafstand%
+ {\ifdim\!!zeropoint<\linkerrandbreedte
+ \@@lylinkerrandafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\rechterrandafstand%
+ {\ifdim\!!zeropoint<\rechterrandbreedte
+ \@@lyrechterrandafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\linkermargeafstand%
+ {\ifdim\!!zeropoint<\linkermargebreedte
+ \@@lylinkermargeafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\rechtermargeafstand%
+ {\ifdim\!!zeropoint<\rechtermargebreedte
+ \@@lyrechtermargeafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\bovenafstand%
+ {\ifdim\!!zeropoint<\bovenhoogte
+ \@@lybovenafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\hoofdafstand%
+ {\ifdim\!!zeropoint<\hoofdhoogte
+ \@@lyhoofdafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\voetafstand%
+ {\ifdim\!!zeropoint<\voethoogte
+ \@@lyvoetafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\def\onderafstand%
+ {\ifdim\!!zeropoint<\onderhoogte
+ \@@lyonderafstand
+ \else
+ \!!zeropoint
+ \fi}
+
+\newif\ifdubbelzijdig
+\dubbelzijdigfalse
+
+\newif\ifenkelzijdig
+\enkelzijdigtrue
+
+\def\doifsometextlineelse#1#2#3% ! omgekeerd !
+ {\doifinsetelse{\getvalue{\??tk#1\v!tekst\c!status}}{\v!geen,\v!hoog}{#3}{#2}}
+
+\def\calculatevsizes% global needed in \resetlayoutregel
+ {\redoglobal\teksthoogte=\zethoogte
+ \redoglobal\kopkopwit=\kopwit
+ \redoglobal\advance\kopkopwit by \hoofdhoogte
+ \redoglobal\advance\kopkopwit by \hoofdafstand
+ \doifsometextlineelse{\v!hoofd}
+ {\redoglobal\advance\teksthoogte by -\hoofdhoogte
+ \redoglobal\advance\teksthoogte by -\hoofdafstand}
+ {}%
+ \doifsometextlineelse{\v!voet}
+ {\redoglobal\advance\teksthoogte by -\voethoogte
+ \redoglobal\advance\teksthoogte by -\voetafstand}
+ {}%
+ \resetglobal
+ \setvsize}
+
+\def\calculatereducedvsizes%
+ {\teksthoogte=\zethoogte
+ \doifsometextlineelse{\v!hoofd}
+ {\advance\teksthoogte by -\hoofdhoogte
+ \advance\teksthoogte by -\hoofdafstand}
+ {\hoofdhoogte=\!!zeropoint}%
+ \doifsometextlineelse{\v!voet}
+ {\advance\teksthoogte by -\voethoogte
+ \advance\teksthoogte by -\voetafstand}
+ {\voethoogte=\!!zeropoint}}
+
+\def\calculatehsizes%
+ {\tekstbreedte=\zetbreedte
+ \sethsize}
+
+\def\sethsize%
+ {\global\hsize=\tekstbreedte}
+
+\def\setvsize%
+ {\ifdim\vsize=\teksthoogte
+ \else
+ \bgroup
+ \dimen0=-\vsize
+ \advance\dimen0 by \teksthoogte
+ \global\advance\vsize by \dimen0
+ \ifdim\pagegoal<\maxdimen
+ \advance\dimen0 by \pagegoal
+ \global\pagegoal=\dimen0
+ \fi
+ \egroup
+ \fi}
+
+% Algemeen
+%
+% De Pragma-macros zijn samengesteld met behulp van de
+% commandos van PlainTeX- en enkele TugBoat routines.
+%
+% Voor de volledigheid zijn in de definitie steeds de
+% {}-haakjes vermeld. Deze haakjes zijn niet altijd
+% nodig, Als bijvoorbeeld een paragraaf bewerkt wordt,
+% kunnen ze achterwege blijven.
+%
+% Instellingen worden opgegeven tussen []-haakjes,
+% meestal direct na het commando. Instellingen mogen
+% soms achterwege blijven.
+%
+% Een aantal veelgebruikte macro's zijn in TeXEdit op
+% naam en/of door middel van een mnemonic oproepbaar.
+
+% %I n=Offset
+% %I c=\steloffsetin
+% %I
+% %I De totale bladzijde kan verschoven worden ten opzichte
+% %I van de linkerbovenhoek met:
+% %I
+% %I \steloffsetin[rug=,kop=]
+% %I
+% %I Dit commando moet worden gegeven aan het begin van de
+% %I pagina waarvoor het moet gelden. Er kunnen positieve
+% %I en negatieve waarden worden ingevuld: -10pt, 1.5cm.
+%
+% \def\dosteloffsetin[#1]%
+% {\getparameters
+% [\??os]
+% [\c!rug=\rugoffset,
+% \c!kop=\kopoffset,
+% #1]%
+% \rugoffset=\@@osrug
+% \kopoffset=\@@oskop}
+%
+% \def\steloffsetin%
+% {\dosingleargument\dosteloffsetin}
+
+% De onderstaande macro voert commando's uit, afhankelijk van
+% het karakter van het paginanummer.
+%
+% \doifonevenpaginaelse{then-commando}{else-commando}
+
+\def\doifonevenpaginaelse#1#2%
+ {\ifodd\userpageno#1\else#2\fi}
+
+\def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od%
+ {\ifdubbelzijdig
+ \ifodd\userpageno#2\relax\else#3\relax\fi
+ \else
+ #1\relax
+ \fi}
+
+\def\doifbothsides#1\orsideone#2\orsidetwo#3\od%
+ {\ifdubbelzijdig
+ \ifenkelzijdig
+ #1\relax
+ \else
+ \ifodd\userpageno#2\relax\else#3\relax\fi
+ \fi
+ \else
+ #1\relax
+ \fi}
+
+%I n=Lokaliteit
+%I c=\startlokaal
+%I
+%I Een aantal instellingen hebben een globaal karakter,
+%I bijvoorbeeld die met betrekking tot de zetspiegel.
+%I Dergelijke instellingen kunnen eventueel lokaal worden
+%I gehouden door ze tussen de volgende commando's te
+%I instellingen plaatsen:
+%I
+%I \startlokaal
+%I \stoplokaal
+
+\def\dostartglobaldefs#1#2%
+ {\edef\!!stringa{\the\globaldefs}%
+ \ifnum\globaldefs#10
+ \globaldefs=-\globaldefs
+ \fi
+ \advance\globaldefs by #21
+ \setevalue{@gd@\the\globaldefs}{\!!stringa}}
+
+\def\dostopglobaldefs%
+ {\doifdefinedelse{@gd@\the\globaldefs}
+ {\globaldefs=\getvalue{@gd@\the\globaldefs}\relax}
+ {\globaldefs=0\relax}}
+
+\def\startlokaal {\dostartglobaldefs>-}
+\def\stoplokaal {\dostopglobaldefs}
+\def\startglobaal {\dostartglobaldefs<+}
+\def\stopglobaal {\dostopglobaldefs}
+
+%I n=Zetspiegel
+%I c=\stellayoutin,\definieerpapierformaat,\stelpapierformaatin
+%I c=\paslayoutaan
+%I
+%I De zetspiegel is het door de tekst gevormde vlak.
+%I Hiertoe behoren ¢¢k de hoofd- en voetmarge. De zetspiegel
+%I wordt ingesteld met:
+%I
+%I \stellayoutin[breedte=,hoogte=,rugwit=,kopwit=]
+%I
+%I Er dienen maten te worden ingevuld, waarbij de eenheid
+%I direkt achter het getal staat: 10pt, 100mm, 5cm, 3.5in.
+%I
+%I De parameters hebben de volgende betekenis:
+%I
+%I breedte breedte van het tekstvlak, inclusief marges
+%I hoogte hoogte van het tekstvlak, inclusief marges
+%I rugwit witruimte aan de binnenzijde, zonder marge
+%I kopwit witruimte aan de bovenzijde, zonder marge
+%P
+%I Rond de zetspiegel vinden we marges, randen, het hoofd en
+%I de voet. Ook deze worden ingesteld met:
+%I
+%I \stellayoutin[breedte=,hoogte=,rugwit=,kopwit=]
+%I
+%I hoofd hoogte van de bovenmarge binnen de zetspiegel
+%I voet hoogte van de ondermarge binnen de zetspiegel
+%I marge breedte van de marge naast de zetspiegel
+%I
+%I en
+%I
+%I rand breedte van de rand naast de marge
+%I boven hoogte van de rand boven het hoofd
+%I onder hoogte van de rand onder de voet
+%I
+%I Alleen het hoofd en de voet hangen dus samen met de
+%I zetspiegel.
+%P
+%I Eventueel kunnen de linker- en rechtermarge en apart
+%I worden ingesteld:
+%I
+%I \stellayoutin[linkermarge=,rechtermarge=]
+%I
+%I Het zelfde geldt voor de randen. In dat geval wordt bij
+%I dubbelzijdig zetten gespiegeld. Oppassen dus!
+%I
+%I De afstanden tussen marges, randen enz. kunnen worden
+%I ingesteld met:
+%I
+%I bovenafstand, onderafstand
+%I hoofdafstand,voetafstand
+%I linkermargeafstand,rechtermargeafstand,
+%I linkerrandafstand,rechterrandafstand
+%P
+%I De zetspiegel kan (tijdelijk) worden aangepast met het
+%I commando:
+%I
+%I \paslayoutaan[hoogte=]
+%I
+%I Men dient een positieve (+) of negatieve (-) maat op te
+%I geven. De zethoogte blijft gelijk, maar de teksthoogte
+%I wordt aangepast ten koste van de voethoogte. Eventueel
+%I kan 'max' worden opgegeven.
+%I
+%I Er kan een reeks aanpassingen worden opgegeven:
+%I
+%I \paslayoutaan[nr,nr,nr,...][hoogte=]
+%I
+%I Hierbij is staat nr voor het paginanummer, dat wil
+%I zeggen: het volgnummer in de tekst.
+%I
+%I Bij voorlopige versies wordt onderaan de pagina de
+%I aanpassing weergegeven.
+%P
+%I Beeldmerken en achtergronden worden uit oogpunt van
+%I verwerkingssnelheid niet vaker berekend dan nodig. Mocht
+%I om een of andere reden een beeldmerk of achtergrond niet
+%I overeenkomen komen met de wensen, dan kan herberekenen
+%I worden geforceerd met:
+%I
+%I \stellayoutin[reset]
+%P
+%I Het papierformaat is in te stellen met het commando
+%I
+%I \stelpapierformaatin[DIN-formaat]
+%I
+%I Mogelijke DIN-formaten zijn A4 tot en met A9. De
+%I afmetingen van een A4 zijn:
+%I
+%I breedte : 21.0cm = 8.18in = 589pt
+%I hoogte : 29.7cm = 11.58in = 834pt
+%I
+%I Optioneel kan men het printer papierformaat instellen door
+%I een tweede argument mee te geven. Standaard wordt
+%I uitgegaan van A4.
+%I
+%I \stelpapierformaatin[A5][A4]
+%I
+%P Men kan zelf een papierformaat definieren met
+%I
+%I \definieerpapierformaat [naam] [hoogte=,breedte=]
+%I
+%I waarbij de offset betrekking heeft op dubbelzijdig zetten.
+
+\def\dodefinieerpapierformaat[#1][#2]%
+ {\getparameters
+ [\??pp#1]
+ [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,#2]}
+
+\def\definieerpapierformaat%
+ {\dodoubleargument\dodefinieerpapierformaat}
+
+\definieerpapierformaat[][\c!breedte=210mm,\c!hoogte=297mm]
+
+\def\dostelpapierformaatin[#1][#2]%
+ {\doifdefined{\??pp#1\c!breedte}
+ {\gdef\papierformaat{#1}%
+ \global\papierbreedte=\getvalue{\??pp#1\c!breedte}%
+ \global\papierhoogte=\getvalue{\??pp#1\c!hoogte}%
+ \doifdefinedelse{\??pp#2\c!breedte}
+ {\global\printpapierbreedte=\getvalue{\??pp#2\c!breedte}%
+ \global\printpapierhoogte=\getvalue{\??pp#2\c!hoogte}}
+ {\global\printpapierbreedte=\papierbreedte
+ \global\printpapierhoogte=\papierhoogte}%
+\ifdim\papierhoogte>\printpapierhoogte
+ \global\printpapierhoogte=\papierhoogte
+\fi
+\ifdim\papierbreedte>\printpapierbreedte
+ \global\printpapierbreedte=\papierbreedte
+\fi
+ \calculatehsizes
+ \calculatevsizes
+ \global\newlogostrue
+ \global\newbackgroundtrue}%
+ \resetlayout}
+
+\def\stelpapierformaatin%
+ {\dodoubleempty\dostelpapierformaatin}
+
+\def\checkforems[#1]%
+ {\def\docommando##1%
+ {\beforesplitstring##1\at em\to\asciia
+ \doifnot{\asciia}{##1}
+ {\aftersplitstring\asciia\at=\to\asciia
+ \doifsomething{\asciia}
+ {\showmessage{\m!systems}{10}{##1}}}}%
+ \processcommalist[#1]\docommando}
+
+\def\resetlayout%
+ {\global\linkermargebreedte=\@@lylinkermarge
+ \global\rechtermargebreedte=\@@lyrechtermarge
+ \global\linkerrandbreedte=\@@lylinkerrand
+ \global\rechterrandbreedte=\@@lyrechterrand
+ \global\hoofdhoogte=\@@lyhoofd
+ \global\voethoogte=\@@lyvoet
+ \global\onderhoogte=\@@lyonder
+ \global\bovenhoogte=\@@lyboven
+ %\global\zetbreedte=\@@lybreedte
+ %\global\zethoogte=\@@lyhoogte
+ \global\rugwit=\@@lyrugwit
+ \global\kopwit=\@@lykopwit
+ \doifelse{\@@lybreedte}{\v!passend}
+ {\global\zetbreedte=\papierbreedte
+ \global\advance\zetbreedte by -\rugwit
+ \scratchdimen=\rugwit
+ \advance\scratchdimen by -\linkerrandbreedte
+ \advance\scratchdimen by -\linkerrandafstand
+ \advance\scratchdimen by -\paginascheiding
+ \advance\scratchdimen by -\linkermargebreedte
+ \advance\scratchdimen by -\linkermargeafstand
+ \ifdim\scratchdimen<\!!zeropoint
+ \scratchdimen=\!!zeropoint
+ \fi
+ \global\advance\zetbreedte by -\rechtermargeafstand
+ \global\advance\zetbreedte by -\rechtermargebreedte
+ \global\advance\zetbreedte by -\paginascheiding
+ \global\advance\zetbreedte by -\rechterrandafstand
+ \global\advance\zetbreedte by -\rechterrandbreedte
+ \global\advance\zetbreedte by -\scratchdimen}
+ {\global\zetbreedte=\@@lybreedte}%
+ \doifelse{\@@lyhoogte}{\v!passend}
+ {\global\zethoogte=\papierhoogte
+ \global\advance\zethoogte by -\kopwit
+ \scratchdimen=\kopwit
+ \advance\scratchdimen by -\bovenhoogte
+ \advance\scratchdimen by -\bovenafstand
+ \ifdim\scratchdimen<\!!zeropoint
+ \scratchdimen=\!!zeropoint
+ \fi
+ \global\advance\zethoogte by -\onderafstand
+ \global\advance\zethoogte by -\onderhoogte
+ \global\advance\zethoogte by -\scratchdimen}
+ {\global\zethoogte=\@@lyhoogte}%
+ \rugoffset=\@@lyrugoffset
+ \kopoffset=\@@lykopoffset
+ \calculatehsizes
+ \calculatevsizes
+ \global\newlogostrue
+ \global\newbackgroundtrue}
+
+\def\dostellayoutin[#1]%
+ {\ConvertToConstant\doifnot{#1}{\v!reset}
+ {\getparameters[\??ly][#1]%
+ \checkforems[#1]}%
+ \resetlayout}
+
+\def\stellayoutin%
+ {\dosingleargument\dostellayoutin}
+
+\let\@@zahoogte=\!!zeropoint
+
+\def\dopushpagedimensions%
+ {\xdef\oldteksthoogte{\the\teksthoogte}%
+ \xdef\oldvoethoogte{\the\voethoogte}%
+ \global\let\@@zahoogte=\@@zahoogte}
+
+\def\dopoppagedimensions%
+ {\global\teksthoogte=\oldteksthoogte
+ \global\voethoogte=\oldvoethoogte
+ \calculatevsizes
+ \global\let\pushpagedimensions=\dopushpagedimensions
+ \global\let\poppagedimensions=\relax}
+
+\let\poppagedimensions=\relax
+\let\pushpagedimensions=\dopushpagedimensions
+
+% Elke \csname ... \endcsname wordt ook aangemaakt, dus ook
+% in een test met \doifdefined. Bij veel bladzijden kan dit
+% te veel macro's kosten. Vandaar de set \adaptedpages. Het
+% kost tijd, maar scheelt macro's.
+
+\def\adaptedpages{}
+
+\def\adaptpagedimensions%
+ {\rawdoifinsetelse{\realfolio}{\adaptedpages}
+ {\getvalue{\??za\realfolio}%
+ \letvalue{\??za\realfolio}=\relax}
+ {}}
+
+\def\checkpagedimensions%
+ {\poppagedimensions
+ \adaptpagedimensions}
+
+\def\reportpagedimensions%
+ {\ifx\poppagedimensions\relax
+ \else
+ \spatie\@@zahoogte\spatie-
+ \fi
+ \realfolio}
+
+\def\dodopaslayoutaan[#1]%
+ {\getparameters[\??za][#1]%
+ \pushpagedimensions
+ \doifelse{\@@zahoogte}{\v!max}
+ {\balancedimensions{\teksthoogte}{\voethoogte}{\voethoogte}}
+ {\balancedimensions{\teksthoogte}{\voethoogte}{\@@zahoogte}}%
+ \ifdim\voethoogte<\!!zeropoint
+ \global\advance\teksthoogte by \voethoogte
+ \global\voethoogte=\!!zeropoint
+ \global\xdef\@@zahoogte{\@@lyvoet\spatie(\v!max)}%
+ \fi
+ \setvsize
+ \global\pagegoal=\vsize % nog corrigeren voor insertions ?
+ \global\newlogostrue
+ \global\newbackgroundtrue
+ \showmessage{\m!layouts}{1}{\@@zahoogte,\realfolio}%
+ \global\let\pushpagedimensions=\relax
+ \global\let\poppagedimensions=\dopoppagedimensions}
+
+\def\dopaslayoutaan[#1][#2]%
+ {\doifelsenothing{#2}
+ {\dodopaslayoutaan[#1]}
+ {\def\docommando##1%
+ {\addtocommalist{##1}\adaptedpages
+ \setgvalue{\??za##1}{\dodopaslayoutaan[#2]}}%
+ \processcommalist[#1]\docommando
+ \adaptpagedimensions}}
+
+\def\paslayoutaan%
+ {\dodoubleempty\dopaslayoutaan}
+
+%I n=Margeblokken
+%I c=\startmargeblok,\stelmargeblokkenin
+%I
+%I voorlopig:
+%I
+%I \stelmargeblokkenin
+%I [plaats=,breedte,letter=,uitlijnen=,
+%I voor=,na=,links=,rechts=,boven=,onder=,tussen=]
+%I
+%I plaats = inmarge, links, rechts, midden
+%I links, rechts, voor, na = rule
+%I boven, onder, tussen = skip
+%I status=
+%I
+%I \startmargeblok
+%I \stopmargeblok
+
+\newif\ifmargeblokken
+
+\def\dostelmargeblokkenin[#1]%
+ {\getparameters[\??mb][#1]%
+ \doifelse{\@@mbstatus}{\v!start}%
+ {\showmessage{\m!layouts}{4}{}%
+ \margeblokkentrue
+ \let\somenextfloat=\dosomenextfloat
+ \let\startmargeblok=\dostartmargeblok
+ \let\stopmargeblok=\dostopmargeblok}%
+ {\showmessage{\m!layouts}{5}{}%
+ \margeblokkenfalse
+ \def\somenextfloat[##1]%
+ {\someelsefloat[##1,\v!hier]}%
+ \let\startmargeblok=\dontstartmargeblok
+ \let\stopmargeblok=\dontstopmargeblok}}
+
+\def\stelmargeblokkenin%
+ {\dosingleargument\dostelmargeblokkenin}
+
+\newbox\marginbox
+
+\def\dosomenextfloat[#1]%
+ {\global\setbox\marginbox=\vbox
+ {\hsize\@@mbbreedte
+ \unvbox\marginbox
+ \ifvoid\marginbox\else
+ \@@mbtussen
+ \fi
+ \box\floatbox\filbreak}%
+ \ifdim\ht\marginbox>\teksthoogte
+ \dosavefloatinfo
+ \else
+ \doinsertfloatinfo
+ \fi}
+
+\newbox\preparedmarginbox
+
+\def\reshapemargin%
+ {\beginofshapebox
+ \unvbox\preparedmarginbox
+ \endofshapebox
+ \reshapebox
+ {\box\shapebox}%
+ \setbox\preparedmarginbox=\vbox to \teksthoogte
+ {\@@mbboven
+ \flushshapebox
+ \@@mbonder}}
+
+\def\plaatsrechtermargeblok%
+ {\hskip\rechtermargebreedte}
+
+\def\plaatslinkermargeblok%
+ {\hskip\linkermargebreedte}
+
+\def\checkmargeblokken%
+ {\setbox\preparedmarginbox=\vbox
+ {\forgetall
+ \splittopskip\topskip
+ \ifvoid\marginbox\else
+ \ifdim\ht\marginbox>\teksthoogte
+ \vsplit\marginbox to \teksthoogte
+ \else
+ \unvbox\marginbox
+ \fi
+ \fi}%
+ \reshapemargin
+ \setbox\preparedmarginbox=\vbox
+ {\@@mbvoor\box\preparedmarginbox\@@mbna}%
+ \def\rightmarginbox%
+ {\def\plaatsrechtermargeblok%
+ {\setbox\preparedmarginbox=\hbox to \rechtermargebreedte
+ {\@@mblinks\box\preparedmarginbox\@@mbrechts}%
+ \vsmashbox\preparedmarginbox
+ \box\preparedmarginbox}}%
+ \def\leftmarginbox%
+ {\def\plaatslinkermargeblok%
+ {\setbox\preparedmarginbox=\hbox to \linkermargebreedte
+ {\@@mbrechts\box\preparedmarginbox\@@mblinks}%
+ \vsmashbox\preparedmarginbox
+ \box\preparedmarginbox}}%
+ \processaction
+ [\@@mbplaats]
+ [ \v!inmarge=>\doifbothsidesoverruled
+ \rightmarginbox
+ \orsideone
+ \rightmarginbox
+ \orsidetwo
+ \leftmarginbox
+ \od,
+ \v!midden=>\doifbothsidesoverruled
+ \rightmarginbox
+ \orsideone
+ \leftmarginbox
+ \orsidetwo
+ \rightmarginbox
+ \od,
+ \v!links=>\leftmarginbox,
+ \v!rechts=>\rightmarginbox,
+ \s!unknown=>\setbox\preparedmarginbox=\hbox{}]}
+
+\def\dostartmargeblok% % 2 maal \vbox ivm \unvbox elders
+ {\global\setbox\marginbox=\vtop\bgroup\vbox\bgroup
+ \hsize\@@mbbreedte
+ \ifvoid\marginbox\else
+ \unvbox\marginbox
+ \@@mbtussen
+ \fi
+ \steluitlijnenin[\@@mbuitlijnen]%
+ \dostartattributes{\??mb}{}%
+ \begstrut\ignorespaces}
+
+\def\dostopmargeblok%
+ {\unskip\endstrut
+ \dostopattributes
+ \egroup
+ \egroup}
+
+\def\dontstartmargeblok%
+ {\@@mbvoor
+ \bgroup
+ \dostartattributes{\??mb}{}}
+
+\def\dontstopmargeblok%
+ {\dostopattributes
+ \egroup
+ \@@mbna}
+
+%I n=Uitstellen
+%I c=\steluit,\startuitstellen
+%I
+%I Zetcommando's kunnen in een wachtrij worden gezet en na
+%I een pagina worden uitgevoerd. Dit gebeurt met het commando:
+%I
+%I \startuitstellen
+%I ...
+%I \stopuitstellen
+%I
+%I of
+%I
+%I \steluit{...}
+%I
+%I Dit kan handig zijn bij bijvoorbeeld grote tussen te voegen
+%I figuren, tabellen, formulieren enz.
+%I
+%I \startuitstellen
+%I \plaatsfiguur[pagina][]{...}{...}
+%I \stopuitstellen
+%I
+%I Er kunnen meerdere commando's in de wachtrij worden
+%I geplaatst.
+%P
+%I Het mechanisme werkt nog niet vlekkeloos. Zo wordt
+%I nog gerekend met waarden van de vorige pagina. Dit heeft
+%I bijvoorbeeld als gevolg dat figuren kunnen worden
+%I opgespaard.
+%I
+%I Het kan gebeuren dat een (te) groot figuur er voor zorgt
+%I dat ook andere figuren worden verplaatst. De volgorde
+%I blijft immers gehandhaafd. In dat geval kan zo'n groot
+%I figuur worden verplaatst naar de eerstvolgende voor de
+%I handliggende pagina:
+%I
+%I \startuitstellen
+%I \plaatsfiguur[pagina][]{...}{...}
+%I \pagina
+%I \stopuitstellen
+
+\newcounter\nofpostponedblocks
+
+\newbox\postponedblocks
+
+\def\douitstellen%
+ {\ifnum\nofpostponedblocks>0
+ \showmessage{\m!layouts}{2}{\nofpostponedblocks}%
+ \unvbox\postponedblocks
+ \doglobal\newcounter\nofpostponedblocks
+ \fi}
+
+\def\startuitstellen%
+ {\doglobal\increment\nofpostponedblocks
+ \showmessage{\m!layouts}{3}{\nofpostponedblocks}%
+ \global\setbox\postponedblocks=\vbox
+ \bgroup
+ \unvbox\postponedblocks
+ \let\stopuitstellen=\egroup}
+
+\def\steluit%
+ {\startuitstellen\let\next=}
+
+%I n=Nummeren
+%I c=\stelnummerenin
+%I
+%I Automatische nummering kan worden ingesteld met het
+%I commando:
+%I
+%I \stelnummerenin[wijze=,blok=,status=]
+%I
+%I Mogelijke wijzen van nummeren zijn: 'pertekst',
+%I 'perhoofdstuk' en 'perparagraaf'. Als status kan worden
+%I meegegeven 'start' of 'stop'. Met blok wordt aangegeven
+%I of moet worden uitgegaan van het huidige hoofdstuk ('nee')
+%I of het blokhoofdstuk ('ja').
+
+% Commando's ten behoeve van nummeren:
+%
+% \definieernummer[naam]
+% \stelnummerin[naam][wijze=,blok=,tekst=plaats=,conversie=,start=]
+% \setnummer[naam]{waarde}
+% \resetnummer[naam]
+% \verhoognummer[naam]
+% \verlaagnummer[naam]
+% \volgendenummer[naam][tag][referentie]
+% \nummer[naam]
+% \huidigenummer[naam]
+% \innummer[naam][referentie]
+% \opnummer[naam][referentie]
+% \savenumber[naam]
+% \restorenumber[naam]
+
+\newif\ifnummeren
+
+\def\dostelnummerenin[#1]% globaal
+ {\getparameters[\??nr][#1]%
+ \doifelse{\@@nrstatus}{\v!start}
+ {\global\nummerentrue}
+ {\global\nummerenfalse}}%
+
+\def\stelnummerenin%
+ {\dosingleargument\dostelnummerenin}
+
+\def\dostelnummerin[#1][#2]%
+ {\getparameters[\s!number#1][#2]}
+
+\def\stelnummerin%
+ {\dodoubleargument\dostelnummerin}
+
+\def\dodefinieernummer[#1][#2]% ook overal class als localframed
+ {\makecounter{\s!number#1}%
+ \getparameters
+ [\s!number#1]
+ [\s!check=,
+ \c!wijze=\@@nrwijze,
+ \c!wijze\c!lokaal=\getvalue{\s!number#1\c!wijze},
+ \c!sectienummer=\v!ja,
+ \c!tekst=,
+ \c!plaats=, % was: \c!zetwijze
+ \c!conversie=\v!cijfers,
+ \c!start=0,
+ #2]%
+ \setcounter{\s!number#1}{\getvalue{\s!number#1\c!start}}}
+
+\def\definieernummer%
+ {\dodoubleempty\dodefinieernummer}
+
+\def\setnummer[#1]#2%
+ {\setcounter{\s!number#1}{#2}}
+
+\def\resetnummer[#1]%
+ {\setcounter{\s!number#1}{0\getvalue{\s!number#1\c!start}}}
+
+\def\dodoreset#1%
+ {\getvalue{\s!reset#1}}%
+
+\def\doreset[#1]%
+ {\processcommalist[#1]\dodoreset}
+
+\def\reset%
+ {\dosingleargument\doreset}
+
+\def\verhoognummer[#1]%
+ {\checknummer{#1}%
+ \ifnummeren
+ \else
+ \resetcounter{\s!number#1}%
+ \fi
+ \pluscounter{\s!number#1}}
+
+\def\savenumber[#1]%
+ {\savecounter{\s!number#1}}
+
+\def\restorenumber[#1]%
+ {\restorecounter{\s!number#1}}
+
+% nieuw, maar kan dit (i.v.m. (sub)page?)
+
+\def\verhoognummer[#1]%
+ {\checknummer{#1}%
+ \ifnummeren
+ \pluscounter{\s!number#1}%
+ \else
+ \setcounter{\s!number#1}{0\getvalue{\s!number#1\c!start}}%
+ \fi}
+
+\def\verlaagnummer[#1]%
+ {\minuscounter{\s!number#1}}
+
+\def\dodochecknummer#1#2#3%
+ {\bgroup
+ \doifinstringelse{.0}{.#2} % waarom \instring en \@koscheider
+ {\doifnot{#3}{\v!per}
+ {\debuggerinfo{\m!systems}{number #1 #3 becomes \getvalue{\s!number#1\c!wijze}}%
+ \setevalue{\s!number#1\c!wijze}% geen \xdef, gaat mis met \subpage
+ {#3}%
+ \dochecknummer{#1}}} % tricky and ugly
+ {\doifnotvalue{\s!number#1\s!check}{#2}
+ {\setcounter{\s!number#1}{0\getvalue{\s!number#1\c!start}}%
+ \setxvalue{\s!number#1\c!wijze\c!lokaal}%
+ {\getvalue{\s!number#1\c!wijze}}%
+ \setxvalue{\s!number#1\s!check}%
+ {#2}}}%
+ \egroup}
+
+\def\dochecknummer#1%
+ {\edef\currentsection{\getvalue{\??by\getvalue{\s!number#1\c!wijze}}}%
+ \doifsomething{\currentsection}
+ {\dodochecknummer
+ {#1}
+ {\getvalue{\currentsection\c!nummer}}
+ {\v!per\previoussection{\currentsection}}}}
+
+\def\checknummer#1%
+ {\bgroup
+ \ifnum\blocklevel>0
+ \doifelsevalue{\s!number#1\c!blokwijze}{\v!nee}
+ {\dochecknummer{#1}}
+ {\setblockcounters % dit kan sneller omdat de waarden
+ \dochecknummer{#1}}% % en het type bekend zijn
+ \else
+ \dochecknummer{#1}%
+ \fi
+ \egroup}
+
+\def\domaakvoorafgaandenummer[#1]%
+ {\gdef\voorafgaandenummer{}%
+ \ifsectienummer
+ \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % toegevoegd
+ {\doifvalue{\s!number#1\c!sectienummer}{\v!ja}
+ {\edef\currentsection%
+ {\getvalue{\??by\getvalue{\s!number#1\c!wijze\c!lokaal}}}%
+ \doifnot{\currentsection}{\zerosection}
+ {\doifnot{\@@sectionvalue{\currentsection}}{0}
+ {\xdef\voorafgaandenummer%
+ {\getvalue{\currentsection\c!nummer}.}}}}}%
+ \fi}
+
+\def\maakvoorafgaandenummer[#1]%
+ {\bgroup
+ \ifnum\blocklevel>0
+ \doifelsevalue{\s!number#1\c!blokwijze}{\v!nee}
+ {\domaakvoorafgaandenummer[#1]}%
+ {\setblockcounters % dit kan sneller omdat de waarden
+ \domaakvoorafgaandenummer[#1]}% % en het type bekend zijn
+ \else
+ \domaakvoorafgaandenummer[#1]%
+ \fi
+ \egroup}
+
+\def\nummer[#1]%
+ {\convertnumber
+ {\getvalue{\s!number#1\c!conversie}}
+ {\countervalue{\s!number#1}}}
+
+\def\ruwenummer[#1]%
+ {\countervalue{\s!number#1}}
+
+\def\maakhetnummer[#1]%
+ {\maakvoorafgaandenummer[#1]%
+ \global\edef\hetnummer%
+ {\voorafgaandenummer\nummer[#1]}}%
+
+\def\lossenummer[#1]%
+ {\maakhetnummer[#1]%
+ \hetnummer}
+
+\def\huidigenummer[#1]%
+ {%\getvalue{\getvalue{\s!number#1\c!zetwijze}}%
+ \getvalue{\getvalue{\s!number#1\c!plaats}}%
+ {\dotextprefix{\getvalue{\s!number#1\c!tekst}}\lossenummer[#1]}}
+
+\def\volgendenummer[#1][#2][#3]%
+ {\verhoognummer[#1]%
+ \huidigenummer[#1]%
+ \rawreference{#2}{#3}{\hetnummer}}
+
+\def\innummer[#1][#2]%
+ {\c!in \in{\getvalue{\s!number#1\c!tekst}}[#2]}%
+
+\def\opnummer[#1][#2]%
+ {\c!op \op{\getvalue{\s!number#1\c!tekst}}[#2]}%
+
+% \gotonextsubpage : voor de pagebody
+% \subpaginanummer : alleen in de voet/kopregels
+% \aantalsubpaginas : alleen in de voet/kopregels
+
+% \firstsubpage : eerste \realpageno, voor interne doeleinden
+% \prevsubpage : vorige \realpageno, voor interne doeleinden
+% \nextsubpage : volgende \realpageno, voor interne doeleinden
+% \lastsubpage : laatste \realpageno, voor interne doeleinden
+% \nofsubpages : laatste subpage (in berekeningen)
+% \subpageno : huidige subpage (in berekeningen)
+
+\countdef\subpageno = 2 \subpageno = 0 % !!
+
+\newif\ifsubpaging
+\newif\ifshowingsubpage
+
+\definieernummer
+ [\s!subpage]
+
+\stelnummerin
+ [\s!subpage]
+ [\c!wijze=\@@snwijze]
+
+\def\resetsubpaginanummer%
+ {\resetnummer[\s!subpage]%
+ \global\subpageno=\ruwenummer[\s!subpage]}
+
+\def\dostelsubpaginanummerin[#1]%
+ {\doifelse{#1}{\v!reset}
+ {\resetnummer[\s!subpage]}
+ {\getparameters[\??sn][#1]%
+ \processaction
+ [\@@snstatus]
+ [ \v!stop=>\ifsubpaging
+ \else
+ \subpagingfalse
+ \fi
+ \showingsubpagefalse,
+ \v!start=>\subpagingtrue
+ \showingsubpagetrue,
+ \v!geen=>\subpagingtrue
+ \showingsubpagefalse]}}
+
+\def\aantalsubpaginas%
+ {\ifshowingsubpage
+ \nofsubpages
+ \else
+ 0%
+ \fi}
+
+\def\subpaginanummer%
+ {\ifshowingsubpage
+ \the\subpageno
+ \else
+ 0%
+ \fi}
+
+\def\stelsubpaginanummerin%
+ {\dosingleargument\dostelsubpaginanummerin}
+
+\def\newnofsubpages {0}
+\def\nofsubpages {0}
+\def\firstsubpage {1}
+\def\prevsubpage {1}
+\def\nextsubpage {1}
+\def\lastsubpage {1}
+
+\def\nextpage {1}
+\def\prevpage {1}
+
+\definetwopasslist{\s!subpage}
+
+\def\savenofsubpages%
+ {\ifsubpaging
+ \showmessage{\m!layouts}{6}{\newnofsubpages,\the\subpageno}%
+ \immediate\writeutilitycommand%
+ {\twopassentry%
+ {\s!subpage}%
+ {\newnofsubpages}%
+ {\the\subpageno}}%
+ \fi}
+
+\def\setsubpagenumbers%
+ {\iftwopassdatafound
+ \bgroup
+ \xdef\nofsubpages{\twopassdata}%
+ \xdef\firstsubpage{\realfolio}%
+ \advance\realpageno by \nofsubpages
+ \advance\realpageno by -1
+ \xdef\lastsubpage{\realfolio}%
+ \egroup
+ \else
+ \xdef\nofsubpages{0}%
+ \fi}
+
+\def\gotonextsubpage%
+ {\global\let\checksubpages=\relax
+ \ifsubpaging
+ \edef\oldsubpage{\the\subpageno}%
+ \verhoognummer[\s!subpage]%
+ \global\subpageno=\ruwenummer[\s!subpage]\relax
+ \ifnum\subpageno=1
+ \gettwopassdata{\s!subpage}%
+ \setsubpagenumbers
+ \ifnum\oldsubpage>0
+ \showmessage{\m!layouts}{6}{\newnofsubpages,\oldsubpage}%
+ \edef\next%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!subpage}%
+ {\newnofsubpages}%
+ {\oldsubpage}}}%
+ \next
+ \fi
+ \doglobal\increment\newnofsubpages\relax
+ \fi
+ \setdummypagereference{\v!eerste\v!sub\v!pagina}\firstsubpage
+ \setdummypagereference{\v!laatste\v!sub\v!pagina}\lastsubpage
+ \bgroup
+ \ifnum\realpageno=\firstsubpage\relax
+ \global\let\prevsubpage=\firstsubpage
+ \else
+ \xdef\prevsubpage{\realfolio}%
+ \doglobal\decrement\prevsubpage
+ \fi
+ \setdummypagereference{\v!vorige\v!sub\v!pagina}\prevsubpage
+ \ifnum\realpageno=\lastsubpage\relax
+ \global\let\nextsubpage=\lastsubpage
+ \else
+ \xdef\nextsubpage{\realfolio}%
+ \doglobal\increment\nextsubpage
+ \fi
+ \setdummypagereference{\v!volgende\v!sub\v!pagina}\nextsubpage
+ \egroup
+ \fi}
+
+\def\checksubpages%
+ {\getfromtwopassdata{\s!subpage}{1}%
+ \setsubpagenumbers
+ \global\let\checksubpages=\relax}
+
+% Omdat \gotonextrealpage gebruik maakt van de hulpfile,
+% moet het initialiseren van \realpageno plaatsvinden in
+% een later stadium, namelijk zodra referenties worden
+% gebruikt (anders gaat het mis op nog niet gedefinieerde
+% lijstcommando's e.d.). De eerst aanroep vindt dan ook
+% plaats vlak nadat de hulpfile voor de eerste maal is
+% ingelezen.
+
+% we don't want conflicts when \pageno is used by other
+% packages, like CWEB, so we redefine \pageno
+
+\countdef\realpageno = 0 \realpageno = 1
+\countdef\userpageno = 1 \userpageno = 1
+\newcount\pageno \pageno = 1
+
+\def\setuserpageno#1%
+ {\global\userpageno=#1\relax
+ \global\pageno=\userpageno}
+
+\def\realfolio {\the\realpageno}
+\def\folio {\the\userpageno}
+\def\firstpage {1}
+\def\lastpage {1}
+\def\currentpage {\the\realpageno}
+
+\newif\ifrealpagechecked \realpagecheckedfalse
+
+\def\setdummypagereference#1#2%
+ {\setreference{#1}{}{#2}{\r!page}}
+
+\def\gotonextrealpage%
+ {\global\advance\realpageno by 1
+ \ifnum\realpageno>\lastpage
+ \gdef\lastpage{\realfolio}%
+ \fi
+ \setdummypagereference{\v!eerste\v!pagina}\firstpage
+ \setdummypagereference{\v!laatste\v!pagina}\lastpage
+ \bgroup
+ \ifnum\realpageno>1
+ \advance\realpageno by -1
+ \xdef\prevpage{\realfolio}%
+ \else
+ \global\let\prevpage=\firstpage
+ \fi
+ \setdummypagereference{\v!vorige\v!pagina}\realfolio
+ \egroup
+ \bgroup
+ \ifnum\realpageno<\lastpage\relax
+ \advance\realpageno by 1
+ \xdef\nextpage{\realfolio}%
+ \else
+ \global\let\nextpage=\lastpage
+ \fi
+ \setdummypagereference{\v!volgende\v!pagina}\realfolio
+ \egroup}
+
+\def\checkrealpage%
+ {\ifrealpagechecked\else
+ \global\realpageno=0
+ \gotonextrealpage
+ \global\realpagecheckedtrue
+ \fi}
+
+\def\realnumberofpages#1% meteen laden, voor andere files (met refs)
+ {\gdef\lastpage{#1}%
+ \global\let\realnumberofpages=\gobbleoneargument}
+
+\def\savenofpages%
+ {\advance\realpageno by -1
+ \immediate\writeutilitycommand{\realnumberofpages{\realfolio}}}%
+
+\def\totaalaantalpaginas%
+ {\lastpage}
+
+\def\myshipout#1%
+ {\voorpagina
+ \dontshowcomposition
+ \dosetuppaper{\papierformaat}{\the\papierbreedte}{\the\papierhoogte}%
+\dolocationstartup
+ \shipout\vbox
+ {\forgetall % needed !
+ \offinterlineskip
+ \vskip\kopoffset\vskip-1in
+ \hskip\rugoffset\hskip-1in
+ \mindermeldingen
+ \thisisrealpage{\realfolio}#1}%
+ \gotonextrealpage
+ \napagina}
+
+\def\noshipout#1%
+ {\setbox0=\hbox{\dopagebody{#1}}%
+ \deadcycles=0%
+ \gotonextrealpage}
+
+\def\goleftonpage%
+ {\hskip-\linkermargeafstand
+ \hskip-\linkermargebreedte
+ \hskip-\paginascheiding
+ \hskip-\linkerrandafstand
+ \hskip-\linkerrandbreedte}
+
+\def\doswapmargins%
+ {\let\doswapmargins=\relax % to prevent local swapping
+ \swapmacros\@@lylinkermargeafstand\@@lyrechtermargeafstand
+ \swapmacros\@@lylinkerrandafstand\@@lyrechterrandafstand
+ \swapdimens\linkermargebreedte\rechtermargebreedte
+ \swapdimens\linkerrandbreedte\rechterrandbreedte}
+
+\def\doifmarginswapelse#1#2%
+ {\doifbothsides#1\orsideone#1\orsidetwo#2\od}
+
+\def\swapmargins%
+ {\doifmarginswapelse{}{\doswapmargins}}
+
+% Output routines
+%
+% \dopagecontents#1 : tekst, floats en footnotes
+% \dopagebody#1 : hoofd, \pagecontents, voet
+% \dooutput : outputroutine
+%
+% \ifinpagebody
+
+\def\doejectpage#1%
+ {\bgroup % de \ifdim is nodig omdat
+ \par % anders een eventuele
+ \ifdim\pagetotal>\pagegoal\else % laatste regel boven de
+ %\normalvfill % baseline te staan terwijl
+ \normalvfil % baseline te staan terwijl
+ \fi % de vorige bladzijden op
+ #1% % de baseline staan
+ \egroup}
+
+% ^^ NOG NETTER MAKEN, TEGELIJK MET MULTI COLUMNS EN ACHTERGRONDEN!
+
+\def\ejectpage%
+ {\doejectpage\eject}
+
+\def\superejectpage%
+ {\doejectpage\supereject}
+
+\def\ejectinsert%
+ {\flushfootnotes
+ \bgroup
+ \noftopfloats=\!!thousand
+ \doflushfloats
+ \egroup}
+
+% De volgende macro's worden gedefinieerd in de module
+% colo-ini. Om resetten bij twee maal laden te voorkomen
+% checken we wel even. Anders krijgen we een mark-build-up.
+
+\newif\ifinpagebody
+
+\doifundefined{pushcolor} {\def\pushcolor{}}
+\doifundefined{popcolor} {\def\popcolor{}}
+\doifundefined{startcolorpage} {\def\startcolorpage{}}
+\doifundefined{stopcolorpage} {\def\stopcolorpage{}}
+
+\def\dopagecontents#1%
+ {\dotopinsertions
+ \bgroup
+ \forgetall
+ \boxmaxdepth=\maxdepth
+ \dimen0=\dp255 % #1 komt dus nog te vervallen
+ \bgroup
+ #1\relax
+ \pushcolor
+ \dobotinsertions
+ \egroup
+ \ifr@ggedbottom
+ \kern-\dimen0
+ \vfil
+ \fi
+ \ifb@selinebottom
+ \kern-\dimen0
+ \kern\maxdepth
+ \fi
+ \egroup
+ \placefootnotes}
+
+\def\dodummypageskip#1%
+ {\getvalue{\s!dummy\c!commando#1}}
+
+\setvalue{\s!dummy\c!commando\v!links}%
+ {\hskip\linkerrandbreedte}
+
+\setvalue{\s!dummy\c!commando\v!rechts}%
+ {\hskip\rechterrandbreedte}
+
+\setvalue{\s!dummy\c!commando\v!boven}%
+ {} % \vbox to \bovenhoogte{\vss}}
+
+\setvalue{\s!dummy\c!commando\v!onder}%
+ {} % \vbox to \onderhoogte{\vss}}
+
+\def\plaatslinkerrandblok {\dodummypageskip\v!links}
+\def\plaatsrechterrandblok {\dodummypageskip\v!rechts}
+
+\newtoks\afterpage \newtoks\aftereverypage
+\newtoks\beforepage \newtoks\beforeeverypage
+
+\def\plaatstekstblok#1%
+ {\hbox to \zetbreedte
+ {\vbox to \teksthoogte
+ {\offinterlineskip
+ \boxmaxdepth\maxdepth
+ \dopagecontents{#1}}%
+ \hss}}
+
+\def\getmainbox#1%
+ {\setbox0=\vbox
+ {\offinterlineskip % na \paginaletter !
+ \calculatereducedvsizes
+ \calculatehsizes
+ \swapmargins
+ \vskip\hoofdhoogte
+ \vskip\hoofdafstand
+ \hbox
+ {\bgroup
+ \swapmargins
+ \goleftonpage
+ \plaatslinkerrandblok
+ \hskip\linkerrandafstand
+ \showpageseparation
+ \plaatslinkermargeblok
+ \hskip\linkermargeafstand
+ \egroup
+ \plaatstekstblok{#1}%
+ \bgroup
+ \hskip\rechtermargeafstand
+ \plaatstestinfo
+ \plaatsrechtermargeblok
+ \showpageseparation
+ \hskip\rechterrandafstand
+ \plaatsrechterrandblok
+ \egroup}%
+ \vfill}
+ \smashbox0
+ \box0}
+
+%\def\setpagedisplacement%
+% {\global\voffset=\kopoffset
+% \global\hoffset=\rugoffset
+% \global\advance\voffset by -1in
+% \global\advance\hoffset by -1in}
+
+\def\centerpagebox#1%
+ {\processaction
+ [\@@lyplaats]
+ [ \v!midden=>\setbox#1=\vbox to \printpapierhoogte
+ {\vss
+ \hbox to \printpapierbreedte{\hss\box#1\hss}%
+ \vss},
+ \v!dubbelzijdig=>\setbox#1=\vbox
+ {\doifbothsides
+ \orsideone
+ \orsidetwo
+ \hskip\printpapierbreedte
+ \hskip-\papierbreedte
+ \hskip-2\rugoffset
+ \od
+ \box#1}]}
+
+\def\buildpagebox#1%
+ {\setbox#1=\vbox to \papierhoogte
+ {\hsize\papierbreedte
+ \vskip\kopwit
+ \doifbothsides
+ \hskip\rugwit
+ \orsideone
+ \hskip\rugwit
+ \orsidetwo
+ \hskip\papierbreedte
+ \hskip-\rugwit
+ \hskip-\zetbreedte
+ \od
+ \box#1}
+ \dp#1=\!!zeropoint}
+
+\def\addpagecutmarks#1%
+ {\doif{\@@lymarkering}{\v!aan}
+ {\makecutbox#1}}
+
+\def\buildpagebody#1%
+ {%\setpagedisplacement
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \setbox0=\vbox
+ {%\paginaletter
+ \doconvertfont{\@@lyletter}{}%
+ \offinterlineskip
+ \getbackgroundbox
+ \getlogobox
+ \gettextboxes
+ \getgridbox
+ \getmainbox{#1}}%
+ \buildpagebox0
+ \addpagecutmarks0
+ \addpagebackground0
+ \centerpagebox0
+ \box0}}
+
+\def\toongrid%
+ {\let\getgridbox=\dogetgridbox}
+
+\let\getgridbox=\relax
+
+\def\dogetgridbox%
+ {\bgroup
+ \setbox0=\vbox
+ {\vskip\hoofdhoogte
+ \vskip\hoofdafstand
+ \setbox0=\vbox to \teksthoogte
+ {\forgetall
+ \scratchdimen\teksthoogte
+ \divide\scratchdimen by \lineheight
+ \offinterlineskip
+ \vskip\topskip
+ \vskip-\ht\strutbox
+ \dorecurse{\number\scratchdimen}
+ {\strut\vrule
+ \!!height \testrulewidth
+ \!!depth \testrulewidth
+ \!!width \tekstbreedte
+ \par}
+ \vfill}%
+ \setbox2=\hbox to \tekstbreedte
+ {\leaders
+ \hbox
+ {\vrule
+ \!!height \teksthoogte
+ \!!width 2\testrulewidth
+ \kern1em}
+ \hfill}%
+ \wd0=\!!zeropoint
+ \startoverlay
+ \box0 \box2
+ \stopoverlay}%
+ \smashbox0
+ \box0
+ \egroup}
+
+\def\dopagebody#1%
+ {\getallmarks
+ \restoreglobalcorps
+ \startcolorpage
+ \gotonextsubpage
+ \dontshowboxes
+ \naastpagina
+ \checkreferences
+ \checkmargeblokken
+ \dotoks\beforeeverypage
+ \flushtoks\beforepage
+ \inpagebodytrue
+ \buildpagebody{#1}%
+ \flushtoks\afterpage
+ \dotoks\aftereverypage
+ \resetpagina
+ \updatelistreferences
+ \resetlayoutregels % mischien in shipout
+ \stopcolorpage}
+
+\def\beforefinaloutput%
+ {}
+
+\def\afterfinaloutput%
+ {\forgetall
+ \vskip\!!zeropoint\relax
+ \ifvoid255
+ \else
+ \unvbox255
+ \penalty\outputpenalty
+ \fi
+ \ifnum\outputpenalty>-\@MM\relax
+ \else
+ \dosupereject
+ \fi
+ \dosetbothinserts
+ \setvsize} % this is needed for interacting components, like floats and multicolumns
+
+\def\setpagecounters%
+ {\setuserpageno{\ruwenummer[\s!page]}%
+ \doifelse{\@@snstatus}{\v!stop}
+ {\global\subpageno=0}
+ {\global\subpageno=\ruwenummer[\s!subpage]}}
+
+\def\dofinaloutput#1%
+ {\beforefinaloutput
+ \myshipout{\hbox{\dopagebody{#1}\setpagecounters}}%
+ \afterfinaloutput
+ \douitstellen
+ \popcolor} % ... and here ...
+
+\def\donofinaloutput#1%
+ {\beforefinaloutput
+ \setpagecounters
+ \message{[-\the\realpageno]}%
+ \noshipout{#1}%
+ \douitstellen
+ \afterfinaloutput
+ \popcolor} % ... and here
+
+\let\checkpageversion=\relax
+
+\def\finaloutput#1%
+ {\checkpageversion
+ \ifverwerken
+ \ifgeselecteerd
+ \dofinaloutput{#1}%
+ \else
+ \donofinaloutput{#1}%
+ \fi
+ \else
+ \ifgeselecteerd
+ \donofinaloutput{#1}%
+ \else
+ \dofinaloutput{#1}%
+ \fi
+ \fi
+ \resetselectiepagina
+ \verhoogpaginanummer
+ \checkpagedimensions
+ \ifnum\outputpenalty>-\@MM\relax
+ \else
+ \dosupereject
+ \fi}
+
+\def\dooutput%
+ {\finaloutput{\unvbox255}}
+
+\output={\dooutput}
+
+%I n=Beeldmerken
+%I c=\definieerbeeldmerk,\plaatsbeeldmerken
+%I
+%I In het hoofd of in de voet kan een logo worden gezet met
+%I het commando:
+%I
+%I \plaatsbeeldmerken[naam]
+%I
+%I Plaatsen kan dan ook pas nadat een beeldmerk is gedefinieerd:
+%I
+%I \definieerbeeldmerk[naam][lokatie][plaats][commando=,status=]
+%I
+%I waarbij status 'start' of 'stop' kan zijn. In geval van
+%I 'start' wordt op elke bladzijde het logo geplaatst.
+%I
+%I Mogelijke lokaties zijn 'boven', 'hoofd', 'voet' en 'onder' en
+%I als plaats kan worden opgegeven 'linkerrand', 'linkermarge',
+%I 'links', 'midden', 'rechts', 'rechtermarge' en 'rechterrand'.
+%I
+%I Logo's worden boven, onder of in de hoofd- of voetregel gezet,
+%I zo hoog of laag mogelijk. Verdere positionering zal dus in
+%I het commando moeten plaatsvinden!
+
+\newbox\leftlogos
+\newbox\rightlogos
+
+\newif\ifnewlogos
+
+% \logostatus
+%
+% 0 = niet plaatsen > 0
+% 1 = direkt plaatsen > 1
+% 2 = berekenen en plaatsen > 1
+% 3 = een pagina berekenen en plaatsen > 2
+
+\def\logostatus{0}
+
+\def\gedefinieerdebeeldmerken{}
+\def\teplaatsenbeeldmerken{}
+
+\def\dodefinieerbeeldmerk[#1][#2][#3][#4]%
+ {\addtocommalist{#1}\gedefinieerdebeeldmerken
+ \setvalue{\??lo#2#3}{#1}%
+ \getparameters[\??lo#2#3][#4]%
+ \gdef\logostatus{2}}
+
+\def\definieerbeeldmerk%
+ {\doquadrupleargument\dodefinieerbeeldmerk}
+
+\def\complexplaatsbeeldmerken[#1]%
+ {\xdef\teplaatsenbeeldmerken{#1}%
+ \gdef\logostatus{3}}
+
+\def\simpleplaatsbeeldmerken%
+ {\global\let\teplaatsenbeeldmerken=\gedefinieerdebeeldmerken
+ \gdef\logostatus{3}}
+
+\definecomplexorsimple\plaatsbeeldmerken
+
+\def\doplaatsbeeldmerken#1#2%
+ {\bgroup
+ \setbox0=\vbox
+ {\hbox
+ {\ifnum\logostatus=3
+ \def\docommando##1%
+ {\ExpandBothAfter\doifinset{\getvalue{\??lo#1##1}}{\teplaatsenbeeldmerken}
+ {#2{\hbox{\getvalue{\??lo#1##1\c!commando}}}}}%
+ \else
+ \def\docommando##1%
+ {\doifvalue{\??lo#1##1\c!status}{\v!start}
+ {#2{\hbox{\getvalue{\??lo#1##1\c!commando}}}}}%
+ \fi
+ \def\dodocommando##1##2##3##4##5##6%
+ {\hskip\linkerrandafstand
+ \hskip\pageseparation
+ \hbox to \linkermargebreedte{\docommando{##2}\hss}%
+ \hskip\linkermargeafstand
+ \hbox to \zetbreedte{\docommando{##3}\hss\docommando{##4}}%
+ \hskip\rechtermargeafstand
+ \hbox to \rechtermargebreedte{\hss\docommando{##5}}%
+ \hskip\pageseparation
+ \hskip\rechterrandafstand
+ \hbox to \rechterrandbreedte{\hss\docommando{##6}}}%
+ \normalbaselines
+ \hsmash
+ {\hbox to \zetbreedte{\hss\docommando\c!midden\hss}}%
+ \hsmash
+ {\doifbothsides
+ \hskip-\rugwit
+ \orsideone
+ \hskip-\rugwit
+ \orsidetwo
+ \hskip-\papierbreedte
+ \hskip+\rugwit
+ \hskip+\zetbreedte
+ \od
+ \hbox to \papierbreedte{\docommando\v!pagina\hss}}%
+ \swapmargins
+ \goleftonpage
+ \doifbothsidesoverruled
+ \dodocommando
+ {\v!linkerrand}{\v!linkermarge}{\v!links}
+ {\v!rechts}{\v!rechtermarge}{\v!rechterrand}%
+ \orsideone
+ \dodocommando
+ {\v!linkerrand}{\v!linkermarge}{\v!links}
+ {\v!rechts}{\v!rechtermarge}{\v!rechterrand}%
+ \orsidetwo
+ \dodocommando
+ {\v!rechterrand}{\v!rechtermarge}{\v!rechts}
+ {\v!links}{\v!linkermarge}{\v!linkerrand}%
+ \od}}%
+ \getboxheight\dimen0\of\box0\relax
+ \vskip-\dimen0
+ \box0
+ \egroup}
+
+\def\setlogobox#1#2%
+ {\global\setbox#1=\vbox to \papierhoogte
+ {\offinterlineskip
+ \mindermeldingen
+ \calculatereducedvsizes
+ #2\relax
+ \vskip-\kopwit
+ \doplaatsbeeldmerken\v!boven\vsmash
+ \vskip\kopwit
+ \doplaatsbeeldmerken\v!hoofd\vsmash
+ \vskip\hoofdhoogte
+ \vskip\hoofdafstand
+ \doplaatsbeeldmerken\v!tekst\vsmash % evt \vbox
+ \vskip\teksthoogte
+ \vskip\voetafstand
+ \vskip\voethoogte
+ \doplaatsbeeldmerken\v!voet\vbox
+ \vfilll
+ \doplaatsbeeldmerken\v!onder\vbox%
+ \vskip\kopwit}
+ \smashbox#1}
+
+\def\setlogoboxes%
+ {\showmessage{\m!layouts}{7}{}%
+ \setlogobox\leftlogos\relax
+ \ifdubbelzijdig
+ \setlogobox\rightlogos\doswapmargins
+ \fi}
+
+\def\getlogobox%
+ {\ifnum\logostatus>0
+ \ifnum\logostatus=3
+ \setlogoboxes
+ \gdef\logostatus{2}%
+ \else\ifnum\logostatus=2
+ \setlogoboxes
+ \gdef\logostatus{1}%
+ \else\ifnewlogos
+ \gdef\logostatus{2}%
+ \setlogoboxes
+ \gdef\logostatus{1}%
+ \global\newlogosfalse
+ \fi\fi\fi
+ \doifmarginswapelse
+ {\copy\leftlogos}
+ {\copy\rightlogos}%
+ \fi}
+
+%I n=Spatiering
+%I c=\stelspatieringin
+%I c=\omlaag,\opelkaar,\spatie,\vastespaties
+%I
+%I De ruimte na interpunctie worden ingesteld met:
+%I
+%I \stelspatieringin[instelling]
+%I
+%I waarbij de volgende instellingen mogelijk zijn:
+%I
+%I ruim flexibele ruimte na interpunctie
+%I opelkaar een spatie na interpunctie
+%I
+%I Bij een smalle layout levert de instelling 'ruim' minder
+%I in de marge uitstekende (niet af te breken) woorden op.
+%I
+%P
+%I Andere commando's zijn:
+%I
+%I \omlaag[afstand] een vaste afstand omlaag
+%I \opelkaar ruimte tussen regels weghalen
+%I
+%I \spatie een (harde) spatie
+%I \geenspatie geen vorige/volgende spatie
+%I
+%I \hfil \hfill \hfilll opvullen met horizontaal wit
+%I \vfil \vfill \vfilll opvullen met vertikaal wit
+%I
+%I \strut karakter-box zonder breedte
+%I
+%I \vastespaties geeft ~ de breedte van een cijfer
+
+% \frenchspacing leidt soms tot afbreken tussen -, vandaar
+% de variant \newfrenchspacing.
+
+\def\dofrenchspacing#1%
+ {\sfcode`\.#1 \sfcode`\,#1\relax
+ \sfcode`\?#1 \sfcode`\!#1\relax
+ \sfcode`\:#1 \sfcode`\;#1\relax}
+
+\def\frenchspacing%
+ {\dofrenchspacing{1000}} % \@m
+
+\def\newfrenchspacing%
+ {\dofrenchspacing{1050}} % \@ml
+
+\def\dostelspatieringin[#1]%
+ {\processaction
+ [#1]
+ [\v!opelkaar=>\newfrenchspacing,
+ \v!ruim=>\nonfrenchspacing]}
+
+\def\stelspatieringin%
+ {\dosingleargument\dostelspatieringin}
+
+\def\space%
+ { }
+
+\def\spatie% kan tzt vervallen, eerst overal in zetten
+ { }
+
+\def\hardespatie%
+ {~}
+
+\bgroup
+\catcode`\~=\@@active % eigenlijk is ~ al actief
+\gdef\fixedspaces% % in Plain \TeX, maar we weten
+ {\catcode`\~=\@@active % nooit wat er inmiddels is
+ \def~{\hskip.5em}} % gebeurd, vandaar.
+\egroup
+
+\def\nospace%
+ {\unskip\ignorespaces}
+
+\def\geenspatie% % kan tzt vervallen, eerst overal in zetten
+ {\unskip\ignorespaces}
+
+\def\geenspaties{\geenspaties} % kan weg
+
+\def\opelkaar%
+ {\nointerlineskip}
+
+\def\omlaag[#1]%
+ {\nointerlineskip%
+ \vskip#1 }
+
+%I n=Witruimte
+%I c=\stelwitruimtein,\witruimte,\geenwitruimte
+%I c=\startopelkaar,\startvanelkaar
+%I c=\startregelcorrectie,\corrigeerwitruimte
+%I
+%I De afstand tussen paragrafen is in te stellen met:
+%I
+%I \stelwitruimtein[maat]
+%I
+%I In te vullen op de plaats van 'maat' (12pt, 1cm) of een
+%I van de aanduidingen klein, middel of groot. Als niets
+%I wordt meegegeven, dus alleen \stelwitruimtein, dan
+%I wordt de ingestelde witruimte aangepast aan het formaat
+%I letter.
+%I
+%I Voor elke lege regel in de ASCII-file voegt TEX de
+%I ingestelde witruimte tussen.
+%I
+%I Het commando \witruimte dwingt witruimte af en het
+%I commando \geenwitruimte maakt witruimte ongedaan.
+%I
+%I Behalve met de hier beschreven witruimte-commando's is de
+%I witruimte tussen paragrafen te be‹nvloeden met behulp van
+%I de elders beschreven blanko-commando's.
+%P
+%I Een stuk tekst kan zonder witruimte worden gezet door het
+%I tussen de volgende commando's op te nemen:
+%I
+%I \startopelkaar
+%I \stopopelkaar
+%I
+%I Waarbij een optioneel argument [blanko] mogelijk is. De
+%I tegenhanger hiervan is:
+%I
+%I \startvanelkaar
+%I \stopvanelkaar
+%P
+%I TeX handelt de interlinie van een (omlijnde) box of een
+%I rule anders af dan van een regel tekst. In dergelijke
+%I gevallen kan de volgende constructie worden gebruikt:
+%I
+%I \startregelcorrectie
+%I \omlijnd{tekst}
+%I \stopregelcorrectie
+
+\newskip\tussenwit
+\tussenwit=\!!zeropoint
+
+\def\blankokleinmaat%
+ {\smallskipamount}
+
+\def\blankomiddelmaat%
+ {\medskipamount}
+
+\def\blankogrootmaat%
+ {\bigskipamount}
+
+\def\currentwitruimte%
+ {\!!zeropoint}
+
+\def\stelwitruimteopnieuwin%
+ {\expanded{\stelwitruimtein[\currentwitruimte]}}
+
+\def\dodostelwitruimtein[#1]%
+ {\processallactionsinset
+ [#1]
+ [\v!herstel=>\parskip=\tussenwit,
+ \v!regel=>\edef\currentwitruimte{#1}%
+ \tussenwit=\baselineskip
+ \parskip=\tussenwit,
+ \v!vast=>\tussenwit=1\tussenwit
+ \parskip=1\parskip,
+ \s!default=>\doifnot{\currentwitruimte}{\v!geen}
+ {\stelwitruimteopnieuwin},
+ \s!unknown=>\edef\currentwitruimte{#1}%
+ \assigndimension{#1}
+ {\tussenwit}{\blankokleinmaat}
+ {\blankomiddelmaat}{\blankogrootmaat}%
+ \parskip=\tussenwit]}
+
+\def\dostelwitruimtein[#1]%
+ {\expanded{\dodostelwitruimtein[#1]}}
+
+\def\stelwitruimtein%
+ {\dosingleempty\dostelwitruimtein}
+
+\def\geenwitruimte%
+ {\ifdim\parskip>\!!zeropoint\relax
+ \ifdim\lastskip=-\parskip
+ \else
+ \vskip-\parskip
+ \fi
+ \fi}
+
+% deze variant is nodig binnen \startopelkaar
+% steeds testen:
+%
+% \hoofdstuk{..}
+% \plaatslijst[..]
+% \hoofdstuk{..}
+% \input tufte
+%
+% met/zonder witruimte
+
+\def\witruimte%
+ {\par
+ \ifdim\parskip>\!!zeropoint\relax
+ %\ifdim\lastskip>\parskip \else
+ % \removelastskip interferes with blanko blokkeer en klein
+ \vskip\parskip
+ %\fi
+ \fi}
+
+
+\def\nonoblanko[#1]%
+ {\par}
+
+\def\noblanko%
+ {\dosingleempty\nonoblanko}
+
+% De onderstaande macro handelt ook de situatie dat er geen
+% tekst tussen \start ... \stop is geplaatst. Daartoe wordt de
+% laatste skip over de lege tekst heen gehaald. Dit komt goed
+% van pas bij het plaatsen van (mogelijk lege) lijsten.
+
+\newif\ifopelkaar
+
+\def\noparskipsignal {0.00001pt}
+\def\lastdoneparskip {0pt}
+
+\def\dostartopelkaar[#1]%
+ {\par
+ \ifvmode
+ \edef\lastdoneparskip{\the\lastskip}%
+ \ifdim\prevdepth=-1000pt % toegevoegd omdat binnen
+ \else % een vbox een extra skip
+ \witruimte % ongewenst is; dit kan
+ \vskip\noparskipsignal % waarschijnlijk ook in
+ \fi % blanko blokkeer
+ \bgroup
+ \doifelse{#1}{\v!blanko}
+ {\opelkaarfalse}
+ {\opelkaartrue}%
+ \blanko[\v!blokkeer]%
+ \stelwitruimtein[\v!geen]
+ \fi}
+
+\def\startopelkaar%
+ {\dosingleempty\dostartopelkaar}
+
+\def\stopopelkaar%
+ {\par
+\ifvmode
+ \egroup
+ \ifdim\lastskip=\noparskipsignal\relax
+ \removelastskip
+ \geenwitruimte
+ \vskip-\lastdoneparskip
+ \vskip+\lastdoneparskip
+ \fi
+\fi}
+
+\def\startvanelkaar%
+ {\blanko
+ \leavevmode
+ \bgroup}
+
+\def\stopvanelkaar%
+ {\egroup
+ \blanko}
+
+% De onderstaande macro's moeten nog eens nader worden uitgewerkt.
+% Ze spelen een rol bij de spatiering rond omkaderde teksten
+% en/of boxen zonder diepte.
+
+\def\toonregelcorrectie {\showbaselinecorrection}
+\def\regelcorrectie {\baselinecorrection}
+%\def\startregelcorrectie {\startbaselinecorrection}
+%\def\stopregelcorrectie {\stopbaselinecorrection}
+
+\definecomplexorsimpleempty\startregelcorrectie
+
+% \prevdepth crosses pageboundaries!
+
+\let\dorondomregelcorrectie=\relax
+
+\def\complexstartregelcorrectie[#1]%
+ {\bgroup
+ \processaction
+ [#1]
+ [ \v!blanko=>\let\dorondomregelcorrectie=\blanko,
+ \s!unknown=>{\def\dorondomregelcorrectie{\blanko[#1]}},
+ \s!default=>\let\dorondomregelcorrectie=\relax]%
+ \dorondomregelcorrectie
+ \startbaselinecorrection}
+
+\def\stopregelcorrectie%
+ {\stopbaselinecorrection
+ \dorondomregelcorrectie
+ \egroup}
+
+\def\corrigeerwitruimte%
+ {\dowithnextbox
+ {\startbaselinecorrection
+ \box\nextbox
+ \stopbaselinecorrection}%
+ \vbox}
+
+%I n=Regelafstand
+%I c=\stelinterliniein
+%I
+%I De regelafstand is in te stellen met het commando:
+%I
+%I \stelinterliniein[factor]
+%I
+%I Invulmogelijkheden voor 'factor' zijn: klein (1.00),
+%I middel (1.25), groot (1.50) of een getal. OOk kan
+%I aan of uit worden opgegeven.
+%I
+%I Als het commando zonder [factor] wordt gegeven, dan
+%I worden de interlinie aangepast aan het formaat van het
+%I actuele letterformaat. Een aan het formaat aangepaste
+%I interlinie kan ook worden ingesteld met:
+%I
+%I \stelinterliniein[reset,factor]
+%I
+%I In z'n eenvoudigste vorm \stelinterliniein wordt de
+%I interlinie aangepast aan het formaat letter.
+
+\def\complexstelinterliniein[#1]%
+ {\processallactionsinset % \regelwit = dummy !
+ [#1]
+ [ \v!aan=>\oninterlineskip,
+ \v!uit=>\offinterlineskip,
+ \v!reset=>\setfontparameters,
+ \s!unknown=>\assignvalue{#1}{\regelwit}{1.00}{1.25}{1.50}%
+ \spacing{\regelwit}]}
+
+\def\simplestelinterliniein%
+ {\setfontparameters}
+
+\definecomplexorsimple\stelinterliniein
+
+%I n=Blanko
+%I c=\blanko,\geenblanko,\stelblankoin
+%I c=\startregelcorrectie
+%I
+%I Behalve met de hier beschreven blanko-commando's is de
+%I witruimte tussen paragrafen te be‹nvloeden met behulp van
+%I de elders beschreven witruimte-commando's.
+%I
+%I Het commando
+%I
+%I \blanko[sprong]
+%I
+%I voegt witruimte tussen paragrafen toe.
+%I
+%I Mogelijke instellingen voor 'sprong' zijn: terug, klein,
+%I middel, groot. Per blanko is elke combinatie van
+%I instellingen toegestaan. Ook een veelvoud van een instelling
+%I is mogelijk. Enkele voorbeelden:
+%I
+%I \blanko[terug,3*groot]
+%I \blanko[klein,middel]
+%P
+%I Naast de genoemde instellingen zijn enkele bijzondere
+%I instellingen mogelijk:
+%I
+%I wit tussenvoegen van \witruimte
+%I geenwit terugspringen van \witruimte
+%I blokkeer overslaan van de volgende \blanko
+%I reset opheffen van \blanko[blokkeer]
+%I forceer afdwingen van een blanko (bovenaan)
+%I
+%I Ook deze instellingen zijn in combinatie met andere te
+%I gebruiken. Een voorbeeld: \blanko[forceer,wit,2*middel].
+%I
+%I Het commando \blanko (zonder instelling) is gelijk aan
+%I \blanko[groot].
+%I
+%I Het commando \geenblanko maakt het commando \blanko
+%I ongedaan.
+%P
+%I Met het commando's
+%I
+%I \stelblankoin[maat]
+%I
+%I is het mogelijk de spronggrootte in te stellen. De maat
+%I kan worden opgegeven in getallen en eenheden (12pt, 1cm).
+%I De standaard instellingen krijgt met met 'normaal',
+%I regelafstanden met 'regel'.
+%I
+%I Het commando \stelblankoin (zonder argument) past de sprong
+%I aan het formaat letter aan.
+%P
+%I Rond omlijnde tekst, of algemener: rond lijnen, wordt
+%I geen witruimte gegenereerd. Wil men dit wel, dan dient men
+%I de betreffende tekst te omringen met:
+%I
+%I \startregelcorrectie
+%I \stopregelcorrectie
+
+% In earlier versions \type{\bigskipamount} was
+% \type{\ht\strutbox} and the stretch was plus or minus
+% \type{.4\dp\strutbox}. Don't ask me why. The most recent
+% implementation is based on a user supplied distance, which
+% is by default \type{.75\normalskipamount} where
+% \type{\normalskipamount} equals the current baseline
+% distance.
+
+\newif\ifblankoreset \blankoresetfalse
+\newif\ifblankoblokkeer \blankoblokkeerfalse
+\newif\ifblankogeenwit \blankogeenwitfalse
+\newif\ifdoeblanko \doeblankofalse
+\newif\ifblankoflexibel \blankoflexibeltrue
+\newif\ifblankobuiten
+
+\newskip\blankoskip \blankoskip=\bigskipamount
+\newskip\blankoskipamount
+
+\def\skipfactor {.75}
+\def\skipgluefactor {.25}
+
+\def\normalskipamount%
+ {\openlineheight
+ \ifblankoflexibel
+ \!!plus\skipgluefactor\openlineheight
+ \!!minus\skipgluefactor\openlineheight
+ \fi
+ \relax}
+
+\def\regelafstand{\normalskipamount}
+
+\def\deblankoskip{\skipfactor\regelafstand}
+
+\def\laatsteblankoskip%
+ {\blankoskip}
+
+\def\geenblanko%
+ {\removelastskip}
+
+\def\dosingleblanko#1%
+ {\assigndimension{#1}{\blankoskipamount}%
+ {\smallskipamount}{\medskipamount}{\bigskipamount}%
+ \global\advance\blankoskip by \blankoskipamount}
+
+\def\doblanko#1%
+ {\processallactionsinset
+ [#1]
+ [ \v!groot=>\dosingleblanko\v!groot, % happens often
+ \v!buiten=>\ifvmode\ifinner\blankobuitentrue\fi\fi,
+ \v!reset=>\global\blankoresettrue,
+ \v!terug=>\geenblanko,
+ \v!wit=>\global\advance\blankoskip by \parskip,
+ \v!formule=>\global\advance\blankoskip by \medskipamount,
+ \v!geenwit=>\global\blankogeenwittrue,
+ -\v!wit=>\global\advance\blankoskip by -\parskip,
+ \v!blokkeer=>\global\blankoblokkeertrue,
+ \v!forceer=>\endgraf\hrule \!!height \!!zeropoint\relax,
+ \v!regel=>\global\advance\blankoskip by \lineheight,
+ \s!unknown=>{\herhaalmetcommando[#1]\dosingleblanko}]}
+
+\def\oldprevdepth{\prevdepth}%
+\def\newprevdepth{-1001pt}
+
+\def\mindimen{0.00002pt}
+
+\def\docomplexdoblanko[#1]%
+ {\global\blankoresetfalse
+ \global\blankoblokkeerfalse
+ \global\blankogeenwitfalse
+ \global\blankoskip=\!!zeropoint\relax
+ \blankobuitenfalse
+ \processcommalist[#1]\doblanko
+ \ifblankobuiten
+ \else
+ \par
+ \ifvmode
+ \ifblankoblokkeer
+ \global\doeblankofalse
+ \edef\oldprevdepth{\the\prevdepth}%
+ \prevdepth=\newprevdepth
+ \else
+ \global\doeblankotrue
+ \fi
+ \ifblankoreset
+ \global\doeblankotrue
+ \ifdim\prevdepth=\newprevdepth
+ \prevdepth=\oldprevdepth
+ \fi
+ \fi
+ \ifdoeblanko
+ \ifdim\lastskip<\blankoskip\relax
+ % else when \blanko[2*groot] + \blanko[3*groot] with parskip
+ % equaling 1*groot, gives a groot=\parskip so adding a small
+ % value makes it distinguishable; can also be done at parskip
+ % setting time (better)
+ \global\advance\blankoskip by \mindimen\relax % = skip
+ % test this on 2* + 3* and parskip groot
+ \ifblankogeenwit
+ \global\advance\blankoskip by -\parskip
+ \else
+ \ifdim\lastskip=\parskip
+ \else % force this due to previous comment
+ \ifdim\parskip>\!!zeropoint\relax
+ \ifdim\blankoskip<\parskip\relax
+ \global\blankoskip=\!!zeropoint
+ \else
+ \global\advance\blankoskip by -\parskip
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifdim\prevdepth=\newprevdepth
+ \else
+ \removelastskip
+ \vskip\blankoskip
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\def\complexdoblanko[#1]%
+ {\flushfootnotes
+ \ifopelkaar
+ \ifinpagebody
+ \expanded{\docomplexdoblanko[#1]}% \expanded=nieuw
+ \else
+ \par
+ \fi
+ \else
+ \expanded{\docomplexdoblanko[#1]}% \expanded = nieuw
+ \fi}
+
+\def\currentblanko%
+ {\v!groot}
+
+\def\simpledoblanko%
+ {\doifelse{\currentwitruimte}{\v!geen}
+ {\blanko[\currentblanko]}
+ {\blanko[\currentwitruimte]}}
+
+\def\blanko%
+ {\complexorsimple{doblanko}}
+
+\def\dostelblankoin#1%
+ {\bgroup
+ \skip0=#1\relax
+ \xdef\globalblanko{\the\skip0}%
+ \egroup
+ \bigskipamount=\globalblanko
+ \smallskipamount=\globalblanko
+ \medskipamount=\globalblanko
+ \divide\medskipamount by 2\relax
+ \divide\smallskipamount by 4\relax}%
+
+\def\complexstelblankoin[#1]%
+ {\ExpandFirstAfter\processallactionsinset
+ [#1]
+ [ \v!flexibel=>\blankoflexibeltrue,
+ \v!vast=>\blankoflexibelfalse]%
+ \ExpandFirstAfter\processallactionsinset
+ [#1]
+ [ \v!flexibel=>\dostelblankoin{\deblankoskip},
+ \v!vast=>\dostelblankoin{\deblankoskip},
+ \v!regel=>\edef\deblankoskip{\regelafstand}%
+ \dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot,
+ \v!groot=>\def\currentblanko{\v!groot}%
+ \let\deblanko=\v!groot,
+ \v!middel=>\def\currentblanko{\v!middel}%
+ \let\deblanko=\v!middel,
+ \v!klein=>\def\currentblanko{\v!klein}%
+ \let\deblanko=\v!klein,
+ \v!normaal=>\dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot,
+ \v!standaard=>\edef\deblankoskip{\skipfactor\regelafstand}%
+ \dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot,
+ \s!default=>\dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot,
+ \s!unknown=>\let\deblankoskip=\commalistelement
+ \dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot]%
+ \stelwitruimtein}
+
+\def\stelblankoin%
+ {\complexorsimpleempty{stelblankoin}}
+
+%I n=Inspringen
+%I c=\inspringen,\nietinspringen,\welinspringen
+%I c=\stelinspringenin
+%I
+%I Het inspringen van de eerste regel van een paragraaf
+%I wordt ingesteld met het commando:
+%I
+%I \inspringen[parameter]
+%I
+%I waarbij als parameter kan worden meegegeven:
+%I
+%I niet de volgende paragraaf niet inspringen
+%I nooit de volgende paragrafen niet inspringen
+%I altijd de volgende paragrafen inspringen
+%I
+%I De mate van inspringen wordt ingesteld met:
+%I
+%I \stelinspringenin[maat]
+%I
+%I waarbij maat staat voor een TeX-maat of het woord klein,
+%I middel, groot of geen.
+
+\def\currentvoorwit{}
+
+\newdimen\voorwit
+
+\def\dostelinspringenin[#1]%
+ {\doifsomething{#1}{\def\currentvoorwit{#1}}%
+ \assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}%
+ \parindent=\voorwit\relax}
+
+\def\stelinspringenin%
+ {\dosingleempty\dostelinspringenin}
+
+\def\doinspringen[#1]%
+ {\processaction
+ [#1]
+ [ \v!nee=>\parindent=\voorwit\relax\noindent,
+ \v!niet=>\parindent=\voorwit\relax\noindent,
+ \v!ja=>\parindent=\voorwit\relax, % geen \indent !
+ \v!altijd=>\parindent=\voorwit\relax, % geen \indent !
+ \v!nooit=>\parindent=\!!zeropoint\relax]}
+
+\def\inspringen%
+ {\dosingleargument\doinspringen}
+
+\def\nietinspringen{\inspringen[\v!nee]}
+\def\welinspringen{\inspringen[\v!ja]}
+
+%I n=Verhogen,Verlagen
+%I c=\laag,\hoog,\laho
+%I
+%I Met de volgende commando's kunnen letters en woorden
+%I worden verhoogd en verlaagd.
+%I
+%I \laag{tekst}
+%I \hoog{tekst}
+%I \laho{lage tekst}{hoge tekst}
+
+\def\holatextfont{\tx}
+\def\holamathfont{\the\scriptfont\fam}
+
+\def\dodohooglaag#1%
+ {\doifelsenothing{\fontsize}
+ {\ifnum\fam<0 \holatextfont\else\holamathfont\fi#1}
+ {\holatextfont#1}}
+
+\def\dohooglaag#1#2#3#4#5%
+ {\bgroup
+ \ifdim\fontdimen5\textfont2=1ex
+ \dimen0=\fontdimen#1\textfont2
+ \else
+ \dimen0=#2ex
+ \fi
+ \advance\dimen0 by #3\relax
+ \kern.1ex
+ \setbox0=\hbox{#4\dimen0\hbox{\dodohooglaag{#5}}}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \box0
+ \egroup}
+
+\unexpanded\def\hoog%
+ {\dohooglaag{14}{.86}\!!zeropoint\raise}
+
+\unexpanded\def\laag%
+ {\dohooglaag{16}{.48}\!!zeropoint\lower}
+
+\unexpanded\def\laho#1#2%
+ {\hbox%
+ {\setbox4=\hbox{\dohooglaag{16}{.48}{.1ex}{\lower}{#1}}%
+ \setbox6=\hbox{\dohooglaag{14}{.86}{.1ex}{\raise}{#2}}%
+ \ifdim\wd4<\wd6\relax
+ \wd4=\!!zeropoint\box4\box6\relax
+ \else
+ \wd6=\!!zeropoint\box6\box4\relax
+ \fi}}
+
+%I n=Kapitalen
+%I c=\kap,\Kap,\KAP,\Kaps,\Woord,\Woorden,\opgerekt
+%I
+%I Kapitalen kunnen in een kleiner letterformaat worden
+%I weergegeven met de commando's:
+%I
+%I \kap{tekst}
+%I \Kap{tekst}
+%I \KAP{tekst}
+%I
+%I Bij het eerste commando wordt de hele tekst in kapitalen
+%I gezet, bij het tweede alleen de eerste letter en bij het
+%I laatste commando de letters die worden voorafgegaan door
+%I \\, bijvoorbeeld \KAP{\\Commissie \\Ziezo}.
+%I
+%I Als de tekst van het laatste commando uit woorden bestaat,
+%I kan ook het volgende commando worden gebruikt:
+%I
+%I \Kaps{tekst tekst tekst}
+%I
+%I In dat geval zijn geen \\ nodig.
+%P
+%I Binnen \kap kan \nokap worden gebruikt om een kleine
+%I letter af te dwingen: \kap{AM\nokap{v}B}.
+%I
+%I Een eerste letter(s) van een of meer woorden kunnen worden
+%I omgezet in een hoofdletter met het commando
+%I
+%I \Woord{woord}
+%I \Woorden{woord woord woord ...}
+%I
+%I Een heel woord kan in hoofdletters worden omgezet met:
+%I
+%I \WOORD{tekst}
+%P
+%I Woorden kunnen worden uitgerekt over de actuele breedte
+%I met:
+%I
+%I \opgerekt{tekst}
+%I
+%I bijvoorbeeld:
+%I
+%I \hbox to 20em{\opgerekt{abcdef\\ghijk}}
+%I
+%I met \\ of {} wordt een spatie afgedwongen.
+
+%T n=kap
+%T m=kap
+%T a=k
+%T
+%T \kap{?}
+
+%I n=Afbreken
+%I c=\stelkoppeltekenin
+%I
+%I Met streepjes (-, --, ---) verbonden worden alleen afgebroken
+%I op de plaats van het streepje. Wil men kunnen afbreken op
+%I andere plaatsen, dan moet men de volgende constructie
+%I gebruiken:
+%I
+%I ditiseen|---|heellangwoord|--|hoeweleigenlijkis|-|heteenzin
+%I
+%I Het is ook mogelijk geen teken mee te geven:
+%I
+%I ditiseen||heellangwoord
+%I
+%I In dat geval wordt het ingestelde teken tussengevoegd. Het
+%I teken kan worden ingesteld met:
+%I
+%I \stelkoppeltekenin[teken=]
+%I
+%I Betekenisvolle waarden zijn: - en --, eventueel kan ~
+%I worden meegegeven. In dat geval wordt een \thinspace
+%I geplaatst.
+%P
+%I Een |~| levert midden in de zin een spatie en aan het
+%I eind van de zin een streepje, || is standaard equivalent
+%I met |--|.
+%I
+%I Het koppelteken zelf kan worden opgeroepen met |=|,
+%I bijvoorbeeld in alfa|=| en beta||deeltjes. Dit levert
+%I dus alfa- en beta-deeltjes of alfa-- en beta--deeltjes.
+%I Andere instellingen worden afgevangen.
+%I
+%I Ook ( en ) worden afgevangen. Hierbij wordt bij het
+%I afbreken van voor(na) op de volgende regel (-na)
+%I geplaatst. En wat te denken van |<| en |>|.
+
+% we use module supp-lan.tex
+
+\installdiscretionaries || \@@kpteken
+
+\newsignal\subsentencesignal
+\newcounter\subsentencelevel
+\def\subsentenceskip{.25em}
+
+\def\stelkoppeltekenin%
+ {\dodoubleargument\getparameters[\??kp]}
+
+\def\beginofsubsentence%
+ {\ifdim\lastkern=\subsentencesignal \else
+ \unskip
+ \fi
+ \ifdim\lastkern=\subsentencesignal
+ \unskip
+ \hskip\subsentenceskip
+ \else
+ \normalspace
+ \fi
+ \doglobal\increment\subsentencelevel
+ \ifnum\subsentencelevel=1
+ \leaveoutervmode
+ \fi
+ \ifodd\subsentencelevel
+ \getvalue{\??la\currentlanguage\c!leftsentence}%
+ \else
+ \getvalue{\??la\currentlanguage\c!leftsubsentence}%
+ \fi
+ \ignorespaces}
+
+\def\beginofsubsentencespacing%
+ {\kern\subsentencesignal}
+
+\def\endofsubsentence%
+ {\ifodd\subsentencelevel
+ \getvalue{\??la\currentlanguage\c!rightsentence}%
+ \else
+ \getvalue{\??la\currentlanguage\c!rightsubsentence}%
+ \fi
+ \doglobal\decrement\subsentencelevel
+ \kern\subsentencesignal
+ \normalspace}
+
+\def\endofsubsentencespacing%
+ {\ifdim\lastkern=\subsentencesignal \else
+ \unskip
+ \fi
+ \ifdim\lastkern=\subsentencesignal
+ \unskip
+ \hskip\subsentenceskip
+ \fi}
+
+\enableactivediscretionaries
+
+%I n=Positioneren
+%I c=\startpositioneren,\stelpositionerenin
+%I
+%I Er kan (binnen zekere grenzen) gepositioneerd worden met
+%I de commando's:
+%I
+%I \startpositioneren
+%I \stoppositioneren
+%I
+%I met daartussen
+%I
+%I \positioneer(x,y){...}
+%I
+%I waarbij x en y alleen getallen worden ingevuld. Ongewenste
+%I spaties moeten zonodig met worden voorkomen met een %-teken.
+%P
+%I Een en ander kan worden ingesteld met:
+%I
+%I \stelpositionerenin[eenheid=,factor=,schaal=,xstap=,
+%I ystap=,xoffset=,yoffset=,offset=]
+%I
+%I Standaard is de eenheid cm en de factor 1. Mogelijke
+%I stapaanduidingen zijn 'absoluut' en 'relatief'. Deze
+%I instellingen kunnen \resetpositioneren worden hersteld.
+%I
+%I Als men negatieve coordinaten (of een negatieve offset)
+%I gebruikt, dan kan het soms wenselijk zijn het nulpunt te
+%I laten samenvallen met de linkerbovenhoek van de omringende
+%I box. In dat geval kan met offset=nee instellen. De negatieve
+%I posities vallen in dat geval buiten de box.
+
+% Het gebruik van \skip's spaart \dimen's.
+
+\newskip\xpositie
+\newskip\ypositie
+
+\newskip\xafmeting
+\newskip\yafmeting
+
+\newskip\xoffset
+\newskip\yoffset
+
+\newbox\positiebox
+
+\def\startpositioneren%
+ {\bgroup
+ \xpositie=\!!zeropoint
+ \ypositie=\!!zeropoint
+ \xafmeting=\!!zeropoint
+ \yafmeting=\!!zeropoint
+ \xoffset=\!!zeropoint
+ \yoffset=\!!zeropoint
+ \hfuzz=30cm
+ \vfuzz=30cm
+ \setbox\positiebox=\hbox\bgroup}
+
+\def\stoppositioneren%
+ {\doifnot{\@@psoffset}{\v!ja}
+ {\global\xoffset=\!!zeropoint
+ \global\yoffset=\!!zeropoint}%
+ \global\advance\xafmeting by \xoffset
+ \global\advance\yafmeting by \yoffset
+ \egroup
+ \vbox to \yafmeting
+ {\vskip\yoffset
+ \hbox to \xafmeting
+ {\hskip\xoffset
+ \box\positiebox
+ \hfill}%
+ \vfill}%
+ \egroup}
+
+\def\resetpositioneren%
+ {\getparameters[\??ps]
+ [\c!eenheid=\s!cm,
+ \c!factor=1,
+ \c!xfactor=\@@psfactor,
+ \c!yfactor=\@@psfactor,
+ \c!schaal=1,
+ \c!xschaal=\@@psschaal,
+ \c!yschaal=\@@psschaal,
+ \c!xstap=\v!absoluut,
+ \c!ystap=\v!absoluut,
+ \c!xoffset=\!!zeropoint,
+ \c!yoffset=\!!zeropoint]}
+
+\resetpositioneren
+
+\def\stelpositionerenin%
+ {\resetpositioneren%
+ \dodoubleargument\getparameters[\??ps]}%
+
+\def\positioneer(#1,#2)#3% \nextbox
+ {\setbox0=\hbox{#3}%
+ \def\berekenpositioneren##1##2##3##4##5##6##7##8##9%
+ {\skip0=##1\@@pseenheid\relax
+ \skip0=##8\skip0\relax
+ \skip0=##9\skip0\relax
+ \doifelse{##2}{\v!relatief}%
+ {\advance\skip0 by ##3\relax
+ \advance\skip0 by ##4\relax
+ \def##4{\!!zeropoint}}%
+ {\advance\skip0 by ##4\relax}%
+ ##3=\skip0\relax
+ \ifdim##3<-##7\relax
+ \global##7=-##3\relax
+ \fi
+ \skip2=##5\relax
+ \advance\skip2 by ##3\relax
+ \ifdim\skip2>##6\relax
+ \global##6=\skip2\relax
+ \fi}%
+ \berekenpositioneren{#1}{\@@psxstap}{\xpositie}
+ {\@@psxoffset}{\wd0}{\xafmeting}{\xoffset}
+ {\@@psxschaal}{\@@psxfactor}%
+ \skip4=\ht0 \advance\skip4 by \dp0
+ \berekenpositioneren{#2}{\@@psystap}{\ypositie}
+ {\@@psyoffset}{\skip4}{\yafmeting}{\yoffset}
+ {\@@psyschaal}{\@@psyfactor}%
+ \vbox to \!!zeropoint
+ {\vskip\ypositie
+ \hbox to \!!zeropoint
+ {\hskip\xpositie
+ \box0
+ \hskip-\xpositie}%
+ \vskip-\ypositie}%
+ \ignorespaces}
+
+\def\dorooster[#1]%
+ {\bgroup
+ \getparameters[\??rt]
+ [\c!nx=10,\c!ny=10,
+ \c!dx=.5,\c!dy=.5,
+ \c!xstap=0,\c!ystap=0,
+ \c!eenheid=\s!cm,
+ \c!schaal=1,
+ \c!factor=1,
+ \c!offset=\v!ja,
+ #1]%
+ \startpositioneren
+ \dimen0=\@@rtdx\@@rteenheid
+ \dimen0=\@@rtschaal\dimen0
+ \dimen0=\@@rtfactor\dimen0
+ \multiply\dimen0 by \@@rtnx
+ \dimen2=\@@rtdy\@@rteenheid
+ \dimen2=\@@rtschaal\dimen2
+ \dimen2=\@@rtfactor\dimen2
+ \multiply\dimen2 by \@@rtny
+ \def\horline
+ {\vbox
+ {\hrule
+ \!!width \dimen0
+ \!!height \lijndikte
+ \!!depth \!!zeropoint}}%
+ \def\verline%
+ {\vrule
+ \!!width \lijndikte
+ \!!height \dimen2
+ \!!depth \!!zeropoint}%
+ \def\setlegend##1##2%
+ {\global\!!countc=0
+ \dimen0=2em
+ \dimen2=##2\@@rteenheid
+ \dimen2=\@@rtschaal\dimen2
+ \dimen2=\@@rtfactor\dimen2
+ \divide\dimen0 by \dimen2
+ \global\!!counte=\dimen0
+ \ifnum\!!counte>50
+ \global\!!counte=100
+ \else\ifnum\!!counte>10
+ \global\!!counte=50
+ \else\ifnum\!!counte>5
+ \global\!!counte=10
+ \else\ifnum\!!counte>1
+ \global\!!counte=5
+ \else
+ \global\!!counte=1
+ \fi\fi\fi\fi
+ \global\!!countd=0
+ \def\legend%
+ {\ifnum\!!countd=0
+ \vbox
+ {\hbox to 2em{\hss\the\!!countc\hss}}%
+ \global\!!countd=\!!counte
+ \fi
+ \global\advance\!!countd by -1
+ \global\advance\!!countc by ##1}}%
+ \def\draw##1##2##3##4##5##6##7%
+ {\stelpositionerenin
+ [\c!xstap=\v!absoluut,
+ \c!ystap=\v!absoluut,
+ \c!eenheid=\@@rteenheid,
+ \c!schaal=\@@rtschaal,
+ \c!factor=\@@rtfactor,
+ \c!offset=\@@rtoffset,
+ \c!xoffset=##6,
+ \c!yoffset=##7]%
+ \positioneer(0,0){##1}%
+ \stelpositionerenin
+ [\c!xstap=\v!relatief,
+ \c!ystap=\v!relatief,
+ \c!schaal=\@@rtschaal,
+ \c!factor=\@@rtfactor,
+ \c!offset=\@@rtoffset,
+ \c!eenheid=\@@rteenheid]%
+ \dorecurse{##2}{\positioneer(##3,##4){##5}}}%
+ \draw{\verline}{\@@rtnx}{\@@rtdx}{0}{\verline}{\!!zeropoint}{\!!zeropoint}%
+ \draw{\horline}{\@@rtny}{0}{\@@rtdy}{\horline}{\!!zeropoint}{\!!zeropoint}%
+ \tfx
+ \doifnot{\@@rtxstap}{0}
+ {\setlegend{\@@rtxstap}{\@@rtdx}%
+ \draw{\legend}{\@@rtnx}{\@@rtdx}{0}{\legend}{-1em}{-1.5em}}%
+ \doifnot{\@@rtystap}{0}
+ {\setlegend{\@@rtystap}{\@@rtdy}%
+ \draw{\legend}{\@@rtny}{0}{\@@rtdy}{\legend}{-2em}{-.75ex}}%
+ \stoppositioneren
+ \egroup}
+
+\def\rooster%
+ {\dosingleempty\dorooster}
+
+%I n=Kolommen
+%I c=\stelkolommenin,\startkolommen,\kolom
+%I
+%I Tekst kan in kolommen worden gezet. Het aantal kolommen
+%I en het al dan niet opnemen van een vertikale lijn kan
+%I worden ingesteld.
+%I
+%I \stelkolommenin[n=,lijn=,tolerantie=,afstand=,
+%I balanceren=,uitlijnen=,hoogte=]
+%I
+%I Hierin staat n voor het aantal kolommen. Aan lijn
+%I kan aan of uit worden toegekend. Aan voor en na kan
+%I een commando worden toegekend, bijvoorbeeld ~~.
+%I
+%I Mogelijke waarden voor de tolerantie zijn: zeerstreng,
+%I streng, soepel en zeersoepel.
+%P
+%I De in kolommen te zetten tekst moet worden opgenomen
+%I tussen de commando's:
+%I
+%I \startkolommen
+%I \stopkolommen
+%I
+%I Er wordt naar een nieuwe kolom gesprongen met:
+%I
+%I \kolom
+
+\newif\ifbinnenkolommen
+\newif\if@@klbalanceren
+\newif\if@@kluitlijnen
+
+\binnenkolommenfalse
+
+\def\stelkolommenin%
+ {\dodoubleargument\getparameters[\??kl]}
+
+\def\linebetweencolumns%
+ {\bgroup
+ \startcolorpage
+ \ifdim\@@klafstand>\!!zeropoint
+ \dimen0=\@@klafstand
+ \else
+ \dimen0=\linewidth
+ \fi
+ \advance\dimen0 by -\linewidth
+ \hskip.5\dimen0
+ \vrule
+ \!!width\linewidth
+ \ifb@selinebottom\!!depth\strutdepth\fi
+ \hskip.5\dimen0\relax
+ \stopcolorpage
+ \egroup}
+
+\def\spacebetweencolumns%
+ {\hskip\@@klafstand}
+
+\presetlocalframed[\??kl]
+
+\def\backgroundfinishcolumnbox%
+ {\dimen0=\@@kloffset
+ \advance\dimen0 by -\@@kllijndikte
+ \localframed
+ [\??kl]
+ [\c!offset=\dimen0,
+ \c!strut=\v!nee,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!uitlijnen=]}
+
+\def\backgroundsetcolumntextheight%
+ {\dimen0=-\@@kloffset
+ \multiply\dimen0 by 2
+ \advance\dimen0 by \teksthoogte
+ \edef\columntextheight{\the\dimen0}}
+
+\def\backgroundsetcolumntextwidth%
+ {\dimen0=-\@@kloffset
+ \multiply\dimen0 by \nofcolumns
+ \multiply\dimen0 by 2
+ \advance\dimen0 by \tekstbreedte
+ \edef\columntextwidth{\the\dimen0}}
+
+\def\complexstartkolommen[#1]% %% \startkolommen
+ {\bgroup
+ \let\stopkolommen=\egroup
+ \ifbinnenkolommen
+ \else
+ \stelkolommenin[#1]%
+ \ifnum\@@kln>1\relax
+ \witruimte
+ \begingroup
+ \doif{\@@kloptie}{\v!achtergrond}
+ {\let\finishcolumnbox = \backgroundfinishcolumnbox
+ \let\setcolumntextheight = \backgroundsetcolumntextheight
+ \let\setcolumntextwidth = \backgroundsetcolumntextwidth}%
+% \doifelse{\@@kllijn}{\v!aan}
+% {\let\betweencolumns=\linebetweencolumns}
+% {\let\betweencolumns=\spacebetweencolumns}%
+ \processaction
+ [\@@kllijn]
+ [ \v!aan=>\let\betweencolumns=\linebetweencolumns,
+ \v!uit=>\let\betweencolumns=\spacebetweencolumns,
+ \s!default=>\let\betweencolumns=\spacebetweencolumns,
+ \s!unknown=>\let\betweencolumns=\@@kllijn]%
+ \doifelsenothing{\@@klhoogte}
+ {\heightencolumnsfalse}
+ {\heightencolumnstrue}%
+ \doifelse{\@@klbalanceren}{\v!ja}
+ {\balancecolumnstrue}
+ {\balancecolumnsfalse}%
+ \processaction % ook nog: laatsteuitlijnen
+ [\@@kluitlijnen]
+ [ \v!ja=>\stretchcolumnstrue
+ \inheritcolumnsfalse,
+ \v!nee=>\stretchcolumnsfalse
+ \inheritcolumnsfalse,
+ \v!tekst=>\stretchcolumnsfalse
+ \inheritcolumnstrue]%
+ \nofcolumns=\@@kln
+ \edef\fixedcolumnheight{\@@klhoogte}%
+ \steltolerantiein[\@@kltolerantie]% %% \startkolommen
+ \stelblankoin[\@@klblanko]%
+ \ifdim\tussenwit>\!!zeropoint
+ \stelwitruimtein[\@@klblanko]%
+ \fi
+ \def\stopkolommen%
+ {\endmulticolumns
+ \global\binnenkolommenfalse
+ \endgroup
+ \egroup}%
+ \global\binnenkolommentrue
+ \beginmulticolumns
+ \fi
+ \fi}
+
+\def\startkolommen%
+ {\complexorsimpleempty{startkolommen}}
+
+\def\kolom%
+ {\ifbinnenkolommen
+ \ejectcolumn
+ \fi}
+
+%I n=Kader
+%I c=\toonkader,\tooninstellingen,\toonlayout
+%I
+%I Met behulp van de drie commando's:
+%I
+%I \toonkader
+%I \tooninstellingen
+%I
+%I kan de zetspiegel zichtbaar worden gemaakt, of eventueel
+%I met:
+%I
+%I \toonkader [rand,tekst,marge]
+%I
+%I Het commando:
+%I
+%I \toonlayout
+%I
+%I genereert enkele (linker en rechter) pagina's.
+
+\def\complextoonkader[#1]%
+ {\stelachtergrondenin
+ [\v!hoofd,\v!tekst,\v!voet]
+ [#1]
+ [\c!achtergrond=,
+ \c!kader=\v!aan,
+ \c!hoek=\v!recht,
+ \c!kaderoffset=\!!zeropoint,
+ \c!kaderdiepte=\!!zeropoint,
+ \c!kaderkleur=]
+ \let\pageseparation=\!!zeropoint}
+
+\def\simpletoonkader%
+ {\complextoonkader
+ [\v!linkerrand,\v!linkermarge,
+ \v!tekst,
+ \v!rechtermarge,\v!rechterrand]}
+
+\definecomplexorsimple\toonkader
+
+\def\tooninstelling#1#2%
+ {\hbox
+ {\doifelse{#2}{\??ly}
+ {\dimen0=\getvalue{#2#1}}
+ {\dimen0=#2}%
+ \hbox to 9em{\strut#1\hfill}%
+ \hbox to 5em{\hfill\PtToCm{\the\dimen0}}%
+ \hbox to 6em{\hfill\the\dimen0}%
+ \doifnot{#2}{\??ly}
+ {\hskip 1em{\tttf\string#2}}}%
+ \par}
+
+\def\tooninstellingen% % engels maken
+ {\noindent
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \tooninstelling{papierhoogte}\papierhoogte
+ \tooninstelling{papierbreedte}\papierbreedte
+ \tooninstelling{printpapierhoogte}\printpapierhoogte
+ \tooninstelling{printpapierbreedte}\printpapierbreedte
+ \tooninstelling{kopwit}\kopwit
+ \tooninstelling{rugwit}\rugwit
+ \tooninstelling{hoogte}\zethoogte
+ \tooninstelling{breedte}\zetbreedte
+ \tooninstelling{teksthoogte}\teksthoogte
+ \tooninstelling{tekstbreedte}\tekstbreedte
+ \tooninstelling{bovenafstand}\??ly
+ \tooninstelling{hoofd}\hoofdhoogte
+ \tooninstelling{hoofdafstand}\??ly
+ \tooninstelling{boven}\bovenhoogte
+ \tooninstelling{voetafstand}\??ly
+ \tooninstelling{voet}\voethoogte
+ \tooninstelling{onderafstand}\??ly
+ \tooninstelling{onder}\onderhoogte
+ \tooninstelling{linkerrand}\linkerrandbreedte
+ \tooninstelling{linkerrandafstand}\??ly
+ \tooninstelling{linkermarge}\linkermargebreedte
+ \tooninstelling{linkermargeafstand}\??ly
+ \tooninstelling{rechtermargeafstand}\??ly
+ \tooninstelling{rechtermarge}\rechtermargebreedte
+ \tooninstelling{rechterrandafstand}\??ly
+ \tooninstelling{rechterrand}\rechterrandbreedte}}
+
+\def\toonlayout
+ {\bgroup
+ \pagina
+ \toonkader
+ \stellayoutin[\c!markering=\v!aan]
+ \herhaal[4*\tooninstellingen\pagina]
+ \egroup}
+
+% - meerdere niveaus (moet niet moeilijk zijn)
+% - instellingen in macro
+
+%I n=Opsomming
+%I c=\startopsomming,\som,\sub,\kop,\sym,\mar,\but
+%I c=\stelopsommingin
+%I
+%I Opsommingen kunnen tot op vier niveaus automatisch worden
+%I aangemaakt met het commando:
+%I
+%I \startopsomming[aanduiding][instellingen]
+%I
+%I \som ........
+%I \som ........
+%I \som[referentie] ........
+%I \som ........
+%I
+%I \stopopsomming
+%I
+%I Eventueel kan direct achter \som een [referentie] worden
+%I opgegeven, zodat men bijvoorbeeld kan verwijzen naar
+%I 'punt \in[referentie]' (hier punt 3).
+%P
+%I De volgende genummerde aanduidingen zijn mogelijk:
+%I
+%I wijze van 'nummeren' instelling
+%I
+%I 1, 2, 3, 4 n (normaal) / o (oldstyle)
+%I a, b, c, d a
+%I A, B, C, D A (normaal) / KA (kap)
+%I i, ii, iii, iv r
+%I I, II, III, IV R (normaal) / KR (kap)
+%I
+%I doornummeren verder
+%P
+%I De volgende niet-genummerde aanduidingen zijn mogelijk
+%I (de aanduiding kan eventueel achterwege blijven):
+%I
+%I wijze van 'markeren' instelling
+%I
+%I dot 1
+%I streepje 2
+%I sterretje 3
+%I driehoekje 4
+%I bolletje 5
+%I groter bolletje 6
+%I nog groter bolletje 7
+%I
+%I alleen inspringen leeg laten
+%P
+%I Het al dan niet inspringen en de eventuele ruimte tussen
+%I de onderdelen wordt globaal of lokaal ingesteld met de
+%I commando's:
+%I
+%I \stelopsommingin[niveau][instelling]
+%I
+%I waarbij de volgende instellingen mogelijk zijn:
+%I
+%I standaard standaard instellingen
+%I opelkaar geen witruimte tussen onderdelen
+%I aanelkaar weinig witruimte na het symbool
+%I aansluitend geen wit voor en na de opsomming
+%I ruim meer witruimte na het symbool (n*ruim)
+%I inmarge markering in de kantlijn
+%I opmarge markering op de 'kantlijn'
+%I afsluiter afsluiter achter markering
+%I kolommen in twee kolommen zetten
+%I intro aansluiten op vorige regel(s)
+%P
+%I In plaats van een cijfer bij niveau kan ook het woord
+%I 'elk' worden gegeven. De instellingen mogen ook direkt
+%I achter de aanduiding worden meegegeven: [1,opelkaar].
+%I
+%I Als alternatief voor \som is \kop beschikbaar. In dat geval
+%I wordt de eerste alinea (of een eerste woord) afwijkend gezet.
+%I
+%I Met \sym{symbool} kan een eigen symbool worden geplaatst.
+%I Als dit symbool breed is (bijvoorbeeld ++), kan men de
+%I breedte aanpassen, bijvoorbeeld: \startopsomming[2*ruim].
+%I
+%I Een ander alternatief is \mar{tekst}. De tekst wordt in
+%I dat geval in de marge geplaatst.
+%I
+%I Een leeg item (dus zonder aanduiding) kan worden
+%I opgeroepen met \nop. Op deze manier kunnen opsommingen in
+%I kolommen worden uitgelijnd (gemanipuleerd). Het commando
+%I \nop komt overeen met \sym{\strut} \strut.
+%P
+%I Met \som[aanduiding] (zonder \start... \stop...) kan snel een
+%I opsomming met ‚‚n item worden gezet. In dat geval wordt er
+%I geen referentie aangemaakt.
+%I
+%I Als men een item tussenvoegt maar (vooralsnog) de nummering
+%I niet wil verhogen, dan kan men \sub gebruiken. Het oude nummer
+%I wordt dan in het zetwerk voorafgegaan door een +.
+%I
+%I Interactieve items kunnen worden gemaakt met \but, waarbij
+%I de bestemming tussen [] moet worden meegegeven.
+%P
+%I Een nauwkeuriger (globale) instelling is eveneens mogelijk met
+%I het commando:
+%I
+%I \stelopsommingin[niveau][breedte=,voor=,tussen=,na=,
+%I kopvoor=,kopna=,kopletter=,marletter=,symlettter=,
+%I afsluiter=,n=,factor=,afstand=]
+%I
+%I Standaard gelden voor de letters de volgende instellingen:
+%I
+%I kopletter normaal
+%I marletter type
+%I symletter vet
+%I
+%I De commando's \sym{symbool} en \som zijn ook buiten
+%I opsommingen beschikbaar.
+
+%T n=opsomming
+%T m=ops
+%T a=o
+%T
+%T \startopsomming
+%T
+%T \som ?
+%T
+%T \stopopsomming
+
+%T n=som
+%T m=som
+%T a=s
+%T
+%T \som ?
+
+%
+% NOG [0] voor start op 0
+%
+
+\newif\ifsomkolommen \somkolommenfalse
+\newif\ifsubsom \subsomfalse
+\newif\ifsymsom \symsomfalse
+\newif\ifkopsom \kopsomfalse
+\newif\ifsomintro \somintrofalse
+\newif\ifsomautointro \somautointrofalse
+\newif\ifpackeditems \packeditemsfalse
+\newif\iffirstlist \firstlistfalse
+
+\definetwopasslist{\s!list}
+
+\newcounter\noflists
+\newcounter\itemlevel
+
+\def\dolistreference%
+ {\immediate\writeutilitycommand%
+ {\twopassentry%
+ {\s!list}%
+ {\currentlist}%
+ {\currentlist:\noflistelements}}}
+
+\def\setnextitemlevel#1%
+ {\doifundefined{\??op#1\c!breedte}
+ {\edef\itemreferences{\itemreferences,#1}%
+ \copyparameters
+ [\??op#1][\??oo]
+ [\c!breedte,\c!factor,\c!afstand,
+ \c!marletter,\c!symletter,\c!kopletter,
+ \c!markleur,\c!symkleur,\c!kopkleur,
+ \c!kopvoor,\c!kopna,\c!voor,\c!tussen,\c!na,
+ \c!afsluiter,\c!plaatsafsluiter,
+ \c!n,\c!binnen,\c!symbool,\c!marge]%
+ \makecounter{\s!itemcount#1}%
+ \setvalue{\??op\c!symbool\s!global#1}{#1}}}
+
+\def\maxitemlevel{0}
+\def\itemreferences{0}
+
+\def\dostelopsommingenin[#1]% % still undocumented
+ {\getparameters[\??oo][\c!niveaus=4,#1]%
+ \ifnum\@@ooniveaus>\maxitemlevel
+ \edef\maxitemlevel{\@@ooniveaus}%
+ \herhaal[\maxitemlevel*\setnextitemlevel{\herhaler}]%
+ \fi}
+
+\def\stelopsommingenin%
+ {\dosingleargument\dostelopsommingenin}
+
+\def\doitemreference#1,#2,#3\\%
+ {\ifnum\itemlevel>#1
+ \ifnum#1>0
+ \tempsymbool
+ \fi
+ \getvalue{\??op\c!symbool#2}%
+ \doitemreference#2,#3\\%
+ \fi}
+
+\def\itemreference%
+ {\expandafter\doitemreference\itemreferences,,\\}
+
+\def\itemuse#1%
+ {\getvalue{\??op\itemlevel#1}}%
+
+\def\packitems%
+ {\ifnum\itemlevel=0 \else\packeditemstrue\fi}
+
+\def\dostelopsomminginvariable[#1][#2]% niveau instellingen
+ {\doifelsenothing{#1}
+ {\getparameters[\??op\itemlevel][#2]}%
+ {\getparameters[\??op#1][#2]}}
+
+\def\dododostelopsomminginconstant[#1][#2#3]%
+ {\processaction
+ [#2#3]
+ [ \v!opelkaar=>\packitems,
+ \v!intro=>\somintrotrue,
+ \v!autointro=>\somautointrotrue,
+ \v!ruim=>{\doassign[\??op#1][\c!factor=1]},
+ #2*\v!ruim=>{\doassign[\??op#1][\c!factor=#2]},
+ \v!marge=>{\doassign[\??op#1][\c!breedte=-2em]}, % signal
+ \v!inmarge=>{\doassign[\??op#1][\c!breedte=-2em]}, % signal
+ \v!opmarge=>\doifnot{#1}{1}{\doassign[\??op#1][\c!breedte=0em]}, % signal
+ \v!kolommen=>\packitems,
+ \v!aansluitend=>{\getparameters[\??op#1]
+ [\c!kopvoor=,\c!kopna=,
+ \c!voor=,\c!tussen=,\c!na=]%
+ \packitems},
+ \v!aanelkaar=>{\doassign[\??op#1][\c!factor=-1]},
+ #2*\v!aanelkaar=>{\doassign[\??op#1][\c!factor=-#2]},
+ \v!afsluiter=>{\doassign[\??op#1][\c!plaatsafsluiter=\v!ja]},
+ \v!standaard=>{\getparameters[\??op#1]
+ [\c!breedte=1.5em,
+ \c!factor=0,
+ \c!afstand=.5em,
+ \c!kopvoor=,
+ \c!kopna=\blanko,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!binnen=]}]}
+
+\def\dostelopsomminginconstant[#1][#2]%
+ {\def\dodostelopsomminginconstant##1%
+ {\dododostelopsomminginconstant[#1][##1]}%
+ \processcommalist[#2]\dodostelopsomminginconstant}
+
+\def\dodododostelopsommingin[#1][#2]%
+ {\ConvertToConstant\doifinstringelse{=}{#2}
+ {\dostelopsomminginvariable[#1][#2]}
+ {\setvalue{\??op#1}{\dostelopsomminginconstant[#1][#2]}}}%
+
+\def\dododostelopsommingin[#1][#2]%
+ {\ConvertToConstant\doifnot{#2}{}
+ {\doifelse{#1}{\v!elk}
+ {\herhaal[\maxitemlevel*{\ExpandFirstAfter\dodododostelopsommingin[\herhaler][#2]}]}
+ {\ExpandFirstAfter\dodododostelopsommingin[#1][#2]}}}
+
+\def\dodostelopsommingin[#1][#2]%
+ {\ConvertToConstant\doifelse{#2}{}
+ {\ifnum\itemlevel=0\relax
+ \dododostelopsommingin[\v!elk][#1]%
+ \else
+ \dododostelopsommingin[\itemlevel][#1]%
+ \fi}
+ {\doifelsenothing{#1}
+ {\dododostelopsommingin[\itemlevel][#2]}
+ {\dododostelopsommingin[#1][#2]}}}
+
+\def\dostelopsommingin[#1][#2][#3]%
+ {\dodostelopsommingin[#1][#2]%
+ \ConvertToConstant\doifnot{#3}{} % anders wordt #2 overruled
+ {\dodostelopsommingin[#1][#3]}}
+
+\def\stelopsommingin%
+ {\dotripleempty\dostelopsommingin}
+
+\def\doadvanceitem%
+ {\ifsubsom\else\ifsymsom\else
+ \pluscounter{\s!itemcount\itemlevel}%
+ \fi\fi}
+
+\def\setitemlevel#1%
+ {\ifnum\itemlevel>0\relax
+ \firstlisttrue
+ \doifnotinset{\v!verder}{#1}
+ {\resetcounter{\s!itemcount\itemlevel}}%
+ \def\tempnumber%
+ {\countervalue{\s!itemcount\itemlevel}}%
+ \doifelsevalue{\??op\itemlevel\c!plaatsafsluiter}{\v!ja}
+ {\def\tempsymbool{\getvalue{\??op\itemlevel\c!afsluiter}}}
+ {\def\tempsymbool{}}%
+ \fi}
+
+\def\setitemmark#1% % maakt gebruik van \??ss en \??cv
+ {\doifdefinedelse{\??ss#1} % en pas op: resets \docommando
+ {\setxvalue{\??op\c!symbool\s!global\itemlevel}%
+ {#1}%
+ \setgvalue{\??op\c!symbool\s!local\itemlevel}%
+ {?}%
+ \def\listitem%
+ {\symbol[#1]}%
+ \def\docommando##1{}}
+ {\doifdefined{\??cv#1}
+ {\setxvalue{\??op\c!symbool\s!global\itemlevel}%
+ {#1}%
+ \setgvalue{\??op\c!symbool\s!local\itemlevel}%
+ {\convertnumber{#1}{\countervalue{\s!itemcount\itemlevel}}}%
+ \def\listitem%
+ {\getvalue{\??op\c!symbool\s!local\itemlevel}\tempsymbool}%
+ \def\docommando##1{}}}}
+
+\def\calculatelistwidth#1#2%
+ {#2=\getvalue{\??op#1\c!afstand}\relax
+ \multiply#2 by \getvalue{\??op#1\c!factor}\relax
+ \advance#2 by \getvalue{\??op#1\c!breedte}\relax}
+
+\def\dodostartopsomming[#1][#2]%
+ {\ifhmode
+ \par
+ \fi
+ \ifnum\itemlevel=\maxitemlevel\relax
+ \showmessage{\m!layouts}{9}{\maxitemlevel}%
+ \def\itemincrement{0}%
+ \else
+ \def\itemincrement{1}%
+ \fi
+ \doglobal\increment(\itemlevel,\itemincrement)%
+ \begingroup
+ \ifnum\itemlevel=1 % NIEUW
+ \doifelsevalue{\??op1\c!marge}{\v!standaard}
+ {\ifdim\voorwit=\!!zeropoint
+ \advance\leftskip by \@@sllinks
+ \else
+ \advance\leftskip by \voorwit
+ \fi}
+ {\advance\leftskip by \getvalue{\??op1\c!marge}}%
+ \fi
+ \doifinset{\v!kolommen}{#1}%
+ {\ifbinnenkolommen\else
+ \global\somkolommentrue
+ \getvalue{\??op\itemlevel\c!voor}%
+ \processfirstactioninset
+ [#1]
+ [ \v!een=>\!!counta=1\relax,
+ \v!twee=>\!!counta=2\relax,
+ \v!drie=>\!!counta=3\relax,
+ \v!vier=>\!!counta=4\relax,
+ \v!vijf=>\!!counta=5\relax,
+ \s!unknown=>\@EA\!!counta\getvalue{\??op\itemlevel\c!n}]%
+ \startkolommen
+ [\c!n=\!!counta,
+ \c!hoogte=,
+ \c!lijn=\v!uit,
+ \c!balanceren=\v!ja,
+ \c!uitlijnen=\v!nee]%
+ \fi}%
+ \doifinsetelse{\v!intro}{#1}
+ {\somintrotrue}
+ {\somintrofalse}%
+ \doglobal\increment\noflists
+ \let\currentlist=\noflists
+ \newcounter\noflistelements
+ \kopsomfalse
+ \subsomfalse
+ \symsomfalse
+ \let\marsymbol=\relax
+ \let\somdestination=\empty
+ \def\symsymbol{}%
+ \def\som%
+ {\dosom}%
+ \def\but[##1]%
+ {\def\somdestination{##1}%
+ \dosom}%
+ \def\nop%
+ {\sym{\strut}\strut}%
+ \definecomplexorsimple\its
+ \setvalue{\v!mar}##1%
+ {\def\marsymbol%
+ {\llap
+ {\doattributes{\??op\itemlevel\v!mar}{##1}%
+ \hskip\leftskip\hskip\linkermargeafstand}}%
+ \dosom}%
+ \setvalue{\v!kop}%
+ {\kopsomtrue\dokop}%
+ \setvalue{\v!sub}%
+ {\subsomtrue\dosom}%
+ \setvalue{\v!sym}##1%
+ {\def\symsymbol%
+ {\doattributes{\??op\itemlevel\v!sym}{##1}}%
+ \symsomtrue
+ \dosom}%
+ \setvalue{\v!its}%
+ {\getvalue{\v!sym}%
+ {\calculatelistwidth{\itemlevel}{\dimen0}%
+ \hbox to \dimen0
+ {\dorecurse{\getvalue{\??op\itemlevel\c!items}}{\listitem\hss}%
+ \unskip
+ \hskip\getvalue{\??op\itemlevel\c!afstand}}}}%
+ \setitemlevel{#1}%
+ \getvalue{\??op\itemlevel}%
+ \doifelsenothing{#1} % iffirstargument
+ {\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
+ \setgvalue{\??op\c!symbool\s!global\itemlevel}{}%
+ \setgvalue{\??op\v!verder\itemlevel}{}%
+ \setitemmark{\@@opsymbool}%
+ \dostelopsomminginvariable[\itemlevel][#2]}
+ {\dostelopsomminginconstant[\itemlevel][#1]%
+ \dostelopsomminginvariable[\itemlevel][#2]%
+ \doifinsetelse{\v!verder}{#1}%
+ {\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}%
+ \getvalue{\??op\v!verder\itemlevel}}
+ {\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
+ \setgvalue{\??op\v!verder\itemlevel}%
+ {\dostelopsomminginconstant[\itemlevel][#1]%
+ \dostelopsomminginvariable[\itemlevel][#2]}}%
+ \def\docommando{\setitemmark}% \setitemmark resets \docommando
+ \processcommalist[#1,\@@opsymbool]\docommando}%
+ \ifsomautointro\ifnum\prevgraf<3
+ \somintrotrue
+ \fi\fi
+ \ifpackeditems
+ \doassign[\??op\itemlevel][\c!tussen=]%
+ \fi
+ \calculatelistwidth{\itemlevel}{\dimen0}%
+ \ifdim\dimen0>\!!zeropoint\relax
+ \advance\leftskip by \dimen0\relax
+ \fi}
+
+\def\dostartopsomming[#1][#2]%
+ {\ifsecondargument
+ \dodostartopsomming[#1][#2]%
+ \else
+ \doifassignmentelse{#1}
+ {\dodostartopsomming[][#1]}
+ {\dodostartopsomming[#1][]}%
+ \fi}
+
+\def\startopsomming%
+ {\bgroup
+ \dodoubleempty\dostartopsomming}
+
+\def\stopopsomming%
+ {\par
+ \dolistreference
+ \endgroup
+ \ifsomkolommen
+ \global\somkolommenfalse
+ \stopkolommen
+ \getvalue{\??op\itemlevel\c!na}%
+ \else
+ \ifnum\itemlevel=1\relax
+ \dosomebreak\allowbreak % toegevoegd
+ \getvalue{\??op1\c!na}%
+ \fi
+ \fi
+ \endgroup
+ \doglobal\decrement(\itemlevel,\itemincrement)%
+ \egroup}
+
+\def\sombreak%
+ {\flushfootnotes\penalty-5\relax} % -10
+
+\def\somnobreak%
+ {\flushfootnotes\penalty+5\relax} % \nobreak
+
+\def\dolistitem%
+ {\par
+ \ignorespaces
+ \increment\noflistelements
+ \ifnum\noflistelements=1\relax % als gevolg van nesting
+ \findtwopassdata{\s!list}{\noflists:}% % van wordt soms de volgorde
+ \fi % verstoord, vandaar \find
+ \ifsomkolommen\else
+ \iftwopassdatafound
+ \ifnum\twopassdata=3\relax
+ \ifnum\noflistelements>1\relax
+ \dosomebreak\somnobreak
+ \fi
+ \else\ifnum\twopassdata>3\relax
+ \ifnum\noflistelements=2\relax
+ \ifsomkolommen\else
+ \ifsomintro
+ \dosomebreak\nobreak
+ \else
+ \dosomebreak\somnobreak
+ \fi
+ \fi
+ \else\ifnum\twopassdata=\noflistelements\relax
+ \dosomebreak\somnobreak
+ \else\ifnum\noflistelements>2\relax
+ \dosomebreak\sombreak
+ \else
+ \ifsomintro\else\dosomebreak\sombreak\fi
+ \fi\fi\fi
+ \fi\fi
+ \fi
+ \fi
+ \noindent
+ \ifkopsom
+ \setbox8=\hbox{\doattributes{\??op\itemlevel\v!kop}{\listitem}}%
+ \else\ifsymsom
+ \setbox8=\hbox{\symsymbol}%
+ \else
+ \setbox8=\hbox{\listitem}%
+ \fi\fi
+ \doifsomething{\somdestination}
+ {\setbox8=\hbox{\naar{\copy8}[\somdestination]}}%
+ \dimen2=\getvalue{\??op\itemlevel\c!breedte}\relax
+ \ifdim\dimen2<\!!zeropoint\relax
+ \llap{\ifsubsom\llap{+}\fi\box8\hskip\linkermargeafstand}%
+ \else
+ \ifdim\dimen2=\!!zeropoint\relax
+ \calculatelistwidth{1}{\dimen0}%
+ \else
+ \calculatelistwidth{\itemlevel}{\dimen0}%
+ \fi
+ \llap{\hbox to \dimen0{\ifsubsom\llap{+}\fi\box8\hfill}}%
+ \fi
+ \setevalue{\??op\c!symbool\itemlevel}%
+ {\getvalue{\??op\c!symbool\s!local\itemlevel}}%
+ \kopsomfalse
+ \subsomfalse
+ \symsomfalse
+ \EveryPar{\ignorespaces}%
+ \ignorespaces}
+
+\def\complexdosom[#1]%
+ {\par
+ \ignorespaces
+ \doadvanceitem
+ \ifsomkolommen\else
+ \ifnum\noflistelements>0\relax\dosomebreak\nobreak\fi
+ \fi
+ \iffirstlist
+ \firstlistfalse
+ \begingroup
+ \ifcase\itemlevel
+ \or % 1
+ \ifsomkolommen\else
+ \ifsomintro\dosomebreak\nobreak\fi
+ \getvalue{\??op1\c!voor}%
+ \ifsomintro\dosomebreak\nobreak\fi
+ \fi
+ \else % 2 en hoger
+ \let\previtemlevel=\itemlevel
+ \decrement\previtemlevel
+ \getvalue{\??op\previtemlevel\c!tussen}% = itemlevel-1
+ \fi
+ \else
+ \itemuse{\c!tussen}%
+ \fi
+ \ignorespaces
+ \dolistitem
+ \ifpackeditems
+ \stelwitruimtein[\v!geen]%
+ \fi
+ \itemuse{\c!binnen}%
+ \marsymbol
+ \let\marsymbol=\relax
+ \doifsomething{#1}
+ {\bgroup
+ \protectconversion
+ \rawreference{\s!lst}{#1}{\itemreference}%
+ \egroup}%
+ \ignorespaces}
+
+\def\complexsom[#1]#2\par%
+ {\startopsomming[#1]
+ \complexdosom[]\ignorespaces#2\par
+ \stopopsomming}
+
+\def\som%
+ {\complexorsimpleempty{som}}
+
+\def\dosom%
+ {\complexorsimpleempty{dosom}}
+
+\def\complexdokop[#1]#2\par%
+ {\ifpackeditems\else\itemuse{\c!kopvoor}\fi%
+ \dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+ \complexdosom[#1]{\doattributes{\??op\itemlevel\v!kop}{\ignorespaces#2}}\par%
+ \ifpackeditems\else\itemuse{\c!kopna}\fi%
+ \dosomebreak\nobreak}
+
+\def\complexkop[#1]#2\par#3\par%
+ {\startopsomming[#1]%
+ \complexdokop[]\ignorespaces#2\par#3\par%
+ \stopopsomming}
+
+\setvalue{\v!kop}%
+ {\complexorsimpleempty{kop}}
+
+\def\dokop%
+ {\complexorsimpleempty{dokop}}
+
+\def\sym#1%
+ {\noindent
+ \setbox0=\hbox{#1}%
+ \ifdim\wd0<1em\relax
+ \setbox0=\hbox to 1.5em{#1\hfil}%
+ \else
+ \setbox0=\hbox spread 1em{#1\hfil}%
+ \fi
+ \hangindent=\wd0\relax
+ \box0
+ \ignorespaces}
+
+%I n=Doordefinieren
+%I c=\doordefinieren,\steldoordefinierenin
+%I
+%I Er kunnen (eenvoudige) definitie-lijsten worden
+%I gemaakt met behulp van het commando:
+%I
+%I \doordefinieren[naam][plaats=,breedte=,uitlijnen=,
+%I monster=,letter=,kopletter=,voor=,tussen=,na=,hang=,
+%I inspringen=,tekst=]
+%I
+%I Een definitie is vervolgens op naam op te roepen:
+%I
+%I \naam{begrip} definitie
+%P
+%I Een definitie heeft de vorm:
+%I
+%I links Dit is een linker tekst. Een tekst wordt
+%I links geplaatst als 'links' wordt meegegeven.
+%I
+%I Dit is een rechter tekst. Een tekst wordt rechts
+%I rechts geplaatst als 'rechts' wordt meegegeven.
+%I
+%I boven
+%I
+%I Dit is een tekst waarbij het woord erboven staat. Voor
+%I dit soort teksten wordt 'boven' meegegeven.
+%I
+%I Tot slot is het mogelijk de tekst in de marge of
+%I aansluitend te plaatsen, in dat geval wordt 'inmarge',
+%I 'inlinker', 'inrechter' of 'aanelkaar' meegegeven.
+%P
+%I Aan 'voor', 'tussen' of 'na' kan een commando worden
+%I toegekend, bijvoorbeeld \blanko[groot]. Als letter kan
+%I normaal, vet, kapitaal, type, schuin, klein en kleinvet
+%I worden meegegeven.
+%I
+%I Als 'breedte' kan een maat worden meegegeven of een van de
+%I instellingen 'passend' en 'ruim'. In dat geval wordt de
+%I aan 'monster' toegekende tekst als uitgangspunt genomen.
+%P
+%I Met 'hang' kan men aangeven hoe lang er links of rechts
+%I moet worden ingesprongen. Er kan een aantal regels worden
+%I meegegeven maar ook 'passend' of 'ruim'. Een overgang naar
+%I een nieuwe regel binnen een linker- of rechtertekst wordt
+%I afgedwongen met \\ (vergelijk \margeteksten).
+%I
+%I Defaultwaarden kunnen worden ingesteld met het commando:
+%I
+%I \steldoordefinierenin[instellingen]
+%I
+%I Het tussentijds bijstellen van de instellingen is mogelijk
+%I met:
+%I
+%I \steldoordefinieren[naam][instellingen]
+
+% Dit kan en moet dus anders:
+%
+% \start... : \vbox\bgroup
+% \stop... : \egroup
+% llap enz.
+% geen indent!
+%
+% enz. enz.
+%
+% Op die manier is meer mogelijk en worden \par's geskipt.
+
+% De macro's \??dd#1\c!lokaal en \??dd#1\c!commando leveren
+% de koppeling tussen \doornummeren en \doordefinieren. Deze
+% constructie is nodig omdat doornummeren geen argument
+% heeft en omdat subnummers niet worden genest binnen
+% het hogere niveau. Het commando \??dd#1\s!do\c!commando
+% moet in dat geval \v!ja zijn.
+
+% herimplementeren met \nextbox en \unhbox\unvbox
+
+\newbox\@@definitiebox
+
+\setvalue{@@dodefinitiewoord\v!links}#1%
+ {\hbox to \!!widtha{#1\hss}}
+\setvalue{@@dodefinitiewoord\v!rechts}#1%
+ {\hbox to \!!widtha{\hss#1}}
+\setvalue{@@dodefinitiewoord\v!midden}#1%
+ {\hbox to \!!widtha{\hss#1\hss}}
+\setvalue{@@dodefinitiewoord}#1%
+ {#1}
+
+\def\@@definitiewoord#1%
+ {\getvalue{\??dd#1\c!commando}{#1}}
+
+\def\normal@@definitiewoord#1[#2]#3%
+ {\bgroup
+ \getvalue{@@dodefinitiewoord\getvalue{\??dd#1\c!uitlijnen}}
+ {\doattributes{\??dd#1\v!kop}{\strut\getvalue{\??dd#1\c!tekst}#3}}%
+ \rawreference{\s!def}{#2}{#3}%
+ \egroup}
+
+\def\@@definitielinks#1[#2]#3%
+ {\doifelsevaluenothing{\??dd#1\c!hang}
+ {\@@definitielinkspure{#1}[#2]{#3}}
+ {\@@definitielinkshang{#1}[#2]{#3}}}
+
+\def\@@definitierechts#1[#2]#3%
+ {\doifelsevaluenothing{\??dd#1\c!hang}
+ {\@@definitierechtspure{#1}[#2]{#3}}
+ {\@@definitierechtshang{#1}[#2]{#3}}}
+
+\def\@@definitielinkspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \advance\leftskip by \!!widtha
+ \llap
+ {\hbox to \!!widtha{\@@definitiewoord{#1}[#2]{#3}%
+ \hss}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitierechtspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \advance\rightskip by \!!widtha
+ \rlap
+ {\hskip\hsize
+ \hskip-\leftskip
+ \hskip-\rightskip
+ \hbox to \!!widtha{\hss\@@definitiewoord{#1}[#2]{#3}}}%
+ \@@dodefinitie{#1}}
+
+\def\@@makedefinitiebox#1[#2]#3#4%
+ {\setbox\@@definitiebox=\vtop % \vbox gaat fout in hang
+ {\forgetall
+ \hsize\!!widtha
+ #4%
+ \def\\{\endgraf}%
+ \@@definitiewoord{#1}[#2]{\begstrut#3\endstrut}}%
+ \ht\@@definitiebox=\ht\strutbox
+ \dp\@@definitiebox=\dp\strutbox
+ \doifinsetelse{\getvalue{\??dd#1\c!hang}}{\v!passend,\v!ruim}
+ {\dimen0=\ht\@@definitiebox
+ \advance\dimen0 by \dp\@@definitiebox
+ \doifvalue{\??dd#1\c!hang}{\v!ruim}
+ {\advance\dimen0 by .5\ht\strutbox}%
+ \getnoflines{\dimen0}%
+ \hangafter=-\noflines}
+ {\hangafter=-\getvalue{\??dd#1\c!hang}}}%
+
+\def\@@definitielinkshang#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \mindermeldingen
+ \hangindent=\!!widtha\relax
+ \@@makedefinitiebox{#1}[#2]{#3}{}%
+ \llap
+ {\dontshowcomposition
+ \vtop to \!!zeropoint{\box\@@definitiebox}}%
+ \@@dodefinitie{#1}}%
+
+\def\@@definitierechtshang#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \mindermeldingen
+ \hangindent=-\!!widtha\relax
+ \@@makedefinitiebox{#1}[#2]{#3}{\raggedleft}%
+ \rlap
+ {\dontshowcomposition
+ \dimen0=\hsize
+ \advance\dimen0 by -\leftskip
+ \advance\dimen0 by -\rightskip
+ \hbox to \dimen0
+ {\hss
+ \vtop to \!!zeropoint{\box\@@definitiebox}}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieboven#1[#2]#3%
+ {%\pagina[\v!voorkeur]% % Weg ermee!
+ \dosomebreak{\goodbreak}% % Dit is beter en nodig!
+ \@@dostartdefinitie{#1}{#3}%
+ \@@definitiewoord{#1}[#2]{#3}%
+ \nobreak
+ \getvalue{\??dd#1\c!tussen}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieinmarge#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \inmarge{\@@definitiewoord{#1}[#2]{#3}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieinlinker#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \inlinker{\@@definitiewoord{#1}[#2]{#3}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieinrechter#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \inrechter{\@@definitiewoord{#1}[#2]{#3}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaarpassend#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \@@definitiewoord{#1}[#2]{#3}%
+ \tfskip % nog afstand implementeren
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaarbreed#1[#2]#3%
+ {\@@dostartdefinitie{#1}{#3}%
+ \ignorespaces
+ \hbox to \!!widtha
+ {\@@definitiewoord{#1}[#2]{#3}%
+ \tfskip
+ \hss}% % nog afstand implementeren
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaar#1[#2]#3%
+ {\doifinsetelse{\getvalue{\??dd#1\c!breedte}}{\v!passend,\v!ruim}%
+ {\@@definitieaanelkaarpassend{#1}[#2]{#3}}%
+ {\@@definitieaanelkaarbreed{#1}[#2]{#3}}}
+
+\def\@@dostartdefinitie#1#2%
+ {\getvalue{\??dd#1\c!voor}%
+ \begingroup
+ %\showcomposition
+ \assignwidth
+ {\!!widtha}
+ {\getvalue{\??dd#1\c!breedte}}
+ {\doattributes
+ {\??dd#1\v!kop}
+ {\getvalue{\??dd#1\c!tekst}%
+ \doifelsevaluenothing{\??dd#1\c!monster}
+ {#2}
+ {\getvalue{\??dd#1\c!monster}}}}%
+ \getvalue{\??dd#1\c!lokaal}%
+ \parindent=\!!zeropoint\relax
+ \noindent
+ \ignorespaces}
+
+\def\@@stopdefinitie#1%
+ {\par
+ \dostopattributes
+ \endgroup
+ \egroup % temporary hack
+ \getvalue{\??dd#1\c!na}%
+ \pagina[\v!voorkeur]} % toegevoegd maar heroverwegen
+
+\def\@@dodefinitie#1%
+ {\dostartattributes
+ {\??dd#1}
+ {}%
+ \ignorespaces}
+
+\def\@@somedefinitie#1[#2]#3%
+ {\bgroup % temporary hack
+ \BeforePar{\getvalue{\??dd#1}[#2]{#3}}%
+ \AfterPar{\@@stopdefinitie{#1}}%
+ \GetPar}
+
+\def\@@startdefinitie#1[#2]#3%
+ {\bgroup % temporary hack
+ \BeforePar{\getvalue{\??dd#1}[#2]{#3}}%
+ \GotoPar}
+
+\def\dodosteldoordefinierenin[#1][#2]%
+ {\getparameters[\??dd#1][#2]}
+
+\def\dosteldoordefinierenin[#1][#2]%
+ {\ConvertToConstant\doifelse{#2}{}
+ {\dodosteldoordefinierenin[][#1]}
+ {\dodoubleargumentwithset\dodosteldoordefinierenin[#1][#2]}}
+
+\def\steldoordefinierenin%
+ {\dodoubleempty\dosteldoordefinierenin}
+
+% kan zonder \interfaced wanneer \setvalue{...\v!...}
+
+\def\executedoordefinitie#1[#2]%
+ {\ExpandAfter\doifundefined{@@definitie\interfaced{\getvalue{\??dd#1\c!plaats}}}
+ {\setvalue{\??dd#1\c!plaats}{\v!links}}%
+ \getvalue{@@definitie\interfaced{\getvalue{\??dd#1\c!plaats}}}{#1}[#2]}
+
+\def\dodoordefinieren[#1][#2]%
+ {\copyparameters[\??dd#1][\??dd]
+ [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur,
+ \c!breedte,\c!hang,\c!monster,\c!voor,\c!tussen,\c!na,
+ \c!uitlijnen,\c!inspringen,\c!tekst]%
+ \getparameters[\??dd#1]
+ [\s!do\c!commando=\v!nee,
+ \c!commando=\normal@@definitiewoord,
+ \c!lokaal=,
+ #2]%
+ \doifvalue{\??dd#1\c!plaats}{\v!boven}%
+ {\doassign[\??dd#1][\c!tussen={\blanko}]}%
+ \setvalue{\??dd#1}[##1]%
+ {\executedoordefinitie{#1}[##1]}%
+ \doifelsevalue{\??dd#1\s!do\c!commando}{\v!ja}
+ {\setvalue{\s!complex\??dd#1}[##1]%
+ {\@@somedefinitie{#1}[##1]{}}%
+ \setvalue{\s!complex\??dd\s!start#1}[##1]%
+ {\@@startdefinitie{#1}[##1]{}}}%
+ {\setvalue{\s!complex\??dd#1}[##1]%
+ {\dowithwargument{\@@somedefinitie{#1}[##1]}}%
+ \setvalue{\s!complex\??dd\s!start#1}[##1]%
+ {\dowithwargument{\@@startdefinitie{#1}[##1]}}}%
+ \setvalue{#1}%
+ {\complexorsimpleempty{\??dd#1}}%
+ \setvalue{\e!start#1}%
+ {\complexorsimpleempty{\??dd\s!start#1}}%
+ \setvalue{\e!stop#1}%
+ {\@@stopdefinitie{#1}}}%
+
+\def\doordefinieren%
+ {\dodoubleemptywithset\dodoordefinieren}
+
+%I n=Doornummeren
+%I c=\doornummeren,\steldoornummerenin
+%I c=\reset,\volgende,\vorige
+%I
+%I Het is mogelijk door een tekst heen genummerde opsommingen
+%I te gebruiken. Het beschikbare commando is:
+%I
+%I \doornummeren[naam][plaats=,niveaus=,conversie=,
+%I kopletter=,letter=,breedte=,monster=,tekst=,voor=,tussen=,
+%I na=,wijze=,blok=,scheider=,afsluiter=,hang=,links=,rechts=,
+%I sectienummer=,nummer=,koppeling=,uitlijnen=,inspringen]
+%I
+%I De naam bestaat uit letters.
+%I
+%I Na het commando 'doornummeren' zijn de volgende commando's
+%I beschikbaar:
+%I
+%I \naam
+%I \subnaam
+%I \subsubnaam
+%I
+%I waarbij naam staat voor de opgegeven naam.
+%P
+%I Dit commando komt in grote lijnen overeen met het
+%I commando \doordefinieren. Als de plaats 'links' is
+%I en de tekst is 'vraag', dan krijgen we na het
+%I geven van \vraag Wat ... was?:
+%I
+%I vraag 1 Wat zouden we krijgen als de plaats 'rechts'
+%I en de tekst 'antwoord' was?
+%I
+%I We kunnen een referentie meegeven, dus \vraag[ref]. Als
+%I we geen nummer willen, maar wel de tekst, dan is de
+%I aanroep \vraag[-]. Er wordt in dat geval niet opgehoogd.
+%I Hetzelfde kan worden bereikt door 'nummer' de waarde
+%I nee te geven.
+%P
+%I De wijze waarop het laatste niveau wordt weergegeven kan
+%I worden ingesteld met conversie: cijfers, letters, Letters,
+%I romeins en Romeins). Conversie heeft pas effect als ook
+%I niveaus is ingesteld (2 of 3, standaard 3).
+%I
+%I Voor of na de te nummeren tekst op te nemen commando's
+%I kunnen worden ingesteld. Ook kan een voor het nummer op te
+%I nemen tekst worden meegegeven en kan de plaats van de tekst
+%I en het nummer worden ingesteld (… la \doordefinieren!).
+%I
+%I Er kan een koppeling worden gelegd met een ander item. Zo
+%I kunnen bijvoorbeeld vragen worden gekoppeld aan antwoorden.
+%I Dergelijke koppelingen hebben pas betekenis bij
+%I interactieve teksten.
+%I
+%I Defaultwaarden kunnen worden ingesteld met het commando:
+%I
+%I \steldoornummerenin[instellingen]
+%P
+%I Het is mogelijk het nummeren opnieuw te starten met het
+%I commando:
+%I
+%I \reset<naam>
+%I
+%I en een (sub)nummer op te hogen met:
+%I
+%I \volgende<naam>
+%I \volgendesub<naam>
+%I
+%I Het tussentijds bijstellen van de instellingen is mogelijk
+%I met:
+%I
+%I \steldoornummerenin[naam][instellingen]
+
+\def\showdnpuretext#1%
+ {\strut\getvalue{\??dd#1\c!tekst} }
+
+\def\showdntext#1%
+ {\doifelsevaluenothing{\??dd#1\c!tekst}
+ {\ignorespaces}
+ {\strut\getvalue{\??dd#1\c!tekst}\fixedspace}}
+
+\def\showdnnummer#1%
+ {\voorafgaandenummer%
+ \nummer[\getvalue{\??dd#1\??dd\c!nummer}]}
+
+\def\showdnsubnummer#1%
+ {\showdnnummer{#1}%
+ \getvalue{\??dd#1\c!scheider}%
+ \nummer[\v!sub\getvalue{\??dd#1\??dd\c!nummer}]}
+
+\def\showdnsubsubnummer#1%
+ {\showdnsubnummer{#1}%
+ \getvalue{\??dd#1\c!scheider}%
+ \nummer[\v!sub\v!sub\getvalue{\??dd#1\??dd\c!nummer}]}
+
+\def\showdnsubsubsubnummer#1%
+ {\showdnsubsubnummer{#1}%
+ \getvalue{\??dd#1\c!scheider}%
+ \nummer[\v!sub\v!sub\v!sub\getvalue{\??dd#1\??dd\c!nummer}]}
+
+\def\domakednnummer#1#2%
+ {\getvalue{\??dd#2\c!links}%
+ \strut#1{#2}%
+ \getvalue{\??dd#2\c!rechts}}
+
+% #1=name #2=level #3=\show #4[#5]#6=#1[#2]#3 van definitie
+
+% alternatief zonder check en ietwat verwarrend
+%
+% \bgroup
+% \setvalue{\??dd#1\c!sectienummer}{\v!ja}%
+% \protectconversion
+% \maakvoorafgaandenummer[#1]%
+% \xdef\internaldoornummer{#3{#1}}%
+% \thisissomeinternal{#1}{\internaldoornummer}%
+% \doifelsevaluenothing{\??dd#1\c!koppeling} % checken
+% {\gotosomeinternal
+% {\getvalue{\??dd#1\c!koppeling}}
+% {\internaldoornummer}
+% {\copy0}
+% {}}
+% {\box0}%
+% \egroup
+% \rawreference{\s!num}{#5}{#3{#1}}%
+
+\def\special@@definitiewoord#1#2#3#4[#5]#6%
+ {\getvalue{@@dodefinitiewoord\getvalue{\??dd#2#1\c!uitlijnen}}
+ {\strut
+ \doifelsevalue{\??dd#1\c!nummer}{\v!nee}
+ {\!!doneafalse}
+ {\doifelse{#5}{-}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \if!!donea
+ \getvalue{\e!volgende#2#1}%
+ \iflocation
+ \bgroup
+ \setvalue{\??dd#1\c!sectienummer}{\v!ja}%
+ \protectconversion
+ \maakvoorafgaandenummer[#1]%
+ \xdef\internaldoornummer{#3{#1}}%
+ \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ \egroup
+ \fi
+ \maakvoorafgaandenummer[#1]%
+ \hbox
+ {\def\kap##1{##1}% \domakednnumer gaat hier fout binnen kap
+ \doattributes
+ {\??dd#1\v!kop}
+ {\strut
+ \showdntext{#2#1}%
+ \domakednnummer#3{#1}%
+ \getvalue{\??dd#1\c!afsluiter}}%
+ \iflocation
+ \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
+ \doifreferencefoundelse{\localconnection}
+ {\in[\localconnection]} % genereert > of <
+ {}%
+ \fi}%
+ \rawreference{\s!num}{#5}{#3{#1}}%
+ \else
+ \strut\ExpandBothAfter\doattributes
+ {\??dd#1\v!kop}
+ {\showdnpuretext{#2#1}}%
+ \rawreference{\s!num}{#5}{}%
+ \fi}}
+
+% De macro's \??dd#1\c!lokaal en \??dd#1\c!commando leveren
+% de koppeling tussen \doornummeren en \doordefinieren. Deze
+% constructie is nodig omdat doornummeren geen argument
+% heeft en omdat subnummers niet worden genest binnen
+% het hogere niveau. Het commando \??dd#1\s!do\c!commando
+% moet in dat geval \v!ja zijn.
+
+\def\@@ddleftskip#1#2%
+ {\do@@ddleftskip{#1}{#2}{}}
+
+\def\do@@ddleftskip#1#2#3%
+ {\ExpandFirstAfter\processaction
+ [\getvalue{\??dd#2#1\c!inspringen}]
+ [ \v!nee=>,
+ \v!ja=>\dodo@@ddleftskip{#1}{#2}{#3}%
+ \doifnot{#2}{\v!sub#3}
+ {\do@@ddleftskip{#1}{#2}{\v!sub#3}},
+ \s!unknown=>\advance\leftskip by \getvalue{\??dd#2#1\c!inspringen}]}
+
+\def\dodo@@ddleftskip#1#2#3%
+ {\ExpandFirstAfter\processaction
+ [\getvalue{\??dd#3\v!sub#1\c!inspringen}]
+ [ \v!nee=>,
+ \v!ja=>\ExpandFirstAfter\doifnotinset
+ {\getvalue{\??dd#3#1\c!breedte}}{\v!passend,\v!ruim}
+ {\advance\leftskip by \getvalue{\??dd#3#1\c!breedte}},
+ \s!unknown=>\advance\leftskip by \commalistelement]}
+
+\def\@@ddresetsubsubsubnummer#1%
+ {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}%
+ \resetnummer[\v!sub\v!sub\v!sub\doornummer]}
+
+\def\@@ddresetsubsubnummer#1%
+ {\@@ddresetsubsubsubnummer{#1}%
+ \resetnummer[\v!sub\v!sub\doornummer]}
+
+\def\@@ddresetsubnummer#1%
+ {\@@ddresetsubsubnummer{#1}%
+ \resetnummer[\v!sub\doornummer]}
+
+\def\@@ddresetnummer#1%
+ {\@@ddresetsubnummer{#1}%
+ \resetnummer[\doornummer]}
+
+\def\@@ddvolgendesubsubsubnummer#1[#2]%
+ {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}%
+ \verhoognummer[\v!sub\v!sub\v!sub\doornummer]%
+ \rawreference{\s!num}{#2}{\showdnsubsubsubnummer{\doornummer}}}%
+
+\def\@@ddvolgendesubsubnummer#1[#2]%
+ {\@@ddresetsubsubsubnummer{#1}%
+ \verhoognummer[\v!sub\v!sub\doornummer]%
+ \rawreference{\s!num}{#2}{\showdnsubsubnummer{\doornummer}}}
+
+\def\@@ddvolgendesubnummer#1[#2]%
+ {\@@ddresetsubsubnummer{#1}%
+ \verhoognummer[\v!sub\doornummer]%
+ \rawreference{\s!num}{#2}{\showdnsubnummer{\doornummer}}}
+
+\def\@@ddvolgendenummer#1[#2]%
+ {\@@ddresetsubnummer{#1}%
+ \verhoognummer[\doornummer]%
+ \rawreference{\s!num}{#2}{\showdnnummer{\doornummer}}}
+
+\def\dodosteldoornummerenin[#1][#2]%
+ {\getparameters[\??dd#1][#2]%
+ \stelnummerin[#1][\c!conversie=\getvalue{\??dd#1\c!conversie}]} % see below
+
+\def\dosteldoornummerenin[#1][#2]%
+ {\ConvertToConstant\doifelse{#2}{}
+ {\getparameters[\??dn][#1]}
+ {\dodoubleargumentwithset\dodosteldoornummerenin[#1][#2]}}
+
+\def\steldoornummerenin%
+ {\dodoubleempty\dosteldoornummerenin}
+
+\def\dododoornummeren#1#2#3[#4][#5]#6%
+ {\dodoordefinieren[#3#1]%
+ [\s!do\c!commando=\v!ja,
+ \c!lokaal=\@@ddleftskip{#1}{#3},
+ \c!commando=\special@@definitiewoord{#1}{#3}{#6}]%
+ \copyparameters[\??dd#3#1][\??dn]
+ [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur,
+ \c!breedte,\c!nummer,
+ \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
+ \c!niveaus,\c!wijze,\c!blokwijze,\c!scheider, % \c!conversie
+ \c!afsluiter,\c!sectienummer,\c!nummer,\c!inspringen]%
+ \ConvertToConstant\doifinstringelse{=}{#4}
+ {\getparameters[\??dd#3#1]%
+ [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
+ \c!links=,\c!rechts=,\c!koppeling=,#4]}%
+ {\doifelsenothing{#4}
+ {\getparameters[\??dd#3#1]%
+ [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
+ \c!links=,\c!rechts=,\c!koppeling=,#4]}%
+ {\copyparameters[\??dd#3#1][\??dd#3#4]
+ [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur,
+ \c!breedte,\c!nummer,
+ \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
+ \c!links,\c!rechts,\c!koppeling,\c!inspringen]%
+ \getparameters[\??dd#3#1]
+ [\c!tekst=#1,\??dd\c!nummer=#4,\c!conversie=,#5]}}%
+ \ExpandBothAfter\doif{\getvalue{\??dd#3#1\??dd\c!nummer}}{#1}
+ {\definieernummer
+ [#3#1]
+ [\c!wijze=\getvalue{\??dd#1\c!wijze},
+ \c!blokwijze=\getvalue{\??dd#1\c!blokwijze},
+ \c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]%
+ \doifvalue{\??dd#1\c!niveaus}{#2}% % for
+ {\doifsomething{\getvalue{\??dd#1\c!conversie}}% % old
+ {\stelnummerin[#3#1] % times
+ [\c!conversie=\getvalue{\??dd#1\c!conversie}]}}}% % sake
+ \setvalue{\s!reset#3#1}%
+ {\getvalue{\??dd\s!reset#3\c!nummer}{#1}}%
+ \setvalue{\s!complex\e!volgende#3#1}%
+ {\getvalue{\??dd\c!volgende#3\c!nummer}{#1}}%
+ \setvalue{\e!volgende#3#1}%
+ {\complexorsimpleempty{\e!volgende#3#1}}}
+
+\def\dodoornummeren[#1][#2][#3]%
+ {\dododoornummeren{#1}{1}{}[#2][#3]\showdnnummer
+ \dododoornummeren{#1}{2}{\v!sub}[#2][#3]\showdnsubnummer
+ \dododoornummeren{#1}{3}{\v!sub\v!sub}[#2][#3]\showdnsubsubnummer
+ \dododoornummeren{#1}{4}{\v!sub\v!sub\v!sub}[#2][#3]\showdnsubsubsubnummer}
+
+\def\doornummeren%
+ {\dotripleemptywithset\dodoornummeren}
+
+%I n=Doorspringen
+%I c=\doorspringen,\steldoorspringenin
+%I
+%I Inspringende opsommingen (bijvoorbeeld dialogen) kunnen
+%I worden gezet met:
+%I
+%I \doorspringen[naam][tekst=,scheider=,breedte=,letter=,
+%I kopletter=,voor=,na=]
+%I
+%I Na dit commando zijn de commando's \naam, \subnaam en
+%I \subsubnaam beschikbaar.
+%I
+%I Er kunnen standaardwaarden worden ingesteld met het
+%I commando:
+%I
+%I \steldoorspringenin[instellingen]
+%I
+%I Een aantal commando's kan worden omringt met de volgende
+%I commando's (wel lege regels ertussen!).
+%I
+%I \startdoorspringen
+%I \stopdoorspringen
+%P
+%I Het tussentijds bijstellen van de instellingen is mogelijk
+%I met:
+%I
+%I \steldoorspringenin[naam][instellingen]
+
+% Het default-mechanisme kan mooier: leegtest, enz.
+%
+% Werkprocedure buiten definitie
+
+\def\dodosteldoorspringenin[#1][#2]%
+ {\getparameters[\??ds#1][#2]}
+
+\def\dosteldoorspringenin[#1][#2]%
+ {\ConvertToConstant\doifelse{#2}{}
+ {\dodosteldoorspringenin[][#1]}
+ {\dodoubleargumentwithset\dodosteldoorspringenin[#1][#2]}}
+
+\def\steldoorspringenin%
+ {\dodoubleempty\dosteldoorspringenin}
+
+\def\startdoorspringen%
+ {\witruimte
+ \@@dsvoor
+ \pagina[\v!voorkeur]
+ \begingroup
+ \parskip=\!!zeropoint\relax}
+
+\def\stopdoorspringen%
+ {\endgroup
+ \@@dsna}
+
+\def\dododoorspringen#1#2#3%
+ {\par
+ \getvalue{\??ds#1\c!voor}%
+ \begingroup
+ \doifvaluenothing{\??ds#1\c!monster}
+ {\setvalue{\??ds#1\c!monster}%
+ {\getvalue{\??ds#1\c!tekst}}}%
+ \assignwidth
+ {\!!widtha}
+ {\getvalue{\??ds#1\c!breedte}}
+ {\doattributes
+ {\??ds#1\v!kop}
+ {\getvalue{\??ds#1\c!monster}\getvalue{\??ds#1\c!scheider}}}%
+ \advance\!!widtha by \tfskipsize
+ \setbox2=\hbox to \!!widtha
+ {\doattributes
+ {\??ds#1\v!kop}
+ {\strut
+ \getvalue{\??ds#1\c!tekst}%
+ \hss
+ \getvalue{\??ds#1\c!scheider}%
+ \tfskip}}%
+ \parindent\!!zeropoint
+ \hskip#2\!!widtha\indent\box2%
+ \hangindent#3\!!widtha
+ \doattributes{\??ds#1}{}% #4}%
+ \AfterPar%
+ {\endgroup
+ \getvalue{\??ds#1\c!na}}%
+ \GetPar}
+
+\def\dodoorspringen[#1][#2]%
+ {\copyparameters[\??ds#1][\??ds]
+ [\c!tekst,\c!scheider,\c!breedte,\c!letter,\c!kleur,
+ \c!kopletter,\c!monster,\c!voor,\c!na]%
+ \getparameters[\??ds#1][#2]%
+ \setvalue{#1}%
+ {\dododoorspringen{#1}{0}{1}}%
+ \setvalue{\v!sub#1}%
+ {\dododoorspringen{#1}{1}{2}}%
+ \setvalue{\v!sub\v!sub#1}%
+ {\dododoorspringen{#1}{2}{3}}}
+
+\def\doorspringen%
+ {\dodoubleargumentwithset\dodoorspringen}
+
+%I n=Doorlabelen
+%I c=\doorlabelen,\verhoog,\huidige
+%I
+%I Het is mogelijk genummerde verwijzingen (bijvoorbeeld
+%I naar sheets of video's) in de tekst op te nemen met
+%I het commando:
+%I
+%I \doorlabelen[naam][tekst=,plaats=,voor=,na=,kopletter=]
+%I
+%I Na dit commando zijn de volgende commando's beschikbaar:
+%I
+%I \reset<naam>
+%I \verhoog<naam>
+%I \volgende<naam>[referentie]
+%I \huidige<naam>
+%I \in<naam>[referentie]
+%P
+%I Er kan een 'kopje' worden opgeropeen met het commando:
+%I
+%I \naam
+%I
+%I In dat geval worden de onder 'voor' en 'na' opgegeven
+%I commando's uitgevoerd.
+%I
+%I Als we voor naam 'sheet' invullen en voor tekst
+%I 'transparant' dan leidt het commando \huidigesheet tot
+%I de tekst 'transparant 1' en een volgende aanroep tot de
+%I tekst 'transparant 2'.
+
+\def\dodoorlabel[#1][#2]%
+ {\getvalue{\s!number#1\c!voor}%
+ \bgroup
+ %\ExpandFirstAfter\doifinset{\getvalue{\s!number#1\c!plaats}}{\v!marge,\v!inmarge}
+ % {\setvalue{\s!number#1\c!zetwijze}{\v!inmarge}}%
+ \doif{\getvalue{\s!number#1\c!plaats}}{\v!marge}
+ {\setvalue{\s!number#1\c!plaats}{\v!inmarge}}%
+ \doattributes{\s!number#1\v!kop}{\getvalue{\e!volgende#1}[#2]}%
+ \egroup
+ \getvalue{\s!number#1\c!na}}%
+
+\def\dovolgendedoorlabel[#1][#2]%
+ {\volgendenummer[#1][\s!lab][#2]}
+
+\def\dodoorlabelen[#1][#2]%
+ {\definieernummer
+ [#1]
+ [\c!voor=,
+ \c!na=,
+ \c!kopletter=,
+ \c!wijze=\@@nrwijze,
+ #2]%
+ \setvalue{#1}%
+ {\dodoubleempty\dodoorlabel[#1]}%
+ \setvalue{\s!reset#1}%
+ {\resetnummer[#1]}%
+ \setvalue{\e!verhoog#1}%
+ {\verhoognummer[#1]}%
+ \setvalue{\e!volgende#1}%
+ {\dodoubleempty\dovolgendedoorlabel[#1]}%
+ \setvalue{\c!huidige#1}%
+ {\huidigenummer[#1]}%
+ \setvalue{\c!in#1}[##1]% % weghalen
+ {\innummer[#1][##1]}% % weghalen
+ \setvalue{\c!op#1}[##1]% % weghalen
+ {\opnummer[#1][##1]}} % weghalen
+
+\def\doorlabelen%
+ {\dodoubleargumentwithset\dodoorlabelen}
+
+%I n=Uitlijnen
+%I c=\startuitlijnen,\steluitlijnenin,\steltolerantiein
+%I c=\regellinks,\regelrechts,\regelmidden,
+%I c=\woordrechts
+%I
+%I De regelval kan worden ingesteld met:
+%I
+%I \steluitlijnenin[instelling]
+%I
+%I waarbij de volgende instellingen mogelijk zijn:
+%I
+%I links links niet uitvullen
+%I midden links/rechts niet uitvullen = centreren
+%I rechts rechts niet uitvullen
+%I breedte uitvullen over breedte (default)
+%I beide wisselend (afhankelijk bladzijde)
+%I onder onderkant niet uitgelijnd (default)
+%I hoogte uitvullen over hoogte (op baseline)
+%I regel uitvullen over hoogte (binnen kader)
+%I reset uitvullen over breedte en hoogte
+%I
+%I In combinatie met links, midden en rechts kan 'ruim'
+%I worden opgegeven.
+%P
+%I Aanvullend zijn de volgende commando's beschikbaar:
+%I
+%I \startuitlijnen[instelling]
+%I \stopuitlijnen
+%I
+%I Een regel kan op verschillende manieren worden uitgelijnd
+%I met behulp van de commando's:
+%I
+%I \regellinks{tekst}
+%I \regelrechts{tekst}
+%I \regelmidden{tekst}
+%I
+%I Aan het eind van een paragraaf kan een stukje tekst
+%I worden geplaatst met: \woordrechts{ziezo}
+%P
+%I De tolerantie waarbinnen het uitlijnen plaatsvindt kan
+%I worden ingesteld met:
+%I
+%I \steltolerantiein[instelling]
+%I
+%I Mogelijke waarden zijn: zeerstreng, streng, soepel en
+%I zeersoepel.
+%I
+%I Standaard heeft de tolerantie betrekking op horizontaal
+%I uitlijnen. Vertikaal kan het uitlijnen worden beinvloed
+%I door het trefwoord 'vertikaal' mee te geven. Standaard
+%I geldt [vertikaal,streng] en [horizontaal,zeerstreng].
+
+\definetwopasslist{\s!paragraph}
+
+\newcounter\nofraggedparagraphs
+
+\def\doparagraphreference% looks very much like domarginreference
+ {\doglobal\increment\nofraggedparagraphs\relax
+ \edef\writeparref%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!paragraph}%
+ {\nofraggedparagraphs}%
+ {\noexpand\realfolio}}}%
+ \writeparref}
+
+\def\setraggedparagraphmode#1#2%
+ {\ifinner
+ \ifdubbelzijdig
+ \gettwopassdata{\s!paragraph}%
+ \iftwopassdatafound
+ \ifodd\twopassdata#1\else#2\fi
+ \else
+ \ifodd\realfolio#1\else#2\fi
+ \fi
+ \doparagraphreference
+ \else
+ #2\relax
+ \fi
+ \else
+ #2\relax
+ \fi}
+
+% De onderstaande macro's zijn opgenomen in Plain TeX.
+%
+% \def\raggedright%
+% {\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}
+%
+% \def\ttraggedright%
+% {\tttf\rightskip\z@ plus2em\relax}
+%
+% \newif\ifr@ggedbottom
+%
+% \def\raggedbottom%
+% {\topskip 10\p@ plus60\p@ \r@ggedbottomtrue}
+%
+% \def\normalbottom%
+% {\topskip 10\p@ \r@ggedbottomfalse}
+%
+% en worden hieronder wat aangepast.
+
+\newif\ifn@rmalbottom
+\newif\ifr@ggedbottom
+\newif\ifb@selinebottom
+
+\def\normalbottom%
+ {\n@rmalbottomtrue
+ \r@ggedbottomfalse
+ \b@selinebottomfalse
+ \settopskip}
+
+\def\raggedbottom%
+ {\n@rmalbottomfalse
+ \r@ggedbottomtrue
+ \b@selinebottomfalse
+ \settopskip}
+
+\def\baselinebottom%
+ {\n@rmalbottomfalse
+ \r@ggedbottomfalse
+ \b@selinebottomtrue
+ \settopskip}
+
+% \hyphenpenalty = ( 2.5 * \hsize ) / \raggedness
+% \tolerance >= 200
+% \raggedness = 2 .. 6\korpsgrootte
+
+\def\leftraggedness {2\korpsgrootte}
+\def\rightraggedness {2\korpsgrootte}
+\def\middleraggedness {6\korpsgrootte}
+
+\def\setraggedness#1%
+ {\ifnum\tolerance<200\relax % kleinere waarden
+ \tolerance=200\relax % geven ongewenste
+ \fi % effecten
+ \spaceskip=2.5\hsize % voorkomt conflict
+ \xspaceskip=#1\relax % met \dimen0/2 en
+ \divide\spaceskip by \xspaceskip % deze skips worden
+ \hyphenpenalty=\spaceskip} % toch al aangepast
+
+\def\setraggedskips#1#2#3#4#5#6%
+ {\leftskip=1\leftskip\!!plus#1\relax % zie: Tex By Topic 8.1.3
+ \rightskip=1\rightskip\!!plus#2\relax % zie: Tex By Topic 8.1.3
+ \spaceskip#3\relax
+ \xspaceskip#4\relax
+ \parfillskip\!!zeropoint\!!plus#5\relax
+ \parindent#6\relax}
+
+\def\notragged%
+ {\setraggedskips{0em}{0em}{0em}{0em}{1fil}{\parindent}} % {\voorwit}}
+
+\def\raggedleft%
+ {\setraggedness\leftraggedness
+ \setraggedskips{\leftraggedness}{0em}{.3333em}{.5em}{0em}{0em}}
+
+\def\raggedcenter%
+ {\setraggedness\middleraggedness
+ \setraggedskips{\middleraggedness}{\middleraggedness}{.3333em}{.5em}{0em}{0em}}
+
+\def\raggedright%
+ {\setraggedness\rightraggedness
+ \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}} % {\voorwit}}
+
+\def\veryraggedleft%
+ {\setraggedskips{1fil}{0em}{.3333em}{.5em}{0em}{0em}}
+
+\def\veryraggedcenter%
+ {\setraggedskips{1fil}{1fil}{.3333em}{.5em}{0em}{0em}}
+
+\def\veryraggedright%
+ {\setraggedskips{0em}{1fil}{.3333em}{.5em}{0em}{\parindent}} % {\voorwit}}
+
+\def\ttraggedright%
+ {\tttf
+ \setraggedskips{0em}{\rightraggedness}{0em}{0em}{0em}{\parindent}} % {\voorwit}}
+
+\def\dosteluitlijnenin[#1]%
+ {\doifinsetelse{\v!ruim}{#1}{\!!doneatrue}{\!!doneafalse}%
+ \processallactionsinset
+ [#1]
+ [ \v!regel=>\baselinebottom,
+ \v!onder=>\raggedbottom,
+ \v!hoogte=>\normalbottom,
+ \v!breedte=>\notragged,
+ \v!binnen=>\setraggedparagraphmode\raggedleft\raggedright,
+ \v!buiten=>\setraggedparagraphmode\raggedright\raggedleft,
+ \v!links=>\if!!donea\veryraggedleft\else\raggedleft\fi,
+ \v!rechts=>\if!!donea\veryraggedright\else\raggedright\fi,
+ \v!midden=>\if!!donea\veryraggedcenter\else\raggedcenter\fi,
+ \v!reset=>\notragged
+ \normalbottom]}
+
+\def\steluitlijnenin%
+ {\dosingleargument\dosteluitlijnenin}
+
+\def\startuitlijnen%
+ {\bgroup
+ \steluitlijnenin}
+
+\def\stopuitlijnen
+ {\par
+ \egroup}
+
+\def\regellinks#1%
+ {\noindent\leftline{{\strut#1}}}
+
+\def\regelrechts#1%
+ {\noindent\rightline{{#1\strut}}}
+
+\def\regelmidden#1%
+ {\noindent\centerline{{\strut#1}}}
+
+\def\doregelplaats#1%
+ {\getvalue{regel\interfaced{#1}}}
+
+\def\dosteltolerantiein[#1]%
+ {\doifinsetelse{\v!vertikaal}{#1}%
+ {\processfirstactioninset
+ [#1]
+ [\v!zeerstreng=>\def\bottomtolerance{},
+ \v!streng=>\def\bottomtolerance{.050},
+ \v!soepel=>\def\bottomtolerance{.075},
+ \v!zeersoepel=>\def\bottomtolerance{.100}]}%
+ {\processfirstactioninset
+ [#1]
+ [\v!zeerstreng=>\tolerance=200,
+ \v!streng=>\tolerance=1500,
+ \v!soepel=>\tolerance=3000,
+ \v!zeersoepel=>\tolerance=4500]}}
+
+\def\steltolerantiein%
+ {\dosingleargument\dosteltolerantiein}
+
+\def\woordrechts%
+ {\groupedcommand{\hfill\hbox}{\parfillskip\!!zeropoint}}
+
+%I n=Margeteksten
+%I c=\inmarge,\inlinker,\inrechter,\stelinmargein
+%I c=\margetitel,\figuurinmarge
+%I c=\oplinker
+%I
+%I Een paragraaf kan worden ingeluid met een tekst in
+%I de marge:
+%I
+%I \inmarge{tekst}
+%I \inlinker{tekst}
+%I \inrechter{tekst}
+%I
+%I Met \\ kan binnen een margetekst naar een volgende regel
+%I worden gesprongen.
+%P
+%I Het onderstaande commando kan gebruikt worden om een
+%I paragraafaanduiding in de marge te plaatsen. Het commando
+%I moet aan het begin van de paragraaf staan. Er wordt
+%I gecontroleerd of een en ander nog op de bladzijde past.
+%I
+%I \margetitel{tekst}
+%I
+%I Tussen \margetitel{tekst} en de volgende alinea mag,
+%I omwille van de overzichtelijkheid, een lege regels staan.
+%I Als dit commando wordt gebruikt na een commando als
+%I \paragraaf, kan het controlemechanisme leiden tot een
+%I ongewenste overgang naar een nieuwe bladzijde. In dat
+%I geval kan beter het volgende commando worden gebruikt.
+%I
+%I \margewoord{tekst}
+%I
+%I Dit commando komt overeen met \inmarge, alleen is bij
+%I \margewoord de lege regel toegestaan.
+%P
+%I Er kan eventueel voor {tekst} een [referentie] worden
+%I meegegeven. In dat geval kan worden verwezen naar het
+%I paginanummer waarop het margewoord staat.
+%I
+%I Als TeX twijfelt in welke marge het woord moet staan, is
+%I een tweede verwerkingsslag nodig. Als een margewoord bij
+%I herhaling verkeerd wordt geplaatst, dan kan het
+%I automatisme worden verstoord door [+] mee te geven. Een
+%I margewoord kan lager worden gezet met [laag]. Combinaties
+%I kunnen ook:
+%I
+%I \margewoord[+,laag][referentie]{woord}
+%P
+%I De wijze van weergeven kan worden ingesteld met het
+%I commando:
+%I
+%I \stelinmargein[letter=,plaats=,voor=,na=,uitlijnen=]
+%I
+%I Als plaats kan links, rechts of beide worden meegegeven. In
+%I het laatste geval hangt de plaats af van het
+%I enkel/dubbelzijdig zetten.
+%I
+%I Uitlijnen kent twee instellingen: 'ja' en 'nee'. Inhet
+%I eerste geval (default) worden de margewoorden tegen de
+%I kantlijn geplaatst.
+%P
+%I Vooruitlopend op meer commando's is er al vast het
+%I commando:
+%I
+%I \oplinker{tekst}
+%I
+%I Dit commando kan bijvoorbeeld worden gebruikt binnen
+%I een midden-uitgelijnde tekst. Het commando is nog niet
+%I definitief en robuust.
+
+% %P
+% %I Aanvullend zijn commando's beschikbaar om figuren in
+% %I de marge te plaatsen:
+% %I
+% %I \figuurinmarge{figuur}
+% %I \figuurinlinker{figuur}
+% %I \figuurinrechter{figuur}
+
+%T n=margetitel
+%T m=mar
+%T a=m
+%T
+%T \margetitel{?}
+%T
+
+\newif\iflowinmargin
+
+\def\stelinmargein%
+ {\dodoubleempty\dostelinmargein}
+
+\def\dostelinmargein[#1][#2]%
+ {\ifsecondargument
+ \doifundefinedelse{\??im#1\c!offset}
+ {\presetlocalframed
+ [\??im#1]%
+ \getparameters
+ [\??im#1]
+ [\c!kader=\v!uit,
+ \c!offset=\v!overlay,
+ \c!regel=1,
+ \c!scheider=,
+ \c!breedte=\v!ruim,
+ \c!afstand=\!!zeropoint,
+ \c!letter=\@@imletter,
+ \c!kleur=\@@imkleur,
+ \c!plaats=\@@implaats,
+ \c!uitlijnen=\@@imuitlijnen,
+ \c!voor=\@@imvoor,
+ \c!na=\@@imna,
+ #2]}
+ {\getparameters[\??im#1][#2]}%
+ \else
+ \getparameters[\??im][#1]%
+ \fi}
+
+\let\margetekstafstand = \!!zeropoint
+\def\margetekstregels {1}
+\def\margetekstnummer {0}
+\let\margetekstscheider = \empty
+
+\def\maakmargetekstblok#1#2#3#4#5#6%
+ {#4\relax
+ \bgroup
+ \mindermeldingen
+ \hsize#1\relax
+ \ifnum\margetekstnummer=0
+ \def\margetekstnummer{#2}%
+ \fi
+ \processaction
+ [\getvalue{\??im\margetekstnummer\c!uitlijnen}]
+ [ \v!ja=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2},
+ \v!binnen=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2},
+ \v!buiten=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#3},
+ \s!default=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}]%
+ \setbox0=\vbox\localframed
+ [\??im\margetekstnummer]
+ [\c!strut=\v!nee]
+ {\decrement\margetekstregels
+ \@@imvoor
+ \doattributes{\??im\margetekstnummer}
+ {\dorecurse{\margetekstregels}{\strut\\}%
+ \begstrut#6\endstrut\endgraf}%
+ \@@imna}%
+ \ht0=\ht\strutbox
+ \box0
+ \egroup
+ #5\relax}
+
+\def\plaatsmargetekstscheider%
+ {\ifnum\margincontent>0
+ \bgroup
+ \dimen0=\margetekstregels\lineheight
+ \advance\dimen0 by -\lineheight
+ \lower\dimen0\hbox{\margetekstscheider}%
+ \egroup
+ \fi}
+
+\def\linkermargetekstblok#1%
+ {\maakmargetekstblok
+ {\linkermargebreedte}
+ {\v!links}{\v!rechts}
+ {\llap{\plaatsmargetekstscheider}}{\hskip\margetekstafstand}
+ {#1}}
+
+\def\rechtermargetekstblok#1%
+ {\maakmargetekstblok
+ {\rechtermargebreedte}
+ {\v!rechts}{\v!links}
+ {\hskip\margetekstafstand}{\rlap{\plaatsmargetekstscheider}}
+ {#1}}
+
+\def\doplacemargintext#1#2#3%
+ {\strut
+ \setbox0=\hbox{#1}%
+ \dimen0=\ht0
+ \advance\dimen0 by \dp0
+ \ifdim\dimen0>\marginheight
+ \global\marginheight=\dimen0
+ \fi
+ \setbox0=\hbox
+ {#2{\hskip#3\strut\iflowinmargin\else\raise\dp\strutbox\fi\box0}}%
+ \ht0=\!!zeropoint
+ \dp0=\!!zeropoint
+ \vadjust{\box0}}
+
+\def\doinlinker#1%
+ {\doplacemargintext
+ {\linkermargetekstblok{#1}\hskip\linkermargeafstand}
+ \llap\!!zeropoint}
+
+\def\doinrechter#1%
+ {\doplacemargintext
+ {\hskip\rechtermargeafstand\rechtermargetekstblok{#1}}
+ \rlap\hsize}
+
+\newcounter \nofmarginnotes
+\newif \iftrackingmarginnotes
+\newif \ifrightmargin % documenteren
+
+\definetwopasslist{\s!margin}
+
+\def\domarginreference%
+ {\doglobal\increment\nofmarginnotes\relax
+ \edef\writemarref%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!margin}%
+ {\nofmarginnotes}%
+ {\noexpand\realfolio}}}%
+ \writemarref}
+
+\def\dodoinmargenormal#1#2#3#4%
+ {\iffirstsidefloatparagraph\geenwitruimte\fi % zo laat mogelijk
+ \ifodd#1\relax
+ \rightmargintrue
+ #3{#4}%
+ \else
+ \rightmarginfalse
+ #2{#4}%
+ \fi}
+
+\def\doinmargenormal#1#2#3%
+ {\bgroup
+ \iftrackingmarginnotes
+ \gettwopassdata{\s!margin}%
+ \iftwopassdatafound
+ \dodoinmargenormal\twopassdata#1#2{#3}%
+ \else
+ \dodoinmargenormal\realfolio#1#2{#3}%
+ \fi
+ \domarginreference
+ \else
+ \dodoinmargenormal\realfolio#1#2{#3}%
+ \fi
+ \egroup}
+
+\def\doinmargereverse#1#2#3%
+ {\dodoinmargenormal\realfolio#2#1{#3}}
+
+\def\doinmarge[#1][#2][#3][#4][#5]#6%
+ {\doifcommonelse{+,-,\v!laag}{#4}
+ {\dodoinmarge[#1][#2][#3][#4][#5]{#6}}
+ {\dodoinmarge[#1][#2][#3][][#4]{#6}}%
+ \ignorespaces}
+
+\def\dodoinmarge[#1][#2][#3][#4][#5]#6%
+ {\ignorespaces
+ \doifinsetelse{\v!laag}{#4}
+ {\lowinmargintrue}
+ {\lowinmarginfalse}%
+ \processaction
+ [#1]
+ [ \v!links=>#2{#6},
+ \v!rechts=>#3{#6},
+ \s!unknown=>\ifdubbelzijdig
+ \doifcommonelse{+,-}{#4}
+ {\doinmargereverse#2#3{#6}}
+ {\doinmargenormal#2#3{#6}}%
+ \else
+ #2{#6}%
+ \fi]%
+ \rawpagereference{\s!mar}{#5}%
+ \ignorespaces}
+
+\def\inlinker%
+ {\indentation\doquintupleempty\doinmarge
+ [\c!links][\doinlinker][\doinrechter]}
+
+\def\inrechter%
+ {\indentation\doquintupleempty\doinmarge
+ [\c!rechts][\doinlinker][\doinrechter]}
+
+\def\inmarge%
+ {\doquintupleempty\doinmarge
+ [\@@implaats][\doinlinker][\doinrechter]}
+
+\def\inanderemarge%
+ {\doquintupleempty\doinmarge
+ [\@@implaats][\doinrechter][\doinlinker]}
+
+\newcounter\margincontent
+
+\def\flushmargincontent% [#1][#2]#3% hier plaats 'globaal' (geen 1,2 enz)
+ {\doinmarge[\@@implaats][\doinlinker][\doinrechter]} % [#1][#2]{#3}}
+
+\newdimen\marginheight
+
+\let\restoreinterlinepenalty=\relax
+
+\def\flushmargincontents% % links + rechts
+ {\restoreinterlinepenalty
+ \ifnum\margincontent>0
+ \bgroup
+ \forgetall
+ \global\marginheight\!!zeropoint
+ \dorecurse{\margincontent}
+ {\bgroup
+ \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand}}%
+ \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel}}%
+ \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}%
+ \let\margetekstnummer=\recurselevel
+ \getvalue{\??im\recurselevel}%
+ \global\setvalue{\??im\recurselevel}{}%
+ \egroup}%
+ \ifdim\marginheight>\lineheight % This is something real dirty!
+ \advance\marginheight by \pagetotal
+ \advance\marginheight by \lineheight % a sort of bonus
+ \ifdim\marginheight>\pagegoal
+ \xdef\restoreinterlinepenalty%
+ {\global\let\restoreinterlinepenalty\relax
+ \global\interlinepenalty=\the\interlinepenalty}%
+ \global\interlinepenalty=10000
+ \fi
+ \else % We need the above because interlinepenalties overrule vadjusted \nobreaks.
+ %\vadjust
+ % {\forgetall
+ % \global\advance\marginheight by \lineheight
+ % \global\divide\marginheight by \lineheight
+ % \dorecurse{\number\marginheight}
+ % {\nobreak\vskip\lineheight}%
+ % \kern-\number\marginheight\lineheight}%
+ \vadjust{\nobreak}%
+ \fi
+ \doglobal\newcounter\margincontent
+ \egroup
+ \fi}
+
+\def\complexmargewoord[#1][#2]#3%
+ {\doglobal\increment\margincontent
+ \stelinmargein[\margincontent][]%
+ \global\setvalue{\??im\margincontent}%
+ {\flushmargincontent[#1][#2]{#3}}}
+
+\def\margewoord%
+ {\dodoubleempty\complexmargewoord}
+
+\def\margetitel%
+ {\margewoord}
+
+\def\margetekst%
+ {\margewoord}
+
+\def\margewoordpositie[#1]#2%
+ {\ifnum#1>\margincontent
+ \xdef\margincontent{#1}%
+ \fi
+ \stelinmargein[#1][]%
+ \global\setvalue{\??im#1}%
+ {\flushmargincontent[][]{#2}}}
+
+\def\oplinker#1%
+ {\strut
+ \vadjust
+ {\mindermeldingen
+ \setbox0=\vtop{\forgetall\strut#1}%
+ \getboxheight\dimen0\of\box0
+ \vskip-\dimen0\
+ \box0}}
+
+%D \macros
+%D {inleftside,inleftmargin,inrightmargin,inrightside}
+%D {}
+%D
+%D The fast and clean way of putting things in the margin is
+%D using \type{\rlap} or \type{\llap}. Unfortunately these
+%D macro's don't handle indentation, left and right skips. We
+%D therefore embed them in some macro's that (force and)
+%D remove the indentation and restore it afterwards.
+
+\def\inleftmargin#1%
+ {\pushindentation
+ \llap{#1\hskip\leftskip\hskip\linkermargeafstand}%
+ \popindentation
+ \ignorespaces}
+
+\def\inrightmargin#1%
+ {\pushindentation
+ \rlap{\hskip\hsize\hskip-\rightskip\hskip\rechtermargeafstand#1}%
+ \popindentation
+ \ignorespaces}
+
+\def\inleftside#1%
+ {\inleftmargin
+ {#1\relax
+ \hskip\linkermargebreedte
+ \hskip\pageseparation
+ \hskip\linkerrandafstand}}
+
+\def\inrightside#1%
+ {\inrightmargin
+ {\hskip\rechtermargebreedte
+ \hskip\rechterrandafstand
+ \hskip\pageseparation
+ #1}}
+
+%D We want to keep things efficient and therefore only handle
+%D situations like:
+%D
+%D \startbuffer
+%D \inleftside {fine} some text \par
+%D \strut \inleftmargin {fine} some text \par
+%D \noindent \inrightmargin {fine} some text \par
+%D \noindent \strut \inrightside {fine} some text \par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D which looks like:
+%D
+%D \bgroup
+%D \haalbuffer
+%D \parindent 30pt
+%D \haalbuffer
+%D \egroup
+
+%D \macros
+%D {pushindentation,popindentation}
+%D
+%D The pushing and popping is done by:
+
+\newbox\indentationboxA
+\newbox\indentationboxB
+
+\def\pushindentation%
+ {\bgroup
+ \ifhmode
+ \unskip
+ \setbox\indentationboxA=\lastbox % get \strut if present
+ \unskip
+ \setbox\indentationboxB=\lastbox % get \indent generated box
+ \unskip
+ \else
+ \hskip\!!zeropoint % switch to horizontal mode
+ \unskip
+ \setbox\indentationboxA=\lastbox % get \indent generated box
+ \setbox\indentationboxB=\box\voidb@x
+ \fi}
+
+\def\popindentation%
+ {\box\indentationboxB\box\indentationboxA % put back the boxes
+ \egroup}
+
+%D The only complication lays in \type{\strut}. In \PLAIN\
+%D \TEX\ a \type{\strut} is defined as:
+%D
+%D \starttypen
+%D \def\strut%
+%D {\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
+%D \stoptypen
+%D
+%D But what is a \type{\strut}? Normally it's a rule of width
+%D zero, but when made visual, it's a rule and a negative skip.
+%D The mechanism for putting things in the margins described
+%D here cannot handle this situation very well. One
+%D characteristic of \type{\strut} is that the \type{\unhcopy}
+%D results in entering horizontal mode, which in return leads
+%D to some indentation.
+%D
+%D To serve our purpose a bit better, the macro \type{\strut}
+%D can be redefined as:
+%D
+%D \starttypen
+%D \def\strut%
+%D {\relax\ifmmode\else\hskip0pt\fi\copy\strutbox}
+%D \stoptypen
+%D
+%D Or more compatible:
+%D
+%D \starttypen
+%D \def\strut%
+%D {\relax\ifmmode
+%D \copy\strutbox
+%D \else
+%D \bgroup\setbox\strutbox=\normalhbox{\box\strutbox}\unhcopy\strutbox\egroup
+%D \fi}
+%D \stoptypen
+%D
+%D In \CONTEXT\ however we save some processing time by putting
+%D an extra \type{\hbox} around the \type{\strutbox}.
+
+% dit zijn voorlopig lokale commando's
+
+\def\woordinlinker {\inlinkermarge}
+\def\woordinrechter{\inrechtermarge}
+
+\def\woordinmarge%
+ {\doquintupleempty\doinmarge
+ [\@@implaats][\woordinlinker][\woordinrechter]}
+
+%I n=Paginanummer
+%I c=\stelpaginanummerin,\stelsubpaginanummerin
+%I
+%I Het paginanummer kan worden ingesteld met het commando:
+%I
+%I \stelpaginanummerin[nummer=,status=]
+%I
+%I Het nummeren kan gedurende een of meerdere pagina's worden
+%I stilgezet door in plaats van een nummer start, stop of
+%I handhaaf mee te geven.
+%I
+%I Het paginanummer is oproepbaar met:
+%I
+%I \paginanummer
+%I
+%I en het totaal aantal paginanummers met:
+%I
+%I \totaalaantalpaginas
+%P
+%I Er zijn subnummers beschikbaar. De wijze van nummeren
+%I wordt ingesteld met:
+%I
+%I \stelsubpaginanummerin[wijze=,status=]
+%I
+%I De status kan 'stop', 'start' of 'geen' zijn. In het
+%I laatste geval wordt gewoon doorgenummerd, maar wordt het
+%I nummer niet geplaatst.
+%I
+%I Standaard wordt 'perdeel' genummerd. De subnummers zijn
+%I oproepbaar met:
+%I
+%I \subpaginanummer
+%I \aantalsubpaginas
+
+% Standaard is \count0 in Plain TeX de paginateller. Omwille
+% van de afhandeling van lokaal nummeren, definieren we
+% echter een eigen nummer.
+
+\definieernummer
+ [\s!page]
+ [\c!conversie=\@@nmconversie,
+ \c!wijze=\@@nmwijze,
+ \c!status=\@@nmstatus,
+ \c!start=1]
+
+\def\dostelpaginanummerin[#1]%
+ {\getparameters
+ [\??pn]
+ [\c!status=\v!start,
+ #1]%
+ \doifinstringelse{\c!nummer}{#1}
+ {\setnummer[\s!page]{\@@pnnummer}%
+ \setuserpageno{\ruwenummer[\s!page]}}%
+ {}}
+
+\def\stelpaginanummerin%
+ {\dosingleargument\dostelpaginanummerin}
+
+\def\verlaagpaginanummer%
+ {\doif{\@@pnstatus}{\v!start}
+ {\verlaagnummer[\s!page]%
+ \setuserpageno{\ruwenummer[\s!page]}}}
+
+\def\verhoogpaginanummer%
+ {\processaction
+ [\@@pnstatus]
+ [ \v!start=>{\verhoognummer[\s!page]%
+ \setuserpageno{\ruwenummer[\s!page]}},
+ \v!handhaaf=>{\doassign[\??pn][\c!status=\v!start]}]}
+
+\def\checkpagecounter%
+ {\checknummer{\s!page}}
+
+%I n=Pagina
+%I c=\pagina
+%I
+%I Het volgende commando kan worden gebruikt om pagina's af
+%I te dwingen of blokkeren:
+%I
+%I \pagina[instelling]
+%I
+%I Waarbij als instelling kan worden gegeven:
+%I
+%I ja een geforceerde paginaovergang met \vfill
+%I opmaak een geforceerde paginaovergang zonder \vfill
+%I nee bij voorkeur geen paginaovergang
+%I voorkeur bij voorkeur de paginaovergang hier (3)
+%I grotevoorkeur bij voorkeur de paginaovergang hier (7)
+%I links ga naar een linker pagina
+%I rechts ga naar een rechter pagina
+%I leeg een lege pagina
+%I blokkeer blokkeer ja ... grotevoorkeur (1 pagina)
+%I reset het blokkering ja ... grotevoorkeur op
+%I
+%I Als geen instelling wordt meegegeven (\pagina), wordt een
+%I overgang geforceerd. Als een nummer wordt meegegeven, wordt
+%I naar de opgegeven pagina gegaan.
+
+\newif\ifpaginageblokkeerd
+\paginageblokkeerdfalse
+
+\def\testpagina[#1][#2]%
+ {\global\!!doneafalse
+ \ifpaginageblokkeerd
+ \else
+ \ifdim\pagetotal<\pagegoal
+ \dimen0=\lineheight
+ \multiply\dimen0 by #1\relax
+ \advance\dimen0 by \pagetotal
+ \ifdim\lastskip<\parskip
+ \advance\dimen0 by \parskip
+ \fi
+ \advance\dimen0 by #2\relax
+ \ifdim\dimen0>.99\pagegoal
+ \penalty-\!!tenthousand\relax
+ \global\!!doneatrue
+ \fi
+ \else
+ \goodbreak
+ \fi
+ \fi}
+
+\let\resetcurrentsectionmarks=\relax
+
+% was: \resetsectionmarks[\firstsection], zie \handelpaginaaf
+
+\def\complexpagina[#1]%
+ {\flushfootnotes
+ \processaction
+ [#1]
+ [ \v!reset=>\global\paginageblokkeerdfalse,
+ \v!blokkeer=>\global\paginageblokkeerdtrue,
+ \v!ja=>\ifpaginageblokkeerd\else
+ \ejectinsert
+ \ejectpage
+ \ifbinnenkolommen
+ \ejectpage % anders soms geen overgang
+ \fi
+ \fi,
+ \v!opmaak=>\ifpaginageblokkeerd\else
+ \eject
+ \fi,
+ \v!nee=>\ifpaginageblokkeerd\else
+ \nobreak
+ \fi,
+ \v!voorkeur=>{\ifpaginageblokkeerd\else
+ \ifbinnenkolommen
+ \goodbreak
+ \else
+ \testpagina[3][\!!zeropoint]%
+ \fi
+ \fi},
+ \v!grotevoorkeur=>{\ifpaginageblokkeerd\else
+ \ifbinnenkolommen
+ \goodbreak
+ \else
+ \testpagina[5][\!!zeropoint]%
+ \fi
+ \fi},
+ \v!leeg=>{\ejectinsert
+ \ejectpage
+ \doifnotvalue{\??tk\v!hoofd\v!tekst\c!status}{\v!stop}
+ {\stelhoofdin[\c!status=\v!leeg]}%
+ \doifnotvalue{\??tk\v!voet\v!tekst\c!status}{\v!stop}
+ {\stelvoetin[\c!status=\v!leeg]}%
+ \hardespatie
+ \vfill
+ \ejectpage},
+ \v!links=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \orsideone
+ \resetcurrentsectionmarks
+ \hardespatie
+ \vfill
+ \ejectpage
+ \orsidetwo
+ \od},
+ \v!rechts=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \orsideone
+ \orsidetwo
+ \resetcurrentsectionmarks
+ \hardespatie
+ \vfill
+ \ejectpage
+ \od},
+ \v!viertal=>{\ifdubbelzijdig
+ \!!counta=\realpageno
+ \!!countb=\realpageno
+ \divide\!!counta by 4\relax
+ \divide\!!countb by 2\relax
+ \ifnum\!!counta=\!!countb\relax
+ \else
+ \pagina
+ \pagina[\v!leeg]%
+ \pagina[\v!leeg]%
+ \fi
+ \fi},
+ \v!laatste=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \naastpagina
+ \orsideone
+ \orsidetwo
+ \stelvoetin[\c!status=\v!leeg]%
+ \stelhoofdin[\c!status=\v!leeg]%
+ \hardespatie
+ \vfill
+ \ejectpage
+ \od},
+ \s!unknown=>\doifnumberelse{#1}
+ {\ejectinsert
+ \ejectpage
+ \loop
+ \ifnum\userpageno<#1\relax
+ \hardespatie
+ \vfill
+ \ejectinsert
+ \ejectpage
+ \repeat}
+ {}]}
+
+\def\simplepagina%
+ {\complexpagina[\v!ja]}
+
+\def\pagina%
+ {\complexorsimple{pagina}}
+
+\def\resetpagina%
+ {\global\paginageblokkeerdfalse}
+
+% \getpagestatus
+% \ifrightpage als odd/enkelzijdig
+
+\newif\ifrightpage \rightpagetrue
+
+\newcounter \nofpagesets
+
+\definetwopasslist{\s!page}
+
+\def\dopagesetreference%
+ {\doglobal\increment\nofpagesets\relax
+ \edef\writepagref%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!page}%
+ {\nofpagesets}%
+ {\noexpand\realfolio}}}%
+ \writepagref}
+
+\def\getpagestatus% hierboven gebruiken
+ {\ifdubbelzijdig
+ \gettwopassdata{\s!page}%
+ \iftwopassdatafound \else
+ \let\twopassdata=\realpageno
+ \fi
+ \ifodd\twopassdata
+ \global\rightpagetrue
+ \else
+ \global\rightpagefalse
+ \fi
+ \dopagesetreference
+ \else
+ \global\rightpagetrue
+ \fi}
+
+%I n=Hoofdteksten
+%I c=\stelnummeringin
+%I c=\stelhoofdtekstenin,\stelvoettekstenin,\stelhoofdin,\stelvoetin
+%I c=\stelboventekstenin,\stelondertekstenin,\stelbovenin,\stelonderin
+%I
+%I Zogeheten hoofd- en/of voetteksten kan men instellen
+%I met:
+%I
+%I \stelhoofdtekstenin [linker tekst] [rechter tekst]
+%I \stelvoettekstenin [linker tekst] [rechter tekst]
+%I
+%I Bij dubbelzijdig zetten worden de linker en rechter
+%I teksten gespiegeld.
+%I
+%I In plaats van een tekst kunnen de woorden 'hoofdstuk',
+%I 'paragraaf' en 'deel' worden meegegeven. Ook kan het
+%I woord 'datum' worden meegegeven.
+%P
+%I Als men op de even en oneven pagina's een andere tekst
+%I wil hebben, dan kan men een tweede paar meegeven. In dat
+%I geval zijn er dus vier argumenten: [][][][].
+%I
+%I Als men in de marge of randen teksten wil, kan men dat
+%I direct achter het commando aangeven:
+%I
+%I \stelhoofdtekstenin [lokatie] [links] [rechts]
+%I \stelvoettekstenin [lokatie] [links] [rechts]
+%I
+%I Mogelijke lokaties zijn: tekst, marge en rand.
+%P
+%I In de tekst opgenomen commando's kunnen soms voor
+%I problemen zorgen. Commando's kan men daarom laten
+%I voorafgaan \geentest, bijvoorbeeld:
+%I
+%I \stelvoettekstenin[\geentest\lastigcommando][]
+%I
+%I Meestal geven commando's geen problemen. Wel moet men
+%I oppassen met []. Accolades zijn hiervoor de oplossing:
+%I
+%I \stelvoettekstenin[{{\huidigedatum[mm,/,jj]}}][]
+%I
+%I of
+%I
+%I \stelvoettekstenin[\geentest{\huidigedatum[mm,/,jj]}][]
+%P
+%I De wijze van nummeren wordt gedefinieerd met:
+%I
+%I \stelnummeringin[variant=,plaats=,conversie=,
+%I links=,rechts=,tekst=,tekstscheider=,nummerscheider,
+%I wijze=,blok=,status=,letter=,<sectie>nummer=,commando=]
+%I
+%I De plaats van het nummer hangt af van het eerste
+%I meegegeven argument:
+%I
+%I enkelzijdig dubbelzijdig
+%I
+%I links, rechts kantlijn (links of rechts)
+%I marge marge (links of rechts)
+%I midden midden
+%I inlinker, inrechter inlinker, inrechter
+%P
+%I Met plaats geeft men tevens aan of het nummer in het hoofd
+%I of in de voet komt {hoofd,midden}. Met 'nummerscheider' geeft
+%I men aan wat er binnen een (eventueel) samengestelde nummer
+%I als scheider wordt gezet, standaard: 2-3. Met 'tekstscheider'
+%I geeft men aan wat er tussen het paginanummer en een hoofd- of
+%I voettekst wordt gezet (in geval van plaatsen op de marge).
+%I
+%I Liefhebbers kunnen aan 'commando' een eigen commando om het
+%I nummer te zetten meegeven. Dit eigen commando krijgt als
+%I argument het paginanummer mee.
+%I
+%I Het is mogelijk een dubbelzijdige tekst met enkelzijdige
+%I marges te zetten:
+%I
+%I \stelnummeringin[variant={enkelzijdig,dubbelzijdig}]
+%I
+%I In dit geval worden de hoofd- en voetregels dus wel
+%I gespiegeld en hebben commando's als \pagina[rechts] betekenis.
+%P
+%I Als 'conversie' is mogelijk: cijfers, letters, Letters,
+%I romeins en Romeins. Als 'status' kan 'start' of 'stop'
+%I worden meegegeven. Op deze manier kan het aangeven van
+%I een paginanummer worden aan- en uitgezet.
+%I
+%I Er kan per sectienummer (deelnummer, hoofdstuknummer enz.)
+%I worden ingesteld of het zichtbaar is ('ja' of 'nee').
+%I
+%I Mogelijke wijzen van nummeren zijn: perdeel of perhoofdstuk.
+%P
+%I Hoofd- en voetregels blijven achterwege of juist niet na het
+%I commando:
+%I
+%I \geenhoofdenvoetregels
+%I \welhoofdenvoetregels
+%I
+%I of na:
+%I
+%I \stelhoofdin[lokatie][linkerletter=,rechterletter=,
+%I letter=,linkerbreedte=,rechterbreedte=,voor=,na=]
+%I \stelvoetin[locatie][linkerletter=,rechterletter=,
+%I letter=,linkerbreedte=,rechterbreedte=,voor=,na=]
+%I
+%I mogelijke lokaties zijn: tekst, marge en rand. Als [lokatie]
+%I wordt wegelaten, dan wordt tekst verondersteld.
+%I
+%I Als de breedte wordt ingesteld, dan wordt de weergegeven
+%I tekst zonodig ingekort en gevolgd door ...
+%P
+%I Het is mogelijk het plaatsen van hoofd- en voetregels
+%I stop te zetten:
+%I
+%I \stelhoofdin[status=]
+%I \stelvoetin[status=]
+%I
+%I Aan status kunnen de olgende aarden worden toegekend:
+%I
+%I geen de kop/voet vervalt (de tekst schuift omhoog)
+%I leeg de kop/voet blijft 1 pagina leeg
+%I hoog de kop/voet vervalt 1 pagina leeg (idem)
+%I normaal de kop/voet wordt gezet
+%I stop de kop/voet blijft vanaf nu leeg
+%I start de kop/voet wordt vanaf nu weer gevuld
+%I
+%I Het is ook mogelijk bij \stelhoofdin en \stelvoetin als
+%I parameters [voor=] en [na=] mee te geven. De toegekende
+%I commando's worden in dat geval voor en na het hoofd en de
+%I de voet uitgevoerd.
+%P
+%I Boven het hoofd en onder de voet is ook ruimte. Deze kan
+%I worden gedefinieerd met vergelijkbare commando's:
+%I
+%I \stelboventekstenin[...][...][...]
+%I \stelondertekstenin[...][...][...]
+%I
+%I \stelbovenin[...]
+%I \stelonderin[...]
+%I
+%I \geenbovenenonderregels
+%I \welbovenenonderregels
+
+% De onderstaande macro's lijken op het eerste gezicht vrij
+% ingewikkeld en omslachtig. Dit is het gevolg van een
+% dubbel optioneel zijn van argumenten: zowel het eerste als
+% de twee laatste argumenten zijn optioneel. Dit is mede het
+% gevolg van een uitbreiding naar marges en randen, waarbij
+% upward-compatibiliteit zwaar heeft gewogen.
+
+\def\dostellayouttekstin[#1][#2][#3]%
+ {\ifthirdargument
+ \getparameters[\??tk#1#2][#3]%
+ \else
+ \getparameters[\??tk#1\v!tekst][#2]%
+ \fi
+ \calculatevsizes}
+
+\def\stelbovenin {\dotripleempty\dostellayouttekstin[\v!boven]}
+\def\stelhoofdin {\dotripleempty\dostellayouttekstin[\v!hoofd]}
+\def\steltekstin {\dotripleempty\dostellayouttekstin[\v!tekst]}
+\def\stelvoetin {\dotripleempty\dostellayouttekstin[\v!voet]}
+\def\stelonderin {\dotripleempty\dostellayouttekstin[\v!onder]}
+
+\letvalue{\??tk\v!boven\v!tekst\c!status}=\v!normaal
+\letvalue{\??tk\v!hoofd\v!tekst\c!status}=\v!normaal
+\letvalue{\??tk\v!tekst\v!tekst\c!status}=\v!normaal
+\letvalue{\??tk\v!voet \v!tekst\c!status}=\v!normaal
+\letvalue{\??tk\v!onder\v!tekst\c!status}=\v!normaal
+
+\def\geenhoofdenvoetregels%
+ {\stelhoofdin[\c!status=\v!leeg]%
+ \stelvoetin[\c!status=\v!leeg]}
+
+\def\geenbovenenonderregels%
+ {\stelbovenin[\c!status=\v!leeg]%
+ \stelonderin[\c!status=\v!leeg]}
+
+\def\dolimitateteksten#1#2%
+ {\limitatetext{#2}{\getvalue{#1\c!breedte}}{}}
+
+\def\doteksten#1#2#3#4%
+ {\bgroup
+ \convertargument#4\to\ascii
+ \doifsomething{\ascii}
+ {\doattributes{#1#2#3}
+ {\doifvalue{#1\v!tekst\c!strut}{\v!ja}{\setstrut\strut}% hier!
+ \doifdefinedelse{\??mk\ascii\c!koppeling} % brrr
+ {\dolimitateteksten{#1#2#3}{\haalmarkering[\ascii][\v!eerste]}}
+ {\ConvertConstantAfter\doifelse{\v!paginanummer}{#4}
+ {\@@plaatspaginanummer}
+ {\ConvertConstantAfter\doifelse{\v!datum}{#4}
+ {\currentdate[\v!dag,\v!maand,\v!jaar]}
+ {\opeenregel\dolimitateteksten{#1#2#3}{#4}}}}}}%
+ \egroup}
+
+\def\dodoteksten#1#2#3#4#5#6%
+ {\doifonevenpaginaelse
+ {\doteksten{#1}{#2}{#3}{#4}}
+ {\doteksten{#1}{#2}{#5}{#6}}}
+
+\def\dodododoteksten[#1][#2][#3][#4][#5][#6]%
+ {\ifsixthargument
+ \setvalue{\??tk#1#2\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{#2}{\c!linker}{#3}{\c!rechter}{#6}}%
+ \setvalue{\??tk#1#2\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{#2}{\c!rechter}{#4}{\c!linker}{#5}}%
+ \else\iffifthargument
+ \setvalue{\??tk#1\v!tekst\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}{\c!linker}{#2}{\c!rechter}{#5}}%
+ \setvalue{\??tk#1\v!tekst\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}{\c!rechter}{#3}{\c!linker}{#4}}%
+ \else\iffourthargument
+ \setvalue{\??tk#1#2\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{#2}{\c!linker}{#3}{\c!linker}{#3}}%
+ \setvalue{\??tk#1#2\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{#2}{\c!rechter}{#4}{\c!rechter}{#4}}%
+ \else
+ \setvalue{\??tk#1\v!tekst\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}{\c!linker}{#2}{\c!linker}{#2}}%
+ \setvalue{\??tk#1\v!tekst\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}{\c!rechter}{#3}{\c!rechter}{#3}}%
+ \fi\fi\fi}
+
+\def\stelboventekstenin {\dosixtupleempty\dodododoteksten[\v!boven]}
+\def\stelhoofdtekstenin {\dosixtupleempty\dodododoteksten[\v!hoofd]}
+\def\stelteksttekstenin {\dosixtupleempty\dodododoteksten[\v!tekst]}
+\def\stelvoettekstenin {\dosixtupleempty\dodododoteksten[\v!voet]}
+\def\stelondertekstenin {\dosixtupleempty\dodododoteksten[\v!onder]}
+
+\def\@@plaatspaginanummer%
+ {\doif{\@@nmstatus}{\v!start}%
+ {{\@@nmcommando{\doattributes{\??nm}{\volledigepaginanummer}}}}}
+
+\def\@@nmpre#1{\setbox0=\hbox{#1}\ifdim\wd0=\!!zeropoint\else\unhbox0\tfskip\fi}
+\def\@@nmpos#1{\setbox0=\hbox{#1}\ifdim\wd0=\!!zeropoint\else\tfskip\unhbox0\fi}
+
+\def\dodoplaatsteksten#1#2#3#4#5#6% \hsize toegevoegd
+ {\hbox
+ {\hbox to \linkerrandbreedte
+ {\hsize\linkerrandbreedte
+ \hss\getvalue{\??tk#1\v!rand#2}}%
+ \hskip\linkerrandafstand
+ \hskip\pageseparation
+ \hbox to \linkermargebreedte
+ {\hsize\linkermargebreedte
+ \hsmash{\hbox to \linkermargebreedte
+ {\hss\getvalue{\??tk#1\v!marge#2}}}%
+ \hsmash{\hbox to \linkermargebreedte
+ {\hss#5{\??tk#1\v!marge\c!margetekst}}}%
+ \hss}% let op: \smashed
+ \hskip\linkermargeafstand
+ \hbox to \zetbreedte
+ {\hsize\zetbreedte
+ \hsmash{\hbox to \zetbreedte
+ {\@@nmpre{#5{\??tk#1\v!tekst\c!kantlijntekst}}%
+ \getvalue{\??tk#1\v!tekst#2}\hss}}%
+ \hsmash{\hbox to \zetbreedte
+ {\hss\getvalue{\??tk#1\v!tekst#3}\hss}}%
+ \hsmash{\hbox to \zetbreedte
+ {\hss\getvalue{\??tk#1\v!tekst#4}%
+ \@@nmpos{#6{\??tk#1\v!tekst\c!kantlijntekst}}}}%
+ \hss}%
+ \hskip\rechtermargeafstand
+ \hbox to \rechtermargebreedte
+ {\hsize\rechtermargebreedte
+ \hsmash{\hbox to \rechtermargebreedte
+ {\getvalue{\??tk#1\v!marge#4}\hss}}%
+ \hsmash{\hbox to \rechtermargebreedte
+ {#6{\??tk#1\v!marge\c!margetekst}\hss}}%
+ \hss}% let op: \smashed
+ \hskip\pageseparation
+ \hskip\rechterrandafstand
+ \hbox to \rechterrandbreedte
+ {\hsize\rechterrandbreedte
+ \getvalue{\??tk#1\v!rand#4}\hss}}}
+
+\def\doplaatslayoutregel#1#2%
+ {\ifdim#2>\!!zeropoint\relax % prevents pagenumbers when zero height
+ \goleftonpage
+ \hbox
+ {\setbox0=\vbox to #2
+ {\forgetall
+ \vsize#2
+ \normalbaselines
+ \def\\{ \ignorespaces}%
+ \def\crlf{ \ignorespaces}%
+ \getvalue{\??tk#1\v!tekst\c!voor}%
+ \doifbothsidesoverruled
+ \dodoplaatsteksten#1\c!linkertekst\c!middentekst\c!rechtertekst
+ \gobbleoneargument\getvalue
+ \orsideone
+ \dodoplaatsteksten#1\c!linkertekst\c!middentekst\c!rechtertekst
+ \gobbleoneargument\getvalue
+ \orsidetwo
+ \dodoplaatsteksten#1\c!rechtertekst\c!middentekst\c!linkertekst
+ \getvalue\gobbleoneargument
+ \od
+ \getvalue{\??tk#1\v!tekst\c!na}%
+ \kern\!!zeropoint}% keep the \dp, beware of \vtops, never change this!
+ \dp0=\!!zeropoint
+ \box0}%
+ \fi}
+
+% \stelhoofdin[status=normaal] \titel{NORMAAL} \dorecurse{8}{\input tufte} \pagina
+% \stelhoofdin[status=hoog] \titel{HOOG} \dorecurse{8}{\input tufte} \pagina
+% \stelhoofdin[status=leeg] \titel{LEEG} \dorecurse{8}{\input tufte} \pagina
+% \stelhoofdin[status=geen] \titel{GEEN} \dorecurse{8}{\input tufte} \pagina
+% \stelhoofdin[status=stop] \titel{STOP} \dorecurse{8}{\input tufte} \pagina
+
+\def\plaatslayoutregel#1#2% % handelt o.b.v. tekst
+ {\ExpandFirstAfter\processaction
+ [\getvalue{\??tk#1\v!tekst\c!status}]
+ [ \v!geen=>,
+ \v!hoog=>, % is reset later on
+ \v!start=>\setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
+ \doplaatslayoutregel{#1}{#2},
+ \v!stop=>\vskip#2\relax,
+ \v!leeg=>\setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
+ \vskip#2\relax,
+ \v!normaal=>\doplaatslayoutregel{#1}{#2},
+ \s!default=>\doplaatslayoutregel{#1}{#2},
+ \s!unknown=>\doplaatslayoutregel{#1}{#2}]}
+
+\def\resetlayoutregel#1%
+ {\doifvalue{\??tk#1\v!tekst\c!status}{\v!hoog}
+ {\setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}% ! global
+ \doglobal\calculatevsizes
+ \global\newlogostrue
+ \global\newbackgroundtrue}}
+
+\def\resetlayoutregels%
+ {\resetlayoutregel\v!boven
+ \resetlayoutregel\v!hoofd
+ \resetlayoutregel\v!tekst
+ \resetlayoutregel\v!voet
+ \resetlayoutregel\v!onder}
+
+\def\plaatsbovenregel {\plaatslayoutregel\v!boven\bovenhoogte}
+\def\plaatshoofdregel {\plaatslayoutregel\v!hoofd\hoofdhoogte}
+\def\plaatstekstregel {\plaatslayoutregel\v!tekst\teksthoogte}
+\def\plaatsvoetregel {\plaatslayoutregel\v!voet\voethoogte}
+\def\plaatsonderregel {\plaatslayoutregel\v!onder\onderhoogte}
+
+\def\gettextboxes% elders weghalen
+ {\bgroup
+ \setbox0=\vbox
+ {\mindermeldingen
+ \calculatereducedvsizes
+ \swapmargins
+ \forgetall
+ \offinterlineskip
+ \vskip-\bovenhoogte
+ \vskip-\bovenafstand
+ \plaatsbovenregel
+ \vskip\bovenafstand
+ \plaatshoofdregel
+ \vskip\hoofdafstand
+ \plaatstekstregel
+ \vskip\voetafstand
+ \plaatsvoetregel
+ \vskip\onderafstand
+ \plaatsonderregel
+ \plaatsversieaanduiding
+ \vfilll}%
+ \smashbox0
+ \box0
+ \egroup}
+
+\def\@@plaatspaginascheider%
+ {\doif{\@@nmstatus}{\v!start}%
+ {\@@nmtekstscheider}}
+
+% ook rand ondersteunen
+
+\def\dodosetpagenumberlocation#1#2%
+ {\ExpandFirstAfter\processallactionsinset
+ [\@@nmplaats]
+ [ \v!links=>\setvalue{\??tk#1\v!tekst\c!linkertekst}{#2},
+ \v!rechts=>\setvalue{\??tk#1\v!tekst\c!rechtertekst}{#2},
+ \v!midden=>\setvalue{\??tk#1\v!tekst\c!middentekst}{#2},
+ \v!inlinker=>\setvalue{\??tk#1\v!marge\c!linkertekst}{#2},
+ \v!inrechter=>\setvalue{\??tk#1\v!marge\c!rechtertekst}{#2},
+ \v!inmarge=>\setvalue{\??tk#1\v!marge\ifdubbelzijdig\c!margetekst\else\c!rechtertekst\fi}{#2},
+ \v!marge=>\setvalue{\??tk#1\v!marge\ifdubbelzijdig\c!margetekst\else\c!rechtertekst\fi}{#2},
+ \v!opmarge=>\setvalue{\??tk#1\v!tekst\c!kantlijntekst}{#2},
+ \v!kantlijn=>\setvalue{\??tk#1\v!tekst\c!kantlijntekst}{#2}]}
+
+\def\dosetpagenumberlocation#1%
+ {\ExpandBothAfter\doifinsetelse{\v!hoofd}{\@@nmplaats,\@@nmin}
+ {\dodosetpagenumberlocation{\v!hoofd}{#1}}
+ {\dodosetpagenumberlocation{\v!voet}{#1}}}
+
+\def\@@nmin {} % kan vervallen (upward compatibility)
+\def\@@nmplaats {} % mag {plaats, in} zijn
+
+\def\dostelnummeringin[#1]%
+ {\dosetpagenumberlocation\relax
+ \getparameters[\??nm][#1]%
+ \preparepaginaprefix{\??nm}%
+ \enkelzijdigfalse
+ \dubbelzijdigfalse
+ \ExpandFirstAfter\processallactionsinset
+ [\@@nmvariant]
+ [ \v!enkelzijdig=>\enkelzijdigtrue,
+ \v!dubbelzijdig=>\dubbelzijdigtrue]%
+ \ifdubbelzijdig
+ \trackingmarginnotestrue
+ \else
+ \trackingmarginnotesfalse
+ \fi
+ \dosetpagenumberlocation\@@plaatspaginanummer
+ \global\newbackgroundtrue
+ \global\newlogostrue}
+
+\def\stelnummeringin%
+ {\dosingleargument\dostelnummeringin}
+
+\def\preparepaginaprefix#1%
+ {\def\dopreparepaginaprefix##1%
+ {\doifvalue{#1##1\c!nummer}{\v!ja}
+ {\setvalue{#1\getvalue{\??by##1}\c!nummer}{\v!ja}}}%
+ \processcommacommand[\@@kolijst]\dopreparepaginaprefix}
+
+\def\dopaginaprefix#1#2%
+ {\doifelsevalue{#1#2\c!nummer}{\v!ja}%
+ {\@EA\beforesplitstring\@EA{\postprefix}\at:\to\preprefix
+ \@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix
+ \doifsomething{\preprefix}
+ {\doifnot{\preprefix}{0}{\preprefix\@@nmnummerscheider}}}%
+ {\@EA\aftersplitstring\@EA{\postprefix}\at:\to\postprefix}}
+
+\def\paginaprefix#1[#2::#3::#4]% kan wat sneller ####1:0:
+ {\bgroup
+ \edef\postprefix{#3}%
+ \def\donexttrackcommando##1%
+ {\dopaginaprefix{#1}{##1}%
+ \donexttracklevel{##1}}%
+ \donexttrackcommando\firstsection
+ \egroup}
+
+\def\@@plaatspaginanummer%
+ {\doif{\@@nmstatus}{\v!start}%
+ {{\@@nmcommando{\doconvertfont{\@@nmletter}{\volledigepaginanummer}}}}}
+
+\def\@@plaatspaginascheider%
+ {\doif{\@@nmstatus}{\v!start}%
+ {\@@nmtekstscheider}}
+
+\def\userfolio% naast realfolio
+ {\nummer[\s!page]}
+
+\def\paginanummer%
+ {\userfolio}
+
+\def\volledigepaginanummer% alleen voor paginanummers !!
+ {\@@nmlinks
+ \def\donexttrackcommando##1%
+ {\doifvalue{\??nm##1\c!nummer}{\v!ja}
+ {\ifnum\countervalue{\??se##1}>0\relax
+ \getvalue{##1\c!nummer}\@@nmnummerscheider
+ \fi}%
+ \doifsomething{\@@nmtekst}
+ {\@@nmtekst\@@nmnummerscheider}%
+ \donexttracklevel{##1}}%
+ \donexttrackcommando{\firstsection}%
+ \paginanummer
+ \@@nmrechts}
+
+\def\translatednumber[#1::#2::#3]%
+ {#3}
+
+%I n=Markeringen
+%I c=\markeer,\haalmarkering
+%I c=\definieermarkering,\stelmarkeringin,\resetmarkering
+%I
+%I Men kan in een tekst markeringen aanbrengen. Een markering
+%I kan bijvoorbeeld worden opgehaald in een kopregel.
+%I
+%I \definieermarkering[categorie]
+%I
+%I Een markering wordt aangebracht met het commando:
+%I
+%I \markeer[categorie]{tekst}
+%I
+%I Er kunnen drie markeringen worden opgevraagd met het
+%I commando:
+%I
+%I \haalmarkering[categorie][plaats]
+%I
+%I Mogelijke plaatsen zijn: eerste, laatste, vorige. Vorige
+%I staat voor de laatste markering op de vorige bladzijde en
+%I eerste en laatste hebben betrekking op de huidige bladzijde.
+%P
+%I Markeringen worden ge(de)blokkeerd met het commando:
+%I
+%I \stelmarkeringin[categorie][status=,expansie=]
+%I
+%I waarbij als instellingen mogelijk zijn: start en stop.
+%I Standaard wordt een markering niet ge‰xpandeerd. Wil met
+%I wel expanderen (wat bij tellers nodig is), dan kan dat
+%I worden ingesteld: expansie=ja.
+%I
+%I Markeringen kunnen worden geinitialiseerd met:
+%I
+%I \resetmarkering[categorie]
+%I
+%I Standaard worden de markeringen 'deel', 'hoofdstuk', 'paragraaf',
+%I 'subparagraaf' en 'subsubparagraaf bijgehouden.
+%P
+%I Soms wordt een argument voor meerdere doeleinden gebruikt,
+%I bijvoorbeeld in \hoofdstuk{tekst}. Hierbij is {tekst}
+%I zowel de kop van het hoofdstuk als de eventueel te plaatsen
+%I markering in de hoofd- of voetregel. Als zo'n tekst te lang
+%I wordt, kan ze als volgt worden beperkt:
+%I
+%I {eerste tweede \geenmarkering{derde vierde} vijfde}
+%I
+%I De woorden 'derde' en 'vierde' worden in dit geval in de
+%I markering vervangen door punten.
+
+% Het commando \newmark\markering genereert
+%
+% \markering
+%
+% en het commando \getmarks\markering genereert
+%
+% \topmarkering
+% \botmarkering
+% \firstmarkering
+%
+% voor 'interne' doeleinden zijn beschikbaar:
+%
+% \prefetchmark[naam]
+% \fetchmark[naam][plaats]
+
+% nog expansie in hoofdmarkering
+
+\def\hoofdmarkering#1%
+ {\getvalue{\??mk#1\c!koppeling}}
+
+\def\dodoresetmarkering#1%
+ {\expandafter\newmark\csname\??mk\hoofdmarkering{#1}\endcsname}
+
+\def\doresetmarkering[#1]%
+ {\processcommalist[#1]\dodoresetmarkering}
+
+\def\resetmarkering%
+ {\dosingleargument\doresetmarkering}
+
+\def\dostelmarkeringin[#1][#2]%
+ {\getparameters[\??mk#1][#2]}
+
+\def\stelmarkeringin%
+ {\dodoubleargument\dostelmarkeringin}
+
+\setvalue{\??mk\v!vorige}{top}
+\setvalue{\??mk\v!eerste}{first}
+\setvalue{\??mk\v!laatste}{bot}
+
+\def\dododefinieermarkering[#1][#2]%
+ {\stelmarkeringin[#1]
+ [% \c!expansie=\v!nee, scheelt weer een macro
+ \c!status=\v!start]%
+ \ontkoppelmarkering[#1]% d.w.z. geen koppeling met secties
+ \setevalue{\??mk#1\c!koppeling}{#2}%
+ \expandafter\newmark\csname\??mk#2\endcsname
+ %\setgvalue{\??mk#2\s!check}{0}%
+ \showmessage{\m!systems}{13}{#1,[#2]}}
+
+\def\dodefinieermarkering[#1][#2]%
+ {\doifelsenothing{#2}
+ {\dododefinieermarkering[#1][#1]}
+ {\dododefinieermarkering[#1][#2]}}
+
+\def\definieermarkering%
+ {\dodoubleempty\dodefinieermarkering}
+
+\let\geenmarkering=\relax
+
+\def\prefetchmark[#1]%
+ {%\ifnum\getvalue{\??mk\hoofdmarkering{#1}\s!check}<\realpageno
+ % \setxvalue{\??mk\hoofdmarkering{#1}\s!check}{\the\realpageno}%
+ % \expandafter\getmarks\csname\??mk\hoofdmarkering{#1}\endcsname % mag maar eenmaal per pagina
+ }%\fi}
+
+\def\fetchmark[#1][#2]%
+ {\getvalue{\getvalue{\??mk#2}\??mk\hoofdmarkering{#1}}}
+
+\def\dohaalmarkering[#1][#2]%
+ {\doifvalue{\??mk#1\c!status}{\v!start}
+ {\bgroup
+ %\prefetchmark[#1]%
+ \def\geenmarkering##1{\onbekend\ }%
+ \doifelsenothing{#2}
+ {\fetchmark[#1][\v!eerste]}
+ {\fetchmark[#1][#2]}%
+ \egroup}}
+
+\def\haalmarkering%
+ {\dodoubleargument\dohaalmarkering}
+
+\def\domarkeer[#1]#2%
+ {\bgroup
+ \doifelsevalue{\??mk#1\c!expansie}{\v!ja}
+ {\expandmarkstrue}
+ {\expandmarksfalse}%
+ \getvalue{\??mk\hoofdmarkering{#1}}{#2}%
+ \egroup}
+
+\def\markeer%
+ {\dosingleargument\domarkeer}
+
+%I n=Tekstonderdelen
+%I c=\hoofdstuk,\paragraaf,\subparagraaf,\subsubparagraaf
+%I c=\titel,\onderwerp,\subonderwerp,\subsubonderwerp,\alinea
+%I c=\stelkopin,\stelkoppenin,\stelkopnummerin
+%I c=\startbijlagen,\bijlage
+%I c=\startinleidingen,\startuitleidingen
+%I
+%I Een tekst wordt gestructureerd met de commando's:
+%I
+%I \titel [referentie] {titel}
+%I \onderwerp [referentie] {onderwerp}
+%I \subonderwerp [referentie] {onderwerp}
+%I \subsubonderwerp [referentie] {onderwerp}
+%I
+%I \hoofdstuk [referentie] {titel}
+%I \paragraaf [referentie] {titel}
+%I \subparagraaf [referentie] {titel}
+%I \subsubparagraaf [referentie] {titel}
+%I
+%I In een {titel} kan het commando \\ worden gebruikt om naar
+%I een volgende regel te gaan. Wil men ook in de inhoudsopgave
+%I naar een nieuwe regel gaan, dan dient \crlf te worden
+%I gebruikt.
+%P
+%I Op een hoger niveau kunnen delen worden gedefinieerd. In
+%I dat geval wordt standaard geen kop geplaatst (het kan
+%I wel).
+%I
+%I \deel [referentie] {titel}
+%I
+%I In totaal zijn er 7 niveaus voorgedefinieerd. Meer
+%I niveaus zijn mogelijk. Het hoogste niveau is op dit
+%I moment dus \deel en het laagste \subsubsubsubparagraaf.
+%P
+%I Naar een hoofdstuk en een paragraaf kan worden
+%I terugverwezen met:
+%I
+%I \inhoofdstuk[referentie]
+%I \inparagraaf[referentie]
+%I
+%I Zodat verwijzingen als 'zie ook hoofdstuk 2' mogelijk
+%I zijn (zie ook \inhoofdstuk[alfa]).
+%I
+%I Ook kunnen de elders besproken commando's worden
+%I gebruikt. Een referentie kan eventueel worden weggelaten,
+%I bijvoorbeeld \hoofdstuk{titel}.
+%P
+%I Een overgang naar een nieuwe alinea kan worden afgedwongen
+%I met het commando:
+%I
+%I \alinea
+%I
+%I Dit commando komt overeen met het commando \par.
+%P
+%I Aanvullend zijn de volgende commando's beschikbaar. Deze
+%I commando's onderdrukken cq. wijzigen de nummering.
+%I
+%I \startbijlagen hoofdstukken nummeren met a, b, ...
+%I \stopbijlagen hoofdstukken nummeren met 1, 2, ...
+%I
+%I \startinleidingen hoofdstukken niet nummeren
+%I \stopinleidingen hoofdstukken wel nummeren
+%I \startuitleidingen hoofdstukken niet nummeren
+%I \stopuitleidingen hoofdstukken wel nummeren
+%I
+%I Als men bijlagen apart wil nummeren, dan gebruikt men in
+%I plaats van \hoofdstuk het commando:
+%I
+%I \bijlage[referentie]{titel}
+%I
+%I waarna de eigenlijke tekst komt of wordt ingelezen uit
+%I een file.
+%P
+%I De wijze waarop hoofdstukken en paragrafen worden genummerd
+%I en gezet, kan worden ingesteld met de commando's:
+%I
+%I \stelkoppenin[variant=,scheider=]
+%I
+%I Hierbij zijn als varianten mogelijk normaal en inmarge.
+%I
+%I Daarnaast is het volgende commando beschikbaar:
+%I
+%I \stelkopin[element][letter=,nummerletter=,tekstletter=,
+%I voor=,na=,pagina=,uitlijnen=,hoofd=]
+%I
+%I Mogelijke elementen zijn: hoofdstuk, paragraaf,
+%I subparagraaf, subsubparagraaf en indien gewenst: titel en
+%I onderwerp.
+%P
+%I Aan de parameters voor en na kunnen commando's worden
+%I toegekend; 'nummer', 'tekst' en 'letter' staan voor de
+%I lettertypen. Standaard zijn 'nummer' en 'tekst' gelijk
+%I aan 'letter'. In de regel kan men volstaan met het
+%I instellen van hoofdstuk en paragraaf, omdat de andere
+%I instellingen hiervan worden afgeleid. Voorbeelden van
+%I instellingen zijn 'letter=vet', 'voor={\blanko[groot]}'
+%I en 'nummer=\tfa'.
+%I
+%I Aan 'pagina' kan de waarde 'links', 'rechts' of 'ja' worden
+%I toegekend. Er wordt alleen naar een nieuwe pagina gegaan als
+%I het nummer van de (sub)(sub)paragraaf groter is dan 1.
+%I Wil men altijd overgaan op een nieuwe bladzijde, dan kan
+%I men dit aangeven door aan 'doorgaan' de waarde 'nee' toe
+%I te kennen.
+%P
+%I Een hoofdstuk kan worden voorafgegaan door een woord,
+%I bijvoorbeeld 'Hoofdstuk'. Dit woord kan worden ingesteld
+%I met \stellabeltekstin.
+%I
+%I Als men aan 'hoofd' de waarde 'geen' toekent, dan wordt
+%I geen hoofdregel geplaatst op de bladzijde waarop de kop
+%I wordt geplaatst.
+%I
+%I Het is mogelijk varianten van koppen te definieren met het
+%I commando:
+%I
+%I \definieerkop[dochter][moeder]
+%I
+%I Na \definieerkop[rubriek][onderwerp] is het commando \rubriek
+%I beschikbaar met dezelfde kenmerken als \onderwerp. Deze
+%I kenmerken kunnen worden aangepast met \stelkopin. Als de
+%I moeder een genummerde kop is, wordt de dochter ook genummerd.
+%P
+%I Nummers van koppen kunnen worden ingesteld met het commando:
+%I
+%I \stelkopnummerin[niveau][nummer]
+%I
+%I Als het nummer wordt vooraf gegaan door + of -, dan is
+%I sprake van een verhoging of verlaging: [hoofdstuk][+2].
+
+%T n=hoofdstuk
+%T m=hfd
+%T a=h
+%T
+%T \hoofdstuk{?}
+
+%T n=paragraaf
+%T m=par
+%T a=p
+%T
+%T \paragraaf{?}
+
+\newcount\nofsections
+
+\def\zerosection{\v!tekst}
+\def\firstsection{}
+\def\lastsection{}
+
+\makecounter{\??se\v!tekst}
+\setevalue{\??se\v!tekst\c!voor}{}
+\setevalue{\??se\v!tekst\c!na}{}
+\setevalue{\v!tekst\c!nummer}{0}
+\setevalue{\v!tekst\s!format}{}
+
+\setevalue{\??sk\v!tekst}{}
+\setevalue{\??sk}{}
+
+\setvalue{\??by}{\v!tekst}
+\setvalue{\??by\v!tekst}{\v!tekst}
+\setvalue{\??by\v!alles}{\v!tekst}
+\setvalue{\??by\v!per}{\v!tekst}
+\setvalue{\??by\v!per\v!tekst}{\v!tekst}
+\setvalue{\??by\v!per\v!alles}{\v!tekst}
+
+\def\dostelsectiein[#1][#2]%
+ {\getparameters[\??se#1][#2]
+ \doifelsevalue{\??se#1\c!vorige\c!nummer}{\v!ja}
+ {\setvalue{#1\c!nummer}{\@@longsectionnumber{#1}}}%
+ {\setvalue{#1\c!nummer}{\@@shortsectionnumber{#1}}}}
+
+\def\stelsectiein%
+ {\dodoubleargument\dostelsectiein}
+
+\def\dokoppelmarkering[#1][#2]%
+ {\doifdefinedelse{\??ko#2\c!sectie}
+ {\dokoppelmarkering[#1][\getvalue{\??ko#2\c!sectie}]}
+ {\def\donexttrackcommando##1%
+ {\edef\gekoppeldemarkeringen{\getvalue{\??se##1\c!markering}}%
+ \doifelse{##1}{#2}
+ {\addtocommalist{#1}\gekoppeldemarkeringen}
+ {\removefromcommalist{#1}\gekoppeldemarkeringen}%
+ \setevalue{\??se##1\c!markering}{\gekoppeldemarkeringen}%
+ \donexttracklevel{##1}}%
+ \donexttracklevel{\firstsection}}}
+
+\def\koppelmarkering%
+ {\dodoubleargument\dokoppelmarkering}
+
+\def\ontkoppelmarkering[#1]%
+ {\koppelmarkering[#1][]}
+
+\def\definieersectie[#1]%
+ {\doifundefined{\??se#1}
+ {\doifelsenothing{\firstsection}
+ {\def\firstsection{#1}%
+ \setevalue{\??se#1\c!voor}{\v!tekst}%
+ \setevalue{\??se\v!tekst\c!na}{#1}}%
+ {\setevalue{\??se\commalistelement\c!na}{#1}%
+ \setevalue{\??se#1\c!voor}{\lastsection}%
+ \setevalue{\??se\lastsection\c!na}{#1}}%
+ \advance\nofsections by 1
+ \setevalue{\??se#1\c!niveau}%
+ {\the\nofsections}%
+ \setevalue{\??se#1\c!na}%
+ {}%
+ \setvalue{\e!volgende#1}%
+ {\@@nextsectionnumber{#1}}%
+ \setvalue{#1\c!nummer}%
+ {\@@longsectionnumber{#1}}%
+ \setvalue{#1\s!format}%
+ {\@@longformatnumber{#1}}%
+ \setevalue{\??by#1}{#1}%
+ \setevalue{\??by\v!per#1}{#1}%
+ \makecounter{\??se#1}%
+ \def\lastsection{#1}%
+ \setvalue{\??sk#1}%
+ {#1}%
+ \setvalue{\??se#1\c!markering}%
+ {}%
+ \stelsectiein[#1]
+ [\c!vorige\c!nummer=\v!ja]}}%
+
+\def\previoussection#1%
+ {\getvalue{\??se#1\c!voor}}
+
+\def\nextsection#1%
+ {\getvalue{\??se#1\c!na}}
+
+\def\@@setsectionnumber#1#2%
+ {\setgvalue{\??se#1\s!start}{}% % signal i.p.v. boolean
+ \setcounter{\??se#1}{#2}%
+ \resetsectioncounters[#1]%
+ \checkpagecounter}
+
+\def\@@nextsectionnumber#1%
+ {\setgvalue{\??se#1\s!start}{}% % signal i.p.v. boolean
+ \pluscounter{\??se#1}%
+ \resetsectioncounters[#1]%
+ \checkpagecounter}
+
+\def\@@sectionvalue#1% % nog niet overal doorgevoerd
+ {\countervalue{\??se#1}} % zoeken op \??se
+
+\def\@@sectionconversion#1%
+ {\getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}}
+
+% Omdat een markering kan worden herdefinieerd moeten we
+% eerst testen of er wel een keten||afhankelijkheid is.
+
+\def\resetsectionmarks[#1]%
+ {\ExpandFirstAfter\doifdefinedelse{\??se#1}
+ {\def\donexttrackcommando##1%
+ {\def\docommando####1%
+ {\ExpandFirstAfter\resetmarkering[####1]}%
+ \processcommacommand[\getvalue{\??se##1\c!markering}]\docommando
+ \donexttracklevel{##1}}%
+ \donexttracklevel{#1}}%
+ {\ExpandFirstAfter\resetmarkering[\hoofdmarkering{#1}]}}
+
+\def\resetsectioncounters[#1]%
+ {\def\donexttrackcommando##1%
+ {\resetcounter{\??se##1}%
+ \donexttracklevel{##1}}%
+ \donexttracklevel{#1}}
+
+% bij checken kan geen prefix worden bekeken, anders vallen
+% er titels buiten de inhoudsopgave
+
+\def\makesectionformat%
+ {\@EA\edef\@EA\sectionformat\@EA%
+ {\@@sectiontype:\getvalue{\lastsection\s!format}}}
+
+\def\dobacktracklevel#1%
+ {\doifnot{\previoussection{#1}}{\zerosection}
+ {\dobacktrackcommando{\previoussection{#1}}}}
+
+\def\donexttracklevel#1%
+ {\doifnot{#1}{\lastsection}
+ {\donexttrackcommando{\nextsection{#1}}}}
+
+\newif\ifalllevels
+
+\def\dosetlevel#1%
+ {\bgroup
+ \doifelse{#1}{\v!vorige}
+ {\global\alllevelstrue
+ \xdef\currentlevel{}%
+ \def\dobacktrackcommando##1%
+ {\ifnum\countervalue{\??se##1}>0
+ \global\alllevelsfalse
+ \xdef\currentlevel{\getvalue{\previoussection{##1}\s!format}}%
+ \else
+ \dobacktracklevel{##1}%
+ \fi}%
+ \dobacktrackcommando\lastsection}%
+ {\doifelse{\getvalue{\??by#1}}{\v!tekst}
+ {\global\alllevelstrue
+ \xdef\currentlevel{}}
+ {\doifdefinedelse{\??ko#1\c!sectie} % beter alteratief: ook
+ {\edef\@@sectie{\getvalue{\??ko#1\c!sectie}}} % hoofdstuk\c!format
+ {\edef\@@sectie{#1}}%
+ \doifdefinedelse{\??se\@@sectie}
+ {\global\alllevelsfalse
+ \xdef\currentlevel{\getvalue{\@@sectie\s!format}}}
+ {\global\alllevelstrue
+ \xdef\currentlevel{}%
+ \def\dobacktrackcommando##1%
+ {\@EA\ifx\csname\??se##1\c!start\endcsname\relax
+ \dobacktracklevel{##1}%
+ \else
+ \ifnum\countervalue{\??se##1}>0
+ \global\alllevelsfalse
+ \xdef\currentlevel{\getvalue{##1\s!format}}%
+ \else
+ \dobacktracklevel{##1}%
+ \fi
+ \fi}%
+ \dobacktrackcommando\lastsection}}}%
+ \egroup}
+
+\def\doifnextlevelelse[#1::#2]#3#4%
+ {\ifalllevels
+ #3%
+ \else
+ \doifelse{\@@sectiontype}{#1} % \@EA kunnen denk ik weg
+ {\@EA\doifinstringelse\@EA{\@EA=\currentlevel:}{=:#2:}
+ {\@EA\doifinstringelse\@EA{\@EA=\currentlevel:0}{=:#2:}{#4}{#3}}
+ {#4}}
+ {#4}%
+ \fi}
+
+\def\doifprevlevelelse[#1::#2]#3#4%
+ {\ifalllevels
+ #3%
+ \else
+ \doifelse{\@@sectiontype}{#1}
+ {\@EA\doifinstringelse\@EA{\@EA=\currentlevel:}{=:#2:}
+ {#3}
+ {#4}}
+ {#4}%
+ \fi}
+
+\def\dosettoclevel{\dosetlevel}
+\def\dosetreglevel{\dosetlevel}
+\def\dosetblklevel{\dosetlevel}
+
+\def\doiftoclevelelse{\doifnextlevelelse}
+\def\doifreglevelelse{\doifprevlevelelse}
+\def\doifblklevelelse{\doifprevlevelelse}
+
+\def\@@longformatnumber#1%
+ {\getvalue{\previoussection{#1}\s!format}:\@@shortsectionnumber{#1}}
+
+\def\@@longsectionnumber#1%
+ {\ifnum\countervalue{\??se\previoussection{#1}}>0
+ \getvalue{\previoussection{#1}\c!nummer}\@@koscheider
+ \fi
+ \@@shortsectionnumber{#1}}
+
+\def\@@shortsectionnumber#1%
+ {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
+ \@@sectionvalue{#1}%
+ \else
+ \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
+ \fi}
+
+\def\dodosetlocalsectieblok[#1#2][#3]%
+ {\def\@@sectiontype{#1}%
+ \def\@@sectieblok{#1#2}%
+ \def\@@sectieblokken{#3}}
+
+\def\dosetlocalsectieblok#1#2%
+ {\@EA\dodosetlocalsectieblok\@EA[#1][#2]}
+
+\def\doaroundsectieblok#1%
+ {\doifvaluesomething{\??sb#1\c!pagina}
+ {\ExpandFirstAfter\pagina[\getvalue{\??sb#1\c!pagina}]}%
+ \resetsectioncounters[\firstsection]%
+ \resetsectionmarks[\firstsection]}
+
+\def\dostartsectieblok#1#2%
+ {\begingroup
+ \doaroundsectieblok{#1}%
+ \dosetlocalsectieblok{#1}{#2}%
+ \expandafter\csname#2true\endcsname
+\getvalue{\??sb\@@sectieblok\c!voor}% don't move
+ \showmessage{\m!structures}{1}{\@@sectieblokken}}
+
+\def\dostopsectieblok%
+ {\showmessage{\m!structures}{2}{\@@sectieblokken}%
+\getvalue{\??sb\@@sectieblok\c!na}% don't move
+ \doaroundsectieblok{\@@sectieblok}%
+ \endgroup}
+
+\def\dostelsectieblokin[#1][#2]%
+ {\getparameters[\??sb#1][#2]}
+
+\def\stelsectieblokin%
+ {\dodoubleargument\dostelsectieblokin}
+
+\def\dodefinieersectieblok[#1][#2][#3]%
+ {\getparameters
+ [\??sb#1]
+ [\c!nummer=\v!ja,
+ \c!pagina=\v!rechts, % anders worden marks te vroeg gereset !
+ %\c!voor=,
+ %\c!na=,
+ #3]%
+ \expandafter\newif\csname if#2\endcsname
+ \setvalue{\??sb#1}%
+ {\dosetlocalsectieblok{#1}{#2}}%
+ \setvalue{\e!start#2}%
+ {\dostartsectieblok{#1}{#2}}%
+ \setvalue{\e!stop#2}%
+ {\dostopsectieblok}}
+
+\def\definieersectieblok%
+ {\dotripleargument\dodefinieersectieblok}
+
+\def\sectiebloklabel#1%
+ {\@EA\ifx\csname#1\@@sectieblok\c!label\endcsname\relax
+ \else
+ \labeltext{\getvalue{#1\@@sectieblok\c!label}}%
+ \fi}
+
+% BETER:
+
+\def\sectiebloklabel#1%
+ {\@EA\ifx\csname\??ko#1\@@sectieblok\c!label\endcsname\relax
+ \labeltext{#1}%
+ \else
+ \labeltext{\getvalue{\??ko#1\@@sectieblok\c!label}}%
+ \fi}
+
+\dosetlocalsectieblok{\v!hoofdtekst}{\v!hoofdteksten}
+
+\def\setsectiontype[#1]%
+ {\getvalue{\??sb#1}}
+
+\def\writesection#1#2#3%
+ {\bgroup
+ \convertargument#3\to\ascii
+ \edef\!!stringa{#1}%
+ \@EA\writestatus\@EA
+ {\!!stringa}
+ {\ifsectienummer#2\else(#2)\fi\normalspace\ascii}%
+ \egroup}
+
+\def\@@koniveau{1} \def\kopniveau{\@@koniveau}
+
+% \def\dohandelpaginaafA#1%
+% {\ifnum\lastpenalty>0
+% \global\paginageblokkeerdtrue
+% \fi
+% \witruimte
+% \flushsidefloats
+% \getvalue{\??ko#1\c!voor}%
+% \ifpaginageblokkeerd
+% \global\paginageblokkeerdfalse
+% \else
+% \!!countb=\getvalue{\??se\@@sectie\c!niveau}\relax
+% \ifnum\!!countb>\@@koniveau\relax
+% \!!counta=20000
+% \multiply\!!countb by 500
+% \advance\!!counta by \!!countb
+% \dosomebreak{\penalty\!!counta}%
+% \else
+% \dosomebreak{\allowbreak}%
+% \fi
+% \fi
+% \xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}}
+%
+% \def\dohandelpaginaafB#1%
+% {\doifinset{\getvalue{\??ko#1\c!pagina}}{\v!ja,\v!rechts,\v!links}
+% {\def\resetcurrentsectionmarks% toegevoegd, zie \pagina
+% {\resetsectionmarks[\previoussection{\@@sectie}]}%
+% \pagina[\getvalue{\??ko#1\c!pagina}]%
+% \doifinset{\getvalue{\??tk\v!hoofd\v!tekst\c!status}}{\v!normaal,\v!start}
+% {\doifvaluesomething{\??ko#1\c!hoofd}
+% {\stelhoofdin[\c!status=\getvalue{\??ko#1\c!hoofd}]}}}}
+%
+% \def\handelpaginaaf#1%
+% {\dohandelpaginaafA{#1}%
+% \ifnum\countervalue{\??se\previoussection{\@@sectie}}>0
+% \ifnum\countervalue{\??se\@@sectie}>0
+% \dohandelpaginaafB{#1}%
+% \else
+% \doifnotvalue{\??ko#1\c!doorgaan}{\v!ja}
+% {\dohandelpaginaafB{#1}}%
+% \fi
+% \else
+% \dohandelpaginaafB{#1}%
+% \fi}
+
+\def\dohandelpaginaafAA#1%
+ {\ifnum\lastpenalty>0
+ \global\paginageblokkeerdtrue
+ \fi}
+
+\def\dohandelpaginaafAB#1%
+ {\witruimte
+ \flushsidefloats
+ \getvalue{\??ko#1\c!voor}%
+ \ifpaginageblokkeerd
+ \global\paginageblokkeerdfalse
+ \else
+ \!!countb=\getvalue{\??se\@@sectie\c!niveau}\relax
+ \ifnum\!!countb>\@@koniveau\relax
+ \!!counta=20000
+ \multiply\!!countb by 500
+ \advance\!!counta by \!!countb
+ \dosomebreak{\penalty\!!counta}%
+ \else
+ \dosomebreak{\allowbreak}%
+ \fi
+ \fi
+ \xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}}
+
+\def\dohandelpaginaafB#1%
+ {\doifinset{\getvalue{\??ko#1\c!pagina}}{\v!ja,\v!rechts,\v!links}
+ {\def\resetcurrentsectionmarks% toegevoegd, zie \pagina
+ {\resetsectionmarks[\previoussection{\@@sectie}]}%
+ \pagina[\getvalue{\??ko#1\c!pagina}]%
+ \doifinset{\getvalue{\??tk\v!hoofd\v!tekst\c!status}}{\v!normaal,\v!start}
+ {\doifvaluesomething{\??ko#1\c!hoofd}
+ {\stelhoofdin[\c!status=\getvalue{\??ko#1\c!hoofd}]}}}}
+
+\def\handelpaginaaf#1%
+ {\dohandelpaginaafAA{#1}%
+ \ifnum\countervalue{\??se\previoussection{\@@sectie}}>0
+ \ifnum\countervalue{\??se\@@sectie}>0
+ \dohandelpaginaafB{#1}%
+ \else
+ \doifnotvalue{\??ko#1\c!doorgaan}{\v!ja}
+ {\dohandelpaginaafB{#1}}%
+ \fi
+ \else
+ \dohandelpaginaafB{#1}%
+ \fi
+ \dohandelpaginaafAB{#1}}
+
+%
+
+\def\dolocalkopsetup#1% koppeling met standaard kopcommando
+ {\forgetall
+ \ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]%
+ \def\\{\crlf\strut}}
+
+\newif\ifplaatskop
+\newif\ifverhoognummer
+\newif\ifkopnummer
+
+\def\setsectieenkoppeling#1%
+ {\edef\@@koppeling{\getvalue{\??ko#1\c!koppeling}}%
+ \edef\@@sectie{\getvalue{\??ko#1\c!sectie}}%
+ \doif{\@@koppeling}{}
+ {\edef\@@koppeling{#1}}%
+ \doif{\@@sectie}{}
+ {\edef\@@sectie{\getvalue{\??ko\@@koppeling\c!sectie}}}}
+
+\newif\ifkopprefix
+
+% \handelpaginaaf komt het eerst omdat eventueel
+% subpaginanummers moeten worden afgehandeld. Vervolgens
+% worden de nummers opgehoogd en referenties geset, dan
+% volgt de kop en tot slot de worden de marks en de prefix
+% geset.
+
+% \hoofdstuk {tekst}
+% \hoofdstuk tekst
+% \hoofdstuk <niets>
+
+\def\dosomekop#1[#2]#3%
+ {\doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\def\next{\doquadruplegroupempty\dodosomekop{#1}{#2}{#3}}}
+ {\def\next{\fourthargumentfalse\dodosomekop{#1}{#2}{#3}{}}}%
+ \next}
+
+\def\dodosomekop#1#2#3#4%
+ {\iffourthargument
+ \dododosomekop{#1}[#2]{\sectiebloklabel{#1}}{#3}{#4}%
+ \else
+ \dododosomekop{#1}[#2]{\sectiebloklabel{#1}}{\getvalue{\@@sectie\c!nummer}}{#3}%
+ \fi}
+
+\def\dododosomekop#1[#2]#3#4#5% % pas met \ExpandFirstAfter op bij twee||taligheid
+ {\setsectieenkoppeling{#1}%
+ \doifelsevalue{\??ko#1\c!prefix}{}
+ {\kopprefixfalse}
+ {\kopprefixtrue}%
+ \doifelsevalue{\??ko#1\c!plaatskop}{\v!ja}
+ {\plaatskoptrue}
+ {\plaatskopfalse}%
+ \doifelsevalue{\??ko#1\c!verhoognummer}{\v!ja}
+ {\verhoognummertrue}
+ {\verhoognummerfalse}%
+ \ifsectienummer
+ \doifelsevalue{\??sb\@@sectieblok\c!nummer}{\v!ja}
+ {\doifelsevalue{\??ko#1\c!nummer}{\v!ja}
+ {\kopnummertrue}
+ {\kopnummerfalse}}
+ {\kopnummerfalse}%
+ \else
+ \kopnummerfalse
+ \fi
+ \ifverhoognummer
+ \ifplaatskop
+ \handelpaginaaf{#1}%
+ \ifkopprefix
+ \stelrefererenin[\c!prefix=-]%
+ \fi
+ \getvalue{\e!volgende\@@sectie}%
+ \ifkopnummer
+ \doplaatskopnummertekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+ \rawreference{\s!sec}{#2}{#4}%
+ \resetsectionmarks[\@@sectie]%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}}%
+ {#3#4}
+ {#5}
+ {\markeer[#1]{#5}}%
+ \writesection{#1}{#4}{#5}%
+ \else
+ \doplaatskoptekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+ \rawpagereference{\s!sec}{#2}%
+ \resetsectionmarks[\@@sectie]%
+ \doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}}
+ {#5}
+ {\markeer[#1]{#5}}%
+ \writesection{#1}{-}{#5}%
+ \fi
+ \ifkopprefix
+ \ExpandFirstAfter\stelrefererenin[\c!prefix=\getvalue{\??ko#1\c!prefix}]%
+ \fi
+ \dosomebreak\nobreak
+ \getvalue{\??ko#1\c!na}%
+ \else
+\dohandelpaginaafB{#1}% toegevoegd ivm subpaginanr / tug sheets
+ \ifkopprefix
+ \stelrefererenin[\c!prefix=-]%
+ \fi
+ \getvalue{\e!volgende\@@sectie}%
+ \setsectionlistreference{\@@sectie}{#1}%
+ \resetsectionmarks[\@@sectie]%
+ \markeer[#1]{#5}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+ \ifkopnummer
+ \rawreference{\s!sec}{#2}{#4}%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}%
+ \writesection{#1}{#4}{#5}%
+ \else
+ \rawpagereference{\s!sec}{#2}%
+ \doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}%
+ \writesection{#1}{-}{#5}%
+ \fi
+ \ifkopprefix
+ \ExpandFirstAfter\stelrefererenin[\c!prefix=\getvalue{\??ko#1\c!prefix}]%
+ \fi
+ \fi
+ \else
+ \ifplaatskop
+ \handelpaginaaf{#1}%
+ \doplaatskoptekst
+ {#1}
+ {\rawpagereference{\s!sec}{#2}}
+ {#5}
+ {}%
+ \writesection{#1}{-}{#5}%
+ \dosomebreak\nobreak
+ \getvalue{\??ko#1\c!na}%
+ \else
+ % do nothing
+ \fi
+ \fi}
+
+\def\doplaatskoptekst#1#2#3#4%
+ {\bgroup
+ \forgetall
+ %\showcomposition
+ \mindermeldingen
+ \postponefootnotes
+ \def\localkopsetup%
+ {\dolocalkopsetup{#1}}%
+ \startsynchronisatie
+ \getvalue{\??ko#1\c!commando}
+ {} % no number
+ {\doattributes{\??ko#1}{\doattributes{\??ko#1\c!tekst}
+ {\dontconvertfont
+ \stelinterliniein
+ #2%
+ \getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#3\endstrut}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \endgraf}}}%
+ \endgraf
+ \nointerlineskip
+ \dosomebreak\nobreak
+ #4%
+ \prevdepth\dp\strutbox
+ \stopsynchronisatie
+ \egroup
+ \noindentation}
+
+% \prevdepth\dp\strutbox is belangrijk, vergelijk naast elkaar:
+%
+% \onderwerp{test} \input tufte
+% \onderwerp{test} \strut \input tufte
+% \onderwerp{test} \plaatslijst[...]
+
+\def\doplaatskopnummertekst#1#2#3#4#5%
+ {\bgroup
+ \forgetall
+ %\showcomposition
+ \mindermeldingen
+ \postponefootnotes
+ \def\localkopsetup%
+ {\dolocalkopsetup{#1}}%
+ \startsynchronisatie
+ \getvalue{\??ko#1\c!commando}%
+ {\doattributes{\??ko#1}{\doattributes{\??ko#1\c!nummer}
+ {\getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!nummercommando}{\setstrut\begstrut#3\endstrut}}}}
+ {\doattributes{\??ko#1}{\doattributes{\??ko#1\c!tekst}
+ {\dontconvertfont
+ \stelinterliniein
+ #2%
+ \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#4\endstrut}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \endgraf}}}%
+ \endgraf
+ \nointerlineskip
+ \dosomebreak\nobreak
+ #5%
+ \prevdepth\dp\strutbox
+ \stopsynchronisatie
+ \egroup
+ \noindentation}
+
+\def\dostelkopnummerin[#1][#2#3]%
+ {\bgroup
+ \setsectieenkoppeling{#1}%
+ \doifinstringelse{#2}{+-}
+ {\doifelse{#3}{}
+ {\@@nextsectionnumber{\@@sectie}}
+ {\!!counta=#2#3\relax
+ \advance\!!counta by \@@sectionvalue{\@@sectie}%
+ \@@setsectionnumber{\@@sectie}{\!!counta}}}
+ {\@@setsectionnumber{\@@sectie}{#2#3}}%
+ \egroup}
+
+\def\stelkopnummerin%
+ {\dodoubleargument\dostelkopnummerin}
+
+\def\dokopnummer[#1]%
+ {\bgroup
+ \setsectieenkoppeling{#1}%
+ \doifnot{\getvalue{\@@sectie\c!nummer}}{0} % kan effienter
+ {\getvalue{\@@sectie\c!nummer}}%
+ \egroup}
+
+\def\kopnummer%
+ {\dosingleargument\dokopnummer}
+
+\def\alinea%
+ {\par}
+
+\def\plaatskopnormaal#1#2%
+ {\doifelsenothing{#1}
+ {\vbox
+ {\localkopsetup
+ \noindent
+ #2}}%
+ {\setbox0=\hbox{{#1}\hskip0.75em}%
+ \vbox
+ {\localkopsetup
+ \hangindent 1\wd0
+ \hangafter 1
+ \noindent
+ \unhbox0 % don't use \strut's here!
+ #2}}}
+
+\def\plaatskopinmarge#1#2%
+ {\vbox
+ {\localkopsetup
+ \begstrut % but use one \strut here!
+ \doifsomething{#1}
+ {\llap{\hbox to 5em{\hfill{#1}\hskip\linkermargeafstand}}}%
+ {#2}}}
+
+\def\plaatsgeenkop#1#2%
+ {}
+
+% default == instellingen
+% koppeling == koppen, breaks, marks, enz.
+% sectie == nummering
+
+\def\@@kolijst{}
+
+\def\dodefinieerkop[#1][#2]% % don't preset prefix to much
+ {\presetlabeltext[#1=]%
+ \getparameters
+ [\??ko#1]
+ [\c!nummerletter=\getvalue{\??ko#1\c!letter},
+ \c!tekstletter=\getvalue{\??ko#1\c!letter},
+ \c!nummerkleur=\getvalue{\??ko#1\c!kleur},
+ \c!tekstkleur=\getvalue{\??ko#1\c!kleur}]%
+ \ConvertToConstant\doifinstringelse{=}{#2}
+ {\getparameters
+ [\??ko#1]
+ [\c!sectie=\getvalue{\??ko\getvalue{\??ko#1\c!koppeling}\c!sectie},
+ \c!default=,
+ \c!koppeling=,
+ \c!prefix=,
+ \c!voor=,
+ \c!na=,
+ \c!pagina=,
+ \c!hoofd=,
+ \c!letter=,
+ \c!nummercommando=,
+ \c!tekstcommando=,
+ \c!eigennummer=\v!nee,
+ \c!nummer=\v!ja,
+ \c!kleur=,
+ \c!doorgaan=\v!ja,
+ \c!plaatskop=\v!ja,
+ \c!verhoognummer=\v!ja,
+ \c!commando=\plaatskop,
+ #2]%
+ \ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}}
+ {\doifsomething{\getvalue{\??ko#1\c!default}}
+ {%\presetlabeltext[#1=\labeltext{\getvalue{\??ko#1\c!default}}]%
+ \copyparameters
+ [\??ko#1][\??ko\getvalue{\??ko#1\c!default}]
+ [\c!voor,\c!na,\c!commando,\c!pagina,\c!doorgaan,\c!hoofd,
+ \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,\c!letter,\c!kleur,
+ \c!nummerletter,\c!tekstletter,\c!nummercommando,\c!tekstcommando]}}%
+ \getparameters[\??ko#1][#2]%
+ \doifsomething{\getvalue{\??ko#1\c!sectie}}
+ {\doifundefined{\??mk#1}
+ {\definieermarkering[#1]%
+ \koppelmarkering[#1][\getvalue{\??ko#1\c!sectie}]}}%
+ \doifundefined{\??li#1}{\definieerlijst[#1]}}
+ {\ConvertToConstant\doifelse{#1}{#2}
+ {\doifundefined{\??li#1}{\definieerlijst[#1]}}
+ {%\presetlabeltext[#1=\labeltext{#2}]%
+ \copyparameters
+ [\??ko#1][\??ko#2]
+ [\c!niveau,\c!sectie,\c!koppeling,\c!prefix,
+ \c!voor,\c!na,\c!commando,\c!pagina,\c!doorgaan,\c!hoofd,
+ \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,\c!letter,\c!kleur,
+ \c!nummerletter,\c!tekstletter,\c!nummercommando,\c!tekstcommando]%
+ \definieermarkering[#1][#2]%
+ \doifundefined{\??li#1}{\definieerlijst[#1][#2]}}}%
+ \addtocommalist{#1}\@@kolijst
+ \setevalue{\??sk#1}%
+ {\getvalue{\??ko#1\c!koppeling}}%
+ \setevalue{\??by#1}%
+ {\getvalue{\??ko#1\c!sectie}}%
+ \setevalue{\??by\v!per#1}%
+ {\getvalue{\??ko#1\c!sectie}}%
+ \setvalue{#1}%
+ {\complexorsimpleempty{#1}}%
+ \setvalue{\s!complex#1}[##1]%
+ {\dowithpargument{\dosomekop{#1}[##1]}}}
+
+\def\definieerkop%
+ {\dodoubleemptywithset\dodefinieerkop}
+
+\def\dostelkopin[#1][#2]%
+ {\getparameters[\??ko#1][#2]%
+ % The next check prevents hard to trace problems. I once
+ % set \c!commando to nothing and (quite natural) got the
+ % wrong references etc. The whole bunch should be boxed!
+ \expandafter\convertcommand\csname\??ko#1\c!commando\endcsname\to\ascii
+ \doifnothing{\ascii}
+ {\setvalue{\??ko#1\c!commando}{\plaatskop}}}
+
+\def\stelkopin%
+ {\dodoubleargumentwithset\dostelkopin}
+
+\newif\ifsectienummer \sectienummertrue
+
+\def\dostelkoppenin[#1]%
+ {\getparameters[\??ko][#1]%
+ \doifelse{\@@kosectienummer}{\v!ja}
+ {\sectienummertrue}
+ {\sectienummerfalse}%
+ \processaction
+ [\@@kovariant]
+ [ \v!normaal=>\def\plaatskop{\plaatskopnormaal},
+ \v!marge=>\def\plaatskop{\plaatskopinmarge},
+ \v!inmarge=>\def\plaatskop{\plaatskopinmarge}]}
+
+\def\stelkoppenin%
+ {\dosingleargument\dostelkoppenin}
+
+\def\systemsuppliedchapter {\getvalue{\v!hoofdstuk}}
+\def\systemsuppliedtitle {\getvalue{\v!titel}}
+
+\def\complexbijlage[#1]#2%
+ {\pagina[\v!rechts]
+ \stelnummeringin[\c!status=\v!stop]
+ \systemsuppliedchapter[#1]{#2}
+ \pagina[\v!rechts]
+ \stelnummeringin[\c!status=\v!start]
+ \stelpaginanummerin[\c!nummer=1]}
+
+\setvalue{\v!bijlage}%
+ {\complexorsimpleempty{bijlage}}
+
+%I n=Selecteren
+%I c=\soortpagina,\verwerkpagina,\koppelpagina
+%I
+%I Het is mogelijk pagina's te markeren en selectief te
+%I verwerken. Markering vindt plaats met het commando:
+%I
+%I \soortpagina[aanduiding]
+%I
+%I en selecteren vindt plaats met:
+%I
+%I \verwerkpagina[aanduiding,...][instelling]
+%I
+%I waarbij de instelling 'ja' of 'nee' is en meerdere
+%I aanduidingen worden gescheiden door een comma.
+%P
+%I Er kunnen commando's worden gekoppeld aan pagina's:
+%I
+%I \koppelpagina[aanduiding,...][voor=,na=,optie=]
+%I
+%I De opgegeven commando's worden voor respectievelijk na het
+%I vrijgeven van de pagina uitgevoerd.
+
+\newif\ifgeselecteerd
+\geselecteerdtrue
+
+\newif\ifselecteren
+\selecterenfalse
+
+\newif\ifverwerken
+\verwerkentrue
+
+\def\selectie{}
+\def\paginasoort{}
+
+\let\naastpagina=\relax
+\let\napagina=\relax
+\let\voorpagina=\relax
+
+\def\dovoorpagina%
+ {\doifsomething{\paginasoort}
+ {\def\dododopagina##1%
+ {\global\let\voorpagina=\relax
+ \getvalue{\??pg##1\c!voor}}%
+ \processcommacommand[\paginasoort]\dododopagina}}
+
+\def\dododonapagina#1%
+ {\global\let\napagina=\relax
+ \gdef\paginasoort{}%
+ \getvalue{\??pg#1\c!na}}
+
+\def\donapagina%
+ {\doifsomething{\paginasoort}
+ {\def\dodopagina##1%
+ {\doifelsevalue{\??pg##1\c!optie}{\v!dubbelzijdig}
+ {\doifbothsidesoverruled
+ \dododonapagina{##1}%
+ \orsideone
+ \dododonapagina{##1}%
+ \orsidetwo
+ \od}%
+ {\dododonapagina{##1}}}%
+ \processcommacommand[\paginasoort]\dodopagina}}
+
+\def\dosoortpagina[#1]%
+ {\doglobal\addtocommalist{#1}{\paginasoort}%
+ \ifselecteren
+ \ExpandBothAfter\doifcommon{#1}{\selectie}
+ {\global\geselecteerdtrue}%
+ \fi
+ \gdef\voorpagina{\dovoorpagina}%
+ \gdef\napagina{\donapagina}}
+
+\def\soortpagina%
+ {\dosingleargument\dosoortpagina}
+
+\def\dokoppelpagina[#1][#2]%
+ {\getparameters
+ [\??pg]
+ [\c!voor=,
+ \c!na=,
+ \c!optie=,
+ #2]%
+ \def\docommando##1%
+ {\getparameters
+ [\??pg##1]
+ [\c!voor=\@@pgvoor,
+ \c!na=\@@pgna,
+ \c!optie=\@@pgoptie]}%
+ \processcommalist[#1]\docommando}%
+
+\def\koppelpagina%
+ {\dodoubleargument\dokoppelpagina}
+
+\def\doverwerkpagina[#1][#2]%
+ {\processaction
+ [#2]
+ [ \v!ja=>\global\verwerkentrue,
+ \v!nee=>\global\verwerkenfalse]%
+ \gdef\selectie{#1}%
+ \global\selecterentrue
+ \global\geselecteerdfalse}
+
+\def\verwerkpagina%
+ {\dodoubleargument\doverwerkpagina}
+
+\def\resetselectiepagina%
+ {\ifselecteren
+ \doifbothsidesoverruled
+ \global\geselecteerdfalse
+ \orsideone
+ \orsidetwo
+ \global\geselecteerdfalse
+ \od
+ \fi}
+
+%I n=Verwijzingen
+%I c=\in,\op,\referentie,\stelrefererenin,\gebruikreferenties
+%I
+%I In elders gedefinieerde commando's opgegeven referenties
+%I kunnen worden opgeroepen met:
+%I
+%I \in[referentie]
+%I \op[referentie]
+%I
+%I Soms kunnen ook commando's als \infiguur[referentie] en
+%I \inhoofdstuk[referentie] worden gebruikt. Bovendien is
+%I het commando \oppagina[referentie] beschikbaar.
+%I
+%I Een verwijzing naar een pagina kan worden aangemaakt met:
+%I
+%I \tekstreferentie[referentie]{nummer of tekst}
+%I \paginareferentie[referentie]
+%I \referentie[referentie]{nummer of tekst}
+%P
+%I Er kunnen tegelijk meerdere referenties worden opgegeven:
+%I
+%I \tekstreferentie[ref1,ref2,ref3]{nummer of tekst}
+%I
+%I Dit kan overigens overal waar een [referentie] kan worden
+%I meegegeven, bijvoorbeeld bij hoofdstukken.
+%P
+%I Het refereren kan (tijdelijk) worden stopgezet met het
+%I commando:
+%I
+%I \stelrefererenin[status=,<sectie>nummer=,prefix=]
+%I
+%I waarbij 'start' en 'stop' mogelijke waarden zijn voor
+%I status. Een sectienummer (deelnummer, hoofdstuknummer
+%I enz.) kan 'ja of 'nee' zijn.
+%I
+%I Om verwarring te voorkomen kunnen binnen subdocumenten die
+%I niet naar elkaar verwijzen de referenties lokaal worden
+%I gehouden door een 'prefix' in te stellen. Eventueel kan een
+%I '+' wordt gebruikt om automatisch een nieuwe prefix in te
+%I stellen. Met '-' wordt de prefix gereset.
+%P
+%I Referenties van andere teksten kunnen worden geladen met
+%I het commando:
+%I
+%I \gebruikreferenties[filenaam]
+
+% hypertext-commando's
+
+% \gotoexternal {external reference} {text}
+% \gotointernal {internal reference} {text} {real pagenumber}
+% \gotorealpage {real pagenumber} {text}
+%
+% \thisisexternal {external reference}
+% \thisisinternal {internal reference}
+% \thisisrealpage {real pagenumber}
+%
+% \executecommand {command} {text}
+
+\def\gotoexternal #1#2{#2}
+\def\gotointernal #1#2#3{#2}
+\def\gotorealpage #1#2{#2}
+
+\def\thisisexternal #1{}
+\def\thisisinternal #1{}
+\def\thisisrealpage #1{}
+
+\def\executecommand #1#2{#2}
+
+% Het onderstaande commando zoekt zelf uit of sprake is van
+% interne verwijzing, een externe verwijzing of een
+% paginaverwijzing.
+%
+% \gotolocation {reference} {text}
+%
+% Beter is: \setreference{tag}{type}{page}{realpage}{text}
+% standaard extref, intref, pagref of nog anders nu
+% \crossref:...
+
+\newif\iflocation
+
+\def\ifinteractief{\iflocation}
+
+% alternatief 1: externe verwijzingen
+
+\def\gotolocation#1#2%
+ {\doifreferencefoundelse{#1}
+ {\gettextreference{#1}%
+ \doifelse{\currenttextreference}{\r!page}
+ {\getrealreference{#1}%
+ \gotorealpage{\currentrealreference}{#2}}
+ {\gotoexternal{#1}{#2}}}
+ {\gotointernal{#1}{#2}{}}}
+
+\def\previoussectionformat{}
+\def\currentsectionformat{}
+
+\let\updatelistreferences=\relax
+\def\updatedlistreferences{}
+
+\def\setsectionlistreference#1#2%
+ {\ifnum\countervalue{\??se\previoussection{#1}}>0\relax
+ \xdef\previoussectionformat{\@@longformatnumber{\previoussection{#1}}}%
+ \else
+ \xdef\previoussectionformat{}%
+ \fi
+ \xdef\currentsectionformat{\@@longformatnumber{#1}}}
+
+\def\startlistreferences#1%
+ {\paginareferentie[\s!lst:#1\currentsectionformat]%
+ \getrealreference{\s!lst:#1\previoussectionformat}%
+ \doifnothing{\currentrealreference}{\edef\currentrealreference{\realfolio}}
+ \setxvalue{\v!vorige\c!lokale#1}{\currentrealreference}%
+ \getrealreference{\s!lst:#1\currentsectionformat}%
+ \doifnothing{\currentrealreference}{\edef\currentrealreference{\realfolio}}
+ \setxvalue{\c!huidige\c!lokale#1}{\currentrealreference}%
+ \setreference{\v!vorige#1}{}{\getvalue{\v!vorige\c!lokale#1}}{\r!page}%
+ \def\stoplistreferences{\dostoplistreferences}}
+
+\def\dostoplistreferences#1%
+ {\iflijstgeplaatst
+ \addtocommalist{#1}\updatedlistreferences % nog global (\doglobal)
+ \global\let\updatedlistreferences=\updatedlistreferences % een noodverbandje
+ \gdef\updatelistreferences%
+ {\def\docommando####1%
+ {\setreference
+ {\v!vorige####1}{}
+ {\getvalue{\c!huidige\c!lokale####1}}{\r!page}}%
+ \processcommacommand[\updatedlistreferences]\docommando
+ \global\let\updatelistreferences=\relax
+ \gdef\updatedlistreferences{}}%
+ \fi}
+
+\def\stoplistreferences%
+ {\gobbleoneargument}
+
+% alternatief 2: interne verwijzingen
+
+\def\gotolocation#1#2%
+ {\doifreferencefoundelse{#1}
+ {\gettextreference{#1}%
+ \doifelse{\currenttextreference}{\r!page}
+ {\getrealreference{#1}%
+ \gotorealpage{\currentrealreference}{#2}}
+ {\doifelse{\currenttextreference}{\r!exec}
+ {\getrealreference{#1}%
+ \executecommand{\currentrealreference}{#2}}
+ {\doifelse{\currenttextreference}{\r!list} % speciaal
+ {\getrealreference{#1}% % voor
+ \gotointernal{\currentrealreference}{#2}{}} % lijsten
+ {\gotoexternal{#1}{#2}}}}}
+ {\gotointernal{#1}{#2}{}}}
+
+\let\gotoinnerlocation=\gotolocation
+
+\def\previoussectionformat{}
+\def\currentsectionformat{}
+
+\let\updatelistreferences=\relax
+\def\updatedlistreferences{}
+
+\def\setsectionlistreference#1#2%
+ {\ifnum\countervalue{\??se\previoussection{#1}}>0\relax
+ \xdef\previoussectionformat{\@@longformatnumber{\previoussection{#1}}}%
+ \else
+ \xdef\previoussectionformat{}%
+ \fi
+ \xdef\currentsectionformat{\@@longformatnumber{#1}}}
+
+\def\startlistreferences#1%
+ {\thisisinternal{\s!lst:#1\currentsectionformat}%
+ \setxvalue{\v!vorige\c!lokale#1}{\s!lst:#1\previoussectionformat}%
+ \setxvalue{\c!huidige\c!lokale#1}{\s!lst:#1\currentsectionformat}%
+ \doifelse{\currentsectionformat}{}
+ {\setreference
+ {\v!vorige#1}{}{\realfolio}{}}
+ {\setreference
+ {\v!vorige#1}{}{\getvalue{\v!vorige\c!lokale#1}}{\r!list}}%
+ \def\stoplistreferences{\dostoplistreferences}}
+
+\def\dostoplistreferences#1%
+ {\iflijstgeplaatst
+ \addtocommalist{#1}\updatedlistreferences % nog global (\doglobal)
+ \global\let\updatedlistreferences=\updatedlistreferences % een noodverbandje
+ \gdef\updatelistreferences%
+ {\def\docommando####1%
+ {\setreference
+ {\v!vorige####1}{}
+ {\getvalue{\c!huidige\c!lokale####1}}{\r!list}}%
+ \processcommacommand[\updatedlistreferences]\docommando
+ \global\let\updatelistreferences=\relax
+ \gdef\updatedlistreferences{}}%
+ \fi}
+
+\def\stoplistreferences%
+ {\gobbleoneargument}
+
+% de rest
+
+\newcount\prefixteller
+
+\def\referenceprefix{}
+
+\def\showlocation #1{#1}
+\def\showcontrastlocation#1#2#3{#3}
+\def\showcoloredlocation #1#2{#2}
+
+% Interne verwijzingen worden automatisch gegenereerd met
+%
+% \thisisnextinternal {tag}
+
+\newcount\locationcount
+\locationcount=0
+
+\def\nextinternalreference%
+ {\the\locationcount}
+
+\def\thisisnextinternal#1%
+ {\global\advance\locationcount by 1
+% \thisisinternal{\s!aut:#1:\nextinternalreference}} debugging
+ \thisisinternal{\s!aut:\nextinternalreference}}
+
+\def\gotonextinternal#1#2#3#4%
+% {\gotointernal{\s!aut:#1:#2}{#3}{#4}} debugging
+ {\gotointernal{\s!aut:#2}{#3}{#4}}
+
+% Als een interne verwijzing ook vanuit elders toegankelijk
+% moet zij, gebruiken we:
+%
+% \thisissomeinternal {tag} {data}
+% \gotosomeinternal {tag} {data} {} {}
+%
+% let op: geen commalist
+
+\def\thisissomeinternal#1#2% tag data
+ {\doifsomething{#2}
+ {\thisisinternal{#1:#2}}}
+
+\def\gotosomeinternal#1#2#3#4%
+ {\gotointernal{#1:#2}{#3}{#4}}
+
+% Om historische redenen en omdat nog niet duidelijk is welke
+% interactieprogramma's zich nog zullen aandienen, worden
+% referenties zowel op naam als op paginanummer afgehandeld.
+%
+% Verwijzingen en ingangen in een inhoudsopgave en index
+% dienen daarom beide mechanismen te ondersteunen.
+%
+% Het wellicht op het eerste gezicht redundante referentie-format
+% ziet er als volgt uit:
+%
+% [formatted page"realpage"text"]
+
+\newif\ifrefereren
+
+\def\referencepagenumber[#1]%
+ {\geentest % nodig i.v.m. scannen {tekst} bij [referentie] in \op
+ {\paginaprefix\??rf[#1]%
+ \translatednumber[#1]}}
+
+\def\getsomereference#1#2%
+ {\edef\somereference{\getvalue{\r!cross\referenceprefix#2}}%
+ \expandafter#1\expandafter[\somereference""""]}
+
+\def\currentpagereference{}
+\def\currentrealreference{}
+\def\currenttextreference{}
+
+\def\dogetpagereference[#1"#2"#3"#4]%
+ {\doifelsenothing{#2}
+ {\def\currentpagereference{}}
+ {\def\currentpagereference{\referencepagenumber[#1]}}}
+
+\def\dogetrealreference[#1"#2"#3"#4]%
+ {\edef\currentrealreference{#2}}
+
+\def\dogettextreference[#1"#2"#3"#4]%
+ {\def\currenttextreference{#3}}
+
+\def\getpagereference{\getsomereference\dogetpagereference}
+\def\getrealreference{\getsomereference\dogetrealreference}
+\def\gettextreference{\getsomereference\dogettextreference}
+
+\def\fileprefix{}
+
+\def\setlocalreference#1#2#3#4%
+ {\setevalue{\r!cross\fileprefix#1}{#2"#3"#4}}
+
+\def\setreference%
+ {\global\setlocalreference}
+
+\def\setreferences%
+ {\def\mainreference##1##2##3##4##5%
+ {\doifundefinedelse{\r!cross\fileprefix##1##2}
+ {\setxvalue{\r!cross\fileprefix##1##2}{##3"##4"##5}}
+ {\showmessage{\m!references}{2}{[##1][##2],##4}}}}
+
+\def\resetreferences%
+ {\def\mainreference##1##2##3##4##5{}}
+
+\resetreferences
+
+% beetje vreemde plaats, maar ja
+
+\def\setdummycommandreference#1#2%
+ {\setreference{#1}{}{#2}{\r!exec}}
+
+% nog anders
+
+\setdummycommandreference {\v!FirstPage} {first}
+\setdummycommandreference {\v!PreviousPage} {previous}
+\setdummycommandreference {\v!NextPage} {next}
+\setdummycommandreference {\v!LastPage} {last}
+\setdummycommandreference {\v!PreviousJump} {backward}
+\setdummycommandreference {\v!NextJump} {forward}
+\setdummycommandreference {\v!SwapViewer} {swap}
+\setdummycommandreference {\v!ExitViewer} {exit}
+\setdummycommandreference {\v!CloseDocument} {close}
+\setdummycommandreference {\v!ViewerHelp} {help}
+\setdummycommandreference {\v!PrintDocument} {print}
+\setdummycommandreference {\v!SearchDocument} {search}
+\setdummycommandreference {\v!SearchAgain} {searchagain}
+
+%\def\writereference#1#2#3#4%
+% {\ifrefereren%
+% \doifsomething{#1}
+% {\bgroup
+% \reassignreferenceprefix{#1}%
+% \ExpandFirstAfter\thisisexternal{\referencevalues}%
+% \edef\dowritereference%
+% {\writeutilitycommand%
+% {\mainreference%
+% {\referenceprefix}%
+% {\referencevalues}%
+% {#2}%
+% {#3}%
+% {#4}}}%
+% \dowritereference
+% \egroup
+% \@EA\referentieinfo\@EA>\@EA{#1}}%
+% \fi}
+
+\def\writereference#1#2#3#4%
+ {\ifrefereren
+ \doifsomething{#1}
+ {\bgroup
+ \def\dowritereference##1%
+ {\doifinstringelse{-:}{##1}
+ {\removesubstring-:\from##1\to\referencevalues
+ \def\referenceprefix{}}
+ {\def\referencevalues{##1}}%
+ \doifsomething{\referencevalues}
+ {\thisisexternal{\referenceprefix\referencevalues}%
+ \edef\dodowritereference%
+ {\writeutilitycommand%
+ {\mainreference%
+ {\referenceprefix}{\referencevalues}%
+ {#2}{#3}{#4}}}%
+ \dodowritereference}}%
+ \processcommalist[#1]\dowritereference
+ \egroup
+ \@EA\referentieinfo\@EA>\@EA{#1}}%
+ \fi}
+
+\let\lastreference=\empty
+
+\def\rawpagereference#1#2% #1 kan weg
+ {\def\lastreference{#2}%
+ \makesectionformat
+ \writereference
+ {#2}%
+ {\sectionformat::\noexpand\paginanummer}%
+ {\noexpand\realfolio}%
+ {}}
+
+\def\rawtextreference#1#2#3% #1 kan weg
+ {\def\lastreference{#2}%
+ \writereference
+ {#2}%
+ {}%
+ {}%
+ {#3}}%
+
+\def\rawreference#1#2#3% #1 kan weg
+ {\def\lastreference{#2}%
+ \makesectionformat
+ \writereference
+ {#2}%
+ {\sectionformat::\noexpand\paginanummer}%
+ {\noexpand\realfolio}%
+ {#3}}
+
+\def\referenceprefix {}
+\def\unharmedreferenceprefix {\referenceprefix}
+
+\newif\ifreferencefound
+
+\def\doifreferencefoundelse#1#2#3%
+ {\checkreferences
+ \bgroup
+ \let\unharmedreferenceprefix=\referenceprefix
+ \bgroup
+ \doifinstringelse{::}{#1}
+ {\referencefoundtrue}
+ {\doifdefinedelse{\r!cross\referenceprefix#1}
+ {\referencefoundtrue}
+ {\def\referenceprefix{}%
+ \doifdefinedelse{\r!cross#1}
+ {\referencefoundtrue}
+ {\referencefoundfalse}}}%
+ \doifvalue{\r!cross\referenceprefix#1}{""}
+ {\referencefoundfalse}%
+ \ifreferencefound
+ #2%
+ \egroup
+ \else
+ #3%
+ \egroup
+ \setreference{\referenceprefix#1}{}{}{}% message only once, uses prefix
+ \fi
+ \egroup}
+
+\def\dowithreferenceprefix#1#2%
+ {\doifreferencefoundelse{#1}{#2}{}}
+
+\def\gebruikreferenties[#1]%
+ {\doifundefined{\??rf:#1}
+ {\setgvalue{\??rf:#1}{}% signal, nog eens '\v!done'
+ \doutilities{references}{#1}{}{}{}}}
+
+\def\dostelrefererenin[#1]%
+ {\getparameters[\??rf][#1]%
+ \preparepaginaprefix{\??rf#1}%
+ \processaction
+ [\@@rfstatus]
+ [ \v!stop=>\refererenfalse,
+ \v!start=>\refererentrue]%
+ \processaction % should be in cont-01d
+ [\@@rfinteractie]
+ [ \v!alles=>\let\dowantedreference=\docompletereference,
+ \v!label=>\let\dowantedreference=\dolabelonlyreference,
+ \v!tekst=>\let\dowantedreference=\dotextonlyreference,
+ \v!symbool=>\let\dowantedreference=\dosymbolreference]%
+ \doifinstringelse{\@@rfprefix}{#1} % yeah
+ {\doifelsenothing{\@@rfprefix}
+ {\edef\referenceprefix{}}
+ {\processaction
+ [\@@rfprefix]
+ [ +=>\advance\prefixteller by 1 %
+ \edef\referenceprefix{\the\prefixteller:},
+ -=>\edef\referenceprefix{},
+ \s!unknown=>\edef\referenceprefix{\@@rfprefix:}]%
+ \def\@@rfprefix{}}}
+ {}}
+
+%\def\reassignreferenceprefix#1%
+% {\doifinsetelse{-:}{#1}%
+% {\def\referenceprefix{}%
+% \aftersplitstring#1\at-:\to\referencevalues}
+% {\def\referencevalues{#1}}}
+
+\def\stelrefererenin%
+ {\dosingleargument\dostelrefererenin}
+
+\def\doreferentie[#1]#2%
+ {\rawreference{\s!ref}{#1}{#2}}
+
+\def\referentie%
+ {\dosingleargument\doreferentie}
+
+\def\dotekstreferentie[#1]#2%
+ {\rawtextreference{\s!txt}{#1}{#2}}
+
+\def\tekstreferentie%
+ {\dosingleargument\dotekstreferentie}
+
+\def\dopaginareferentie[#1]%
+ {\rawpagereference{\s!pag}{#1}}
+
+\def\paginareferentie%
+ {\dosingleargument\dopaginareferentie}
+
+% \def\doreferentie[#1]#2%
+% {\bgroup
+% \convertargument#2\to\ascii
+% \rawreference{\s!ref}{#1}{\ascii}%
+% \egroup}
+%
+% \def\referentie%
+% {\dosingleargument\doreferentie}
+%
+% \def\dotekstreferentie[#1]#2%
+% {\bgroup
+% \convertargument#2\to\ascii
+% \rawtextreference{\s!txt}{#1}{\ascii}%
+% \egroup}
+%
+% \def\tekstreferentie%
+% {\dosingleargument\dotekstreferentie}
+
+% \newif\ifreferencesloaded
+% \referencesloadedfalse
+%
+% \def\checkreferences%
+% {\ifreferencesloaded\else
+% \global\referencesloadedtrue
+% {\setbox0=\hbox{\gebruikreferenties[\jobname]}}% get rid of spaces
+% \checkrealpage
+% \fi}
+%
+% efficienter: (scheelt 3 if-macro's)
+
+\def\checkreferences%
+ {\bgroup
+ \setbox0=\hbox{\gebruikreferenties[\jobname]}% get rid of spaces
+ \checkrealpage
+ \global\let\checkreferences=\relax
+ \egroup}
+
+% Het referentie-mechanisme zal nog worden aangepast:
+%
+% <prefix><tag><keyword>
+%
+% De gebruikte macros krijgen dan de vorm: {}{}{}
+
+\def\unknownreference#1%
+ {\ifvoorlopig
+ \doifsomething{#1}
+ {\inlinker
+ {\infofont
+ \dimen0=\linkermargebreedte
+ \advance\dimen0 by -2em
+ \doboundtext{#1}{\dimen0}{..}->}}%
+ \fi
+ \doifnotvalue{\r!cross#1}{""}
+ {\showmessage{\m!references}{1}{[\unharmedreferenceprefix][#1]}}}
+
+\def\dummyreference%
+ {{\tttf ??}}
+
+\let\domathmodein=\in
+
+\def\dotextmodein#1[#2]%
+ {\doifreferencefoundelse{#2}
+ {\gettextreference{#2}%
+ \gotolocation
+ {#2}
+ {\dotextprefix{#1}\currenttextreference}}
+ {\unknownreference{#1}%
+ \dotextprefix{#1}\dummyreference}%
+ \referentieinfo{<}{#2}}
+
+\def\in%
+ {\ifmmode % hier nog eens een macro
+ \let\next=\domathmodein % voor maken; zie |
+ \else
+ \let\next=\dotextmodein
+ \fi
+ \next}
+
+\def\op#1[#2]% er is een probleempje met spaties, zie ook pragma11.tex
+ {\ignorespaces
+ \bgroup % !! tijdelijk
+ \let\ignorespaces=\relax % !! tijdelijk
+ \doifreferencefoundelse{#2}
+ {\getpagereference{#2}%
+ \gotolocation
+ {#2}
+ {\dotextprefix{#1}\currentpagereference}}
+ {\unknownreference{#1}%
+ \dotextprefix{#1}\dummyreference}%
+ \referentieinfo{<}{#2}%
+ \egroup} % !! tijdelijk
+
+\def\oppagina[#1]% kan uit de pas lopen, checken e!!
+ {\doifreferencefoundelse{#1}
+ {\getrealreference{#1}%
+ \doifelse{\realfolio}{\currentrealreference}
+ {\v!hier\v!boven}
+ {\c!op\ \op{\v!pagina}[#1]}}%
+ {\unknownreference{#1}%
+ \v!pagina~\dummyreference}}%
+
+%I n=Regels
+%I c=\startregels,\stelregelsin
+%I c=\startregelnummeren,\stelregelnummerenin
+%I c=\crlf
+%I c=\startregel,\stopregel,\eenregel,\inregel
+%I
+%I Het is mogelijk de indeling in regels zoals die in de ruwe
+%I tekst wordt gehanteerd af te dwingen. Er wordt in dit
+%I geval niet ingesprongen. De regels worden gezet tussen de
+%I twee commando's:
+%I
+%I \startregels
+%I
+%I ...................................................
+%I
+%I \stopregels
+%P
+%I Er kan met betrekking tot regels een en ander worden
+%I ingesteld:
+%I
+%I \stelregelsin[voor=,na=,inspringen=]
+%I
+%I Aan 'inspringen' kan men 'ja', 'nee', 'even' of 'oneven'
+%I toekennen.
+%P
+%I Het is mogelijk regels te nummeren door ze tussen de
+%I volgende commando's te plaatsen:
+%I
+%I \startregelnummeren
+%I \stopregelnummeren
+%I
+%I Als de regelovergangen moeten worden gehandhaafd, dan moet
+%I \startregels voor \startregelnummeren worden gegeven.
+%I
+%I Het nummeren begint steeds opnieuw bij 1. Als verder moet
+%I worden genummeren, dan kan achter \startregelnummeren
+%I [verder] worden meegegeven.
+%I
+%I Standaard worden regels alinea-gewijs genummerd. Als men
+%I over een paginagrens wil nummeren, dan moet [opelkaar]
+%I worden meegegeven.
+%P
+%I De wijze van nummeren kan worden ingesteld met:
+%I
+%I \stelregelnummerenin[conversie=,start=,stap=,letter=,
+%I plaats=,breedte=,letter=]
+%I
+%I Als 'conversie' kan worden meegegeven: cijfers, letters,
+%I Letters, romeins of Romeins. Aan 'start' en 'stap' kan
+%I een getal worden toegekend, aan 'letter' een trefwoord,
+%I aan 'breedte' een maat (bij voorkeur in ex) en aan
+%I 'plaats' het trefwoord 'inmarge' of 'intekst'.
+%P
+%I Er kan worden overgegaan naar een nieuwe regel met:
+%I
+%I \crlf
+%P
+%I .... testfase ...
+%I
+%I \startregel[tag] ... \stopregel[tag]
+%I \eenregel[tag]
+%I
+%I \inregel[tag]
+
+\newif\ifinregels
+\newif\ifregelnummersinmarge
+
+\def\stelregelsin%
+ {\dodoubleargument\getparameters[\??rg]}
+
+%\def\startregels%
+% {\@@rgvoor
+% \pagina[\v!voorkeur]%
+% \begingroup
+% \inregelstrue
+% \stelinspringenin[\v!geen]%
+% \ignorespaces
+% \stelwitruimtein[\v!geen]%
+% \obeylines
+% \GotoPar}
+
+\def\startregels%
+ {\@@rgvoor
+ \pagina[\v!voorkeur]%
+ \witruimte
+ \begingroup
+ \def\@@rgstepyes{\parindent\!!zeropoint}%
+ \def\@@rgstepno{\parindent\!!zeropoint}%
+ \edef\@@rgparindent{\the\parindent}%
+ \def\@@rglinesteptoggle{1}%
+ \processaction
+ [\@@rginspringen]
+ [ \v!ja=>\def\@@rgstepyes{\parindent\@@rgparindent}%
+ \def\@@rgstepno{\parindent\@@rgparindent},
+ \v!oneven=>\def\@@rgstepyes{\parindent\!!zeropoint}%
+ \def\@@rgstepno{\parindent\@@rgparindent},
+ \v!even=>\def\@@rgstepno{\parindent\!!zeropoint}%
+ \def\@@rgstepyes{\parindent\@@rgparindent}]%
+ \inregelstrue
+ \stelwitruimtein[\v!geen]%
+ \obeylines
+ \ignorespaces
+ \def\obeyedline%
+ {\par
+ \ifdim\lastskip>\!!zeropoint
+ \def\@@rglinesteptoggle{0}%
+ \else
+ \increment\@@rglinesteptoggle
+ \fi
+ \ifodd\@@rglinesteptoggle\relax
+ \@@rgstepyes
+ \else
+ \@@rgstepno
+ \fi}%
+ \GotoPar}
+
+\def\stopregels%
+ {\endgroup
+ \@@rgna}
+
+\newcount\linenumber
+\newcount\linestepper
+
+% het gebruik van \setlocalreference scheelt een hash entry
+
+\def\regelweergave%
+ {\convertnumber\@@rnconversie\linenumber}%
+
+\def\dostelregelnummerenin[#1]%
+ {\getparameters
+ [\??rn]
+ [\c!start=1,
+ \c!stap=1,
+ #1]%
+ \global\linenumber=1\relax}
+
+\def\stelregelnummerenin%
+ {\dosingleargument\dostelregelnummerenin}
+
+\def\dostartnummerenLINE% % !! \everypar !!
+ {\EveryPar{\schrijfregelnummer}}
+
+\def\dostopnummerenLINE%
+ {\egroup}
+
+\def\dodoschrijfregelnummer%
+ {\setbox0=\hbox{\regelweergave}%
+ \vsmashbox0
+ \ifregelnummersinmarge
+ \llap{\hbox{\box0\hskip\linkermargeafstand}}%
+ \else
+ \hsmash{\hbox to \@@rnbreedte{\box0\hss}}%
+ \fi}
+
+\def\complexstartregelnummeren[#1]%
+ {\doifnotinset{\v!verder}{#1}
+ {\global\linenumber=1\relax}%
+ \doifinsetelse{\@@rnplaats}{\v!inmarge,\v!marge}
+ {\regelnummersinmargetrue}
+ {\regelnummersinmargefalse}%
+ \ifregelnummersinmarge\else
+ \advance\leftskip by \@@rnbreedte\relax
+ \fi
+ \ifinregels
+ \let\dostartnummeren=\dostartnummerenLINE
+ \let\stopregelnummeren=\dostopnummerenLINE
+ \def\schrijfregelnummer%
+ {\doschrijfregelnummer
+ \global\advance\linenumber by 1\relax}%
+ \else
+ \let\dostartnummeren=\dostartnummerenPAR
+ \let\stopregelnummeren=\dostopnummerenPAR
+ \def\schrijfregelnummer%
+ {\global\advance\linenumber by -1\relax
+ \doschrijfregelnummer}%
+ \fi
+ \dostartnummeren}
+
+\def\startregelnummeren%
+ {\bgroup
+ \complexorsimpleempty{startregelnummeren}}
+
+\def\doschrijfregelnummer%
+ {\ifnum\linenumber<\@@rnstart\relax
+ \else
+ \!!counta=\linenumber
+ \divide\!!counta by \@@rnstap\relax
+ \multiply\!!counta by \@@rnstap\relax
+ \ifnum\!!counta=\linenumber
+ \doattributes{\??rn}{\dodoschrijfregelnummer}%
+ \fi
+ \fi}
+
+\def\regelreferentie#1[#2]%
+ {\bgroup
+ \dimen0=\dp\strutbox
+ \doif{\@@rnrefereren}{\v!aan}
+ {\doglobal\increment\linereference
+ \setxvalue{lrf:n:\linereference}{\@@rnprefix#2}%
+ \setxvalue{lrf:l:\linereference}{0}%
+ \setxvalue{lrf:p:\linereference}{#1}%
+ \advance\dimen0 by \linereference sp}%
+ \prewordbreak
+ \vrule \!!width \!!zeropoint \!!depth \dimen0
+ \prewordbreak
+ \egroup}
+
+\def\eenregel[#1]%
+ {\regelreferentie0[#1]\ignorespaces}
+
+\def\startregel[#1]%
+ {\regelreferentie1[#1]\ignorespaces}
+
+\def\stopregel[#1]%
+ {\unskip\regelreferentie2[#1]}
+
+\def\inregel#1[#2]%
+ {\doifelsenothing{#1}
+ {\gettextreference{\@@rnprefix#2}%
+ \doifinstringelse{--}{\currenttextreference}
+ {\in{\labeltext{\v!regels}}[\@@rnprefix#2]}
+ {\in{\labeltext{\v!regel}}[\@@rnprefix#2]}}
+ {\in{#1}[\@@rnprefix#2]}}
+
+\def\dostartnummerenPAR%
+ {\beginofshapebox
+ \doglobal\newcounter\linereference}
+
+\def\dostopnummerenPAR%
+ {\endofshapebox
+ \linestepper=0
+ \reshapebox{\global\advance\linestepper by 1\relax}%
+ \global\advance\linenumber by \linestepper
+ \doifelse{\@@rnrefereren}{\v!aan}
+ {\reshapebox % We are going back!
+ {\global\advance\linenumber by -1
+ \dimen0=\dp\shapebox
+ \advance\dimen0 by -\dp\strutbox
+ \ifdim\dimen0>\!!zeropoint\relax
+ \dostepwiserecurse{1}{\number\dimen0}{1}
+ {\setxvalue{lrf:l:\recurselevel}{\the\linenumber}}%
+ \fi}%
+ \global\advance\linenumber by \linestepper
+ \ifnum\linereference>0 % anders vreemde loop in paragraphs+recurse
+ \dorecurse{\linereference}
+ {\edef\linereferenceplus{\getvalue{lrf:p:\recurselevel}}%
+ \ifnum\linereferenceplus=2
+ \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
+ \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}%
+ \setlocalreference{\referenceprefix\linereferencename}{}{}{\linereferenceline}%
+ \fi}%
+ \dorecurse{\linereference}
+ {\edef\linereferenceplus{\getvalue{lrf:p:\recurselevel}}%
+ \ifnum\linereferenceplus<2
+ \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
+ \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}%
+ \ifnum\linereferenceplus=1
+ \gettextreference{\linereferencename}%
+ \ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
+ \edef\linereferenceline{\linereferenceline--\currenttextreference}%
+ \fi
+ \fi
+ \setlocalreference{\referenceprefix\linereferencename}{}{}{\linereferenceline}%
+ \fi}%
+ \global\let\scratchline=\linenumber % We are going back!
+ \reshapebox
+ {\doglobal\decrement\scratchline
+ \hbox
+ {\dorecurse{\linereference}
+ {\edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
+ \gettextreference{\linereferencename}%
+ \beforesplitstring\currenttextreference--\at--\to\firstline
+ \ifnum\firstline=\scratchline\relax
+ \tekstreferentie[\linereferencename]{\currenttextreference}%
+ \setlocalreference{\referenceprefix\linereferencename}{}{}{0}% ==done
+ \fi}%
+ \dimen0=\dp\shapebox
+ \advance\dimen0 by -\dp\strutbox
+ \ifdim\dimen0>\!!zeropoint\relax
+ \dp\shapebox=\dp\strutbox
+ \fi
+ \schrijfregelnummer\box\shapebox}}%
+ \else
+ \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}%
+ \fi}
+ {\reshapebox{\global\advance\linenumber by -1}%
+ \global\advance\linenumber by \linestepper
+ \reshapebox{\hbox{\schrijfregelnummer\box\shapebox}}}%
+ \global\advance\linenumber by \linestepper
+ \flushshapebox
+ \egroup}
+
+\def\crlf%
+ {\unskip\hfil\break}
+
+\def\opeenregel%
+ {\def\crlf{}%
+ \def\\{}}
+
+%I n=Opmaak
+%I c=\definieeropmaak,\testopmaak,\startstandaardopmaak
+%I
+%I Het is mogelijk een lege pagina op te maken. Hiertoe wordt
+%I een blok gereserveerd met het commando:
+%I
+%I \definieeropmaak[naam][breedte=,hoogte=,voffset=,
+%I hoffset=,pagina=,commandos=,voor=,na=,dubbelzijdig=]
+%I
+%I Hierbij wordt bij de eerste vier parameters een getal
+%I meegegeven (5cm, 24pt, enz.). Met 'pagina' geeft men aan
+%I of naar een nieuwe pagina wordt gesprongen (standaard
+%I 'rechts'). Aan de 'commandos' kunnen commando's worden
+%I toekend die tijdens de opmaak gelden. Aan de laatste twee
+%I parameters toegekende commando's worden voor en na het
+%I opmaken van de pagina uitgevoerd. De opgemaakte pagina
+%I kan worden geselecteerd op naam. Met 'dubbelzijdig' geeft
+%I men aan of er een lege achterkant moet worden opgemaakt
+%I (standaard: ja). Dit geldt aleen bij dubbelzijdig zetten.
+%I
+%I Naast het bovenstaande commando is er het commando:
+%I
+%I \stelopmaakin[naam][instellingen]
+%P
+%I Na het geven van dit commando zijn twee commando's
+%I beschikbaar: \startnaamopmaak en \stopnaamopmaak. Tussen
+%I deze twee commando's kunnen zetopdrachten en teksten
+%I worden opgenomen. Een en ander wordt op een lege bladzijde
+%I gezet.
+%I
+%I Met het commando \testopmaak kunnen hulplijnen worden
+%I opgeroepen.
+%I
+%I De commando's \startstandaardopmaak en \stopstandaardopmaak
+%I maken het opmaken binnen de standaard-layout mogelijk.
+%P
+%I Eventueel kunnen de volgende twee commando's worden gebruikt
+%I om een pagina op te maken met hoofd- en voetregels.
+%I
+%I \startopmaak
+%I .....
+%I \stopopmaak
+
+\newbox\opmaak
+
+\def\setopmaaklayout[#1]%
+ {\stelvoetin [\c!status=\getvalue{\??do#1\c!voetstatus}]%
+ \stelhoofdin[\c!status=\getvalue{\??do#1\c!hoofdstatus}]%
+ \steltekstin[\c!status=\getvalue{\??do#1\c!tekststatus}]%
+ \stelonderin[\c!status=\getvalue{\??do#1\c!onderstatus}]%
+ \stelbovenin[\c!status=\getvalue{\??do#1\c!bovenstatus}]}
+
+\def\dododostartopmaak[#1]%
+ {\doifvaluesomething{\??do#1\c!pagina}
+ {\ExpandFirstAfter\pagina[\getvalue{\??do#1\c!pagina}]}%
+ \soortpagina[#1]%
+ \setopmaaklayout[#1]%
+ \getvalue{\??do#1\c!commandos}%
+ \global\setbox\opmaak=\vbox to \getvalue{\??do#1\c!hoogte}%
+ \bgroup
+ \hsize=\getvalue{\??do#1\c!breedte}%
+ \parskip=\!!zeropoint\relax
+ \parindent=\!!zeropoint\relax
+ \getvalue{\??do#1\c!boven}}
+
+\def\dododostopopmaak[#1]%
+ {\getvalue{\??do#1\c!onder}%
+ \egroup}
+
+\def\doshipoutopmaak[#1]%
+ {\bgroup
+ \dimen0=\getvalue{\??do#1\c!voffset}%
+ \dimen2=\getvalue{\??do#1\c!hoffset}%
+ \dimen4=\dimen0\advance\dimen4 by \dimen2
+ \ifdim\dimen4=\!!zeropoint\relax
+ \getvalue{\??do#1\c!voor}%
+ \box\opmaak
+ \setopmaaklayout[#1]%
+ \pagina
+ \getvalue{\??do#1\c!na}%
+ \ifdubbelzijdig
+ \doifvalue{\??do#1\c!dubbelzijdig}{\v!ja}
+ {\ifodd\realpageno\else
+ \null
+ \pagina
+ \verlaagpaginanummer
+ \fi}%
+ \fi
+ \verlaagpaginanummer
+ \else
+ \kopoffset=\dimen0
+ \rugoffset=\dimen2
+ %\setpagedisplacement
+ \myshipout{\box\opmaak}
+ \fi
+ \egroup}
+
+\def\doflushopmaak[#1]%
+ {\ifverwerken
+ \ifgeselecteerd
+ \doshipoutopmaak[#1]%
+ \fi
+ \else
+ \ifgeselecteerd
+ \else
+ \doshipoutopmaak[#1]%
+ \fi
+ \fi
+ \ifselecteren
+ \global\geselecteerdfalse
+ \fi}
+
+\def\dodostartopmaak[#1][#2]%
+ {\begingroup
+ \stelopmaakin[#1][#2]%
+ \dododostartopmaak[#1]}
+
+\def\dodostopopmaak[#1]%
+ {\dododostopopmaak[#1]%
+ \doflushopmaak[#1]%
+ \endgroup}
+
+\def\dostartopmaak[#1][#2]%
+ {\iffirstargument
+ \dodostartopmaak[#1][#2]%
+ \def\stopopmaak%
+ {\dodostopopmaak[#1]}%
+ \else
+ \pagina
+ \stelhoofdin[\c!status=\v!leeg]
+ \stelvoetin[\c!status=\v!leeg]
+ \vbox to \teksthoogte % nog een topskip optie
+ \bgroup
+ \def\stopopmaak%
+ {\egroup
+ \eject}%
+ \fi}
+
+\def\startopmaak%
+ {\dodoubleempty\dostartopmaak}
+
+\def\dodefinieeropmaak[#1][#2]%
+ {\getparameters
+ [\??do#1]%
+ [\c!breedte=\zetbreedte,
+ \c!hoogte=\teksthoogte,
+ \c!voffset=\!!zeropoint,
+ \c!hoffset=\!!zeropoint,
+ \c!commandos=,
+ \c!pagina=\v!rechts,
+ \c!dubbelzijdig=\v!ja,
+ \c!voor=,
+ \c!boven=\vss,
+ \c!onder=\vss,
+ \c!na=,
+ \c!onderstatus=\v!normaal,
+ \c!bovenstatus=\v!normaal,
+ \c!tekststatus=\v!normaal,
+ \c!hoofdstatus=\v!stop,
+ \c!voetstatus=\v!stop,
+ #2]%
+ \setvalue{\e!start#1\e!opmaak}%
+ {\dodoubleempty\dodostartopmaak[#1]}%
+ \setvalue{\e!stop#1\e!opmaak}%
+ {\dodostopopmaak[#1]}}
+
+\def\definieeropmaak%
+ {\dodoubleargument\dodefinieeropmaak}
+
+\def\dostelopmaakin[#1]%
+ {\getparameters[\??do#1]}
+
+\def\stelopmaakin%
+ {\dodoubleargument\dostelopmaakin}
+
+%I n=Smaller
+%I c=\startsmaller,\stelsmallerin
+%I
+%I Een paragraaf kan smaller gezet worden met behulp van de
+%I commando's:
+%I
+%I \startsmaller[afstand]
+%I \stopsmaller
+%I
+%I Als maat wordt links, rechts, midden of een combinatie
+%I hiervan meegegeven. Eventueel wordt geen afstand meegegeven.
+%I
+%I De linker, rechter of dubbele inspringing kan worden
+%I ingesteld met:
+%I
+%I \stelsmallerin[links=,rechts=,midden=]
+%I
+%I Enkele voorbeelden van smelelr zetten zijn:
+%I
+%I \startsmaller[2*links,rechts]
+%I \stopsmaller
+%I
+%I \startsmaller[midden,rechts]
+%I \stopsmaller
+
+\newskip\linkssmaller
+\newskip\rechtssmaller
+\newskip\middensmaller
+
+\def\dosinglesmaller#1%
+ {\dosmaller[#1]}
+
+\def\dosmaller[#1]%
+ {\processaction
+ [#1]
+ [ \v!links=>\global\advance\linkssmaller by \@@sllinks,
+ \v!midden=>\global\advance\middensmaller by \@@slmidden,
+ \v!rechts=>\global\advance\rechtssmaller by \@@slrechts,
+ \s!unknown=>{\herhaalmetcommando[#1]\dosinglesmaller}]}
+
+\def\complexstartsmaller[#1]%
+ {\par
+ \bgroup
+ \global\linkssmaller=\!!zeropoint
+ \global\rechtssmaller=\!!zeropoint
+ \global\middensmaller=\!!zeropoint
+ \processcommalistwithparameters[#1]\dosmaller
+ \advance\leftskip by \linkssmaller
+ \advance\rightskip by \rechtssmaller
+ \advance\leftskip by \middensmaller
+ \advance\rightskip by \middensmaller}
+
+\def\simplestartsmaller%
+ {\startsmaller[\v!midden]}
+
+\def\startsmaller%
+ {\complexorsimple{startsmaller}}
+
+\def\stopsmaller%
+ {\par % else skips forgotten
+ \egroup}
+
+\def\stelsmallerin%
+ {\dodoubleargument\getparameters[\??sl]}
+
+%I n=Boxen
+%I c=\definieerhbox,\cbox,\lbox,\rbox,\sbox
+%I
+%I Het is mogelijk een tekst in een blok met een vaste
+%I omvang te zetten. Dit is vergelijkbaar met het opmaken
+%I van een tabel.
+%I
+%I \hbox?{tekst} (horizontaal blok)
+%I
+%I De box wordt eerst gedefinieerd met:
+%I
+%I \definieerhbox[?][maat]
+%I
+%I Er kan een links, rechts of midden uitgelijnde \vbox worden
+%I gezet met de commando:
+%I
+%I \lbox{tekst\\tekst\\tekst} of \lbox to <maat>{...}
+%I \rbox{tekst\\tekst\\tekst} of \rbox to <maat>{...}
+%I \cbox{tekst\\tekst\\tekst} of \cbox to <maat>{...}
+%I
+%I Het commando \\ forceert een overgang naar een nieuwe regel.
+%I
+%I Een (hoge) box kan een gedwongen hoogte gelijk aan die
+%I van een strut krijgen met:
+%I
+%I \sbox{box}
+
+\def\dodefinieerhbox[#1][#2]%
+ {\setvalue{hbox#1}##1%
+ {\hbox to #2{\begstrut##1\endstrut\hss}}}
+
+\def\definieerhbox%
+ {\dodoubleargument\dodefinieerhbox}
+
+\def\lrcbox#1#2#%
+ {\vbox#2\bgroup
+ \let\\=\endgraf
+ \forgetall#1\let\next=}
+
+\def\lbox%
+ {\lrcbox\raggedleft}
+
+\def\rbox%
+ {\lrcbox\raggedright}
+
+\def\cbox%
+ {\lrcbox\raggedcenter}
+
+\def\dosetraggedbox#1%
+ {\processaction
+ [#1]
+ [ \v!links=>\def\raggedbox{\lbox},
+ \v!rechts=>\def\raggedbox{\rbox},
+ \v!midden=>\def\raggedbox{\cbox},
+ \v!nee=>\def\raggedbox{\vbox\bgroup\raggedright\let\next=},
+ \s!default=>\def\raggedbox{\vbox},
+ \s!unknown=>\def\raggedbox{\vbox}]}
+
+\def\dosetraggedcommand#1%
+ {\processaction
+ [#1]
+ [ \v!links=>\def\raggedcommand{\raggedleft},
+ \v!rechts=>\def\raggedcommand{\raggedright},
+ \v!midden=>\def\raggedcommand{\raggedcenter},
+ \v!nee=>\def\raggedcommand{\raggedright},
+ \s!default=>\def\raggedcommand{\raggedcenter},
+ \s!unknown=>\def\raggedcommand{}]}
+
+%I n=Blokken
+%I c=\stelplaatsblokkenin,\stelblokkopjesin
+%I c=\definieerplaatsblok,\stelplaatsblokin
+%I c=\reserveer,\leeg,\plaats,\volledigelijstmet,\plaatslijstmet
+%I
+%I Figuren, tabellen, grafieken enz. kunnen in de tekst
+%I worden geplaatst met het commando:
+%I
+%I \plaats<bloknaam>[voorkeur][referentie]{titel}{blok}
+%I
+%I Als voorkeur kan worden opgegeven:
+%I
+%I hier bij voorkeur op deze plaats in de tekst
+%I forceer per se op deze plaats in de tekst
+%I pagina op een nieuwe pagina
+%I boven bovenaan de huidige pagina
+%I onder onderaan de huidige pagina
+%I
+%I links links in de paragraaf
+%I rechts rechts in de paragraaf
+%I
+%I inlinker in linker marge (gelijke hoogte)
+%I inrechter in rechter marge (gelijke hoogte)
+%I inmarge in linker/rechter marge (gelijke hoogte)
+%I marge in de marge
+%P
+%I Als er op de huidige bladzijde geen plaats is, dan wordt
+%I standaard de figuur verplaatst (eerste vier opties) en/of
+%I wordt overgegaan naar een nieuwe bladzijde (laatste twee
+%I opties.
+%I
+%I Men kan plaatsen afdwingen door het trefwoord altijd
+%I mee te geven: \plaats[hier,altijd][]{}{}. Er zijn dan
+%I twee runs nodig, omdat de nummering van de blokken moet
+%I worden aangepast.
+%I
+%I Als in plaats van een titel 'geen' wordt meegegeven, wordt
+%I geen titel geplaatst.
+%I
+%I Als het blok nog onbekend is, kan in plaats van het blok
+%I een van de volgende commando's worden meegegeven:
+%I
+%I \leeg<bloknaam>
+%I \lege<bloknaam>
+%P
+%I Het is mogelijk ruimte voor een blok te reserveren:
+%I
+%I \reserveer<bloknaam>[hoogte=,breedte=,kader=][voorkeur]
+%I [referentie]{titel}
+%I
+%I Beide commando's kunnen ook gegeven worden zonder [],
+%I dus in de vorm
+%I
+%I \plaats<bloknaam>{titel}{blok}
+%I \reserveer<bloknaam>{titel}
+%I
+%I Ten behoeve van een consistente verwijzing wordt het
+%I commando:
+%I
+%I \in<bloknaam>[referentie]
+%I
+%I gedefinieerd. Dit levert in de tekst op:
+%I
+%I 'in <bloknaam> <nummer>'
+%P
+%I Blokken kunnen worden gedefinieerd met het commando:
+%I
+%I \definieerplaatsblok[blok][blokken]
+%I
+%I Hierna zijn de volgende commando's beschikbaar:
+%I
+%I \plaatsblok[plaats][referentie]{titel}{blok}
+%I \reserveerblok[afmetingen][plaats][referentie]{titel}
+%I \leegblok
+%I
+%I Het is mogelijk een en ander in te stellen met het
+%I commando:
+%I
+%I \stelplaatsblokin[blok][hoogte=,breedte=,kader=,
+%I bovenkader=,onderkader=,linkerkader=,rechterkader=,
+%I paginaovergangen=]
+%I
+%I De hoogte en breedte hebben betrekking op de te reserveren
+%I ruimte.
+%P
+%I Naast de eerder genoemde commando's zijn nog beschikbaar:
+%I
+%I \plaatslijstmetblokken
+%I \volledigelijstmetblokken
+%I
+%I en een (extra) commando om tekst naast een blok (hier met
+%I de naam 'blok') te plaatsen:
+%I
+%I \startbloktekst[plaats][referentie]{kop}{blok}
+%I ...
+%I \stopbloktekst
+%I
+%I Mogelijke plaatsen zijn 'links', 'rechts', 'hoog', 'laag' en
+%I 'midden'. Ook is een combinatie van deze instellingen
+%I mogelijk, bijvoorbeeld [links,hoog]. De instelling 'offset'
+%I resulteert in een verschuiving van 1 regel.
+%P
+%I Blokken die tussen de tekst staan kunnen links, rechts of in
+%I het midden worden uitgelijnd. De plaats wordt ingesteld met:
+%I
+%I \stelplaatsblokkenin[plaats=,breedte=,kader=,bovenkader=,
+%I onderkader=,linkerkader=,rechterkader=,offset=,voorwit=,
+%I nawit=,marge=]
+%I
+%I De genummerde kopjes bij blokken kunnen worden ingesteld
+%I met:
+%I
+%I \stelblokkopjesin[plaats=,voor=,tussen=,na=,letter=,
+%I kopletter=,breedte=,nummer=,uitlijnen=]
+%I
+%I waarbij als plaats kan worden meegegeven: 'boven', 'onder',
+%I 'geen', 'hoog', 'laag' of 'midden'. Als breedte kan 'passend'
+%I of 'max' worden meegegeven. De parameter nummer kan 'ja' of
+%I 'nee' zijn. Als breedte=max, dan wordt het kopje over de
+%I hele breedte geplaatst. In dat geval kan uitlijnen worden
+%I ingesteld: 'links', 'midden' of 'rechts'.
+%P
+%I Als er geen plaats is, worden plaatsblokken tijdelijk
+%I achtergehouden. De opgespaarde blokken worden op de
+%I volgende bladzijde(n) geplaatst. Dit plaatsen is te
+%I beinvloeden met:
+%I
+%I \stelplaatsblokkenin[nboven=,nonder=,nregels=]
+%I
+%I Standaard worden maximaal 2 blokken bovenaan de
+%I bladzijde geplaatst en 0 blokken onder. Er wordt overgegaan
+%I op een nieuwe bladzijde als het aantal regels groter is
+%I dan 4. Deze waarden kunnen worden ingesteld.
+%P
+%I Kopjes boven lijsten en labels voor nummers kunnen worden
+%I ingesteld met de elders beschreven commando's:
+%I
+%I \stellabeltekstin[label=...]
+%I \stelkoptekstin[tekst=...]
+%I
+%I Standaard zijn deze ingesteld op de opgegeven namen.
+
+\def\stelplaatsblokkenin%
+ {\dodoubleargument\getparameters[\??bk]}
+
+\def\stelblokkopjesin%
+ {\dodoubleargument\getparameters[\??kj]}%
+
+\def\dostelplaatsblokin[#1][#2]%
+ {\getparameters[\??fl#1][#2]}
+
+\def\stelplaatsblokin%
+ {\dodoubleargument\dostelplaatsblokin}
+
+\def\dostelblokkopjein[#1][#2]%
+ {\getparameters[\??kj#1][#2]}
+
+\def\stelblokkopjein%
+ {\dodoubleargument\dostelblokkopjein}
+
+\def\doleegblok#1%
+ {\localframed
+ [\??fl#1][\c!kader=\v!aan]%
+ {\getmessage{\m!floatblocks}{12}}}
+
+\def\docomplexplaatsblok[#1][#2][#3]#4%
+ {\ifmargeblokken
+ \doifinset{\v!marge}{#2}
+ {\bgroup
+ \everypar{\egroup\the\everypar}%
+ \hsize=\@@mbbreedte}%
+ \fi
+ \global\insidefloattrue
+ \dowithnextbox
+ {\docompletefloat
+ {#1}{#3}{#1}{#2}{\labeltext{#1}}{#4}
+ {\box\nextbox}}%
+ \vbox}
+
+\def\docomplexstarttekstblok[#1][#2][#3]%
+ {\flushsidefloats % hoort eigenlijk niet hier
+ \docomplexplaatsblok[#1][\v!tekst,#2,\v!links][#3]}
+
+\def\docomplexreserveerblok[#1][#2][#3][#4]#5%
+ {\getvalue{\e!plaats#1}[#3][#4]{#5}{\localframed[\??fl#1][#2]{#1}}}
+
+\def\docomplexstartreserveertekstblok[#1][#2][#3][#4]%
+ {\flushsidefloats % hoort eigenlijk niet hier
+ \docomplexreserveerblok[#1][#2][\v!tekst,#3,\v!links][#4]}
+
+\def\dodefinieerplaatsblok[#1][#2]% #1=naam #2=meervoud
+ {\presetlocalframed[\??fl#1]%
+ \stelplaatsblokin
+ [#1]
+ [\c!breedte=15\korpsgrootte,
+ \c!hoogte=10\korpsgrootte,
+ \c!kader=\@@bkkader,
+ \c!straal=\@@bkstraal,
+ \c!hoek=\@@bkhoek,
+ \c!achtergrond=\@@bkachtergrond,
+ \c!achtergrondraster=\@@bkachtergrondraster,
+ \c!achtergrondkleur=\@@bkachtergrondkleur,
+ \c!bovenkader=\@@bkbovenkader,
+ \c!onderkader=\@@bkonderkader,
+ \c!linkerkader=\@@bklinkerkader,
+ \c!rechterkader=\@@bkrechterkader,
+ \c!paginaovergangen=]%
+ \stelblokkopjein
+ [#1]
+ [\c!plaats=\@@kjplaats,
+ %\c!voor=\@@kjvoor,
+ \c!tussen=\@@kjtussen,
+ %\c!na=\@@kjna,
+ \c!breedte=\@@kjbreedte,
+ \c!kopletter=\@@kjkopletter,
+ \c!letter=\@@kjletter,
+ \c!kleur=\@@kjkleur,
+ \c!uitlijnen=\@@kjuitlijnen,
+ \c!nummer=\@@kjnummer,
+ \c!wijze=\@@kjwijze,
+ \c!blokwijze=\@@kjblokwijze,
+ \c!sectienummer=\@@kjsectienummer,
+ \c!conversie=\@@kjconversie]%
+ \doorlabelen
+ [#1]
+ [\c!tekst=#1,
+ \c!plaats=\v!intekst,
+ \c!wijze=\getvalue{\??kj#1\c!wijze},
+ \c!blokwijze=\getvalue{\??kj#1\c!blokwijze},
+ \c!sectienummer=\getvalue{\??kj#1\c!sectienummer},
+ \c!conversie=\getvalue{\??kj#1\c!conversie}]%
+ \presetlabeltext[#1=\Woord{#1}~]%
+ \presetheadtext[#2=\Woord{#2}]%
+ \definieerlijst[#1]%
+ \setvalue{\e!plaats\e!lijstmet#2}%
+ {\dodoubleempty\doplaatslijst[#1]}%
+ \setvalue{\e!volledige\e!lijstmet#2}%
+ {\dotripleempty\dodovolledigelijst[#1][#2]}%
+ \setvalue{\e!plaats#1}%
+ {\dotripleempty\docomplexplaatsblok[#1]}%
+ \setvalue{\e!reserveer#1}%
+ {\doquadrupleempty\docomplexreserveerblok[#1]}%
+ \setvalue{\e!start#1\e!tekst}%
+ {\dotripleempty\docomplexstarttekstblok[#1]}%
+ \setvalue{\e!stop#1\e!tekst}%
+ {\stoptextfloat{#1}}%
+ \setvalue{\e!start\e!reserveer#1\e!tekst}%
+ {\doquadrupleempty\docomplexstartreserveertekstblok[#1]}%
+ \setvalue{\e!stop\e!reserveer#1\e!tekst}%
+ {\stoptextfloat{#1}}%
+ \setvalue{\e!lege#1}%
+ {\doleegblok{#1}}%
+ \setvalue{\e!leeg#1}%
+ {\doleegblok{#1}}}
+
+%\setvalue{\c!in#1}[##1]%
+% {\c!in\normalspace\in{\labeltext{#1}}[##1]}}
+
+\def\definieerplaatsblok%
+ {\dodoubleargument\dodefinieerplaatsblok}
+
+% De onderstaande macro's ondersteunen het zetten van tekst
+% rond figuren. De macro's zijn ontworpen door Daniel Comenetz
+% en gepubliceerd in TUGBoat Volume 14 (1993), No. 1: Anchored
+% Figures at Either Margin. De macro's zijn slechts op enkele
+% punten door mij aangepast.
+
+% afhankelijke variabelen
+%
+% \overgap vervangen door \floatsidetopskip
+% \sidegap vervangen door \floatsideskip
+% \undergap vervangen door \floatsidebottomskip
+%
+% \prskp vervangen door \tussenwit
+
+% toegevoegde macro's/aanroepen
+%
+% \logsidefloat : loginformatie
+% \flushsidefloats : nodig voor koppen
+
+% recente wijzigingen:
+%
+% namen aangepast: \float... enz. i.p.v. \pic
+
+% Pas op: \EveryPar{\EveryPar{}\margetitel{whatever}}
+% \plaatsfiguur[links]{}{} moet goed gaan. In dat geval
+% begint de tekst terecht wat lager.
+
+\newdimen\sidefloatheight % includes the topskip
+\newdimen\sidefloatwidth
+\newdimen\sidefloathsize
+\newdimen\sidefloatvsize \def\nofloatvsize{-1pt }
+
+\newbox\floatbottom
+
+\newif\ifrightfloat
+\newif\ifmarginfloat
+\newif\ifroomforfloat
+\newif\iffloatshort
+\newif\iffloatflag
+\newif\iffloatrighteqo
+\newif\iffloatlefteqo
+
+\let\floatrighteqo=\eqno
+\let\floatleftleqo=\leqno
+
+% Watch it!
+
+\everypar ={\flushfootnotes\checksidefloat\checkindentation}
+
+% Watch it even more! In inner, gaat't mis omdat daar
+% pagetotal enz niet zijn aangepast. Inner kan overigens niet
+% betrouwbaar worden getest!
+
+\everypar ={\flushfootnotes\ifinner\else\checksidefloat\fi\flushmargincontents\checkindentation}
+\neverypar ={}%\autopostponefootnotes}
+\everydisplay={\flushfootnotes\adjustsidefloatdisplaylines}
+
+\def\flushsidefloats%
+ {\par
+ \!!heighta=\sidefloatvsize
+ \advance\!!heighta by -\pagetotal
+ \ifdim\!!heighta>\!!zeropoint\relax
+ \witruimte % nog cheken op interferentie
+ \kern\!!heighta\relax
+ \fi
+ \global\sidefloatvsize=\nofloatvsize
+ \floatflagfalse}
+
+\def\flushsidefloatsafterpar%
+ {\xdef\oldpagetotal{\the\pagetotal}%
+ \gdef\checksidefloat%
+ {\dochecksidefloat
+ \ifdim\oldpagetotal=\pagetotal \else
+ \xdef\checksidefloat{\dochecksidefloat}%
+ \flushsidefloats
+ \fi}}
+
+\let\logsidefloat=\relax
+
+\def\pushpenalties%
+ {\let\oldwidowpenalty=\widowpenalty
+ \let\oldclubpenalty=\clubpenalty
+ \let\oldbrokenpenalty=\brokenpenalty
+ \widowpenalty=1
+ \clubpenalty=2
+ \brokenpenalty=1
+ \let\pushpenalties=\relax
+ \def\poppenalties%
+ {\widowpenalty=\oldwidowpenalty
+ \clubpenalty=\oldclubpenalty
+ \brokenpenalty=\oldbrokenpenalty}}
+
+\let\poppenalties=\relax
+
+\def\restorepenalties%
+ {\ifnum\outputpenalty=\!!tenthousand\relax
+ \else
+ \penalty\outputpenalty
+ \fi}
+
+\def\sidefloatoutput%
+ {\iffloatshort
+ \unvbox255\relax
+ \setbox\floatbottom=\lastbox
+ \ifdim\wd\floatbottom>\sidefloathsize
+ \penalty-201\relax
+ \box\floatbottom
+ \else
+ \ifvoid\floatbottom
+ \else
+ \restoreleftindent
+ \ifdim\wd\floatbottom<\sidefloathsize
+ \parskip=\!!zeropoint
+ %\noindent
+ \vadjust{\penalty-1}%
+ \iffloatlefteqo
+ \global\floatlefteqofalse
+ \else
+ \advance\sidefloathsize by -\wd\floatbottom
+ \iffloatrighteqo
+ \global\floatrighteqofalse
+ \else
+ \divide\sidefloathsize by 2\relax
+ \fi
+ \hskip\sidefloathsize
+ \fi
+ \fi
+ \box\floatbottom
+ \restorepenalties
+ \fi
+ \fi
+ \global\holdinginserts=0\relax
+ \global\floatshortfalse
+ \else
+ \finaloutput{\unvbox255}%
+ \global\sidefloatvsize=\nofloatvsize
+ \poppenalties
+ \fi}
+
+\def\restoreleftindent%
+ {\ifrightfloat
+ \else
+ \parskip=\!!zeropoint
+ \noindent
+ \vadjust{\penalty-1}%
+ \hskip\sidefloatwidth
+ \fi}
+
+\def\eqno%
+ {\iffloatshort
+ \global\floatrighteqotrue
+ \fi
+ \floatrighteqo}
+
+\def\leftmarginfloat#1%
+ {\rightfloatfalse\marginfloattrue\putsidefloat{#1}}
+
+\def\rightmarginfloat#1%
+ {\rightfloattrue\marginfloattrue\putsidefloat{#1}}
+
+\def\leftfloat#1%
+ {\rightfloatfalse\marginfloatfalse\putsidefloat{#1}}
+
+\def\rightfloat#1%
+ {\rightfloattrue\marginfloatfalse\putsidefloat{#1}}
+
+\def\putsidefloat#1%
+ {\par
+ \witruimte
+ \previoussidefloat
+ \stallsidefloat
+ \setbox\floatbox=\hbox{\vbox{\vskip\sidefloattopoffset#1}}
+ \measuresidefloat
+ \ifroomforfloat
+ \setsidefloat
+ \else
+ \tosssidefloat
+ \measuresidefloat
+ \stallsidefloat
+ \setsidefloat
+ \fi}
+
+\def\progresssidefloat%
+ {\!!heighta=\sidefloatvsize
+ \iffloatflag
+ \advance\!!heighta by -\dimen3\relax
+ \floatflagfalse
+ \else
+ \advance\!!heighta by -\pagetotal
+ \fi}
+
+\def\tosssidefloat%
+ {\vfill\eject}
+
+\def\measuresidefloat%
+ {\floatflagtrue
+ \dimen3=\pagetotal
+ \ifmarginfloat
+ \sidefloatwidth=\!!zeropoint
+ \else
+ \sidefloatwidth=\wd\floatbox
+ \advance\sidefloatwidth by \floatsideskip
+ \fi
+ \sidefloathsize=\hsize
+ \advance\sidefloathsize by -\sidefloatwidth
+ \sidefloatheight=\ht\floatbox
+ %\advance\sidefloatheight by \dp\floatbox % NJET
+ \advance\sidefloatheight by \sidefloattopskip
+ \global\sidefloatvsize=\sidefloatheight
+ \global\advance\sidefloatvsize by \dimen3\relax
+ \dimen0=\sidefloatvsize
+ \advance\dimen0 by -\baselineskip
+ \ifdim\dimen0>.99\pagegoal
+ \roomforfloatfalse
+ \else
+ \dimen0=\pagegoal
+ \advance\dimen0 by -\sidefloatvsize
+ \ifdim\dimen0<\sidefloatbottomskip
+ \global\advance\sidefloatvsize by \dimen0\relax
+ \floatshorttrue
+ \pushpenalties
+ \holdinginserts=1\relax
+ \else
+ \global\advance\sidefloatvsize\sidefloatbottomskip
+ \floatshortfalse
+ \fi
+ \roomforfloattrue
+ \fi}
+
+\def\setsidefloat%
+ {\kern\sidefloattopskip
+ \oldprevdepth=\prevdepth
+ \nointerlineskip
+ \bgroup
+ \everypar={}\relax
+ \parskip=\!!zeropoint
+ \logsidefloat
+ \ifrightfloat
+ \hfill
+ \ifmarginfloat
+ \rlap{\hskip\rechtermargeafstand\unhbox\floatbox}%
+ \else
+ \unhbox\floatbox
+ \fi
+ \else
+ \noindent
+ \ifmarginfloat
+ \llap{\unhbox\floatbox\hskip\linkermargeafstand}%
+ \else
+ \unhbox\floatbox
+ \fi
+ \hfill
+ \fi
+ \egroup
+ \par
+ \kern-\sidefloatheight
+ \penalty10001\relax
+ \normalbaselines
+ \prevdepth=\oldprevdepth
+ %\noindent
+ \resetsidefloatparagraph
+ \ignorespaces}
+
+\newcount\sidefloatparagraph
+
+\def\iffirstsidefloatparagraph%
+ {\ifnum\sidefloatparagraph=1\relax}
+
+\def\setsidefloatparagraph%
+ {\global\advance\sidefloatparagraph by 1\relax}
+
+\def\resetsidefloatparagraph%
+ {\global\sidefloatparagraph=0\relax}
+
+\def\dochecksidefloat%
+ {\progresssidefloat
+ \ifdim\!!heighta>\!!zeropoint\relax
+ \advance\!!heighta by \sidefloatbottomskip
+ \!!counta=\!!heighta\relax
+ \divide\!!counta by \baselineskip
+ \ifnum\!!counta>0\relax
+ \ifrightfloat
+ \hangindent=-\sidefloatwidth
+ \else
+ \hangindent=\sidefloatwidth
+ \fi
+ \hangafter=-\!!counta
+ \fi
+ \setsidefloatparagraph
+ \else
+ \resetsidefloatparagraph
+ \fi
+ \parskip=\tussenwit}
+
+\def\checksidefloat%
+ {\dochecksidefloat}
+
+\def\doadjustsidefloatdisplaylines%
+ {\par
+ \vskip-\parskip
+ \noindent
+ \ignorespaces}
+
+\def\adjustsidefloatdisplaylines%
+ {\aftergroup\doadjustsidefloatdisplaylines}
+
+\def\previoussidefloat%
+ {\progresssidefloat
+ \ifdim\!!heighta>\!!zeropoint\relax
+ \iffloatshort
+ \floatshortfalse
+ \tosssidefloat
+ \else
+ \kern\!!heighta\relax
+ \fi
+ \fi}
+
+\def\stallsidefloat%
+ {\!!counta=\pageshrink
+ \divide\!!counta by \baselineskip
+ \advance\!!counta by 1\relax
+ \parskip=\!!zeropoint
+ \dorecurse{\!!counta}{\line{}}
+ \kern-\!!counta\baselineskip
+ \penalty0\relax}
+
+% De onderstaande macro's zijn verantwoordelijk voor het plaatsen
+% van floats. De macro's moeten nog worden aangepast en
+% uitgebreid:
+%
+% - nofloatpermitted : top, bot en mid counters en geen topins
+% als reeds midfloat of botfloat
+%
+% - links, rechts, midden als niet hangend
+
+\newif\ifsomefloatwaiting \somefloatwaitingfalse
+\newif\ifroomforfloat \roomforfloattrue
+\newif\ifnofloatpermitted \nofloatpermittedfalse
+\newif\iffloatsonpage \floatsonpagefalse
+
+\newcount\totalnoffloats \totalnoffloats=0
+\newcount\savednoffloats \savednoffloats=0
+\newcount\noffloatinserts \noffloatinserts=0
+
+\newbox\floatlist
+
+\newinsert\botins
+
+\skip\botins=\!!zeropoint
+\count\botins=\!!thousand
+\dimen\botins=\maxdimen
+
+\newdimen\topinserted
+\topinserted=\!!zeropoint
+
+\newdimen\botinserted
+\botinserted=\!!zeropoint
+
+\newif\ifflushingfloats
+\flushingfloatsfalse
+
+\newbox\floattext
+
+\newdimen\floattextwidth
+\newdimen\floattextheight
+
+\newbox\floatbox
+
+\newdimen\floatwidth
+\newdimen\floatheight
+
+% Er wordt bij \v!altijd als dat nodig is hernummerd.
+% Daarbij wordt gebruik gemaakt van de opgeslagen nummers en
+% volgorde.
+
+\definetwopasslist{\s!float}
+
+\def\dofloatreference%
+ {\doglobal\increment\numberedfloat
+ \edef\dodofloatreference%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!float}%
+ {\numberedfloat}%
+ {\hetnummer}}}%
+ \dodofloatreference}
+
+\def\redofloatorder#1%
+ {\doglobal\increment\nofplacedfloats\relax
+ \gettwopassdata{\s!float}%
+ \iftwopassdatafound
+ \doifnot{\hetnummer}{\twopassdata}
+ {\edef\oldhetnummer{\hetnummer}%
+ \xdef\hetnummer{\twopassdata}%
+ \showmessage
+ {\m!floatblocks}{1}
+ {\nofplacedfloats,#1 \oldhetnummer,\hetnummer}}%
+ \fi}
+
+% In \dofloatinfomessage wordt {{ }} gebruikt omdat anders
+% binnen \startuitstellen...\stopuitstellen geen goede
+% melding in de marge volgt: \ifinner is dan namelijk true.
+
+\def\dofloatinfomessage#1#2#3%
+ {\bgroup
+ \showmessage{\m!floatblocks}{#2}{#3}%
+ \@EA\floatinfo\@EA#1\@EA{\currentmessagetext}%
+ \egroup}
+
+\def\dosavefloatinfo%
+ {\dofloatinfomessage{>}{2}{\the\totalnoffloats}}
+
+\def\dofloatflushedinfo%
+ {\!!counta=\totalnoffloats\relax
+ \advance\!!counta by -\savednoffloats\relax%
+ \dofloatinfomessage{<}{3}{\the\!!counta}}
+
+\def\doinsertfloatinfo%
+ {\dofloatinfomessage{<}{4}{\the\totalnoffloats}}
+
+% ook voetnoten saven
+
+\def\dosavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \box\floatbox\relax
+ \unvbox\floatlist}%
+ \global\advance\savednoffloats by 1\relax
+ \global\somefloatwaitingtrue
+ \dosavefloatinfo}
+
+\def\doresavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \unvbox\floatlist
+ \box\floatbox}%
+ \global\advance\savednoffloats by 1\relax
+ \global\somefloatwaitingtrue}
+
+\def\doreversesavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \unvbox\floatlist
+ \box\floatbox}%
+ \global\advance\savednoffloats by 1\relax
+ \global\somefloatwaitingtrue
+ \dosavefloatinfo}
+
+\def\checkwaitingfloats#1%
+ {\ifsomefloatwaiting
+ \doifinsetelse{\v!altijd}{#1}
+ {\showmessage{\m!floatblocks}{5}{}}
+ {\doflushfloats}%
+ \fi}
+
+\def\doflushfloats%
+ {\global\floatsonpagefalse
+ \global\flushingfloatstrue
+ \ifsomefloatwaiting
+ \par
+ \ifvmode\prevdepth=\maxdimen\fi % prevents whitespace
+ \dodoflushfloats
+ \fi
+ \global\savednoffloats=0
+ \global\somefloatwaitingfalse
+ \global\flushingfloatsfalse}
+
+\def\dodoflushfloats% moet nog beter: als precies passend, niet onder baseline
+ {\ifsomefloatwaiting
+ \bgroup % \box\floatbox can be in use!
+ \dogetfloat
+ %\forgetall % NJET!
+ \witruimte
+ \blanko[\@@bkvoorwit]
+ \flushfloatbox
+ %\ifnum\savednoffloats>1 % REMOVED
+ %\else
+ \blanko[\@@bknawit]
+ %\fi
+ \egroup
+ \dofloatflushedinfo
+ \expandafter\dodoflushfloats
+ \fi}
+
+\newbox\globalscratchbox
+
+\def\dogetfloat%
+ {\ifsomefloatwaiting
+ \global\setbox\floatlist=\vbox
+ {\unvbox\floatlist
+ \global\setbox\globalscratchbox=\lastbox}%
+ \setbox\floatbox=\box\globalscratchbox % local !
+ \global\advance\savednoffloats by -1\relax
+ \ifnum\savednoffloats=0\relax
+ \global\somefloatwaitingfalse
+ \fi
+ \else
+ \global\savednoffloats=0\relax
+ \global\setboxfloatbox=\box\voidb@x
+ \fi}
+
+\def\dotopfloat%
+ {\ifdim\topinserted=\!!zeropoint\relax
+ \topofinserttrue
+ \else
+ \topofinsertfalse
+ \fi
+ \global\advance\topinserted by \ht\floatbox
+ \global\advance\topinserted by \dp\floatbox
+ \global\advance\topinserted by \floatbottomskip
+ \insert\topins
+ {\forgetall
+ \iftopofinsert
+ \kern-\lineskip\par\prevdepth=\maxdimen
+ \else
+ %\blanko[-\@@bknawit,\@@bkvoorwit]% inserts can't look back
+ \betweenfloatblanko
+ \fi
+ \flushfloatbox
+ \blanko[\@@bknawit]}%
+ \doinsertfloatinfo}
+
+% \loop ...\repeat doesn't work here, but why?
+%
+% \def\dosettopinserts%
+% {\ifsomefloatwaiting
+% \noffloatinserts=0\relax
+% \loop
+% \ifnum\noffloatinserts<\noftopfloats
+% ....
+% \repeat
+% \fi}
+%
+% so:
+
+\def\dodosettopinserts%
+ {\ifnum\noffloatinserts<\noftopfloats
+ \dogetfloat
+ \ifdim\topinserted=\!!zeropoint\relax
+ \topofinserttrue
+ \else
+ \topofinsertfalse
+ \fi
+ \global\advance\topinserted by \ht\floatbox
+ \global\advance\topinserted by \dp\floatbox
+ \global\advance\topinserted by \floatbottomskip\relax
+ \ifdim\topinserted<\teksthoogte\relax
+ \xdef\totaltopinserted{\the\topinserted}%
+ \insert\topins
+ {\forgetall
+ \iftopofinsert
+ \kern-\lineskip\par\prevdepth=\maxdimen
+ \else
+ %\blanko[-\@@bknawit,\@@bkvoorwit]% inserts can't look back
+ \betweenfloatblanko
+ \fi
+ \flushfloatbox
+ \blanko[\@@bknawit]}%
+ \ifsomefloatwaiting
+ \advance\noffloatinserts by 1
+ \else
+ \noffloatinserts=\noftopfloats\relax
+ \fi
+ \dofloatflushedinfo
+ \else
+ \doresavefloat
+ \noffloatinserts=\noftopfloats\relax
+ \fi
+ \else
+ \ifsomefloatwaiting
+ \showmessage{\m!floatblocks}{6}{\the\noftopfloats}%
+ \fi
+ \let\dodosettopinserts=\relax
+ \fi
+ \dodosettopinserts}
+
+\def\dosettopinserts%
+ {\bgroup
+ \ifsomefloatwaiting
+ \noffloatinserts=0\relax
+ \let\totaltopinserted=\!!zeropoint\relax
+ \dodosettopinserts
+ \ifnum\@@bknonder=0\relax
+ \ifnum\@@bknregels>0\relax
+ \ifdim\totaltopinserted>\!!zeropoint\relax
+ \dimen0=\lineheight
+ \dimen0=\@@bknregels\dimen0\relax
+ \advance\dimen0 by \totaltopinserted\relax
+ \ifdim\dimen0>\teksthoogte
+ \showmessage{\m!floatblocks}{8}{\@@bknregels}%
+ \null\vfilll\eject
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \egroup}
+
+\def\dodosetbotinserts%
+ {\ifnum\noffloatinserts<\nofbotfloats\relax
+ \dogetfloat
+ \global\advance\botinserted by \ht\floatbox\relax
+ \global\advance\botinserted by \dp\floatbox\relax
+ \global\advance\botinserted by \floattopskip\relax
+ \ifdim\botinserted<\pagegoal\relax
+ \insert\botins
+ {\forgetall
+ \blanko[\@@bkvoorwit]%
+ \flushfloatbox}%
+ \ifsomefloatwaiting
+ \advance\noffloatinserts by 1
+ \else
+ \noffloatinserts=\nofbotfloats
+ \fi
+ \dofloatflushedinfo
+ \else
+ \doresavefloat
+ \noffloatinserts=\nofbotfloats\relax
+ \fi
+ \global\nofloatpermittedtrue % vgl topfloats s!
+ \else
+ \ifsomefloatwaiting
+ \showmessage{\m!floatblocks}{7}{\the\nofbotfloats}%
+ \fi
+ \let\dodosetbotinserts=\relax
+ \fi
+ \dodosetbotinserts}
+
+\def\dosetbotinserts%
+ {\bgroup
+ \ifsomefloatwaiting
+ \noffloatinserts=0\relax
+ \dodosetbotinserts
+ \fi
+ \egroup}
+
+\def\dobotfloat%
+ {\global\advance\botinserted by \ht\floatbox
+ \global\advance\botinserted by \dp\floatbox
+ \global\advance\botinserted by \floattopskip
+ \insert\botins
+ {\forgetall
+ \blanko[\@@bkvoorwit]%
+ \flushfloatbox}%
+ %\global\nofloatpermittedtrue
+ \doinsertfloatinfo}
+
+\def\dosetbothinserts%
+ {\ifflushingfloats
+ \global\topinserted=\!!zeropoint\relax
+ \global\botinserted=\!!zeropoint\relax
+ \else
+ \global\topinserted=\!!zeropoint\relax
+ \dosettopinserts
+ \global\botinserted=\topinserted\relax
+ \dosetbotinserts
+ \fi}
+
+\def\dotopinsertions%
+ {\ifvoid\topins\else
+ \unvbox\topins
+ \fi
+ \global\topinserted=\!!zeropoint\relax}
+
+\def\dobotinsertions%
+ {\ifvoid\botins\else
+ \ifr@ggedbottom % \vfill is nieuw
+ \unvbox\botins\vfill
+ \else
+ \vfill\unvbox\botins
+ \fi
+ \fi
+ \global\botinserted=\!!zeropoint\relax
+ \global\nofloatpermittedfalse}
+
+\newif\iftopofinsert
+\newif\iftestfloatbox %\testfloatboxtrue
+
+\def\flushfloatbox% nog verder doorvoeren en meer info in marge
+ {\iftestfloatbox
+ \ruledhbox{\box\floatbox}%
+ \else
+ \box\floatbox
+ \fi}
+
+% beter de laatste skip buiten de \insert uitvoeren,
+% bovendien bij volle flush onder baseline.
+
+\def\betweenfloatblanko% assumes that \@@bknawit is present
+ {\bgroup
+ \setbox0=\vbox{\strut\blanko[\@@bkvoorwit]\strut}%
+ \setbox2=\vbox{\strut\blanko[\@@bknawit]\strut}%
+ \ifdim\ht0>\ht2
+ \blanko[-\@@bknawit,\@@bkvoorwit]
+ \fi
+ \egroup}
+
+\def\doroomfloat%
+ {\ifnofloatpermitted
+ \global\roomforfloatfalse
+ \else
+ \dimen0=\pagetotal
+ \advance\dimen0 by \ht\floatbox
+ \advance\dimen0 by \dp\floatbox
+ \advance\dimen0 by \floattopskip
+ \advance\dimen0 by -\pageshrink % toegevoegd
+ \ifdim\dimen0>\pagegoal
+ \global\roomforfloatfalse
+ \else
+ \global\roomforfloattrue
+ \fi
+ \fi}
+
+\def\doexecfloat% spacing between two successive must be better
+ {\baselinecorrection
+ \witruimte
+ \blanko[\@@bkvoorwit]%
+ \flushfloatbox
+ \blanko[\@@bknawit]%
+ \doinsertfloatinfo}
+
+\def\somefixdfloat[#1]%
+ {\doroomfloat
+ \ifroomforfloat\else
+ \goodbreak
+ \fi
+ \showmessage{\m!floatblocks}{9}{}%
+ \doexecfloat}
+
+\def\somesidefloat[#1]% links, rechts NOG TESTEN EN AANPASSEN
+ {\checkwaitingfloats{#1}%
+ \def\logsidefloat%
+ {\doinsertfloatinfo}%
+ \setbox\floatbox=\vbox{\box\floatbox}%
+ \wd\floatbox=\floatwidth
+ \processfirstactioninset
+ [#1]
+ [ \v!links=>\leftfloat{\box\floatbox},
+ \v!rechts=>\rightfloat{\box\floatbox},
+ \v!inlinker=>\leftmarginfloat{\box\floatbox},
+ \v!inrechter=>\rightmarginfloat{\box\floatbox},
+ \v!inmarge=>{\doinmargenormal\leftmarginfloat\rightmarginfloat[]{\box\floatbox}}]%
+ \doifinset{\v!lang}{#1}
+ {\flushsidefloatsafterpar}}
+
+\def\sometextfloat[#1]% lang, links, rechts, hoog, midden, laag, offset
+ {\checkwaitingfloats{#1}%
+ \global\floattextwidth=\hsize
+ \global\floatwidth=\wd\floatbox
+ \global\floatheight=\ht\floatbox
+ \global\advance\floattextwidth by -\floatwidth
+ \global\advance\floattextwidth by -\@@bkmarge\relax % was \tfskipsize
+ \doifinsetelse{\v!lang}{#1}
+ {\floattextheight=\pagegoal
+ \advance\floattextheight by -\pagetotal
+ \advance\floattextheight by -\bigskipamount % lelijk
+ \ifdim\floattextheight>\teksthoogte
+ \floattextheight=\teksthoogte
+ \fi
+ \boxmaxdepth=\!!zeropoint\relax % toegevoegd
+ \ifdim\floattextheight<\floatheight
+ \floattextheight=\floatheight
+ \fi
+ \setbox\floattext=\vbox to \floattextheight}
+ {\setbox\floattext=\vbox}%
+ \bgroup
+ \blanko[\v!blokkeer]
+ \hsize\floattextwidth
+ \ignorespaces}
+
+\def\stoptextfloat#1%
+ {\egroup
+ \doifnotinset{\v!lang}{#1}%
+ {\ifdim\ht\floattext<\floatheight
+ \floattextheight=\floatheight
+ \else
+ \floattextheight=\ht\floattext
+ \fi}%
+ \setbox\floatbox=\vbox to \floattextheight
+ {\hsize\floatwidth
+ \box\floatbox
+ \vfill}%
+ \setbox\floattext=\vbox to \floattextheight
+ {\hsize\floattextwidth
+ \doifinsetelse{\v!laag}{#1}
+ {\vfill
+ \box\floattext
+ \doifinset{\c!offset}{#1}{\witruimte\blanko}}
+ {\doifinsetelse{\v!midden}{#1}
+ {\vfill
+ \box\floattext
+ \vfill}
+ {\doifinset{\c!offset}{#1}{\witruimte\blanko}%
+ \box\floattext
+ \vfill}}}%
+ \doifinsetelse{\c!rechts}{#1}%
+ {\setbox\floatbox=\hbox to \hsize
+ {\box\floattext
+ \hfill
+ \box\floatbox}}
+ {\setbox\floatbox=\hbox to \hsize
+ {\box\floatbox
+ \hfill
+ \box\floattext}}%
+ \baselinecorrection
+ \witruimte
+ \blanko[\@@bkvoorwit]%
+ \doifnotinset{\v!lang}{#1}%
+ {\dp\floatbox=\dp\strutbox}% % toegevoegd
+ \box\floatbox
+ \blanko[\@@bknawit]%
+ \doinsertfloatinfo}
+
+\def\somefacefloat[#1]% links, rechts, midden, hoog, midden, laag
+ {\checkwaitingfloats{#1}%
+ \startnaast\box\floatbox\stopnaast
+ \doinsertfloatinfo}
+
+\def\somepagefloat[#1]% links, rechts, midden, hoog, midden, laag
+ {\checkwaitingfloats{#1}%
+ \vbox to \teksthoogte
+ {\doifnotinset{\v!hoog}{#1}{\vfill}%
+ \box\floatbox
+ \doifnotinset{\v!laag}{#1}{\vfill}}%
+ \doinsertfloatinfo
+ \pagina} % toegevoegd
+
+\def\someelsefloat[#1]%
+ {\doifinsetelse{\v!hier}{#1}
+ {\doifinsetelse{\v!altijd}{#1}
+ {\pagina[\v!voorkeur]%
+ \doroomfloat
+ \ifroomforfloat
+ \doexecfloat
+ \else
+ \showmessage{\m!floatblocks}{9}{}%
+ \doreversesavefloat
+ \fi}
+ {\ifsomefloatwaiting
+ \dosavefloat
+ \else
+ \pagina[\v!voorkeur]%
+ \doroomfloat
+ \ifroomforfloat
+ \doexecfloat
+ \else
+ \dosavefloat
+ \fi
+ \fi}}
+ {\doifinsetelse{\v!altijd}{#1}
+ {\doroomfloat
+ \ifroomforfloat
+ \processallactionsinset
+ [#1]
+ [ \v!boven=>\dotopfloat,
+ \v!onder=>\dobotfloat,
+ \s!default=>\doexecfloat]%
+ \else
+ \showmessage{\m!floatblocks}{9}{}%
+ \doreversesavefloat
+ \fi}
+ {%\ifsomefloatwaiting % from before the renumbering time
+ % \doflushfloats
+ %\fi
+ \doroomfloat
+ \ifroomforfloat
+ \processallactionsinset
+ [#1]
+ [ \v!boven=>%%\ifdim\topinserted=\!!zeropoint\relax
+ %\iffloatsonpage
+ % \dosavefloat
+ %\else
+ \dotopfloat
+ %\fi
+ %%\else
+ %% \dosavefloat
+ %%\fi
+ ,
+ \v!onder=>%\ifdim\botinserted=\!!zeropoint\relax
+ \dobotfloat
+ %\else
+ % \dosavefloat
+ %\fi
+ ,
+ \s!default=>\doexecfloat]%
+ \else
+ \dosavefloat
+ \fi}}}
+
+% De onderstaande macro wordt gebruikt bij de macros
+% voor het plaatsen van tabellen en figuren (klopt niet
+% meer).
+%
+% \dofloat {plaats} {label1} {label2} {kader}
+%
+% \docompletefloat {nummer} {referentie} {lijst}
+% {plaats} {label1} {label2} {inhoud}
+%
+% \box\floatbox inhoud+referentie
+%
+% \do???float#1 #1 = boxnummer
+%
+% \ifinsidefloat wordt \true gezet voor \docompletefloat en \false
+% na float plaatsen; kan worden gebruikt om in
+% andere commando's witruimte te onderdrukken
+
+\newdimen\floattopskip \floattopskip=12pt
+\newdimen\floatbottomskip \floatbottomskip=12pt
+\newdimen\floatsideskip \floatsideskip=12pt
+
+\newdimen\sidefloattopskip \sidefloattopskip=\floattopskip
+\newdimen\sidefloatbottomskip \sidefloatbottomskip=\floatbottomskip
+\def\sidefloattopoffset {\dp\strutbox}
+
+\newcount\noftopfloats \noftopfloats=2
+\newcount\nofbotfloats \nofbotfloats=0
+
+\def\calculatefloatskips%
+ {{\def\calculatefloatskips##1##2%
+ {\doifelsenothing{##2}
+ {\global##1=\!!zeropoint}
+ {\doifelse{##2}{\v!geen}
+ {\global##1=\!!zeropoint}
+ {\setbox0=\vbox{\witruimte\@EA\blanko\@EA[##2]}%
+ \global##1=\ht0}}}%
+ \calculatefloatskips\floattopskip\@@bkvoorwit
+ \calculatefloatskips\floatbottomskip\@@bknawit
+ \calculatefloatskips\sidefloattopskip\@@bkzijvoorwit
+ \calculatefloatskips\sidefloatbottomskip\@@bkzijnawit
+ \def\sidefloattopoffset{\dp\strutbox}%
+ \global\floatsideskip=\@@bkmarge\relax
+ \global\noftopfloats=\@@bknboven\relax
+ \global\nofbotfloats=\@@bknonder\relax}}
+
+\newif\ifinsidefloat
+\insidefloatfalse
+
+\def\floatcaptionsuffix{} % an optional suffix
+\def\floatcaptionnumber{} % a logical counter
+
+\def\dosetfloatcaption#1#2#3%
+ {\def\dofloattekst%
+ {{\doattributes{\??kj#1}{#3}}}%
+ \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ {\def\dofloatnummer%
+ {{\xdef\floatcaptionnumber{#1}%
+ \hbox{\doattributes{\??kj#1\v!kop}{\strut#2\floatcaptionsuffix}}}%
+ \ConvertToConstant\doifnot{#3}{}
+ {\tfskip
+ \emergencystretch=.5em}}}
+ {\def\dofloatnummer%
+ {}}}
+
+\def\putborderedfloat#1\in#2\\%
+ {\setbox#2=\vbox
+ {\localframed
+ [\??fl#1]
+ [\c!breedte=\@@bkbreedte,
+ \c!hoogte=\@@bkhoogte,
+ \c!offset=\@@bkoffset]%
+ {\box\floatbox}}}
+
+\newbox\captionbox
+
+\def\putcompletecaption%
+ {\mindermeldingen
+ \begstrut\dofloatnummer\dofloattekst\endstrut}
+
+\def\dosetpagfloat#1#2#3#4%
+ {\bgroup
+ \forgetall
+ %\showcomposition
+ \putborderedfloat#4\in4\\%
+ \def\locatefloat%
+ {\doregelplaats\@@bkplaats}%
+ \ConvertToConstant\doifelse{#3}{\v!geen}
+ {\global\setbox\floatbox=\vbox
+ {\locatefloat{\box4}}}
+ {\dosetfloatcaption{#4}{#2}{#3}%
+% at another level, prevents reprocessing of footnotes
+\setbox\captionbox=\hbox{\putcompletecaption}%
+\def\putcompletecaption{\unhcopy\captionbox}%
+%
+ \setbox2=\hbox
+ {\forgetall
+ \putcompletecaption}%
+ \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
+ {\dimen0=\hsize
+ \advance\dimen0 by -\wd4\relax
+ \advance\dimen0 by -\@@bkmarge\relax % \was tfskipsize\relax
+ \ifdim\wd2>\dimen0\relax
+ \dimen2=1.3\dimen0\relax
+ \ifdim\wd2<\dimen2\relax
+ \dimen0=0.8\dimen0\relax
+ \fi
+ \fi
+ \setbox2=\vbox
+ {\forgetall
+ \hsize=\dimen0\relax
+ \raggedright
+ \begstrut\dofloatnummer
+ \ifx\@@kjkjtussen\empty \else
+ \unskip\@@kjkjtussen
+ \fi
+ \dofloattekst
+ \endstrut}}
+ {\doifelse{\@@kjkjbreedte}{\v!max}
+ {\dosetraggedbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4\relax
+ \putcompletecaption}}
+ {\ifdim\wd2>\wd4\relax
+ \doifelse{\@@kjkjbreedte}{\v!passend}
+ {\ifdim\wd4<15\korpsgrootte\relax
+ \dimen0=15\korpsgrootte\relax
+ \else
+ \dimen0=\wd4\relax
+ \fi
+ \ifdim\wd4>\hsize
+ \setbox0=\vbox
+ {\forgetall
+ \hsize=1.0\wd4
+ \putcompletecaption}%
+ \ifdim\ht0>\lineheight\relax
+ \setbox2=\vbox
+ {\forgetall
+ \hsize=0.9\wd4
+ \putcompletecaption}%
+ \fi
+ \else
+ \setbox0=\vbox
+ {\forgetall
+ \dimen2=1.5\dimen0\relax
+ \ifdim\dimen2<\hsize
+ \hsize=\dimen2\relax
+ \fi
+ \putcompletecaption}%
+ \ifdim\ht0>\lineheight\relax
+ \setbox2=\vbox
+ {\forgetall
+ \dimen2=1.2\dimen0\relax
+ \ifdim\dimen2<\hsize
+ \hsize=\dimen2\relax
+ \fi
+ \putcompletecaption}%
+ \fi
+ \fi}
+ {\dosetraggedbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\@@kjkjbreedte
+ \putcompletecaption}}%
+ \fi}}%
+ \global\setbox\floatbox=\vbox
+ {\processaction
+ [\@@kjkjplaats]
+ [ \v!boven=>\locatefloat{\copy2}%
+ \@@kjkjtussen
+ \locatefloat{\copy4},
+ \v!onder=>\locatefloat{\copy4}%
+ \@@kjkjtussen
+ \locatefloat{\copy2},
+ \v!hoog=>\locatefloat
+ {\doifelse{\@@bkplaats}{\v!links}
+ {\copy4
+ \tfskip
+ \vbox to\ht4{\@@kjkjtussen\copy2\vfill}}
+ {\vbox to\ht4{\@@kjkjtussen\copy2\vfill}%
+ \tfskip
+ \copy4}},
+ \v!laag=>\locatefloat
+ {\doifelse{\@@bkplaats}{\v!links}
+ {\copy4
+ \tfskip
+ \vbox to\ht4
+ {\vfill\copy2\@@kjkjtussen}}
+ {\vbox to\ht4
+ {\vfill\copy2\@@kjkjtussen}%
+ \tfskip
+ \copy4}},
+ \v!midden=>\locatefloat
+ {\doifelse{\@@bkplaats}{\v!links}
+ {\copy4
+ \tfskip
+ \vbox to\ht4{\vfill\copy2\vfill}}
+ {\vbox to\ht4{\vfill\copy2\vfill}%
+ \tfskip
+ \copy4}},
+ \v!geen=>\locatefloat{\copy4}]}}%
+ \ifdim\wd2>\wd4
+ \global\wd\floatbox=\wd2
+ \else
+ \global\wd\floatbox=\wd4
+ \fi
+ \egroup}
+
+\def\dosetparfloat#1#2#3#4%
+ {\bgroup
+ %\showcomposition
+ \forgetall
+ \putborderedfloat#4\in4\\
+ \ConvertToConstant\doifelse{#3}{\v!geen}
+ {\global\setbox\floatbox=\vbox{\box4}}
+ {\dosetfloatcaption{#4}{#2}{#3}%
+ \setbox2=\hbox
+ {\forgetall
+ \putcompletecaption}%
+ \doifelse{\@@kjkjbreedte}{\v!max}
+ {\dosetraggedbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4
+ \putcompletecaption}}
+ {\doifelse{\@@kjkjbreedte}{\v!passend}
+ {\ifdim\wd2>\wd4\relax
+ \setbox2=\vbox
+ {\forgetall
+ \hsize\wd4
+ \putcompletecaption}%
+ \else
+ \setbox2=\hbox to \wd4
+ {\hss\box2\hss}%
+ \fi}
+ {\dosetraggedbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4
+ \putcompletecaption}}}%
+ \global\setbox\floatbox=\vbox
+ {\processaction
+ [\@@kjkjplaats]
+ [ \v!boven=>\box2
+ \@@kjkjtussen
+ \box4,
+ \v!onder=>\box4
+ \@@kjkjtussen
+ \box2,
+ \v!geen=>\box4]}}%
+ \egroup}
+
+\newif\ifparfloat
+
+\long\def\dosetfloatbox#1#2#3#4%
+ {\ifvisible
+ \par
+ \doifcommonelse
+ {#1}{\v!links,\v!rechts,\v!inlinker,\v!inrechter,\v!inmarge}
+ {\global\parfloattrue}
+ {\global\parfloatfalse}%
+ \edef\@@kjkjbreedte {\getvalue{\??kj#4\c!breedte}}%
+ \def\@@kjkjtussen {\getvalue{\??kj#4\c!tussen}}% geen \edef
+ \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats}}%
+ \edef\@@kjkjuitlijnen {\getvalue{\??kj#4\c!uitlijnen}}%
+ \ifparfloat
+ \dosetparfloat{#1}{#2}{#3}{#4}%
+ \else
+ \dosetpagfloat{#1}{#2}{#3}{#4}%
+ \fi
+ \global\floatheight=\ht\floatbox
+ \global\advance\floatheight by \dp\floatbox
+ \global\floatwidth=\wd\floatbox
+ \global\advance\totalnoffloats by 1\relax
+ \doifnotinset{\v!marge}{#1} % gaat namelijk nog fout
+ {\setbox\floatbox=\vbox
+ {\parindent\!!zeropoint
+ \ifvoorlopig
+ \inlinker{\framed{\infofont\the\totalnoffloats}}%
+ \fi
+ \box\floatbox}}%
+ \wd\floatbox=\floatwidth
+ \dimen0=\floatheight
+ \advance\dimen0 by \lineheight
+ \ifdim\dimen0<\teksthoogte
+ \else
+ \global\floatheight=\teksthoogte
+ \global\advance\floatheight by -\lineheight
+ \ht\floatbox=\floatheight
+ \dp\floatbox=\!!zeropoint
+ \showmessage{\m!floatblocks}{10}{\the\totalnoffloats}%
+ \fi
+ \fi}
+
+\def\dogetfloatbox#1%
+ {\ifvisible
+ \def\next##1{\global\floatsonpagetrue\def\next{##1}}%
+ \processfirstactioninset
+ [#1]
+ [ \v!hier=>\next{\someelsefloat[#1]},
+ \v!forceer=>\next{\somefixdfloat[#1]},
+ \v!links=>\next{\somesidefloat[#1]},
+ \v!rechts=>\next{\somesidefloat[#1]},
+ \v!tekst=>\next{\sometextfloat[#1]},
+ \v!boven=>\def\next{\someelsefloat[#1]}, % !
+ \v!onder=>\next{\someelsefloat[#1]},
+ \v!marge=>\def\next{\somenextfloat[#1]}, % !
+ \v!pagina=>\next{\somepagefloat[#1]},
+ \v!naast=>\next{\somefacefloat[#1]},
+ \v!inmarge=>\next{\somesidefloat[#1]},
+ \v!inlinker=>\next{\somesidefloat[#1]},
+ \v!inrechter=>\next{\somesidefloat[#1]},
+ \s!default=>\next{\someelsefloat[\v!hier,#1]},
+ \s!unknown=>\next{\someelsefloat[\v!hier,#1]}]%
+ \next
+ \fi}
+
+\long\def\dofloat#1#2#3#4%
+ {\dosetfloatbox{#1}{#2}{#3}{#4}%
+ \dogetfloatbox{#1}}%
+
+\long\def\docompletefloat#1#2#3#4#5#6#7%
+ {\flushsidefloats
+ \calculatefloatskips
+ \setbox\floatbox=\vbox{#7}%
+ \dimen0=\ht\floatbox
+ \advance\dimen0 by \dp\floatbox
+ \ifdim\dimen0=\!!zeropoint\relax
+ \showmessage{\m!floatblocks}{11}{}%
+ \setbox\floatbox=\vbox{\getvalue{\e!lege#3}}%
+ \fi
+ \ConvertToConstant\doifelse{#6}{\v!geen}
+ {\setbox\floatbox=\vbox
+ {\unvbox\floatbox
+ \rawpagereference{\s!flt}{#2}}%
+ \dofloat{#4}{}{#6}{#1}}
+ {\doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ {\verhoognummer[#1]%
+ \maakhetnummer[#1]%
+ \setbox\floatbox=\vbox
+ {\unvbox\floatbox
+ \dofloatreference
+ \redofloatorder{#1}%
+ \rawreference{\s!flt}{#2}{\hetnummer}%
+ \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
+ \dofloat{#4}{#5\hetnummer}{#6}{#1}}
+ {\setbox\floatbox=\vbox
+ {\unvbox\floatbox
+ \rawpagereference{\s!flt}{#2}}%
+ \dofloat{#4}{}{#6}{#1}}}%
+ \global\insidefloatfalse}
+
+\def\plaatsvolledig#1#2#3#4% kop, ref, tit, do
+ {#1[#2]{#3}%
+ #4%
+ \pagina[\v!ja]}
+
+%I n=Figuren
+%I c=\plaatsfiguur,\reserveerfiguur,\startfiguurtekst
+%I c=\leegfiguur,\volledigelijstmetfiguren
+%I c=\plaatstabel,\reserveertabel,\starttabeltekst
+%I c=\legetabel,\volledigelijstmettabellen
+%I
+%I Figuren en tabellen (gebruik ..tabel.. in plaats van
+%I ..figuur..) kunnen in de tekst worden geplaatst met het
+%I commando:
+%I
+%I \plaatsfiguur[plaats][referentie]{titel}{figuur}
+%I
+%I Als voorkeur kan worden opgegeven 'hier', 'forceer',
+%I 'pagina', 'boven', 'onder', 'links' en 'rechts'. In plaats
+%I van een titel kan 'geen' worden meegegeven, in dat geval
+%I wordt geen titel geplaatst. Eventueel kan in combinatie
+%I met links en rechts 'lang' worden opgegeven.
+%I
+%I De volgorde kan worden afgedwongen met 'altijd',
+%I bijvoorbeeld [hier,altijd]. In dat geval wordt bij een
+%I volgende run zonodig de nummering aangepast.
+%I
+%I In plaats van een titel kan {geen} worden ingevuld. In
+%I dat geval blijft de titel achterwege.
+%P
+%I Het is mogelijk ruimte voor een figuur te reserveren:
+%I
+%I \reserveerfiguur[hoogte=,breedte=,kader=][voorkeur]
+%I [referentie]{titel}
+%P
+%I Een lijst met figuren kan worden opgeroepen met:
+%I
+%I \plaatslijstmetfiguren
+%I \volledigelijstmetfiguren
+%I
+%I Men kan een tekst naast een figuur zetten met:
+%I
+%I \startfiguurtekst[plaats][referentie]{kop}{figuur}
+%I ...
+%I \stopfiguurtekst
+%I
+%I Mogelijke plaatsen zijn (combinaties van) 'links', 'rechts',
+%I 'hoog', 'laag' en 'midden'. Met 'offset' dwingt men een
+%I verschuiving omlaag van van 1 regel af.
+%I
+%I Zie verder onder plaatsblokken.
+
+%I n=Tabellen
+%I
+%I Zie figuren.
+
+%I n=Intermezzo
+%I
+%I Zie figuren.
+
+%I n=Grafieken
+%I
+%I Zie figuren.
+
+%T n=figuur
+%T m=fig
+%T a=f
+%T
+%T \plaatsfiguur
+%T [hier]
+%T [fig:]
+%T {}
+%T {\naam{?}}
+%T
+
+\definieernummer
+ [\??si]
+ [\c!wijze=\v!per\v!tekst,
+ \c!conversie=\@@siconversie]
+
+\def\stelplaatsbloksplitsenin%
+ {\dodoubleargument\getparameters[\??si]}
+
+\def\dosplitsplaatsblok[#1]#2% nog dubbele refs
+ {\ifbinnenkolommen % tzt ook nog figuren splitten
+ % not yet supported
+ \else
+ \bgroup
+ \insidefloattrue
+ \getparameters[\??si][#1]%
+ \resetnummer[\??si]%
+ \def\floatcaptionsuffix{\nummer[\??si]}%
+ \TableCaptionHeight=\@@siregels\lineheight
+ \dowithnextbox
+ {\forgetall
+ \mindermeldingen
+ \doloop
+ {\setbox2\vsplit\nextbox to \lineheight
+ \setbox2=\vbox{\unvbox2}
+ \ifdim\ht2>\lineheight
+ \verhoognummer[\??si]%
+ \bgroup
+ #2{\unvbox2}
+ \egroup
+ \pagina
+ \ifdim\ht\nextbox>\!!zeropoint
+ \verlaagnummer[\floatcaptionnumber]%
+ \fi
+ \fi
+ \ifdim\ht\nextbox>\!!zeropoint\else
+ \expandafter\exitloop
+ \fi}%
+ \egroup}
+ \vbox
+ \fi}
+
+\def\splitsplaatsblok%
+ {\dosingleempty\dosplitsplaatsblok}
+
+%I n=Formules
+%I c=\plaatsformule,\plaatssubformule,\stelformulesin
+%I
+%I Formules kunnen in de tekst worden geplaatst met
+%I het commando:
+%I
+%I \plaatsformule[referentie]subnummer$$formule$$
+%I
+%I Dit commando handelt de witruimtes om de formules af en
+%I plaatst nummers. Als geen nummer nodig is, en dus ook
+%I geen referentie, dan moet met het commando als volgt
+%I gebruiken:
+%I
+%I \plaatsformule-$$...$$ of \plaatsformule[-]$$...$$
+%I
+%I Als het nummer niet moet worden opgehoogd, gebruikt men
+%I
+%I \plaatssubformule[referentie]subnummer$$formule$$
+%P
+%I PAS OP:
+%I
+%I Binnen een aantal wiskundige commando's, zoals
+%I \displaylines, moet men het nummer zelf plaatsen. Dit
+%I kan gebeuren met: \formulenummer of \subformulenummer.
+%I Ook hier kan een [referentie] en een {subnummer} worden
+%I meegegeven.
+%I
+%I \plaatsformule
+%I $$\displaylines
+%I {x \hfill\formulenummer[eerste]{}\cr
+%I y \hfill\cr
+%I z \hfill\formulenummer[derde]{}\cr}
+%I $$
+%P
+%I De wijze waarop formules worden genummerd kan worden
+%I be‹nvloed door het commando:
+%I
+%I \stelformulesin[links=,rechts=,plaats=]
+%I
+%I De nummers kunnen links en rechts worden gezet. Standaard
+%I worden de symbolen ( en ) gebruikt.
+%I
+%I Tussen twee formules kan witruimte worden geforceerd met
+%I het commando:
+%I
+%I \blanko[formule]
+
+\abovedisplayskip = \!!zeropoint\relax
+\abovedisplayshortskip = \!!zeropoint\relax % evt. 0pt minus 3pt
+\belowdisplayskip = \!!zeropoint\relax
+\belowdisplayshortskip = \!!zeropoint\relax % evt. 0pt minus 3pt
+
+\predisplaypenalty = 0
+\postdisplaypenalty = 0 % -5000 gaat mis, zie penalty bij \paragraaf
+
+\doorlabelen
+ [\v!formule]
+ [\c!tekst=\v!formule,
+ \c!wijze=\@@fmwijze,
+ \c!blokwijze=\@@fmblokwijze,
+ \c!plaats=\v!intekst]
+
+\def\stelformulesin%
+ {\dodoubleargument\getparameters[\??fm]}
+
+\def\dodoplaatsformule#1[#2]#3$$#4$$%
+ {\begingroup
+ \setdisplayskips
+ \!!doneafalse
+ \doif{#2}{-}{\!!doneatrue}%
+ \doif{#3}{-}{\!!doneatrue}%
+ \if!!donea % no number
+ \def\complexformulenummer[##1]##2%
+ {}%
+ \def\formulenummer%
+ {\complexorsimpleempty{formulenummer}}%
+ \def\subformulenummer%
+ {\formulenummer}%
+ $$#4$$
+ \else
+ \doifelse{#1}{\v!ja}
+ {\def\verhoogformulenummer{\verhoognummer[\v!formule]}}
+ {\let\verhoogformulenummer=\relax}%
+ \def\simpleformulenummer%
+ {\gdef\doeqno{}%
+ \gdef\doleqno{}%
+ \gdef\formulenummer{\doformulenummer}%
+ \doformulenummer[#2]{#3}}%
+ \def\complexformulenummer%
+ {\gdef\doeqno{}%
+ \gdef\doleqno{}%
+ \gdef\formulenummer{\doformulenummer}%
+ \doformulenummer}%
+ \def\formulenummer%
+ {\complexorsimple{formulenummer}}%
+ \def\subformulenummer%
+ {\let\verhoogformulenummer=\relax
+ \complexorsimple{formulenummer}}%
+ \gdef\doleqno{\leqno{\formulenummer}}%
+ \gdef\doeqno{\eqno{\formulenummer}}%
+ \doifelse{\@@fmplaats}{\v!links}
+ {$$#4\doleqno$$}
+ {$$#4\doeqno$$}
+ \fi
+ \par
+ \ignorespaces
+ \endgroup}
+
+\def\complexdoformulenummer[#1]#2%
+ {\verhoogformulenummer
+ \doifelse{#2}{ }
+ {\def\hetsubnummer{}}
+ {\def\hetsubnummer{#2}}%
+ {\rm\strut\@@fmlinks\lossenummer[\v!formule]\hetsubnummer\@@fmrechts}%
+ \rawreference{\s!for}{#1}{\hetnummer\hetsubnummer}}
+
+\letvalue{\e!start\e!formule}=\undefined
+\letvalue{\e!stop \e!formule}=\undefined
+
+%\def\dodoplaatsstartformule#1[#2]#3\startformule#4\stopformule%
+% {\dodoplaatsformule#1[#2]#3$$#4$$}
+
+\expanded
+ {\def\noexpand\dodoplaatsstartformule##1[##2]##3\csname\e!start\e!formule\endcsname##4\csname\e!stop\e!formule\endcsname%
+ {\noexpand\dodoplaatsformule##1[##2]##3$$##4$$}}
+
+\setvalue{\e!start\e!formule}{$$}
+\setvalue{\e!stop \e!formule}{$$}
+
+\def\doplaatsformule#1[#2]#3% % #3 gobbles spaces between [] and $$ or \startformule
+ {\def\redoplaatsformule% % we can't lose {} after $$
+ {\expandafter\ifx\csname\e!start\e!formule\endcsname\next
+ \let\next=\dodoplaatsstartformule
+ \else
+ \let\next=\dodoplaatsformule
+ \fi
+ \next#1[#2]}%
+ \futurelet\next\redoplaatsformule#3}
+
+\def\complexplaatsformule%
+ {\doplaatsformule{\v!ja}}
+
+\def\complexplaatssubformule%
+ {\doplaatsformule{\v!nee}}
+
+\definecomplexorsimpleempty\doformulenummer
+\definecomplexorsimpleempty\plaatsformule
+\definecomplexorsimpleempty\plaatssubformule
+
+%I n=Naast
+%I c=\startnaast,\stelnaastplaatsenin
+%I
+%I Experiment:
+%I
+%I \startnaast
+%I ...
+%I \stopnaast
+%I
+%I \stelnaastplaatsenin[status=]
+%I
+
+\newbox\facingbox
+\newbox\facingpage
+
+\newdimen\facingboxsize
+\newdimen\facingpagetotal
+
+\facingpagetotal=\!!zeropoint
+
+\newif\iffacingpages \facingpagesfalse
+\newif\iffirstpagedone \firstpagedonefalse
+
+\def\shipoutfacingpage%
+ {\iffacingpages
+ \iffirstpagedone
+ \setbox\facingpage=\vbox to \zethoogte
+ {\kern\hoofdhoogte
+ \kern\ht\topins % ?
+ \kern\dp\topins % ?
+ \kern\dp\strutbox % checken
+ \box\facingpage
+ \vfill}%
+ \myshipout{\box\facingpage}%
+ \fi
+ \fi
+ \global\setbox\facingpage=\box\voidb@x
+ \global\firstpagedonetrue
+ \global\facingpagetotal=\!!zeropoint\relax}
+
+\def\flushfacingpage%
+ {\penalty-\!!tenthousand
+ \global\facingpagetotal=\facingboxsize
+ \setbox\facingpage=\vbox{\box\facingbox}}
+
+\def\startnaast#1\stopnaast%
+ {\iffacingpages
+ \setbox\facingbox=\vbox
+ {\hsize=\zetbreedte\relax
+ #1}%
+ \global\facingboxsize=\ht\facingbox
+ \global\advance\facingboxsize by \dp\facingbox
+ \ifdim\pagetotal<\facingpagetotal
+ \dimen2=\facingpagetotal
+ \advance\dimen2 by -\pagetotal
+ \vskip\dimen2\relax
+ \else
+ \dimen2=\!!zeropoint\relax
+ \fi
+ \dimen0=\pagetotal
+ \advance\dimen0 by \facingboxsize
+ \ifdim\dimen0>\pagegoal
+ \flushfacingpage
+ \else
+ \global\advance\facingpagetotal by \facingboxsize
+ \ifdim\facingpagetotal>\pagegoal
+ \flushfacingpage
+ \else
+ \setbox\facingpage=\vbox
+ {\offinterlineskip
+ \mindermeldingen
+ \ht\facingpage=\!!zeropoint
+ \ifdim\pagetotal=\topskip
+ \vskip-\topskip
+ \fi
+ \box\facingpage
+ \advance\dimen2 by \pagetotal
+ \vskip\dimen2\relax
+ \ifdim\facingpagetotal>\facingboxsize
+ \vskip\tussenwit
+ \fi
+ \box\facingbox}%
+ \fi
+ \fi
+ \fi}
+
+\def\dostelnaastplaatsenin[#1]%
+ {\getparameters[\??np][#1]%
+ \doifelse{\@@npstatus}{\v!start}
+ {\global\facingpagestrue}
+ {\global\facingpagesfalse}}
+
+\def\stelnaastplaatsenin%
+ {\dosingleargument\dostelnaastplaatsenin}
+
+\def\naastpagina%
+ {\shipoutfacingpage}
+
+\def\facefloat% redefined
+ {\startnaast\box\floatbox\stopnaast}
+
+%I n=Lijsten
+%I c=\definieerlijst,\stellijstin,\plaatslijst
+%I
+%I Er kunnen lijsten worden aangemaakt en opgeroepen. Een
+%I lijst wordt gedefinieerd met:
+%I
+%I \definieerlijst[naam]
+%I
+%I en zonodig ingesteld met:
+%I
+%I \stellijstin[naam][status=,variant=,marge=,breedte=,
+%I scheider=,afstand=,paginanummer=,deelnummer=,
+%I titeluitlijnen=,label=,letter=,tekstletter=,nummerletter=,
+%I paginaletter=,paginaovergangen=,voor=,na=,niveau=,
+%I criterium=,symbool=,prefix=,links=,rechts=]
+%I
+%I De instellingen mogen ook direkt worden opgegeven:
+%I
+%I \definieerlijst[naam][instellingen]
+%I
+%I Ook kunnen kenmerken van andere lijsten worden overgenomen:
+%I
+%I \definieerlijst[naam][andere naam]
+%P
+%I De vorm van de lijst wordt onder meer bepaald door de variant
+%I (a,b,c). In grote lijnen ziet een lijst er als volgt uit:
+%I
+%I <marge+breedte+scheider+afstand> <variant>
+%I
+%I Mogelijke varianten zijn:
+%I
+%I variant a : nummer - titel - pagina
+%I variant b : nummer - titel - spaties - pagina
+%I variant c : nummer - titel - punten - pagina
+%I variant d : nummer - titel - pagina (doorlopend)
+%P
+%I Een of meer lijsten kunnen wordt opgeroepen met:
+%I
+%I \plaatslijst[naam,naam,...]
+%I
+%I Standaard zijn lijsten gedefinieerd voor deel, hoofdstuk,
+%I paragraaf, subparagraaf en subsubparagraaf. Deze lijsten
+%I zijn dus afzonderlijk in te stellen. Deze lijsten zijn
+%I gegroepeerd tot een samengestelde lijst (zie elders).
+%I
+%I De layout van een lijst kan worden beinvloed door
+%I commando's tussen te voegen met:
+%I
+%I \schrijftussenlijst[naam]{commandos}
+%I
+%I Voor eigen gebruik is \iflijstgeplaatst beschikbaar.
+%P
+%I Gevorderde gebruikers kunnen eigen lijstcommando's maken.
+%I Deze commando's kunnen worden toegekend met:
+%I
+%I [...,nummercommando=,tekstcommando=,paginacommando=,...]
+%I
+%I en hebben de vorm
+%I
+%I \commando{argument}
+%I
+%I bijvoorbeeld
+%I
+%i nummercommando=\omlijnd
+%I
+%I Volledige vrijheid krijgt men met de instelling
+%I
+%I variant=geen
+
+% \getlistlevel[hoofdstuk]\test{0} \test
+
+\def\getlistlevel[#1]#2#3% [list] \variable \default
+ {\doifdefinedelse{\??ko#1\c!sectie}
+ {\edef#2{\getvalue{\??ko#1\c!sectie}}%
+ \doifdefinedelse{\??se#2\c!niveau}
+ {\edef#2{\getvalue{\??se#2\c!niveau}}}
+ {\edef#2{#3}}}
+ {\edef#2{#3}}}
+
+\def\doschrijfnaarlijst#1#2#3#4%
+ {\doifvalue{\??li#1\c!status}{\v!start}
+ {\begingroup
+ \thisisnextinternal{#1}%
+ %
+ % Dit gaat goed als #2 geen commando's bevat. Dit is
+ % bij interactieve teksten echter soms wel het geval.
+ % Vandaar dat we dit optioneel moeten maken, bijvoorbeeld
+ % met \stellijstin[referentie=ja].
+ %
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??li#1\c!expansie}]
+ [ \v!ja=>{\edef\ascii{#3}},
+ \v!commando=>{\convertcommand#3\to\ascii},
+ \s!unknown=>{\convertargument#3\to\ascii}]%
+ \makesectionformat
+ \doifelse{\@@nmstatus}{\v!start}
+ {\def\dopaginanummer{\noexpand\paginanummer}}
+ {\def\dopaginanummer{0}}%
+ \edef\schrijfwegnaarlijst%
+ {\writeutilitycommand%
+ {\listentry%
+ {#1}%
+ {\nextinternalreference}%
+ {#2}%
+ {\ascii}%
+ {\sectionformat::\dopaginanummer}%
+ {\noexpand\realfolio}}}%
+ \schrijfwegnaarlijst
+ \endgroup}}
+
+\def\doschrijftussenlijst#1#2%
+ {\doif{\getvalue{\??li#1\c!status}}{\v!start}
+ {\begingroup
+ \convertargument#2\to\ascii
+ \makesectionformat
+ \doifelse{\@@nmstatus}{\v!start}
+ {\def\dopaginanummer{\noexpand\paginanummer}}
+ {\def\dopaginanummer{0}}%
+ \edef\schrijfwegnaarlijst%
+ {\writeutilitycommand%
+ {\listbetween%
+ {#1}%
+ {\ascii}%
+ {\sectionformat::\dopaginanummer}%
+ {\noexpand\realfolio}}}%
+ \schrijfwegnaarlijst
+ \endgroup}}
+
+\def\listentry#1%
+ {\executeifdefined{#1\c!lijst}\gobblefivearguments}
+
+\def\listbetween#1%
+ {\executeifdefined{#1\c!tussen}\gobblethreearguments}
+
+\def\@@livarianta% nr - tit - pag
+ {\def\lijstfill{\hskip 1.25em}%
+ \def\lijstskip{0em}}
+
+\def\@@livariantb% nr - tit - fill - pag
+ {\def\lijstfill{\hfill}%
+ \def\lijstskip{5em}}
+
+\def\@@livariantc% nr - tit - dots - pag
+ {\def\lijstfill{\leaders\hbox to .5em{\hss.\hss}\hfill\hskip.5em}%
+ \def\lijstskip{5em}}
+
+\def\@@livariant%
+ {\lijstvariantb}
+
+\@@livariantb
+
+\def\dostellijstin[#1][#2]%
+ {\def\docommando##1%
+ {\getparameters[\??li##1][#2]
+ \preparepaginaprefix{\??li##1}}%
+ \processcommalist[#1]\docommando}
+
+\def\stellijstin%
+ {\dodoubleargument\dostellijstin}
+
+\def\dodosetlijst#1%
+ {\setvalue{#1\c!tussen}{\dotussenlijst{#1}}%
+ \setvalue{#1\c!lijst}{\dolijstelement{#1}}}
+
+\def\dodoresetlijst#1%
+ {\setvalue{#1\c!tussen}{\gobblefourarguments{#1}}%
+ \setvalue{#1\c!lijst}{\gobblesixarguments{#1}}}
+
+%\def\dodoresetlijst#1%
+% {\setvalue{#1\c!tussen}{\gobblethreearguments}%
+% \setvalue{#1\c!lijst}{\gobblefivearguments}}
+
+\def\dodefinieerlijst[#1][#2][#3]%
+ {\presetlocalframed[\??li#1]%
+ \getparameters
+ [\??li#1]
+ [\c!hoogte=\v!ruim,
+ \c!diepte=\v!ruim,
+ \c!offset=0.25em,
+ %
+ \c!status=\v!start,
+ \c!koppeling=\v!uit,
+ \c!criterium=\v!lokaal,
+ \c!breedte=3em,
+ \c!variant=\c!b,
+ \c!letter=\v!normaal,
+ \c!tekstletter=\getvalue{\??li#1\c!letter},
+ \c!nummerletter=\getvalue{\??li#1\c!letter},
+ \c!paginaletter=\getvalue{\??li#1\c!letter},
+ \c!kleur=,
+ \c!tekstkleur=\getvalue{\??li#1\c!kleur},
+ \c!nummerkleur=\getvalue{\??li#1\c!kleur},
+ \c!paginakleur=\getvalue{\??li#1\c!kleur},
+ \c!nummercommando=\lijstnummercommando,
+ \c!tekstcommando=\lijsttekstcommando,
+ \c!paginacommando=\lijstpaginacommando,
+ \c!paginanummer=\v!ja,
+ \c!paginaovergangen=,
+ \c!marge=\!!zeropoint,
+ \c!titeluitlijnen=,
+ \c!voor=,
+ \c!na=,
+ \c!symbool=,
+ \c!interactie=\v!sectienummer,
+ \v!deel\c!nummer=\v!ja, % nodig ?
+ \c!label=\v!nee,
+ \c!afstand=\!!zeropoint,
+ \c!scheider=]%
+ \ConvertToConstant\doifinstringelse{=}{#2}
+ {\getparameters[\??li#1][#2]}
+ {\ConvertToConstant\doifnot{#2}{}
+ {\copyparameters
+ [\??li#1][\??li#2]
+ [\c!status,\c!breedte,\c!variant,\c!letter,\c!kleur,
+ \c!tekstletter,\c!tekstkleur,\c!tekstcommando,
+ \c!paginaletter,\c!paginacommando,\c!paginakleur,
+ \c!nummerletter,\c!nummerkleur,\c!nummercommando,
+ \c!paginanummer,\c!paginaovergangen,\c!marge,\c!symbool,
+ \c!titeluitlijnen,\c!voor,\c!na,\v!deel\c!nummer,\c!label]%
+ \getparameters[\??li#1][#3]}}%
+ \addutilityreset{#1}%
+ \setvalue{\s!set#1}%
+ {\dodosetlijst{#1}}%
+ \setvalue{\s!reset#1}%
+ {\dodoresetlijst{#1}}}
+
+\def\definieerlijst%
+ {\dotripleempty\dodefinieerlijst}
+
+\def\iflijstgeplaatst{\ifutilitydone}
+
+\def\doplaatslijst[#1][#2]%
+ {\begingroup
+ \startopelkaar[\v!blanko]%
+ \getfromcommalist[#1][1]%
+ \let\firstlistelement=\commalistelement
+ \dostellijstin[#1][#2]%
+ \doifvalue{\??li\firstlistelement\c!koppeling}{\v!aan}
+ {\startlistreferences{#1}}%
+ \dosettoclevel{\getvalue{\??li\firstlistelement\c!criterium}}%
+ \doutilities{#1}{\jobname}{#1}{}{\par}%
+ \stoplistreferences{#1}%
+ \stopopelkaar
+ \endgroup}
+
+\def\plaatslijst%
+ {\dodoubleempty\doplaatslijst}
+
+\def\dodovolledigelijst[#1][#2][#3]% enkelvoud, meervoud, instellingen
+ {\systemsuppliedtitle[#2]{\headtext{#2}}
+ \doplaatslijst[#1][#3]}
+
+\def\dovolledigelijst[#1][#2]%
+ {\dodovolledigelijst[#1][#1][#2]}
+
+\def\volledigelijst%
+ {\dodoubleempty\dovolledigelijst}
+
+\def\lijstelementen{} % bevat lijst met paginaovergangen
+\def\lijstnummercommando#1{#1} % geen strut i.v.m. intractieve versie
+\def\lijsttekstcommando#1{\begstrut#1\endstrut}
+\def\lijstpaginacommando#1{\strut#1}
+
+\def\doassigndimen#1#2#3%
+ {\doifinsetelse{#2}{\v!passend,\v!ruim}
+ {#1=#3\relax}
+ {#1=#2\relax}}
+
+\def\dosetlistsymbol#1#2%
+ {\processaction
+ [\getvalue{\??li#1\c!symbool}]
+ [ \v!geen=>\def\listsymbol%
+ {\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}%
+ \hbox to \dimen0{}},
+ 1=>\def\listsymbol%
+ {\strut$\bullet$},
+ 2=>\def\listsymbol%
+ {\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint},
+ 3=>\def\listsymbol% very slow
+ {{\doassigndimen{\dimen0}{\getvalue{\??li#1\c!breedte}}{1.5em}%
+ \doassigndimen{\dimen2}{\getvalue{\??li#1\c!hoogte}}{1ex}%
+ \doassigndimen{\dimen4}{\getvalue{\??li#1\c!diepte}}{0pt}%
+ \vrule\!!width\dimen0\!!height\dimen2\!!depth\dimen4}},
+ \s!unknown=>\def\listsymbol{\getvalue{\??li#1\c!symbool}},
+ \s!default=>\doifelsevalue{\??li#1\c!prefix}{\v!nee}
+ {\aftersplitstring#2\at.\to\splitlistsymbol}
+ {\def\splitlistsymbol{#2}}% geen \edef ivm enz
+ \def\listsymbol%
+ {\doifvalue{\??li#1\c!label}{\v!ja}{\labeltext{#1}}%
+ \strut\splitlistsymbol
+ \getvalue{\??li#1\c!scheider}}]}
+
+\def\dosomelijstelement#1#2#3{#1 #2 \translatednumber[#3]}
+
+\def\dodolijstelementa{\let\dosomelijstelement\dodofixdlijstelementABC}
+\def\dodolijstelementb{\let\dosomelijstelement\dodofixdlijstelementABC}
+\def\dodolijstelementc{\let\dosomelijstelement\dodofixdlijstelementABC}
+\def\dodolijstelementd{\let\dosomelijstelement\dodofixdlijstelementD}
+\def\dodolijstelemente{\let\dosomelijstelement\dodofixdlijstelementE}
+\def\dodolijstelementf{\let\dosomelijstelement\dodofixdlijstelementF}
+\def\dodolijstelementg{\let\dosomelijstelement\dodofixdlijstelementG}
+
+\setvalue{dodolijstelement\v!geen}{\let\dosomelijstelement\dodofreelijstelement}
+
+% Here I learned something new: \leftskip can be changed
+% within a paragraph and the last one counts. Therefore we
+% cannot use \bgroup's! The placement of the \leftskip
+% assignment and the \endgraf's may not be changed. We have to
+% end the preceding paragraph before changing \leftskip. This is
+% because every listelement sets the \leftskip.
+
+% \strippedcsname\dodolijstelement
+
+\def\dolijstelement#1#2#3#4#5#6% pas op: wordt ook elders gedefinieerd
+ {\doiftoclevelelse[#5]
+ {\getvalue{dodolijstelement\getvalue{\??li#1\c!variant}}%
+ %\showcomposition
+ \let\@@iabreedte=\!!zeropoint % moet boolean worden
+ \bgroup
+ \edef\lijstelementen%
+ {\getvalue{\??li#1\c!paginaovergangen}}%
+ \ExpandSecondAfter\doifinset{#3}{\lijstelementen}%
+ {\showmessage{\m!systems}{14}{#3}%
+ \pagina}%
+ \egroup
+ \mindermeldingen
+ \dosetlistsymbol{#1}{#3}%
+ \dosomelijstelement{#1}{#2}{#3}{#4}{#5}{#6}%
+ \global\utilitydonetrue}
+ {}}
+
+\def\dolistattributes#1#2#3%
+ {\doifvaluesomething{\??li#1#2}
+ {\stelinteractiein[\c!kleur=,\c!contrastkleur=]}%
+ \doattributes
+ {\??li#1#3}}
+
+\def\dodofreelijstelement#1#2#3#4#5#6%
+ {\def\makelijstelement##1##2%
+ {\hbox
+ {\doifelsevalue{\??li#1\c!interactie}{##1}
+ {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
+ \gotonextinternal{#1}{#2}{\copy0}{#6}}
+ {##2}}}%
+ \getvalue{\??li#1\c!voor}% can be \hskip
+ \doifdefinedelse{\??li#1\c!commando}
+ {\makelijstelement{\getvalue{\??li#1\c!interactie}}% this forces all
+ {\getvalue{\??li#1\c!commando}%
+ {#3}% geen conversies etc
+ {#4}% geen conversies etc
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}
+ {\ifvmode\nointerlineskip\fi % recently added
+ \vbox
+ {\forgetall
+ \makelijstelement\v!alles
+ {\makelijstelement\v!sectienummer
+ {\dolistattributes{#1}\c!nummerkleur\c!nummer
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+ \makelijstelement\v!tekst
+ {\dolistattributes{#1}\c!tekstkleur\c!tekst
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li#1\c!tekstcommando}{#4}}}%
+ \doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5}
+ {\makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginakleur\c!pagina
+ {\getvalue{\??li#1\c!paginacommando}
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}}}}}%
+\nointerlineskip % anders verkeerde spatiering bij multi-line
+ \endgraf}%
+ \getvalue{\??li#1\c!na}}
+
+\def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden
+ {\endgraf
+ \leftskip=\getvalue{\??li#1\c!marge}% na de \endgraf !
+ \getvalue{\??li#1\c!voor}%
+ \doifelsenothing{#3}
+ {\doifelsevalue{\??li#1\c!titeluitlijnen}{\v!ja}
+ {\!!widtha=\!!zeropoint}
+ {\!!widtha=\getvalue{\??li#1\c!breedte}}}
+ {\!!widtha=\getvalue{\??li#1\c!breedte}}%
+ \getvalue{\??li\c!variant\getvalue{\??li#1\c!variant}}%
+ \endgraf
+ \def\makelijstelement##1##2%
+ {\doifelsevalue{\??li#1\c!interactie}{##1}
+ {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
+ \gotonextinternal{#1}{#2}{\copy0}{#6}}
+ {\hbox{##2}}}%
+ \doifvalue{\??li#1\c!interactie}{\v!tekst} % not supported
+ {\doassign[\??li#1][\c!interactie=\v!alles]}%
+ \makelijstelement\v!alles
+ {\hbox to \hsize
+ {\!!widthb=\hsize
+ \setbox2=\hbox \ifdim\!!widtha>\!!zeropoint to \!!widtha \fi
+ {\makelijstelement\v!sectienummer
+ {\dolistattributes{#1}\c!nummerkleur\c!nummer
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}%
+ \hfill}}%
+ \setbox4=\hbox
+ {\doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5}
+ {\hbox to 2em
+ {\hfill
+ \makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginakleur\c!pagina
+ {\getvalue{\??li#1\c!paginacommando}
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}}}}}%
+ \vbox
+ {\hsize\!!widthb
+ \ifdim\!!widtha<\hsize
+ \hangindent=\wd2
+ \dimen2=\getvalue{\??li#1\c!afstand}%
+ \advance\hangindent by \dimen2
+ \hangafter=1
+ \ifvoid4
+ % we kunnen gewoon afbreken aan het eind
+ \else
+ \ifdim\lijstskip>\!!zeropoint\relax
+ \rightskip=\lijstskip\!!plus10em\relax
+ \parfillskip=-\rightskip
+ \fi
+ \fi
+ \else
+ \dimen2=\!!zeropoint
+ \fi
+ \parindent=\!!zeropoint\relax
+ \leavevmode
+ \box2\relax
+ \hskip\dimen2
+ \bgroup
+ \dolistattributes{#1}\c!tekstkleur\c!tekst
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li#1\c!tekstcommando}{#4}}%
+ \egroup
+ \ifvoid4
+ \ifdim\!!widtha<\hsize
+ \hfill\strut
+ \fi
+ \else
+ \nobreak\hskip.5em\lijstfill
+ \box4\relax
+ \relax
+ \fi}%
+ \hss}}%
+\nointerlineskip % anders verkeerde spatiering bij multi-line
+ \endgraf
+ \getvalue{\??li#1\c!na}}
+
+% overrulen interactie kan sneller, bv door hulpconstanten
+% te gebruiken en die te letten
+
+\def\dodofixdlijstelementD#1#2#3#4#5#6%
+ {\leftskip=\getvalue{\??li#1\c!marge}%
+ \bgroup
+ \ifvmode
+ \noindent\leavevmode
+ \fi
+ \doifvalue{\??li#1\c!interactie}{\v!tekst} % not supported
+ {\doassign[\??li#1][\c!interactie=\v!sectienummer]}%
+ \doifvalue{\??li#1\c!interactie}{\v!alles} % not supported
+ {\doassign[\??li#1][\c!interactie=\v!sectienummer]}%
+ \def\makelijstelement##1##2%
+ {\doifelsevalue{\??li#1\c!interactie}{##1}
+ {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
+ \gotonextinternal{#1}{#2}{\copy0}{#6}}
+ {\hbox{##2}}}%
+ \setbox4=\hbox
+ {\doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5}
+ {\makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginakleur\c!pagina
+ {\getvalue{\??li#1\c!paginacommando}
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}}}}%
+ \hbox
+ {\getvalue{\??li#1\c!links}%
+ \makelijstelement\v!sectienummer
+ {\dolistattributes{#1}\c!nummerkleur\c!nummer
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+ \getvalue{\??li#1\c!rechts}%
+ \hskip.5em}%
+ \nobreak
+ \tolerance3500
+ \dolistattributes{#1}\c!tekstkleur\c!tekst
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li#1\c!tekstcommando}{#4}}%
+ \ifvoid4\else
+ \nobreak
+ \hskip.75em\relax
+ \nobreak
+ \box4
+ \fi
+ \dimen0=\getvalue{\??li#1\c!afstand}\relax
+ \ifdim\dimen0<1em\relax
+ \hskip1em\!!plus1em\!!minus.25em\relax
+ \else
+ \hskip\dimen0\!!plus.5\dimen0\!!minus.25\dimen0\relax
+ \fi
+ \egroup}
+
+\def\dodofixdlijstelementE#1%
+ {\dodofixdlijstelementEFG{\localframed[\??li#1][\c!kleur=]}{#1}}
+
+\def\dodofixdlijstelementF%
+ {\dodofixdlijstelementEFG\relax}
+
+\def\dodofixdlijstelementG#1%
+ {\dodofixdlijstelementEFG\regelmidden{#1}}
+
+\def\dodofixdlijstelementEFG#1#2#3#4#5#6#7%
+ {\hbox
+ {\let\\=\relax
+ \dontconvertfont
+ \setbox0=\hbox
+ {#1{\dolocationattributes{\??li#2}
+ {\ignorespaces\showcontrastlocation{\??ia}{#7}{#5}}}}%
+ \gotonextinternal{#2}{#3}{\copy0}{#7}}}
+
+\def\schrijfnaarlijst[#1]#2#3%
+ {\doifsomething{#1}
+ {\convertargument#2\to\firstlistelement
+ \@EA\doschrijfnaarlijst\@EA{#1}{\firstlistelement}{#3}{\v!kop}}}
+
+\def\dotussenlijst#1#2#3#4% pas op: wordt ook elders gedefinieerd
+ {\doiftoclevelelse[#3]
+ {#2}
+ {}}
+
+\def\schrijftussenlijst[#1]#2%
+ {\@EA\doschrijftussenlijst\@EA{#1}{#2}} % #2 weg en \expanded
+
+% NOG ENGELS MAKEN
+
+\def\lijstlengte {\utilitylistlength}
+\def\lijstbreedte {\utilitylistwidth}
+\def\lijsthoogte {\utilitylistheight}
+
+\def\utilitylistlength {0}
+\def\utilitylistwidth {0pt}
+\def\utilitylistheight {0pt}
+
+\def\dobepaallijstkenmerken[#1][#2]%
+ {\begingroup
+ \doglobal\newcounter\utilitylistlength
+ \def\dolijstelement##1##2##3##4##5##6%
+ {\doiftoclevelelse[##5]
+ {\doglobal\increment\utilitylistlength
+ \hbox
+ {\doattributes
+ {\??li##1\c!tekst}
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li##1\c!tekstcommando}{##4}}}%
+ \global\utilitydonetrue}
+ {}}%
+ \dostellijstin[#1][#2]%
+ \getfromcommalist[#1][1]%
+ \dosettoclevel{\getvalue{\??li\commalistelement\c!criterium}}%
+ \setbox0=\vbox
+ {\doutilities{#1}{\jobname}{#1}{}{\par}}%
+ \xdef\utilitylistheight {\the\ht0}%
+ \xdef\utilitylistwidth {\the\wd0}%
+ \endgroup}
+
+\def\bepaallijstkenmerken%
+ {\dodoubleempty\dobepaallijstkenmerken}
+
+% \definieerreferentielijst
+% [externalfigure]
+% [commando=\toongrootfiguur,
+% voor=\pagina,
+% na=\pagina]
+%
+% \definieerreferentielijst
+% [externaltable]
+% [commando=\toongrotetabel,
+% voor=\pagina,
+% na=\pagina]
+%
+% \def\toongrootfiguur#1%
+% {\externfiguur[#1][kader=aan,factor=max]}
+%
+% \def\toongrotetabel#1%
+% {\switchtocorps[12pt]\haalbuffer[#1]}
+%
+% \schrijfnaarreferentielijst[externalfigure]{koe}{\externfiguur[koe][breedte=3cm,kader=aan]}
+% \schrijfnaarreferentielijst[externalfigure]{paard}{\externfiguur[paard][breedte=3cm,kader=aan]}
+%
+% \startbuffer[kanweg]
+% \starttabel[|||]
+% \HL
+% \VL test \VL test \VL\SR
+% \HL
+% \VL test \VL test \VL\FR
+% \VL test \VL test \VL\MR
+% \VL test \VL test \VL\LR
+% \HL
+% \stoptabel
+% \stopbuffer
+%
+% \schrijfnaarreferentielijst[externaltable]{kanweg}{\switchtcorps[5pt]\haalbuffer[kanweg]}
+%
+% \plaatsreferentielijst
+% [externalfigure,externaltable]
+
+% algemeen
+
+\def\referentiebutton#1[#2]%
+ {\bgroup
+ \def\referenceprefix{}%
+ \setbox0=\hbox{\ignorespaces#1}%
+ \doifreferencefoundelse{#2}
+ {\hbox{\gotolocation{#2}{\copy0}}}
+ {\unknownreference{#2}%
+ \hbox{\copy0}}%
+ \egroup}
+
+\newcounter\referencecounter
+
+\def\doreferentielijstelement#1#2#3#4#5%
+ {\doiftoclevelelse[#4]
+ {\getvalue{\??rl#1\c!voor}%
+ \referentiebutton%
+ {\getvalue{\??rl#1\c!commando}{#3}%
+ \paginareferentie[\r!to#2]}%
+ [\r!from#2]%
+ \global\utilitydonetrue
+ \getvalue{\??rl#1\c!na}}
+ {}}
+
+\def\doplaatsreferentielijst[#1][#2]%
+ {\begingroup
+% \let\doschrijfnaarreferentielijst=\gobblethreearguments
+ \stelreferentielijstin[#1][#2,\c!status=\v!stop]%
+ \getfromcommalist[#1][1]%
+ \dosettoclevel{\getvalue{\??rl\commalistelement\c!criterium}}%
+ \doutilities{#1}{\jobname}{#1}{}{\par}%
+ \endgroup}
+
+\def\plaatsreferentielijst%
+ {\dodoubleempty\doplaatsreferentielijst}
+
+\def\doschrijfnaarreferentielijst#1#2#3%
+ {\doifvalue{\??rl#1\c!status}{\v!start}
+ {\begingroup
+ \makesectionformat
+ \doifelse{\@@nmstatus}{\v!start}
+ {\def\dopaginanummer{\noexpand\paginanummer}}
+ {\def\dopaginanummer{0}}%
+ \edef\schrijfwegnaarlijst%
+ {\writeutilitycommand%
+ {\referencelistentry%
+ {#1}% tag
+ {#2}% number
+ {#3}% data
+ {\sectionformat::\dopaginanummer}%
+ {\noexpand\realfolio}}}%
+ \schrijfwegnaarlijst
+ \endgroup}}
+
+\def\schrijfnaarreferentielijst[#1]#2#3% #1=class #2=data #3=visualization
+ {\doifelsevalue{\??rl#1\c!status}{\v!start}
+ {\referentiebutton%
+ {#3%
+ \doglobal\increment\referencecounter
+ \paginareferentie[\r!from\referencecounter]%
+ \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
+ [\r!to\referencecounter]}
+ {#3}}
+
+\def\referencelistentry#1%
+ {\executeifdefined{#1\c!lijst}\gobblefourarguments}
+
+\def\dodosetreferentielijst#1%
+ {\setvalue{#1\c!lijst}{\doreferentielijstelement{#1}}}
+
+\def\dodoresetreferentielijst#1%
+ {\setvalue{#1\c!lijst}{\gobblefourarguments}}
+
+\def\dodefinieerreferentielijst[#1][#2]%
+ {\stelreferentielijstin[#1]
+ [\c!commando=,
+ \c!status=\v!start,
+ \c!criterium=\v!alles,
+ \c!voor=,
+ \c!na=,
+ #2]
+ \setcounter{#1}{0}%
+ \addutilityreset{#1}%
+ \setvalue{\s!set#1}%
+ {\dodosetreferentielijst{#1}}%
+ \setvalue{\s!reset#1}%
+ {\dodoresetreferentielijst{#1}}}
+
+\def\definieerreferentielijst%
+ {\dodoubleempty\dodefinieerreferentielijst}
+
+\def\dostelreferentielijstin[#1][#2]%
+ {\getparameters[\??rl#1][#2]}
+
+\def\stelreferentielijstin%
+ {\dodoubleempty\dostelreferentielijstin}
+
+%I n=Inhoudsopgave
+%I c=\volledigeinhoud,\plaatsinhoud
+%I c=\stelinhoudin
+%I
+%I Er kan een inhoudsopgave worden opgeroepen met:
+%I
+%I \plaatsinhoud
+%I \volledigeinhoud
+%I
+%I De wijze waarop de inhoudsopgave wordt aangemaakt wordt
+%I ingesteld met:
+%I
+%I \stelinhoudin[instellingen]
+%I
+%I De instellingen komen overeen met de van lijsten.
+%P
+%I Een inhoudsopgave is een zogenaamde samengestelde lijst.
+%I Op termijn komt het mechanisme van samengestelde lijsten
+%I ook voor de gebruiker beschikbaar. Vooralsnog werkt het
+%I achter de schermen.
+%I
+%I De commando's zijn slim genoeg om meestal automatisch de
+%I juiste lijsten te genereren. Men kan echter met 'criterium'
+%I het niveau specificeren. Met 'niveau' geeft men aan tot welk
+%I niveau de inhoudsopgave moet worden weergegeven.
+
+\def\dostelsamengesteldelijstin[#1][#2]%
+ {\getparameters[\??ih#1][#2]%
+ \ExpandFirstAfter\stellijstin[\getvalue{\??ih#1\c!lijst}][#2]}
+
+\def\stelsamengesteldelijstin%
+ {\dodoubleargument\dostelsamengesteldelijstin}
+
+\def\doplaatssamengesteldelijst[#1][#2]%
+ {\begingroup
+ \getparameters[\??ih#1][#2]%
+ \dosettoclevel{\getvalue{\??ih#1\c!criterium}}%
+ \edef\samengesteldelijst{\getvalue{\??ih#1\c!lijst}}% om voorlopig nog
+ \stripspaces\from\samengesteldelijst\to\samengesteldelijst % compatible te
+ \ExpandFirstAfter\doifnumberelse{\getvalue{\??ih#1\c!niveau}}% blijven
+ {\!!counta=\getvalue{\??ih#1\c!niveau}% met de vorige implementatie
+ \advance\!!counta by 1\relax% accepteren we ook nummers (0==deel)
+ \getfromcommacommand[\samengesteldelijst][\!!counta]%
+ \edef\maximumlijst{\commalistelement}}%
+ {\edef\maximumlijst{\getvalue{\??ih#1\c!niveau}}}%
+ \!!counta=\getvalue{\??se\getvalue{\??ko\maximumlijst \c!sectie}\c!niveau}%
+ \let\!!stringa=\samengesteldelijst
+ \let\samengesteldelijst=\empty
+ \def\docommando##1%
+ {\ifnum\getvalue{\??se\getvalue{\??ko##1\c!sectie}\c!niveau}>\!!counta
+ \else
+ \addtocommalist{##1}\samengesteldelijst
+ \fi}%
+ \processcommacommand[\!!stringa]\docommando
+ \doifvalue{\??ih#1\c!koppeling}{\v!aan}
+ {\startlistreferences{#1}}%
+ \ExpandFirstAfter\dodoplaatssamengesteldelijst[\samengesteldelijst][#2]%
+ \stoplistreferences{#1}%
+ \endgroup}
+
+\def\dodoplaatssamengesteldelijst[#1][#2]%
+ {\startopelkaar[\v!blanko]%
+ \dostellijstin[#1][#2]%
+ \doutilities{#1}{\jobname}{#1}{}{\par}%
+ \stopopelkaar}
+
+\def\dovolledigesamengesteldelijst[#1][#2]%
+ {\systemsuppliedtitle[#1]{\headtext{#1}}%
+ \doplaatssamengesteldelijst[#1][#2]}
+
+\def\dodefinieersamengesteldelijst[#1][#2][#3]%
+ {\setvalue{\??ih#1\c!lijst}{#2}%
+ \getcommalistsize[#2]%
+ \getfromcommalist[#2][\commalistsize]%
+ \doeassign[\??ih#1][\c!niveau=\commalistelement]%
+ \getparameters
+ [\??ih#1]
+ [\c!criterium=\v!lokaal,
+ #3]%
+ \setvalue{\e!stel#1\e!in}%
+ {\dodoubleempty\dostelsamengesteldelijstin[#1]}%
+ \setvalue{\e!plaats#1}%
+ {\dodoubleempty\doplaatssamengesteldelijst[#1]}%
+ \setvalue{\e!volledige#1}%
+ {\dodoubleempty\dovolledigesamengesteldelijst[#1]}}
+
+\def\definieersamengesteldelijst%
+ {\dotripleempty\dodefinieersamengesteldelijst}
+
+%I n=Synoniemen
+%I c=\definieersynoniemen,\stelsynoniemenin
+%I
+%I Er kunnen meerdere lijsten worden gedefinieerd door middel
+%I van het commando:
+%I
+%I \definieersynoniemen[naam][namen][commando]
+%I
+%I Na dit commando zijn de volgende commando's beschikbaar:
+%I
+%I \naam{tekst}{synoniem}
+%I \commando{tekst}
+%I \volledigelijstmetnamen
+%I \plaatslijstmetnamen
+%P
+%I De commando's rond de lijst met afkortingen zijn gedefinieerd
+%I met de waarden: [afkorting][afkortingen][\voluit]. Beschikbare
+%I commando's zijn dus:
+%I
+%I \afkorting{afkorting}{betekenis}
+%I \voluit{afkorting}
+%I \volledigelijstmetafkortingen
+%I \plaatslijstmetafkortingen
+%I
+%I De betekenis kan worden opgeroepen met \voluit{afkorting}.
+%P
+%I De wijze van zetten kan worden ingesteld met het commando:
+%I
+%I \stelsynoniemenin[naam][synoniemletter=,tekstletter=,
+%I status=,plaats=,breedte=,criterium=,conversie=,
+%I expansie=]
+%I
+%I Als de status 'stop' is, dan worden geen synoniemen naar
+%I de lijst weggeschreven. Als het criterium 'alles' is,
+%I dan worden alle synoniemen in het overzicht opgenomen, zoniet,
+%I dan worden alleen gebruikte synoniemen opgenomen. Omdat
+%I standaard 'conversie' op 'nee' staat, worden afkortingen
+%I getoond.
+%P
+%I In principe is een synoniem pas beschikbaar als het is
+%I gedefinieerd. Het is echter mogelijk synoniemen te laden,
+%I mits de tekst tenminste eenmaal is verwerkt. Het is dus
+%I mogelijk synoniemen op te roepen die pas later worden
+%I gedefinieerd. Alleen de omschrijvingen zijn beschikbaar,
+%I dus niet de commando's (doordenkertje). Het laden vindt
+%I plaats met:
+%I
+%I \laadnamen
+%I
+%I of, zoals bij afkortingen:
+%I
+%I \laadafkortingen
+
+% Formaat tex-utility-input-file <jobname.tui>:
+%
+% synonym entry {tag} {pure} {text} {synonym}
+%
+% Deze file wordt met het programma TeXUtil omgezet in een
+% in te lezen TeXFile met de commando's:
+%
+% \synonymentry {tag} {pure} {text} {synonym}
+
+\newif\ifsynonymmeaning
+
+\def\dostelsynoniemenin[#1][#2]%
+ {\getparameters[\??sm#1][#2]}
+
+\def\stelsynoniemenin%
+ {\dodoubleargument\dostelsynoniemenin}
+
+\def\doresetsynonym#1%
+ {\letvalue{#1\s!entry}=\gobblethreearguments}
+
+\def\dohandlesynonymentry#1#2#3%
+ {\bgroup
+ \syndef
+ {\doattributes{\??sm#1\c!tekst}{#2}}
+ \ConvertToConstant\doifelse{#3}{}{\onbekend}{#3}
+ \par
+ \egroup}
+
+\def\synonymentry#1%
+ {\executeifdefined{#1\s!entry}\gobblethreearguments}
+
+\def\dosetsynonym#1%
+ {\doifdefinedelse{\??sm#1\c!commando}
+ {\global\utilitydonetrue
+ \setvalue{#1\s!entry}{\getvalue{\??sm#1\c!commando}}}
+ {\global\utilitydonetrue
+ \setvalue{#1\s!entry}{\dohandlesynonymentry}}%
+ \doordefinieren
+ [syndef]
+ [\c!plaats=\synplaats,
+ \c!breedte=\synbreedte,
+ \c!kopletter=,
+ \c!voor=,
+ \c!tussen=,
+ \c!na=]}
+
+\def\doplaatslijstmetsynoniemen#1#2%
+ {\witruimte
+ \begingroup
+ \def\currentsynonym{#1}%
+ \def\synplaats{\getvalue{\??sm#1\c!plaats}}%
+ \def\synbreedte{\getvalue{\??sm#1\c!breedte}}%
+ \stelwitruimtein[\v!geen]%
+ \doutilities{#1}{\jobname}{#2}{}{\par}%
+ \endgroup
+ \ifutilitydone\else\geenwitruimte\fi}
+
+\def\dovolledigelijstmetsynoniemen#1#2%
+ {\plaatsvolledig
+ {\systemsuppliedchapter}{#1}{\headtext{#2}}%
+ {\doplaatslijstmetsynoniemen{#1}{#2}}}
+
+\def\processsynonym#1#2#3%
+ {\begingroup % anders in mathmode lege \hbox, zie eenheden
+ \ifsynonymmeaning
+ \doattributes{\??sm#1\c!synoniem}{\synonymmeaningfalse#3}%
+ \else
+ \explicithmode
+ \doattributes{\??sm#1\c!tekst}{#2}%
+ \fi
+ \endgroup}
+
+\def\getsynonymmeaning#1#2%
+ {\doifdefinedelse{#2}
+ {{\synonymmeaningtrue\getvalue{#2}}}
+ {\showmessage{\m!systems}{18}{#1,#2}}}
+
+\def\dowritesynonym#1#2#3#4%
+ {\begingroup % anders in mathmode lege \hbox
+ \doifelsevalue{\??sm#1\c!expansie}{\v!ja}
+ {\immediate\write\uti{s e {#1} {#2} {#3} {#4}}}
+ {\convertargument#3\to\asciia
+ \convertargument#4\to\asciib
+ \immediate\write\uti{s e {#1} {#2} {\asciia} {\asciib}}}%
+ \endgroup}
+
+\def\preexecutesynonym#1#2#3#4%
+ {\ifdoinpututilities \else
+ \dowritesynonym{#1}{#2}{#3}{#4}%
+ \setgvalue{#2}{\donottest\processsynonym{#1}{#3}{#4}}%
+ \fi}
+
+\def\executesynonym#1#2#3#4%
+ {\preexecutesynonym{#1}{#2}{#3}{#4}%
+ \processsynonym{#1}{#3}{#4}}
+
+\def\expandsynonym#1#2#3#4%
+ {{\synonymmeaningtrue
+ \processsynonym{#1}{#3}{#4}}}
+
+\def\dodoloadsynonym#1#2#3#4%
+ {\setgvalue{#2}{\executesynonym{#1}{#2}{#3}{#4}}}
+
+\def\doloadsynonym#1%
+ {\setvalue{#1\s!entry}##1##2##3%
+ {\doifelsenothing{##1}
+ {\dodoloadsynonym{#1}{##2}{##2}{##3}}
+ {\dodoloadsynonym{#1}{##1}{##2}{##3}}%
+ \global\utilitydonetrue}}
+
+\def\dolaadsynoniemen#1#2%
+ {\bgroup
+ \let\dosetsynonym=\doloadsynonym
+ \showmessage{\m!systems}{19}{#2}%
+ \doutilities{#1}{\jobname}{}{}{}%
+ \egroup
+ \setvalue{\s!check#1}##1{}}
+
+\def\dodocomplexsynonym[#1][#2]#3#4%
+ {\getvalue{\s!check#1}{#2}%
+ \doifelsevalue{\??sm#1\c!conversie}{\v!ja}
+ {\setgvalue{#2}{\geentest\expandsynonym{#1}{#2}{#3}{#4}}}
+ {\doifelsevalue{\??sm#1\c!status}{\v!start}
+ {\doifelsevalue{\??sm#1\c!criterium}{\v!alles}
+ {\preexecutesynonym{#1}{#2}{#3}{#4}}
+ {\setgvalue{#2}{\donottest\executesynonym{#1}{#2}{#3}{#4}}}}
+ {\setgvalue{#2}{\donottest\processsynonym{#1}{#3}{#4}}}}}
+
+\def\docomplexsynonym[#1][#2][#3]#4#5%
+ {\ifthirdargument
+ \dodocomplexsynonym[#2][#1#3]{#4}{#5}%
+ \else
+ \dodocomplexsynonym[#2][#1#4]{#4}{#5}%
+ \fi}
+
+\def\dodefinieersynoniemen[#1][#2][#3][#4]%
+ {\stelsynoniemenin
+ [#1]
+ [\c!synoniemletter=,
+ \c!tekstletter=,
+ \c!status=\v!start,
+ \c!plaats=\v!links,
+ \c!criterium=,
+ \c!breedte=5em]%
+ \presetheadtext
+ [#2=\Woord{#2}]%
+ \setvalue{\e!stel#2\e!in}%
+ {\dodoubleargument\getparameters[\??sm#1]}%
+ \iffourthargument
+ \def#4##1%
+ {\geentest\getsynonymmeaning{#1}{\??sm:#1:##1}}%
+ \def#3##1%
+ {\geentest\getvalue{\??sm:#1:##1}}%
+ \setvalue{#1}%
+ {\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}%
+ \else
+ \def#3##1%
+ {\geentest\getsynonymmeaning{#1}{##1}}%
+ \setvalue{#1}%
+ {\dotripleempty\docomplexsynonym[][#1]}%
+ \fi
+ \setvalue{\s!set#1}%
+ {\dosetsynonym{#1}}%
+ \setvalue{\s!reset#1}%
+ {\doresetsynonym{#1}}%
+ \setvalue{\s!check#1}##1%
+ {\checkdefined{synoniemen}{#1}{##1}}%
+ \addutilityreset{#1}%
+ \setvalue{\e!laad#2}%
+ {\dolaadsynoniemen{#1}{#2}}%
+ \setvalue{\e!plaats\e!lijstmet#2}%
+ {\doplaatslijstmetsynoniemen{#1}{#2}}%
+ \setvalue{\e!volledige\e!lijstmet#2}%
+ {\dovolledigelijstmetsynoniemen{#1}{#2}}}
+
+\def\definieersynoniemen%
+ {\doquadrupleempty\dodefinieersynoniemen}
+
+%I n=Sorteren
+%I c=\definieersorteren,\stelsorterenin
+%I
+%I Sorteren is een vereenvoudigde variant van 'synoniemen':
+%I
+%I \definieersorteren[naam][namen]
+%I
+%I Na dit commando zijn de volgende commando's beschikbaar:
+%I
+%I \naam{tekst}
+%I \volledigelijstmetnamen
+%I \plaatslijstmetnamen
+%P
+%I De wijze van zetten kan worden ingesteld met het commando:
+%I
+%I \stelsorterenin[naam][status=,commando=,voor=,na=,
+%I letter=,criterium=,expansie=]
+%I
+%I Met 'commando' kan met een bewerking uitvoeren op de
+%I onderdelen van een lijst.
+%I
+%I Als de status 'stop' is, dan worden geen sorteringen naar
+%I de lijst weggeschreven. Als het criterium 'alles' is,
+%I dan worden alle sorteringen in het overzicht opgenomen,
+%I zoniet, dan worden alleen gebruikte opgenomen.
+%P
+%I In principe is een item pas beschikbaar als het is
+%I gedefinieerd. Het is echter mogelijk items te laden,
+%I mits de tekst tenminste eenmaal is verwerkt. Het is dus
+%I mogelijk items op te roepen die pas later worden
+%I gedefinieerd.
+%I
+%I \laadnamen
+%I
+%I of, zoals bij logo's:
+%I
+%I \laadlogos
+%I
+%I Bij een eerste run zijn de commando's nog niet
+%I beschikbaar. Een logo kan dus het best worden opgeroepen
+%I met: \naam{...}, bijvoorbeeld \naam{PRAGMA} in plaats van
+%I \PRAGMA.
+
+% Formaat tex-utility-input-file <jobname.tui>:
+%
+% synonym entry {tag} {pure} {text} {}
+%
+% Deze file wordt met het programma TeXUtil omgezet in een
+% in te lezen TeXFile met de commando's:
+%
+% \synonymentry {tag} {pure} {text} {}
+
+\def\dostelsorterenin[#1][#2]%
+ {\getparameters[\??so#1][#2]}
+
+\def\stelsorterenin%
+ {\dodoubleargument\dostelsorterenin}
+
+\def\doresetsorteren#1%
+ {\letvalue{#1\s!entry}=\gobblethreearguments}
+
+\def\dosetsorteren#1%
+ {\setvalue{#1\s!entry}##1##2##3%
+ {\def\dowritesort####1####2####3{}%
+ \global\utilitydonetrue
+ \bgroup
+ \doifdefinedelse{\??so#1\c!commando}
+ {\getvalue{\??so#1\c!commando}{##2}}
+ {\getvalue{\??so#1\c!voor}%
+ \doattributes{\??so#1}{##2}%
+ \getvalue{\??so#1\c!na}}%
+ \egroup}}
+
+\def\doplaatslijstmetsorteren#1% NOG EEN RUWE VERSIE MAKEN
+ {\witruimte % ZONDER WITRUIMTE ETC ETC
+ \begingroup
+ \stelwitruimtein[\v!geen]%
+ \doutilities{#1}{\jobname}{#1}{}{\par}%
+ \endgroup
+ \ifutilitydone\else\geenwitruimte\fi}
+
+\def\dovolledigelijstmetsorteren#1#2%
+ {\plaatsvolledig
+ {\systemsuppliedchapter}{#1}{\headtext{#2}}
+ {\doplaatslijstmetsorteren{#1}}}
+
+\def\processsort#1#2#3%
+ {\explicithmode
+ \bgroup
+ \doattributes{\??so#1}{#2}%
+ \egroup}
+
+\def\dowritesort#1#2#3%
+ {\bgroup
+ \doifelsevalue{\??so#1\c!expansie}{\v!ja}
+ {\immediate\write\uti{s e {#1} {#2} {#3} {}}}
+ {\convertargument#3\to\asciia
+ \immediate\write\uti{s e {#1} {#2} {\asciia} {}}}%
+ \egroup}
+
+\def\synonymentry#1%
+ {\executeifdefined{#1\s!entry}\gobblethreearguments}
+
+\def\preexecutesort#1#2#3%
+ {\ifdoinpututilities \else
+ \dowritesort{#1}{#2}{#3}%
+ \setgvalue{#2}{\donottest\processsort{#1}{#3}{#2}}%
+ \fi}
+
+\def\executesort#1#2#3%
+ {\preexecutesort{#1}{#2}{#3}%
+ \processsort{#1}{#3}{#2}}
+
+\def\doloadsort#1%
+ {\setvalue{#1\s!entry}##1##2##3%
+ {\setgvalue{##1}{##2}%
+ \global\utilitydonetrue}}
+
+\def\dolaadsorteren#1#2%
+ {\bgroup
+ \let\dosetsorteren=\doloadsort
+ \showmessage{\m!systems}{20}{#2}%
+ \doutilities{#1}{\jobname}{}{}{}%
+ \egroup
+ \setvalue{\s!check#1}##1{}}
+
+\def\dodocomplexsort[#1][#2]#3%
+ {\getvalue{\s!check#1}{#2}%
+ \doifelsevalue{\??so#1\c!status}{\v!start}
+ {\doifelsevalue{\??so#1\c!criterium}{\v!alles}
+ {\preexecutesort{#1}{#2}{#3}}
+ {\setgvalue{#2}{\donottest\executesort{#1}{#2}{#3}}}}
+ {\setgvalue{#2}{\donottest\processsort{#1}{#3}{#2}}}}
+
+\def\docomplexsort[#1][#2][#3]#4%
+ {\ifthirdargument
+ \dodocomplexsort[#2][#1#3]{#4}
+ \else
+ \dowritesort{#2}{#4}{#4}%
+ \fi}
+
+\def\dodefinieersorteren[#1][#2][#3]%
+ {\getparameters[\??so#1]
+ [\c!commando=,
+ \c!status=\v!start,
+ \c!criterium=,
+ \c!letter=,
+ \c!voor=,
+ \c!na=\endgraf]%
+ \presetheadtext[#2=\Woord{#2}]%
+ \setvalue{\e!stel#2\e!in}[##1]%
+ {\getparameters[\??so#1][##1]}%
+ \ifthirdargument
+ \def#3##1%
+ {\getvalue{\??so:#1:##1}}
+ \setvalue{#1}%
+ {\dotripleempty\docomplexsort[\??so:#1:][#1]}%
+ \else
+ \setvalue{#1}%
+ {\dotripleempty\docomplexsort[][#1]}%
+ \fi
+ \setvalue{\s!set#1}%
+ {\dosetsorteren{#1}}%
+ \setvalue{\s!reset#1}%
+ {\doresetsorteren{#1}}%
+ \addutilityreset{#1}%
+ \setvalue{\e!laad#2}%
+ {\dolaadsorteren{#1}{#2}}%
+ \setvalue{\s!check#1}##1%
+ {\checkdefined{sorteren}{#1}{##1}}%
+ \setvalue{\e!plaats\e!lijstmet#2}%
+ {\doplaatslijstmetsorteren{#1}}%
+ \setvalue{\e!volledige\e!lijstmet#2}%
+ {\dovolledigelijstmetsorteren{#1}{#2}}}
+
+\def\definieersorteren%
+ {\dotripleempty\dodefinieersorteren}
+
+%I n=Afkortingen
+%I c=\afkorting,\volledigelijstmetafkortingen
+%I
+%I Een afkorting wordt gedefinieerd met:
+%I
+%I \afkorting{afkorting}{betekenis}
+%I
+%I en opgeroepen met:
+%I
+%I \voluit{afkorting}
+%I
+%I Een lijst met afkortingen wordt gegenereerd met:
+%I
+%I \plaatslijstmetafkortingen
+%I \volledigelijstmetafkortingen
+
+%T n=afkorting
+%T m=afk
+%T a=a
+%T
+%T \afkorting {?} {}
+
+%I n=Eenheden
+%I c=\eenheid,\betekenis,\wiskunde
+%I
+%I Een afkorting wordt gedefinieerd met:
+%I
+%I \eenheid [eenheid] {dimensie} {betekenis}
+%I
+%I en opgeroepen met:
+%I
+%I \betekenis {eenheid}
+%I
+%I Een voorbeeld van een definitie is:
+%I
+%I \eenheid [KUUB] {m^3} {inhoud}
+%I
+%I Een lijst met eenheden wordt gegenereerd met:
+%I
+%I \plaatslijstmeteenheden
+%I \volledigelijstmeteenheden
+%P
+%I Aanvullend zijn twee commando's beschikbaar die worden
+%I gebruikt bij het zetten van eenheden:
+%I
+%I \wiskunde{wiskundige commando's}
+%I \dimensie{wiskundige eenheid}
+%I
+%I Het eerste commando maakt $ binnen $ mogelijk, het
+%I laatste commando handelt ook de spatiering af.
+%I
+%I Een teveel aan spatiering kan ongedaan worden voorkomen
+%I met:
+%I
+%I \geendimensie{wiskundige eenheid}
+
+% documenteren \bmath ..\emath
+
+\def\bmath%
+ {\begingroup
+ \ifmmode
+ \let\emath=\endgroup
+ \else
+ $\def\emath{$\endgroup}%
+ \fi}
+
+\def\mathematics#1% % \bmath ...\emath kan ook maar
+ {\ifmmode#1\else$#1$\fi} % dit alternatief scheelt grouping
+
+\def\dimensionsignal{0.000058pt}
+
+\def\dimension#1%
+ {\def\dodimensionsignal{\kern\dimensionsignal}%
+ \ifdim\lastskip=\!!zeropoint\relax
+ \ifdim\lastkern=\!!zeropoint\relax
+ \ifmmode
+ \mathematics{\,\,\tf#1}%
+ \else
+ \mathematics{\tf#1}%
+ \fi
+ \else\ifdim\lastkern=\dimensionsignal
+ \mathematics{\,\tf#1}%
+ \else
+ \unkern\mathematics{\,\,\tf#1}%
+ \fi\fi
+ \else
+ \unskip\mathematics{\,\,\tf#1}%
+ \fi
+ \dodimensionsignal}
+
+\def\nodimension#1%
+ {\unskip#1\gdef\dodimensionsignal{}}
+
+%I n=Registers
+%I c=\definieerregister,\stelregisterin
+%I c=\volledigregister,\plaatsregister
+%I
+%I Er kunnen registers worden gedefinieerd met het commando:
+%I
+%I \definieerregister[naam][namen]
+%I
+%I Vanaf dat moment zijn de volgende commando's beschikbaar:
+%I
+%I \naam[ascii]{ingang+ingang+ingang}
+%I \zienaam[ascii]{ingang+ingang+ingang}{andere ingang}
+%I \plaatsnaam
+%I \volledigenaam
+%I
+%I of
+%I
+%I \plaatsregister[naam]
+%I \volledigregister[naam]
+%I
+%I De commando's rond de standaard index zijn gedefinieerd
+%I met de waarden: [index][indices]
+%P
+%I In de tekst dient een registerverwijzing voor het woord
+%I te staan, dus: we verwijzen naar \index{woord}woord.
+%I
+%I Bij koppen daarentegen plaatsen we \index na de kop:
+%I
+%I \subparagraaf{dat is dat}
+%I \index{ziezo}
+%I
+%I ........... tekst .....
+%I
+%I of
+%I
+%I \margewoord{ziezo}
+%I \index{ziezo}
+%I
+%I ........... tekst .....
+%I
+%I Ongewenste spaties na \index worden verwijderd! Wil men
+%I dus een spatie, dan moet dit worden afgedwongen met \ .
+%P
+%I Mocht het hierboven beschreven mechanisme interfereren
+%I met andere mechanismen, dan kan ook het volgende commando
+%I worden gebruikt:
+%I
+%I \schrijfnaarregister[naam][ascii]{ingang+ingang+ingang}
+%I
+%I waarbij [ascii] optioneel is.
+%P
+%I De registers kunnen worden ingesteld met het commando:
+%I
+%I \stelregisterin[naam][letter=,aanduiding=,n=,
+%I balanceren=,uitlijnen=,criterium=,afstand=,symbool=,
+%I expansie=]
+%I
+%I waarbij 'aanduiding' betrekking heeft op het al dan niet
+%I plaatsen van een letter ('ja' of 'nee') en 'letter' op de
+%I weergave van de letter.
+%I
+%I Met 'criterium' kan een subindex worden opgeroepen,
+%I bijvoorbeeld 'deel' of 'hoofdstuk', of als het niveau
+%I onbekend is: 'lokaal'. Standaard wordt een volledige index
+%I gegenereerd ('alles').
+%I
+%I In plaats van een paginanummer kan een symbool worden
+%I gezet: n (1,2,3,..), a (a,b,c,..), 1 (bolletjes) en
+%I 2 (rechthoekjes). Een symbool heeft alleen zin bij
+%I interactieve teksten.
+%I
+%I Voor eigen gebruik is \ifregistergeplaatst beschikbaar.
+%P
+%I In plaats van een + als scheider kan ook & worden
+%I gebruikt. Bovendien kan als eerste karakter worden opgegeven
+%I wat de scheider is:
+%I
+%I \index[abcformule]{&formule&$ax^2+bx+c$}
+%I
+%I Overigens gaat de & voor de +, zodat hier de specificatie
+%I niet per se nodig is. Let wel: dit is een kenmerk van
+%I texutil, en niet zozeer van ConTeXt.
+
+% Formaat tex-utility-input-file <jobname.tui>:
+%
+% i e {tag} {loc} {pure} {entry+..} {p:c:p:sp:ssp=>page} {realpage}
+% i s {tag} {loc} {pure} {entry+..} {other entry}
+%
+% In plaats van + kan een & worden gebruikt. Ook kan als
+% eerste karakter worden opgegeven wat de scheider is.
+%
+% Deze file wordt met het programma TeXUtil omgezet in
+% een in te lezen TeXFile met de commando's:
+%
+% \registerentrya {tag} {ingang}
+% \registerentryb {tag} {subingang}
+% \registerentryc {tag} {subsubingang}
+%
+% \registerpage {tag} {volgnummer} {paginanummer} {volgnummer}
+%
+% \registersee {tag} {andere ingang}
+%
+% \registerentry {tag} {letter}
+
+\def\dostelregisterin[#1][#2]%
+ {\getparameters[\??id#1][#2]%
+ \preparepaginaprefix{\??id#1}}
+
+\def\stelregisterin%
+ {\dodoubleargumentwithset\dostelregisterin}
+
+\def\getlastregisterentry#1%
+ {\def\docommando##1%
+ {\def\!!stringa{##1}}%
+ \processconcanatedlist[#1][+]\docommando
+ \!!stringa}
+
+\def\doprocessregister[#1]#2%
+ {\begingroup
+ \thisisnextinternal{\s!ind}%
+ \ifduplicate\getlastregisterentry{#2}\fi
+ \doifelsevalue{\??id\currentregister\c!expansie}{\v!ja}
+ {\edef\ascii{#2}}
+ {\convertargument#2\to\ascii}%
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\write\uti%
+ {r e %
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\ascii} %
+ {\sectionformat::\noexpand\paginanummer} %
+ {\noexpand\realfolio}}}%
+ \schrijfwegnaarregister
+ \getfirstcharacter\currentregister
+ \registerinfo{> \firstcharacter}{#2}%
+ \endgroup}
+
+\def\complexdoregister[#1]#2%
+ {\doprocessregister[#1]{#2}%
+ \ifvmode\nobreak\fi
+ \GotoPar}
+
+\def\doregister#1%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty{doregister}}
+
+\def\complexdozieregister[#1]#2#3%
+ {\begingroup
+ \thisisnextinternal{\s!ind}%
+ \ifduplicate\getlastregisterentry{#2}\fi
+ \doifelsevalue{\??id\currentregister\c!expansie}{\v!ja}
+ {\edef\ascii{#2}}
+ {\convertargument#2\to\ascii}%
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\write\uti%
+ {r s %
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\ascii} %
+ {#3} %
+ {\sectionformat}}}%
+ \schrijfwegnaarregister
+ \endgroup
+ \registerinfo{> zie}{#2}%
+ \GotoPar}
+
+\def\dozieregister#1%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty{dozieregister}}
+
+\def\doschrijfnaarregister[#1]% % de twee-traps-aanroep is nodig
+ {\edef\currentregister{#1}% % om gebruik van \ExpandBothAfter
+ \doprocessregister} % mogelijk te maken
+
+\def\schrijfnaarregister%
+ {\dodoubleempty\doschrijfnaarregister}
+
+\def\ifregistergeplaatst{\ifutilitydone}
+
+\newif\iffirstregisterpage
+
+\def\c!entrya{}
+\def\c!entryb{}
+\def\c!entryc{}
+
+\def\nextregisterpage%
+ {\iffirstregisterpage
+ \doglobal\newcounter\registerpagenumber
+ \fi
+ \doglobal\increment\registerpagenumber}
+
+\def\doregisterpagelocation#1%
+ {\nextregisterpage
+ \hbox to 1em{\hss#1\hss}}
+
+\def\setregisterpage#1%
+ {\let\registerpageseparator=\relax
+ \processaction
+ [\getvalue{\??id#1\c!symbool}]
+ [ \c!n=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{\sl\registerpagenumber}\/}},
+ \c!a=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{\sl\character{\registerpagenumber}\/}}},
+ 1=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{$\bullet$}}},
+ 2=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint}}},
+ \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbool}}%
+ \def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{\registerpagesymbol}}},
+ \s!default=>{\def\registerpageseparator%
+ {{\sl,}}%
+ \def\doregisterpage##1[##2]%
+ {{\strut\sl\paginaprefix{\??id##1}[##2]\translatednumber[##2]}}}]}
+
+\def\doresetregister#1%
+ {\letvalue{#1\s!entrya}=\gobbleoneargument
+ \letvalue{#1\s!entryb}=\gobbleoneargument
+ \letvalue{#1\s!entryc}=\gobbleoneargument
+ \letvalue{#1\s!see}=\gobbletwoarguments
+ \letvalue{#1\s!page}=\gobblethreearguments
+ \letvalue{#1\s!entry}=\gobbleoneargument}
+
+\def\registerentrya#1{\executeifdefined{#1\s!entrya}\gobbleoneargument}
+\def\registerentryb#1{\executeifdefined{#1\s!entryb}\gobbleoneargument}
+\def\registerentryc#1{\executeifdefined{#1\s!entryc}\gobbleoneargument}
+\def\registersee #1{\executeifdefined{#1\s!see}\gobbletwoarguments}
+\def\registerpage #1{\executeifdefined{#1\s!page}\gobblethreearguments}
+\def\registerentry #1{\executeifdefined{#1\s!entry}\gobbleoneargument}
+
+\newif\iffirstsubentry
+\newif\iffirstsubsubentry
+
+\newcounter\currententrylevel
+
+\def\dosetpageregister#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \setvalue{#1\s!entrya}##1%
+ {\edef\currententrylevel{1}%
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \gdef\c!entrya%
+ {\global\firstregisterpagetrue
+ \endgraf
+ \hangindent1em\noindent
+ \dohandleregisterentry{##1}%
+ \global\firstsubentrytrue
+ \global\firstsubsubentrytrue}}%
+ \setvalue{#1\s!entryb}##1%
+ {\edef\currententrylevel{2}%
+ \global\let\c!entryc=\relax
+ \global\def\c!entryb%
+ {\global\firstregisterpagetrue
+ \endgraf
+ \iffirstsubentry\nobreak\fi
+ \hangindent2em\noindent\hskip1em\relax
+ \dohandleregisterentry{##1}%
+ \global\firstsubentryfalse
+ \global\firstsubsubentrytrue}}%
+ \setvalue{#1\s!entryc}##1%
+ {\edef\currententrylevel{3}%
+ \gdef\c!entryc%
+ {\global\firstregisterpagetrue
+ \endgraf
+ \iffirstsubsubentry\nobreak\fi
+ \hangindent3em\noindent\hskip2em\relax
+ \dohandleregisterentry{(##1)}%
+ \global\firstsubsubentryfalse}}%
+ \setvalue{#1\s!page}##1##2##3%
+ {\doifreglevelelse[##2]
+ {\global\utilitydonetrue
+ \c!entryletter
+ \def\dohandleregisterentry####1%
+ {\bgroup
+ \if!!donea
+ \setbox0=\hbox{\showlocation{\getvalue{\??id#1\c!tekstcommando}{####1}}}%
+ \gotonextinternal{\s!ind}{##1}{\copy0}{##3}%
+ \else
+ \getvalue{\??id#1\c!tekstcommando}{####1}%
+ \fi
+ \egroup
+ \!!doneafalse}%
+ \!!doneafalse
+ \doifelsevalue{\??id#1\c!interactie}{\v!tekst}
+ {\ifcase\currententrylevel
+ \or
+ \!!doneatrue\c!entrya\c!entryb\c!entryc
+ \or
+ \c!entrya\!!doneatrue\c!entryb\c!entryc
+ \or
+ \c!entrya\c!entryb\!!doneatrue\c!entryc
+ \fi}
+ {\c!entrya\c!entryb\c!entryc}%
+ \global\let\c!entrya=\relax
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \global\let\c!entryletter=\relax
+ \iffirstregisterpage
+ \expandafter\hskip\getvalue{\??id#1\c!afstand}\relax
+ \else
+ \registerpageseparator % || Moet anders
+ |\spatie|\relax % \relax needed because | looks ahead
+ \fi
+ \doifelsevalue{\??id#1\c!interactie}{\v!paginanummer}
+ {\bgroup
+ \setbox0=\hbox{\showlocation{\doregisterpage{#1}[##2]}}%
+ \gotonextinternal{\s!ind}{##1}{\copy0}{##3}%
+ \egroup}
+ {\hbox{\doregisterpage{#1}[##2]}}%
+ \ignorespaces
+ \global\firstregisterpagefalse}
+ {}}%
+ \setvalue{#1\s!see}##1##2%
+ {\doifreglevelelse[##2::0]
+ {{\global\utilitydonetrue
+ \endgraf
+ \noindent\hskip\getvalue{\??id#1\c!afstand}%
+ \sl\e!zie: ##1}}
+ {}}%
+ \setvalue{#1\s!entry}##1%
+ {\gdef\c!entryletter%
+ {\global\let\c!entryletter=\relax
+ \global\utilitydonetrue
+ \getvalue{\??id#1\c!voor}%
+ %\vskip\lineheight\vskip-\lineheight\goodbreak
+ \vskip\lineheight\goodbreak\vskip-\lineheight
+ \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
+ {\ifhmode\unskip\else\noindent\fi
+ \getvalue{\??id#1\c!commando}% % needed
+ {\doattributes{\??id#1}
+ {\doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\paginareferentie[#1:##1]}%
+ \strut\ignorespaces##1}}%
+ \getvalue{\??id#1\c!na}%
+ \par\nobreak} % don't use \string##1, other hack
+ {\goodbreak % needed ##1 can be \string...
+ \doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\paginareferentie[#1:##1]}}}}}
+
+\def\getalllistreferences#1#2%
+ {\convertargument#2\to\currentregisterentry
+ \doifdefinedelse{\??id#1\??id\currentregisterentry}
+ {\edef\alllistreferences%
+ {\getvalue{\??id#1\??id\currentregisterentry}}%
+ \beforesplitstring\alllistreferences\at::\to\internallistreference
+ \aftersplitstring\alllistreferences\at::\to\alllistreferences}
+ {\let\alllistreferences=\empty
+ \def\internallistreference{0}}}
+
+\def\dosetlinkregister#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \setvalue{#1\s!entrya}##1%
+ {\global\utilitydonetrue
+ \c!entryletter
+ \iflocation
+ \getalllistreferences{#1}{##1}%
+ \endgraf\hangindent1em\noindent
+ %
+ %\thisisinternal{\s!lin:\internallistreference}%
+ %
+ \paginareferentie[\s!lin:\internallistreference]%
+ %
+ \getcommacommandsize[\alllistreferences]%
+ \getfromcommacommand[\alllistreferences][1]%
+ \ifnum\commalistsize=1
+ \let\firstlistreference=\empty
+ \let\midlistreference=\commalistelement
+ \let\lastlistreference=\empty
+ \else
+ \let\firstlistreference=\commalistelement
+ \getfromcommacommand[\alllistreferences][\commalistsize]%
+ \let\lastlistreference=\commalistelement
+ \ifnum\commalistsize=2
+ \let\midlistreference=\empty
+ \else
+ \!!counta=\commalistsize
+ \divide\!!counta by 2
+ \getfromcommacommand[\alllistreferences][\!!counta]%
+ \let\midlistreference=\commalistelement
+ \fi
+ \fi
+ \hskip-.25em\relax
+ \getvalue{\??id#1\c!tekstcommando}{##1}%
+ \hskip\getvalue{\??id#1\c!afstand}%
+ \def\dodocommando[####1-####2]%
+ {\gotonextinternal{\s!ind}{####1}{\copy0}{####2}}%
+ \def\docommando####1####2%
+ {\setbox0=\hbox{\showlocation{\hbox to 1em{\hss####2\hss}}}%
+ \ifx####1\empty
+ % \hskip\wd0 % (optioneel maken)
+ \else
+ \expandafter\dodocommando\expandafter[####1]%
+ \fi}%
+ {\docommando\firstlistreference\gobackwardcharacter}%
+ {\docommando\midlistreference\gotosomewherecharacter}%
+ {\docommando\lastlistreference\goforwardcharacter}%
+ \else
+ ##1%
+ \fi}%
+ \setvalue{#1\s!entry}##1% hetzelfde dus gemeenschappelijk
+ {\gdef\c!entryletter%
+ {\global\utilitydonetrue
+ \global\let\c!entryletter=\relax
+ \getvalue{\??id#1\c!voor}%
+ %\vskip\lineheight\vskip-\lineheight\goodbreak
+ \vskip\lineheight\goodbreak\vskip-\lineheight
+ \doifelsevalue{\??id#1\c!aanduiding}{\v!ja}
+ {\ifhmode\unskip\else\noindent\fi
+ \getvalue{\??id#1\c!commando}% % needed
+ {\doattributes{\??id#1}
+ {\doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\paginareferentie[#1:##1]}%
+ \strut##1}}%
+ \getvalue{\??id#1\c!na}%
+ \par\nobreak} % don't use \string##1, other hack
+ {\goodbreak % needed ##1 can be \string...
+ \doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\paginareferentie[#1:##1]}}}}}
+
+\def\dosetregister#1%
+ {\doifelsevalue{\??id#1\c!koppeling}{\v!ja}
+ {\dosetlinkregister{#1}}
+ {\dosetpageregister{#1}}}
+
+\newcounter\internallistreference
+
+\def\doloadregisterlinks#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \setvalue{#1\s!entrya}##1%
+ {\global\firstregisterpagetrue
+ \doglobal\convertargument##1\to\currentregisterentry % \doglobal nodig?
+ \doglobal\increment\internallistreference}%
+ \setvalue{#1\s!page}##1##2##3%
+ {\doifreglevelelse[##2]
+ {\global\utilitydonetrue
+ \iffirstregisterpage
+ \global\firstregisterpagefalse
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\internallistreference::##1-##3}%
+ \else
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\getvalue{\??id#1\??id\currentregisterentry},##1-##3}%
+ \fi}
+ {}}}
+
+\def\dokoppelregister[#1][#2]%
+ {\iflocation
+ \begingroup
+ \let\dosetregister=\doloadregisterlinks
+ \stelregisterin[#1][#2]%
+ \doutilities{#1}{\jobname}{#1}{}{}%
+ \endgroup
+ \fi}
+
+\def\koppelregister%
+ {\dodoubleempty\dokoppelregister}
+
+\def\doprocesslinkedregister[#1][#2]#3%
+ {\hbox
+ {\doprocessregister[#2]{#3}%
+ \let\firstlistreference=\empty
+ \let\lastlistreference=\empty
+ \let\selflistreference=\empty
+ \let\prevlistreference=\empty
+ \let\nextlistreference=\empty
+ \getalllistreferences{#1}{#3}%
+ \doifnot{\alllistreferences}{}
+ {\def\dodocommando[##1-##2]%
+ {\ifx\firstlistreference\empty
+ \def\firstlistreference{##1-##2}%
+ \fi
+ \def\lastlistreference{##1-##2}%
+ \ifnum##1<\nextinternalreference\relax
+ \def\prevlistreference{##1-##2}%
+ \else\ifnum##1>\nextinternalreference\relax
+ \def\nextlistreference{##1-##2}%
+ \def\dodocommando[####1-####2]%
+ {\def\lastlistreference{####1-####2}}%
+ \else
+ \def\selflistreference{##1-##2}%
+ \fi\fi}%
+ \def\docommando##1%
+ {\dodocommando[##1]}%
+ \processcommacommand[\alllistreferences]\docommando}%
+ \ifx\prevlistreference\empty
+ \let\prevlistreference=\lastlistreference
+ %\let\gobackwardcharacter=\gotoendcharacter
+ \fi
+ \ifx\nextlistreference\empty
+ \let\nextlistreference=\firstlistreference
+ %\let\goforwardcharacter=\gotobegincharacter
+ \fi
+ \ifx\prevlistreference\selflistreference
+ \let\prevlistreference=\empty
+ \let\nextlistreference=\empty
+ \fi
+ \def\dodocommando[##1-##2]%
+ {\gotonextinternal{\s!ind}{##1}{\copy0}{##2}}%
+ \def\docommando##1##2%
+ {\setbox0=\hbox to 1em{\hss\showlocation{##2}\hss}%
+ \ifx##1\empty
+ \hskip\wd0 % (optioneel maken)
+ \else
+ \expandafter\dodocommando\expandafter[##1]%
+ \fi}%
+ \bgroup
+ \docommando\prevlistreference{\gobackwardcharacter}%
+ \egroup
+ \bgroup
+ \doifreferencefoundelse{\s!lin:\internallistreference}
+ {\getrealreference{\s!lin:\internallistreference}%
+ \gotointernal
+ {\s!lin:\internallistreference}
+ {\showlocation{#3}}
+ {\currentrealreference}}
+ {\hbox{#3}}%
+ \egroup
+ \bgroup
+ \docommando\nextlistreference{\goforwardcharacter}%
+ \egroup}}
+
+\def\dodolinkedregister[#1][#2]#3%
+ {\bgroup
+ \def\currentregister{#1}%
+ \iflocation
+ \doifelsevalue{\??id#1\c!koppeling}{\v!ja}
+ {\def\next{\doprocesslinkedregister[#1][#2]{#3}}}
+ {\def\next{\doprocessregister[#2]{#3}}}% ook hier [#1]
+ \else
+ \def\next{\doprocessregister[#2]{#3}}%
+ \fi
+ \next
+ \egroup
+ \ifvmode\nobreak\fi
+ \GotoPar}
+
+\def\dolinkedregister#1%
+ {\dodoubleempty\dodolinkedregister[#1]}
+
+\def\complexdoplaatsregister[#1]%
+ {\begingroup
+ \stelregisterin[\currentregister][#1]%
+ \raggedright
+ \startkolommen
+ [\c!n=\getvalue{\??id\currentregister\c!n},
+ \c!balanceren=\getvalue{\??id\currentregister\c!balanceren},
+ \c!uitlijnen=\getvalue{\??id\currentregister\c!uitlijnen}]%
+ \mindermeldingen
+ \startopelkaar[\v!blanko]%
+ \doutilities{\currentregister}{\jobname}{\currentregister}{}{\par}%
+ \stopopelkaar
+ \stopkolommen
+ \endgroup}
+
+\def\doplaatsregister[#1]%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty{doplaatsregister}}
+
+\def\plaatsregister%
+ {\dosingleargument\doplaatsregister}
+
+\def\complexdovolledigregister[#1]% \@EA's kunnen weg
+ {\@EA\plaatsvolledig\@EA{\@EA\systemsuppliedchapter\@EA}%
+ \@EA{\@EA\currentregister\@EA}%
+ \@EA{\@EA\headtext\@EA{\currentregister}}%
+ {\complexdoplaatsregister[#1]}}
+
+\def\dovolledigregister[#1]%
+ {\def\currentregister{#1}%
+ \complexorsimpleempty{dovolledigregister}}
+
+\def\volledigregister%
+ {\dosingleargument\doplaatsregister}
+
+\def\dodefinieerregister[#1][#2]%
+ {\stelregisterin[#1]%
+ [\c!n=2,
+ \c!balanceren=\v!ja, % \v!nee komt niet zo vaak voor
+ \c!uitlijnen=\v!nee,
+ \c!voor=\blanko, % binnen kolommen: \blanko[\v!regel]
+ \c!na=,
+ \c!symbool=,
+ \c!interactie=\v!paginanummer,
+ \c!afstand=1em,
+ \c!letter=\v!vet,
+ \c!aanduiding=\v!ja,
+ \v!deel\c!nummer=\v!ja,
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \c!criterium=\v!alles,
+ \c!commando=,
+ \c!refereren=\v!aan]%
+ \presetheadtext[#1=\Woord{#1}]%
+ \setvalue{#1}%
+ {\doregister{#1}}%
+ \setvalue{\e!gekoppelde#1}%
+ {\dolinkedregister{#1}}%
+ \setvalue{\s!set#1}%
+ {\dosetregister{#1}}%
+ \setvalue{\s!reset#1}%
+ {\doresetregister{#1}}%
+ \addutilityreset{#1}%
+ \setvalue{\e!zie#1}%
+ {\dozieregister{#1}}%
+ \setvalue{\e!plaats#1}%
+ {\doplaatsregister[#1]}%
+ \setvalue{\e!volledige#1}%
+ {\dovolledigregister[#1]}%
+ \setvalue{\e!stel#1\e!in}[##1]%
+ {\getparameters[\??id#1][##1]}}
+
+\def\definieerregister%
+ {\dodoubleargument\dodefinieerregister}
+
+\def\registerlengte {\utilityregisterlength}
+
+\def\utilityregisterlength {0}
+
+\def\dobepaalregisterkenmerken[#1][#2]%
+ {\begingroup
+ \stelregisterin[#1][#2]%
+ \dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setvalue{#1\s!page}##1##2##3%
+ {\doifreglevelelse[##2]
+ {\doglobal\increment\utilitylistlength
+ \global\utilitydonetrue}
+ {}}%
+ \doglobal\newcounter\utilityregisterlength
+ \setbox0=\vbox
+ {\doutilities{#1}{\jobname}{#1}{}{}}%
+ \endgroup}
+
+\def\bepaalregisterkenmerken%
+ {\dodoubleempty\dobepaalregisterkenmerken}
+
+%I n=Index
+%I c=\index,\zieindex,\volledigeindex
+%I
+%I Een ingang naar de index wordt gecreeerd met:
+%I
+%I \index[ascii]{ingang+ingang+ingang}
+%I
+%I Een verwijzing wordt gecreerd met:
+%I
+%I \zieindex[ascii]{ingang+ingang+ingang}{andere ingang}
+%I
+%I Een index kan (vooralsnog) alleen een eenvoudig
+%I zetcommando afhandelen, bijvoorbeeld: \index{\bf{test}} of
+%I \index{\kap{anwb}}. Meer is vaak niet nodig.
+%I
+%I Als een ingang niet goed gesorteerd wordt, dient [ascii]
+%I te worden meegegeven: \index[anwb]{\kap{anwb}}.
+%I
+%I Een index wordt gegenereerd met:
+%I
+%I \plaatsindex
+%I \volledigeindex
+
+%T n=index
+%T m=ind
+%T a=i
+%T
+%T \index{?}
+
+%I n=Buffers
+%I c=\startbuffer,\haalbuffer,\typebuffer
+%I
+%I Een stuk tekst kan in een buffer worden opgeslagen en
+%I later worden opgeroepen. Dit kan de opbouw van de
+%I ruwe ASCII-file ten goede komen.
+%I
+%I \startbuffer[naam]
+%I \stopbuffer
+%I
+%I Een buffer is eigenlijk een tijdelijke file. Deze file
+%I heeft de extensie 'tmp' en overschrijft dus een file met
+%I dezelfde naam!
+%I
+%I Een buffer kan worden opgeroepen met:
+%I
+%I \haalbuffer[naam]
+%I \typebuffer[naam]
+%I
+%I In alle gevallen is de naam optioneel en mag dus worden
+%I weggelaten.
+%P
+%I Voor en na het wegschrijven kunnen commando's worden
+%I uitgevoerd. Deze worden ingesteld met:
+%I
+%I \stelbufferin[voor=,na=]
+%P
+%I Omdat het argument optioneel is, wat moet worden getest,
+%I worden alle spaties tot het eerste woord onderdrukt. Dit
+%I betekent dat als er moet worden getypt (\typebuffer) en
+%I terwijl voor het eerste woord spaties moeten staan, er
+%I bewust wel (!) een naam moet worden opgegeven.
+
+% nog \definieerbuffer[naam]
+%
+% \startnaam == \startbuffer[#1][naam]
+
+% \EveryPar%
+% {\doglobal\newcounter\NOfLines}
+%
+% \EveryLine%
+% {\doglobal\increment\NOfLines%
+% \hskip-3em%
+% \hbox to 3em{\hss\NOfLines\hskip1em}}
+
+\def\dostartbuffer[#1][#2]%
+ {\showmessage{\m!systems}{15}{#1}%
+ \doifelse{#2}{}
+ {\let\stopbuffer=\relax % \undefined
+ \convertargument\stopbuffer\to\endofblock}
+ {\letvalue{#2}=\relax % \undefined
+ \@EA\convertargument\csname#2\endcsname\to\endofblock}%
+ \def\closeblock%
+ {\immediate\closeout\tmpblocks
+ \egroup
+ \getvalue{#2}}%
+ \doifelsenothing{#1}
+ {\immediate\openout\tmpblocks=\jobname.\f!temporaryextension}
+ {\immediate\openout\tmpblocks=#1.\f!temporaryextension}%
+ \setupcopyblock
+ \def\writeoutblocks##1{}%
+ \copyblockline}
+
+\def\startbuffer%
+ {\bgroup
+ \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv)
+ \dodoubleempty\dostartbuffer}
+
+\def\dobuffer[#1]#2%
+ {\doifelsenothing{#1}
+ {#2{\jobname.\f!temporaryextension}{}{}}
+ {#2{#1.\f!temporaryextension}{}{}}}
+
+\def\dohaalbuffer[#1]%
+ {\@@buvoor
+\beginrestorecatcodes
+ \showmessage{\m!systems}{16}{#1}%
+ \dobuffer[#1]\readjobfile
+\endrestorecatcodes
+ \@@buna}
+
+\def\haalbuffer%
+ {\dosingleempty\dohaalbuffer}
+
+\def\dotypebuffer[#1]%
+ {\bgroup
+ % no, just like \starttyping % \setuptyping[\c!voor=\@@buvoor,\c!na=\@@buna]%
+ \showmessage{\m!systems}{17}{#1}%
+ \dobuffer[#1]\typefile
+ \egroup}
+
+\def\typebuffer%
+ {\dosingleempty\dotypebuffer}
+
+\def\stelbufferin%
+ {\dodoubleargument\getparameters[\??bu]}
+
+%I n=Tekstblokken
+%I c=\definieerblok,\verbergblokken,\handhaafblokken
+%I c=\gebruikblokken,\selecteerblokken,\stelblokin
+%I
+%I Het is mogelijk blokken tekst te verbergen en op andere
+%I plaatsen in de tekst op te roepen. Voorbeelden hiervan
+%I zijn vragen en antwoorden. De antwoorden kunnen onder de
+%I vragen worden ingetypt en bijvoorbeeld in een apart
+%I hoofdstuk worden opgenomen.
+%I
+%I Een tekstblok wordt gedefinieerd met het commando
+%I
+%I \definieerblok[naam]
+%I
+%I en wordt vervolgens steeds omringd door de commando's
+%I
+%I \beginvannaam
+%I tekst
+%I \eindvannaam
+%P
+%I Het zetten van blokken kan worden onderdrukt met het
+%I commando
+%I
+%I \verbergblokken[naam,naam,...]
+%I
+%I wat weer ongedaan gemaakt kan worden met:
+%I
+%I \handhaafblokken[naam,naam,...]
+%I
+%I Blokken kunnen worden opgeroepen met de commando's
+%I
+%I \gebruikblokken[naam,naam,...]
+%I \selecteerblokken[naam,naam,...][criterium=]
+%I
+%I Als criterium kan worden opgegeven: alles of hoofdstuk. In het
+%I laatste geval worden alleen de bij het actulele hoofdstuk horende
+%I blokken tussengevoegd.
+%P
+%I Men moet zonodig eerst het (opnieuw) aanmaken van referenties
+%I onderdrukken met het commando \stelrefererenin[status=stop].
+%I
+%I Genummerde tekstonderdelen (b.v. \doornummeren[vraag]) moeten
+%I desgewenst worden gereset (b.v.\resetvraag)
+%P
+%I De met het volgende commando in te stellen parameters hebben
+%I betrekking op het gebruiken van blokken:
+%I
+%I \stelblokin[naam][voor=,na=,binnen=,letter=]
+%I
+%I Een blok wordt altijd binnen een groep uitgevoerd ({ }).
+%I Zowel 'voor' als 'na' worden buiten deze groep
+%I uitgevoerd, en 'binnen' binnen de groep.
+%P
+%I Soms is het wenselijk tijdens \gebruikblokken sommige blokken
+%I wel 'uit te voeren' maar niet (nogmaals) in de tekst op te
+%I nemen. Als een blok wordt definieerd met:
+%I
+%I \beginvannaam[-]
+%I tekst
+%I \eindvannaam
+%I
+%I dan wordt het ter plaatse al dan niet gezet en bij het later
+%I oproepen wel verwerkt maar niet gezet.
+%I
+%I Als in de tekst een blok wel moet worden verwerkt, maar niet
+%I gezet, dan kan [+] worden opgegeven.
+%P
+%I Het handhaven, verbergen en gebruiken van blokken kan door
+%I de hele tekst plaatsvinden. Binnen ieder hoofdstuk kunnen
+%I bijvoorbeeld blokken worden gedefinieerd die aan het eind van
+%I het hoofdstuk worden opgeroepen. Dit mechanisme noodzaakt
+%I tenminste twee maal verwerken van de file met TeX.
+%I
+%I Een tweede pass is echter niet nodig als na het gebruik geen
+%I nieuwe blokken meer worden gedefinieerd. In dat geval kan
+%I vlak voordat de blokken worden opgeroepen, het commando
+%I
+%I \geenblokkenmeer
+%I
+%I worden gegeven. Dit scheelt tijd.
+
+% In eerste instantie is gebruik gemaakt van een utilityfile. Dit
+% is echter niet perse noodzakelijk. Wellicht dat als er blokken
+% moeten worden gesorteerd, toch weer texutil moet worden
+% gebruikt.
+
+% In de block-move variant hieronder wordt gebruik gemaakt van
+% de in de \answer-macro van Knuth gebruikte copieermethode.
+% Blokken kunnen worden
+%
+% \gehandhaafd : in de tekst worden opgenomen ‚n gecopieerd
+% \verborgen : alleen worden gecopieerd
+% \gebruikt : later in de tekst worden opgenomen
+% \geselecteerd : later selectief in de tekst worden opgenomen
+%
+% Ieder blok wordt gecopieerd naar de file 'jobname.tmp'.
+% Daarnaast wordt een blok tijdelijk opgeslagen in de file
+% 'texutil.tmp'. Handhaven kom tneer op het opnieuw inlezen van
+% deze file.
+%
+% De file 'jobname.tmp' wordt later gecopieerd naar de file
+% 'jobname.tum'. Dit is nodig om in een eerdere run verzamelde
+% blokken te kunnen verwerken.
+
+% Werken met \copie gaat fout. Bovendien zijn de spaties
+% belangrijk!
+%
+% \def\c!copie{copie} % vervalt, verkeerde catcodes
+
+% The use of \string prevents spaces kreeping in when
+% converting the string. Although we can use \meaning in a
+% more direct way, we prfer to use \convertargument, because
+% this way the macro's are more readible.
+
+\def\blockversion {1996.03.10}
+
+\def\@@blockerrormessage%
+ {\showmessage{\m!textblocks}{1}{}%
+ \global\let\@@blockerrormessage=\relax}
+
+\def\thisisblockversion#1%
+ {\doifnot{\blockversion}{#1}%
+ {\@@blockerrormessage
+ \endinput}}
+
+\def\stopcopyingblocks%
+ {\ifcopyingblocks
+ \immediate\closeout\outblocks
+ \copyblockfile
+ \global\copyingblocksfalse
+ \fi}
+
+\def\dodosetblockcounters[#1:#2]#3%
+ {\setvalue{\??se\s!old#3}{#1}%
+ \doifnot{#3}{\lastsection}
+ {\dodosetblockcounters[#2:0]{\getvalue{\??se#3\c!na}}}}
+
+\def\dosetblockcounters[#1#2::#3]%
+ {\ifblockpermitted
+ \dodosetblockcounters[#3:0]\firstsection
+ \setsectiontype[#1]%
+ \def\@@sectionvalue##1{\getvalue{\??se\s!old##1}}%
+ \def\@@sectionconversion##1##2{##2}% to get rid of {##2}
+ \fi}
+
+\def\setblockcounters%
+ {\@EA\dosetblockcounters\@EA[\blockstatus]}
+
+\def\getblockstatus#1%
+ {\dosetblklevel{\getvalue{\??by\@@bscriterium}}%
+ \doifblklevelelse[#1]
+ {\global\blockpermittedtrue}
+ {\global\blockpermittedfalse}%
+ \def\blockstatus{#1}}
+
+\newwrite\outblocks
+\newread\inpblocks
+\newwrite\tmpblocks
+
+\newif\ifcopyingblocks
+
+\newbox\blockbox
+
+\newif\ifvisible
+\visibletrue
+
+\newif\ifblockpermitted
+
+\newcount\blocklevel
+\blocklevel=0
+
+\newif\ifoldinbijlagen
+
+\def\opentmpblock%
+ {\immediate\openout\tmpblocks=\f!utilityfilename.\f!temporaryextension}
+
+\def\closetmpblock%
+ {\immediate\write\tmpblocks{}% een lege regel is handig voor \par commando's
+ \immediate\closeout\tmpblocks}
+
+\newif\iftmpblockstarted
+
+\def\writetmpblock#1%
+ {\iftmpblockstarted
+ \immediate\write\tmpblocks{#1}%
+ \else
+ \doifsomething{#1}
+ {\tmpblockstartedtrue
+ \immediate\write\tmpblocks{\string#1}}%
+ \fi}
+
+\def\startcopyingblocks%
+ {\global\copyingblocksfalse}
+
+\def\checkcopyingblocks%
+ {\ifcopyingblocks
+ \else
+ \immediate\openout\outblocks\f!utilityfilename.\f!blockextension
+ \immediate\write\outblocks{\string\thisisblockversion{\blockversion}}%
+ \global\copyingblockstrue
+ \fi}
+
+\def\stopcopyingblocks%
+ {\ifcopyingblocks
+ \immediate\closeout\outblocks
+ \copyblockfile
+ \global\copyingblocksfalse
+ \fi}
+
+\def\geenblokkenmeer%
+ {\stopcopyingblocks}
+
+\def\copyblockfile
+ {\ifcopyingblocks
+ \begingroup
+ \showmessage{\m!textblocks}{2}{\jobname.\f!blockextension}%
+ \openlocin{\inpblocks}{\f!utilityfilename.\f!blockextension}%
+ \immediate\openout\outblocks\jobname.\f!blockextension
+ \setupcopyblock
+ \catcode`\^^M=\@@ignore\relax
+ \def\copynextline
+ {\read\inpblocks to \!!stringa
+ \immediate\write\outblocks{\!!stringa}%
+ \ifeof\inpblocks
+ \def\copynextline{}%
+ \fi
+ \copynextline}%
+ \copynextline
+ \immediate\closein\inpblocks
+ \immediate\closeout\outblocks
+ \immediate\openout\tmpblocks\f!utilityfilename.\f!blockextension
+ \immediate\closeout\tmpblocks
+ \endgroup
+ \fi}
+
+\def\loadallblocks#1%
+ {\beginrestorecatcodes
+\catcode`\^^M=\@@endofline\relax
+ \readjobfile{#1.\f!blockextension}
+ {\showmessage{\m!textblocks}{3}{#1.\f!blockextension}}
+ {\showmessage{\m!textblocks}{4}{}}%
+ \endrestorecatcodes}
+
+\def\setupcopyblock%
+ {\!!counta=1\relax
+ \loop
+ \catcode\!!counta=\@@other
+ \advance\!!counta by 1\relax
+ \ifnum\!!counta<255\relax
+ \repeat
+ \obeylines}
+
+\def\writeoutblocks%
+ {\immediate\write\outblocks}
+
+\def\processnextblocklineAB#1#2#3%
+ {\convertargument#1 \to\next
+ \doifinstringelse{\endofblockA}{\next}
+ {\def\next{#2}}
+ {\doifinstringelse{\endofblockB}{\next}
+ {\def\next{#2}}
+ {\def\next{#3}}}%
+ \next}
+
+\bgroup
+\obeylines
+\gdef\copyblocklineAB#1
+ {\processnextblocklineAB{#1}%
+ {\closeblock}%
+ {\writeoutblocks{#1}%
+ \writetmpblock{#1}%
+ \copyblocklineAB}}
+\gdef\skipblocklineAB#1
+ {\processnextblocklineAB{#1}%
+ {\closeblock}%
+ {\skipblocklineAB}}
+\egroup
+
+\def\processnextblockline#1#2#3%
+ {\convertargument#1 \to\next
+ \doifinstringelse{\endofblock}{\next}
+ {\def\next{#2}}
+ {\def\next{#3}}%
+ \next}
+
+\bgroup
+\obeylines
+\gdef\copyblockline#1
+ {\processnextblockline{#1}%
+ {\closeblock}%
+ {\writeoutblocks{#1}%
+ \writetmpblock{#1}%
+ \copyblockline}}
+\gdef\skipblockline#1
+ {\processnextblockline{#1}%
+ {\closeblock}%
+ {\skipblockline}}
+\egroup
+
+\def\skipblock#1%
+ {\checkcopyingblocks
+ \@EA\convertargument\string\thiswasblock{#1}\to\endofblock
+%testen : \expanded{\convertargument\string\thiswasblock{#1}\noexpand\to\noexpand\endofblock}%
+ \let\openblock=\begingroup
+ \let\closeblock=\endgroup
+ \openblock
+ \setupcopyblock
+ \skipblockline}
+
+\def\doafterblock#1#2{}
+\def\dobeforeblock#1#2{}
+
+\def\thisisblock#1%
+ {\executeifdefined{\s!thisisblock#1}{\skipblock{#1}}}
+
+\def\thiswasblock#1%
+ {\getvalue{\s!thiswasblock#1}}
+
+\def\saveblock#1#2%
+ {\checkcopyingblocks
+ \obeylines
+ %\@EA\convertargument\string\eindvan#1\to\endofblockA
+ \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA
+%testen: \expanded{\convertargument\string\csname\e!eindvan#1\endcsname\to\endofblockA}%
+ \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN
+ \def\openblock%
+ {\dobeforeblock{#1}{#2}%
+ \opentmpblock
+ \begingroup
+ \makesectionformat
+ \immediate\write\outblocks{}%
+ \immediate\write\outblocks{\string\thisisblock{#1}{\sectionformat}[#2]}}%
+ \def\closeblock%
+ {\immediate\write\outblocks{}% handig voor \par commando's
+ \immediate\write\outblocks{\string\thiswasblock{#1}}%
+ \endgroup
+ \closetmpblock
+ \doafterblock{#1}{#2}%
+ \egroup}%
+ \openblock
+ \setupcopyblock
+ \copyblocklineAB}
+
+\def\copyblock%
+ {\def\opentmpblock{}%
+ \def\closetmpblock{}%
+ \def\writetmpblock##1{}%
+ \saveblock}
+
+\def\loadoneblock%
+ {\readjobfile{\f!utilityfilename.\f!temporaryextension}{}{}}
+
+\def\dodefinieerblok[#1]%
+ {\passeerblok[#1]%
+ \handhaafblokken[#1]%
+ \stelblokin
+ [#1]
+ [\c!voor=\blanko,
+ \c!na=\blanko,
+ \c!binnen=,
+ \c!letter=,
+ \c!file=\jobname]}
+
+\def\definieerblok%
+ {\dosingleargument\dodefinieerblok}
+
+\def\dostelblokin[#1][#2]%
+ {\getparameters[\??tb#1][#2]}
+
+\def\stelblokin%
+ {\dodoubleargument\dostelblokin}
+
+\def\passeerblok[#1]%
+ {\setvalue{\s!thisisblock#1}##1[##2]%
+ {\skipblock{#1}}}
+
+\def\doverbergblok[#1][#2][#3]%
+ {\doifelsenothing{#2}
+ {\global\blockpermittedfalse
+ \edef\bloktitel{#1}}
+ {\doifelsenothing{#3}
+ {\global\blockpermittedtrue
+ \edef\bloktitel{#1}}
+ {\doifcommonelse{#2}{#3}
+ {\global\blockpermittedfalse
+ \edef\bloktitel{#1:#2}}
+ {\global\blockpermittedtrue
+ \edef\bloktitel{#1:#3}}}}%
+ \ifblockpermitted
+ \showwarning{\m!textblocks}{5}{\bloktitel}%
+ \def\next%
+ {\def\dobeforeblock####1####2%
+ {\begingroup}%
+ \def\doafterblock####1####2%
+ {\endgroup
+ \doexecuteloadedblock{#1}}%
+ \saveblock{#1}{#3}}%
+ \else
+ \doifinsetelse{+}{#3}
+ {\showwarning{\m!textblocks}{6}{\bloktitel}%
+ \def\next%
+ {\def\dobeforeblock####1####2%
+ {\begingroup
+ \global\visiblefalse}%
+ \def\doafterblock####1####2%
+ {{\setbox0=\vbox
+ {\catcode`\^^M=\@@endofline\relax
+ \loadoneblock
+ \par}}%
+ \endgroup}%
+ \saveblock{#1}{#3}}}%
+ {\showwarning{\m!textblocks}{7}{\bloktitel}%
+ \def\next%
+ {\def\dobeforeblock####1####2%
+ {\begingroup
+ \globaldefs=-1\relax}%
+ \def\doafterblock####1####2%
+ {\endgroup}%
+ \copyblock{#1}{#3}}}%
+ \fi
+ \next}
+
+\def\doverbergblokken[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{\e!beginvan##1}%
+ {\bgroup\obeylines\dotripleempty\doverbergblok[##1][#2]}}%
+ \processcommalist[#1]\docommando}
+
+\def\verbergblokken%
+ {\dodoubleempty\doverbergblokken}
+
+\def\doexecuteloadedblock#1%
+ {\blockpermittedtrue % ?
+ \getvalue{\??tb#1\c!voor}%
+ \bgroup
+ \doattributes{\??tb#1}{}%
+ \visibletrue
+ \catcode`\^^M=\@@endofline\relax
+ \getvalue{\??tb#1\c!binnen}%
+ \loadoneblock
+ \par
+ \egroup
+ \getvalue{\??tb#1\c!na}}
+
+\def\dohandhaafblok[#1][#2][#3]%
+ {\doifelsenothing{#2}
+ {\global\blockpermittedtrue
+ \edef\bloktitel{#1}}
+ {\doifcommonelse{#2}{#3}
+ {\global\blockpermittedtrue
+ \edef\bloktitel{#1:#2}}
+ {\doifinsetelse{\v!alles}{#2}
+ {\doifelse{#3}{}
+ {\global\blockpermittedtrue
+ \edef\bloktitel{#1}}
+ {\global\blockpermittedfalse
+ \edef\bloktitel{#1:#3}}}
+ {\global\blockpermittedfalse
+ \doifelse{#3}{}
+ {\edef\bloktitel{#1}}
+ {\edef\bloktitel{#1:#3}}}}}%
+ \ifblockpermitted
+ \showwarning{\m!textblocks}{8}{\bloktitel}%
+ \def\dobeforeblock##1##2%
+ {\begingroup}%
+ \def\doafterblock##1##2%
+ {\endgroup
+ \doexecuteloadedblock{#1}}%
+ \else
+ \showwarning{\m!textblocks}{9}{\bloktitel}%
+ \fi
+ \saveblock{#1}{#3}}
+
+\def\dohandhaafblokken[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{\e!beginvan##1}%
+ {\bgroup\obeylines\dotripleempty\dohandhaafblok[##1][#2]}}%
+ \processcommalist[#1]\docommando}
+
+\def\handhaafblokken%
+ {\dodoubleempty\dohandhaafblokken}
+
+\def\dodogebruikblok#1#2#3#4%
+ {\getblockstatus{#2}%
+ \ifblockpermitted%
+ \doifelsenothing{#4}
+ {\edef\bloktitel{#1}}
+ {\doifnotcommon{#3}{#4}
+ {\global\blockpermittedfalse}%
+ \edef\bloktitel{#1:#3}}%
+ \else
+ \edef\bloktitel{#1}%
+ \fi
+ \ifblockpermitted
+ \def\next%
+ {\global\advance\blocklevel by 1\relax
+ \doifinsetelse{-}{#3}
+ {\showwarning{\m!textblocks}{10}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par\egroup}%
+ \setbox0=\vbox\bgroup}
+ {\showwarning{\m!textblocks}{11}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par
+ \egroup
+ \getvalue{\??tb#1\c!na}%
+ \global\advance\blocklevel by -1\relax}%
+ \getvalue{\??tb#1\c!voor}%
+ \bgroup
+ \doattributes{\??tb#1}{}%
+ \visibletrue
+ \getvalue{\??tb#1\c!binnen}}}%
+ \else
+ \def\next%
+ {\showwarning{\m!textblocks}{12}{\bloktitel}%
+ \skipblock{#1}}%
+ \fi
+ \next}
+
+\def\dogebruikblok[#1][#2]%
+ {\setvalue{\s!thisisblock#1}##1[##2]%
+ {\dodogebruikblok{#1}{##1}{##2}{#2}}}
+
+\def\dogebruikblokken[#1][#2]%
+ {\def\docommando##1%
+ {\dogebruikblok[##1][#2]}%
+ \processcommalist[#1]\docommando
+ \getfromcommalist[#1][1]%
+ \doifdefined{\??tb\commalistelement\c!file}
+ {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}%
+ \endgroup}
+
+\def\gebruikblokken%
+ {\begingroup
+ \doassign[\??bs][\c!criterium=\v!alles]%
+ \dodoubleempty\dogebruikblokken}
+
+\def\doselecteerblokken[#1][#2][#3]%
+ {\doifelsenothing{#3}
+ {\getparameters[\??bs][#2]%
+ \dogebruikblokken[#1][]}
+ {\getparameters[\??bs][#3]%
+ \dogebruikblokken[#1][#2]}}%
+
+\def\selecteerblokken%
+ {\begingroup
+ \doassign[\??bs][\c!criterium=\v!alles]%
+ \dotripleempty\doselecteerblokken}
+
+\def\beginvanblok[#1]% % er wordt ook gechecked op \eindvanblok[..]
+ {\getvalue{\e!beginvan#1}}
+
+%I n=Achtergronden
+%I c=\stelachtergrondenin
+%I
+%I Achter de tekst kan een achtergrond worden geplaatst.
+%I Voor de afzonderlijke elementen van een tekst wordt een
+%I achtergrond gedefinieerd met het commando:
+%I
+%I \stelachtergrondenin
+%I [boven,hoofd,tekst,voet,onder]
+%I [linkerrand,rechterrand,linkermarge,reachtermarge,tekst]
+%I [achtergrond=,kleur=,raster=]
+%I
+%I Voor de hele bladzijde gebruiken we:
+%I
+%I \stelachtergrondenin
+%I [pagina]
+%I [achtergrond=,kleur=,raster=]
+%P
+%I Het is mogelijk elk blok iets ruimer om de tekst te
+%I plaatsen met:
+%I
+%I \stelachtergrondenin
+%I [pagina]
+%I [offset=,diepte=]
+%I
+%I Een offset van .25\korpsgrootte en een diepte van
+%I .5\korpsgrootte voldoen aardig.
+%I
+%I Er kunnen ronde hoeken worden gezet met:
+%I
+%I \stelachtergrondenin
+%I [pagina]
+%I [hoek=,straal=]
+%I
+%I Hierbij kan voor hoek de instelling rond of recht worden
+%I meegegeven en voor straal een dimensie.
+
+% Don't use \@@mawhatevercommand directly, use \getvalue instead.
+
+\newif\ifnewbackground
+\newif\ifsomebackground
+
+\newbox\leftbackground
+\newbox\rightbackground
+
+\def\addpagebackground#1%
+ {\doifvaluesomething{\??ma\v!pagina\c!achtergrond}
+ {\setbox2=\vbox
+ {\offinterlineskip
+ \localframed
+ [\??ma\v!pagina]
+ [\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]%, \c!offset=\v!overlay]
+ {\getvalue{\??ma\v!pagina\c!commando}}}%
+ \wd2=\!!zeropoint
+ \dp2=\!!zeropoint
+ \setbox#1=\vbox
+ {\hbox{\box2\box#1}}}}
+
+\let\pagebackgroundhoffset = \!!zeropoint
+\let\pagebackgroundvoffset = \!!zeropoint
+\let\pagebackgrounddepth = \!!zeropoint
+
+% #1 = breedte
+% #2 = hoogte
+% #3 = pos
+% #4 = pos
+
+\def\dododopagebodybackground#1#2#3#4%
+ {\doifelsevaluenothing{\??ma#3#4\c!achtergrond}
+ {\doifelsevalue{\??ma#3#4\c!kader}{\v!aan} % niet waterdicht, ook deelkaders
+ {\!!doneatrue}
+ {\!!doneafalse}}
+ {\!!doneatrue}%
+ \if!!donea
+ \localframed
+ [\??ma#3#4]
+ [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay]
+ {\getvalue{\??ma#3#4\c!commando}}%
+ \else
+ \hskip#1%
+ \fi}
+
+\def\dodopagebodybackground#1#2%
+ {\setbox0=\vbox to #2
+ \bgroup\hbox\bgroup
+ \swapmargins
+ \goleftonpage
+ \dododopagebodybackground\linkerrandbreedte#2#1\v!linkerrand
+ \hskip\linkerrandafstand
+ \hskip\pageseparation
+ \dododopagebodybackground\linkermargebreedte#2#1\v!linkermarge
+ \hskip\linkermargeafstand
+ \dododopagebodybackground\zetbreedte#2#1\v!tekst
+ \hskip\rechtermargeafstand
+ \dododopagebodybackground\rechtermargebreedte#2#1\v!rechtermarge
+ \hskip\pageseparation
+ \hskip\rechterrandafstand
+ \dododopagebodybackground\rechterrandbreedte#2#1\v!rechterrand
+ \egroup\egroup
+ \wd0=\!!zeropoint\relax
+ \box0\relax}
+
+\def\setbackgroundbox#1#2%
+ {\global\setbox#1=\vbox
+ {\offinterlineskip
+ \mindermeldingen
+ \calculatereducedvsizes
+ #2\relax
+ \vskip-\bovenhoogte
+ \vskip-\bovenafstand
+ \dodopagebodybackground\v!boven\bovenhoogte
+ \vskip\bovenafstand
+ \dodopagebodybackground\v!hoofd\hoofdhoogte
+ \vskip\hoofdafstand
+ \dodopagebodybackground\v!tekst\teksthoogte
+ \vskip\voetafstand
+ \dodopagebodybackground\v!voet\voethoogte
+ \vskip\onderafstand
+ \dodopagebodybackground\v!onder\onderhoogte
+ \vfilll}%
+ \smashbox#1}
+
+\def\setbackgroundboxes%
+ {\ifsomebackground\ifnewbackground
+ \showmessage{\m!layouts}{8}{}%
+ \docheckbackgrounddefinitions
+ \setbackgroundbox\leftbackground\relax
+ \ifdubbelzijdig
+ \setbackgroundbox\rightbackground\doswapmargins
+ \fi
+ \global\newbackgroundfalse
+ \doifelsevaluenothing{\??ma\v!tekst\v!tekst\c!achtergrond}
+ {\global\let\pagebackgroundhoffset=\!!zeropoint
+ \global\let\pagebackgroundvoffset=\!!zeropoint
+ \global\let\pagebackgrounddepth=\!!zeropoint}
+ {\bgroup
+ \dimen0=\getvalue{\??ma\v!pagina\c!offset}%
+ \doifnothing
+ {\getvalue{\??ma\v!boven\v!tekst\c!achtergrond}%
+ \getvalue{\??ma\v!onder\v!tekst\c!achtergrond}}
+ {\xdef\pagebackgroundhoffset{\the\dimen0}}%
+ \doifnothing
+ {\getvalue{\??ma\v!tekst\v!rechterrand\c!achtergrond}%
+ \getvalue{\??ma\v!tekst\v!linkerrand\c!achtergrond}}
+ {\xdef\pagebackgroundvoffset{\the\dimen0}%
+ \dimen0=\getvalue{\??ma\v!pagina\c!diepte}%
+ \xdef\pagebackgrounddepth{\the\dimen0}}%
+ \egroup}%
+ \fi\fi}
+
+\def\getbackgroundbox%
+ {\ifsomebackground
+ \setbackgroundboxes
+ \startinteractie
+ \doifmarginswapelse
+ {\copy\leftbackground}
+ {\copy\rightbackground}%
+ \stopinteractie
+ \fi}
+
+% saves us hundreds of unused hash entries if not needed
+
+\def\docheckbackgrounddefinitions% allocates about 1000 hash-entries
+ {\doifdefined{\??ma\v!pagina\c!achtergrond}% skip first pass
+ {\def\dodocommando##1##2%
+ {\copylocalframed[\??ma##1##2][\??ma\v!pagina]%
+ \getparameters[\??ma##1##2]
+ [\c!achtergrond=,\c!kader=,\c!kleur=,\c!raster=]%
+ \copyparameters
+ [\??ma##1##2\c!kader][\??ma##1##2]
+ [\c!kleur,\c!raster]%
+ \copyparameters
+ [\??ma##1##2\c!achtergrond][\??ma##1##2]
+ [\c!kleur,\c!raster]}%
+ \def\docommando##1%
+ {\dodocommando##1\v!linkerrand \dodocommando##1\v!linkermarge
+ \dodocommando##1\v!tekst
+ \dodocommando##1\v!rechtermarge \dodocommando##1\v!rechterrand}%
+ \docommando\v!boven \docommando\v!hoofd
+ \docommando\v!tekst
+ \docommando \v!voet \docommando\v!onder
+ \def\docheckbackgrounddefinitions%
+ {\global\somebackgroundtrue}}}
+
+\def\dostelachtergrondenin[#1][#2][#3]%
+ {\docheckbackgrounddefinitions
+ \global\newbackgroundtrue
+ \iffirstargument % \dostelachtergrondenin zonder arg mag
+ \ifthirdargument
+ \def\docommando##1%
+ {\doifelse{##1}{\v!pagina}
+ {\getparameters[\??ma\v!pagina][#3]%
+ \dosetpageseparation}
+ {\def\dodocommando####1%
+ {\getparameters[\??ma##1####1][#3]}
+ \processcommalist[#2]\dodocommando}}%
+ \processcommalist[#1]\docommando
+ \else
+ \doifelse{#1}{\v!pagina}
+ {\getparameters[\??ma\v!pagina][#2]%
+ \dosetpageseparation}
+ {\dostelachtergrondenin
+ [#1]
+ [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]
+ [#2]}%
+ \fi
+ \fi}
+
+\def\stelachtergrondenin%
+ {\dotripleempty\dostelachtergrondenin}
+
+% a lot of setups, including short ones
+
+\presetlocalframed [\??ma\v!pagina]
+
+\copyparameters
+ [\??ma\v!pagina\c!kader][\??ma\v!pagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
+ [\??ma\v!pagina\c!achtergrond][\??ma\v!pagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\def\@@pageseparation {6pt}
+\def\pageseparation {0pt}
+
+\def\paginascheiding {\pageseparation}
+
+\def\dosetpageseparation%
+ {\let\pageseparation=\!!zeropoint
+ \let\showpageseparation=\relax
+ \processaction
+ [\getvalue{\??ma\v!pagina\c!scheider}]
+ [ \v!ruim=>\let\pageseparation=\@@pageseparation
+ \let\showpageseparation=\showloosepageseparation,
+ \v!passend=>\let\pageseparation=\@@pageseparation
+ \let\showpageseparation=\showtightpageseparation]}
+
+\def\showloosepageseparation%
+ {\ifdim\pageseparation>\!!zeropoint\relax
+ \bgroup
+ \setbox0=\hbox
+ {\vrule
+ \!!width\pageseparation
+ \!!depth\papierhoogte
+ \!!height\papierhoogte}%
+ \ht0=\!!zeropoint
+ \dp0=\!!zeropoint
+ \box0
+ \egroup
+ \fi}
+
+\def\showtightpageseparation%
+ {\ifdim\pageseparation>\!!zeropoint\relax
+ \bgroup
+ \dimen0=\teksthoogte
+ \advance\dimen0 by \kopwit
+ \doifsometextlineelse{\v!hoofd}
+ {\advance\dimen0 by \hoofdhoogte
+ \advance\dimen0 by \hoofdafstand}
+ {}%
+ \dimen2=\papierhoogte
+ \advance\dimen2 by -\dimen0
+%\advance\dimen0 by -1cm % nog eens optie
+%\advance\dimen2 by -1cm % nog eens optie
+ \setbox0=\hbox
+ {\vrule
+ \!!width\pageseparation
+ \!!depth\dimen2
+ \!!height\dimen0}%
+ \ht0=\!!zeropoint
+ \dp0=\!!zeropoint
+ \box0
+ \egroup
+ \fi}
+
+%I n=File-management
+%I c=\starttekst,\startprojekt,\startonderdeel,\startprodukt
+%I c=\startomgeving,\startdeelomgeving
+%I
+%I Een eenvoudige tekst wordt gestart en gestopt met de
+%I commando's:
+%I
+%I \starttekst
+%I \stoptekst
+%P
+%I Het is mogelijk een projektstructuur op te zetten. Per
+%I projekt wordt een file aangemaakt waarin de volgende
+%I commando's voorkomen:
+%I
+%I \startprojekt naam
+%I \stopprojekt
+%I
+%I Als deze file in TeX wordt geladen, dan worden alle
+%I produkten achter elkaar gezet.
+%I
+%I Een produkt wordt gedefinieerd met:
+%I
+%I \startprodukt naam
+%I \stopprodukt
+%I
+%I Deze file kan zelfstandig door TeX worden gehaald.
+%P
+%I Een omgeving wordt gedefinieerd door:
+%I
+%I \startomgeving naam
+%I \stopomgeving
+%I
+%I Een onderdeel wordt gedefinieerd door:
+%I
+%I \startonderdeel naam
+%I \stoponderdeel
+%I
+%I Files worden eerst gezocht op het actuele gebied. Als een
+%I file niet aanwezig is wordt op de 'roots' gezocht.
+%I
+%I Een onderdeel kan zelfstandig door TeX worden gehaald.
+%P
+%I Binnen een projekt, produkt, omgeving of onderdeel komen
+%I de volgende instellingen voor (tussen haakjes=facultatief):
+%I
+%I projekt omgeving produkt onderdeel
+%I
+%I \projekt naam * *
+%I \omgeving naam (*) (*) (*) (*)
+%I \produkt naam *
+%I \onderdeel naam (*) (*)
+%I
+%I Binnen een omgeving kunnen deelomgevingen worden gedefinieerd
+%I die alleen voor bepaalde produkten, onderdelen enz. gelden.
+%I
+%I \startdeelomgeving[naam,...,naam]
+%I commando's
+%I \stopdeelomgeving
+%P
+%I Het programma TeXEdit doorzoekt bij het aanmaken van een
+%I file-menu de hele tekst op de genoemde commando's. Bij een
+%I lange tekst kan dit misschien 'te' lang duren. Met het
+%I commando:
+%I
+%I \geenfilesmeer
+%I
+%I kan worden aangegeven dat er geen structuurcommando's meer
+%I volgen.
+%I
+%I Ten behoeve van TeXUtil moet in plaats van het commando
+%I \input het commando \verwerkfile{naam} worden gebruikt.
+%P
+%I Als men standaard een en ander wil instellen, dan kan men
+%I dit doen in de file 'cont-sys.tex'. Deze file wordt direkt
+%I na het opstarten geladen cq. uitgevoerd. Daarnaast wordt,
+%I indien aanwezig, de file 'cont-new.tex' geladen.
+
+%T n=starttekst
+%T m=sta
+%T a=x
+%T
+%T \starttekst
+%T
+%T ?
+%T
+%T \stoptekst
+
+\def\currentproject {}
+\def\currentproduct {}
+\def\currentenvironment {}
+\def\currentcomponent {}
+
+\def\loadedfiles {}
+\def\processedfiles {}
+
+\let\geenfilesmeer=\relax
+
+\newcounter\textlevel
+\newcounter\fileprocesslevel
+
+\setvalue{\c!file::0}{\jobname}
+
+\def\processedfile%
+ {\getvalue{\c!file::\fileprocesslevel}}
+
+\def\processfile#1%
+ {\doglobal\increment\fileprocesslevel
+ \setxvalue{\c!file::\fileprocesslevel}{#1}%
+ \@EA\doglobal\@EA\addtocommalist\@EA{#1}\processedfiles
+ \readlocfile{#1}{}{}
+ \doglobal\decrement\fileprocesslevel}
+
+\def\registreerfileinfo#1#2%
+ {\immediate\write\uti{f #1 {#2}}}
+
+\doifundefined{preloadfonts} {\let\preloadfonts=\relax}
+\doifundefined{preloadspecials} {\let\preloadspecials=\relax}
+
+\def\loadsystemfiles%
+ {\readsysfile{\f!newfilename}
+ {\showmessage{\m!systems}{2}{\f!newfilename}}{}%
+ \readsysfile{\f!oldfilename}
+ {\showmessage{\m!systems}{2}{\f!oldfilename}}{}%
+ \readsysfile{\f!systemfilename}
+ {\showmessage{\m!systems}{2}{\f!systemfilename}}{}}
+
+% \newevery \everyjob \EveryJob
+% \appendtoks ... \to \everyjob
+
+\appendtoks \meldaanmaakdatum \to \everyjob
+\appendtoks \loadsystemfiles \to \everyjob
+\appendtoks \preloadfonts \to \everyjob
+\appendtoks \settopskip \to \everyjob
+\appendtoks \preloadspecials \to \everyjob
+\appendtoks \openspecialfile \to \everyjob
+\appendtoks \checkutilityfile \to \everyjob
+\appendtoks \openutilities \to \everyjob
+\appendtoks \loadtwopassdata \to \everyjob
+
+\def\starttekst%
+ {\ifnum\textlevel=0\relax
+ \registreerfileinfo{b}{\jobname}%
+ \startcopyingblocks
+ \fi
+ \doglobal\increment\textlevel\relax}
+
+\let\normalend=\end
+\newevery \everybye \EveryBye
+
+\def\end%
+ {\the\everybye
+ \normalend}
+
+\appendtoks \pagina[\v!laatste] \to \everybye
+\appendtoks \pagina \to \everybye % nodig voor \startuitstellen...\stopuitstellen
+\appendtoks \registreerfileinfo{e}{\jobname} \to \everybye
+\appendtoks \stopcopyingblocks \to \everybye
+\appendtoks \closeutilities \to \everybye
+\appendtoks \closespecialfile \to \everybye
+
+\def\stoptekst%
+ {\doglobal\decrement\textlevel\relax
+ \ifnum\textlevel>0\relax
+ \let\next=\relax
+ \else
+ \let\next=\end
+ \fi
+ \next}
+
+\def\doexecutefileonce#1%
+ {\beforesplitstring#1\at.\to\currentfile
+ \ExpandBothAfter\doifnotinset{\currentfile}{\loadedfiles}%
+ {\ExpandFirstAfter\addtocommalist{\currentfile}\loadedfiles
+ \doexecutefile{#1}}}
+
+\def\doexecutefile#1%
+ {\registreerfileinfo{b}{#1}
+ \processfile{#1}%
+ \registreerfileinfo{e}{#1}}
+
+\def\donotexecutefile#1%
+ {}
+
+\def\verwerkfile#1 %
+ {\doexecutefile{#1}}
+
+\def\omgeving #1 % at outermost level only
+ {\def\startomgeving ##1 {}%
+ \let\stopomgeving=\relax
+ \readlocfile{#1}{}{}}
+
+\newcounter\filelevel
+
+\def\!!donextlevel#1#2#3#4#5#6\\%
+ {\beforesplitstring#6\at.\to#1
+ \ifnum\filelevel=0\relax
+ \starttekst
+ \def\projekt ##1 {#2{##1}}%
+ \def\omgeving ##1 {#3{##1}}%
+ \def\produkt ##1 {#4{##1}}%
+ \def\onderdeel ##1 {#5{##1}}%
+ \fi
+ \increment\filelevel\relax
+ \ExpandFirstAfter\addtocommalist{#1}\loadedfiles}
+
+\def\doprevlevel%
+ {\ifnum\filelevel=1\relax
+ \let\next=\stoptekst
+ \else
+ \decrement\filelevel\relax
+ \let\next=\endinput
+ \fi
+ \next}
+
+\def\startprojekt #1 %
+ {\!!donextlevel\currentproject
+ \donotexecutefile\doexecutefileonce
+ \doexecutefileonce\doexecutefile#1\\}
+
+\def\stopprojekt%
+ {\doprevlevel}
+
+\def\startprodukt #1 %
+ {\!!donextlevel\currentproduct
+ \doexecutefileonce\doexecutefileonce
+ \donotexecutefile\doexecutefile#1\\}
+
+\def\stopprodukt%
+ {\doprevlevel}
+
+\def\startonderdeel #1 %
+ {\!!donextlevel\currentcomponent
+ \doexecutefileonce\doexecutefileonce
+ \donotexecutefile\doexecutefile#1\\}
+
+\def\stoponderdeel%
+ {\doprevlevel}
+
+\def\startomgeving #1 %
+ {\!!donextlevel\currentenvironment
+ \donotexecutefile\doexecutefileonce
+ \donotexecutefile\donotexecutefile#1\\}
+
+\def\stopomgeving%
+ {\doprevlevel}
+
+\long\def\skipdeelomgeving#1\stopdeelomgeving%
+ {}
+
+\def\startdeelomgeving[#1]%
+ {\def\partialenvironments{}%
+ \def\docommando##1%
+ {\beforesplitstring##1\at.\to\someevironment
+ \ExpandFirstAfter\addtocommalist{\someevironment}\partialenvironments}%
+ \processcommalist[#1]\docommando
+ \ExpandBothAfter\doifcommonelse
+ {\currentproject,\currentproduct,
+ \currentcomponent,\currentenvironment}
+ {\partialenvironments}
+ {\let\stopdeelomgeving=\relax
+ \let\next=\relax}
+ {\let\next=\skipdeelomgeving}%
+ \next}
+
+\def\startproduct{\startproduct}
+\def\stopproduct {\stopproduct}
+\def\startproject{\startprojekt}
+\def\stopproject {\stopprojekt}
+
+\def\project{\projekt}
+\def\product{\produkt}
+
+\def\deelomgeving #1 %
+ {\doexecutefileonce{#1}}
+
+%I n=Macrofiles
+%I c=\gebruikmodules
+%I
+%I Extra modules kunnen worden geladen met het commando:
+%I
+%I \gebruikmodules[file,file,...]
+
+% Why does all tex's handle 8+3 different.
+
+\def\makeshortmodulename[#1#2#3#4#5#6#7#8#9]%
+ {\def\modulename{#1#2#3#4#5#6#7#8.}%
+ \expandafter\beforesplitstring\modulename\at.\to\modulename}
+
+\def\dodousemodules#1%
+ {\makeshortmodulename[m-#1........]%
+ \doifundefinedelse{\modulename\v!aan}
+ {\setgvalue{\modulename\v!aan}{}%
+ \readsysfile{\modulename}%
+ {\showmessage{\m!systems}{5}{#1}}%
+ {\showmessage{\m!systems}{6}{#1}}}
+ {\showmessage{\m!systems}{7}{#1}}}
+
+\def\dousemodules[#1]%
+ {\doifsomething{#1}
+ {\processcommalist[#1]\dodousemodules}}
+
+\def\usemodules%
+ {\dosingleargument\dousemodules}
+
+\let\usemodule=\usemodules
+
+\newif\ifvoorlopig
+\voorlopigfalse
+
+\newif\ifconcept
+\conceptfalse
+
+\def\infofont%
+ {\getvalue{7pttttf}}
+
+%\def\mathinfofont%
+% {\eightpoint\tt}
+
+\edef\utilityversion {1996.03.15}
+\edef\contextversion {\the\normalyear.\the\normalmonth.\the\normalday\normalspace}
+\edef\copyrightversion {Copyright 1990-\the\normalyear\normalspace / PRAGMA / J. Hagen - A.F. Otten}
+
+\def\meldaanmaakdatum%
+ {\writeline
+ \writestring{This is CONTEXT version <\contextversion>
+ interface <\currentinterface>
+ responses <\currentresponses>}%
+ \writeline
+ \writestring{This package is based on Plain TeX. It uses an adapted version of the}%
+ \writestring{extended mark mechanism of J. Fox (1987) and a few parts of the sidefloat}%
+ \writestring{mechanism of D. Comenetz (1993). Most of D.E. Knuth's Plain TeX}%
+ \writestring{(\fmtversion) is available and can be used without problems. This package}%
+ \writestring{uses TaBlE, a package designed and copyrighted by M.J. Wichura (1988).}%
+ \writestring{Only a few auxiliary files are generated, of which some must be processed}%
+ \writestring{by TeXUtil (\utilityversion). The current blockversion is \blockversion.}%
+ \writeline
+ \writestring{\copyrightversion}%
+ \writeline}
+
+\startinterface dutch
+
+\def\meldaanmaakdatum%
+ {\writeline
+ \writestring{Dit is CONTEXT versie <\contextversion>
+ interface <\currentinterface>
+ meldingen <\currentresponses>}%
+ \writeline
+ \writestring{Dit pakket is gebaseerd op Plain TeX. Er wordt gebruik gemaakt van een}%
+ \writestring{aangepaste versie van het mark mechanisme van J. Fox (1987) en onderdelen}%
+ \writestring{van het sidefloat mechanisme van D. Comenetz (1993). De functionaliteit}%
+ \writestring{van D.E. Knuth's Plain TeX (\fmtversion) is grotendeels beschikbaar en kan}%
+ \writestring{zonder problemen worden gebruikt. Dit pakket gebruikt TaBlE, ontworpen door}%
+ \writestring{M.J. Wichura (1988), die ook het auteursrecht bezit. Er worden slechts een}%
+ \writestring{paar hulpfiles gegenereerd, waarvan er enkele moeten worden bewerkt door}%
+ \writestring{TeXUtil (\utilityversion). Het blokmechanisme heeft versienummer \blockversion.}%
+ \writeline
+ \writestring{\copyrightversion}%
+ \writeline}
+
+\stopinterface
+
+\startinterface german
+
+\def\meldaanmaakdatum%
+ {\writeline
+ \writestring{Dies ist CONTEXT Version <\contextversion>
+ Interface <\currentinterface>
+ Meldungen <\currentresponses>}%
+ \writeline
+ \writestring{Dieses Paket basiert auf Plain-TeX und benutzt eine angepasste Version}%
+ \writestring{des erweiterten mark-Mechanismus von J. Fox (1987) und einige Teile des}%
+ \writestring{sidefloat-Mechanismus von D. Comenetz (1993). Ein Grossteil D.E. Knuths}%
+ \writestring{Plain-TeX (\fmtversion) ist verfuegbar und kann ohne Probleme benutzt werden.}%
+ \writestring{Dieses Paket benutzt TaBlE, ein von M.J. Wichura (1988) erstelltes und}%
+ \writestring{geschuetztes Paket. Nur einige Hilfsdateien werden erstellt; einige davon}%
+ \writestring{muessen von TeXUtil (\utilityversion) bearbeitet werden. Die aktuelle Block-}%
+ \writestring{version ist \blockversion.}%
+ \writeline
+ \writestring{\copyrightversion}%
+ \writeline}
+
+\stopinterface
+
+\def\doplaatsversieaanduiding#1#2%
+ {\doifsomething{#2}
+ {\@EA\convertargument#2\to\ascii
+ \ #1: \ascii\
+ \!!doneatrue}}
+
+\def\plaatsversieaanduiding%
+ {\ifvoorlopig
+ \vskip\!!sixpoint
+ \hbox to \zetbreedte
+ {\infofont
+ Versie: \currentdate\
+ \doplaatsversieaanduiding{Project}\currentproject
+ \doplaatsversieaanduiding{Produkt}\currentproduct
+ \doplaatsversieaanduiding{Onderdeel}\currentcomponent
+ \if!!donea\else\ File: \jobname\fi
+ \hss\reportpagedimensions}%
+ \fi
+ \ifconcept
+ \vskip\!!sixpoint
+ \hbox to \zetbreedte
+ {\infofont
+ Concept: \currentdate
+ \hss\reportpagedimensions}%
+ \fi}
+
+% tot hier
+
+\def\doversie[#1]%
+ {\voorlopigfalse
+ \conceptfalse
+ \overfullrule=\!!zeropoint
+ \processaction
+ [#1]
+ [\v!voorlopig=>\voorlopigtrue
+ \overfullrule=5pt,
+ \v!concept=>\concepttrue]}
+
+\def\versie%
+ {\dosingleargument\doversie}
+
+\newbox\referentieinfobox
+\newbox\registerinfobox
+\newbox\floatinfobox
+
+\def\dotestinfo#1#2#3%
+ {\ifvoorlopig
+ \begingroup
+ \convertargument#3\to\ascii
+ \xdef\extratestinfo%
+ {#2 \ascii}%
+ \gdef\totaltestinfo%
+ {\global\setbox#1=\vbox
+ {\unvbox#1\relax
+ \hbox
+ {\infofont
+ \strut
+ \expandafter\doboundtext\expandafter
+ {\extratestinfo}
+ {\rechtermargebreedte}
+ {..}%
+ \quad}}}%
+ \endgroup
+ \ifinner
+ \aftergroup\totaltestinfo
+ \else
+ \totaltestinfo
+ \fi
+ \fi}
+
+\def\referentieinfo%
+ {\dotestinfo\referentieinfobox}
+
+\def\registerinfo%
+ {\dotestinfo\registerinfobox}
+
+\def\floatinfo%
+ {\dotestinfo\floatinfobox}
+
+\def\plaatstestinfo%
+ {\setbox0=\vbox to \teksthoogte
+ {\forgetall
+ \hsize\rechtermargebreedte
+ \ifvoid\floatinfobox\else
+ \infofont\strut Plaatsblokken
+ \vskip\!!sixpoint
+ \unvbox\floatinfobox
+ \vskip\!!twelvepoint
+ \fi
+ \ifvoid\referentieinfobox\else
+ \infofont\strut Verwijzingen
+ \vskip\!!sixpoint
+ \unvbox\referentieinfobox
+ \vskip\!!twelvepoint
+ \fi
+ \ifvoid\registerinfobox\else
+ \infofont\strut Registers
+ \vskip\!!sixpoint
+ \unvbox\registerinfobox
+ \fi
+ \vss}%
+ \wd0=\!!zeropoint
+ \box0\relax}
+
+%I n=Commando's
+%I c=\definieer,\naam
+%I c=\gebruikcommandos
+%I
+%I Het is mogelijk eigen commando's te definieren met behulp
+%I van het commando:
+%I
+%I \definieer[aantal argumenten]\commando{betekenis}
+%I
+%I Een argument kan worden opgeroepen door een # gevolgd
+%I een nummer, bijvoorbeeld #2.
+%I
+%I \definieer\test{ziezo} \ziezo
+%I \definieer[1]\test{ziezo #1} \ziezo{}
+%I \definieer[2]\test{ziezo #1 en #2} \ziezo{}{}
+%P
+%I In commandonamen mogen alleen karakters voorkomen. Mocht
+%I onverhoopt een cijfer nodig zijn, dan kunnen dergelijke
+%I commando's worden opgeroepen met:
+%I
+%I \naam{}
+%I
+%I In een aantal gevallen, bijvoorbeeld bij het wegschrijven
+%I naar lijsten, worden commando's \noexpand-ed. Dit is
+%I bijvoorbeeld het geval bij synoniemen en sorteren, als
+%I het criterium ongelijk is aan 'alles'. Dergelijke (zelf)
+%I gedefinieerde commando's dienen eerst te worden
+%I geactiveerd met :
+%I
+%I \gebruikcommandos{\commando}
+%I
+%I Er mogen meerdere commando's tegelijk worden opgegeven:
+%I
+%I \gebruikcommandos{\alfa,\beta,gamma}
+%I
+%I waarbij de \ facultatief is. Er wordt niets gezet!
+
+% \docommando kan niet worden gebruikt omdat deze macro
+% soms lokaal wordt gebruikt
+
+% te zijner tijd:
+%
+% \definevariable {pc} % ProtectedCommand
+%
+% \def\executeprotected#1%
+% {\csname\??pc\string#1\endcsname}
+%
+% \def\defineprotected#1#2%
+% {\expandafter\def\csname\??pc\string#2\endcsname}
+%
+% \def\defineunprotected#1%
+% {\def#1}
+%
+% \def\doprotected%
+% {\ifx\next\define
+% \let\next=\defineprotected
+% \else
+% \let\next=\executeprotected
+% \fi
+% \next}
+%
+% \def\unexpanded%
+% {\futurelet\next\doprotected}
+%
+% \unexpanded\define\ziezo{ziezo}
+%
+% \unexpanded\ziezo
+
+\def\complexdodefinieer[#1]#2#3%
+ {\ifx#2\undefined
+ \else
+ \showmessage{\m!systems}{4}{\string#2}%
+ \fi
+ \ifcase0#1\def#2{#3}%
+ \or\def#2##1{#3}%
+ \or\def#2##1##2{#3}%
+ \or\def#2##1##2##3{#3}%
+ \or\def#2##1##2##3##4{#3}%
+ \or\def#2##1##2##3##4##5{#3}%
+ \or\def#2##1##2##3##4##5##6{#3}%
+ \or\def#2##1##2##3##4##5##6##7{#3}%
+ \or\def#2##1##2##3##4##5##6##7##8{#3}%
+ \or\def#2##1##2##3##4##5##6##7##8##9{#3}%
+ \else\def#2{#3}%
+ \fi}
+
+\def\definieer%
+ {\complexorsimpleempty{dodefinieer}}
+
+\def\naam#1%
+ {\geentest\getvalue{#1}}
+
+\def\gebruikcommandos#1%
+ {\bgroup
+ \def\docommando##1%
+ {\setbox0=\hbox{\getvalue{\string##1}##1}}%
+ \processcommalist[#1]\docommando
+ \egroup}
+
+%I n=Groeperen
+%I c=\start,\definieerstartstop
+%I
+%I Met behulp van de volgende commando's kan de werking van
+%I andere commando's worden beperkt:
+%I
+%I \start[label]
+%I \stop[label]
+%I
+%I Men is vrij in de keuze van het commentaar. Het gebruik
+%I van deze commando's komt overeen met het gebruiken van {}.
+%P
+%I Er kunnen \start-\stop-paren worden gedefinieerd en
+%I ingesteld met:
+%I
+%I \definieerstartstop[label][voor=,na=,commandos=,
+%I letter=]
+%I
+%I De aan 'voor' en 'na' toegekende commando's worden voor
+%I \start en na \stop uitgevoerd; de aan 'commando'
+%I toegekende commando's direct na \start.
+%I
+%I Naast het \start-\stop-paar is ook het verkorte commando
+%I beschikbaar:
+%I
+%I \label{tekst}
+
+\def\complexstart[#1]% % bgroup toegevoegd
+ {\bgroup\getvalue{\e!start#1}}
+
+\def\simplestart%
+ {\bgroup}
+
+\def\complexstop[#1]%
+ {\getvalue{\e!stop#1}\egroup} % egroup toegevoegd
+
+\def\simplestop%
+ {\egroup}
+
+\def\start%
+ {\complexorsimple{\e!start}}
+
+\def\stop%
+ {\complexorsimple{\e!stop}}
+
+\def\dodefinieerstartstop[#1][#2]%
+ {\getparameters
+ [\??be#1]
+ [\c!voor=,
+ \c!na=,
+ \c!commandos=,
+ \c!letter=,
+ #2]%
+ \setvalue{#1}##1%
+ {\bgroup
+ \getvalue{\??be#1\c!commandos}%
+ \doattributes{\??be#1}{##1}%
+ \egroup}%
+ \setvalue{\e!start#1}%
+ {\getvalue{\??be#1\c!voor}%
+ \bgroup
+ \getvalue{\??be#1\c!commandos}%
+ \dostartattributes{\??be#1}}%
+ \setvalue{\e!stop#1}%
+ {\dostopattributes
+ \egroup
+ \getvalue{\??be#1\c!na}}}
+
+\def\definieerstartstop%
+ {\dodoubleargument\dodefinieerstartstop}
+
+%I n=Verbergen
+%I c=\startverbergen
+%I
+%I Een deel van de tekst kan (tijdelijk) worden
+%I overgeslagen door deze te omhullen met de commando's:
+%I
+%I \startverbergen
+%I \stopverbergen
+
+\long\def\startverbergen#1\stopverbergen{}
+
+% gejat van Knuth (zie \copyright, p356)
+
+\def\omcirkeld#1%
+ {{\ooalign{\hfil\raise0.07ex\hbox{{\tfx#1}}\hfil\crcr\mathhexbox20D}}}
+
+\def\copyright
+ {\omcirkeld{c}}
+
+%I n=Systeem
+%I c=\stelsysteemin
+%I
+%I Systeemvariabelen kunnen worden ingesteld met het
+%I commando:
+%I
+%I \stelsysteemin[resolutie=,korps=]
+%I
+%I Aan 'resolutie' dient het aantal dpi (300).
+
+\def\dostelsysteemin[#1]%
+ {\getparameters[\??sv][#1]%
+ \beforesplitstring\@@svresolutie\at dpi\to\@@svresolutie
+ \let\outputresolution=\@@svresolutie}
+
+\def\stelsysteemin%
+ {\dosingleargument\dostelsysteemin}
+
+% Default-instellingen (verborgen)
+
+\resetutilities
+
+% Uitgestelde instellingen
+
+\def\dooutput{\sidefloatoutput} % redefinition of \dooutput
+
+% Default-instellingen (zichtbaar)
+
+\stelsysteemin
+ [\c!resolutie=300dpi,
+ \c!korps=\normalizedlocalcorpssize] % of iets anders
+
+% Pas op:
+%
+% Omdat er geen fonts geladen zijn kunnen we bij de maten geen
+% em's gebruiken. Bij afstanden is dit geen probleem, omdat
+% deze pas een rol spelen als er al een font geladen is.
+
+\stellayoutin
+ [ \c!kopwit=.08417508418\papierhoogte, % .08333 2.5cm
+ %\c!boven=.03367003367\papierhoogte, % .03331 1.0cm
+ \c!boven=\!!zeropoint,
+ \c!bovenafstand=\!!zeropoint,
+ \c!hoofd=.06734006734\papierhoogte, % .06667 2.0cm
+ \c!hoofdafstand=\!!zeropoint,
+ \c!hoogte=.84175084175\papierhoogte, % .83333 25.0cm
+ \c!voetafstand=\@@lyhoofdafstand,
+ \c!voet=.06734006734\papierhoogte, % .06667 2.0cm
+ \c!onderafstand=\@@lybovenafstand,
+ \c!onder=\!!zeropoint,
+ \c!rugwit=.11904761905\papierbreedte, % 2.5cm
+ %\c!rand=.14285714286\papierbreedte, % 3.0cm
+ \c!rand=\!!zeropoint,
+ \c!randafstand=\@@lymargeafstand,
+ %\c!marge=\@@lyrugwit,
+ %\c!marge=.07888078409\papierbreedte, % rugwit-2*afstand
+ \c!marge=.12649983170\papierbreedte, % snijwit-2*afstand
+ \c!margeafstand=.02008341748\papierbreedte, % 12.0pt
+ \c!linkerrand=\@@lyrand,
+ \c!linkerrandafstand=\@@lyrandafstand,
+ \c!linkermarge=\@@lymarge,
+ \c!linkermargeafstand=\@@lymargeafstand,
+ \c!breedte=.71428571429\papierbreedte, % 15.0cm
+ \c!rechtermargeafstand=\@@lymargeafstand,
+ \c!rechtermarge=\@@lymarge,
+ \c!rechterrandafstand=\@@lyrandafstand,
+ \c!rechterrand=\@@lyrand,
+ \c!kopoffset=\!!zeropoint,
+ \c!rugoffset=\!!zeropoint,
+ \c!letter=,
+ \c!markering=\v!uit,
+ \c!plaats=\v!enkelzijdig]
+
+% instellingen hierop terugvallen, bijvoorbeeld de volgende:
+
+\definieerpapierformaat [A0] [\c!breedte=841mm, \c!hoogte=1189mm]
+\definieerpapierformaat [A1] [\c!breedte=594mm, \c!hoogte=841mm]
+\definieerpapierformaat [A2] [\c!breedte=420mm, \c!hoogte=594mm]
+\definieerpapierformaat [A3] [\c!breedte=297mm, \c!hoogte=420mm]
+\definieerpapierformaat [A4] [\c!breedte=210mm, \c!hoogte=297mm]
+\definieerpapierformaat [A5] [\c!breedte=148mm, \c!hoogte=210mm]
+\definieerpapierformaat [A6] [\c!breedte=105mm, \c!hoogte=148mm]
+\definieerpapierformaat [A7] [\c!breedte=74mm, \c!hoogte=105mm]
+\definieerpapierformaat [A8] [\c!breedte=52mm, \c!hoogte=74mm]
+\definieerpapierformaat [A9] [\c!breedte=37mm, \c!hoogte=52mm]
+
+\definieerpapierformaat [B0] [\c!breedte=1000mm,\c!hoogte=1414mm]
+\definieerpapierformaat [B1] [\c!breedte=707mm, \c!hoogte=1000mm]
+\definieerpapierformaat [B2] [\c!breedte=500mm, \c!hoogte=707mm]
+\definieerpapierformaat [B3] [\c!breedte=354mm, \c!hoogte=500mm]
+\definieerpapierformaat [B4] [\c!breedte=250mm, \c!hoogte=354mm]
+\definieerpapierformaat [B5] [\c!breedte=177mm, \c!hoogte=250mm]
+\definieerpapierformaat [B6] [\c!breedte=125mm, \c!hoogte=177mm]
+\definieerpapierformaat [B7] [\c!breedte=88mm, \c!hoogte=125mm]
+\definieerpapierformaat [B8] [\c!breedte=63mm, \c!hoogte=88mm]
+\definieerpapierformaat [B9] [\c!breedte=44mm, \c!hoogte=63mm]
+
+\definieerpapierformaat [C0] [\c!breedte=917mm, \c!hoogte=1297mm]
+\definieerpapierformaat [C1] [\c!breedte=649mm, \c!hoogte=917mm]
+\definieerpapierformaat [C2] [\c!breedte=459mm, \c!hoogte=649mm]
+\definieerpapierformaat [C3] [\c!breedte=324mm, \c!hoogte=459mm]
+\definieerpapierformaat [C4] [\c!breedte=229mm, \c!hoogte=324mm]
+\definieerpapierformaat [C5] [\c!breedte=162mm, \c!hoogte=229mm]
+\definieerpapierformaat [C6] [\c!breedte=115mm, \c!hoogte=162mm]
+\definieerpapierformaat [C7] [\c!breedte=81mm, \c!hoogte=115mm]
+\definieerpapierformaat [C8] [\c!breedte=57mm, \c!hoogte=81mm]
+\definieerpapierformaat [C9] [\c!breedte=40mm, \c!hoogte=57mm]
+
+\definieerpapierformaat [S3] [\c!breedte=300pt, \c!hoogte=225pt]
+\definieerpapierformaat [S4] [\c!breedte=400pt, \c!hoogte=300pt]
+\definieerpapierformaat [S5] [\c!breedte=500pt, \c!hoogte=375pt]
+\definieerpapierformaat [S6] [\c!breedte=600pt, \c!hoogte=450pt]
+
+\definieerpapierformaat [CD] [\c!breedte=120mm, \c!hoogte=120mm]
+
+\definieerpapierformaat [letter] [\c!breedte=8.5in, \c!hoogte=11in]
+\definieerpapierformaat [legal] [\c!breedte=8.5in, \c!hoogte=14in]
+\definieerpapierformaat [folio] [\c!breedte=8.5in, \c!hoogte=13in]
+\definieerpapierformaat [executive] [\c!breedte=7.25in, \c!hoogte=10.5in]
+
+\definieerpapierformaat [envelope 9] [\c!breedte=8.88in, \c!hoogte=3.88in]
+\definieerpapierformaat [envelope 10] [\c!breedte=9.5in, \c!hoogte=4.13in]
+\definieerpapierformaat [envelope 11] [\c!breedte=10.38in,\c!hoogte=4.5in]
+\definieerpapierformaat [envelope 12] [\c!breedte=11.0in, \c!hoogte=4.75in]
+\definieerpapierformaat [envelope 14] [\c!breedte=11.5in, \c!hoogte=5.0in]
+\definieerpapierformaat [monarch] [\c!breedte=7.5in, \c!hoogte=3.88in]
+\definieerpapierformaat [check] [\c!breedte=8.58in, \c!hoogte=3.88in]
+\definieerpapierformaat [DL] [\c!breedte=220mm, \c!hoogte=110mm]
+
+% Let op: na \stellayoutin (omdat dit wordt aangeroepen).
+
+\stelpapierformaatin
+ [A4][A4]
+
+\stelkolommenin
+ [\c!n=2,
+ \c!lijn=\v!uit,
+ \c!tolerantie=\v!soepel,
+ \c!afstand=1.5\korpsgrootte, % influenced by switching
+ \c!hoogte=,
+ \c!balanceren=\v!ja,
+ \c!uitlijnen=\v!tekst,
+ \c!blanko={\v!regel,\v!vast},
+ \c!optie=,
+ \c!lijndikte=\linewidth,
+ \c!offset=.5\korpsgrootte]
+
+\stelhoofdtekstenin [\v!tekst] [] []
+\stelhoofdtekstenin [\v!marge] [] []
+\stelhoofdtekstenin [\v!rand] [] []
+
+\stelvoettekstenin [\v!tekst] [] []
+\stelvoettekstenin [\v!marge] [] []
+\stelvoettekstenin [\v!rand] [] []
+
+\stelteksttekstenin [\v!tekst] [] []
+\stelteksttekstenin [\v!marge] [] []
+\stelteksttekstenin [\v!rand] [] []
+
+\stelondertekstenin [\v!tekst] [] []
+\stelondertekstenin [\v!marge] [] []
+\stelondertekstenin [\v!rand] [] []
+
+\stelboventekstenin [\v!tekst] [] []
+\stelboventekstenin [\v!marge] [] []
+\stelboventekstenin [\v!rand] [] []
+
+\stelhoofdin [\c!status=\v!normaal,\c!voor=,\c!na=]
+\stelvoetin [\c!status=\v!normaal,\c!voor=,\c!na=]
+\steltekstin [\c!status=\v!normaal,\c!voor=,\c!na=]
+\stelbovenin [\c!status=\v!normaal,\c!voor=,\c!na=]
+\stelonderin [\c!status=\v!normaal,\c!voor=,\c!na=]
+
+\stelhoofdin [\c!na=\vss]
+\steltekstin [\c!voor=\vss,\c!na=\vss]
+\stelvoetin [\c!voor=\vss]
+
+\stelbovenin [\c!voor=\vss,\c!na=\vss]
+\stelonderin [\c!voor=\vss,\c!na=\vss]
+
+\stelhoofdin
+ [\v!tekst]
+ [\c!strut=\v!ja,
+ \c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!hoofd\v!tekst\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!hoofd\v!tekst\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!hoofd\v!tekst\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!hoofd\v!tekst\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelhoofdin
+ [\v!marge]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!hoofd\v!marge\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!hoofd\v!marge\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!hoofd\v!marge\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!hoofd\v!marge\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelhoofdin
+ [\v!rand]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!hoofd\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!hoofd\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!hoofd\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!hoofd\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelvoetin
+ [\v!tekst]
+ [\c!strut=\v!ja,
+ \c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!voet\v!tekst\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!voet\v!tekst\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!voet\v!tekst\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!voet\v!tekst\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelvoetin
+ [\v!marge]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!voet\v!marge\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!voet\v!marge\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!voet\v!marge\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!voet\v!marge\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelvoetin
+ [\v!rand]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!voet\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!voet\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!voet\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!voet\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelbovenin
+ [\v!tekst]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!boven\v!tekst\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!boven\v!tekst\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!boven\v!tekst\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!boven\v!tekst\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelbovenin
+ [\v!marge]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!boven\v!marge\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!boven\v!marge\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!boven\v!marge\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!boven\v!marge\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelbovenin
+ [\v!rand]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!boven\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!boven\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!boven\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!boven\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelonderin
+ [\v!tekst]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!boven\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!boven\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!boven\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!boven\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelonderin
+ [\v!marge]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!onder\v!marge\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!onder\v!marge\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!onder\v!marge\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!onder\v!marge\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelonderin
+ [\v!rand]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!onder\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!onder\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!onder\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!onder\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\steltekstin
+ [\v!tekst]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!tekst\v!tekst\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!tekst\v!tekst\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!tekst\v!tekst\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!tekst\v!tekst\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\steltekstin
+ [\v!marge]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!tekst\v!marge\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!tekst\v!marge\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!tekst\v!marge\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!tekst\v!marge\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\steltekstin
+ [\v!rand]
+ [\c!letter=,
+ \c!kleur=,
+ \c!linkertekst=,
+ \c!middentekst=,
+ \c!rechtertekst=,
+ \c!kantlijntekst=,
+ \c!margetekst=,
+ \c!linkerletter=\getvalue{\??tk\v!tekst\v!rand\c!letter},
+ \c!rechterletter=\getvalue{\??tk\v!tekst\v!rand\c!letter},
+ \c!linkerkleur=\getvalue{\??tk\v!tekst\v!rand\c!kleur},
+ \c!rechterkleur=\getvalue{\??tk\v!tekst\v!rand\c!kleur},
+ \c!linkerbreedte=,
+ \c!rechterbreedte=]
+
+\stelnummeringin
+ [\c!variant=\v!enkelzijdig,
+ \c!plaats={\v!hoofd,\v!midden},
+ \c!conversie=\v!cijfers,
+ \c!links=,
+ \c!rechts=,
+ \c!wijze=\v!per\v!deel,
+ \c!tekst=,
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \v!deel\c!nummer=\v!ja,
+ \c!nummerscheider=--,
+ \c!tekstscheider=\tfskip,
+ \c!status=\v!start,
+ \c!commando=,
+ \c!letter=\v!normaal,
+ \c!kleur=]
+
+\stelblankoin
+ [\v!standaard,
+ \v!groot]
+
+\stelkoppenin
+ [\c!variant=\v!normaal,
+ \c!sectienummer=\v!ja,
+ \c!scheider=.,
+ \c!commando=]
+
+\definieersectieblok [\v!hoofdtekst] [\v!hoofdteksten] [\c!nummer=\v!ja]
+\definieersectieblok [\v!bijlage] [\v!bijlagen] [\c!nummer=\v!ja]
+\definieersectieblok [\v!inleiding] [\v!inleidingen] [\c!nummer=\v!nee]
+\definieersectieblok [\v!uitleiding] [\v!uitleidingen] [\c!nummer=\v!nee]
+
+\definieersectie[\v!sectie-1] % deel
+\definieersectie[\v!sectie-2] % hoofdstuk
+\definieersectie[\v!sectie-3] % paragraaf
+\definieersectie[\v!sectie-4] % subparagraaf
+\definieersectie[\v!sectie-5] % subsubparagraaf
+\definieersectie[\v!sectie-6] % subsubsubparagraaf
+\definieersectie[\v!sectie-7] % subsubsubsubparagraaf
+
+% \c!eigennummer ook hier?
+
+\definieerkop
+ [\v!deel]
+ [\c!sectie=\v!sectie-1]
+
+\definieerkop
+ [\v!hoofdstuk]
+ [\c!sectie=\v!sectie-2]
+
+\definieerkop
+ [\v!paragraaf]
+ [\c!sectie=\v!sectie-3]
+
+\definieerkop
+ [\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectie-4,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectie-5,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectie-6,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectie-7,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!titel]
+ [\c!koppeling=\v!hoofdstuk,
+ \c!default=\v!hoofdstuk,
+ \c!verhoognummer=\v!nee]
+
+\definieerkop
+ [\v!onderwerp]
+ [\c!koppeling=\v!paragraaf,
+ \c!default=\v!paragraaf,
+ \c!verhoognummer=\v!nee]
+
+\definieerkop
+ [\v!sub\v!onderwerp]
+ [\c!koppeling=\v!sub\v!paragraaf,
+ \c!default=\v!sub\v!paragraaf,
+ \c!verhoognummer=\v!nee]
+
+\definieerkop
+ [\v!sub\v!sub\v!onderwerp]
+ [\c!koppeling=\v!sub\v!sub\v!paragraaf,
+ \c!default=\v!sub\v!sub\v!paragraaf,
+ \c!verhoognummer=\v!nee]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!onderwerp]
+ [\c!koppeling=\v!sub\v!sub\v!sub\v!paragraaf,
+ \c!default=\v!sub\v!sub\v!sub\v!paragraaf,
+ \c!verhoognummer=\v!nee]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!sub\v!onderwerp]
+ [\c!koppeling=\v!sub\v!sub\v!sub\v!sub\v!paragraaf,
+ \c!default=\v!sub\v!sub\v!sub\v!sub\v!paragraaf,
+ \c!verhoognummer=\v!nee]
+
+\stelsectiein
+ [\v!sectie-2]
+ [\v!bijlage\c!conversie=\v!Letter,
+ \c!vorigenummer=\v!nee]
+
+\stelkopin
+ [\v!deel]
+ [\c!plaatskop=\v!nee]
+
+\stelkopin
+ [\v!hoofdstuk]
+ [\v!bijlage\c!label=\v!bijlage,
+ \v!hoofdtekst\c!label=\v!hoofdstuk] % bijlageconversie=\Character
+
+\stelkopin
+ [\v!paragraaf]
+ [\v!bijlage\c!label=\v!paragraaf,
+ \v!hoofdtekst\c!label=\v!paragraaf] % bijlageconversie=\Character
+
+\stelkopin
+ [\v!sub\v!paragraaf]
+ [\v!bijlage\c!label=\v!sub\v!paragraaf,
+ \v!hoofdtekst\c!label=\v!sub\v!paragraaf] % bijlageconversie=\Character
+
+\stelkopin
+ [\v!sub\v!sub\v!paragraaf]
+ [\v!bijlage\c!label=\v!sub\v!sub\v!paragraaf,
+ \v!hoofdtekst\c!label=\v!sub\v!sub\v!paragraaf] % bijlageconversie=\Character
+
+\stelkopin
+ [\v!deel,\v!hoofdstuk]
+ [\c!uitlijnen=\v!normaal,
+ \c!doorgaan=\v!nee,
+ \c!pagina=\v!rechts,
+ \c!hoofd=,
+ \c!letter=\tfc,
+ \c!voor={\blanko[2*\v!groot]},
+ \c!na={\blanko[2*\v!groot]}]
+
+\stelkopin
+ [\v!paragraaf]
+ [\c!uitlijnen=\v!normaal,
+ \c!letter=\tfa,
+ \c!voor={\blanko[2*\v!groot]},
+ \c!na=\blanko]
+
+\definieersamengesteldelijst
+ [\v!inhoud]
+ [\v!deel,
+ \v!hoofdstuk,
+ \v!paragraaf,
+ \v!sub\v!paragraaf,
+ \v!sub\v!sub\v!paragraaf,
+ \v!sub\v!sub\v!sub\v!paragraaf,
+ \v!sub\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!niveau=\v!sub\v!sub\v!sub\v!sub\v!paragraaf,
+ \c!criterium=\v!lokaal]
+
+\stelblokkopjesin
+ [\c!plaats=\v!onder,
+ \c!voor=\blanko,
+ \c!tussen={\blanko[\v!middel]},
+ \c!na=\blanko,
+ \c!breedte=\v!passend,
+ \c!kopletter=\v!vet,
+ \c!letter=\v!normaal,
+ \c!kleur=,
+ \c!uitlijnen=,
+ \c!nummer=\v!ja,
+ \c!wijze=\@@nrwijze,
+ \c!blokwijze=\@@nrblokwijze,
+ \c!sectienummer=\@@nrsectienummer,
+ \c!conversie=\v!cijfers]
+
+\stelplaatsblokkenin
+ [\c!plaats=\v!midden,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!offset=\v!overlay,
+ \c!kader=\v!uit,
+ \c!straal=.5\korpsgrootte,
+ \c!hoek=\v!recht,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=,
+ \c!bovenkader=,
+ \c!onderkader=,
+ \c!linkerkader=,
+ \c!rechterkader=,
+ \c!voor=,
+ \c!na=,
+ \c!voor\c!wit=\v!groot,
+ \c!na\c!wit=\v!groot,
+ \c!zij\c!voor\c!wit=\@@bkvoorwit,
+ \c!zij\c!na\c!wit=\@@bknawit,
+ \c!marge=1em,
+ \c!nboven=2,
+ \c!nonder=0,
+ \c!nregels=4]
+
+\stelplaatsbloksplitsenin
+ [\c!conversie=\v!letter, % \v!romeins
+ \c!regels=3]
+
+\stelwitruimtein
+ [\v!geen]
+
+\inspringen
+ [\v!nooit]
+
+\stelinspringenin
+ [\v!geen]
+
+\stelopsommingenin % undocumented
+ [\c!niveaus=6,
+ \c!marge=\!!zeropoint,
+ \c!breedte=1.5em,
+ \c!factor=0,
+ \c!afstand=.5em,
+ \c!marletter=\c!type,
+ \c!symletter=,
+ \c!kopletter=,
+ \c!markleur=,
+ \c!symkleur=,
+ \c!kopkleur=,
+ \c!kopvoor=,
+ \c!kopna=\blanko,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!afsluiter=.,
+ \c!plaatsafsluiter=\v!ja,
+ \c!binnen=,
+ \c!n=2,
+ \c!items=4,
+ \c!symbool=\itemlevel]
+
+\steldoorspringenin
+ [\c!letter=\v!normaal,
+ \c!kopletter=\v!normaal,
+ \c!kleur=,
+ \c!kopkleur=,
+ \c!breedte=\v!passend,
+ \c!tekst=...,
+ \c!monster=,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!scheider={ :}]
+
+\stelnummerenin
+ [\c!wijze=\v!per\v!hoofdstuk,
+ \c!blokwijze=,
+ \c!sectienummer=\v!ja,
+ \c!status=\v!start]
+
+\stelformulesin
+ [\c!wijze=\@@nrwijze,
+ \c!blokwijze=,
+ \c!sectienummer=\@@nrsectienummer,
+ \c!plaats=\v!rechts,
+ \c!links=(,
+ \c!rechts=)]
+
+\stelreferentielijstin
+ [\c!letter=\v!normaal]
+
+\stelinmargein
+ [\c!letter=\v!vet,
+ \c!kleur=,
+ \c!plaats=\v!beide,
+ \c!uitlijnen=\v!binnen,
+ \c!voor=,
+ \c!na=]
+
+\stelinmargein
+ [\v!links]
+ [\c!plaats=\v!links,
+ \c!uitlijnen=\v!links]
+
+\stelinmargein
+ [\v!rechts]
+ [\c!plaats=\v!rechts,
+ \c!uitlijnen=\v!rechts]
+
+\versie
+ [\v!definitief]
+
+\stelpaginanummerin
+ [\c!nummer=1]
+
+\stelsubpaginanummerin
+ [\c!wijze=\v!per\v!deel,
+ \c!status=\v!stop]
+
+\stelsmallerin
+ [\c!links=1.5em,
+ \c!rechts=1.5em,
+ \c!midden=1.5em]
+
+\stelrefererenin
+ [\c!status=\v!start,
+ \v!deel\c!nummer=\v!ja,
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \c!interactie=\v!alles,
+ \c!prefix=]
+
+\stelregelnummerenin
+ [\c!conversie=\v!cijfers,
+ \c!start=1,
+ \c!stap=1,
+ \c!plaats=\v!inmarge,
+ \c!letter=,
+ \c!kleur=,
+ \c!breedte=2em,
+ \c!prefix=,
+ \c!refereren=\v!aan]
+
+\definieeropmaak
+ [\v!standaard]
+ [\c!breedte=\zetbreedte,
+ \c!hoogte=\teksthoogte,
+ \c!voffset=\!!zeropoint,
+ \c!hoffset=\!!zeropoint,
+ \c!pagina=\v!rechts,
+ \c!dubbelzijdig=\v!ja]
+
+\stelpositionerenin
+ [\c!eenheid=\s!cm,
+ \c!factor=1,
+ \c!schaal=1,
+ \c!xstap=\v!absoluut,
+ \c!ystap=\v!absoluut,
+ \c!offset=\v!ja,
+ \c!xoffset=\!!zeropoint,
+ \c!yoffset=\!!zeropoint]
+
+\stelregelsin
+ [\c!voor=\blanko,
+ \c!na=\blanko,
+ \c!inspringen=\v!nee]
+
+\steldoordefinierenin
+ [\c!plaats=\v!links,
+ \c!kopletter=\v!vet,
+ \c!letter=\v!normaal,
+ \c!kleur=,
+ \c!kopkleur=,
+ \c!breedte=8em,
+ \c!hang=,
+ \c!monster=,
+ \c!uitlijnen=,
+ \c!inspringen=\v!nee,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!commando=]
+
+\steldoornummerenin
+ [\c!plaats=\v!boven,
+ \c!kopletter=\v!vet,
+ \c!kopkleur=,
+ \c!letter=\v!normaal,
+ \c!kleur=,
+ \c!breedte=8em,
+ \c!hang=,
+ \c!monster=,
+ \c!uitlijnen=,
+ \c!inspringen=\v!nee,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!tekst=,
+ \c!niveaus=3, % to be upward compatible
+ \c!conversie=, % to be upward compatible
+ \c!wijze=\v!per\v!tekst,
+ \c!sectienummer=\v!ja,
+ \c!scheider=.,
+ \c!afsluiter=,
+ \c!nummer=]
+
+\stelkoppeltekenin
+ [\c!teken=\compoundhyphen]
+
+\stelnaastplaatsenin
+ [\c!status=\v!stop]
+
+\steltolerantiein
+ [\v!horizontaal,\v!zeerstreng]
+
+\steltolerantiein
+ [\v!vertikaal,\v!streng]
+
+\steluitlijnenin
+ [\v!onder,
+ \v!breedte]
+
+\stelspatieringin
+ [\v!opelkaar]
+
+\definieerregister
+ [\v!index]
+ [\v!indices]
+
+\definieerplaatsblok
+ [\v!figuur]
+ [\v!figuren]
+
+\definieerplaatsblok
+ [\v!tabel]
+ [\v!tabellen]
+
+\stelplaatsblokin
+ [\v!tabel]
+ [\c!kader=\v!uit]
+
+\definieerplaatsblok
+ [\v!intermezzo]
+ [\v!intermezzos]
+
+\definieerplaatsblok
+ [\v!grafiek]
+ [\v!grafieken]
+
+\definieersynoniemen
+ [\v!afkorting]
+ [\v!afkortingen]
+ [\voluit]
+
+\stelsynoniemenin
+ [\v!afkorting]
+ [\c!tekstletter=\v!kapitaal,
+ \c!synoniemletter=,
+ \c!tekstkleur=,
+ \c!synoniemkleur=,
+ \c!plaats=\v!links,
+ \c!breedte=5em,
+ \c!status=\v!start]
+
+\definieersorteren
+ [\v!logo]
+ [\v!logos]
+
+\definieersynoniemen
+ [\v!eenheid]
+ [\v!eenheden]
+ [\betekenis]
+
+\stelsynoniemenin
+ [\v!eenheid]
+ [\c!tekstletter=\geentest\dimension]
+
+\stelmargeblokkenin
+ [\c!status=\v!start,
+ \c!plaats=\v!inmarge,
+ \c!breedte=\rechtermargebreedte,
+ \c!letter=,
+ \c!kleur=,
+ \c!uitlijnen=,
+ \c!links=,
+ \c!rechts=,
+ \c!boven=,
+ \c!tussen=\blanko,
+ \c!onder=\vfill,
+ \c!voor=,
+ \c!na=]
+
+\stelachtergrondenin
+ [\v!pagina]
+ [\c!kader=\v!uit,
+ \c!straal=.5\korpsgrootte,
+ \c!hoek=\v!recht,
+ \c!achtergrond=,
+ \c!raster=\@@rsraster,
+ \c!kleur=,
+ \c!kaderoffset=\getvalue{\??ma\v!pagina\c!offset},
+ \c!achtergrondoffset=\getvalue{\??ma\v!pagina\c!offset},
+ \c!offset=\!!zeropoint,
+ \c!diepte=\!!zeropoint,
+ \c!scheider=\v!nee]
+
+\stelbufferin
+ [\c!voor=,
+ \c!na=]
+
+\stellijstin
+ [\v!deel]
+ [\c!breedte=0em,
+ \c!voor={\blanko\pagina[\v!voorkeur]},
+ \c!na=\blanko,
+ \c!label=\v!ja,
+ \c!scheider=:,
+ \c!afstand=1em]
+
+\stellijstin
+ [\v!hoofdstuk]
+ [\c!breedte=2em,
+ \c!voor={\blanko\pagina[\v!voorkeur]},
+ \c!na=]
+
+\stellijstin
+ [\v!paragraaf]
+ [\c!breedte=3em]
+
+\stellijstin
+ [\v!sub\v!paragraaf]
+ [\c!breedte=4em]
+
+\stellijstin
+ [\v!sub\v!sub\v!paragraaf]
+ [\c!breedte=5em]
+
+\stellijstin
+ [\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!breedte=6em]
+
+\stellijstin
+ [\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!breedte=7em]
+
+\def\documentstyle%
+ {\showmessage{\m!systems}{3}{}
+ \stoptekst}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-01b.tex b/tex/context/base/core-01b.tex new file mode 100644 index 000000000..ac3328f28 --- /dev/null +++ b/tex/context/base/core-01b.tex @@ -0,0 +1,1380 @@ +%D \module
+%D [ file=core-01b,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=1B (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros (b)}
+
+\unprotect
+
+%I n=Items
+%I c=\items,\stelitemsin
+%I
+%I Met het commando \items kunnen invullijsten worden
+%I gegenereerd:
+%I
+%I \items{alternatief1,alternatief2,...,alternatiefN}
+%I
+%I Als in plaats van een alternatief een - wordt gegeven,
+%I dan wordt ruimte opengelaten.
+%I
+%I De wijze waarop items worden weergegeven wordt ingesteld
+%I met het commando:
+%I
+%I \stelitemsin[plaats=,symbool=,breedte=,n=,voor=,
+%I tussen=,na=,uitlijnen=]
+%I
+%I Mogelijke plaatsen zijn links, rechts, onder, boven en
+%I inmarge. Als breedte wordt de breedte van de totale tekst
+%I opgegeven. Het aantal is facultatief, eventueel kan er
+%I 'onbekend' worden meegegeven. Uitlijnen is 'ja' of 'nee'.
+%P
+%I Indien gewenst, kan de instelling direkt achter \item worden
+%I geplaatst:
+%I
+%I \items[plaats=,symbool=,...]{alternatief1,...}
+%I
+%I In plaats van een symbool kan ook een van de volgende
+%I aanduidingen worden meegegeven:
+%I
+%I a a, b, c, d, ...
+%I A A, B, C, D, ...
+%I n 1, 2, 3, 4, ...
+%I r i, ii, iii, ...
+%I R I, II, III, ...
+%I
+%I Eventueel kan een nummer worden meegegeven. In dat
+%I geval wordt het overeenkomstige symbool van de
+%I opsomming gebruikt (1--n).
+
+%\def\checkinterlineskip%
+% {\ifvmode
+% \ifdim\lastskip>\!!zeropoint\relax
+% \nointerlineskip
+% \else\ifdim\lastkern>\!!zeropoint\relax
+% \nointerlineskip
+% \fi\fi
+% \fi}
+
+\def\horitems#1#2% #1=breedte #2=commandos
+ {\dimen0=#1\relax
+ \divide\dimen0 by \nofitems
+ \!!counta=0\relax
+ \def\docommando##1%
+ {\advance\!!counta by 1\relax
+ \processaction
+ [\@@isuitlijnen]
+ [ \v!links=>\hbox to \dimen0{\strut##1\hss},
+ \v!rechts=>\hbox to \dimen0{\hss\strut##1},
+ \v!midden=>\hbox to \dimen0{\hss\strut##1\hss},
+ \v!marge=>\ifnum\!!counta=1\hss\else\hfill\fi
+ \strut##1%
+ \ifnum\!!counta=\nofitems\hss\else\hfill\fi,
+ \s!default=>\hbox to \dimen0{\hss\strut##1\hss}, % midden
+ \s!unknown=>\hbox to \dimen0{\strut##1\hss}]}% % links
+ \hbox to #1{\hss#2\hss}}
+
+\def\veritems#1#2% #1=breedte #2=commandos
+ {\dimen0=#1\relax
+ \def\docommando##1%
+ {\ifdim\dimen0<\!!zeropoint\relax % the - was a signal
+ \hbox to -\dimen0{\hss\strut##1}%
+ \else\ifdim\dimen0>\!!zeropoint\relax
+ \hbox to \dimen0{\strut##1\hss}%
+ \else
+ \hbox{\strut##1}%
+ \fi\fi}%
+ \vbox{#2}}
+
+\def\dostelitemsin[#1]% maakt direkt gebruik van \??ss en \??cv
+ {\getparameters[\??is][#1]%
+ \doif{\@@isbreedte}{\v!onbekend}
+ {\def\@@isbreedte{\hsize}}%
+ \doifdefinedelse{\??cv\@@issymbool}
+ {\def\doitembullet##1{\convertnumber{\@@issymbool}{##1}}}
+ {\doifdefined{\??ss\@@issymbool}
+ {\def\doitembullet##1{\symbol[\@@issymbool]}}}}
+
+\def\makeitemsandbullets#1%
+ {\doifelse{\@@isn}{\v!onbekend}
+ {\getcommalistsize[#1]%
+ \edef\nofitems{\commalistsize}}
+ {\edef\nofitems{\@@isn}}%
+ \setbox0=\hbox
+ {\doitems
+ {\@@isbreedte}
+ {\processcommalist[#1]\docommando}}%
+ \setbox2=\hbox
+ {\doitems
+ {\@@isbulletbreedte}
+ {\herhaal[\nofitems*\docommando{\strut\doitembullet{\herhaler}}]}}}
+
+\def\dostartitems#1#2#3%
+ {\let\doitems=#2
+ \def\@@isbulletbreedte{#3}%
+ \makeitemsandbullets{#1}%
+ \@@isvoor}
+
+\def\dostopitems%
+ {\@@isna
+ \egroup}
+
+\def\doitemsboven#1%
+ {\dostartitems{#1}\horitems\@@isbreedte
+ \noindent\vbox
+ {\forgetall
+ \doifsomething{\@@issymbool}
+ {\doifnot{\@@issymbool}{\v!geen}
+ {\box2
+ \@@istussen
+ \nointerlineskip}}%
+ \box0}%
+ \dostopitems}
+
+\def\doitemsonder#1%
+ {\dostartitems{#1}\horitems\@@isbreedte
+ \noindent\vbox
+ {\forgetall
+ \box0
+ \doifsomething{\@@issymbool}
+ {\@@istussen
+ \nointerlineskip
+ \box2}}%
+ \dostopitems}
+
+\def\doitemsinmarge#1%
+ {\dostartitems{#1}{\veritems}{-1.5em}% - is a signal
+ \noindent\hbox{\llap{\box2\hskip\linkermargeafstand}\box0}%
+ \dostopitems}
+
+\def\doitemslinks#1%
+ {\advance\hsize by -1.5em\relax
+ \dostartitems{#1}{\veritems}{1.5em}%
+ \noindent\hbox{\box2\box0}%
+ \dostopitems}
+
+\def\doitemsrechts#1%
+ {\dostartitems{#1}{\veritems}{0em}%
+ \noindent\hbox{\box0\hskip-\wd2\box2}%
+ \dostopitems}
+
+\def\stelitemsin%
+ {\dosingleargument\dostelitemsin}
+
+\def\complexitems[#1]%
+ {\bgroup
+ \stelitemsin[#1]%
+ \parindent=\!!zeropoint
+ \setlocalhsize
+ \hsize=\localhsize
+ \mindermeldingen
+ \getvalue{doitems\@@isplaats}}
+
+\definecomplexorsimpleempty\items
+
+%I n=Tabulatie (1)
+%I c=\definieeralineas,\stelalineasin
+%I
+%I Er kunnen paragrafen in meerdere kolommen worden gezet na
+%I het commando:
+%I
+%I \definieeralineas[naam][n=,voor=,na=,afstand=,
+%I hoogte=,lijn=,binnen=]
+%I
+%I Kolommen worden vervolgens gezet met:
+%I
+%I \startnaam .... \naam .... \naam .... \stopnaam
+%I
+%I of (soms verwarrend):
+%I
+%I \naam .... \naam .... \naam .... \naam
+%I
+%I of (lekker kort):
+%I
+%I \naam .... \\ .... \\ .... \\
+%I
+%I waarbij het aantal malen .... \naam of \\ gelijk is
+%I aan n. Naast \naam en \\ is ook \volgendenaam toegestaan.
+%P
+%I Het is mogelijk per kolom een en ander in te stellen met
+%I het commando:
+%I
+%I \stelalineasin[naam][kolomnummer][afstand=,breedte=,
+%I hoogte=,boven=,onder=,letter=,binnen=,lijn=,
+%I uitlijnen=,tolerantie=]
+%I
+%I Standaard is \tabulatie gedefinieerd.
+
+% Te zijner tijd [plaats=boven,onder,midden] implementeren,
+% in dat geval moet eerst de maximale hoogte worden bepaald.
+%
+% Overigens kan een en ander mooier met \halign.
+
+\def\dodefinieeralineas[#1][#2]%
+ {\setvalue{\s!do\s!next#1}%
+ {\def\\{\getvalue{#1}}}%
+ \setvalue{#1}%
+ {\getvalue{\s!do\s!next#1}%
+ \dostartalineas{#1}}%
+ \setvalue{\e!volgende#1}%
+ {\getvalue{#1}}%
+ \setvalue{\e!start#1}%
+ {\bgroup
+ \setvalue{\s!do\s!next#1}{}%
+ \setvalue{\e!stop#1}%
+ {\getvalue{#1}%
+ \egroup}%
+ \getvalue{#1}}%
+ \getparameters[\??al#1]%
+ [\c!n=3,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!afstand=1em,
+ \c!hoogte=\v!passend,
+ \c!lijn=\v!uit,
+ \c!commando=,
+ \c!uitlijnen=,
+ \c!tolerantie=\v!soepel,
+ \c!letter=,
+ \c!kleur=,
+ \c!boven=,
+ \c!boven=\vss,
+ \c!onder=\vfill,
+ #2]%
+ \setvalue{\e!stel#1\e!in}%
+ {\stelalineasin[#1]}%
+ \dorecurse
+ {\getvalue{\??al#1\c!n}}
+ {\stelalineasin[#1][\recurselevel]
+ [\c!breedte=,
+ \c!onder=\getvalue{\??al#1\c!onder},
+ \c!boven=\getvalue{\??al#1\c!boven},
+ \c!hoogte=\getvalue{\??al#1\c!hoogte},
+ \c!letter=\getvalue{\??al#1\c!letter},
+ \c!kleur=\getvalue{\??al#1\c!kleur},
+ \c!lijn=\getvalue{\??al#1\c!lijn},
+ \c!uitlijnen=\getvalue{\??al#1\c!uitlijnen},
+ \c!tolerantie=\getvalue{\??al#1\c!tolerantie},
+ \c!afstand=\getvalue{\??al#1\c!afstand}]}%
+ \stelalineasin[#1][1][\c!afstand=0em]}
+
+\def\definieeralineas%
+ {\dodoubleargument\dodefinieeralineas}
+
+\def\dostelalineasin[#1][#2][#3]%
+ {\doifelse{#2}{\v!elk}
+ {\dorecurse
+ {\getvalue{\??al#1\c!n}}
+ {\getparameters[\??al#1\herhaler][#3]}}
+ {\ConvertToConstant\doifelse{#3}{}
+ {\getparameters[\??al#1][#2]}
+ {\def\docommando##1%
+ {\getparameters[\??al#1##1][#3]}%
+ \processcommalist[#2]\docommando}}}
+
+\def\stelalineasin%
+ {\dotripleempty\dostelalineasin}
+
+\newcount\alteller
+\newcount\alnsize
+\newdimen\alhsize
+
+\def\doalinealijn#1#2%
+ {\doifelsevalue{\??al#2\the\alteller\c!lijn}{\v!aan}
+ {\expandafter\dimen2=#1\relax
+ \hskip.5\dimen2
+ \hskip-\linewidth
+ \vrule\!!width\linewidth
+ \hskip.5\dimen2}
+ {\hskip#1}}
+
+\def\dostartalinea#1%
+ {\doifelsevaluenothing{\??al#1\the\alteller\c!breedte}
+ {\!!widtha=\alhsize\relax
+ \divide\!!widtha by \alnsize}
+ {\!!widtha=\getvalue{\??al#1\the\alteller\c!breedte}\relax}%
+ \dostartattributes{\??al#1\the\alteller}{}%
+ \doifelsevalue{\??al#1\the\alteller\c!hoogte}{\v!passend}
+ {\setbox0=\vtop}
+ {\setbox0=\vtop to \getvalue{\??al#1\the\alteller\c!hoogte}}%
+ \bgroup
+ \blanko[\v!blokkeer]%
+ \forgetall
+ \getvalue{\??al#1\the\alteller\c!boven}%
+ \getvalue{\??al#1\c!binnen}%
+ \hsize=\!!widtha % setting \wd afterwards removed
+ \getvalue{\??al#1\the\alteller\c!binnen}%
+ \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!uitlijnen}}% nodig?
+ \expandafter\steluitlijnenin\expandafter[\!!stringa]%
+ \edef\!!stringa{\getvalue{\??al#1\the\alteller\c!tolerantie}}% nodig?
+ \expandafter\steltolerantiein\expandafter[\!!stringa]%
+ \ignorespaces
+ \endgraf
+ \ignorespaces
+ %
+ % Nadeel van de onderstaande constructie is dat \everypar
+ % binnen een groep kan staan en zo steeds \begstruts
+ % worden geplaatst. Mooi is anders dus moet het anders!
+ %
+ % Hier is \Everypar niet nodig.
+ %
+ \everypar{\begstrut\everypar{}}%
+ %
+ \ignorespaces\geenspatie % dubbel: \ignorespaces
+ \getvalue{\??al#1\the\alteller\c!commando}}
+
+\def\dostopalinea#1%
+ {\ifvmode
+ \removelastskip
+ \else
+ \unskip\endstrut\endgraf
+ \fi
+ \getvalue{\??al#1\the\alteller\c!onder}%
+ \egroup
+ \ifdim\wd0=\!!zeropoint % no data
+ \wd0=\!!widtha
+ \fi
+ \box0
+ \dostopattributes
+ \ifnum\alteller<\getvalue{\??al#1\c!n}\relax
+ \def\next{\doalinea{#1}}%
+ \else
+ \def\next{\dostopalineas{#1}}%
+ \fi
+ \next}
+
+\def\doalinea#1%
+ {\global\advance\alteller by 1\relax
+ \doifelsevaluenothing{\??al#1\the\alteller\c!afstand}
+ {\doifnot{\the\alteller}{1}
+ {\hskip\getvalue{\??al#1\c!afstand}}}
+ {\doifelse{\the\alteller}{1}%
+ {\hskip\getvalue{\??al#1\the\alteller\c!afstand}}
+ {\doalinealijn{\getvalue{\??al#1\the\alteller\c!afstand}}{#1}}}%
+ \setvalue{#1}{\dostopalinea{#1}}%
+ \dostartalinea{#1}}
+
+\def\dostartalineas#1%
+ {\global\alteller=0\relax
+ \parindent=\!!zeropoint
+ \setlocalhsize
+ \alhsize=\localhsize
+ \alnsize=\getvalue{\??al#1\c!n}\relax
+ \dorecurse
+ {\getvalue{\??al#1\c!n}}
+ {\doifelsevaluenothing{\??al#1\recurselevel\c!afstand}
+ {\doifnot{\recurselevel}{1}
+ {\global\advance\alhsize by -\getvalue{\??al#1\c!afstand}\relax}}
+ {\global\advance\alhsize by -\getvalue{\??al#1\recurselevel\c!afstand}\relax}%
+ \doifvaluesomething{\??al#1\recurselevel\c!breedte}
+ {\global\advance\alnsize by -1\relax
+ \global\advance\alhsize by -\getvalue{\??al#1\recurselevel\c!breedte}\relax}}%
+ %\witruimte % gaat fout bij \framed
+ \getvalue{\??al#1\c!voor}%
+ \leavevmode % gaat wel goed bij \framed
+ \vbox\bgroup\hbox\bgroup
+ \doalinea{#1}}
+
+\def\dostopalineas#1%
+ {\egroup
+ \egroup
+ \par
+ \getvalue{\??al#1\c!na}}%
+
+%I n=Tabulatie (2)
+%I c=\steltabin,\tab
+%I
+%I Eenvoudige tabulatie is mogelijk met het commando:
+%I
+%I \tab{tekst} tekst tekst tekst .....
+%I
+%I Instelling vindt plaats met het commando:
+%I
+%I \steltabin[monster=,breedte=,kopletter=,voor,
+%I na=]
+%I
+%I Dit commando is een vereenvoudigde variant van het
+%I commando \doordefinieren. In de regel kan volstaan
+%I worden met het opgeven van een monster. Dit is het
+%I woord dat de breedte bepaalt.
+
+\def\dosteltabin[#1]%
+ {\getparameters[\??ta]
+ [\c!kopletter=\v!normaal,
+ \c!kopkleur=,
+ \c!letter=\v!normaal,
+ \c!kleur=,
+ \c!breedte=\v!ruim,
+ \c!monster={\hskip4em},
+ \c!voor=,
+ \c!na=,
+ #1]%
+ \doordefinieren
+ [tab]
+ [\c!kopletter=\@@takopletter,
+ \c!kopkleur=\@@takleur,
+ \c!monster=\@@tamonster,
+ \c!breedte=\@@tabreedte,
+ \c!voor=\@@tavoor,
+ \c!na=\@@tana]}
+
+\def\steltabin%
+ {\dosingleargument\dosteltabin}
+
+%I n=Diversen
+%I c=\celsius,\bedrag,\breuk
+%I c=\procent,\promille
+%I
+%I De volgende commando's vatten (vooral mathematische)
+%I zetcommando's samen:
+%I
+%I \chem{symbool}{onder}{boven} chemische symbolen
+%I \celsius{graden} graden Celsius (..~øC)
+%I \breuk{boven}{onder} breuken («)
+%I \bedrag{getal} geldbedragen (Ÿ~..)
+%I \punten[n] puntjes (. . .)
+%I \ongeveer plus-minus (ñ)
+%I \inch inch ('')
+%I \doorsnede \circ doorsneden met /
+%I \graden ø (^\circ)
+%I \procent percentage (vgl promille)
+%I \promille promilage
+%I \dollar dollar teken
+%I \sterling pound sterling teken
+%I \florijn gulden teken
+
+% The following macro's are derived from PPCHTEX and
+% therefore take some LaTeX font-switching into account.
+
+\newif\ifloweredsubscripts
+
+% Due to some upward incompatibality of LaTeX to LaTeX2.09
+% and/or LaTeX2e we had to force \@@chemieletter. Otherwise
+% some weird \nullfont error comes up.
+
+\doifundefined{@@chemieletter}{\def\@@chemieletter{\rm}}
+
+\def\beginlatexmathmodehack%
+ {\ifmmode
+ \let\endlatexmathmodehack=\relax
+ \else
+ \def\endlatexmathmodehack{$}$\@@chemieletter
+ \fi}
+
+\def\setsubscripts%
+ {\beginlatexmathmodehack
+ \def\dosetsubscript##1##2##3%
+ {\dimen0=##3\fontdimen5##2%
+ \setxvalue{@@\string##1\string##2}{\the##1##2\relax}%
+ ##1##2=\dimen0\relax}%
+ \def\dodosetsubscript##1##2%
+ {\dosetsubscript{##1}{\textfont2}{##2}%
+ \dosetsubscript{##1}{\scriptfont2}{##2}%
+ \dosetsubscript{##1}{\scriptscriptfont2}{##2}}%
+ %\dodosetsubscript{\fontdimen14}{?}%
+ \dodosetsubscript{\fontdimen16}{.7}%
+ \dodosetsubscript{\fontdimen17}{.7}%
+ \global\loweredsubscriptstrue
+ \endlatexmathmodehack}
+
+\def\resetsubscripts%
+ {\ifloweredsubscripts
+ \beginlatexmathmodehack
+ \def\doresetsubscript##1##2%
+ {\dimen0=\getvalue{@@\string##1\string##2}\relax
+ ##1##2=\dimen0}%
+ \def\dodoresetsubscript##1%
+ {\doresetsubscript{##1}{\textfont2}%
+ \doresetsubscript{##1}{\scriptfont2}%
+ \doresetsubscript{##1}{\scriptscriptfont2}}%
+ %\dodoresetsubscript{\fontdimen14}%
+ \dodoresetsubscript{\fontdimen16}%
+ \dodoresetsubscript{\fontdimen17}%
+ \global\loweredsubscriptsfalse
+ \endlatexmathmodehack
+ \fi}
+
+\let\beginlatexmathmodehack = \relax
+\let\endlatexmathmodehack = \relax
+
+\def\chem#1#2#3%
+ {\bgroup
+ \setsubscripts
+ \mathematics{\hbox{#1}_{#2}^{#3}}%
+ \resetsubscripts
+ \egroup}
+
+\def\celsius#1%
+ {#1\mathematics{^\circ}C}
+
+\def\graden%
+ {\mathematics{^\circ}}
+
+\def\inch%
+ {\hbox{\rm\char125\relax}}
+
+\def\breuk#1#2%
+ {\mathematics{#1\over#2}}
+
+\def\bedrag#1%
+ {\mathematics{f~}\hbox{#1}}
+
+\def\doorsnede%
+ {\hbox{\rlap/$\circ$} }
+
+\def\complexpunten[#1]%
+ {\dimen0=.5em\relax
+ \multiply\dimen0 by #1\relax
+ \hbox to \dimen0
+ {\leaders\hbox to .5em{\hss.\hss}\hss}}
+
+\def\simplepunten%
+ {\complexpunten[5]}
+
+\def\punten%
+ {\complexorsimple{punten}}
+
+\def\ongeveer%
+ {\mathematics{\pm}}
+
+\def\permille%
+ {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle00}}}
+
+\def\percent%
+ {\mathematics{^{\scriptscriptstyle0}\kern-.25em/\kern-.2em_{\scriptscriptstyle0}}}
+
+\let\promille=\permille
+\let\procent =\percent
+
+% for compatibility
+
+\def\onbekend%
+ {\mathematics{\ldots}}
+
+% currency
+
+\def\dollar%
+ {\bgroup
+ \ifnum\fam=\itfam
+ \sl
+ \else\ifnum\fam=\bifam
+ \bs
+ \fi\fi
+ \$%
+ \egroup}
+
+\def\sterling%
+ {\bgroup
+ \ifnum\fam=\bffam
+ \bi
+ \else\ifnum\fam=\bifam
+ \bi
+ \else\ifnum\fam=\bsfam
+ \bi
+ \else
+ \it
+ \fi\fi\fi
+ \$%
+ \egroup}
+
+\def\florijn%
+ {\bgroup
+ \ifnum\fam=\bffam
+ \bi
+ \else\ifnum\fam=\bifam
+ \bi
+ \else\ifnum\fam=\bsfam
+ \bi
+ \else
+ \it
+ \fi\fi\fi
+ f%
+ \egroup}
+
+%I n=Citaten
+%I c=\startcitaat,\citaat,\stelcitatenin
+%I c=\citeer,\stelciterenin
+%I
+%I Als variant op \startsmaller is het volgende commando
+%I beschikbaar:
+%I
+%I \startcitaat
+%I tekst
+%I \stopcitaat
+%I
+%I Rond de tekst worden in de marge dubbele quotes
+%I geplaatst. Ook bij dit commando kunnen tussen [] maten
+%I worden opgegeven:
+%I
+%I \startcitaat[2*links,rechts]
+%I
+%I In de lopende tekst kan gebruik worden gemaakt van:
+%I
+%I \citaat{tekst}
+%I \citeer{tekst}
+%I
+%I Het eerste commando levert dubbele quotes en het tweede
+%I enkele quotes.
+%P
+%I Er zijn twee varianten (1 en 2) beschikbaar die kunnen
+%I worden ingesteld met:
+%I
+%I \stelciterenin
+%I [variant=,letter=]
+%I
+%I Variant 1 levert 'ziezo' of ''ziezo'' en variant 2
+%I levert `ziezo' of ``ziezo''.
+
+\newsignal\quotationsignal
+\def\quotationskip{.125em}
+
+\def\stelciterenin%
+ {\dodoubleargument\getparameters[\??ci]}
+
+\def\stelcitatenin%
+ {\stelciterenin}
+
+\def\dostartcitaat%
+ {\setbox0=\hbox{\getvalue{\??la\currentlanguage\c!leftquotation}}%
+ \hskip-\wd0
+ \box0\relax
+ \ignorespaces}
+
+\def\complexstartcitaat[#1]%
+ {\startsmaller[#1]%
+ \dostartcitaat}
+
+\def\simplestartcitaat%
+ {\startsmaller
+ \dostartcitaat}
+
+\def\stopcitaat%
+ {\unskip\hsmash{\getvalue{\??la\currentlanguage\c!rightquotation}}%
+ \stopsmaller}
+
+\def\startcitaat%
+ {\complexorsimple{startcitaat}}%
+
+\def\handlequotation#1%
+ {\ifdim\lastkern=\quotationsignal
+ \unskip
+ \hskip\quotationskip
+ \fi
+ \getvalue{\??la\currentlanguage#1}%
+ \kern\quotationsignal}
+
+\def\citaat%
+ {\groupedcommand
+ {\handlequotation\c!leftquotation}
+ {\handlequotation\c!rightquotation}}
+
+\def\citeer%
+ {\doifelse{\@@ciletter}{\v!normaal}
+ {\let\next=\doquotedcite}
+ {\let\next=\doattributedcite}%
+ \next}
+
+\def\doquotedcite%
+ {\groupedcommand
+ {\handlequotation\c!leftquote}
+ {\handlequotation\c!rightquote}}
+
+\def\doattributedcite%
+ {\groupedcommand
+ {\dostartattributes\??ci}
+ {\dostopattributes}}
+
+% Tijden horen hier niet thuis en zullen in een aparte
+% module worden ondergebracht. voorlopig handhaven we ze nog
+% even. Een implementatie met \doordefinieren zou beter voldoen
+% omdat een en ander dan instelbaar wordt. Het is trouwens
+% zowieso beter het commando \tijd te reserveren voor de
+% systeemtijd.
+
+% %I n=Tijden
+% %I c=\tijd,\tijdspan,\activiteit
+% %I
+% %I De volgende commando's kunnen worden gebruikt om
+% %I tijden en activiteiten in overzichten weer te geven:
+% %I
+% %I uu.mm
+% %I
+% %I \tijd{uur.min}
+% %I
+% %I uu.mm --- uu.mm
+% %I
+% %I \tijdspan{uur.min}{uur.min}
+% %I
+% %I uu.mm --- uu.mm activiteit
+% %I
+% %I \activiteit{uur.min}{uur.min} ... (\par)
+
+\def\tijd#1%
+ {\setbox0=\hbox{00.00}%
+ \hbox to \wd0{\hfill#1}}
+
+\def\tijdspan#1#2%
+ {\hbox{\tijd{#1}~---~\tijd{#2}}}
+
+\def\activiteit#1#2%
+ {\activity{\tijdspan{#1}{#2}}}
+
+\def\activiteit#1#2%
+ {\sym{\tijdspan{#1}{#2}}}
+
+%I n=Toevoegen
+%I c=\toevoegen
+%I
+%I Er kan witruimte worden gemarkeerd met het commando:
+%I
+%I \toevoegen[instelling]{korte tekst}
+%I
+%I waarbij als instellingen mogelijk zijn: klein, middel of
+%I groot.
+
+\def\dotoevoegen#1%
+ {\def\next{#1}%
+ \herhaal[#1*{\inlinker{\next~+}\def\next{}\crlf}]}
+
+\def\complextoevoegen[#1]%
+ {\blanko
+ \processaction
+ [#1]
+ [ \v!klein=>\dotoevoegen{3},
+ \v!middel=>\dotoevoegen{6},
+ \v!groot=>\dotoevoegen{9},
+ \s!default=>\dotoevoegen{6},
+ \s!unknown=>\dotoevoegen{#1}]
+ \blanko}
+
+\def\toevoegen%
+ {\complexorsimpleempty{toevoegen}}
+
+%I n=Tekstlijn
+%I c=\tekstlijn,\starttekstlijn,\steltekstlijnenin
+%I
+%I Een stuk tekst kan worden omgeven door horizontale lijnen,
+%I waarin al dan niet een tekst is opgenomen.
+%I
+%I \tekstlijn[plaats]{tekst}
+%I
+%I Mogelijke plaatsen zijn boven en onder. De onderstaande twee
+%I commando's zijn equivalent:
+%I
+%I \tekstlijn
+%I \tekstlijn[onder]{}
+%I
+%I Daarnaast zijn beschikbaar:
+%I
+%I \starttekstlijn{tekst}
+%I \stoptekstlijn
+%I
+%I waarbij de plaats dus boven is.
+%P
+%I Een en ander kan worden ingesteld met het commando:
+%I
+%I \steltekstlijnenin[voor=,na=,tussen=,letter=,breedte=,
+%I plaats=]
+%I
+%I De breedte heeft betrekking op de lengte van de lijn voor
+%I de tekst. Mogelijke plaatsen zijn links en inmarge.
+
+% nog eens \definieertekstlijn
+
+\def\steltekstlijnenin%
+ {\dodoubleargument\getparameters[\??tl]}
+
+\def\docomplextekstlijn#1%
+ {\bgroup
+ \setbox0=\hbox to \hsize
+ {\dimen4=0.5ex\relax
+ \dimen6=-0.5ex\relax
+ \advance\dimen4 by .5\linewidth
+ \advance\dimen6 by .5\linewidth
+ \doifsomething{#1}
+ {\doifelse{\@@tlplaats}{\v!inmarge}%
+ {\llap{\doattributes{\??tl}{#1}\hskip\linkermargeafstand}}
+ {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlbreedte
+ \hbox spread 1em{\hss\doattributes{\??tl}{\strut#1}\hss}}}%
+ \leaders\hrule\!!height\dimen4\!!depth\dimen6\hfill}
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \box0
+ \egroup}
+
+\def\dotoptekstlijn#1%
+ {\pagina[\v!voorkeur]
+ \witruimte
+ \@@tlvoor
+ \docomplextekstlijn{#1}%
+ \geenwitruimte
+ \@@tltussen
+ \endgraf}
+
+\def\dobottomtekstlijn#1%
+ {\ifhmode
+ \endgraf
+ \fi
+ \dimen0=\dp\strutbox
+ \ifdim\prevdepth<\dp\strutbox
+ \ifdim\prevdepth>\!!zeropoint
+ \advance\dimen0 by -\prevdepth
+ \fi
+ \fi
+ \advance\dimen0 by .5ex
+ \vskip\dimen0
+ \@@tltussen
+ \doifelse{#1}{}
+ {\hrule\!!depth\linewidth\!!height\!!zeropoint}
+ {\docomplextekstlijn{#1}}%
+ \@@tlna
+ \pagina[\v!voorkeur]}
+
+\def\complextekstlijn[#1]#2%
+ {\processaction
+ [#1]
+ [ \v!boven=>\dotoptekstlijn{#2},
+ \v!onder=>\dobottomtekstlijn{#2},
+ \s!default=>\dobottomtekstlijn{#2}]}
+
+\def\simpletekstlijn%
+ {\dobottomtekstlijn{}}
+
+\def\tekstlijn%
+ {\complexorsimple{tekstlijn}}
+
+\def\starttekstlijn#1%
+ {\bgroup
+ \dotoptekstlijn{#1}}
+
+\def\stoptekstlijn%
+ {\dobottomtekstlijn{}%
+ \egroup}
+
+%I n=Invullijnen
+%I c=\invullijnen,\stelinvullijnenin,\invultekst
+%I
+%I Ten behoeve van invullijsten is het volgende commando
+%I beschikbaar:
+%I
+%I \invullijnen[n=,breedte=]{tekst}
+%I
+%I Dit levert:
+%I
+%I tekst _____________________________________________
+%I _____________________________________________
+%I
+%I De instellingen kunnen desgewenst achterwege blijven:
+%I
+%I \invullijnen{tekst}
+%I \invullijnen{tekst}{optionele eindtekst}
+%I
+%I In dat geval worden de standaard-instellingen gebruikt.
+%P
+%I De standaardinstellingen vinden plaats met:
+%I
+%I \stelinvullijnenin[n=,breedte=,afstand=,letter=,voor=,
+%I na=,scheider=]
+%I
+%I De afstand heeft betrekking op de afstand tussen de
+%I scheider en de lijnen.
+%I
+%I Het volgende commando plaatst een tekst op een zelfde
+%I wijze als de invullijnen.
+%I
+%I \invultekst{tekst} tekst \par
+
+\def\stelinvullijnenin%
+ {\dosingleargument\getparameters[\??il]}
+
+\def\dodocomplexinvullijnen[#1]#2#3#4%
+ {\endgraf
+ \@@ilvoor
+ \begingroup
+ \stelinvullijnenin[#1]%
+ \noindent
+ \doifelse{\@@ilbreedte}{\v!passend}
+ {\setbox0=\hbox}
+ {\setbox0=\hbox to \@@ilbreedte}
+ {\doattributes
+ {\??il}
+ {\strut#3\hfill
+ \doifsomething{\@@ilscheider}
+ {\hbox spread \@@ilafstand{\@@ilscheider\hss}}}}%
+ \hangindent=\wd0\relax
+ \parindent=\hangindent
+ \box0\relax
+ \stelwitruimtein[\v!groot]%
+ \ignorespaces
+ #2#4%
+ \endgroup
+ \endgraf
+ \@@ilna}
+
+\def\complexinvullijnen[#1]%
+ {\def\docomplexinvullijnen%
+ {\dodocomplexinvullijnen[#1]{\thinrules[\c!n=\@@iln]}}%
+ \dodoublegroupempty\docomplexinvullijnen}
+
+\def\invullijnen%
+ {\complexorsimpleempty{invullijnen}}
+
+\def\complexinvultekst[#1]#2#3\par%
+ {\dodocomplexinvullijnen[#1]{\ignorespaces#3\endgraf}{#2}{}}
+
+\def\invultekst%
+ {\complexorsimpleempty{invultekst}}
+
+%I n=Invulregels
+%I c=\invulregel,\stelinvulregelin,\invultekst
+%I
+%I Ten behoeve van invullijsten is het volgende commando
+%I beschikbaar:
+%I
+%I \invulregel[breedte=,afstand=]{tekst}
+%I
+%I tekst tekst tekst tekst tekst tekst tekst
+%I tekst tekst tekst tekst tekst tekst tekst __________
+%I
+%I De instellingen kunnen desgewenst achterwege blijven:
+%I
+%I \invulregel tekst
+%I
+%I In dat geval worden de standaard-instellingen gebruikt.
+%I
+%I De standaardinstellingen vinden plaats met:
+%I
+%I \stelinvulregelsin[n=,breedte=,afstand=,voor=,na=]
+%I
+%I De lengte van de lijn is gelijk aan breedte-afstand.
+
+\def\stelinvulregelsin%
+ {\dosingleargument\getparameters[\??iv]}
+
+\def\complexinvulregel[#1]#2\par%
+ {%\endgraf % interferes with \doordefinieren alikes
+ \@@ivvoor
+ \begingroup
+ \stelinvulregelsin[#1]%
+ \advance\rightskip by \@@ivbreedte
+ \parfillskip\!!zeropoint
+ #2\hfill
+ \dimen0=\@@ivbreedte
+ \advance\dimen0 by -\@@ivafstand
+ \rlap
+ {\hskip\@@ivafstand
+ \vrule\!!width\dimen0\!!height\linewidth}%
+ \par % !
+ \endgroup
+ \par % !
+ \@@ilna}
+
+\def\invulregel%
+ {\complexorsimpleempty{invulregel}}
+
+%I n=Roosters
+%I c=\rooster
+%I
+%I Er kunnen roosters (te vergelijken met ruitjespapier)
+%I worden gemaakt met:
+%I
+%I \rooster[nx=,ny=,dx=,dy=,eenheid=,xstap=,ystap=,
+%I offset=,schaal=,factor=]
+%I
+%I De instelling [nx=20,ny=20,dx=.5,dy=.5,eenheid=cm] levert
+%I een patroon van 10cm bij 10cm van hokjes van 0.5cm op.
+%I
+%I Met '.stap' kunnen getallen langs de assen worden gezet.
+%I als 0 wordt ingevuld (default), dan worden geen getallen
+%I gezet. Met offset (ja of nee) kan men aangeven of de
+%I getallen langs de assen binnen of buiten de box rond
+%I het rooster vallen (vergelijk \stelpositionerenin).
+%I
+%I !! Dit commando wordt nog aangepast/uitgebreid. !!
+
+\def\dorooster[#1]%
+ {\begingroup
+ \getparameters[\??rt]
+ [\c!nx=10,\c!ny=10,
+ \c!dx=.5,\c!dy=.5,
+ \c!xstap=0,\c!ystap=0,
+ \c!eenheid=\s!cm,
+ \c!schaal=1,
+ \c!factor=1,
+ \c!offset=\v!ja,
+ #1]%
+ \startpositioneren
+ \dimen0=\@@rtdx\@@rteenheid\relax
+ \dimen0=\@@rtschaal\dimen0\relax
+ \dimen0=\@@rtfactor\dimen0\relax
+ \multiply\dimen0 by \@@rtnx\relax
+ \dimen2=\@@rtdy\@@rteenheid\relax
+ \dimen2=\@@rtschaal\dimen2\relax
+ \dimen2=\@@rtfactor\dimen2\relax
+ \multiply\dimen2 by \@@rtny\relax
+ \def\horline
+ {\vbox
+ {\hrule
+ \!!width \dimen0
+ \!!height \linewidth
+ \!!depth \!!zeropoint}}%
+ \def\verline%
+ {\vrule
+ \!!width \linewidth
+ \!!height \dimen2
+ \!!depth \!!zeropoint}%
+ \def\setlegend##1##2%
+ {\global\!!countc=0\relax
+ \dimen0=2em\relax
+ \dimen2=##2\@@rteenheid\relax
+ \dimen2=\@@rtschaal\dimen2\relax
+ \dimen2=\@@rtfactor\dimen2\relax
+ \divide\dimen0 by \dimen2\relax
+ \global\!!counte=\dimen0\relax
+ \ifnum\!!counte>50\relax
+ \global\!!counte=100\relax
+ \else\ifnum\!!counte>10\relax
+ \global\!!counte=50\relax
+ \else\ifnum\!!counte>5\relax
+ \global\!!counte=10\relax
+ \else\ifnum\!!counte>1\relax
+ \global\!!counte=5\relax
+ \else
+ \global\!!counte=1\relax
+ \fi\fi\fi\fi
+ \global\!!countd=0\relax
+ \def\legend%
+ {\ifnum\!!countd=0\relax
+ \vbox
+ {\hbox to 2em{\hss\the\!!countc\hss}}%
+ \global\!!countd=\!!counte
+ \fi
+ \global\advance\!!countd by -1\relax
+ \global\advance\!!countc by ##1\relax}}%
+ \def\draw##1##2##3##4##5##6##7%
+ {\stelpositionerenin
+ [\c!xstap=\v!absoluut,
+ \c!ystap=\v!absoluut,
+ \c!eenheid=\@@rteenheid,
+ \c!schaal=\@@rtschaal,
+ \c!factor=\@@rtfactor,
+ \c!offset=\@@rtoffset,
+ \c!xoffset=##6,
+ \c!yoffset=##7]%
+ \positioneer(0,0){##1}%
+ \stelpositionerenin
+ [\c!xstap=\v!relatief,
+ \c!ystap=\v!relatief,
+ \c!schaal=\@@rtschaal,
+ \c!factor=\@@rtfactor,
+ \c!offset=\@@rtoffset,
+ \c!eenheid=\@@rteenheid]%
+ \herhaal[##2*{\positioneer(##3,##4){##5}}]}%
+ \draw{\verline}{\@@rtnx}{\@@rtdx}{0}{\verline}{\!!zeropoint}{\!!zeropoint}%
+ \draw{\horline}{\@@rtny}{0}{\@@rtdy}{\horline}{\!!zeropoint}{\!!zeropoint}%
+ \tfx
+ \doifnot{\@@rtxstap}{0}
+ {\setlegend{\@@rtxstap}{\@@rtdx}%
+ \draw{\legend}{\@@rtnx}{\@@rtdx}{0}{\legend}{-1em}{-1.5em}}%
+ \doifnot{\@@rtystap}{0}
+ {\setlegend{\@@rtystap}{\@@rtdy}%
+ \draw{\legend}{\@@rtny}{0}{\@@rtdy}{\legend}{-2em}{-.75ex}}%
+ \stoppositioneren
+ \endgroup}
+
+\def\rooster%
+ {\dosingleargument\dorooster}
+
+%I n=Literatuurlijsten
+%I c=\stelpublicatiesin,\startpublicatie,\publicatie
+%I
+%I Literatuurlijsten kunnen worden opgemaakt met het commando:
+%I
+%I \startpublicatie[referentie]
+%I \naam ....
+%I \titel ....
+%I \jaar ....
+%I \plaats ....
+%I \uitgever ....
+%I \stoppublicatie
+%I
+%I Een publicatie wordt opgeroepen met:
+%I
+%I \publicatie[referentie]
+%P
+%I Het formaat kan worden ingesteld met het commando:
+%I
+%I \stelpublicatiesin[variant=,voor=,na=,nummeren=,
+%I breedte=,kopletter=,links=,rechts=]
+%I
+%I waarbij mogelijke varianten zijn: normaal apa en normaal.
+%I Nummeren kan 'ja' of 'nee' zijn; links en rechts
+%I hebben betrekking op de weergave in de tekst en zijn
+%I standaard [ en ].
+
+% Dit wordt:
+%
+% \doorverwijzen[naam][instellingen] enz.
+%
+% waarbij <naam> bijvoorbeeld publicatie is. Dit levert:
+%
+% \start<naam>
+% \stop<naam>
+%
+% \beginvan<naam>
+% \eindvan<naam>
+%
+% \publicatie
+%
+% \volledigelijstmetpublicaties
+%
+% eigenlijk kan ook door... zo worden uitgebreid!
+
+\doornummeren
+ [@publicatie]
+ [\c!plaats=\v!links,
+ \c!breedte=\@@pbbreedte,\c!hang=,\c!monster=,
+ \c!voor=\@@pbvoor,\c!na=\@@pbna,\c!tussen=,
+ \c!kopletter=\@@pbkopletter,\c!letter=,
+ \c!kopkleur=\@@pbkopkleur,\c!kleur=,
+ \c!wijze=\@@pbwijze,\c!blokwijze=\@@pbblokwijze,
+ \c!tekst=,\c!links=\@@pblinks,\c!rechts=\@@pbrechts]
+
+\def\dostelpublicatiesin[#1]%
+ {\getparameters[\??pb][#1]}
+
+\def\stelpublicatiesin%
+ {\dosingleargument\dostelpublicatiesin}
+
+\def\apa@publicatie%
+ {\doifsomething{\@@pb@naam}{\@@pb@naam,\spatie}%
+ \doifsomething{\@@pb@titel}{{\sl\@@pb@titel}.\spatie}%
+ \doifsomething{\@@pb@jaar}{(\@@pb@jaar).\spatie}%
+ \doifsomething{\@@pb@plaats}{\@@pb@plaats\doifelsenothing{\@@pb@uitgever}{.}{:\spatie}}%
+ \doifsomething{\@@pb@uitgever}{\@@pb@uitgever.}}
+
+\def\normaal@publicatie%
+ {\@@pb@naam, \@@pb@titel, \@@pb@jaar, \@@pb@pagina, \@@pb@plaats, \@@pb@uitgever.}
+
+\def\complexstartpublicatie[#1]#2\stoppublicatie%
+ {\bgroup%
+ \def\dosetpublicatie%
+ {\processcommalist
+ [naam,titel,jaar,plaats,pagina,uitgever]
+ \setpublicatie
+ \ignorespaces}%
+ \def\setpublicatie##1%
+ {\setvalue{\??pb @##1}{}%
+ \setvalue{##1}####1{\setvalue{\??pb @##1}{####1}\ignorespaces}}%
+ \def\getpublicatie%
+ {\doifsomething{\@@pbvariant}{\getvalue{\@@pbvariant @publicatie}}}%
+ \doifelse{\@@pbnummeren}{\v!ja}%
+ {\@publicatie[#1]\dosetpublicatie#2\getpublicatie\par}%
+ {\@@pbvoor
+ \dosetpublicatie\ignorespaces#2\getpublicatie
+ \@@pbna}%
+ \egroup}
+
+\def\startpublicatie%
+ {\complexorsimpleempty{startpublicatie}}
+
+\def\publicatie#1[#2]%
+ {\@@pblinks\in{#1}[#2]\@@pbrechts}
+
+%I n=Kenmerken
+%I c=\kenmerk,\kenmerkdatum
+%I
+%I Er kan een kenmerk worden gezet met het commando:
+%I
+%I \kenmerk[bet=,ken=,dat=,van=,aan=,ref=]
+%I
+%I waarbij de verplichte parameters staan voor 'betreft',
+%I 'kenmerk' en 'datum' en de optionele voor 'van', 'aan' en
+%I 'referentie'.
+%I
+%I Een kenmerk-datum kan worden gezet met het commando:
+%I
+%I \kenmerkdatum
+%I
+%I zodat een kenmerk er bijvoorbeeld uitziet als:
+%I
+%I \kenmerk
+%I [bet=rekening eerste termijn,
+%I ken=\kenmerkdatum.sork.gvk / afo,
+%I dat=\currentdate]
+
+\def\kenmerkdatum%
+ {\currentdate[\v!kenmerk]}
+
+\def\dokenmerk[#1]%
+ {\geenhoofdenvoetregels
+ \getparameters
+ [\??km]
+ [\c!bet=\onbekend,
+ \c!dat=\onbekend,
+ \c!ken=\onbekend,
+ \c!van=,
+ \c!aan=,
+ \c!ref=,
+ #1]%
+ \bgroup % moet anders, hoort niet in 01b
+ \assigntranslation[nl=referentie,en=reference,du=Referenz,sp=referencia]\to\@@@kmref
+ \assigntranslation[nl=van,en=from,du=Von,sp=de]\to\@@@kmvan
+ \assigntranslation[nl=aan,en=to,du=An,sp=a]\to\@@@kmaan
+ \assigntranslation[nl=betreft,en=concerns,du=Betreff,sp=]\to\@@@kmbet
+ \assigntranslation[nl=datum,en=date,du=Datum,sp=fecha]\to\@@@kmdat
+ \assigntranslation[nl=kenmerk,en=mark,du=Kennzeichen,sp=]\to\@@@kmken
+ \doifelsenothing{\@@kmvan\@@kmaan}
+ {\def\@@dokmvanaan{}}
+ {\def\@@dokmvanaan{&\omit\cr}}%
+ \doifelsenothing{\@@kmvan}
+ {\def\@@dokmvan{}}
+ {\def\@@dokmvan{\@@@kmvan&\@@kmvan\cr}}%
+ \doifelsenothing{\@@kmaan}
+ {\def\@@dokmaan{}}
+ {\def\@@dokmaan{\@@@kmaan&\@@kmaan\cr}}%
+ \doifelsenothing{\@@kmref}
+ {\def\@@dokmref{}}
+ {\def\@@dokmref{&\omit\cr\@@@kmref&\@@kmref\cr}}%
+ \witruimte
+ \tabskip=\!!zeropoint
+ \noindent\halign
+ \bgroup
+ ##~&:~##\hfil\cr
+ \@@@kmbet&\@@kmbet\cr
+ \@@@kmdat&\@@kmdat\cr
+ \@@@kmken&\kap{\@@kmken}\cr
+ \@@dokmvanaan
+ \@@dokmvan
+ \@@dokmaan
+ \@@dokmref
+ \egroup
+ \egroup}
+
+\def\kenmerk%
+ {\dosingleargument\dokenmerk}
+
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+
+\def\??ri{@@ri}
+
+\def\stelrijenin%
+ {\dodoubleargument\getparameters[\??ri]}
+
+\def\complexstartrijen[#1]%
+ {\bgroup
+ \stelrijenin[#1]%
+ \let\do@@rionder=\relax
+ \def\rij%
+ {\do@@rionder
+ \egroup
+ \dimen0=\vsize
+ \divide\dimen0 by \@@rin
+ \advance\dimen0 by -\lineskip
+ \vbox to \dimen0
+ \bgroup
+ \@@riboven
+ \let\do@@rionder=\@@rionder
+ \ignorespaces}%
+ \bgroup
+ \rij}
+
+\def\startrijen%
+ {\complexorsimpleempty{startrijen}}
+
+\def\stoprijen%
+ {\do@@rionder
+ \egroup
+ \egroup}
+
+\stelrijenin
+ [n=2,
+ boven=,
+ onder=\vfill]
+
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+% NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW NIEUW
+
+% Standaardinstellingen
+
+\stelitemsin
+ [\c!plaats=\v!links,
+ \c!symbool=5,
+ \c!breedte=\hsize,
+ \c!uitlijnen=\v!midden,
+ \c!n=\v!onbekend,
+ \c!voor=\blanko,
+ \c!tussen={\blanko[\v!middel]},
+ \c!na=\blanko]
+
+\steltekstlijnenin
+ [\c!plaats=\v!links,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!tussen=,
+ \c!breedte=2em,
+ \c!letter=\v!vet,
+ \c!kleur=]
+
+\stelinvullijnenin
+ [\c!breedte=\v!passend,
+ \c!afstand=1em,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!n=1,
+ \c!scheider=,
+ \c!letter=\v!normaal,
+ \c!kleur=]
+
+\stelinvulregelsin
+ [\c!breedte=3cm,
+ \c!afstand=1em,
+ \c!voor=\blanko,
+ \c!na=\blanko]
+
+\steltabin
+ [\c!plaats=\v!links]
+
+\definieeralineas
+ [tabulatie]
+ [\c!n=3,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!afstand=1em]
+
+\stelpublicatiesin
+ [\c!nummeren=\v!ja,
+ \c!variant=\c!apa,
+ \c!breedte=2em,
+ \c!hang=,
+ \c!monster=,
+ \c!voor=,
+ \c!na=,
+ \c!tussen=,
+ \c!kopletter=,
+ \c!kopkleur=,
+ \c!letter=,
+ \c!kleur=,
+ \c!blokwijze=\v!per\v!tekst,
+ \c!wijze=\v!per\v!tekst,
+ \c!tekst=,
+ \c!links={[},
+ \c!rechts={]}]
+
+\stelciterenin
+ [\c!variant=1,
+ \c!letter=\v!normaal,
+ \c!kleur=]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-01c.tex b/tex/context/base/core-01c.tex new file mode 100644 index 000000000..c6acfb174 --- /dev/null +++ b/tex/context/base/core-01c.tex @@ -0,0 +1,1121 @@ +%D \module
+%D [ file=core-01c,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=1C (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros (c)}
+
+\unprotect
+
+\startmessages dutch library: figures
+ title: figuren
+ 1: maten van -- geladen uit locale figuurfile
+ 2: maten van -- geladen uit globale figuurfile
+ 3: maten van -- geladen uit figuurfile zelf
+ 4: figuur -- is niet te vinden
+ 5: er moet een nieuwe figuurfile worden aangemaakt
+\stopmessages
+
+\startmessages english library: figures
+ title: figures
+ 1: dimensions of -- loaded from local figurefile
+ 2: dimensions of -- loaded from global figurefile
+ 3: dimensions of -- loaded from figurefile itself
+ 4: figure -- can not be found
+ 5: you have to regenerate a new figure file
+\stopmessages
+
+\startmessages german library: figures
+ title: figures
+ 1: Dimensionen von -- geladen von lokaler Abbildungsdatei
+ 2: Dimensionen von -- geladen von globaler Abbildungsdatei
+ 3: Dimensionen von -- geladen von Abbildungsdatei selbst
+ 4: Abbildung -- kann nicht gefunden werden
+ 5: Sie haben eine neu Abbildungsdatei erstellt
+\stopmessages
+
+\startmessages dutch library: systems
+ 41: externe file -- in groep -- bestaat niet
+\stopmessages
+
+\startmessages english library: systems
+ 41: external file -- in group -- does not exist
+\stopmessages
+
+\startmessages german library: systems
+ 41: Externe Datei -- in Gruppe -- existiert nicht
+\stopmessages
+
+% Een verdere 'besparing' kan worden gerealiseerd als de
+% variabelen (ef#1...) lokaal blijven als een figuur wordt
+% geladen. Ook kunnen in texutil.tuf \c!variabelen worden
+% gebruikt.
+
+%I n=Figuren+
+%I c=\gebruikexternfiguur,\gebruikexternefiguren,\externfiguur
+%I c=\figuurintekst
+%I
+%I Extern aangemaakte (postscript)-figuren kunnen in
+%I de tekst worden opgenomen. De afmetingen van deze
+%I figuren kunnen op verschillende manieren worden
+%I ingesteld:
+%I
+%I \gebruikexternfiguur[naam][file][schaal=,kader=]
+%I
+%I \gebruikexternfiguur[naam][file][hfactor=,kader=]
+%I \gebruikexternfiguur[naam][file][bfactor=,kader=]
+%I
+%I \gebruikexternfiguur[naam][file][hoogte=,kader=]
+%I \gebruikexternfiguur[naam][file][breedte=,kader=]
+%I
+%I \gebruikexternfiguur[eerste naam][file][....]
+%I \gebruikexternfiguur[tweede naam][file][eerste naam]
+%I
+%I Externe figuren kunnen vervolgens worden opgeroepen op
+%I naam:
+%I
+%I \naam
+%P
+%I De schaal wordt opgegeven in tienden procenten. Dat
+%I betekent dat 12.5 procent wordt opgegeven als 125.
+%I
+%I In plaats van een schaal kan ook een schaalfactor worden
+%I opgegeven. Een factor 15 resulteert in een figuur met een
+%I hoogte van 1.5 maal de korpsgrootte. In plaats van een
+%I getal kan ook 'max', 'passend' of 'ruim' worden opgegeven.
+%I
+%I De breedte en hoogte worden opgegeven in de gebruikelijke
+%I TeX-maten.
+%I
+%I Als men automatisch wil laten bepalen wat de maximale
+%I hoogte of breedte is, dan kan men 'factor=max' meegeven.
+%P
+%I Externe figuren moeten worden voorgedefinieerd. Dit doet
+%I men met het commando:
+%I
+%I \presetfigure[file][type=,breedte=,hoogte=,
+%I omvang=,bron=,titel=]
+%I
+%I Met behulp van texutil kan een file 'texutil.tuf'
+%I worden aangemaakt waarin de op het werkgebied beschikbare
+%I figuren worden voorgedefinieerd. In dat geval kan het
+%I commando \presetfigure achterwege blijven.
+%I
+%I De voorinstellingen worden geladen met het commando:
+%I
+%I \gebruikexternefiguren[optie=,korps=,lokatie=]
+%I
+%I waarbij als opties kader en leeg mogelijk zijn. In
+%I het eerste geval wordt een kader om de figuren
+%I geplaatst, in het tweede geval worden alleen kenmerken
+%I van de figuur weergegeven. Lokatie kan lokaal, globaal
+%I of {lokaal,globaal} (default) zijn.
+%P
+%I Figuren kunnen op het actuele gebied staan, op een root
+%I van het actuele gebied of op een nader in te stellen gebied.
+%I Dit instellen gebeurt door aan 'gebied' een naam toe te
+%I kennen.
+%I
+%I De in de file 'system.tex' opgenomen standaardinstelling
+%I is (let op het gebruik van /):
+%I
+%I \stelexternefigurenin[gebied=c:/figuren/eps,file=]
+%P
+%I Het eerder genoemde commando \gebruikexternfiguur ziet
+%I er als volgt uit:
+%I
+%I \gebruikexternfiguur[naam][file][instellingen]
+%I
+%I De naam is facultatief en is standaard gelijk aan de
+%I filenaam. Als een (file)naam cijfers bevat, moet het
+%I commando \naam{naam} worden gebruikt.
+%I
+%I Het is mogelijk in \plaatsfiguur direkt een externe
+%I figuur op te roepen:
+%I
+%I \plaatsfiguur{commentaar}{\naam}
+%I
+%I Ook is het mogelijk een figuur in de tekst op te nemen
+%I met het commando:
+%I
+%I \figuurintekst{\naam}
+
+%T n=extern
+%T m=ext
+%T a=e
+%T
+%T \gebruikexternfiguur [] [?] [bfactor=]
+
+%D The following macro's are derived from Thomas Rockicky's
+%D macro's. They are rewritten to a more compact form, made a
+%D bit more robust and also handle the \type{HiResBoundingBox}
+%D or \type{ExactBoundingBox} that sometimes is present.
+%D
+%D A bounding box has the form:
+%D
+%D \starttypen
+%D %%BoundingBox: llx lly urx ury
+%D \stoptypen
+%D
+%D Before we scan the file, we have to reset special
+%D characters and set some others. The percentage symbol also
+%D needs special treatment. When a bounding box is
+%D encountered, we keep on scanning until no more directives are
+%D found, i.e. a line is found that does not start with a
+%D percentage symbol. We also abort scanning after finding a
+%D high resolution bounding box.
+%D
+%D This method also works inside verbatim mode (like when we
+%D are typesettinmg sources and putting eps coded logos into
+%D a heading. Temporary restoring the \CATCODES\ is done in
+%D the calling routine.
+
+\def\dogetfiguresizeeps#1#2#3#4#5%
+ {\bgroup
+ \openjobin{\scratchread}{#1}%
+ \ifeof\scratchread
+ \doifsomething{\@@exgebied}
+ {\closein\scratchread
+ \openfixin{\scratchread}{\@@exgebied}{#1}}%
+ \fi
+ \global\chardef\epsffound=0
+ \ifeof\scratchread
+ \else
+ \uncatcodespecials
+ \def\next%
+ {\read\scratchread to \epsffileline
+ \ifeof\scratchread
+ \let\next=\relax
+ \else
+ \expandafter\epsfaux\epsffileline:. \\%
+ \fi
+ \next}%
+ \next
+ \fi
+ \closein\scratchread
+ \egroup
+ \ifnum\epsffound>0
+ \dimen0=1bp\relax
+ #2=\epsfllx\dimen0
+ #4=\epsfurx\dimen0
+ \advance#4 by -\epsfllx\dimen0
+ #3=\epsflly\dimen0
+ #5=\epsfury\dimen0
+ \advance#5 by -\epsflly\dimen0
+ \else
+ #2=\!!zeropoint
+ #3=\!!zeropoint
+ #4=\!!zeropoint
+ #5=\!!zeropoint
+ \fi}
+
+\bgroup
+\catcode`\%=\@@other
+\global\let\epsfpercent=%
+\gdef\epsfboundingbox {%BoundingBox}
+\gdef\epsfhiresboundingbox{%HiResBoundingBox}
+\gdef\epsfexactboundingbox{%ExactBoundingBox}
+\egroup
+
+\long\def\epsfaux#1#2:#3\\%
+ {\ifx#1\epsfpercent
+ \def\!!stringa{#2}%
+ \ifx\!!stringa\epsfboundingbox
+ \epsfgrab #3 . . . \\%
+ \global\chardef\epsffound=1
+ \else\ifx\!!stringa\epsfhiresboundingbox
+ \epsfgrab #3 . . . \\%
+ \global\chardef\epsffound=2
+ \let\next=\relax
+ \else\ifx\!!stringa\epsfexactboundingbox
+ \epsfgrab #3 . . . \\%
+ \global\chardef\epsffound=2
+ \let\next=\relax
+ \fi\fi\fi
+ \else\ifnum\epsffound>0
+ \let\next=\relax
+ \fi\fi}
+
+\def\epsfgrab #1 #2 #3 #4 #5\\%
+ {\gdef\epsfllx{#1}%
+ \ifx\epsfllx\empty
+ \epsfgrab #2 #3 #4 #5 .\\%
+ \else
+ \gdef\epsflly{#2}%
+ \gdef\epsfurx{#3}%
+ \gdef\epsfury{#4}%
+ \fi}
+
+\edef\figureversion {1996.06.01}
+
+\def\@@figureerrormessage%
+ {\showmessage{\m!figures}{5}{}%
+ \global\let\@@figureerrormessage=\relax}
+
+\def\thisisfigureversion#1%
+ {\doifnot{\figureversion}{#1}%
+ {\@@figureerrormessage
+ \endinput}}
+
+\newcount \figxsca
+\newcount \figysca
+
+\newdimen \fighei
+\newdimen \figwid
+
+\newif \iffigurefound
+\newif \iflocalfigures
+\newif \ifglobalfigures
+
+\def\doreadlocalfigurefile%
+ {\iflocalfigures
+ \pushendofline
+ \readlocfile{\@@exfile}{}{}%
+ \popendofline
+ \fi}
+
+\def\doreadglobalfigurefile%
+ {\ifglobalfigures
+ \doifsomething{\@@exgebied}
+ {\pushendofline
+ \readfixfile{\@@exgebied}{\@@exfile}{}{}%
+ \popendofline}%
+ \fi}
+
+\def\complexgebruikexternefiguren[#1]%
+ {\getparameters[\??ex][#1]%
+ \ExpandFirstAfter\processallactionsinset
+ [\@@exlokatie]
+ [ \v!geen=>,
+ \v!globaal=>\globalfigurestrue,
+ \v!lokaal=>\localfigurestrue,
+ \s!default=>\globalfigurestrue
+ \localfigurestrue]%
+ \doifnothing{\@@exfile}
+ {\globalfiguresfalse
+ \localfiguresfalse}}
+
+\def\gebruikexternefiguren%
+ {\complexorsimpleempty{gebruikexternefiguren}}
+
+\def\stelexternefigurenin%
+ {\dodoubleargument\getparameters[\??ex]}
+
+\presetlocalframed[\??ef]
+
+\def\docalculatenorm#1#2#3#4#5%
+ {\processaction
+ [#2]
+ [ \v!max=>#1=#4\relax,
+ \v!passend=>#1=#5\relax,
+ \v!ruim=>#1=#5\relax
+ \advance #1 by -4\@@exkorps\relax,
+ \s!default=>\doifsomething{#3}{#1=#3\relax},
+ \s!unknown=>#1=\@@exkorps\relax
+ \divide#1 by \!!ten\relax
+ \multiply#1 by #2\relax]}
+
+\def\docalculatescales#1#2#3#4%
+ {\dimen0=#1\relax % #1 = new 1-value
+ \dimen2=#2\relax % #2 = old 1-value
+ \divide\dimen2 by \!!thousand\relax
+ \divide\dimen0 by \dimen2\relax
+ \figxsca=\dimen0\relax % x scale
+ \figysca=\dimen0\relax % y scale
+ \dimen2=#4\relax % #4 = old 2-value
+ \divide\dimen2 by \!!thousand\relax
+ \multiply\dimen2 by \dimen0\relax
+ #3=\dimen2\relax} % #3 = new 2-value
+
+\def\docalculatescale#1#2#3%
+ {\dimen0=#1\relax % #1 = new value
+ \dimen2=#2\relax % #2 = old value
+ \divide\dimen2 by \!!thousand\relax
+ \divide\dimen0 by \dimen2\relax
+ #3=\dimen0\relax} % #3 = schaal
+
+\def\doapplyscale#1#2#3%
+ {#1=#2\relax
+ #3=\@@efschaal\relax
+ \divide#1 by \!!thousand\relax
+ \multiply#1 by #3\relax}
+
+\def\dosetefsize%
+ {\ifinner
+ \teksthoogte=\vsize
+ \dimen0=\teksthoogte
+ \else
+ \ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal<\pagegoal
+ \dimen0=\pagegoal
+ \advance\dimen0 by -\pagetotal
+ \else
+ \dimen0=\teksthoogte
+ \fi
+ \else
+ \dimen0=\teksthoogte
+ \fi
+ \fi
+ \doifelsenothing{\@@efhoogte}
+ {\edef\@@efvsize{\the\dimen0}}
+ {\let\@@efvsize=\@@efhoogte}%
+ \doifelsenothing{\@@efbreedte}
+ {\edef\@@efhsize{\the\hsize}}
+ {\let\@@efhsize=\@@efbreedte}}
+
+\def\berekenexternfiguur[#1][#2]%
+ {\mindermeldingen
+ \restorecatcodes % recently added; we presume local use
+ \beforesplitstring#2\at.\to\@@effilename
+ \aftersplitstring #2\at.\to\@@efextension
+ \getparameters
+ [\??ep]
+ [\c!e=\s!unknown,
+ \c!w=15\korpsgrootte,
+ \c!h=10\korpsgrootte,
+ \c!x=\!!zeropoint,
+ \c!y=\!!zeropoint,
+ \c!t=,
+ \c!s=,
+ \c!a=,
+ \c!f=\@@effilename]%
+ \getparameters
+ [\??ef]
+ [\c!type=\s!unknown,
+ \c!methode=\@@eftype,
+ \c!preset=\v!ja,
+ \c!preview=\v!nee,
+ \c!schaal=\!!thousand,
+ \c!factor=,
+ \c!hfactor=,
+ \c!bfactor=,
+ \c!breedte=,
+ \c!hoogte=,
+ \c!achtergrond=,
+ \c!achtergrondkleur=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!hoek=,
+ \c!straal=.5\korpsgrootte,
+ \c!kader=\v!uit]%
+ \getvalue{\??ef#1}%
+ \def\@@effullname{#2.\@@eftype}% waarom per se nodig?
+ \doifelse{\@@efpreset}{\v!nee} % iets anders
+ {\figurefoundtrue}
+ {\doifelse{#1}{\s!figurepreset}
+ {\figurefoundtrue
+ \let\@@eftype=\@@epe}
+ {\figurefoundfalse
+ \def\presetfigure[##1][##2]%
+ {\iffigurefound
+ \endinput
+ \else
+ \DOIF{#2}{##1}
+ {\getparameters[\??ep][##2]%
+ \doifelse{\@@eftype}{\s!unknown}
+ {\let\@@eftype=\@@epe
+ \figurefoundtrue}
+ {\doif{\@@epe}{\@@eftype}
+ {\figurefoundtrue}}}%
+ \fi}%
+ \doreadlocalfigurefile
+ \iffigurefound
+ \showmessage{\m!figures}{1}{#2.\@@eftype}%
+ \else
+ \doreadglobalfigurefile
+ \iffigurefound
+ \showmessage{\m!figures}{2}{#2.\@@eftype}%
+ \else
+ \doif{\@@eftype}{\s!unknown}
+ {\let\@@eftype=\c!eps}%
+ \doifelse{\@@efextension}{}
+ {\edef\@@effullname{\@@effilename.\@@eftype}}
+ {\edef\@@effullname{\@@effilename.\@@efextension}}%
+ \doiffileelse{\@@effullname}
+ {\executeifdefined{dogetfiguresize\@@eftype}\gobblefivearguments
+ {\@@effullname}
+ {\!!widtha}
+ {\!!heighta}
+ {\!!widthb}
+ {\!!heightb}%
+ \ifdim\!!widthb>\!!zeropoint\relax
+ \figurefoundtrue
+ \geteparameters % e !
+ [\??ep]
+ [\c!x=\the\!!widtha,
+ \c!y=\the\!!heighta,
+ \c!w=\the\!!widthb,
+ \c!h=\the\!!heightb]%
+ \fi}
+ {\figurefoundfalse}%
+ \iffigurefound
+ \showmessage{\m!figures}{3}{\@@effullname}%
+ \else
+ \showmessage{\m!figures}{4}{\@@effullname}%
+ \def\@@efkader{\v!aan}%
+ \fi
+ \fi
+ \fi}}%
+ \let\@@epe=\@@eftype
+ \doif{\@@exoptie}{\v!kader}
+ {\doassign[\??ef][\c!kader=\v!aan]}%
+ \figwid=\!!zeropoint
+ \fighei=\!!zeropoint
+ \doifinsetelse{\@@effactor}{\v!max,\v!passend,\v!ruim}
+ {\dosetefsize
+ \ifdim\@@epw>\@@eph\relax
+ \docalculatenorm\figwid\@@effactor\@@efbreedte\hsize\@@efhsize
+ \docalculatescales\figwid\@@epw\fighei\@@eph
+ \else
+ \docalculatenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatescales\fighei\@@eph\figwid\@@epw
+ \fi
+ \!!doneatrue}
+ {\doifinsetelse{\@@efhfactor}{\v!max,\v!passend,\v!ruim}
+ {\dosetefsize
+ \docalculatenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatescales\fighei\@@eph\figwid\@@epw
+ \!!doneatrue}
+ {\doifinsetelse{\@@efbfactor}{\v!max,\v!passend,\v!ruim}
+ {\dosetefsize
+ \docalculatenorm\figwid\@@efbfactor\@@efbreedte\hsize\@@efhsize
+ \docalculatescales\figwid\@@epw\fighei\@@eph
+ \!!doneatrue}
+ {\docalculatenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatenorm\figwid\@@efbfactor\@@efbreedte\hsize\hsize
+ \!!doneafalse}}}%
+ \if!!donea
+ \ifdim\figwid>\@@efhsize\relax
+ \fighei=\!!zeropoint\relax
+ \figwid=\@@efhsize\relax
+ \else\ifdim\fighei>\@@efvsize\relax
+ \fighei=\@@efvsize\relax
+ \figwid=\!!zeropoint\relax
+ \fi\fi
+ \fi
+ \ifdim\figwid>\!!zeropoint\relax
+ \ifdim\fighei>\!!zeropoint\relax
+ \docalculatescale\fighei\@@eph\figysca
+ \docalculatescale\figwid\@@epw\figxsca
+ \else
+ \docalculatescales\figwid\@@epw\fighei\@@eph
+ \fi
+ \else
+ \ifdim\fighei>\!!zeropoint\relax
+ \docalculatescales\fighei\@@eph\figwid\@@epw
+ \else
+ \doapplyscale\figwid\@@epw\figxsca
+ \doapplyscale\fighei\@@eph\figysca
+ \fi
+ \fi
+ \doif{\@@exoptie}{\v!leeg}
+ {\getparameters
+ [\??ef]
+ [\c!kader=\v!aan,
+ \c!file=\v!leeg]}}
+
+\def\convertinsertscale#1#2#3#4%
+ {\dimen0=#1\relax
+ %\advance\dimen0 by .0005pt\relax
+ \divide\dimen0 by \!!thousand
+ \multiply\dimen0 by #3\relax
+ \dimen0=-\dimen0 % beter hier - dan in driver
+ \edef#2{\number\dimen0}%
+ \dimen0=#3pt\divide\dimen0 by \!!ten\relax
+ \edef#4{\@EA\withoutpt\@EA{\the\dimen0}}}
+
+\def\doplaatsexternfiguur[#1][#2]%
+ {\gebruikexternefiguren
+ \berekenexternfiguur[#1][#2]%
+ \iffigurefound
+ \localframed
+ [\??ef]
+ [\c!breedte=\figwid,
+ \c!hoogte=\fighei,
+ \c!offset=\v!overlay]
+ {\vfilll
+ \convertinsertscale\@@epx\figx\figxsca\scax
+ \convertinsertscale\@@epy\figy\figysca\scay
+ \doifelse{\@@efpreview}{\v!ja}
+ {\def\@@efpreview{1}}
+ {\def\@@efpreview{0}}%
+ \doinsertfile
+ {\@@eftype,\@@efmethode}{\@@effullname} %{\@@epf.\@@epe}
+ {\scax}{\scay}
+ {\figx}{\figy}
+ {\number\figwid}{\number\fighei}
+ {\@@efpreview}}%
+ \else
+ \localframed
+ [\??ef]
+ [\c!breedte=\figwid,
+ \c!hoogte=\fighei,
+ \c!kader=\v!aan]
+ {#1 / #2}%
+ \fi}
+
+\def\dopresetfigure[#1][#2]%
+ {\getparameters[\??ef][#1]%
+ \getparameters[\??ep][#2]}
+
+\def\doprecopfigure[#1][#2]%
+ {\getvalue{\??ef#1}%
+ \getparameters[\??ep][#2]}
+
+\def\dosetgebruikexternfiguur[#1][#2][#3][#4]%
+ {\doifsomething{#3}
+ {\doifinstringelse{=}{#3}
+ {\setvalue{\??ef#1}{\dopresetfigure[#3][#4]}}
+ {\setvalue{\??ef#1}{\doprecopfigure[#3][#4]}}}%
+ \setvalue{#1}{\doplaatsexternfiguur[#1][#2]}}
+
+\def\dogebruikexternfiguur[#1][#2][#3][#4]%
+ {\doifelsenothing{#1}
+ {\doifsomething{#2}
+ {\dosetgebruikexternfiguur[#2][#2][#3][#4]}}
+ {\doifelsenothing{#2}
+ {\dosetgebruikexternfiguur[#1][#1][#3][#4]}
+ {\dosetgebruikexternfiguur[#1][#2][#3][#4]}}}
+
+\def\gebruikexternfiguur%
+ {\doquadrupleempty\dogebruikexternfiguur}
+
+\def\doexternalfigure[#1][#2]%
+ {\bgroup
+ \gebruikexternfiguur[#1][#1][#2]%
+ \getvalue{#1}%
+ \egroup}
+
+\unexpanded\def\externalfigure%
+ {\dodoubleempty\doexternalfigure}
+
+\def\toonexternefiguren%
+ {\bgroup
+ \mindermeldingen
+ \def\presetfigure[##1][##2]%
+ {\gebruikexternfiguur
+ [\s!figurepreset][##1]
+ [\c!kader=\v!aan,\c!breedte=6cm][##2]%
+ \startfiguurtekst[\v!links][]
+ {\v!geen}
+ {\hbox
+ {\getvalue{\s!figurepreset}%
+ \tfskip
+ \framed[\c!breedte=\figwid,\c!hoogte=\fighei]{}}}%
+ {\tfa ##1}%
+ \blanko
+ \tfx
+ \def\docommando####1%
+ {\beforesplitstring####1\at=\to\asciia
+ \aftersplitstring####1\at=\to\asciib
+ \doifsomething{\asciib}
+ {\hsmash{\hbox to .75em{\asciia\hss}: \asciib}%
+ \endgraf}}%
+ \processcommalist[##2]\docommando
+ \strut
+ \endgraf
+ \stopfiguurtekst}%
+ \localfigurestrue
+ \doreadlocalfigurefile
+ \egroup}
+
+%I n=Formules+
+%I c=\startlegenda,\startgegeven
+%I
+%I Ten behoeve van een consistente toelichting op een
+%I formule zijn er de volgende commando's:
+%I
+%I \startlegenda
+%I \leg symbool \\ betekenis \\ dimensie \\
+%I \leg symbool \\ betekenis \\ dimensie \\
+%I \stoplegenda
+%I
+%I \startgegeven
+%I \geg betekenis \\ symbool \\ waarde \\
+%I \geg betekenis \\ symbool \\ waarde \\
+%I \stopgegeven
+%I
+%I Ten behoeve van het zetten van ub- en superscripts zijn
+%I er, naast \hbox, de commando's \xbox en \xxbox.
+%P
+%I Het onderstaande mag ook:
+%I
+%I \startlegenda[twee]
+%I \leg symbool \\ symbool \\ betekenis \\ dimensie \\
+%I \leg symbool \\ symbool \\ betekenis \\ dimensie \\
+%I \stoplegenda
+
+\newif\ifdoublelegends
+
+\def\dostartlegenda[#1]%
+ {\witruimte
+ \blanko
+ \bgroup
+ \doifelse{#1}{\v!twee}
+ {\doublelegendstrue
+ \let\leg=\doubleleg}
+ {\doublelegendsfalse
+ \let\leg=\singleleg}%
+ \tabskip=\!!zeropoint
+ \halign
+ \bgroup
+ \hskip\leftskip
+ $##$\hfil&\hfil~##~\hfil&
+ \ifdoublelegends$##$\hfil\fi&\ifdoublelegends\hfil~##~\hfil\fi&
+ ##\unskip\hfil~~&
+ $\rm##$\hfill\cr}
+
+\def\singleleg#1\\#2\\#3\\%
+ {#1&\doifsomething{#1}{=}&
+ &&
+ #2\unskip&
+ #3\cr}
+
+\def\doubleleg#1\\#2\\#3\\#4\\%
+ {#1&\doifsomething{#1}{\doifnot{#1}{ }{=}}&
+ #2&\doifsomething{#2}{\doifnot{#2}{ }{=}}&
+ #3\unskip&
+ #4\cr}
+
+\def\startlegenda%
+ {\dosingleempty\dostartlegenda}
+
+\def\stoplegenda%
+ {\egroup
+ \egroup
+ \blanko}
+
+% tzt: \crlf == \\ \\ \leg \\ afh kolom
+
+\def\startgegeven%
+ {\witruimte
+ \blanko
+ \bgroup
+ \tabskip=\!!zeropoint
+ \halign
+ \bgroup
+ \hskip\leftskip##\unskip\hfil&
+ ~\hfil$##$&\hfil~##~\hfil&
+ $\rm##$\hfil\cr}
+
+\def\stopgegeven%
+ {\egroup
+ \egroup
+ \blanko}
+
+\def\geg#1\\#2\\#3\\%
+ {#1&
+ #2&=&
+ #3\cr}
+
+\unexpanded\def\xbox%
+ {\bgroup\aftergroup\egroup\hbox\bgroup\tx\let\next=}
+
+\unexpanded\def\xxbox%
+ {\bgroup\aftergroup\egroup\hbox\bgroup\txx\let\next=}
+
+% \def\mrm#1%
+% {$\rm#1$}
+
+%I n=Combinaties
+%I c=\startcombinatie,\stelcombinatiesin
+%I
+%I Er kunnen meerdere tabellen, figuren enz. worden
+%I gecombineerd. Dit gebeurt met het commando:
+%I
+%I \startcombinatie[n*m]
+%I {inhoud 1}{ondertitel 1}
+%I {inhoud 2}{ondertitel 2}
+%I .....
+%I \stopcombinatie
+%I
+%I Eventueel kan volstaan worden met [n]. Vier inhouden
+%I kunnen bijvoorbeeld worden gecombineerd als:
+%I
+%I [4*1] of [4] vier inhouden naast elkaar
+%I [1*4] vier inhouden onder elkaar
+%I [2*2] inhouden twee aan twee onder elkaar
+%P
+%I Dit commando is goed te combineren met \plaats-commando's:
+%I
+%I \plaatsfiguur[][]{}
+%I \startcombinatie[2]
+%I {\legefiguur}{a}
+%I {\legefiguur}{b}
+%I \stopcombinatie
+%I
+%I Rond \start-\stopcombineer hoeven geen {} te worden
+%I geplaatst.
+%I
+%I De afstanden tussen de inhouden en de titels kunnen worden
+%I ingesteld met:
+%I
+%I \stelcombinatiesin[voor=,na=,tussen=,afstand=,
+%I uitlijnen=,hoogte=,breedte=]
+%I
+%I Waarbij de afstand betrekking heeft op de horizontale
+%I afstand (een maat dus) en voor, na en tussen commando's
+%I zijn (bijvoorbeeld \blanko).
+
+%T n=combinaties
+%T m=com
+%T a=c
+%T
+%T \startcombinatie
+%T {?} {}
+%T {} {}
+%T \stopcombinatie
+
+\newcount\horcombinatie % counter
+\newcount\totcombinatie
+
+\def\stelcombinatiesin%
+ {\dodoubleargument\getparameters[\??co]}
+
+\long\def\dodostartcombinatie[#1*#2*#3]%
+ {\stelfractiesin
+ [\c!n=\v!passend,
+ \c!afstand=\@@coafstand]%
+ \global\horcombinatie=#1\relax
+ \global\totcombinatie=#2\relax
+ \multiply\totcombinatie by \horcombinatie
+ \long\def\docombinatie##1##2##3% % ##3 gobbles spaces.
+ {\vbox
+ {\setbox0=\vbox
+ {\hbox{##1}}%
+ \doifemptyelse{##2} % Dit moet per se
+ {\setbox2=\box\voidb@x} % \doifempty zijn!
+ {\setbox2=\vtop
+ {\hsize\wd0
+ \forgetall
+ \steluitlijnenin[\@@couitlijnen]% % \raggedcenter
+ \begstrut##2\endstrut}}%
+ \vbox
+ {\forgetall % \stelwitruimtein[\v!geen]%
+ \box0\relax
+ \ifvoid2\relax
+ \else
+ \@@cotussen
+ \nointerlineskip % recently added
+ \box2\relax
+ \fi}}%
+ \ifnum\totcombinatie>1\relax
+ \global\advance\totcombinatie by -1\relax
+ \global\advance\horcombinatie by -1\relax
+ \ifnum\horcombinatie=0\relax
+ \def\next%
+ {\cr
+ \noalign
+ {\forgetall %\stelwitruimtein[\v!geen]%
+ \nointerlineskip
+ \@@cona
+ \@@covoor
+ \vss
+ \nointerlineskip}%
+ \global\horcombinatie=#1\relax
+ \docombinatie{##3}}%
+ \else
+ \def\next%
+ {&&&\hskip\@@coafstand
+ &\docombinatie{##3}}%
+ \fi
+ \else
+ \def\next%
+ {\cr
+ \egroup
+ ##3}%
+ \fi
+ \next}%
+ \tabskip=\!!zeropoint
+ \doifelse{\@@cobreedte}{\v!passend}
+ {\halign}
+ {\halign to \@@cobreedte}%
+ \bgroup&\hfil##\hfil&\tabskip\!!zeropoint \!!plus 1fill##\cr
+ \docombinatie}
+
+\def\complexdostartcombinatie[#1]%
+ {\dodostartcombinatie[#1*1*]}
+
+\def\simpledostartcombinatie%
+ {\complexdostartcombinatie[2]}
+
+\def\startcombinatie%
+ {\bgroup
+ \forgetall
+ \doifelse{\@@cohoogte}{\v!passend}
+ {\vbox}
+ {\vbox to \@@cohoogte}%
+ \bgroup
+ \complexorsimple{dostartcombinatie}}
+
+\def\stopcombinatie%
+ {\egroup
+ \egroup}
+
+\def\plaatsonderelkaar%
+ {\bgroup
+ \dowithnextbox
+ {\setbox0=\box\nextbox
+ \dowithnextbox
+ {\mindermeldingen
+ \halign{\hss########\hss\cr\box0\cr\box\nextbox\cr}%
+ \egroup}
+ \hbox}
+ \hbox}
+
+\def\plaatsnaastelkaar%
+ {\bgroup
+ \dowithnextbox
+ {\dowithnextbox
+ {\valign{\vss########\vss\cr\box0\cr\box\nextbox\cr}%
+ \egroup}
+ \vbox}
+ \vbox}
+
+%I n=Overlay
+%I c=\startoverlay
+%I
+%I De onderstaande commando's zijn beschikbaar, maar nog in
+%I ontwikkeling.
+%I
+%I \startoverlay
+%I {} {} {}
+%I \stopoverlay
+
+\def\startoverlay%
+ {\hbox\bgroup\futurelet\next\dogetoverlay}
+
+\def\stopoverlay%
+ {\unskip\egroup}
+
+\def\dogetoverlay%
+ {\ifx\next\bgroup
+ \let\next=\dodogetoverlay
+ \else
+ \let\next=\relax
+ \fi
+ \next}
+
+\def\dodogetoverlay%
+ {\dowithnextbox{\unskip\copy\nextbox\hskip-\wd\nextbox}\hbox}
+
+%I n=Files
+%I c=\definieerfile
+%I
+%I De onderstaande commando's zijn beschikbaar, maar nog in
+%I ontwikkeling.
+%I
+%I \gebruikexternefile [groep] [naam] [file] [instellingen]
+%I
+%I \gebruikexternefiles [groep] [korps=,file=]
+%I \stelexternefilesin [groep] [korps=,file=]
+%I
+%I \naam{naam} of \naam
+%I
+%I Standaard zijn gedefinieerd:
+%I
+%I \gebruikexternefiles[pictex][korps=klein,file=pictex]
+%I \gebruikexternefiles[table][file=table]
+
+\def\dogebruikexternefiles[#1][#2]%
+ {\getparameters
+ [\??fi#1]
+ [\c!file=,
+ \c!korps=,
+ \c!optie=,
+ #2]}
+
+\def\gebruikexternefiles%
+ {\dodoubleargument\dogebruikexternefiles}
+
+\def\dostelexternefilesin[#1][#2]%
+ {\doifundefinedelse{\??fi#1\c!file}
+ {\gebruikexternefiles[#1][#2]}
+ {\getparameters[\??fi#1][#2]}}
+
+\def\stelexternefilesin%
+ {\dodoubleargument\dostelexternefilesin}
+
+\def\verwerkexternefile#1#2#3%
+ {\bgroup
+ \getparameters[\??fi#1][\c!file=,#3]%
+ \doinputonce{\getvalue{\??fi#1\c!file}}%
+ \ExpandFirstAfter\switchtocorps[\getvalue{\??fi#1\c!korps}]%
+ \readsysfile{#2} % beter: loc of fix gebied
+ {}
+ {\showmessage{\m!systems}{41}{#2,#1}}%
+ \egroup}
+
+\def\dogebruikexternefile[#1][#2][#3][#4]%
+ {\stelexternefilesin[#1][]%
+ \doinputonce{\getvalue{\??fi#1\c!file}}%
+ \doifelsenothing{#2}
+ {\setvalue{#3}{\verwerkexternefile{#1}{#3}{#4}}}
+ {\setvalue{#2}{\verwerkexternefile{#1}{#3}{#4}}}}
+
+\def\gebruikexternefile%
+ {\doquadrupleargument\dogebruikexternefile}
+
+%I n=Roteren
+%I c=\roteer
+%I
+%I Er is een rotatiecommando beschikbaar:
+%I
+%I \roteer[rotatie=]{}
+%I
+%I Waarbij als rotatie 0, 90, 180 of 270 kan worden opgegeven.
+%I Als extra instellingen kunnen de instellingen van
+%I \omlijnd worden meegegeven. Er wordt gebruik gemaakt van
+%I het \special commando en het rotatiemechanisme van
+%I PostScript. Dit betekent dat in de previewer de tekst
+%I niet (!) geroteerd wordt. Overigens draagt TeX zorg voor
+%I de exacte plaatsing, uitlijnen enz. De afhankelijkheid
+%I van PostScript is dus tot een minimum beperkt.
+%I
+%I Verder zijn dezelfde instellingen mogelijk als bij
+%I \omlijnd.
+
+\presetlocalframed[\??ro]
+
+\def\stelroterenin%
+ {\dodoubleargument\getparameters[\??ro]}
+
+% \ht, \vfillvoor, \vfillna, \wd, \hfillvoor, \hfillna
+
+\def\dodostoproteer#1#2#3#4#5#6%
+ {\vbox to #1\framebox
+ {#2\relax
+ \hbox to #4\framebox
+ {#5\relax
+ \doif{\@@rorotatie}{}%
+ {\def\@@rorotatie{90}}%
+ \dostartrotation{\@@rorotatie}%
+ \wd\framebox=\!!zeropoint
+ \ht\framebox=\!!zeropoint
+ \box\framebox\relax
+ \dostoprotation
+ #6}%
+ #3}}
+
+\def\dostoproteer%
+ {\egroup
+ \!!counta=\@@rorotatie\relax
+ \divide\!!counta by 90\relax
+ \ifcase\!!counta
+ \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \or
+ \dodostoproteer\wd\vfill\relax\ht\relax\hfill
+ \or
+ \dodostoproteer\ht\vfill\relax\wd\hfill\relax
+ \or
+ \dodostoproteer\wd\relax\vfill\ht\hfill\relax
+ \else
+ \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \fi
+ \egroup
+ \egroup}
+
+\def\complexroteer[#1]%
+ {\bgroup
+ \getparameters[\??ro][#1]%
+ \setbox\framebox=\vbox
+ \bgroup
+ \localframed[\??ro][#1]%
+ \bgroup
+ \aftergroup\dostoproteer
+ \let\next=}
+
+\def\roteer%
+ {\bgroup % \roteer kan argument zijn
+ \complexorsimpleempty{roteer}}
+
+% verdelen \hsize in fracties
+%
+% \fractie[n/m,elementen,afstand]
+%
+% \fractie[2/5,3,1em]
+% \fractie[2/5,3,1em]
+% \fractie[1/5,3,1em]
+%
+% \stelfractiesin[afstand=,aantal=] (passend,passend)
+
+\def\??fr{@@fr}
+
+\def\stelfractiesin%
+ {\dodoubleargument\getparameters[\??fr]}
+
+\def\dodofractie[#1/#2,#3,#4,#5]%
+ {\doifelsenothing{#3}
+ {\doifelse{\@@frn}{\v!passend}
+ {\!!counta=#2\relax}
+ {\!!counta=\@@frn\relax}}
+ {\!!counta=#3\relax}%
+ \doifelsenothing{#4}
+ {\doifelse{\@@frafstand}{\v!passend}
+ {\!!widtha=\!!zeropoint}
+ {\!!widtha=\@@frafstand}}
+ {\!!widtha=#4}%
+ \advance\!!counta by -1\relax
+ \multiply\!!widtha by \!!counta
+ \advance\hsize by -\!!widtha
+ \divide\hsize by #2\relax
+ \hsize=#1\hsize}
+
+\def\dofractie[#1]%
+ {\dodofractie[#1,,,,,,]}
+
+\def\fractie%
+ {\dosingleargument\dofractie}
+
+\stelfractiesin
+ [\c!afstand=\tfskipsize,
+ \c!n=\v!passend]
+
+% Standaardinstellingen
+
+\stelexternefigurenin
+ [\c!optie=,
+ \c!korps=\korpsgrootte,
+ \c!gebied=,
+ \c!file=\f!utilityfilename.\f!figureextension,
+ \c!straal=.5\korpsgrootte,
+ \c!hoek=\v!recht,
+ \c!lokatie=]
+
+\stelroterenin
+ [\c!rotatie=90,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!offset=\v!geen,
+ \c!kader=\v!uit]
+
+\stelcombinatiesin
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!afstand=1em,
+ \c!voor=\blanko,
+ \c!tussen={\blanko[\v!middel]},
+ \c!na=,
+ \c!uitlijnen=\v!midden]
+
+\gebruikexternefiles
+ [pictex]
+ [\c!korps=\v!klein,
+ \c!file=pictex]
+
+\gebruikexternefiles
+ [table]
+ [\c!file=table]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-01d.tex b/tex/context/base/core-01d.tex new file mode 100644 index 000000000..138d0cc4b --- /dev/null +++ b/tex/context/base/core-01d.tex @@ -0,0 +1,3148 @@ +%D \module
+%D [ file=core-01d,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=1D (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros (d)}
+
+\unprotect
+
+\startmessages dutch library: references
+ 21: document -- geladen
+ 22: document -- is niet interactief
+ 23: onduidelijke verwijzing -- (prefix=--)
+\stopmessages
+
+\startmessages english library: references
+ 21: document -- loaded
+ 22: document -- is not interactive
+ 23: obscure reference -- (prefix=--)
+\stopmessages
+
+\startmessages german library: references
+ 21: Dokument -- geladen
+ 22: Dokument -- ist nicht aktiv
+ 23: Obskure Referenz -- (Prefix=--)
+\stopmessages
+
+\startmessages dutch library: interactions
+ title: interactie
+ 1: aspect ratio -- x -- (b x h)
+ 2: actief
+ 3: niet actief
+ 4: geen paginasynchronisatie (--) in hmode
+\stopmessages
+
+\startmessages english library: interactions
+ title: interaction
+ 1: aspect ratio -- x -- (b x h)
+ 2: active
+ 3: inactive
+ 4: no pagesynchronisation (--) in hmode
+\stopmessages
+
+\startmessages german library: interactions
+ title: Interaktion
+ 1: Aspekt des Verhaeltnis -- x -- (B x H)
+ 2: aktiv
+ 3: inaktiv
+ 4: keine Seitensynchronisation (--) im hmode
+\stopmessages
+
+\startmessages dutch library: versions
+ title: versie
+ 1: er mankeert een @+
+ 2: markeren pagina's
+ 3: geselecteerde pagina's: --
+\stopmessages
+
+\startmessages english library: versions
+ title: version
+ 1: missing @+
+ 2: marking pages
+ 3: selected pages: --
+\stopmessages
+
+\startmessages german library: versions
+ title: Version
+ 1: fehlendes @+
+ 2: Erstelle Seiten
+ 3: Ausgewaehlte Seiten: --
+\stopmessages
+
+% \setobject{name}=\somebox{}
+% \getobject{name}
+
+% BEWARE: we have to set the page dimensions first because
+% else pdftex goes wild.
+
+\def\setobject#1%
+ {\dosetuppaper{\papierformaat}{\the\papierbreedte}{\the\papierhoogte}%
+ \dowithnextbox
+ {\setxvalue{object:#1}%
+ {\noexpand\dogetobject{#1}
+ {\ifhbox\nextbox\hbox\else\vbox\fi}
+ {\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}%
+ \dostartobject{#1}%
+ {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}%
+ \box\nextbox
+ \dostopobject}}
+
+\def\dogetobject#1#2#3#4#5%
+ {\dosetuppaper{\papierformaat}{\the\papierbreedte}{\the\papierhoogte}%
+ \bgroup
+ \setbox0=\vbox to #4
+ {\vfill\doinsertobject{#1}}%
+ \setbox0=#2{\box0}%
+ \wd0=#3\ht0=#4\dp0=#5\relax
+ \box0
+ \egroup}
+
+\def\getobject#1%
+ {\getvalue{object:#1}}
+
+\def\locationcolor#1%
+ {\iflocation#1\fi}
+
+\unprotected\def\dolocationattributes#1#2%
+ {\bgroup
+ \iflocation
+ \doifdefinedelse{#1\c!kleur}
+ {\def\colorattribute{\getvalue{#1\c!kleur}}}
+ {\def\colorattribute{}}%
+ \else
+ \def\colorattribute{}%
+ \fi
+ \doifdefinedelse{#1\c!letter}
+ {\def\fontattribute{\getvalue{#1\c!letter}}}
+ {\def\fontattribute{}}%
+ \startcolor[\colorattribute]%
+ \doconvertfont{\fontattribute}{#2}%
+ \stopcolor
+ \egroup}
+
+\def\dogotocharacter#1#2#3%
+ {\ifx#1\undefined#2\else#3\fi}
+
+\def\gotobegincharacter%
+ {\hbox
+ {\dogotocharacter\blacktriangleleft
+ {\setbox0=\hbox{$\triangleleft$}%
+ \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0
+ \kern-.11ex\box0}
+ {\setbox0=\hbox{$\blacktriangleleft$}%
+ \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
+ \hbox{\lower.03ex\box2\kern-.35ex\box0}}}}
+
+\def\gotoendcharacter%
+ {\hbox
+ {\dogotocharacter\blacktriangleright
+ {\setbox0=\hbox{\mathematics{\triangleright}}%
+ \copy0\kern-.11ex
+ \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0}
+ {\setbox0=\hbox{$\blacktriangleright$}%
+ \setbox2=\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
+ \hbox{\box0\kern-.35ex\lower.03ex\box2}}}}
+
+\def\gobackwardcharacter%
+ {\mathematics{\dogotocharacter\blacktriangleright\triangleleft\blacktriangleleft}}
+
+\def\goforwardcharacter%
+ {\mathematics{\dogotocharacter\blacktriangleleft\triangleright\blacktriangleright}}
+
+\def\gotosomewherecharacter% {} permits ^\...
+ {{\hbox{\hsmash{\gobackwardcharacter}\goforwardcharacter}}}
+
+\unexpanded\def\closecharacter%
+ {\dogotocharacter\boxtimes
+ {\ruledhbox{\mathematics{\times}}}
+ {\mathematics{\boxtimes}}}
+
+\def\goforjumpcharacter%
+ {\hbox{\goforwardcharacter \kern-.5em\goforwardcharacter}}
+
+\def\gobackjumpcharacter%
+ {\hbox{\gobackwardcharacter\kern-.5em\gobackwardcharacter}}
+
+%I n=Interacteren
+%I c=\stelinteractiein,\stelinteractiemenuin
+%I c=\definieerinteractiemenu,\startinteractiemenu
+%I c=\blokkeerinteractiemenu,\geefinteractiemenuvrij
+%I c=\stelinteractieschermin,\scherm
+%I
+%I Overzichten en verwijzingen kunnen worden voorzien van
+%I voor DVIWINDO en Acrobat betekenisvolle codes. De volgende
+%I commando's zijn (voorlopig) beschikbaar:
+%I
+%I \stelinteractiein[status=,menu=,letter=,kleur=,strut=,
+%I breedte=,hoogte=,diepte=,pagina=]
+%I
+%I Hierbij hebben 'letter' en 'kleur' betrekking op in de tekst
+%I gemarkeerde woorden waar een verwijzing achter zit. Status
+%I kan 'start' of 'stop' zijn en het 'menu' kan 'aan' of 'uit'
+%I staan. Met 'pagina=ja' dwingen we pagina verwijzingen af.
+%I
+%I Zonodig kunnen een 'titel', 'subtitel', 'auteur' en 'datum'
+%I worden ingesteld.
+%P
+%I Een menu wordt gedefinieerd met het commando:
+%I
+%I \definieerinteractiemenu[naam][plaats][instellingen]
+%I
+%I waarbij in plaats van de instellingen de naam van een
+%I reeds gedefinieerd menu kan worden opgegeven.
+%I
+%I Mogelijke plaatsen zijn 'boven', 'onder', 'links' en
+%I 'rechts'.
+%P
+%I De inhoud van een menu wordt gedefinieerd met:
+%I
+%I \definieerinteractiemenu[naam][inhoud]
+%I
+%I Een voorbeeld van zo'n definitie is:
+%I
+%I \definieerinteractiemenu
+%I [links]
+%I [{inhoud[inhoud]},
+%I {formules[formules]},
+%I {index[index]}]
+%I
+%I De accolades zijn essentieel! De verwijzingen dienen met de
+%I daarvoor gebruikelijke commando's te worden aangemaakt.
+%I Verwijzingen zoals [inhoud] en [index] zijn automatisch
+%I beschikbaar.
+%P
+%I Naast [inhoud], [index] en andere voor de hand liggende
+%I verwijzingen zijn beschikbaar:
+%I
+%I [eerstepagina]
+%I [vorigepagina]
+%I [volgendepagina]
+%I [laatstepagina]
+%P
+%I Een alternatieve manier om menu's te definieren levert
+%I het commando
+%I
+%I \startinteractiemenu
+%I \stopinteractiemenu
+%I
+%I Hierbinnen zijn de volgende commando's mogelijk:
+%I
+%I \raw tekst \\ : ongeformatteerde tekst
+%I \but[ref] tekst \\ : interactief menu item
+%I \nop \\ : dummy menu item
+%I \txt tekst \\ : niet interactief menu item (omlijnd)
+%I \rul tekst \\ : niet interactief menu item
+%I \com commandos \\ : commando's
+%P
+%I Instellingen kunnen ook apart plaatsvinden met:
+%I
+%I \stelinteractiemenuin[naam][voor=,na=,tussen=,breedte=,
+%I kader=,letter=,status=,achtergrond=,achtergrondkleur=,
+%I achtergrondraster=]
+%I
+%I Aan 'voor', 'na' en 'tussen' kunnen commando's worden
+%I toegekend, zoals: \hfill, \blanko en \hskip1em. Bij
+%I 'breedte' kan een maat, 'passend' of 'ruim' worden
+%I meegegeven. Het kader kan 'aan' of 'uit' staan.
+%I
+%I De status kan 'start', 'stop', 'leeg' of 'geen' zijn. De
+%I instelling 'leeg' geldt slechts een pagina. De instelling
+%I 'geen' heeft alleen zin bij meerdere menus naast cq. boven
+%I elkaar.
+%P
+%I Het is mogelijk een menu te (de)blokkeren. Dit gebeurt met
+%I behulp van het referentie-mechanisme. Het commando luidt:
+%I
+%I \blokkeerinteractiemenu[plaats][verwijzingen]
+%I \geefinteractiemenuvrij[plaats][verwijzingen]
+%I
+%I De verwijzingen moeten worden gescheiden door comma's.
+%I Wanneer geen verwijzingen worden meegegeven, wordt de
+%I blokkade opgeheven.
+%P
+%I Eventueel kunnen tussen menuitems commando's worden
+%I opgenomen,
+%I
+%I \definieerinteractiemenu
+%I [links]
+%I [{alfa[eerste]},
+%I {beta[tweede]},
+%I {{\blanko[forceer,3*groot]}},
+%I {gamma[derde]},
+%I {{\vfil}},
+%I {omega[laatste]}]
+%I
+%I De extra {} zijn nodig, omdat anders onduidelijkheid is
+%I of het commando's zijn of verwijzingen.
+%P
+%I De afmetingen van het interactiescherm kunnen worden
+%I ingesteld met het commando:
+%I
+%I \stelinteractieschermin[breedte=,hoogte=,rugwit=,
+%I kopwit=,optie=]
+%I
+%I Dit is alleen nodig als men het interactieprogramma wil
+%I dwingen de tekst op een afwijkend papierformaat weer te
+%I geven. Als hoogte en breedte kan 'passend' worden
+%I opgegeven, in dat geval wordt uitgegaan van de
+%I instellingen bij \stellayoutin.
+%I
+%I Er kan (in acrobat) met een vol scherm worden opgestart
+%I met optie=max.
+%P
+%I Er zijn meerdere menu's naast elkaar mogelijk. Eerst
+%I wordt een menu gedefinieerd met:
+%I
+%I \definieerinteractiemenu[naam][plaats][instellingen]
+%I
+%I De afstand tussen menus wordt ingesteld met 'afstand'.
+%I Als afstand=overlay dan vallen menus over elkaar.
+
+\def\setupinteractionscreens%
+ {}
+
+\def\complexstelinteractieschermin[#1]%
+ {\getparameters[\??sc][#1]%
+ \def\setupinteractionscreens% met a, b en \number
+ {\bgroup
+ \doifelse{\@@scbreedte}{\v!passend}
+ {\!!widtha=\linkerrandbreedte
+ \advance\!!widtha by \linkerrandafstand
+ \advance\!!widtha by \paginascheiding
+ \advance\!!widtha by \linkermargebreedte
+ \advance\!!widtha by \linkermargeafstand
+ \ifdim\rugwit>\!!widtha\ifdim\rugwit>\!!zeropoint\relax
+ \advance\rugwit by -\!!widtha
+ \fi\fi
+ \advance\!!widtha by \zetbreedte
+ \advance\!!widtha by \rechtermargeafstand
+ \advance\!!widtha by \rechtermargebreedte
+ \advance\!!widtha by \paginascheiding
+ \advance\!!widtha by \rechterrandafstand
+ \advance\!!widtha by \rechterrandbreedte
+ \scratchdimen=\@@scrugwit
+ \advance\scratchdimen by \@@scrugoffset
+ \advance\!!widtha by 2\scratchdimen}
+ {\!!widtha=\@@scbreedte}%
+ \doifelse{\@@schoogte}{\v!passend}
+ {\!!heighta=\bovenhoogte
+ \advance\!!heighta by \bovenafstand
+ \ifdim\kopwit>\!!heighta\ifdim\kopwit>\!!zeropoint\relax
+ \advance\kopwit by -\!!heighta
+ \fi\fi
+ \advance\!!heighta by \zethoogte
+ \advance\!!heighta by \onderafstand
+ \advance\!!heighta by \onderhoogte
+ \scratchdimen=\@@sckopwit
+ \advance\scratchdimen by \@@sckopoffset
+ \advance\!!heighta by 2\scratchdimen}
+ {\!!heighta=\@@schoogte}%
+ \doifelse{\@@scoptie}{\v!max}
+ {\doif{\@@lyplaats}{\v!midden}
+ {\scratchdimen=\printpapierhoogte
+ \advance\scratchdimen by -\papierhoogte
+ \divide\scratchdimen by 2
+ \advance\kopoffset by \scratchdimen
+ \scratchdimen=\printpapierbreedte
+ \advance\scratchdimen by -\papierbreedte
+ \divide\scratchdimen by 2
+ \advance\rugoffset by \scratchdimen}%
+ \!!counte=1}
+ {\!!counte=0}%
+ \showmessage{\m!interactions}{1}
+ {\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}%
+ \dosetupscreen
+ {\number\rugoffset}{\number\kopoffset}
+ {\number\!!widtha}{\number\!!heighta}
+ {\the\!!counte}%
+ \dosetupidentity
+ {\@@iatitel}
+ {\@@iasubtitel}
+ {\@@iaauteur}
+ {CONTEXT / PRAGMA / ZWOLLE NL / \jobname.tex}
+ {\@@iadatum}
+ \egroup}}
+
+\def\simplestelinteractieschermin%
+ {\setupinteractionscreens}
+
+\def\stelinteractieschermin%
+ {\complexorsimple{stelinteractieschermin}}
+
+% Bookmarks zijn eigenlijk niet nodig omdat \TeX uitstekend
+% zelf inhoudsopgaven kan genereren.
+%
+% \acrobatacrobatbookmark[verwijzing]{tekst}
+%
+% \def\acrobatbookmark[#1]#2%
+% {\doifreferencefoundelse{#1}
+% {\bgroup
+% \getrealreference{#1}%
+% \special
+% {postscript
+% [/Page \currentrealreference\normalspace
+% /View [ /Fit ]
+% /Title (#2)
+% /OUT
+% pdfmark}%
+% \egroup}%
+% {\unknownreference{#1}}}
+
+%D Due to requests I finally decided to support bookmarks, a
+%D driver dependant way of showing tables of content. The most
+%D simple way of support is hooking bookmark generation into
+%D the existing list mechanisms. That way users can generate
+%D bookmarks automatically, although its entirely valid to add
+%D bookmarks by defining alternative ones. These will be added
+%D at the appropriate place in the list.
+
+% \hoofdstuk{het eerste hoofdstuk}
+%
+% \bookmark {de eerste bookmark} % optional overuled hoofdstuk
+%
+% .... text ....
+%
+% \placebookmarks [hoofdstuk,paragraaf,subparagraaf,subsubparagraaf,mylist]
+% [open list]
+%
+% \bookmark[mylist]{whatever}
+
+\def\@@bookmark {bm::}
+\def\@@booklevel{bl::}
+\def\@@bookcount{bc::}
+
+\definieerlijst[\@@bookmark]
+
+\appendtoks\flushpostponedbookmark\to\everypar
+\appendtoks\flushpostponedbookmark\to\neverypar
+
+\let\flushpostponedbookmark\relax
+
+\def\simplebookmark#1%
+ {\ifx\flushpostponedbookmark\relax \else
+ \bgroup
+ \convertargument#1\to\ascii
+ \writestatus{system}{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN
+ \egroup
+ \fi
+ \gdef\flushpostponedbookmark%
+ {\global\let\flushpostponedbookmark\relax
+ \schrijfnaarlijst[\@@bookmark]{}{#1}}}
+
+\def\complexbookmark[#1]#2%
+ {\schrijfnaarlijst[#1]{}{#2}}
+
+\definecomplexorsimple\bookmark
+
+%\def\insertbookmark[#1]#2%
+% {\bgroup
+% \doifreferencefoundelse{#1}
+% {\getrealreference{#1}%
+% \doinsertbookmark{0}{0}{#2}{\currentrealreference}}{1}
+% {\unknownreference{#1}}%
+% \egroup}
+
+\newif\iftracebookmarks \tracebookmarksfalse
+
+\def\placebookmarks%
+ {\dodoubleempty\doplacebookmarks}
+
+\def\doplacebookmarks[#1][#2]%
+ {\iflocation
+ \iffirstargument
+ \bgroup
+ \ifsecondargument
+ \edef\openbookmarklist{#2}%
+ \else
+ \let\openbookmarklist=\empty
+ \fi
+ \global\let\bookmarklevellist=\empty
+ \def\bookmarklevelcount{0}%
+ \doprocessbookmarks[#1]\dogetbookmarkelement
+ \dolijstelement{}{}{}{}{}{}% needed to finish the first pass
+ \doprocessbookmarks[#1]\doputbookmarkelement
+ \flushbookmark
+ \egroup
+ \else
+ \expanded{\placebookmarks\@EA[\getvalue{\??ih\v!inhoud\c!lijst}]}%
+ \fi
+ \fi}
+
+\def\doprocessbookmarks[#1]#2%
+ {\let\dolijstelement=#2\relax
+ \scratchcounter=0
+ \def\docommando##1%
+ {\advance\scratchcounter by 1
+ \getlistlevel[##1]\listlevel{\the\scratchcounter}%
+ \setxvalue{\@@bookcount\the\scratchcounter}{1}%
+ \setxvalue{\@@booklevel##1}{\listlevel}}%
+ \processcommalist[#1]\docommando
+ \setxvalue{\@@bookcount0}{1}%
+ \global\chardef\currentbookmarklevel=0
+ \global\chardef\previousbookmarklevel=0
+ \doutilities{#1,\@@bookmark}{\jobname}{#1}{}{}}
+
+\def\dodogetbookmarkelement#1#2#3#4#5#6%
+ {%\doifsomething{#1}
+ % {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \doifelsenothing{#1}
+ {\global\chardef\currentbookmarklevel=0\relax}
+ {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \ifnum\currentbookmarklevel>\previousbookmarklevel
+ \setxvalue{\@@bookcount\the\currentbookmarklevel}{1}\relax
+ \else\ifnum\currentbookmarklevel<\previousbookmarklevel
+ \bgroup
+ \!!counta=\previousbookmarklevel
+ \doloop
+ {\let\bookmarktag=\empty
+ \!!countb=\!!counta
+ \advance\!!countb by -1
+ \dorecurse{\!!countb}
+ {\edef\bookmarktag%
+ {\bookmarktag\getvalue{\@@bookcount\recurselevel}:}}%
+ \edef\bookmarklevelcount%
+ {\getvalue{\@@bookcount\the\!!counta}}%
+ \xdef\bookmarklevellist%
+ {\bookmarklevellist/\bookmarktag:\bookmarklevelcount/}%
+ \advance\!!counta by -1
+ \ifnum\!!counta=\currentbookmarklevel
+ \exitloop
+ \fi}%
+ \egroup
+ \@EA\doglobal\@EA\increment\csname \@@bookcount\the\currentbookmarklevel\endcsname\relax
+ \else
+ \@EA\doglobal\@EA\increment\csname \@@bookcount\the\previousbookmarklevel\endcsname\relax
+ \fi\fi
+ \global\chardef\previousbookmarklevel=\currentbookmarklevel}
+
+\def\getbookmarklevelcount%
+ {\@EA\def\@EA\docommando\@EA[\@EA##\@EA1\@EA/\bookmarktag:##2/##3]%
+ {\def\bookmarklevelcount{##2}}%
+ \@EA\@EA\@EA\docommando\@EA\@EA\@EA[\@EA\bookmarklevellist\@EA/\bookmarktag:0/]}
+
+\def\dodoputbookmarkelement#1#2#3#4#5#6%
+ {%\doifsomething{#1}
+ % {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \doifelsenothing{#1}
+ {\global\chardef\currentbookmarklevel=0\relax}
+ {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \ifnum\currentbookmarklevel>\previousbookmarklevel
+ \setxvalue{\@@bookcount\the\currentbookmarklevel}{1}\relax
+ \else\ifnum\currentbookmarklevel<\previousbookmarklevel
+ \@EA\doglobal\@EA\increment\csname \@@bookcount\the\currentbookmarklevel\endcsname\relax
+ \else
+ \@EA\doglobal\@EA\increment\csname \@@bookcount\the\previousbookmarklevel\endcsname\relax
+ \fi\fi
+ \let\bookmarktag=\empty
+ \!!countb\currentbookmarklevel
+ \dorecurse{\!!countb}
+ {\edef\bookmarktag%
+ {\bookmarktag\getvalue{\@@bookcount\recurselevel}:}}%
+ \getbookmarklevelcount
+ \iftracebookmarks
+ \bgroup
+ \par
+ \bookmarktag\quad
+ \dorecurse{\currentbookmarklevel}{\quad}\unskip#1\quad
+ (\bookmarklevelcount)\quad
+ \egroup
+ \fi
+ \global\chardef\previousbookmarklevel=\currentbookmarklevel
+ \insertsomebookmark{#1}{\the\currentbookmarklevel}{\bookmarklevelcount}{#4}{#6}}
+
+\def\dogetbookmarkelement#1#2#3#4#5#6%
+ {\doifnot{#1}{\@@bookmark}
+ {\dodogetbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\def\doputbookmarkelement#1#2#3#4#5#6%
+ {\doifelse{#1}{\@@bookmark}
+ {\localbookmark{#4}}
+ {\flushbookmark
+ \dodoputbookmarkelement{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\let\flushbookmark=\relax
+\let\localbookmark=\gobbleoneargument
+
+\def\insertsomebookmark#1#2#3#4#5%
+ {\gdef\flushbookmark%
+ {\doinsertsomebookmark{#1}{#2}{#3}{#4}{#5}{g}}%
+ \gdef\localbookmark##1%
+ {\doinsertsomebookmark{#1}{#2}{#3}{##1}{#5}{l}}}
+
+\def\doinsertsomebookmark#1#2#3#4#5#6%
+ {\global\utilitydonetrue
+ \global\let\localbookmark=\gobbleoneargument
+ \global\let\flushbookmark=\relax
+ \doifinstringelse{#1}{\openbookmarklist}
+ {\chardef\openbookmark=1}
+ {\chardef\openbookmark=0}%
+ \iftracebookmarks(#6: #4)\quad(\the\openbookmark)\par\fi
+ \doinsertbookmark{#2}{#3}{#4}{#5}{\openbookmark}}
+
+% \newif\iflocation % reeds gedefinieerd
+\newif\iflocationmenu
+\newif\iflocationmenupermitted
+
+\newbox\locationbox
+
+\newdimen\buttonheight
+\newdimen\buttonwidth
+
+% \def\dopregoto#1\start#2\stop#3\doposgoto%
+% {\hbox
+% {\setbox0=\hbox{#1}%
+% \lower\dp0\hbox
+% {\ifdim\wd0<\@@iabreedte\relax
+% \wd0=\@@iabreedte\relax
+% \fi
+% \buttonwidth=\wd0\relax
+% \buttonheight=\ht0\relax
+% \advance\buttonheight by \dp0%
+% #2#3}%
+% \box0}}
+%
+% \def\dopregoto#1\start#2\stop#3\doposgoto% recently updated
+% {\hbox
+% {\setbox0=\hbox{#1}%
+% \lower\dp0\hbox
+% {\mindermeldingen
+% \ifdim\wd0<\@@iabreedte\relax
+% \buttonwidth=\@@iabreedte\relax
+% \else
+% \buttonwidth=\wd0\relax
+% \fi
+% \buttonheight=\ht0\relax
+% \advance\buttonheight by \dp0\relax
+% \dimen0=.5\wd0 % oogt mooier dan 2 maal
+% \advance\dimen0 by -.5\buttonwidth % \skip bij \ruledhskip
+% \hbox to \!!zeropoint
+% {\hskip\dimen0#2#3}}%
+% \box0}}
+
+\let\@@ia@@hoogte=\!!zeropoint
+\let\@@ia@@diepte=\!!zeropoint
+
+\def\presetgoto% wordt al in core-01a gebruikt ipv strut
+ {\doifelse{\@@iastrut}{\v!ja}
+ {\setstrut
+ \xdef\@@ia@@hoogte{\the\ht\strutbox}%
+ \xdef\@@ia@@diepte{\the\dp\strutbox}}
+ {\xdef\@@ia@@hoogte{\@@iahoogte}%
+ \xdef\@@ia@@diepte{\@@iadiepte}}}
+
+\def\dopregoto#1\start#2\stop#3\doposgoto% recently updated again
+ {\hbox
+ {\setbox0=\hbox{#1}%
+ \ifdim\wd0<\@@iabreedte\relax
+ \buttonwidth=\@@iabreedte\relax
+ \else
+ \buttonwidth=\wd0\relax
+ \fi
+ \ifdim\ht0<\@@ia@@hoogte\relax
+ \buttonheight=\@@ia@@hoogte\relax
+ \else
+ \buttonheight=\ht0
+ \fi
+ \ifdim\dp0<\@@ia@@diepte\relax
+ \dimen0=\@@ia@@diepte\relax
+ \else
+ \dimen0=\dp0\relax
+ \fi
+ \advance\buttonheight by \dimen0
+ \setbox2=\hbox
+ {\lower\dimen0\hbox
+ {\mindermeldingen
+ \dimen0=.5\wd0
+ \advance\dimen0 by -.5\buttonwidth
+ \hskip\dimen0#2#3}}%
+ \smashbox2\box2\box0
+ \global\let\@@ia@@hoogte=\!!zeropoint
+ \global\let\@@ia@@diepte=\!!zeropoint}}
+
+\def\gotoexternal#1#2%
+ {\iflocation
+ \dowithreferenceprefix{\otherprefix#1}% \otherprefix toegevoegd
+ {\getrealreference{\otherprefix#1}%
+ \dopregoto
+ {#2}%
+ \start
+ \dostartgotolocation
+ {\number\buttonwidth}{\number\buttonheight}
+ {\otherURL}{\otherfile}
+ {\referenceprefix#1}{\currentrealreference}%
+ \stop
+ \dostopgotolocation
+ \doposgoto}%
+ \else
+ {#2}%
+ \fi}
+
+\def\gotointernal#1#2#3%
+ {\iflocation
+ \dopregoto
+ {#2}%
+ \start
+ \dostartgotolocation
+ {\number\buttonwidth}{\number\buttonheight}
+ {}{\otherfile}
+ {#1}{#3}%
+ \stop
+ \dostopgotolocation
+ \doposgoto
+ \else
+ {#2}%
+ \fi}
+
+\def\gotorealpage#1#2%
+ {\iflocation
+ \dopregoto
+ {#2}%
+ \start
+ \dostartgotorealpage
+ {\number\buttonwidth}{\number\buttonheight}
+ {\otherURL}{\otherfile}{#1}%
+ \stop
+ \dostopgotorealpage
+ \doposgoto
+ \else
+ {#2}%
+ \fi}
+
+\def\executecommand#1#2%
+ {\iflocation
+ \dopregoto
+ {#2}%
+ \start
+ \dostartexecutecommand
+ {\number\buttonwidth}{\number\buttonheight}
+ {#1}{}%
+ \stop
+ \dostopexecutecommand
+ \doposgoto
+ \else
+ {#2}%
+ \fi}
+
+%\def\thisisoneexternal#1%
+% {\dostartthisislocation{\referenceprefix#1}}
+%
+%\def\thisisexternal#1%
+% {\iflocation
+% \@EA\processcommalist\@EA[#1]\thisisoneexternal
+% \dostopthisislocation
+% \fi}
+%
+%\def\thisisinternal#1%
+% {\iflocation
+% \@EA\processcommalist\@EA[#1]\dostartthisislocation
+% \dostopthisislocation
+% \fi}
+
+\def\thisisexternal#1%
+ {\iflocation
+ \dostartthisislocation{#1}%
+ \dostopthisislocation
+ \fi}
+
+\def\thisisinternal#1%
+ {\iflocation
+ \dostartthisislocation{#1}%
+ \dostopthisislocation
+ \fi}
+
+\def\thisisrealpage#1%
+ {\iflocation
+ \dostartthisisrealpage{#1}%
+ \dostopthisisrealpage
+ \fi}
+
+\def\dostelinteractiein[#1]%
+ {\getparameters[\??ia][#1]%
+ \doifelse{\@@iapagina}{\v!ja}
+ {\global\usepagedestinationstrue}
+ {\global\usepagedestinationsfalse}%
+ \doifelse{\@@iastatus}{\v!start}
+ {\iflocation\else
+ \showmessage{\m!interactions}{2}{\ifusepagedestinations\space(PAGE)\fi}%
+ \global\locationtrue
+ %\dolocationstartup
+ \fi
+ \doifelse{\@@iamenu}{\v!aan}
+ {\global\locationmenutrue}
+ {\global\locationmenufalse}}
+ {\iflocation
+ \showmessage{\m!interactions}{3}{\ifusepagedestinations\space(PAGE)\fi}%
+ \global\locationfalse
+ \global\locationmenufalse
+ \fi}}
+
+\def\stelinteractiein%
+ {\dosingleargument\dostelinteractiein}
+
+\newif\iflocationstartedup \locationstartedupfalse
+
+\def\c!interactivedocument%
+ {ThisIsAnInteractiveDocument}
+
+\def\dolocationstartup%
+ {\iflocation
+ \iflocationstartedup
+ \else
+ \dosetupinteraction
+ \setupinteractionscreens
+ \global\locationstarteduptrue
+ \fi
+ \fi}
+
+\def\showlocation#1%
+ {\iflocation\color[\@@iakleur]{#1\presetgoto}\else#1\fi}
+
+\def\showcontrastlocation#1#2#3%
+ {\iflocation
+ \ifnum#2=\realpageno\relax
+ \doifelsevaluenothing{#1\c!kleur}
+ {#3\presetgoto}
+ {\color[\getvalue{#1\c!contrastkleur}]{#3\presetgoto}}%
+ \else
+ \color[\getvalue{#1\c!kleur}]{#3\presetgoto}%
+ \fi
+ \else
+ #3%
+ \fi}
+
+\def\showcoloredlocation#1#2%
+ {\iflocation
+ \color[\getvalue{#1\c!kleur}]{#2\presetgoto}%
+ \else
+ #2%
+ \fi}
+
+% \startinteractiemenu[rechts]
+% \but [eerste] eerste \\
+% \txt hello world \\
+% \but [tweede] tweede \\
+% \nop \\
+% \but [tweede] tweede \\
+% \rul whow \\
+% \but [tweede] tweede \\
+% \raw hello world \\
+% \but [tweede] tweede \\
+% \com \vfill \\
+% \but [derde] derde \\
+% \stopinteractiemenu
+
+\def\testinteractiemenu#1%
+ {\iflocationmenu
+ \doifelsevalue{\??am#1\c!status}{\v!start}
+ {\global\locationmenupermittedtrue}
+ {\global\locationmenupermittedfalse}%
+ \else
+ \global\locationmenupermittedfalse
+ \fi}
+
+\def\doblokkeerinteractiemenu[#1][#2][#3]%
+ {\def\dodoblokkeerinteractiemenu##1%
+ {\doifelse{#3}{}
+ {\setevalue{\??am##1\c!blokkade}{}}
+ {\edef\interactieblokkade{\getvalue{\??am##1\c!blokkade}}
+ \def\docommando####1%
+ {#1{####1}{\interactieblokkade}}% #1 = \remove or \add
+ \processcommalist[#3]\docommando
+ \setevalue{\??am##1\c!blokkade}{\interactieblokkade}}}%
+ \processcommalist[#2]\dodoblokkeerinteractiemenu}
+
+\def\blokkeerinteractiemenu%
+ {\dotripleempty\doblokkeerinteractiemenu[\addtocommalist]}
+
+\def\geefinteractiemenuvrij%
+ {\dotripleempty\doblokkeerinteractiemenu[\removefromcommalist]}
+
+% ja : kader/achtergrond met tekst
+% leeg : kader/achtergrond maar geen tekst
+% nee : alleen ruimte reserveren
+% geen : helemaal weglaten
+
+\newif\iflocationdummy
+\newif\ifskippedmenuitem
+
+\def\dosetlocationbox#1[#2]#3#4%
+ {\global\skippedmenuitemfalse
+ \setbox\locationbox=\hbox
+ {% anders cyclische aanroep !
+ \iflocationdummy
+ \edef\locationboxborder{\getvalue{#1\c!kader}}%
+ \edef\locationboxbackground{\getvalue{#1\c!achtergrond}}%
+ \else
+ \edef\locationboxborder{\v!uit}%
+ \edef\locationboxbackground{}%
+ \fi
+ \localframed[#1]
+ [\c!kader=\locationboxborder,\c!achtergrond=\locationboxbackground,#2]
+ {\dolocationattributes{#1}{#3}}}%
+ \hbox{#4{\copy\locationbox}}}
+
+\def\setlocationboxyes#1[#2]#3[#4]%
+ {\doifinstringelse{::}{#4}
+ {\def\currentrealreference{}}
+ {\getrealreference{#4}}%
+ \doifelse{\currentrealreference}{\realfolio}%
+ {\ifcase\getvalue{#1\c!zelfdepagina}
+ \bgroup
+ \locationdummytrue
+ \setvalue{#1\c!kleur}{}%
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!nee]{#3}{\gotolocation{#4}}%
+ \egroup
+ \or
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!ja]{#3}{\gotolocation{#4}}%
+ \or
+ \locationdummyfalse
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!ja]{#3}{\gotolocation{#4}}%
+ \or
+ \locationdummyfalse
+ \global\skippedmenuitemtrue
+ \fi}
+ {\locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!nee]{#3}{\gotolocation{#4}}}}
+
+\def\setlocationboxnop#1[#2]#3[#4]%
+ {\ifcase\getvalue{#1\c!onbekendeverwijzing}
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!nee]{#3}{}%
+ \or
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!ja]{#3}{}%
+ \or
+ \locationdummyfalse
+ \dosetlocationbox{#1}[#2,\c!dummy=\v!ja]{#3}{}%
+ \or
+ \locationdummyfalse
+ \global\skippedmenuitemtrue
+ \fi}
+
+\def\setlocationbox#1[#2]#3[#4]%
+ {\doifinstringelse{#4}{\getvalue{#1\c!blokkade}}
+ {\setlocationboxnop{#1}[#2]{#3}[#4]}
+ {\doifreferencefoundelse{#4}
+ {\setlocationboxyes{#1}[#2]{#3}[#4]}
+ {\setlocationboxnop{#1}[#2]{#3}[#4]%
+ \unknownreference{#4}}}}
+
+\def\dodosetlocationcommanditem#1#2#3[#4]#5\\%
+ {\bgroup
+ \leavevmode
+ \doifelse{#5}{[]}
+ {\doifinstringelse{=}{#4}
+ {#3}
+ {\setlocationbox{\??am#1}[]{#3}[#4]}}
+ {#3}%
+ \ifskippedmenuitem \else
+ \getvalue{\??am#1#2}%
+ \fi
+ \egroup}
+
+\def\dosetlocationcommanditem#1#2#3%
+ {\dodosetlocationcommanditem{#1}{#2}#3[]\\}
+
+\def\setlocationnop#1[#2]#3%
+ {\localframed[#1][#2]{#3}}
+
+\def\executeamboxcommands#1#2#3#4#5%
+ {\processaction
+ [\getvalue{\??am#1\c!dummy}]
+ [ \v!ja=>\chardef\handleunknownmenuitem=0\relax,
+ \v!leeg=>\chardef\handleunknownmenuitem=1\relax,
+ \v!nee=>\chardef\handleunknownmenuitem=2\relax]%
+ \getvalue{\??am#1#3}%
+ \ifextendedmenu
+ \setamboxcommands{#1}{#4}%
+ #2%
+ \else
+ \def\dolocationcommand##1%
+ {\dosetlocationcommanditem{#1}{#4}{##1}}%
+ \processcommalist[#2]\dolocationcommand
+ \fi
+ \unskip
+ \getvalue{\??am#1#5}}
+
+\def\setamboxcommands#1#2%
+ {\def\raw##1\\%
+ {\bgroup
+ \leavevmode
+ ##1%
+ \ifskippedmenuitem \else
+ \getvalue{\??am#1#2}%
+ \fi
+ \egroup}%
+ \def\but[##1]##2\\%
+ {\raw\setlocationbox{\??am#1}[]{##2}[##1]\\}%
+ \def\nop##1\\%
+ {\raw\phantom{\localframed[\??am#1][]{}}\\}%
+ \def\txt##1\\%
+ {\raw\localframed[\??am#1][\c!kader=\v!uit]{##1\unskip}\\}%
+ \def\rul##1\\%
+ {\raw\localframed[\??am#1][]{##1\unskip}\\}%
+ \def\com##1\\%
+ {##1}}
+
+\def\@@amhbox#1#2#3#4%
+ {\testinteractiemenu{#3}%
+ \iflocationmenupermitted
+ \bgroup
+ \def\dolocationcommand##1%
+ {\dosetlocationcommanditem{#3}{##1}}%
+ \dimen0=\zetbreedte
+ \advance\dimen0 by \pagebackgroundhoffset
+ \advance\dimen0 by \pagebackgroundhoffset
+\advance\dimen0 by -\getvalue{\??am#3\c!linkeroffset}%
+\advance\dimen0 by -\getvalue{\??am#3\c!rechteroffset}%
+ \setbox0=\hbox to \dimen0
+ {\forgetall
+ \executeamboxcommands{#3}{#4}\c!links\c!midden\c!rechts}%
+ \wd0=\zetbreedte
+% geen \ht=#2 setting (yet)
+ \hskip-\pagebackgroundhoffset
+\hskip \getvalue{\??am#3\c!linkeroffset}%
+ \box0\relax
+ \egroup
+ \else
+ #1\relax
+ \fi}
+
+\def\@@amvbox#1#2#3#4% don't change skipping, this one works!
+ {\testinteractiemenu{#3}%
+ \iflocationmenupermitted
+ \bgroup
+ \dimen0=\teksthoogte
+ \advance\dimen0 by \pagebackgroundvoffset
+ \advance\dimen0 by \pagebackgroundvoffset
+ \advance\dimen0 by \pagebackgrounddepth
+\advance\dimen0 by -\getvalue{\??am#3\c!bovenoffset}%
+\advance\dimen0 by -\getvalue{\??am#3\c!onderoffset}%
+ \setbox0=\vbox to \dimen0
+ {\forgetall % Voor't geval de afstand
+ \stelblankoin[\v!standaard]% % (tijdelijk) is aangepast.
+ \hsize#2\relax
+ \executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na}%
+ \setbox0=\vbox
+ {\vskip-\pagebackgroundvoffset
+\vskip\getvalue{\??am#3\c!bovenoffset}%
+ \ht0=\!!zeropoint
+ \box0
+ \vskip\pagebackgroundvoffset}% overbodig
+ \ht0=\teksthoogte
+ \wd0=#2\relax
+ \box0
+ \egroup
+ \else
+ #1\relax
+ \fi}
+
+\setvalue{\??am\s!do\v!rechts}%
+ {\@@amvbox{\dodummypageskip\v!rechts}\rechterrandbreedte}
+
+\setvalue{\??am\s!do\v!links}%
+ {\@@amvbox{\dodummypageskip\v!links}\linkerrandbreedte}
+
+\setvalue{\??am\s!do\v!boven}%
+ {\@@amhbox{\dodummypageskip\v!boven}\bovenhoogte}
+
+\setvalue{\??am\s!do\v!onder}%
+ {\@@amhbox{\dodummypageskip\v!onder}\onderhoogte}
+
+\def\dointeractiemenu#1#2%
+ {\getvalue{\??am\s!do\getvalue{\??am#1\c!plaats}}{#1}{#2}}
+
+\def\interactiemenu[#1]%
+ {\geentest\getvalue{\??am\c!menu#1}}
+
+\def\horizontaalinteractiemenu#1#2#3#4%
+ {\dimen2=\!!zeropoint
+ \setbox0=\hbox
+ {\def\docommando##1%
+ {\doifnotvalue{\??am##1\c!status}{\v!geen}
+ {\hskip\dimen2
+ \setbox2=\hbox to #2
+ {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
+ \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
+ {\dimen2=\!!zeropoint
+ \wd2=\!!zeropoint}%
+ {\dimen2=\getvalue{\??am##1\c!afstand}}%
+ \box2}}%
+ \startinteractie
+ \processcommacommand[\getvalue{\??am#1}]\docommando
+ \stopinteractie}%
+ \wd0=#2\relax
+ \box0\relax}
+
+\def\vertikaalinteractiemenu#1#2#3#4%
+ {\dimen2=\!!zeropoint
+ \setbox0=\vbox
+ {\def\docommando##1%
+ {\doifnotvalue{\??am##1\c!status}{\v!geen}
+ {\vskip\dimen2
+ \setbox2=\vbox to #2
+ {\getvalue{\??am##1#3}\interactiemenu[##1]\getvalue{\??am##1#4}}%
+ \doifelsevalue{\??am##1\c!afstand}{\v!overlay}
+ {\dimen2=\!!zeropoint
+ \offinterlineskip
+ \dp2=\!!zeropoint
+ \ht2=\!!zeropoint}%
+ {\dimen2=\getvalue{\??am##1\c!afstand}}%
+ \box2}}%
+ \startinteractie
+ \processcommacommand[\getvalue{\??am#1}]\docommando
+ \stopinteractie}%
+ \ht0=#2\relax
+ \dp0=\!!zeropoint
+ \box0\relax}
+
+\def\interactiemenus[#1]%
+ {\iflocation
+ \processaction
+ [#1]
+ [ \v!links=>\horizontaalinteractiemenu\v!links\linkerrandbreedte\c!links\c!rechts,
+ \v!rechts=>\horizontaalinteractiemenu\v!rechts\rechterrandbreedte\c!links\c!rechts,
+ \v!boven=>\vertikaalinteractiemenu\v!boven\bovenhoogte\c!voor\c!na,
+ \v!onder=>\vertikaalinteractiemenu\v!onder\onderhoogte\c!voor\c!na]%
+ \else
+ \dodummypageskip{#1}%
+ \fi}
+
+\setvalue{\??am\v!links}{}
+\setvalue{\??am\v!rechts}{}
+\setvalue{\??am\v!boven}{}
+\setvalue{\??am\v!onder}{}
+
+\newif\ifextendedmenu
+
+\def\dodefinieerinteractiemenu[#1][#2][#3]%
+ {\ConvertToConstant\doifelse{#3}{}
+ {\setvalue{\??am\c!menu#1}%
+ {\extendedmenufalse\dointeractiemenu{#1}{#2}}}
+ {\setvalue{\??am\c!menu#1}%
+ {\extendedmenufalse\dointeractiemenu{#1}{}}%
+ \presetlocalframed[\??am#1]%
+ \setvalue{\??am#1\c!blokkade}{}%
+ \edef\!!stringe{\getvalue{\??am#2}}%
+ \addtocommalist{#1}\!!stringe
+ \letvalue{\??am#2}=\!!stringe
+ \doifnot{#1}{#2}
+ {\copyparameters[\??am#1][\??am#2]
+ [\c!links,\c!midden,\c!rechts,\c!voor,\c!na,\c!tussen,
+ \c!breedte,\c!hoogte,\c!afstand,\c!offset,\c!kader,
+ \c!achtergrond,\c!achtergrondkleur,\c!achtergrondraster,
+ \c!letter,\c!kleur,\c!zelfdepagina,\c!onbekendeverwijzing,
+ \c!linkeroffset,\c!rechteroffset,\c!bovenoffset,\c!onderoffset]}%
+ \ConvertToConstant\doifinstringelse{=}{#3}
+ {\getparameters[\??am#1][\c!plaats=#2,#3]}%
+ {\doifnot{#2}{#3}
+ {\copyparameters[\??am#1][\??am#3]
+ [\c!links,\c!midden,\c!rechts,\c!voor,\c!na,\c!tussen,
+ \c!breedte,\c!hoogte,\c!afstand,\c!offset,\c!kader,
+ \c!achtergrond,\c!achtergrondkleur,\c!achtergrondraster,
+ \c!letter,\c!kleur,\c!zelfdepagina,\c!onbekendeverwijzing,
+ \c!linkeroffset,\c!rechteroffset,\c!bovenoffset,\c!onderoffset]}%
+ \getparameters[\??am#1][\c!plaats=#2]}}}
+
+\def\definieerinteractiemenu%
+ {\dotripleempty\dodefinieerinteractiemenu}
+
+\def\startinteractiemenu[#1]#2\stopinteractiemenu%
+ {\setvalue{\??am\c!menu#1}%
+ {\extendedmenutrue\dointeractiemenu{#1}{#2}}}
+
+\def\dododostelinteractiemenuin#1%
+ {\processaction
+ [\getvalue{#1}]
+ [ \v!ja=>\setvalue{#1}{0},
+ \v!leeg=>\setvalue{#1}{1},
+ \v!nee=>\setvalue{#1}{2},
+ \v!geen=>\setvalue{#1}{3},
+ \s!default=>\setvalue{#1}{1}]}
+
+\def\dodostelinteractiemenuin[#1][#2]%
+ {\def\docommando##1%
+ {\getparameters[\??am##1][#2]
+ \dododostelinteractiemenuin{\??am##1\c!onbekendeverwijzing}%
+ \dododostelinteractiemenuin{\??am##1\c!zelfdepagina}}%
+ \processcommalist[#1]\docommando}
+
+\def\dostelinteractiemenuin[#1][#2]%
+ {\ConvertToConstant\doifinstringelse{=}{#2}
+ {\dodostelinteractiemenuin[#1][#2]}
+ {\dodefinieerinteractiemenu[#1][#2][]}}
+
+\def\stelinteractiemenuin%
+ {\dodoubleargument\dostelinteractiemenuin}
+
+% \scherm moet worden als \pagina
+
+\def\simplescherm% zou niet nodig moeten zijn
+ {\iflocation
+ \pagina[\v!ja]%
+ \fi}
+
+\def\complexscherm[#1]%
+ {\iflocation
+ \pagina[#1]%
+ \fi}
+
+\def\scherm%
+ {\complexorsimple{scherm}}
+
+%I n=Figuren++
+%I c=\startfiguur,\refereer,\markeer,\toelichting
+%I
+%I Het is mogelijk naar een plaats in een figuur te verwijzen.
+%I Het commando \gebruikfiguur[][][] wordt in dat geval vervangen
+%I door het commando:
+%I
+%I \startfiguur[naam][file][factor=]%
+%I ...
+%I \refereer(x1,y1)(h1,b1)[referentie1]%
+%I ...
+%I \markeer(xn,yn)(hn,bn)[referentien]%
+%I ...
+%I \stopfiguur
+%P
+%I Wanneer als optie bij \gebruikexternefiguren 'test' wordt
+%I meegegegeven, wordt een testpagina met een rasterverdeling
+%I gegenereerd. Met x en y wordt de linkerbovenhoek ingesteld,
+%I met h en b de hoogte en de breedte van het te markeren deel
+%I van de figuur.
+%I
+%I Standaard is de hoogte verdeeld in 24 stukken. Wil men een
+%I andere indeling, dan kan men met \gebruikexternefiguren
+%I de 'xmax' of 'ymax' instellen (aanbevolen: 10 - 50).
+%I
+%I De hokjes waarop geklikt kan worden kunnen zichtbaar worden
+%I gemaakt met 'hokjes=aan'.
+%P
+%I Om duidelijk te kunnen maken achter welke delen van een
+%I figuur iets zit, kan een kleurenbalk worden opgenomen.
+%I
+%I ...
+%I \kleurenbalk[...,...,...]
+%I ...
+%I
+%I (deze tekst moet nog worden aangevuld)
+%P
+%I Het is mogelijk in een tekst toelichtingen op te nemen.
+%I
+%I ...
+%I \toelichting(x1,y1)(h1,b1)[instellingen]{tekst}
+%I ...
+%I
+%I De instellingen zijn optioneel en komen overeen met die van
+%I het commando \omlijnd.
+
+\newcount\efreference
+\newdimen\efxsteps
+\newdimen\efysteps
+
+\def\calculateefsteps%
+ {\ifnum0\@@exxmax=0
+ \ifnum0\@@exymax=0
+ \def\@@exymax{24}%
+ \fi
+ \efysteps=\fighei \divide\efysteps by \@@exymax
+ \efxsteps=\efysteps
+ \dimen0=\figwid
+ \advance\dimen0 by \efysteps
+ \divide\dimen0 by \efysteps
+ \edef\@@exxmax{\number\dimen0}%
+ \else
+ \efxsteps=\figwid \divide\efxsteps by \@@exxmax
+ \efysteps=\fighei \divide\efysteps by \@@exymax
+ \fi}
+
+\def\efcomment#1(#2,#3)#4(#5,#6)% {kader}(x,y)(h,b)[...]{tekst}
+ {\def\complexefdocomment[##1]##2%
+ {\positioneer(#2,#3)%
+ {\setnostrut
+ \framed
+ [\c!breedte=#5\efxsteps,
+ \c!hoogte=#6\exysteps,
+ \c!offset=\v!geen,
+ \c!kader=#1,
+ ##1]%
+ {##2}}}%
+ \complexorsimpleempty{efdocomment}}
+
+\def\efnocomment(#1,#2)#3(#4,#5)% (x,y)(h,b)[...]{tekst}
+ {\def\complexefdonocomment[##1]##2{}%
+ \complexorsimpleempty{efdonocomment}}
+
+\def\efdomarker(#1,#2)#3#4% (h,b){kader}{tekst}
+ {\framed
+ [\c!breedte=#1\efxsteps,
+ \c!hoogte=#2\efysteps,
+ \c!offset=\v!geen,
+ \c!kader=#3]%
+ {#4}}
+
+\def\efmark(#1,#2)#3(#4,#5)#6[#7]%
+ {\advance\efreference by 1
+ \positioneer(#1,#2)
+ {\hbox{\the\efreference}}%
+ \positioneer(#1,#2)
+ {\gotolocation
+ {\r!viewb#7}
+ {\efdomarker(#4,#5){\v!aan}{\thisisinternal{\r!viewa#7}}}}}
+
+\def\effiguur#1%
+ {\positioneer(0,0){\naam{#1}}}
+
+\def\eftext#1(#2,#3)#4(#5,#6)#7[#8]%
+ {\advance\efreference by 1
+ \hbox
+ {\thisisinternal{\r!viewb#8}%
+ \gotolocation
+ {\r!viewa#8}
+ {\hbox to 1.5em{\the\efreference\presetgoto\hfill}}%
+ ~#1 (#2,#3) (#5,#6) [#8]\hfill}%
+ \endgraf}
+
+\def\efdoarea(#1,#2)#3#4% (h,b){kader}{tekst}
+ {\start
+ \setnostrut
+ \framed
+ [\c!breedte=#1\efxsteps,
+ \c!hoogte=#2\efysteps,
+ \c!offset=\!!zeropoint,
+ \c!kader=#3]
+ {#4}%
+ \stop}
+
+\def\efgoto(#1,#2)#3[#4]% (h,b)kader[ref]
+ {\setbox0=\vbox{\efdoarea(#1,#2)#3{}}%
+ \doifreferencefoundelse{#4}
+ {\gotolocation{#4}{\copy0}}
+ {\unknownreference{#4}\box0}}
+
+\def\efthisis(#1,#2)#3[#4]%
+ {\paginareferentie[#4]%
+ \doifreferencefoundelse{#4}
+ {\efdoarea(#1,#2){#3}{\thisisinternal{#4}}}
+ {\unknownreference{#4}}}
+
+\newbox\colorbarbox
+
+\def\makecolorbar[#1]%
+ {\def\docommando##1%
+ {\color[##1]
+ {\blackrule
+ [\c!breedte=2em,
+ \c!hoogte=1ex,
+ \c!diepte=\!!zeropoint]}%
+ \endgraf}%
+ \global\setbox\colorbarbox=\vbox
+ {\forgetall
+ \processcommalist[#1]\docommando}%
+ \global\setbox\colorbarbox=\vbox
+ {\hskip2em\box\colorbarbox}%
+ \global\wd\colorbarbox=\!!zeropoint}
+
+\def\plaatsstartfiguur[#1][#2][#3]#4\plaatsstopfiguur%
+ {\hbox
+ {\gebruikexternfiguur[#1][#2][#3]%
+ \berekenexternfiguur[#1][#2]%
+ \calculateefsteps
+ \startpositioneren
+ \def\refereer(##1,##2)##3(##4,##5)##6[##7]%
+ {\positioneer(##1,##2)
+ {\efgoto(##4,##5){\@@exhokjes}[##7]}}%
+ \def\markeer(##1,##2)##3(##4,##5)##6[##7]%
+ {\positioneer(##1,##2)
+ {\efthisis(##4,##5){\@@exhokjes}[##7]}}%
+ \def\toelichting%
+ {\efnocomment}%
+ \def\kleurenbalk##1[##2]%
+ {}%
+ \positioneer(0,0){\effiguur{#1}}%
+ \linewidth=1pt
+ \stelpositionerenin
+ [\c!eenheid=pt,
+ \c!xschaal=\withoutpt{\the\efxsteps},
+ \c!yschaal=\withoutpt{\the\efysteps},
+ \c!factor=1]%
+ \ignorespaces#4%
+ \def\refereer(##1,##2)##3(##4,##5)##6[##7]%
+ {}%
+ \let\markeer=\refereer
+ \def\toelichting%
+ {\efcomment\v!nee}%
+ \def\kleurenbalk##1[##2]%
+ {\makecolorbar[##2]}%
+ \ignorespaces#4%
+ \stoppositioneren
+ \box\colorbarbox}}
+
+% De onderstaande macro mag niet zondermeer worden aangepast
+% en is afgestemd op gebruik in de handleiding.
+
+\def\teststartfiguur[#1][#2][#3]#4\teststopfiguur%
+ {\begingroup
+ \gebruikexternfiguur[#1][#2][\c!bfactor=\v!max]%
+ \def\refereer%
+ {\efmark}%
+ \def\markeer%
+ {\efmark}%
+ \def\toelichting%
+ {\efcomment\v!ja}%
+ \def\kleurenbalk##1[##2]%
+ {}%
+ \efreference=0
+ \setbox0=\vbox
+ {\hsize240pt
+ \startpositioneren
+ \berekenexternfiguur[#1][#2]%
+ \calculateefsteps
+ \positioneer(0,0)
+ {\effiguur{#1}}%
+ \positioneer(0,0)
+ {\rooster
+ [\c!nx=\@@exxmax,
+ \c!dx=\withoutpt{\the\efxsteps},
+ \c!ny=\@@exymax,
+ \c!dy=\withoutpt{\the\efysteps},
+ \c!xstap=1,
+ \c!ystap=1,
+ \c!schaal=1,
+ \c!offset=\v!nee,
+ \c!eenheid=pt]}%
+ \stelpositionerenin%
+ [\c!eenheid=pt,
+ \c!xschaal=\withoutpt{\the\efxsteps},
+ \c!yschaal=\withoutpt{\the\efysteps},
+ \c!factor=1]%
+ \linewidth=1pt
+ \ignorespaces#4\relax
+ \stoppositioneren
+ \vfill}%
+ \efreference=0
+ \def\refereer%
+ {\eftext{$\rightarrow$}}%
+ \def\markeer%
+ {\eftext{$\leftarrow$}}%
+ \def\toelichting%
+ {\efnocomment}%
+ \def\kleurenbalk##1[##2]%
+ {}%
+ \setbox2=\vbox
+ {{\tfa\doifelsenothing{#1}{#2}{#1}}
+ \blanko
+ \tfxx#4
+ \vfilll}%
+ \ifdim\ht0>\ht2
+ \ht2=\ht0
+ \else
+ \ht0=\ht2
+ \fi
+ \hbox
+ {\hskip3em
+ \vtop{\vskip12pt\box0\vskip6pt}%
+ \vtop{\vskip12pt\box2\vskip6pt}}%
+ \endgroup}
+
+\def\dostartfiguur[#1][#2][#3]#4\stopfiguur%
+ {\doifelse{\@@exoptie}{\v!test}
+ {\teststartfiguur[#1][#2][#3]#4\teststopfiguur%
+ \def\@@exhokjes{\v!aan}}
+ {\def\@@exhokjes{\v!uit}}%
+ \setvalue{#1}%
+ {\plaatsstartfiguur[#1][#2][#3]#4\plaatsstopfiguur}}
+
+\def\startfiguur%
+ {\dotripleargument\dostartfiguur}
+
+%I n=Springen
+%I c=\naar,\button,\menubutton,\stelbuttonsin
+%I
+%I Een woord kan woren gemarkeerd met:
+%I
+%I \naar{woord}[referentie]
+%I
+%I Voorlopig zijn daarnaast beschikbaar:
+%I
+%I \button[instellingen]{woord}[referentie]
+%I \menubutton[plaats][instellingen]{woord}[referentie]
+%I
+%I waarbij de [instellingen] facultatief zijn en {geen} in
+%I plaats van {woord} kan worden opgegeven. De instellingen komen,
+%I voor zover relevant, overeen met die van \omlijnd. Vaste
+%I instellingen vinden plaats met:
+%I
+%I \stelbuttonsin[breedte=,hoogte=,offset=,kader=,
+%I achtergrond=,achtergrondkleur=,achtergrondraster=,
+%I kleur=]
+%P
+%I De elders reeds beschreven commando's \op en \in zijn in
+%I geval van interactie ook als volgt te gebruiken:
+%I
+%I \in{woord}[referentie]
+%I \op{woord}[referentie]
+%I
+%I In dat geval wordt 'tekst~referentie' net zo weergegeven
+%I als
+%I
+%I \naar{woord}[referentie] % woorden
+%I \naarbox{woord}[referentie] % robuust
+%I
+%I opgeroepen verwijzing.
+
+% Wanneer \naar aan het begin van een regel staat, wordt na
+% \naar op een nieuwe regel overgegaan, ook als de regel nog
+% niet vol is, vandaar \leaveoutervmode.
+
+\def\dodonaar#1[#2]%
+ {\hbox{\gotolocation{#2}{\doattributes{\??ia}{#1\presetgoto}}}}
+
+\def\donaarspace#1[#2]%
+ {{\iflocation
+ \def\processword##1%
+ {\dodonaar{##1}[#2]}%
+ \processwords{#1}%
+ \else
+ #1\relax % \relax prevents #1's next macros from gobbling \fi
+ \fi}}
+
+% much better:
+%
+% hallo \naar{ziezo dat is dat}[hallo] hallo \naar{ziezo dat
+% is dat}[hallo] hallo \naar{ziezo dat is dat}[hallo] hallo
+% \naar{ziezo dat is dat}[hallo] hallo \naar{ziezo dat is
+% dat}[hallo] hallo \naar{ziezo dat is dat}[hallo] hallo
+% \naar{ziezo dat is dat}[hallo] hallo \naar{ziezo dat is
+% dat}[hallo] hallo \naar{ziezo dat is dat}[hallo]
+
+\def\donaarspace#1[#2]%
+ {{\iflocation
+ \def\processisolatedword##1%
+ {\dodonaar{##1}[#2]}%
+ \processisolatedwords{#1}\processisolatedword
+ \else
+ #1\relax % \relax prevents #1's next macros from gobbling \fi
+ \fi}}
+
+\def\donaarfixed#1[#2]%
+ {{\iflocation
+ \dodonaar{#1}[#2]%
+ \else
+ #1%
+ \fi}}
+
+\def\donaar#1#2[#3]%
+ {\leaveoutervmode
+ \doifreferencefoundelse{#3}
+ {#1{#2}[#3]}
+ {\unknownreference{#3}#2}%
+ \referentieinfo{<}{#3}}
+
+% beter:
+
+\def\donaar#1#2[#3]%
+ {\leaveoutervmode
+ \doifreferencefoundelse{#3}
+ {\doifelsenothing{#2}
+ {\dosymbolreference{}{}{}[#3]}
+ {#1{#2}[#3]}}
+ {\unknownreference{#3}#2}%
+ \referentieinfo{<}{#3}}
+
+\unexpanded\def\naar%
+ {\donaar\donaarspace}
+
+\unexpanded\def\naarbox#1[#2]% nog in handleiding
+ {\bgroup
+ \let\@@iastrut=\v!nee
+ \leaveoutervmode
+ \doifreferencefoundelse{#2}
+ {\donaarfixed{#1}[#2]}
+ {\unknownreference{#2}#1}%
+ \referentieinfo{<}{#2}%
+ \egroup}
+
+\unexpanded\def\donaarpage#1#2%
+ {#1%
+ \hbox
+ {\gotorealpage{\currentrealreference}{\dolocationattributes{\??ia}{#2}}}}
+
+%\def\donaarreference#1#2#3[#4]%
+% {\leaveoutervmode
+% \doifreferencefoundelse{#4}
+% {#1{#4}%
+% \doifelsenothing{#2}
+% {\getrealreference{#4}%
+% \ifnum\currentrealreference>\realpageno
+% {\let\@@iabreedte=\!!zeropoint
+% \donaarpage{#3}{\strut$^\goforwardcharacter$}}%
+% \else\ifnum\currentrealreference<\realpageno
+% {\let\@@iabreedte=\!!zeropoint
+% \donaarpage{#3}{\strut$^\gobackwardcharacter$}}%
+% \else\ifhmode
+% \unskip
+% \fi\fi\fi}
+% {\doifsomespaceelse{#3}
+% {\doifsomething{#3}{\donaarspace{#3}[#4]~}\donaarfixed{#2}[#4]}
+% {\donaarfixed{\dotextprefix{#3}#2}[#4]}}}
+% {\unknownreference{#4}\dotextprefix{#3}\dummyreference}%
+% \referentieinfo{<}{#4}}
+
+\def\dosymbolreference#1#2#3[#4]%
+ {\bgroup
+ \ifhmode\unskip\fi
+ \doifinstringelse{::}{#4}
+ {\gotoouterlocation[#4]{\showlocation{$^\gotosomewherecharacter$}}}
+ {\getrealreference{#4}%
+ \ifnum\currentrealreference>\realpageno
+ \donaarpage{#3}{$^\goforwardcharacter$}%
+ \else\ifnum\currentrealreference<\realpageno
+ \donaarpage{#3}{$^\gobackwardcharacter$}%
+ \else\ifhmode
+ \strut$^\bullet$% NOG DOEN: optioneel weglaten
+ \fi\fi\fi}%
+ \egroup}
+
+\def\dounknownreference#1#2#3[#4]%
+ {\unknownreference{#4}\dotextprefix{#3}\dummyreference}%
+
+\def\docompletereference#1#2#3[#4]%
+ {\doifsomespaceelse{#3}
+ {\doifsomething{#3}{\donaarspace{#3}[#4]~}\donaarfixed{#2}[#4]}
+ {\donaarfixed{\dotextprefix{#3}#2}[#4]}}
+
+\def\dolabelonlyreference#1#2#3[#4]%
+ {\doifsomespaceelse{#3}
+ {\doifsomething{#3}{\donaarspace{#3}[#4]}}
+ {\donaarfixed{\dotextprefix{#3}}[#4]}}
+
+\def\dotextonlyreference#1#2#3[#4]%
+ {\dotextprefix{#3}\donaarfixed{#2}[#4]}
+
+\let\dowantedreference=\docompletereference
+
+% \def\donaarreference#1#2#3[#4]%
+% {\bgroup
+% \leaveoutervmode
+% \forgetall
+% \doifreferencefoundelse{#4}
+% {#1{#4}%
+% \doifelsenothing{#2}
+% {\do\symbolreference{#1}{#2}{#3}[#4]}
+% {\dowantedreference{#1}{#2}{#3}[#4]}}
+% {\dounknownreference{#1}{#2}{#3}[#4]}%
+% \referentieinfo{<}{#4}%
+% \egroup}
+%
+% % accepts \in{eerste}{a}[ref]
+%
+% \def\donaarreference#1#2#3#4[#5]%
+% {\bgroup
+% \leaveoutervmode
+% \forgetall
+% \doifreferencefoundelse{#5}
+% {#1{#5}%
+% \doifelsenothing{#2} % #2#4
+% {\dosymbolreference{#1}{#2#4}{#3}[#5]}
+% {\dowantedreference{#1}{#2#4}{#3}[#5]}}
+% {\dounknownreference{#1}{#2#4}{#3}[#5]}%
+% \referentieinfo{<}{#5}%
+% \egroup}
+
+% accepts \in{eerste}{a}[ref] and \in eerste a[ref]
+
+\def\xxxxdonaarreference#1#2#3[#4]%
+ {\bgroup
+ \forgetall
+ \leaveoutervmode
+ \doifreferencefoundelse{#4}
+ {#1{#4}%
+ \doifelsenothing{#2}
+ {\dosymbolreference{#1}{#2}{#3}[#4]}
+ {\dowantedreference{#1}{#2}{#3}[#4]}}
+ {\dounknownreference{#1}{#2}{#3}[#4]}%
+ \referentieinfo{<}{#4}%
+ \egroup}
+
+\def\xxxdonaarreference#1#2#3#4[#5]%
+ {\ifx\next\bgroup
+ \xxxxdonaarreference{#1}{#2#4}{#3}[#5]%
+ \else
+ \xxxxdonaarreference{#1}{#2}{#3#4}[#5]%
+ \fi}
+
+\def\xdonaarreference#1#2%
+ {\def\xxdonaarreference{\xxxdonaarreference{#1}{#2}}%
+ \futurelet\next\xxdonaarreference}
+
+\def\donaarreference#1#2%
+ {\doifnextcharelse{[}
+ {\xdonaarreference{#1}{#2}{}}
+ {\xdonaarreference{#1}{#2}}}
+
+\def\dotextmodein%
+ {\donaarreference\gettextreference\currenttextreference}
+
+\def\op%
+ {\donaarreference\getpagereference\currentpagereference}
+
+% tot hier
+
+\def\dostelbuttonsin[#1]%
+ {\getparameters[\??bt][#1]%
+ \dododostelinteractiemenuin{\??bt\c!onbekendeverwijzing}%
+ \dododostelinteractiemenuin{\??bt\c!zelfdepagina}}
+
+\def\stelbuttonsin%
+ {\dosingleargument\dostelbuttonsin}
+
+\presetlocalframed[\??bt]
+
+\def\complexbutton[#1]#2[#3]%
+ {\doifelse{#2}{\v!geen}
+ {\!!doneafalse}
+ {\!!doneatrue}%
+ \doifreferencefoundelse{#3}
+ {\setbox0=\if!!donea\hbox\else\hphantom\fi
+ {\localframed[\??bt][#1]
+ {\doifelsenothing{#3} % ??? zie eerdere test
+ {\doattributes{\??bt}{\ignorespaces#2}}
+ {\dolocationattributes{\??bt}{\ignorespaces#2}}}}%
+ \startinteractie
+ \hbox{\gotolocation{#3}{\copy0}}%
+ \stopinteractie}
+ {\unknownreference{#3}%
+ \if!!donea\hbox\else\hphantom\fi
+ {\localframed[\??bt][#1]
+ {\ignorespaces#2}}}}
+
+\unexpanded\def\button%
+ {\complexorsimpleempty{button}}
+
+\def\domenubutton[#1][#2]#3[#4]%
+ {\bgroup
+ \locationdummytrue
+ \iffirstargument
+ \ifsecondargument
+ \setlocationbox{\??am#1}[#2]{#3}[#4]%
+ \else
+ \ConvertToConstant\doifinstringelse{=}{#1}
+ {\setlocationbox{\??bt}[#1]{#3}[#4]}
+ {\setlocationbox{\??am#1}[]{#3}[#4]}%
+ \fi
+ \else
+ \setlocationbox{\??bt}[]{#3}[#4]%
+ \fi
+ \egroup}
+
+\unexpanded\def\menubutton%
+ {\dodoubleempty\domenubutton}
+
+\def\domenubox[#1][#2]#3%
+ {\bgroup
+ \def\setlocationbox##1[##2]##3[##4]%
+ {\localframed[##1][##2]{\dolocationattributes{##1}{##3}}}%
+ \domenubutton[#1][#2]#3[]%
+ \egroup}
+
+\def\menubox%
+ {\dodoubleempty\domenubox}
+
+%I n=Externe files
+%I c=\gebruikexterndocument,\uit
+%I c=\startsynchroniseer,\stopsynchronisatie,\synchroniseer,
+%I c=\stelsynchronisatiein,\stelsynchronisatiebalkin,\synchronisatiebalk
+%I
+%I Mits ondersteund door het interactieprogramma, kan naar
+%I een andere file worden gesprongen. Zo'n file moet eerst
+%I worden gedefinieerd met:
+%I
+%I \gebruikexterndocument [naam] [file] [omschrijving]
+%I
+%I Een verwijzing naar een andere file ziet er als volgt
+%I uit:
+%I
+%I \in{tekst}[naam::verwijzing]
+%I \op{tekst}[naam::verwijzing]
+%I \naar{tekst}[naam::verwijzing]
+%I
+%I De naam van het andere document kan worden opgeroepen met
+%I
+%I \uit[naam]
+%I
+%I terwijl \uit zonder [naam] de bij \in, \op of \naar
+%I behorende omschrijving oproept.
+%P
+%I Documenten kunnen worden gesynchroniseerd. Dat wil zeggen
+%I dat gesprongen kan worden naar hetzelfde punt in een anders
+%I vormgegeven tekst. Een synchronisatiepunt wordt aangegeven
+%I met:
+%I
+%I \sychroniseer
+%I
+%I Een synchronisatie kan uit de pas lopen, bijvoorbeeld als
+%I we in een kop een synchronisatiebalk oproepen. Wanneer vindt
+%I immers precies de synchronisatie plaats? Vandaar de wat
+%I meer betrouwbare menier van aangeven:
+%I
+%I \startsynchronisatie % voor de kop (nu mag balk)
+%I \stopsynchronisatie % eind van de kop (fixeert plaats)
+%P
+%I Synchronisatie kan worden ingesteld met:
+%I
+%I \stelsynchronisatiein[status=]
+%I
+%I Het synchronisatiemechanisme is in geval van interactieve
+%I teksten standaard niet actief.
+%P
+%I Er kan een synchronisatiebalk worden opgeroepen waarmee
+%I naar een ander document kan worden gesprongen.
+%I
+%I \synchronisatiebalk[naam][instellingen]
+%I
+%I De instellingen kunnen ook apart worden opgegeven:
+%I
+%I \stelsynchronisatiebalkin[variant=,breedte=,
+%I letter=,kleur=,achtergrond=,achtergrondraster=,
+%I achtergrondkleur=]
+%I
+%I Mogelijke varianten zijn 'lokaal' en 'pagina'. In het
+%I eerste geval wordt slechts een mogelijkheid geboden, in het
+%I tweede geval zijn tot drie mogelijkheden mogelijk. Deze
+%I zijn te vergelijken met markeringen.
+
+% De commando's \setreference en \gotolocation zijn reeds
+% gedefinieerd in pragma1.tex. De aanpassing hieronder heeft
+% betrekking op het springen naar andere documenten.
+
+\let\otherlabel = \empty
+\let\fileprefix = \empty
+\def\otherfile {\jobname}
+\let\otherURL = \empty
+\let\otherprefix = \empty
+\let\dowithdocdes = \empty
+
+\def\dogebruikexterndocument[#1][#2][#3]%
+ {\bgroup
+ \doifelsenothing{#1}
+ {\dogebruikexterndocument[#2][#2][#3]}
+ {\doifelsenothing{#3}
+ {\dogebruikexterndocument[#1][#2][#2]}
+ {\doifsomething{#2}
+ {\setgvalue{doc:url:#1}{}%
+ \setgvalue{doc:fil:#1}{#2}%
+ \setgvalue{doc:des:#1}{\dowithdocdes{#3}}%
+ \doifparentfileelse{#2}
+ {\showmessage{\m!references}{21}{#2}}
+ {\bgroup % prevents wrong loading of \jobname
+ \def\fileprefix{#1::}% % generates #1::
+ \setreference{}{}{1}{}% % generates #1::
+ \gebruikreferenties[#2]% % loads #1::references
+ \egroup % within \doifreferenceload (brrrrr)
+ % evt: \let\checkrerefences=\relax
+ \doifreferencefoundelse{#1::\c!interactivedocument:#2}%
+ {\showmessage{\m!references}{21}{#2}}%
+ {\showmessage{\m!references}{22}{#2}}}}}}%
+ \egroup}
+
+\def\gebruikexterndocument%
+ {\dotripleargument\dogebruikexterndocument}
+
+\def\dogebruikURL[#1][#2][#3][#4]%
+ {\doifelsenothing{#4}
+ {\dogebruikexterndocument[#1][#2][#3][#3]}
+ {\doifsomething{#1}
+ {\setgvalue{doc:url:#1}{#2}%
+ \setgvalue{doc:fil:#1}{#3}%
+ \setgvalue{doc:des:#1}{\dowithdocdes{#4}}}}}
+
+\def\gebruikURL%
+ {\doquadrupleargument\dogebruikURL}
+
+\let\gotoinnerlocation=\gotolocation
+
+\def\gotoouterlocation[#1::#2]#3%
+ {\bgroup
+ \def\referenceprefix{}%
+ \setouterlocation{#1}%
+ \doifelsenothing{#2}
+ {\gotorealpage{1}{#3}}
+ {\gotoexternal{#2}{#3}}%
+ \egroup}
+
+\def\setouterlocation#1%
+ {\doifdefinedelse{doc:fil:#1}
+ {\edef\otherURL{\getvalue{doc:url:#1}}%
+ \edef\otherfile{\getvalue{doc:fil:#1}}}
+ {\let\otherURL=\empty
+ \edef\otherfile{#1}}%
+ \doifparentfileelse{\otherfile}
+ {\let\otherURL=\empty
+ \let\otherfile=\empty
+ \global\let\otherlabel=\empty
+ \let\otherprefix=\empty}
+ {\gdef\otherlabel{#1}%
+ \def\otherprefix{#1::}}}
+
+\def\gotolocation#1#2% predefined in Pragma1.tex
+ {\doifinstringelse{::}{#1}%
+ {\gotoouterlocation[#1]{#2}}%
+ {\gotoinnerlocation{#1}{#2}}}
+
+\def\docomplexuit[#1::#2]%
+ {{\def\dowithdocdes{\naar}%
+ \doifdefinedelse{doc:des:#1}
+ {\getvalue{doc:des:#1}[#1::#2]}
+ {{\tttf[#1]}}%
+ \referentieinfo{<}{#1::#2}}}
+
+\def\simpleuit%
+ {\getvalue{doc:des:\otherlabel}}
+
+\def\complexuit[#1]%
+ {\doifinstringelse{::}{#1}%
+ {\docomplexuit[#1]}%
+ {\docomplexuit[#1::]}}
+
+\def\simpleuit%
+ {{\def\docommando{}\getvalue{doc:des:\otherlabel}}}
+
+\def\uit%
+ {\complexorsimple{uit}}
+
+% Hier volgen de synchronisatiemacro's:
+
+\def\syncprefix{sync}
+\def\syncmarker{syncmark}
+
+\definieermarkering[\syncmarker]
+\stelmarkeringin[\syncmarker][\c!expansie=\v!ja]
+
+\newcounter\synccounter
+
+\newif\ifsynchronisation
+
+\def\startsynchronisatie%
+ {\iflocation\ifsynchronisation
+ \doglobal\increment\synccounter
+ \fi\fi}
+
+\def\stopsynchronisatie%
+ {\iflocation\ifsynchronisation
+ \thisisinternal{\syncprefix:\synccounter}%
+ \ifvmode
+ \markeer[\syncmarker]{\synccounter}%
+ \else
+ \showmessage{\m!interactions}{4}{\synccounter}%
+ \fi
+ \fi\fi}
+
+\def\synchroniseer%
+ {\startsynchronisatie
+ \stopsynchronisatie}
+
+\def\dostelsynchronisatiein[#1]%
+ {\getparameters[\??sy][#1]%
+ \doifelse{\@@systatus}{\v!start}
+ {\synchronisationtrue}
+ {\synchronisationfalse}}
+
+\def\stelsynchronisatiein%
+ {\dosingleargument\dostelsynchronisatiein}
+
+\def\definieersynchronisatie%
+ {\dosingleargument\dodefinieersynchronisatie}
+
+\def\stelsynchronisatiebalkin%
+ {\dodoubleargument\getparameters[\??ba]}
+
+\presetlocalframed[\??ba]
+
+\setvalue{synchronisatie\v!pagina}[#1]%
+ {\bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setbox0=\hbox
+ {\localframed[\??ba][]%
+ {\dolocationattributes{\??ba}{\strut\@@batekst}}}%
+ \mindermeldingen
+ \def\onder%
+ {\leaders\hrule\!!depth1ex\!!height-.5ex\hfil}%
+ \def\boven##1##2##3%
+ {\dimen0=\wd0\relax
+ \divide\dimen0 by 3\relax
+ \multiply\dimen0 by ##2\relax
+ \dimen2=.25em\relax
+ \advance\dimen0 by -##3\dimen2\relax
+ \gotoouterlocation
+ [#1::\syncprefix:##1]%
+ {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}}%
+ \hbox
+ {\prefetchmark[\syncmarker]%
+ \def\check##1##2%
+ {\edef##2{\fetchmark[\syncmarker][##1]}%
+ \ifnum0##2=0 \def##2{1}\fi}%
+ \check\v!vorige\top
+ \check\v!eerste\first
+ \check\v!laatste\bot
+ \setbox2=\hbox to \wd0
+ {\ifnum\top=\first\relax
+ \ifnum\first=\bot\relax
+ \boven\first30\relax
+ \else
+ \boven\first21\hss\boven\bot11\relax
+ \fi
+ \else
+ \ifnum\first=\bot\relax
+ \boven\top11\hss\boven\first21\relax
+ \else
+ \boven\top11\hss\boven\first11\hss\boven\bot11\relax
+ \fi
+ \fi}%
+ \wd2=\!!zeropoint\box2
+ \box0\relax}%
+ \egroup}
+
+\setvalue{synchronisatie\v!lokaal}[#1]%
+ {\bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \def\blackrule{\hbox{\vrule\!!height.5em\!!width.5em}}%
+ \gotoouterlocation
+ [#1::\syncprefix:\synccounter]%
+ {\color[\locationcolor\@@bakleur]{\blackrule}}%
+ \egroup}
+
+\def\synchronisatiebalk[#1][#2]%
+ {\iflocation\ifsynchronisation
+ \bgroup
+ \stelsynchronisatiebalkin
+ [\c!tekst=\getvalue{doc:des:#1},#2]%
+ \getvalue{synchronisatie\@@bavariant}[#1]%
+ \egroup
+ \fi\fi}
+
+% Bepaalde delen van een tekst kunnen (provisorisch) worden
+% afgeschermd. Ze zijn dan wel zichtbaar op het scherm, maar
+% niet als ze geprint worden. (Dit commando is in
+% ontwikkeling.)
+
+\def\dostartinteractie%
+ {\setbox0=\hbox\bgroup
+ \def\stopinteractie%
+ {\egroup\dostarthide\box0\dostophide}}
+
+% eerst boolean invoeren bij menu, achtergrond, balk, button
+% enz; verder startinteractie een argument meegeven {#1} ->
+% \getvalue{#1\c!print}=={\v!ja} enz. Consequent menubutton
+% gebruiken!
+
+\let\startinteractie = \relax
+\let\stopinteractie = \relax
+
+%I n=Programmas
+%I c=\definieerprogramma,\programma,\stelprogrammasin
+%I
+%I Het is, bij wijze van experiment, mogelijk programma's
+%I op te starten. Een programma wordt gedefinieerd met:
+%I
+%I \definieerprogramma[naam][programma][omschrijving]
+%I
+%I Rond programma's kan een en ander worden ingesteld met:
+%I
+%I \stelprogrammasin[gebied=]
+%I
+%I terwijl daadwerkelijk wordt gesprongen met:
+%I
+%I \programma[naam]
+
+\def\stelprogrammasin%
+ {\dodoubleargument\getparameters[\??pr]}
+
+\def\dodefinieerprogramma[#1][#2][#3]%
+ {\setgvalue{pro:fil:#1}{#2}%
+ \setgvalue{pro:des:#1}{#3}}
+
+\def\definieerprogramma%
+ {\dotripleargument\dodefinieerprogramma}
+
+\def\doprogramma[#1]%
+ {\iflocation
+ \hbox
+ {\setbox0=\hbox
+ {\dolocationattributes{\??ia}{\getvalue{pro:des:#1}\presetgoto}}%
+ \dopregoto
+ {\copy0}%
+ \start
+ \dostartrunprogram
+ {\number\buttonwidth}{\number\buttonheight}
+ {\@@prgebied\getvalue{pro:fil:#1}}%
+ \stop
+ \dostoprunprogram
+ \doposgoto}%
+ \else
+ {\getvalue{pro:des:#1}}%
+ \fi}
+
+\def\programma%
+ {\dosingleargument\doprogramma}
+
+% Er kan naar een pagina worden gesprongen. Let wel: het
+% betreft het volgnummer. Dit kan afwijken van het gezette
+% nummer.
+%
+% ook file::nr mogelijk
+%
+% \ganaarpagina[eerste(sub),vorige(sub),volgende(sub),laatste(sub),nummer]
+
+\def\dodoganaareenpagina#1#2#3%
+ {\checkreferences % nodig ??
+ \iflocation
+ \ifnum#3=\realpageno
+ {#2}
+ \else
+ \doifelsenothing{#1}
+ {\hbox{\gotorealpage{#3}{#2}}}
+ {\hbox{\gotorealpage{#3}{\dolocationattributes{#1}{#2}}}}%
+ \fi
+ \else
+ {#2}%
+ \fi}
+
+\def\dodoganaareenfilepagina#1#2#3% tzt: \ifouterlocation en
+ {\checkreferences % nodig ?? % combineren met vorige
+ \iflocation
+ \doifelsenothing{#1}
+ {\hbox{\gotorealpage{#3}{#2}}}
+ {\hbox{\gotorealpage{#3}{\dolocationattributes{#1}{#2}}}}%
+ \else
+ {#2}%
+ \fi}
+
+\def\doganaareenpagina#1#2[#3]%
+ {\bgroup
+ \beforesplitstring#3\at::\to\eenfile
+ \doifelsenothing{\eenfile}
+ {\processaction
+ [#3]
+ [ \v!eerste\v!pagina=>\dodoganaareenpagina{#1}{#2}\firstpage,
+ \v!vorige\v!pagina=>\dodoganaareenpagina{#1}{#2}\prevpage,
+ \v!volgende\v!pagina=>\dodoganaareenpagina{#1}{#2}\nextpage,
+ \v!laatste\v!pagina=>\dodoganaareenpagina{#1}{#2}\lastpage,
+ \v!eerste\v!sub\v!pagina=>\dodoganaareenpagina{#1}{#2}\firstsubpage,
+ \v!vorige\v!sub\v!pagina=>\dodoganaareenpagina{#1}{#2}\prevsubpage,
+ \v!volgende\v!sub\v!pagina=>\dodoganaareenpagina{#1}{#2}\nextsubpage,
+ \v!laatste\v!sub\v!pagina=>\dodoganaareenpagina{#1}{#2}\lastsubpage,
+ \v!eerste=>\dodoganaareenpagina{#1}{#2}\firstpage,
+ \v!vorige=>\dodoganaareenpagina{#1}{#2}\prevpage,
+ \v!volgende=>\dodoganaareenpagina{#1}{#2}\nextpage,
+ \v!laatste=>\dodoganaareenpagina{#1}{#2}\lastpage,
+ \v!eerste\v!sub=>\dodoganaareenpagina{#1}{#2}\firstsubpage,
+ \v!vorige\v!sub=>\dodoganaareenpagina{#1}{#2}\prevsubpage,
+ \v!volgende\v!sub=>\dodoganaareenpagina{#1}{#2}\nextsubpage,
+ \v!laatste\v!sub=>\dodoganaareenpagina{#1}{#2}\lastsubpage,
+ \s!unknown=>\dodoganaareenpagina{#1}{#2}{#3}]}
+ {\setouterlocation\eenfile
+ \aftersplitstring#3\at::\to\eenpagina
+ \doifelsenothing{\eenpagina}
+ {\def\eenpagina{1}}
+ {\doifnumberelse{\eenpagina}
+ {}
+ {\def\eenpagina{1}}}%
+ \dodoganaareenfilepagina{#1}{#2}\eenpagina}
+ \egroup}
+
+\def\ganaarpagina#1%
+ {\doganaareenpagina\??ia{#1\presetgoto}}
+
+%I n=Interactiebalk
+%I c=\interactiebalk,\stelinteractiebalkin
+%I
+%I Het volgende commando genereert een interactiebalk. Pas op:
+%I de waarde van \realpageno staat niet echt vast.
+%I
+%I \interactiebalk[variant=,breedte=,hoogte=,diepte=,
+%I achtergrond=,achtergrondkleur=,achtergrondraster=,
+%I kader=,stap=]
+%I
+%I \interactiebalk[reset]
+%I
+%I \stelinteractiebalkin[...]
+%I
+%I Mogelijke stappen zijn 'klein', 'middel', 'groot' en 'n';
+%I beschikbare varianten zijn:
+%I
+%I a meter (scrollbar)
+%I b jumper (symbool: begin terug vooruit eind)
+%I c jumper (balk: begin terug vooruit eind)
+%I d pagina (subpaginas vast formaat)
+%I e pagina (subpaginas vrij formaat)
+%I f pagina (subpaginas grote aantallen)
+%I g pagina (subpaginas jumper)
+
+% Dit is leuke toepassing van glue!
+
+\newbox\meterbox
+
+\newif\ifbalksymbool
+
+\def\interactiebalka%
+ {\iflocation
+ \bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupblackrules[\c!hoogte=\v!max,\c!diepte=\v!max]%
+ \!!widthb=\@@ibbreedte\relax
+ \advance\!!widthb by -2.75em\relax
+ \!!widtha=\!!widthb\relax
+ \divide\!!widtha by \lastpage\relax
+ \bgroup
+ \advance\realpageno by -1\relax
+ \ifvoid\meterbox
+ \bgroup
+ \processaction
+ [\@@ibstap]
+ [ \v!klein=>\dimen0=.25em\relax,
+ \v!middel=>\dimen0=.5em\relax,
+ \v!groot=>\dimen0=1em\relax,
+ \s!unknown=>\dimen0=\!!widtha]%
+ \ifdim\!!widtha<\dimen0\relax
+ \!!counta=\dimen0\relax
+ \!!countb=\!!widtha
+ \divide\!!counta by \!!countb
+ \else
+ \!!counta=\@@ibstap\relax
+ \fi
+ \!!widtha=\!!counta\!!widtha
+ \setbox0=\hbox{\blackrule[\c!breedte=\!!widtha]}%
+ \global\setbox\meterbox=\hbox to \!!widthb
+ {\hss
+ \for \teller=1 \to \lastpage \step \!!counta \do
+ {\gotorealpage{\teller}{\copy0}}%
+ \hss}%
+ \global\wd\meterbox=\!!zeropoint\relax
+ \egroup
+ \fi
+ \egroup
+ \noindent
+ \strut
+ \hbox to \@@ibbreedte
+ {\mindermeldingen
+ \setupblackrules[\c!breedte=1em]%
+ \doganaareenpagina{\??ib}{\blackrule}[\v!eerste]%
+ \hss
+ \color[middlegray]{\copy\meterbox}%
+ \hbox to \!!widthb
+ {\ifdim\!!widtha<1em\relax
+ \!!widtha=1em\relax
+ \fi
+ \setupblackrules[\c!breedte=\!!widtha]%
+ \ifnum\realpageno>1\relax
+ \!!counta=\realpageno
+ \advance\!!counta by -2\relax
+ \hskip\!!zeropoint\!!plus\!!counta sp\relax % cm gives overflow
+ \doganaareenpagina{\??ib}{\blackrule}[\v!vorige]%
+ \fi
+ \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=.5em]}%
+ \ifnum\realpageno<\lastpage\relax
+ \doganaareenpagina{\??ib}{\blackrule}[\v!volgende]%
+ \!!counta=\lastpage\relax
+ \advance\!!counta by -\realpageno
+ \advance\!!counta by -1\relax
+ \hskip\!!zeropoint\!!plus\!!counta sp\relax % cm gives overflow
+ \fi}%
+ \hss
+ \doganaareenpagina{\??ib}{\blackrule}[\v!laatste]}%
+ \egroup
+ \fi}
+
+\presetlocalframed[\??ib]
+
+\def\interactiebalkc%
+ {\iflocation
+ \ifnum\lastpage>1\relax
+ \hbox to \@@ibbreedte
+ {\setupblackrules[\c!hoogte=\v!max,\c!diepte=\v!max]%
+ \def\goto##1[##2]%
+ {\doganaareenpagina{}{\blackrule[\c!breedte=##1]}[##2]}%
+ \dimen0=\@@ibbreedte\relax
+ \advance\dimen0 by -4em\relax
+ \!!counta=\lastpage
+ \advance\!!counta by -1
+ \divide\dimen0 by \!!counta
+ \!!counta=\realpageno
+ \advance\!!counta by -1\relax
+ \!!widtha=\!!counta\dimen0\relax
+ \!!countb=\lastpage
+ \advance\!!countb by -\realpageno
+ \!!widthb=\!!countb\dimen0\relax
+ \startcolor[\locationcolor\@@ibkleur]%
+ \goto{1em}[\v!eerste]%
+ \hss
+ \goto{\!!widtha}[\v!vorige]%
+ \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=1em]}%
+ \goto{\!!widthb}[\v!volgende]%
+ \hss
+ \goto{1em}[\v!laatste]%
+ \stopcolor}%
+ \fi
+ \fi}
+
+\def\interactiebalkd%
+ {\iflocation\ifshowingsubpage
+ \ifnum\nofsubpages>1\relax
+ \hbox
+ \bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \ifbalksymbool % beter: 3 chars assign en 3*box
+ \setbox0=\hbox{\gobackwardcharacter}%
+ \setbox2=\hbox{\gotosomewherecharacter}%
+ \setbox4=\hbox{\goforwardcharacter}%
+ \else
+ \setbox0=\hbox
+ {\vrule
+ \!!height\@@ibhoogte
+ \!!depth\@@ibdiepte
+ \!!width\@@ibbreedte}%
+ \setbox2=\copy0
+ \setbox4=\copy0
+ \fi
+ \startcolor[\locationcolor\@@ibkleur]%
+ \for\teller=1\to\nofsubpages\step1\do
+ {\bgroup
+ \increment(\teller,\firstsubpage)\relax
+ \decrement\teller\relax
+ \ifnum\teller<\realpageno\relax
+ \gotorealpage{\teller}{\copy0}\relax
+ \else\ifnum\teller=\realpageno\relax
+ \color
+ [\@@ibcontrastkleur]
+ {\gotorealpage{\teller}{\copy2}}%
+ \else
+ \gotorealpage{\teller}{\copy4}\relax
+ \fi\fi
+ \egroup
+ \hskip\@@ibafstand}%
+ \unskip
+ \stopcolor
+ \egroup
+ \fi
+ \fi\fi}
+
+\def\interactiebalke% KAN WORDEN GECOMBINEERD MET D
+ {\iflocation\ifshowingsubpage
+ \ifnum\nofsubpages>1\relax
+ \bgroup
+ \!!widthb=\@@ibafstand
+ \multiply\!!widthb by \nofsubpages
+ \advance\!!widthb by -\@@ibafstand % (n-1)
+ \!!widtha=\@@ibbreedte
+ \advance\!!widtha by -\!!widthb
+ \divide\!!widtha by \nofsubpages\relax
+ \ifdim\!!widtha<\@@ibafstand\relax
+ \interactiebalkf
+ \else
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \noindent
+ \hbox to \@@ibbreedte
+ \bgroup
+ \ifbalksymbool
+ \setbox0=\hbox{\gobackwardcharacter}%
+ \setbox2=\hbox{\gotosomewherecharacter}%
+ \setbox4=\hbox{\goforwardcharacter}%
+ \else
+ \setbox0=\hbox
+ {\vrule
+ \!!height\@@ibhoogte
+ \!!depth\@@ibdiepte
+ \!!width\!!widtha}%
+ \setbox2=\copy0
+ \setbox4=\copy0
+ \fi
+ \startcolor[\locationcolor\@@ibkleur]%
+ \for\teller=1\to\nofsubpages\step1\do
+ {\bgroup
+ \increment(\teller,\firstsubpage)\relax
+ \decrement\teller\relax
+ \ifnum\teller<\realpageno\relax
+ \gotorealpage{\teller}{\copy0}\relax
+ \else\ifnum\teller=\realpageno\relax
+ \color
+ [\@@ibcontrastkleur]
+ {\gotorealpage{\teller}{\copy2}}%
+ \else
+ \gotorealpage{\teller}{\copy4}\relax
+ \fi\fi
+ \egroup
+ \hss}%
+ \unskip
+ \stopcolor
+ \egroup
+ \fi
+ \egroup
+ \fi
+ \fi\fi}
+
+\def\interactiebalkf% !! KAN WORDEN GECOMBINEERD MET D !!
+ {\iflocation\ifshowingsubpage
+ \ifnum\nofsubpages>1\relax
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \noindent
+ \hbox to \@@ibbreedte
+ \bgroup
+ \!!countb=0
+ \loop
+ \advance\!!countb by 1\relax
+ \!!countc=\nofsubpages
+ \divide\!!countc by \!!countb
+ \advance\!!countc by 1
+ \!!widthb=\@@ibafstand
+ \multiply\!!widthb by \!!countc
+ \advance\!!widthb by -\@@ibafstand
+ \!!widtha=\@@ibbreedte
+ \advance\!!widtha by -\!!widthb
+ \divide\!!widtha by \!!countc
+ \ifdim\!!widtha<\@@ibafstand\relax
+ \repeat
+ \ifbalksymbool
+ \setbox0=\hbox{\gobackwardcharacter}%
+ \setbox2=\hbox{\gotosomewherecharacter}%
+ \setbox4=\hbox{\goforwardcharacter}%
+ \else
+ \setbox0=\hbox
+ {\vrule
+ \!!height\@@ibhoogte
+ \!!depth\@@ibdiepte
+ \!!width\!!widtha}%
+ \setbox2=\hbox
+ {\dimen0=\@@ibhoogte
+ \dimen2=\@@ibdiepte
+ \vrule
+ \!!height.5\dimen0
+ \!!depth.5\dimen2
+ \!!width\!!widtha}%
+ \ht2=\ht0
+ \dp2=\dp0
+ \setbox4=\copy0
+ \fi
+ \def\goto##1##2%
+ {\ifnum##1=\realpageno\relax
+ \color
+ [\@@ibcontrastkleur]
+ {\gotorealpage{##1}{##2}}%
+ \else
+ \gotorealpage{##1}{##2}\relax
+ \fi}%
+ \startcolor[\locationcolor\@@ibkleur]%
+ \!!countc=\realpageno \advance\!!countc by -2\relax
+ \!!countd=\realpageno \advance\!!countd by 2\relax
+ \for\teller=\firstsubpage\to\lastsubpage\step1\do
+ {\!!doneafalse
+ \!!donebfalse
+ \ifnum\teller=\firstsubpage\relax \!!doneatrue \fi
+ \ifnum\teller=\lastsubpage\relax \!!doneatrue \fi
+ \ifnum\teller>\!!countc \ifnum\teller<\!!countd \!!doneatrue \fi\fi
+ \advance\!!countf by 1\relax
+ \ifnum\!!countf=\!!countb\relax \!!donebtrue \fi
+ \if!!donea % nog eens checken
+ \!!countf=0
+ \goto\teller{\copy2}%
+ \hss
+ \else\if!!doneb
+ \!!countf=0
+ \ifnum\teller<\realpageno\relax
+ \goto\teller{\copy0}%
+ \else\ifnum\teller>\realpageno\relax
+ \goto\teller{\copy2}%
+ \else
+ \goto\teller{\copy4}%
+ \fi\fi
+ \hss
+ \fi\fi}%
+ \unskip
+ \stopcolor
+ \egroup
+ \fi
+ \fi\fi}
+
+\def\interactiebalkb%
+ {\ifnum\lastpage>\firstpage\relax
+ \interactiebuttons
+ [\v!eerste \v!pagina,
+ \v!vorige \v!pagina,
+ \v!volgende\v!pagina,
+ \v!laatste \v!pagina]%
+ \fi}
+
+\def\interactiebalkg%
+ {\ifnum\lastsubpage>\firstsubpage\relax
+ \interactiebuttons
+ [\v!eerste \v!sub\v!pagina,
+ \v!vorige \v!sub\v!pagina,
+ \v!volgende\v!sub\v!pagina,
+ \v!laatste \v!sub\v!pagina]%
+ \fi}
+
+\def\complexinteractiebalk[#1]%
+ {\doifelse{#1}{\v!reset}%
+ {\global\setbox\meterbox=\box\voidb@x}%
+ {\bgroup
+ \iflocation
+ \checksubpages % goes wrong / loads \numberofpages too
+ \getparameters[\??ib][#1]%
+ \doif{\@@ibstatus}{\v!start}
+ {\startinteractie
+ \processaction
+ [\@@ibvariant]
+ [d=>{\getparameters[\??ib][\c!breedte=.5em,\c!hoogte=.5em,#1]},
+ e=>{\getparameters[\??ib][\c!hoogte=.5em,\c!afstand=.2em,#1]},
+ f=>{\getparameters[\??ib][\c!hoogte=.5em,\c!afstand=.2em,#1]}]%
+ \doifelse{\@@ibsymbool}{\v!ja}
+ {\balksymbooltrue}
+ {\balksymboolfalse}%
+ \getvalue{interactiebalk\@@ibvariant}%
+ \stopinteractie}%
+ \fi
+ \egroup}}
+
+\unexpanded\def\interactiebalk%
+ {\complexorsimpleempty{interactiebalk}}
+
+\def\stelinteractiebalkin%
+ {\dodoubleargument\getparameters[\??ib]}
+
+%I n=Interactiebuttons
+%I c=\interactiebuttons
+%I
+%I Men kan zelf interactiebalken samenstellen met het
+%I commando:
+%I
+%I \interactiebuttons[logische referenties]
+%I
+%I bijvoorbeeld:
+%I
+%I \interactiebuttons[vorigepagina,SluitDocument,...]
+%I
+%I optioneel kunnen instellingen worden meegegeven:
+%I
+%I \interactiebuttons[instellingen][logische referenties]
+
+\def\dointeractiebuttons[#1][#2]%
+ {\iflocation
+ \ifsecondargument
+ \bgroup
+ \setbox2=\hbox
+ {\localframed[\??ib][]{\gobackwardcharacter}}%
+ \!!heighta=\ht2
+ \stelinteractiebalkin[#1,\c!strut=\v!nee]%
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \!!widtha=\@@ibbreedte\relax
+ \getcommalistsize[#2]%
+ \increment\commalistsize
+ \divide\!!widtha by \commalistsize
+ \def\goto##1##2%
+ {\setnostrut
+ \gotorealpage
+ {##2}
+ {\localframed
+ [\??ib][\c!hoogte=\!!heighta,\c!breedte=\!!widtha]
+ {\showcontrastlocation{\??ib}{##2}{$##1$}}}%
+ \hss}%
+ \def\exec##1##2%
+ {\setnostrut
+ \gotolocation
+ {##2}
+ {\localframed
+ [\??ib][\c!hoogte=\!!heighta,\c!breedte=\!!widtha]
+ {\showcoloredlocation{\??ib}{$##1$}}}%
+ \hss}%
+ \hbox to \@@ibbreedte
+ {\processallactionsinset
+ [#2]
+ [ \v!pagina=>\goto\gotobegincharacter \firstpage
+ \goto\gobackwardcharacter\prevpage
+ \goto\goforwardcharacter \nextpage
+ \goto\gotoendcharacter \lastpage,
+ \v!sub\v!pagina=>\goto\gotobegincharacter \firstsubpage
+ \goto\gobackwardcharacter\prevsubpage
+ \goto\goforwardcharacter \nextsubpage
+ \goto\gotoendcharacter \lastsubpage,
+ \v!eerste\v!pagina=>\goto\gotobegincharacter \firstpage,
+ \v!vorige\v!pagina=>\goto\gobackwardcharacter\prevpage,
+ \v!volgende\v!pagina=>\goto\goforwardcharacter \nextpage,
+ \v!laatste\v!pagina=>\goto\gotoendcharacter \lastpage,
+ \v!eerste\v!sub\v!pagina=>\goto\gotobegincharacter \firstsubpage,
+ \v!vorige\v!sub\v!pagina=>\goto\gobackwardcharacter\prevsubpage,
+\v!volgende\v!sub\v!pagina=>\goto\goforwardcharacter \nextsubpage,
+ \v!laatste\v!sub\v!pagina=>\goto\gotoendcharacter \lastsubpage,
+ \v!PreviousJump=>\exec\gobackjumpcharacter\v!PreviousJump,
+ \v!NextJump=>\exec\goforjumpcharacter \v!NextJump,
+ \v!CloseDocument=>\exec\closecharacter \v!CloseDocument,
+ \s!unknown=>\commalistelement]%
+ \unskip}%
+ \egroup
+ \else
+ \interactiebuttons[][#1]%
+ \fi
+ \fi}
+
+\def\interactiebuttons%
+ {\dodoubleempty\dointeractiebuttons}
+
+%I n=Profielen
+%I c=\definieerprofiel,\startprofiel,\volgprofiel
+%I
+%I Er kunnen een gericht leesprofiel worden gedefinieerd.
+%I Daartoe worden delen van de tekst gemerkt met commando:
+%I
+%I \startprofiel[label,label,...]
+%I \stopprofiel
+%I
+%I Een profiel wordt vervolgens samengesteld uit gemerkte
+%I teksten:
+%I
+%I \definieerprofiel[naam,naam][label,label,...]
+%I
+%I en kan worden gevolgd met:
+%I
+%I \volgprofiel{tekst}[naam]
+%I
+%I Dit laatste commando is te vergelijken met \naar, met dat
+%I verschil dat naar een serie teksten wordt gesprongen.
+%P
+%I Profielen kunnen worden getest. In dat geval worden de
+%I begin- en eindpunten in de tekst aangegeven. De labels
+%I zijn actief, zodat snel heen en weer gesprongen kan worden.
+%I
+%I \stelprofielenin[optie=]
+%I
+%I Hierbij kan optie de waarde 'test' hebben.
+
+% Er wordt vooralsnog uitgegaan van een symmetrische
+% start-stop situatie.
+
+\def\c!profiel!! {profiel:} % brrr
+\def\c!versie!! {versie:}
+
+\def\dodefinieerprofiel[#1][#2]%
+ {\iflocation
+ \def\dododefinieerprofiel##1%
+ {\def\dodododefinieerprofiel####1%
+ {\doifdefinedelse{\c!profiel!!####1}%
+ {\edef\!!stringa{\getvalue{\c!profiel!!####1}}%
+ \setevalue{\c!profiel!!####1}{\!!stringa,##1}}%
+ {\setevalue{\c!profiel!!####1}{##1}}}%
+ \processcommalist[#2]\dodododefinieerprofiel}%
+ \processcommalist[#1]\dododefinieerprofiel
+ \fi}
+
+\def\definieerprofiel%
+ {\dodoubleargument\dodefinieerprofiel}
+
+% Als met \getpar wordt gewerkt, dan moet \next worden toegepast.
+
+\def\profilepage{}
+
+\let\dosetprofilepage=\relax
+\let\dogetprofilepage=\relax
+
+\def\processprofile[#1]#2#3%
+ {\iflocation
+ \par % needed for pdftex
+ \bgroup
+ \dosetprofilepage
+ \dogetprofilepage
+ \def\processoneprofile##1##2%
+ {\ExpandBothAfter\doifinsetelse{##2}{\processedprofiles}%
+ {\doifsomething{##1}{(##1)}}%
+ {\addtocommalist{##2}\processedprofiles
+ ##1\relax
+ #3{##2}{\hsize}{\profilepage}}}%
+ \def\processedprofiles{}%
+ \def\doprocessprofile##1%
+ {\doifelse{\@@pfoptie}{\v!test}%
+ {\goodbreak\blanko\nobreak\tt[\spatie
+ #2 profiel\spatie ##1:\spatie
+ \doifdefinedelse{\c!profiel!!##1}%
+ {\def\dodoprocessprofile####1%
+ {\processoneprofile
+ {\naar{####1}[\c!profiel!!####1]}%
+ {####1}%
+ \spatie}%
+ \processcommacommand
+ [\getvalue{\c!profiel!!##1}]\dodoprocessprofile}%
+ {- }%
+ ]\nobreak\blanko}%
+ {\doifdefined{\c!profiel!!##1}%
+ {\def\dodoprocessprofile####1%
+ {\processoneprofile{}{####1}}%
+ \processcommacommand
+ [\getvalue{\c!profiel!!##1}]\dodoprocessprofile}}}%
+ \processcommalist[#1]\doprocessprofile
+ \egroup
+ \par % needed for pdftex
+ \fi}
+
+\def\startprofiel[#1]%
+ {\iflocation
+ \bgroup
+ \addtocommalist{#1}\actualprofile
+ \def\stopprofiel%
+ {\processprofile[#1]\v!stop\doendofprofile
+ \egroup}%
+ \DoAfterFi\processprofile[#1]\v!start\dobeginofprofile
+ \fi}
+
+\let\stopprofiel=\relax
+
+\def\dovolgprofiel#1[#2]%
+ {\iflocation
+ \hbox
+ {\dopregoto
+ {\dolocationattributes{\??ia}{#1\presetgoto}}%
+ \start
+ \dostartgotoprofile
+ {\number\buttonwidth}{\number\buttonheight}
+ {#2}%
+ \stop
+ \dostopgotoprofile
+ \doposgoto}%
+ \else
+ {#1}%
+ \fi}
+
+\def\volgprofiel#1[#2]%
+ {\iflocation
+ \doif{\@@pfoptie}{\v!test}{\paginareferentie[\c!profiel!!#2]}%
+ \dovolgprofiel{#1}[#2]%
+ \fi}
+
+\def\stelprofielenin%
+ {\dodoubleargument\getparameters[\??pf]}
+
+% Als er nog geen tekst op de pagina staat, dan heeft het
+% profiel betrekking op het bovenstaande, dus soms een vorige
+% pagina! Vreemd, omdat PDF paginagewijs werkt. Gelukkig
+% biedt /page een oplossing. Echter: expansie van een
+% \special kan niet worden uitgesteld, zodat alleen een
+% two-pass een oplossing vormt. Het onderstaande kan komen
+% te vervallen als Acrobat dit ondervangt. Het scheelt een
+% pass en een lijst.
+%
+% Er kunnen eventueel twee lijsten worden gebruikt. Een voor
+% het begin (start) en een voor het eind (stop). Nu staat
+% alles in een lijst.
+
+\definetwopasslist{\s!profile}
+
+\newcounter\currentprofile
+
+\def\dosetprofilepage%
+ {\doglobal\increment\currentprofile
+ \edef\docommando%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!profile}%
+ {\currentprofile}%
+ {\noexpand\realfolio}}}%
+ \docommando}
+
+\def\dogetprofilepage%
+ {\gettwopassdata{\s!profile}%
+ \let\profilepage=\twopassdata}
+
+%I n=Versies
+%I c=\definieerversie,\stelversiesin,\startversie
+%I c=\selecteerversie,\markeerversie,\volgversie
+%I
+%I Het mechanisme om wijzigingen in een tekst te markeren en
+%I selecteren sluit aan op dat van profielen.
+%I
+%I Een deel van de tekst kan worden gemarkeerd met ofwel
+%I
+%I \startversie[nr,nr,...]
+%I \stopversie
+%I
+%I of tussen @+ ...... @-. Eventueel mogen achter @+ nummers
+%I worden opgenomen: @+nr,nr,... ...... @-.
+%I
+%I Aldus gemerkte tekst kan in een afwijkende letter worden
+%I weergegeven, bijvoorbeeld \ss. Daarbij wordt de laagste
+%I nog te mrkeren versie opgegeven:
+%I
+%I \stelversiesin[nummer=,letter=]
+%I
+%I Een versienummer mag punten (.) bevatten. Deze worden
+%I voor het vergelijken niet meegenomen. Oppassen dus: 1.10
+%I wordt 110 en 2.2 wordt 22 en moet dus 2.02 zijn.
+%P
+%I Het is mogelijk alleen de 'recente' wijzigingen te
+%I verwerken. Dit gaat in twee slagen:
+%I
+%I \markeerversie (eerste slag)
+%I \selecteerversie (tweede slag)
+%I
+%I Er is gekozen voor het bewust markeren, omdat het
+%I markeren gaat ten koste van de omvang van de hulpfile.
+%P
+%I Evenals profielen, kunnen ook versie worden gevolgd. Ook
+%I hier dient eerst een definitie plaats te vinden:
+%I
+%I \definieerversie[naam][nummer,nummer,nummer]
+%I
+%I waarna gebruik kan worden gemaakt van:
+%I
+%I \volgversie{tekst}[naam]
+%I
+%I Er is ook een combinatie (doorsnede) mogelijk van
+%I profielen en versies:
+%I
+%I \volgprofielversie{tekst}[naam profiel][naam versie]
+
+\newcounter\versionlevel
+\newcounter\versionorder
+
+\newif\ifrecentversion
+
+\let\oldatcharacter=@
+
+\def\minimumversion{0}
+\def\actualversion{0}
+
+\def\dostelversiesin[#1]%
+ {\getparameters[\??ve][#1]
+ \stripcharacter.\from\@@venummer\to\minimumversion
+ \setversion}
+
+\def\stelversiesin%
+ {\dosingleargument\dostelversiesin}
+
+\definetwopasslist{\s!versionbegin}
+\definetwopasslist{\s!versionend}
+
+\def\actualprofile{}
+
+\def\doresetpageversion%
+ {\edef\docommando%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!versionend}%
+ {\versionorder}%
+ {\noexpand\realfolio}}}%
+ \docommando}
+
+\def\dosetpageversion#1%
+ {\recentversiontrue
+ \doglobal\increment\versionorder\relax
+ \edef\docommando%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!versionbegin}%
+ {\versionorder}%
+ {\noexpand\realfolio}}}%
+ \docommando
+ \let\resetpageversion=\doresetpageversion}
+
+\def\recentcontributions{}
+
+\def\checkrecentcontributions%
+ {\gettwopassdata{\s!versionbegin}%
+ \iftwopassdatafound
+ \!!counta=\twopassdata\relax
+ \gettwopassdata{\s!versionend}%
+ \iftwopassdatafound
+ \!!countb=\twopassdata\relax
+ \doglobal\increment\versionorder\relax
+ \writeutilitycommand%
+ {\twopassentry%
+ {\s!versionbegin}%
+ {\versionorder}%
+ {\the\!!counta}}%
+ \writeutilitycommand%
+ {\twopassentry%
+ {\s!versionend}%
+ {\versionorder}%
+ {\the\!!countb}}%
+ \for\teller=\!!counta\to\!!countb\step1\do%
+ {\@EA\doglobal\@EA\addtocommalist\@EA{\teller}{\recentcontributions}}%
+ \let\next=\checkrecentcontributions
+ \else
+ \let\next=\relax
+ \fi
+ \else
+ \let\next=\relax
+ \fi
+ \next}
+
+\def\docheckpageversion%
+ {\ExpandBothAfter\doifinsetelse{\realfolio}{\recentcontributions}
+ {\geselecteerdtrue}%
+ {\geselecteerdfalse}}
+
+\let\setpageversion = \gobbleoneargument
+\let\resetpageversion = \relax
+\let\checkpageversion = \relax
+
+\def\complexstartversie[#1]%
+ {\bgroup
+ \doifelse{\actualprofile}{}%
+ {\startprofiel[#1]}%
+ {\startprofiel[#1,\actualprofile]}%
+ \def\docomplexstartversie##1%
+ {\stripcharacter.\from##1\to\actualversion
+ \ifnum\versionlevel>0\relax
+ \ifnum\actualversion=0\relax
+ \setpageversion\actualversion % unknown version
+ \else
+ \ifnum\actualversion<\minimumversion\relax
+ \relax % old version
+ \else
+ \setpageversion\actualversion % new version
+ \fi
+ \fi
+ \fi}%
+ \doglobal\increment\versionlevel\relax
+ \doifelsenothing{#1}
+ {\docomplexstartversie{0}}%
+ {\processcommalist[#1]\docomplexstartversie}}
+
+\def\startversie%
+ {\complexorsimpleempty{startversie}}
+
+\def\stopversie%
+ {\stopprofiel
+ \doglobal\decrement\versionlevel
+ \ifnum\versionlevel<0\relax
+ \showmessage{\m!versions}{1}{}%
+ \else
+ \resetpageversion
+ \egroup
+ \fi}
+
+\bgroup
+\catcode`@=\active
+\gdef\setversion%
+ {\catcode`@=\active % we can't use \@@active here
+ \long\def@##1##2 %
+ {\ifx##1+%
+ \startversie[##2]%
+ \else\ifx##1-%
+ \stopversie
+ \else
+ \oldatcharacter##1##2 %
+ \fi\fi}}
+\egroup
+
+\def\markeerversie%
+ {\showmessage{\m!versions}{2}{}%
+ \let\setpageversion=\dosetpageversion
+ \let\resetpageversion=\relax
+ \let\checkpageversion=\relax}
+
+\def\selecteerversie%
+ {\checkrecentcontributions
+ \showmessage{\m!versions}{3}{\recentcontributions}%
+ \let\setpageversion=\gobbleoneargument
+ \let\resetpageversion=\relax
+ \let\checkpageversion=\docheckpageversion
+ \setversion}
+
+\def\dodefinieerversie[#1][#2]%
+ {\setvalue{\c!versie!!#1}{#2}%
+ \definieerprofiel[#1][#2]}
+
+\def\definieerversie%
+ {\dodoubleargument\dodefinieerversie}
+
+\def\volgversie%
+ {\volgprofiel}
+
+\def\volgprofielversie#1[#2][#3]%
+ {\def\docommando##1%
+ {\definieerprofiel[#2#3][##1]}%
+ \processcommacommand[\getvalue{\c!versie!!#3}]\docommando
+ \volgprofiel#1[#2#3]}
+
+% Standaard instellingen
+
+\definecolor [interactioncontrastcolor] [r=.8, g=0, b=0]
+\definecolor [interactioncolor] [r=0, g=.6, b=0]
+
+\definecolor [interactiekleur] [interactioncolor]
+\definecolor [interactiecontrastkleur] [interactioncontrastcolor]
+
+% andere talen ook
+
+\stelinteractiein
+ [\c!status=\v!stop,
+ \c!pagina=\v!nee,
+ \c!menu=\v!uit,
+ \c!letter=\v!vet,
+ \c!strut=\v!ja,
+ \c!kleur=interactioncolor,
+ \c!contrastkleur=interactioncontrastcolor,
+ \c!breedte=1em,
+ \c!hoogte=\!!zeropoint,
+ \c!diepte=\!!zeropoint,
+ \c!titel=,
+ \c!subtitel=,
+ \c!auteur=,
+ \c!datum=\the\normalyear
+ \ifnum\normalmonth<10 0\fi\the\normalmonth
+ \ifnum\normalday<10 0\fi\the\normalday]
+
+\definieerinteractiemenu
+ [\v!rechts]
+ [\v!rechts]
+ [\c!voor=,
+ \c!na=\vfil,
+ \c!tussen=\blanko,
+ \c!afstand=12pt,
+ \c!links=\hss,
+ \c!rechts=\hss,
+ \c!breedte=\rechterrandbreedte,
+ \c!hoogte=\v!ruim]
+
+\definieerinteractiemenu
+ [\v!links]
+ [\v!links]
+ [\c!voor=,
+ \c!na=\vfil,
+ \c!tussen=\blanko,
+ \c!afstand=12pt,
+ \c!links=\hss,
+ \c!rechts=\hss,
+ \c!breedte=\linkerrandbreedte,
+ \c!hoogte=\v!ruim]
+
+\definieerinteractiemenu
+ [\v!onder]
+ [\v!onder]
+ [\c!voor=\vss,
+ \c!na=\vss,
+ \c!midden=\hfil,
+ \c!afstand=12pt,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!ruim]
+
+\definieerinteractiemenu
+ [\v!boven]
+ [\v!boven]
+ [\c!voor=\vss,
+ \c!na=\vss,
+ \c!midden=\hfil,
+ \c!afstand=12pt,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!ruim]
+
+\stelinteractiemenuin
+ [\v!links,\v!rechts,\v!boven,\v!onder]
+ [\c!offset=.25em,
+ \c!kader=\v!aan,
+ \c!achtergrond=,
+ \c!achtergrondkleur=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!letter=\@@ialetter,
+ \c!kleur=\@@iakleur,
+ \c!status=\v!start,
+ \c!zelfdepagina=\v!ja,
+ \c!onbekendeverwijzing=\v!leeg,
+ \c!bovenoffset=\!!zeropoint,
+ \c!onderoffset=\!!zeropoint,
+ \c!linkeroffset=\!!zeropoint,
+ \c!rechteroffset=\!!zeropoint]
+
+\stelbovenin [\v!tekst] [\c!middentekst={\interactiemenus[\v!boven]}]
+\stelonderin [\v!tekst] [\c!middentekst={\interactiemenus[\v!onder]}]
+
+\def\plaatsrechterrandblok {\interactiemenus[\v!rechts]}
+\def\plaatslinkerrandblok {\interactiemenus[\v!links]}
+
+\stelinteractieschermin
+ [\c!breedte=\printpapierbreedte,
+ \c!hoogte=\printpapierhoogte,
+ \c!rugoffset=\!!zeropoint,
+ \c!kopoffset=\!!zeropoint,
+ \c!rugwit=\rugwit,
+ \c!kopwit=\kopwit,
+ \c!optie=\c!min]
+
+\stelexternefigurenin
+ [\c!hokjes=\v!uit,
+ \c!ymax=24,
+ \c!xmax=]
+
+\stelbuttonsin
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!ruim,
+ \c!offset=0.25em,
+ \c!kader=\v!aan,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=,
+ \c!letter=\@@ialetter,
+ \c!kleur=\@@iakleur,
+ \c!zelfdepagina=\v!ja,
+ \c!onbekendeverwijzing=\v!leeg]
+
+\stelinteractiebalkin
+ [\c!status=\v!start,
+ \c!variant=a,
+ \c!symbool=\v!nee,
+ \c!breedte=\rechterrandbreedte,
+ \c!hoogte=\v!ruim,
+ \c!diepte=\!!zeropoint,
+ \c!afstand=1em,
+ \c!stap=1,
+ \c!kleur=\@@iakleur,
+ \c!contrastkleur=\@@iacontrastkleur,
+ \c!kader=\v!aan,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=]
+
+\stelsynchronisatiebalkin
+ [\c!variant=\v!pagina,
+ \c!breedte=\rechterrandbreedte,
+ \c!letter=\@@ialetter,
+ \c!kleur=\@@iakleur,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=]
+
+\stelsynchronisatiein
+ [\c!status=\v!stop]
+
+\stelversiesin
+ [\c!nummer=1,
+ \c!letter=\ss,
+ \c!kleur=]
+
+\stelprofielenin
+ [\c!optie=]
+
+\stelprogrammasin
+ [\c!gebied=]
+
+\protect
+
+\endinput
+
+% Verwijzingen:
+%
+% - eerst lokaal kijken (prefix)
+% - dan globaal kijken (zonder prefix)
+% - en tot slot sequentieel lokaal kijken (alle prefixen doorlopen)
+% (van globaal naar lokaal)
+%
+% PAS OP: aangepast en dus niet meer ok
+
+\endinput
diff --git a/tex/context/base/core-01e.tex b/tex/context/base/core-01e.tex new file mode 100644 index 000000000..70487ec8b --- /dev/null +++ b/tex/context/base/core-01e.tex @@ -0,0 +1,423 @@ +%D \module
+%D [ file=core-01e,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=1E (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros (e)}
+
+\unprotect
+
+% \ifprocesspreviousparagraphs
+%
+% \nofskippedparagraphs
+% \paragraphnumber
+% \nofparagraphs
+%
+% \dosetparagraph
+% \doresetparagraph
+% \dobeforeparagraph
+% \doafterparagraph
+% \dobeforeskipparagraph
+% \doafterskipparagraph
+%
+% \pushparagraphs\endcommand alle alineas tot \endcommand laden
+% \pushmoreparagraphs\endcommand alle alineas tot \endcommand toevoegen
+% \popparagraphs alle alineas oproepen
+% \popparagraphs[a,b,c] enkele alineas oproepen [geen]
+%
+% tzt een optionele prefix:
+%
+% \pushparagraphs[xxx]\endcommand alle alineas tot \endcommand laden
+% \popparagraphs[xxx] alle alineas oproepen
+% \popparagraphs[xxx][a,b,c] enkele alineas oproepen
+%
+% \numberparagraphs
+% \numberparagraphlines
+% \resetparagraphlines
+
+\newif\ifprocesspreviousparagraphs % public
+\newif\ifprocessallparagraphs % private
+
+\newcounter\totalnofparagraphs % private
+\newcounter\globalparagraphnumber % private
+\newcounter\discardedparagraphs % private
+\newcounter\mostrecentparagraphtotal % public
+
+\let\dosetparagraph = \relax % public
+\let\doresetparagraph = \relax % public
+\let\dobeforeparagraph = \relax % public
+\let\doafterparagraph = \relax % public
+\let\dobeforeskipparagraph = \relax % public
+\let\doafterskipparagraph = \relax % public
+
+\def\paragraphnumber {} % public
+\def\nofparagraphs {} % public
+\def\nofskippedparagraphs {} % public
+
+\def\paragraphprefix {paragraph} % private
+
+% voorlopig, wordt nog class
+
+\def\resetparagraphlines%
+ {\global\linenumber=1\relax}
+
+\def\numberparagraphs%
+ {\processpreviousparagraphstrue
+ \def\dosetparagraph%
+ {\bgroup
+ \resetparagraphlines
+ \EveryPar
+ {\strut\inlinkermarge{\tx\paragraphnumber\kern2em}%
+ \ignorespaces}}
+ \def\doresetparagraph%
+ {\resetparagraphlines
+ \egroup}}
+
+\def\numberparagraphlines%
+ {\processpreviousparagraphstrue
+ \def\dosetparagraph%
+ {\resetparagraphlines}
+ \def\doresetparagraph%
+ {\resetparagraphlines}
+ \def\dobeforeparagraph%
+ {\startregelnummeren[\v!verder]}
+ \def\doafterparagraph%
+ {\stopregelnummeren}
+ \def\dobeforeskipparagraph%
+ {\stopregelnummeren
+ \let\paragraphnumber=\relax}
+ \def\doafterskipparagraph%
+ {\startregelnummeren[\v!verder]}}
+
+\def\dopushparagraphs#1%
+ {\global\let\mostrecentparagraphtotal=\totalnofparagraphs
+ \ifx#1\undefined
+ \let#1=\relax
+ \fi
+ \convertargument#1\to\asciiA
+ \convertargument{ }\to\asciiB % lege regel
+ \def\dopushparagraph##1\par%
+ {\convertargument##1\to\asciiC
+ \doifelse{\asciiC}{\asciiA}
+ {\let\next=#1}
+ {\doifnot{\asciiC}{} % lege paragraaf
+ {\doifnot{\asciiC}{\asciiB}
+ {\doglobal\increment\totalnofparagraphs
+ \ifnum\totalnofparagraphs>0\nofskippedparagraphs\relax
+ \setgvalue{\paragraphprefix\totalnofparagraphs}%
+ {##1}%
+ \else
+ \setgvalue{\paragraphprefix\totalnofparagraphs}%
+ {\skipparagraph##1\par}%
+ \fi}}%
+ \let\next=\dopushparagraph}
+ \next}%
+ \dopushparagraph}
+
+\def\pushparagraphs%
+ {\doglobal\newcounter\totalnofparagraphs
+ \dopushparagraphs}
+
+\def\pushmoreparagraphs%
+ {\dopushparagraphs}
+
+\def\dododopopparagraph#1% no grouping, i.v.m. sidefloats
+ {\ifnum#1>\totalnofparagraphs\relax
+ \else
+ \let\paragraphnumber=\globalparagraphnumber
+ \decrement(\paragraphnumber,\discardedparagraphs)%
+ \dobeforeparagraph
+ \ifhmode\indentation\fi\getvalue{\paragraphprefix#1}\par
+ \doafterparagraph
+ \fi}
+
+\long\def\skipparagraph#1\par%
+ {\doglobal\increment\discardedparagraphs
+ \ifprocessallparagraphs
+ \dobeforeskipparagraph
+ \ifhmode\indentation\fi#1\par
+ \doafterskipparagraph
+ \fi}
+
+\def\dodopopparagraph%
+ {\dododopopparagraph}
+
+\def\dodoprocessparagraph#1%
+ {\ifprocesspreviousparagraphs
+ \bgroup
+ \setbox0=\vbox{\dododopopparagraph{#1}}%
+ \egroup
+ \fi}
+
+\def\processpreviousparagraphs[#1]% process previous ones
+ {\ifprocesspreviousparagraphs
+ \bgroup
+ \getfromcommacommand[#1][1]%
+ \let\totalnofparagraphs=\commalistelement
+ \decrement\totalnofparagraphs
+ \let\dodopopparagraph=\dodoprocessparagraph
+ \popparagraphs
+ \egroup
+ \fi}
+
+\def\dopopparagraphs[#1]%
+ {\doifnotinset{#1}{\v!geen,0}
+ {\dosetparagraph
+ \doglobal\newcounter\globalparagraphnumber
+ \doglobal\newcounter\discardedparagraphs
+ \doifelse{#1}{}
+ {\processallparagraphstrue}
+ {\processallparagraphsfalse}%
+ \def\dopopparagraph%
+ {\doglobal\increment\globalparagraphnumber
+ \ifnum\globalparagraphnumber>\totalnofparagraphs\relax
+ \let\dopopparagraph=\relax
+ \else\ifprocessallparagraphs
+ \ifnum\globalparagraphnumber>\mostrecentparagraphtotal\relax
+ \dodopopparagraph\globalparagraphnumber
+ \else
+ \dodoprocessparagraph\globalparagraphnumber
+ \fi
+ \else
+ \let\paragraphnumber=\globalparagraphnumber
+ \decrement(\paragraphnumber,\discardedparagraphs)%
+ \ExpandBothAfter\doifinsetelse{\paragraphnumber}{#1}
+ {\dodopopparagraph\globalparagraphnumber}
+ {\dodoprocessparagraph\globalparagraphnumber}%
+ \fi\fi
+ \dopopparagraph}%
+ \dopopparagraph
+ \doresetparagraph}}
+
+\def\popparagraphs%
+ {\dosingleempty\dopopparagraphs}
+
+\def\countparagraphs%
+ {\popparagraphs[\!!maxcard]%
+ \global\let\nofparagraphs=\totalnofparagraphs
+ \doglobal\decrement(\nofparagraphs,\discardedparagraphs)}
+
+% \steluitlijnenin[onder]
+% \stelwitruimtein[groot]
+%
+% \toonkader
+%
+% \numberparagraphlines
+% \numberparagraphs
+%
+% \def\nofskippedparagraphs{1}
+%
+% \pushparagraphs\ThatsIt
+%
+% \ruledbaseline eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste
+%
+% \ruledbaseline eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste eerste eerste eerste
+% eerste eerste eerste eerste eerste
+%
+% \ruledbaseline tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede tweede tweede tweede
+% tweede tweede tweede tweede tweede
+%
+% \skipparagraph \ruledbaseline skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped
+%
+% \ruledbaseline derde derde derde derde derde derde derde
+% derde derde derde derde derde derde derde derde derde derde
+% derde derde derde derde derde derde derde derde derde derde
+% derde derde derde derde derde derde derde derde derde derde
+% derde derde derde derde derde derde derde derde derde derde
+% derde derde derde derde derde derde derde derde derde derde
+%
+% \skipparagraph \ruledbaseline skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped skipped
+%
+% \ruledbaseline vierde vierde vierde vierde vierde vierde
+% vierde vierde vierde vierde vierde vierde vierde vierde
+% vierde vierde vierde vierde vierde vierde vierde vierde
+% vierde vierde vierde vierde
+%
+% \ruledbaseline vijfde vijfde vijfde vijfde vijfde vijfde
+% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
+% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
+% vijfde vijfde vijfde vijfde vijfde vijfde vijfde vijfde
+% vijfde vijfde vijfde
+%
+% \skipparagraph \ruledbaseline skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped skipped skipped skipped skipped skipped
+% skipped skipped skipped
+%
+% \ThatsIt
+%
+% \popparagraphs
+%
+% \countparagraphs
+%
+% \blanko[2*groot]
+%
+% nofparagraphs:~\nofparagraphs
+%
+% \pagina
+%
+% \popparagraphs[1]
+% \popparagraphs[2]
+% \popparagraphs[3]
+% \popparagraphs[4]
+% \popparagraphs[5]
+%
+% \pagina
+%
+% \ruledvbox{\popparagraphs[1,2,3,4,5]}
+%
+% \pagina
+
+% PAS OP: VERVALLEN
+%
+% \newif\ifprocesspreviousparagraphs
+% \newif\ifprocessallparagraphs
+%
+% \newcounter\nofskippedparagraphs
+% \newcounter\nofmidskippedparagraphs
+%
+% \def\alineanummer {}
+%
+% \newcounter\nofalineas
+%
+% \def\laadalineas#1% alinea = class
+% {\doglobal\newcounter\nofalineas
+% \doglobal\decrement(\nofalineas,\nofskippedparagraphs)%
+% \ifx#1\undefined
+% \let#1=\relax
+% \fi
+% \convertargument#1\to\asciiA
+% \convertargument{ }\to\asciiB % lege regel
+% \def\dolaadalinea##1\par%
+% {\convertargument##1\to\asciiC
+% \doifelse{\asciiC}{\asciiA}
+% {\let\next=#1}
+% {\doifnot{\asciiC}{} % lege paragraaf
+% {\doifnot{\asciiC}{\asciiB}
+% {\doglobal\increment\nofalineas
+% \setgvalue{alinea\nofalineas}{##1}}}%
+% \let\next=\dolaadalinea}
+% \next}%
+% \dolaadalinea}
+%
+% % De constructie \edef\alineanummer{#1} is nodig voor
+% % bijvoorbeeld:
+% %
+% % \EveryPar{\strut\inlinker{\alineanummer}}
+% %
+% % Laten we dit weg, dan wordt het vorige nummer gebruikt.
+%
+% \def\dododohaalalinea#1% geen grouping, i.v.m. sidefloats
+% {\edef\localalineanummer{#1}%
+% \ifnum\localalineanummer>\nofalineas\relax
+% \else
+% \ifnum\localalineanummer>0\relax
+% \let\alineanummer=\localalineanummer
+% \decrement(\alineanummer,\nofmidskippedparagraphs)%
+% \else
+% \let\alineanummer=\empty
+% \fi
+% \dopreparagraph
+% \doeveryparagraph\getvalue{alinea\localalineanummer}\par
+% \dopostparagraph
+% \fi}
+%
+% \long\def\geenalinea#1\par%
+% {\ifprocessallparagraphs
+% \let\alineanummer=\relax
+% \dopostparagraph % fool around a bit
+% #1\par
+% \dopreparagraph % ugly but effective
+% \fi
+% \doglobal\increment\nofmidskippedparagraphs}
+%
+% \def\dodohaalalinea%
+% {\dododohaalalinea}
+%
+% \def\dodoverwerkalinea#1%
+% {\ifprocesspreviousparagraphs
+% \bgroup
+% \setbox0=\vbox{\dododohaalalinea{#1}}%
+% \egroup
+% \fi}
+%
+% \def\verwerkvorigealineas[#1]% process previous ones
+% {\ifprocesspreviousparagraphs
+% \bgroup
+% \getfromcommacommand[#1][1]%
+% \let\nofalineas=\commalistelement
+% \decrement\nofalineas
+% \let\dodohaalalinea=\dodoverwerkalinea
+% \haalalineas
+% \egroup
+% \fi}
+%
+% \let \dosetparagraph = \relax
+% \let \doresetparagraph = \relax
+% \let \dopreparagraph = \relax
+% \let \dopostparagraph = \relax
+% \let \doeveryparagraph = \relax
+%
+% \def\dohaalalineas[#1]%
+% {\doifnotinset{#1}{\v!geen,0}
+% {\dosetparagraph
+% \doglobal\newcounter\globalalineanummer
+% \doglobal\newcounter\nofmidskippedparagraphs
+% \doifelse{#1}{}
+% {\processallparagraphstrue
+% \doglobal\decrement(\globalalineanummer,\nofskippedparagraphs)}
+% {\processallparagraphsfalse}%
+% \def\dohaalalinea%
+% {\doglobal\increment\globalalineanummer
+% \ifnum\globalalineanummer>\nofalineas\relax
+% \let\dohaalalinea=\relax
+% \else
+% \ifprocessallparagraphs
+% \dodohaalalinea\globalalineanummer
+% \else
+% \let\localalineanummer=\globalalineanummer
+% \decrement(\localalineanummer,\nofmidskippedparagraphs)%
+% \ExpandBothAfter\doifinsetelse{\localalineanummer}{#1}
+% {\dodohaalalinea\globalalineanummer}
+% {\dodoverwerkalinea\globalalineanummer}%
+% \fi
+% \fi
+% \dohaalalinea}%
+% \dohaalalinea
+% \doresetparagraph}}
+%
+% \def\haalalineas%
+% {\dosingleempty\dohaalalineas}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-02a.tex b/tex/context/base/core-02a.tex new file mode 100644 index 000000000..c90f51713 --- /dev/null +++ b/tex/context/base/core-02a.tex @@ -0,0 +1,190 @@ +%D \module
+%D [ file=core-02a,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=2A (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Extra Macros (a)}
+
+\unprotect
+
+\startmessages dutch library: addresses
+ title: adressen
+ 1: --
+ 2: hoofdbestand --
+ 3: nevenbestand --
+\stopmessages
+
+\startmessages english library: addresses
+ title: addresses
+ 1: --
+ 2: primary base --
+ 3: secondary base --
+\stopmessages
+
+\startmessages german library: addresses
+ title: Adressen
+ 1: --
+ 2: Haupbestand --
+ 3: Nebenbestand --
+\stopmessages
+
+%I n=Kontakten
+%I c=\laadkontakten
+%I
+%I De onderstaande commando's werken samen met het programma
+%I TeXAdres.
+%I
+%I \laadkontakten[naam,groep,...]
+%I
+%I Dit commando doorzoekt eerst de file 'texadres.tao' en
+%I vervolgens de file 'texadres.tae' op naam en groep. Bij
+%I elk gevonden adres (naam of groepslid) wordt het commando
+%I \doemetkontakt{logisch} aangeroepen.
+%I
+%I De waarden van de verschillende velden zijn op te roepen met
+%I het commando \kontaktwaarde{veldnaam}. Let op: het in
+%I bijvoorbeeld een adres opgenomen commando \\ moet men zelf
+%I definieren, bijvoorbeeld: \def\\{\endgraf}.
+%P
+%I TeXAdres zet alle files op een gebied met de extensie 'tai'
+%I om in een file met de extensie 'tao' of 'tae'. Een invoerfile
+%I is als volgt opgebouwd:
+%I
+%I Een adres in de uitvoerfile ziet er als volgt uit:
+%I
+%I \beginvankontakt{...}
+%I \lidvangroep{...,...,...}
+%I \naam{...}
+%I \letters{...}
+%I \...{...}
+%I \postadres{...}
+%I \eindvankontakt{...}
+%P
+%I De invoerfile bevat zowel definities van kontakten als van
+%I groepen.
+%I
+%I Een kontakt wordt als volgt gedefinieerd:
+%I
+%I < kontakt >
+%I
+%I [ logisch ] hagenj
+%I [ naam ] Hagen
+%I [ letters ] J.
+%I [ voornaam ] Hans
+%I [ titel ] heer
+%I [ telefoon ] 053 - 336934
+%I [ telefax ]
+%I [ postadres ] J. Hagen \\ Ridderstraat 27--29 \\ 8061 GH Hasselt
+%I [ info ] ach ja
+%P
+%I Een groep wordt als volgt gedefinieerd:
+%I
+%I < groep >
+%I
+%I [ logisch ] werkgroep
+%I [ naam ]
+%I [ lid ] ottenaf
+%I [ lid ] hagenj
+%I [ lid ] jonkerj
+%I [ lid ] marlecvan
+
+% In eerste instantie leek het werken met % voor te skippen
+% regels mij een aardige oplossing. Echter, het opslurpen van
+% een heel blok tot \eindvankontakt gaat net zo snel.
+%
+% Hoewel het mechanisme inmiddels uitstekend is te combineren
+% met het tekstblok-mechanisme, wordt vooralsnog deze snelle
+% variant gebruikt.
+%
+% Om conflicten te voorkomen met reeds gedefinieerde commando's,
+% zoals \naam, wordt enkele malen \bgroup..\egroup gebruikt.
+
+\newevery \everykontakt \EveryKontakt
+
+\def\stelkontaktenin[#1]%
+ {\getparameters[\??kt][#1]}%
+
+\def\presetkontaktwaarde#1%
+ {\setgvalue{\??kw#1}{}%
+ \setvalue{#1}##1%
+ {\setgvalue{\??kw#1}{##1}}}
+
+\def\resetkontaktwaarde#1%
+ {\setgvalue{\??kw#1}{}%
+ \setvalue{#1}##1%
+ {\skipkontakt}}
+
+\def\kontaktwaarde#1%
+ {\getvalue{\??kw#1}}
+
+\def\presetkontakt%
+ {\rawprocesscommalist%
+ [naam,letters,voornaam,titel,telefoon,telefax,postadres,info]%
+ \presetkontaktwaarde}
+
+\def\resetkontakt%
+ {\rawprocesscommalist%
+ [naam,letters,voornaam,titel,telefoon,telefax,postadres,info]%
+ \resetkontaktwaarde}
+
+\def\skipkontakt%
+ {\long\def\next##1\eindvankontakt%
+ {\def\next####1{\egroup}\next}%
+ \next}
+
+\newif\ifkontaktok
+
+\def\laadkontakten[#1]%
+ {\makerawcommalist[#1]\gevraagdekontakten
+ \resetkontakt
+ \doifelsenothing{\gevraagdekontakten}
+ {\def\gevraagdekontakten{\v!alles}%
+ \kontaktoktrue}
+ {\kontaktokfalse}%
+ \def\checkkontakt##1%
+ {\rawdoifinsetelse{##1}{\gevraagdekontakten}{\kontaktoktrue}{}}%
+ \def\lidvangroep##1%
+ {\doifsomething{##1}
+ {\rawprocesscommalist[##1]\checkkontakt}%
+ \ifkontaktok
+ \let\next=\presetkontakt
+ \else
+ \let\next=\skipkontakt
+ \fi
+ \next}%
+ \def\beginvankontakt##1%
+ {\bgroup
+ \ifkontaktok
+ \def\lidvangroep####1{}%
+ \let\next=\presetkontakt
+ \else
+ \checkkontakt{##1}%
+ \ifkontaktok
+ \def\lidvangroep####1{}%
+ \let\next=\presetkontakt
+ \else
+ \let\next=\relax
+ \fi
+ \fi
+ \next}%
+ \def\eindvankontakt##1%
+ {\relax
+ \egroup
+ \the\everykontakt
+ \doemetkontakt{##1}}%
+ \showmessage{\m!addresses}{1}{\gevraagdekontakten}%
+ \readsysfile{texadres.tao}{\showmessage{\m!addresses}{2}{(tao)}}{\relax}%
+ \readjobfile{texadres.tae}{\showmessage{\m!addresses}{3}{(tae)}}{\relax}}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-02b.tex b/tex/context/base/core-02b.tex new file mode 100644 index 000000000..7931ae3c2 --- /dev/null +++ b/tex/context/base/core-02b.tex @@ -0,0 +1,172 @@ +%D \module
+%D [ file=core-02b,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=2B (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Extra Macros (b)}
+
+\unprotect
+
+%I n=Karakters
+%I
+%I Het is mogelijk bij het definieren van tabellen gebruik
+%I te maken van speciale karakters:
+%I
+%I \starttabel[|l|c|r|]
+%I ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
+%I ³ eerste ³ tweede ³ derde ³
+%I ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
+%I ³ alfa ³ a ³ 1 ³
+%I ³ beta ³ b ³ 22 ³
+%I ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
+%I ³ gamma ³ c ³ 333 ³
+%I ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
+%I \stoptabel
+%I
+%I Eventueel kunnen \starttabel en \stoptabel worden weggelaten.
+%P
+%I Naast \hoog en \laag kunnen (ook in de wiskunde-mode) de
+%I karakters en worden gebruikt: m2, x{23} enz.
+%P
+%I De volgende hoge ascii-karakters worden vertaald:
+%I
+%I Ÿ bedrag geen haakjes nodig, wel spaties
+
+\newcount\row
+\newcount\columns
+\newcount\column
+
+\newif\iffullrow
+
+\def\firstrow%
+ {\ifintabel
+ \HL
+ \fi
+ \global\row=0\relax
+ \global\fullrowfalse}
+
+\def\nextrow%
+ {\global\advance\column by 1\relax
+ \ifnum\column=\columns
+ \global\fullrowtrue
+ \VL
+ \else
+ \iffullrow
+ \global\column=1\relax
+ \global\fullrowfalse
+ \global\advance\row by 1\relax
+ \ifnum\row=1
+ \FR\VL
+ \else
+ \MR\VL
+ \fi
+ \else
+ \VL
+ \fi
+ \fi}
+
+\def\lastrow%
+ {\global\fullrowfalse
+ \ifnum\row=0
+ \global\row=0\relax
+ \global\column=0\relax
+ \SR\HL
+ \else
+ \global\row=0\relax
+ \global\column=0\relax
+ \LR\HL
+ \fi}
+
+\def\firstcolumn%
+ {\global\column=0\relax
+ \global\columns=1}
+
+\def\nextcolumn%
+ {\global\advance\columns by 1\relax}
+
+\newif\iflocalintabel
+\localintabelfalse
+
+\def\beginoftable%
+ {\ifintabel
+ \else\ifcase\columns\or
+ \or\starttabel[|l|]\HL
+ \or\starttabel[|l|l|]\HL
+ \or\starttabel[|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|l|l|l|l|l|]\HL
+ \or\starttabel[|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|]\HL
+ \fi
+ \global\localintabeltrue
+ \fi}
+
+\def\endoftable%
+ {\iflocalintabel
+ \stoptabel
+ \global\localintabelfalse
+ \fi}
+
+% \catcode`\Ú=\@@active \defÚ{\firstrow\firstcolumn}
+% \catcode`\Ã=\@@active \defÃ{\lastrow}
+% \catcode`\À=\@@active \defÀ{\lastrow}
+%
+% \catcode`\¿=\@@active \def¿{\nextcolumn}
+% \catcode`\´=\@@active \def´{}
+% \catcode`\Ù=\@@active \defÙ{\endoftable}
+%
+% \catcode`\Â=\@@active \defÂ{\nextcolumn}
+% \catcode`\Å=\@@active \defÅ{}
+% \catcode`\Á=\@@active \defÁ{}
+%
+% \catcode`\³=\@@active \def³{\beginoftable\nextrow}
+% \catcode`\Ä=\@@active \defÄ{}
+
+\catcode`\Ú=\@@active \defÚ{\ifprocessingverbatim{ }\else\firstrow\firstcolumn\fi}
+\catcode`\Ã=\@@active \defÃ{\ifprocessingverbatim\char`|\else\lastrow\fi}
+\catcode`\À=\@@active \defÀ{\ifprocessingverbatim{ }\else\lastrow\fi}
+
+\catcode`\¿=\@@active \def¿{\ifprocessingverbatim{ }\else\nextcolumn\fi}
+\catcode`\´=\@@active \def´{\ifprocessingverbatim\char`|\else\fi}
+\catcode`\Ù=\@@active \defÙ{\ifprocessingverbatim{ }\else\endoftable\fi}%
+
+\catcode`\Â=\@@active \defÂ{\ifprocessingverbatim\char`-\else\nextcolumn\fi}
+\catcode`\Å=\@@active \defÅ{\ifprocessingverbatim\char`|\else\fi}
+\catcode`\Á=\@@active \defÁ{\ifprocessingverbatim\char`-\else\fi}
+
+\catcode`\³=\@@active \def³{\ifprocessingverbatim\char`|\else\beginoftable\nextrow\fi}
+\catcode`\Ä=\@@active \defÄ{\ifprocessingverbatim\char`-\else\fi}
+
+\catcode`\=\@@active
+\catcode`\=\@@active
+
+\def#1%
+ {\ifprocessingverbatim\char`^\relax#1\else\ifmmode^{#1}\else\hoog{#1}\fi\fi}
+
+\def#1%
+ {\ifprocessingverbatim\char`_\relax#1\ifmmode_{#1}\else\laag{#1}\fi\fi}
+
+\catcode`\Ÿ=\@@active
+
+\defŸ%
+ {\ifprocessingverbatim f\else\bedrag{}~\ignorespaces\fi}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-02d.tex b/tex/context/base/core-02d.tex new file mode 100644 index 000000000..31ab3d236 --- /dev/null +++ b/tex/context/base/core-02d.tex @@ -0,0 +1,50 @@ +%D \module
+%D [ file=core-02d,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=2D (to be split),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Extra Macros (d)}
+
+\unprotect
+
+\def\definieerfilegroep%
+ {\dodoubleargument\dodefinieerfilegroep}
+
+\def\dodefinieerfilegroep[#1][#2]%
+ {\getparameters
+ [\??fp#1]
+ [\c!file=#1,
+ \c!voor=,
+ \c!na=,
+ #2]%
+ \setvalue{\e!start#1}{\dostartfilegroep[#1]}}
+
+\def\dostartfilegroep%
+ {\dodoubleargument\dodostartfilegroep}
+
+\def\dodostartfilegroep[#1][#2]%
+ {\getvalue{\??fp#1\c!voor}%
+ \setvalue{\e!stop#1}{\dostopfilegroep[#1][#2]}%
+ \edef\!!stringa{\getvalue{\??fp#1\c!file}-#2}%
+ \@EA\dolaadfilegroep\@EA[\!!stringa]%
+ \getvalue{\e!start#1#2}}
+
+\def\dolaadfilegroep[#1-#2#3#4#5]%
+ {\readsysfile{#1-#2#3#4}{}{}}
+
+\def\dostopfilegroep[#1][#2]%
+ {\getvalue{\e!stop#1#2}%
+ \getvalue{\??fp#1\c!na}}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex new file mode 100644 index 000000000..68b110b15 --- /dev/null +++ b/tex/context/base/core-con.tex @@ -0,0 +1,505 @@ +%D \module
+%D [ file=core-con,
+%D version=1997.26.08,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Conversion Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / Conversion Macros}
+
+\unprotect
+
+%D This module deals with all kind of conversions from numbers
+%D and dates. I considered splitting this module in a support
+%D one and a core one, but to keep things simple as well as
+%D preserve the overview, I decided against splitting.
+
+%D \macros
+%D {numbers}
+%D
+%D First we deal with the dummy conversion of numbers using the
+%D \TEX\ primitive \type{\number}. The uppercase alternative is
+%D only there for compatibility with the other conversion
+%D macros. We could do without \type{#1} but this way we get
+%D rid of unwanted braces. For the savety we also define a
+%D non||sence uppercase alternative.
+%D
+%D \showsetup{\y!numbers}
+
+\def\numbers#1%
+ {\number#1}
+
+\def\Numbers#1%
+ {\number#1}
+
+%D \macros
+%D {romannumerals,Romannumerals}
+%D
+%D \TEX\ the program uses a rather tricky conversion from
+%D numbers to their roman counterparts. This conversion could
+%D of course be programmed in \TEX\ itself, but I guess Knuth
+%D found the programming trick worth presenting.
+%D
+%D \showsetup{\y!romannumerals}
+%D \showsetup{\y!Romannumerals}
+%D
+%D When upcasing the result, we just follow the text book rules
+%D of expansion. Later on we'll see some more uppercase tricks.
+
+\def\romannumerals#1%
+ {\romannumeral#1}
+
+\def\Romannumerals#1%
+ {\uppercase\expandafter{\romannumeral#1}}
+
+%D \macros
+%D {character,Character}
+%D
+%D Converting a number into a character can of course only
+%D be done with numbers less or equal to~26. At the cost of
+%D much more macros a faster conversion is possible, using:
+%D
+%D \starttypen
+%D \setvalue{char1}{a} \def\character#1{\getvalue{char#1}}
+%D \stoptypen
+%D
+%D But we prefer a simpel \type{\case}.
+%D
+%D \showsetup{\y!character}
+%D \showsetup{\y!Character}
+
+\def\character#1%
+ {\ifcase#1%
+ \or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m%
+ \or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z%
+ \else
+ #1%
+ \fi}
+
+\def\Character#1%
+ {\ifcase#1%
+ \or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or M%
+ \or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z%
+ \else
+ #1%
+ \fi}
+
+%D \macros
+%D {characters,Characters}
+%D
+%D Converting large numbers is supported by the next two
+%D macros. This time we just count on: $\cdots$~x, y, z, aa,
+%D ab, ac~$\cdots$.
+%D
+%D \showsetup{\y!characters}
+%D \showsetup{\y!Characters}
+
+\def\doconvertcharacters#1#2%
+ {\bgroup
+ \ifnum#2>26
+ \!!counta=#2
+ \ifnum\!!counta>0
+ \advance\!!counta by -1
+ \!!countb=\!!counta
+ \divide\!!counta by 26
+ \!!countc=\!!counta
+ \multiply\!!countc by 26
+ \advance\!!countb by -\!!countc
+ \doconvertcharacters#1{\!!counta}%
+ \advance\!!countb by 1
+ #1{\the\!!countb}%
+ \fi
+ \else
+ #1{#2}%
+ \fi
+ \egroup}
+
+\def\characters%
+ {\doconvertcharacters\character}
+
+\def\Characters%
+ {\doconvertcharacters\Character}
+
+%D \macros
+%D {protectconversion}
+%D
+%D The previous two commands are not robust enough to be
+%D passed to \type{\write} en \type{\message}. That's why we
+%D introduce:
+
+\def\protectconversion%
+ {\def\doconvertcharacters{}}
+
+%D \macros
+%D {normaltime,normalyear,normalmonth,normalday}
+%D
+%D The last part of this module is dedicated to converting
+%D dates. Because we want to use as meaningful commands as
+%D possible, and because \TEX\ already uses up some of those,
+%D we save the original meanings.
+
+\let\normaltime = \time
+\let\normalyear = \year
+\let\normalmonth = \month
+\let\normalday = \day
+
+%D \macros
+%D {month,MONTH}
+%D
+%D Converting the month number into a month name is done
+%D using a case statement, abstact values and the label
+%D mechanism. This way users can easily redefine a label from
+%D for instance german into austrian.
+%D
+%D \starttypen
+%D \setuplabeltext [de] [january=J\"anner]
+%D \stoptypen
+%D
+%D Anyhow, the conversion looks like:
+
+\def\doconvertmonth#1%
+ {\labeltext
+ {\ifcase#1%
+ \or \v!january \or \v!february \or \v!march \or \v!april
+ \or \v!may \or \v!june \or \v!july \or \v!august
+ \or \v!september \or \v!october \or \v!november \or \v!december
+ \fi}}
+
+%D We redefine the \TEX\ primitive \type{\month} as:
+%D
+%D \showsetup{\y!month}
+%D \showsetup{\y!MONTH}
+
+\def\month%
+ {\doconvertmonth}
+
+\def\MONTH#1%
+ {{\let\labeltext=\LABELTEXT\month{#1}}}
+
+%D We never explicitly needed this, but Tobias Burnus pointed
+%D out that it would be handy to convert to the day of the
+%D week. In doing so, we have to calculate the total number of
+%D days, taking leapyears into account. For those who are
+%D curious:
+%D
+%D \startopsomming[opelkaar]
+%D \som years that can be divided by 4 are leapyears
+%D \som exept years that can be divided by 100
+%D \som unless years can be divided by 400
+%D \stopopsomming
+%D
+%D This makes the year 1900 into a normal year and 1996 and
+%D 2000 into leap years, right? Well, converting to string
+%D looks familiar:
+
+\def\doconvertday#1%
+ {\labeltext
+ {\ifcase#1
+ \or \v!sunday \or \v!monday \or \v!tuesday \or \v!wednesday
+ \or \v!thursday \or \v!friday \or \v!saturday \fi}}
+
+%D \macros
+%D {dayoftheweek}
+%D
+%D The conversion algoritm is an old one and a translation from
+%D a procedure written in MODULA~2 back in the 80's. I finaly
+%D found the 4--100-400 rules in some enclopedia. Look at this
+%D messy low level routine that takes the day, month and year
+%D as arguments:
+
+\def\dayoftheweek#1#2#3%
+ {\bgroup
+ \!!counta=\ifcase#2\relax
+ 0\or 0\or 31\or 59\or 90\or120\or151\or
+ 181\or212\or243\or273\or304\or334\or365\fi
+ \advance\!!counta by #1\relax
+ \ifnum\!!counta<31
+ \DoMod#3by4to\!!countb
+ \ifnum\!!countb=0
+ \!!doneafalse
+ \DoMod#3by100to\!!countb
+ \ifnum\!!countb=0 \else \!!doneatrue \fi
+ \DoMod#3by400to\!!countb
+ \ifnum\!!countb=0 \!!doneatrue \fi
+ \else
+ \!!doneafalse
+ \fi
+ \else
+ \!!doneafalse
+ \fi
+ \!!countb=#3\relax
+ \multiply\!!countb by 365
+ \advance\!!counta by \!!countb
+ \DoDiv#3by4to\!!countb
+ \advance\!!counta by \!!countb
+ \DoDiv#3by400to\!!countb
+ \advance\!!counta by \!!countb
+ \DoDiv#3by100to\!!countb
+ \advance\!!counta by -\!!countb
+ \if!!donea
+ \advance\!!counta by -1
+ \fi
+ \advance\!!counta by -1
+ \DoMod\!!counta by7to\!!counta
+ \advance\!!counta by 1
+ \doconvertday\!!counta
+ \egroup}
+
+%D Using this macro in
+%D
+%D \startbuffer
+%D monday: \dayoftheweek {4} {5} {1992}
+%D friday: \dayoftheweek {16} {6} {1995}
+%D monday: \dayoftheweek {25} {8} {1997}
+%D saturday: \dayoftheweek {30} {8} {1997}
+%D tuesday: \dayoftheweek {2} {1} {1996}
+%D tuesday: \dayoftheweek {7} {1} {1997}
+%D tuesday: \dayoftheweek {13} {1} {1998}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+
+%D \macros
+%D {weekday,WEEKDAY}
+%D
+%D The first one is sort of redundant. It takes the day
+%D number argument.
+%D
+%D \showsetup{\y!weekday}
+%D \showsetup{\y!WEEKDAY}
+
+\def\weekday%
+ {\doconvertday}
+
+\def\WEEKDAY#1%
+ {{\let\labeltext=\LABELTEXT\doconvertday{#1}}}
+
+%D \macros
+%D {weekoftheday}
+%D
+%D {\em not yet implemented:}
+%D
+%D \starttypen
+%D \def\weekoftheday#1#2#3%
+%D {}
+%D \stoptypen
+
+%D \macros
+%D {currentdate}
+%D
+%D We use these conversion macros in the date formatting
+%D macro:
+%D
+%D \showsetup{\y!currentdate}
+%D
+%D This macro takes care of proper spacing and delivers for
+%D instance:
+%D
+%D \startbuffer
+%D \currentdate[weekdag,dag,maand,jaar] % still dutch example
+%D \currentdate[WEEKDAG,dag,MAAND,jaar] % still dutch example
+%D \stopbuffer
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D depending of course on the keywords. Here we gave:
+%D
+%D \typebuffer
+%D
+%D If needed one can also add non||keywords, like in
+%D
+%D \startbuffer
+%D \currentdate[dd,--,mm,--,yy]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or typeset: \haalbuffer.
+%D
+%D When no argument is passed, the current date is given as
+%D specified per language (using \type{\installlanguage}).
+
+\def\complexcurrentdate[#1]%
+ {\bgroup
+ \def\betweendates{\let\betweendates\space}%
+ \processallactionsinset
+ [#1]
+ [ dd=>\ifnum\normalday>9\relax\else0\fi\the\normalday,
+ mm=>\ifnum\normalmonth>9\relax\else0\fi\the\normalmonth,
+ jj=>\expandafter\gobbletwoarguments\the\normalyear,
+ yy=>\expandafter\gobbletwoarguments\the\normalyear,
+ d=>\the\normalday,
+ m=>\the\normalmonth,
+ j=>\the\normalyear,
+ y=>\the\normalyear,
+ \v!kenmerk=>{\complexcurrentdate[jj,mm,dd]},
+ \v!dag=>\betweendates\the\normalday,
+ \v!maand=>\betweendates\month\normalmonth,
+ \v!MAAND=>\betweendates\MONTH\normalmonth,
+ \v!jaar=>\betweendates\the\normalyear,
+ \v!weekdag=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear,
+ \v!WEEKDAG=>\betweendates
+ \bgroup
+ \let\labeltext=\LABELTEXT
+ \dayoftheweek\normalday\normalmonth\normalyear
+ \egroup,
+ \s!unknown=>\commalistelement
+ \def\betweendates{\let\betweendates\space}]%
+ \egroup}
+
+\def\simplecurrentdate%
+ {\expanded{\complexcurrentdate[\currentdatespecification]}}
+
+\definecomplexorsimple\currentdate
+
+%D \macros
+%D {definesymbol, symbol}
+%D
+%D Converting numbers or levels into a character, romannumeral,
+%D symbol or something else, is supported by many \CONTEXT\
+%D commands. Therefore we need a mechanism for linking such
+%D numbers to their counterparts.
+%D
+%D First we take care of symbols. These are for instance used
+%D in enumerations and itemizations. We have:
+%D
+%D \showsetup{\y!definesymbol}
+%D \showsetup{\y!symbol}
+%D
+%D Symbols are symply linked to a tag. Such tags can be numbers
+%D or strings.
+%D
+%D \starttypen
+%D \definesymbol [1] [$\bullet$]
+%D \definesymbol [level 5] [$\star$]
+%D \stoptypen
+
+\def\dodefinesymbol[#1][#2]%
+ {\setvalue{\??ss#1}{#2}}%
+
+\def\definesymbol%
+ {\dodoubleargument\dodefinesymbol}
+
+\def\symbol[#1]%
+ {\doifdefinedelse{\??ss#1}{\getvalue{\??ss#1}}{#1}}
+
+%D \macros
+%D {defineconversion, convertnumber}
+%D
+%D Conversion involves the macros that we implemented earlier
+%D in this module.
+%D
+%D \showsetup{\y!defineconversion}
+%D \showsetup{\y!convertnumber}
+%D
+%D We can feed this command with conversion macros as well as
+%D a set of conversion symbols. Both need a bit different
+%D treatment.
+%D
+%D \starttypen
+%D \defineconversion [roman] [\romannumerals]
+%D \defineconversion [set 1] [$\star$,$\bullet$,$\ast$]
+%D \stoptypen
+
+\def\dodefineconversion[#1][#2]%
+ {\ConvertConstantAfter\doifinstringelse{,}{#2}
+ {\scratchcounter=0
+ \def\docommando##1%
+ {\advance\scratchcounter by 1
+ \setvalue{\??cv#1\the\scratchcounter}{##1}}%
+ \processcommalist[#2]\docommando
+ \setvalue{\??cv#1}##1{\getvalue{\??cv#1##1}}}
+ {\setvalue{\??cv#1}{#2}}}
+
+\def\defineconversion%
+ {\dodoubleargument\dodefineconversion}
+
+\def\convertnumber#1%
+ {\getvalue{\??cv#1}}
+
+%D As longs as symbols are linked to levels or numbers, we can
+%D also use the conversion mechanism, but in for instance the
+%D itemization macros, we prefer symbols because they can more
+%D easier be (partially) redefined.
+
+%D We predefine some common symbols and conversions that will
+%D be understood by many commands.
+
+\definesymbol [1] [$\bullet$]
+\definesymbol [2] [--]
+\definesymbol [3] [$\star$]
+\definesymbol [4] [$\triangleright$]
+\definesymbol [5] [$\circ$]
+\definesymbol [6] [\hbox{\setsmallcorps\raise\!!onepoint\hbox{$\bigcirc$}}]
+\definesymbol [7] [$\bigcirc$]
+\definesymbol [8] [\hbox{\hsmash{$\sqcup$}$\sqcap$}]
+
+\defineconversion [] [\numbers] % the default conversion
+
+\defineconversion [a] [\characters]
+\defineconversion [A] [\Characters]
+\defineconversion [AK] [\kap\characters]
+\defineconversion [KA] [\kap\characters]
+
+\defineconversion [n] [\numbers]
+\defineconversion [N] [\Numbers]
+\defineconversion [m] [\mediaeval]
+
+\defineconversion [r] [\romannumerals]
+\defineconversion [R] [\Romannumerals]
+\defineconversion [KR] [\kap\romannumerals]
+\defineconversion [RK] [\kap\romannumerals]
+
+\defineconversion [\v!letter] [\character]
+\defineconversion [\v!Letter] [\Character]
+
+\defineconversion [\v!letters] [\characters]
+\defineconversion [\v!Letters] [\Characters]
+
+\defineconversion [\v!cijfers] [\numbers]
+\defineconversion [\v!Cijfers] [\Numbers]
+\defineconversion [\v!mediaeval] [\mediaeval]
+
+\defineconversion [\v!romeins] [\romannumerals]
+\defineconversion [\v!Romeins] [\Romannumerals]
+
+\defineconversion
+ [set 1]
+ [$\star$,$\star\star$,$\star\star\star$,
+ $\ddagger$,$\ddagger\ddagger$,$\ddagger\ddagger\ddagger$,
+ $\ast$,$\ast\ast$,$\ast\ast\ast$]
+
+\defineconversion
+ [set 2]
+ [$*$,$\dag$,$\ddag$,
+ $**$,$\dag\dag$,$\ddag\ddag$,
+ $***$,$\dag\dag\dag,$\ddag\ddag\ddag$]
+
+\defineconversion
+ [set 3]
+ [$\star$,$\star\star$,$\star\star\star$,
+ $\ddagger$,$\ddagger\ddagger$,
+ $\P$,$\P\P$,
+ $\S$,$\S\S$,
+ $\ast$,$\ast\ast$]
+
+\protect
+
\ No newline at end of file diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex new file mode 100644 index 000000000..d687fc552 --- /dev/null +++ b/tex/context/base/core-fil.tex @@ -0,0 +1,48 @@ +% NOT YET DOCUMENTED !!
+
+%D \module
+%D [ file=core-fil,
+%D version=1997.09.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=File Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / File Support}
+
+\unprotect
+
+% Why does all tex's handle 8+3 different.
+
+\def\makeshortmodulename[#1#2#3#4#5#6#7#8#9]%
+ {\def\modulename{#1#2#3#4#5#6#7#8.}%
+ \expandafter\beforesplitstring\modulename\at.\to\modulename}
+
+\def\dodousemodules#1%
+ {\makeshortmodulename[m-#1........]%
+ \doifundefinedelse{\modulename\v!aan}
+ {\setgvalue{\modulename\v!aan}{}%
+ \readsysfile{\modulename}%
+ {\showmessage{\m!systems}{5}{#1}}%
+ {\showmessage{\m!systems}{6}{#1}}}
+ {\showmessage{\m!systems}{7}{#1}}}
+
+\def\dousemodules[#1]%
+ {\doifsomething{#1}
+ {\processcommalist[#1]\dodousemodules}}
+
+\def\usemodules%
+ {\dosingleargument\dousemodules}
+
+\def\usemodule%
+ {\usemodules}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex new file mode 100644 index 000000000..6db6a6de1 --- /dev/null +++ b/tex/context/base/core-fnt.tex @@ -0,0 +1,301 @@ +%D \module
+%D [ file=core-fnt,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Font Support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / Font Support}
+
+\unprotect
+
+%D \macros
+%D {kap,KAP,Kap,Kaps,nokap}
+%D
+%D We already introduced \type{\kap} as way to capitalize
+%D words. This command comes in several versions:
+%D
+%D \startbuffer
+%D \kap {let's put on a \kap{cap}}
+%D \kap {let's put on a \nokap{cap}}
+%D \KAP {let's put on a \\{cap}}
+%D \Kap {let's put on a \\{cap}}
+%D \Kaps{let's put on a cap}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Note the use of \type{\nokap}, \type{\\} and the nested
+%D \type{\kap}.
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D These macros show te main reason why we introduced the
+%D smaller \type{\tx} and \type{\txx}.
+%D
+%D \starttypen
+%D \kap\romeins{1995}
+%D \stoptypen
+%D
+%D This at first sight unusual capitilization is completely
+%D legal.
+%D
+%D \showsetup{\y!kap}
+%D \showsetup{\y!Kap}
+%D \showsetup{\y!KAP}
+%D \showsetup{\y!Kaps}
+%D \showsetup{\y!nokap}
+
+\unexpanded\def\kap%
+ {\futurelet\next\dokap}
+
+\def\dokap%
+ {\ifx\next\bgroup
+ \def\next{\dodokap\relax}%
+ \else
+ \def\next{\dodokap}%
+ \fi
+ \next}
+
+\def\dodokap#1#2%
+ {\ifmmode\hbox\fi
+ \bgroup
+ \tx
+ \the\everyuppercase
+ \uppercase{#1{#2}}%
+ \egroup}
+
+\unexpanded\def\KAP#1%
+ {{\def\\##1{\kap{##1}}#1}}
+
+\unexpanded\def\Kap#1%
+ {\KAP{\\#1}}
+
+\def\nokap#1%
+ {\lowercase{#1}}
+
+\def\Kaps%
+ {\let\processword=\Kap
+ \processwords}
+
+%D \macros
+%D {Word, Words, WORD, WORDS, doprocesswords}
+%D
+%D This is probably not the right place to present the next set
+%D of macros.
+%D
+%D \starttypen
+%D \Word {far too many words}
+%D \Words{far too many words}
+%D \WORD {far too many words}
+%D \WORDS{far too many words}
+%D \stoptypen
+%D
+%D \typebuffer
+%D
+%D This calls result in:
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D \showsetup{\y!Word}
+%D \showsetup{\y!Words}
+%D \showsetup{\y!WORD}
+%D \showsetup{\y!WORDS}
+
+\def\doWord#1%
+ {\bgroup
+ \the\everyuppercase
+ \uppercase{#1}%
+ \egroup}
+
+\def\Word#1%
+ {\doWord#1}
+
+\def\doprocesswords#1 #2\od%
+ {\ConvertToConstant\doifnot{#1}{}
+ {\processword{#1} %
+ \doprocesswords#2 \od}}
+
+\def\processwords#1%
+ {\doprocesswords#1 \od\unskip}
+
+\def\Words%
+ {\let\processwords=\Word
+ \processwords}
+
+\def\WORD#1%
+ {\bgroup
+ \def\kap#1{#1}%
+ \edef\next{#1}%
+ \the\everyuppercase
+ \uppercase\expandafter{\next}%
+ \egroup}
+
+\def\WORDS#1%
+ {\WORD{#1}}
+
+%D \macros
+%D {stretched}
+%D
+%D Stretching characters in a word is a sort of typographical
+%D murder. Nevertheless we support this manipulation for use in
+%D for instance titles.
+%D
+%D \starttypen
+%D \hbox to 5cm{\stretched{murder}}
+%D \stoptypen
+%D
+%D \typebuffer
+%D
+%D or
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D \showsetup{\y!stretched}
+
+\def\stretched%
+ {\ifvmode\hbox to \hsize\else\ifinner\else\hbox\fi\fi
+ \processtokens\relax\hss\relax\normalspace}
+
+%D \startbuffer
+%D \stretched{Unknown Box}
+%D \hbox to .5\hsize{\stretched{A Horizontal Box}}
+%D \vbox to 2cm{\stretched{A Vertical Box}}
+%D \hbox to 3cm{\stretched{sp{\'e}c{\`\i}{\"a}l}}
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D The first line of this macros takes care of boxing. Normally
+%D one will use an \type{\hbox} specification. The last line
+%D shows how special characters should be passed.
+%D
+%D \typebuffer
+
+%D \macros
+%D {underbar,underbars,overstrike,overstrikes,setupunderbar}
+%D
+%D In the rare case that we need undelined words, for instance
+%D because all font alternatives are already in use, one can
+%D use \type{\underbar} and \type{\overstrike} and their plural
+%D forms.
+%D
+%D \startbuffer
+%D \underbars{drawing \underbar{bars} under words is a typewriter leftover}
+%D \overstrikes{striking words makes them \overstrike{unreadable}}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D The next macros are derived from the \PLAIN\ \TEX\ one, but
+%D also supports nesting. The \type{$} keeps us in horizontal
+%D mode and at the same time applies grouping.
+%D
+%D \showsetup{\y!underbar}
+%D \showsetup{\y!underbars}
+%D \showsetup{\y!overstrike}
+%D \showsetup{\y!overstrikes}
+%D
+%D Although underlining is ill advised, we permit some
+%D alternatives, that can be set up by:
+%D
+%D \showsetup{\y!setupunderbar}
+%D
+%D The alternatives show up as
+%D {\setupunderbar [variant=a]{alternative a},
+%D {\setupunderbar [variant=b]{alternative b},
+%D {\setupunderbar [variant=c]{alternative c}
+%D and
+%D {\setupunderbar [lijndikte=1pt]{1pt width},
+%D {\setupunderbar [lijndikte=2pt]{2pt width},
+%D or whatever. Because \type{\overstrike} uses the same
+%D method, the settings also apply to that macro.
+
+\newcounter\underbarlevel
+
+\def\underbarmethoda#1#2#3% RULE
+ {\hbox to #1{\vrule\!!width#1\!!height#2\!!depth#3}}
+
+\def\underbarmethodb#1#2#3% DASH
+ {\hbox to #1
+ {\hskip-.25em
+ \xleaders
+ \hbox{\hskip.25em\vrule\!!width.25em\!!height#2\!!depth#3}
+ \hfil}}
+
+\def\underbarmethodc#1#2#3% PERIOD
+ {\hbox to #1
+ {\dimen0=#3
+ \advance\dimen0 by .2ex
+ \hskip-.25em
+ \xleaders
+ \hbox{\hskip.25em\lower\dimen0\hbox{.}}
+ \hfil}}
+
+\def\dounderbar#1#2#3%
+ {\bmath
+ \setbox0=\hbox{#3}%
+ \setbox2=\getvalue{underbarmethod\@@onvariant}{\wd0}{#1}{#2}%
+ \wd0=\!!zeropoint
+ \box0\box2
+ \emath}
+
+\def\underbar#1%
+ {\bgroup
+ \increment\underbarlevel
+ \dimen0=1.5\normallineskip % was \dimen0=1.5\lineskip
+ \dimen0=\underbarlevel\dimen0
+ \dimen2=\dimen0
+ \advance\dimen2 by \@@onlijndikte
+ \dounderbar{-\dimen0}{\dimen2}{#1}%
+ \egroup}
+
+\def\underbars%
+ {\let\processword=\underbar\processwords}
+
+\def\overstrike#1%
+ {\bgroup
+ \dimen0=2.5\lineskip
+ \dimen2=\dimen0
+ \advance\dimen2 by \@@onlijndikte
+ \dounderbar{\dimen2}{-\dimen0}{#1}%
+ \egroup}
+
+\def\overstrikes%
+ {\let\processword=\overstrike\processwords}
+
+\def\setupunderbar%
+ {\dodoubleargument\getparameters[\??on]}
+
+%D This module has only a few setups:
+
+\setupunderbar
+ [\c!variant=a,
+ \c!lijndikte=\linewidth]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-gen.tex b/tex/context/base/core-gen.tex new file mode 100644 index 000000000..45ffad9cc --- /dev/null +++ b/tex/context/base/core-gen.tex @@ -0,0 +1,179 @@ +%D \module
+%D [ file=core-gen,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=General,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / General}
+
+\unprotect
+
+%D \macros
+%D {assigndimension,assignalfadimension}
+%D {}
+%D
+%D Hieronder worden enkele commando's gedefinieerd rond
+%D toekenningen. Allereerst een commando om waarden aan
+%D een \DIMENSION\ toe te kennen:
+%D
+%D \starttypen
+%D \assigndimension
+%D {<waarde>|klein|middel|groot|-klein|-middel|-groot|geen}
+%D {\dimensie}
+%D {waarde klein}
+%D {waarde middel}
+%D {waarde groot}
+%D \stoptypen
+%D
+%D Hierbij krijgt de \DIMENSION\ \type{\dimensie} een waarde
+%D afhankelijk van het meegegeven trefwoord.
+%D
+%D \startsmaller
+%D \startregels
+%D \type{(-)klein }\qquad (--) waarde klein
+%D \type{(-)middel}\qquad (--) waarde middel
+%D \type{(-)groot }\qquad (--) waarde groot
+%D \type{geen }\qquad 0pt
+%D \type{waarde }\qquad waarde
+%D \stopregels
+%D \stopsmaller
+%D
+%D Een trefwoord mag worden voorafgegaan door een \type{-}.
+%D Deze macro toont een voorbeeld van het gebruik van
+%D \type{\processaction} en constanten.
+%D
+%D Analoog aan het bovenstaande commando kennen we een
+%D commando om waarden toe te kennen aan een macro:
+%D
+%D \starttypen
+%D \assignalfadimension
+%D {<waarde>|klein|middel|groot|geen}
+%D {\macro}
+%D {waarde klein}
+%D {waarde middel}
+%D {waarde groot}
+%D \stoptypen
+
+\def\assigndimension#1#2#3#4#5%
+ {\processaction
+ [#1]
+ [ \v!klein=>#2=#3,
+ \v!middel=>#2=#4,
+ \v!groot=>#2=#5,
+ \v!geen=>#2=\!!zeropoint,
+ -\v!klein=>#2=-#3,
+ -\v!middel=>#2=-#4,
+ -\v!groot=>#2=-#5,
+ \s!unknown=>#2=#1]}
+
+\def\assignalfadimension#1#2#3#4#5%
+ {\processaction
+ [#1]
+ [ \v!klein=>\edef#2{#3},
+ \v!middel=>\edef#2{#4},
+ \v!groot=>\edef#2{#5},
+ \v!geen=>\edef#2{0},
+ \s!unknown=>\edef#2{#1}]}
+
+%D De onderstaande implementatie is veel sneller, maar
+%D tegelijkertijd ook veel lelijker. Omdat we deze macro
+%D relatief weinig aanroepen laten we deze optimalisatie maar
+%D achterwege. Bovendien kunnen oplossingen als deze de
+%D hash||table aardig uitputten (\type{\doifdefined}).
+%D
+%D \starttypen
+%D \edef\@@dimension{@@dim}
+%D \edef\@@negdimension{\@@dimension-}
+%D
+%D \def\assigndimension#1#2#3#4#5%
+%D {\setvalue{\@@dimension\v!klein}{#3}%
+%D \setvalue{\@@dimension\v!middel}{#4}%
+%D \setvalue{\@@dimension\v!groot}{#5}%
+%D \setvalue{\@@negdimension\v!klein}{-#3}%
+%D \setvalue{\@@negdimension\v!middel}{-#4}%
+%D \setvalue{\@@negdimension\v!groot}{-#5}%
+%D \setvalue{\@@negdimension\v!geen}{\!!zeropoint}%
+%D \doifdefinedelse{\@@dimension#1}
+%D {#2=\getvalue{\@@dimension#1}}
+%D {#2=#1}}
+%D \stoptypen
+
+%D \macros
+%D {assignvalue}
+%D {}
+%D
+%D Een variant hierop is het commando:
+%D
+%D \starttypen
+%D \assignvalue
+%D {<waarde>|klein|middel|groot}
+%D {\macro}
+%D {waarde klein }
+%D {waarde middel}
+%D {waarde groot}
+%D \stoptypen
+%D
+%D Hierbij krijgt \type{\macro} een waarde afhankelijk van
+%D het meegegeven trefwoord:
+%D
+%D \startsmaller
+%D \startregels
+%D \type{klein }\qquad waarde klein
+%D \type{middel}\qquad waarde middel
+%D \type{groot }\qquad waarde groot
+%D \type{waarde}\qquad waarde
+%D \stopregels
+%D \stopsmaller
+%D
+%D Hier doet \type{geen} dus niet mee.
+
+\def\assignvalue#1#2#3#4#5%
+ {\processaction
+ [#1]
+ [ \v!klein=>\def#2{#3},
+ \v!middel=>\def#2{#4},
+ \v!groot=>\def#2{#5},
+ \s!unknown=>\def#2{#1}]}
+
+%D \macros
+%D {assignwidth}
+%D {}
+%D
+%D Een breedte van een opgegeven tekst kan worden berekend en
+%D toegekend aan een \DIMENSION\ met:
+%D
+%D \starttypen
+%D \assignwidth
+%D {\dimensie}
+%D {<waarde>|passend|ruim}
+%D {tekst}
+%D \stoptypen
+%D
+%D Dit commando sluit, evenals de bovenstaande
+%D \type{\assign}||commando's, aan op de wijze waarop
+%D in de andere \CONTEXT||modules toekenningen
+%D plaatsvinden. Bij \type{ruim} wordt de gemeten breedte
+%D met 1~em vermeerderd.
+
+\def\assignwidth#1#2#3%
+ {\doifelse{#2}{}
+ {\setbox0=\hbox{#3}%
+ #1=\wd0}
+ {\doifinsetelse{#2}{\v!passend,\v!ruim}
+ {\setbox0=\hbox{#3}%
+ #1=\wd0
+ \doif{#2}{\v!ruim}
+ {\advance#1 by 1em}}%
+ {#1=#2}}}%
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex new file mode 100644 index 000000000..f1884b6c4 --- /dev/null +++ b/tex/context/base/core-mak.tex @@ -0,0 +1,62 @@ +%D \module
+%D [ file=core-mak,
+%D version=1997.10.05,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=General Makeup Commands,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Support Macros / General Makeup Commands}
+
+\unprotect
+
+% \definieerplaats[naam][instellingen]
+% \plaats<naam>[[instellingen]]
+%
+% - still undocumented and also not in setupb yet
+% - kan ook intern/direct (scheelt duplicatie), zie \framedtext
+
+\def\dodefinieerplaats[#1][#2]%
+ {\getparameters
+ [\??pl#1]
+ [\c!links=\hss,
+ \c!rechts=\hss,
+ \c!regelcorrectie=\v!uit,
+ \c!dieptecorrectie=\v!uit,
+ %\c!voor=,
+ %\c!na=,
+ #2]%
+ \setvalue{\e!plaats#1}{\doplaats[\??pl#1]}}
+
+\def\definieerplaats%
+ {\dodoubleempty\dodefinieerplaats}
+
+\def\doplaats%
+ {\dodoubleempty\dodoplaats}
+
+\def\dodoplaats[#1][#2]%
+ {\bgroup
+ \dowithnextbox
+ {\setlocalhsize
+ \getparameters[#1][#2]%
+ \getvalue{#1\c!voor}%
+ \doifvalue{#1\c!regelcorrectie} {\v!aan} {\startbaselinecorrection}%
+ \hbox to \localhsize
+ {\getvalue{#1\c!links}%
+ \box\nextbox
+ \getvalue{#1\c!rechts}}%
+ \doifvalue{#1\c!dieptecorrectie} {\v!aan} {\baselinecorrection}%
+ \doifvalue{#1\c!regelcorrectie} {\v!aan} {\stopbaselinecorrection}%
+ \getvalue{#1\c!na}%
+ \egroup}
+ \vbox}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex new file mode 100644 index 000000000..13906abab --- /dev/null +++ b/tex/context/base/core-not.tex @@ -0,0 +1,557 @@ +%D \module
+%D [ file=core-not,
+%D version=1997.09.15,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Footnote Handling,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / Footnote Handling}
+
+%D There are some (still) dutch core commands used in this
+%D file.
+
+\unprotect
+
+%D Footnotes are can be characterized by three components:
+%D
+%D \startopsomming[opelkaar]
+%D \som a small number \voetnoot{a footnote number} or
+%D symbol {\stelvoetnotenin[conversie=set 2]\voetnoot{a
+%D footnote}}
+%D \som and a similar mark at the bottom of the page
+%D \som followed by some additional text
+%D \stopopsomming
+%D
+%D Because footnotes are declared at the location of their
+%D reference. Footnotes can be seen as a special kind of
+%D floating bodies. There placement is postponed but has to be
+%D taken into account in the pagebreak calculations. This kind
+%D of calculations are forced by using \type{\insert}.
+
+\ifx\footins\undefined \newinsert\footins \fi
+
+%D \macros
+%D {setupfootnotes}
+%D
+%D We can influence footnote typesetting with the setup
+%D command:
+%D
+%D \showsetup{\y!setupfootnotes}
+%D
+%D It's sort of a custom to precede footnotes by a horizontal
+%D rule and although fancy rules like
+%D
+%D \starttypen
+%D \hbox to 10em{\hskip-3em\dotfill}
+%D \stoptypen
+%D
+%D Are quite ligitimate, we default to a simple one 20\% of the
+%D text width.
+%D
+%D When \type{n} exceeds~1, footnotes are typeset in
+%D multi||columns, using the algoritm presented on page~397
+%D of \TEX book. Footnotes can be places on a per page basis
+%D or whereever suitable. When we set~\type{n} to~0, we get a
+%D rearanged paragraph, typeset by the algoritms on pages 398
+%D and~389. We definitely did not reinvent that wheel.
+
+\newif\ifendnotes \endnotesfalse
+
+\def\dosetupfootnotes[#1]%
+ {\getparameters[\??vn][#1]%
+ \processaction
+ [\@@vnlijn]
+ [ \v!aan=>\def\footnoterule{\hrule \!!width .2\hsize},
+ \v!uit=>\let\footnoterule=\relax,
+ \s!unknown=>\let\footnoterule=\@@vnlijn]%
+ \bgroup
+ \setbox0=\vbox
+ {\vskip\parskip % still to be tested in multi-column mode
+ \@@vnvoor
+ \footnoterule
+ \@@vnna}%
+ \global\skip\footins =\ht0
+ \global\count\footins=1000
+ \ifnum\@@vnn=0 \chardef\@@vnn=1 \fi % temporary (grouped)
+ \global\divide\count\footins by \@@vnn
+ \global\dimen\footins=\@@vnhoogte
+ \global\multiply\dimen\footins by \@@vnn
+ \egroup
+ \ifnum\@@vnn=0
+ \settextfootnotes
+ \else
+ \setcolumnfootnotes
+ \fi
+ \doifelse{\@@vnplaats}{\v!pagina}
+ {\global\endnotesfalse}
+ {\global\endnotestrue
+ \postponefootnotes}}
+
+\def\setupfootnotes%
+ {\dosingleargument\dosetupfootnotes}
+
+\def\setcolumnfootnotes%
+ {\def\formatfootnumber##1{\indent\llap{##1\hskip\@@vnmargeafstand}}%
+ \def\startpushfootnote {\setrigidcolumnhsize\@@vnbreedte\@@vnkolomafstand\@@vnn}%
+ \def\stoppushfootnote {}%
+ \def\startpopfootnotes {\setbox0=\vbox\bgroup}%
+ \def\stoppopfootnotes {\egroup\rigidcolumnbalance0\@@vnn}}
+
+\def\settextfootnotes%
+ {\def\formatfootnumber##1{\noindent##1}%
+ \def\startpushfootnote {\startvboxtohbox}%
+ \def\stoppushfootnote {\hskip\@@vnkolomafstand % plus.5em minus.5em
+ \stopvboxtohbox}%
+ \def\startpopfootnotes {\vbox\bgroup\hsize=\@@vnbreedte}% \setvboxtohbox}%
+ \def\stoppopfootnotes {\convertvboxtohbox\egroup}}
+
+%D The numbers that accompany a footnote are generated using
+%D the standard \CONTEXT\ numbering mechanism, and thereby can
+%D be assigned on a per whatever sectioning basis.
+
+\definieernummer
+ [\v!voetnoot]
+ [\c!wijze=\@@vnwijze,
+ \c!sectienummer=\@@vnwijze,
+ \c!conversie=\@@vnconversie]
+
+%D Both these parameters are coupled to the setup command we
+%D will implement in a moment. This means that, given a
+%D suitable symbol set, symbols can be used instead of numbers,
+%D by saying:
+%D
+%D \starttypen
+%D \setupfootnotes[conversion=set 2]
+%D \stoptypen
+
+%D \macros
+%D {footnote}
+%D
+%D A footnote can have a reference as optional argument and
+%D therefore its formal specification looks like:
+%D
+%D \showsetup{\y!footnote}
+%D
+%D This command has one optional command: the reference. By
+%D saying \type{[-]} the number is omitted. The footnote
+%D command is not that sensitive to spacing, so it's quite
+%D legal to say:
+%D
+%D \startbuffer
+%D Users of \CONTEXT\ must keep both feet \footnote{Given they
+%D have two.} on the ground and not get confused \footnote{Or
+%D even crazy.} by all those obscure \footnote{But fortunately
+%D readable.} parameters.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D When setting the \type{conversion} to \type{set 2} we get
+%D something like:
+%D
+%D \bgroup
+%D \startsmaller
+%D \stelvoetnotenin[conversie=set 1]
+%D \haalbuffer
+%D \stopsmaller
+%D \egroup
+%D
+%D Typesetting footnotes is, at least for the moment, disabled
+%D when reshaping boxes.
+
+\definecomplexorsimpleempty\footnote
+
+\def\complexfootnote[#1]%
+ {\unskip
+ \ifvisible
+ \ifreshapingbox
+ \let\next=\gobbletwoarguments
+ \else
+ \let\next=\dofootnote
+ \fi
+ \else
+ \let\next=\gobbletwoarguments
+ \fi
+ \next{#1}}
+
+%D \macros
+%D {footnotesenabled}
+%D
+%D Before we come to typesetting a footnote, we first check
+%D if we have to typeset a number. When a \type{-} is passed
+%D instead of a reference, no number is typeset. We can
+%D temporary disable footnotes by saying
+%D
+%D \starttypen
+%D \footnotesenabledfalse
+%D \stoptypen
+%D
+%D which can be handy while for instance typesetting tables
+%D of contents.
+
+\newif\iffootnotesenabled \footnotesenabledtrue
+
+\def\dofootnote#1%
+ {\iffootnotesenabled
+ \doifelse{#1}{-}
+ {\let\footnotenumber=\empty}
+ {\verhoognummer[\v!voetnoot]%
+ \maakhetnummer[\v!voetnoot]%
+ \rawtextreference{\s!fnt}{#1}{\hetnummer}%
+ \def\footnotenumber{\hoog{\hetnummer}}}%
+ \let\next=\dostartfootnote
+ \else
+ \let\next=\gobbleoneargument
+ \fi
+ \next}
+
+%D The main typesetting routine is more or less the same as the
+%D \PLAIN\ \TEX\ one, except that we only handle one type while
+%D \PLAIN\ also has something \type{\v...}. In most cases
+%D footnotes can be handled by a straight insert, but we do so
+%D by using an indirect call to the \type{\insert} primitive.
+
+\let\localfootinsert=\insert
+
+%D Making footnote numbers active is not always that logical,
+%D especially when we keep the reference and text at one page.
+%D On the other hand we need interactivity when we refer to
+%D previous notes or use end notes. Therefore we support
+%D interactive footnote numbers in two ways \voetnoot{This
+%D feature was implemented years after we were able to do so,
+%D mainly because endnotes had to be supported.} that is,
+%D automatically (vise versa) and by user supplied reference.
+
+\newcounter\internalfootreference
+
+\let\startpushfootnote = \relax
+\let\stoppushfootnote = \relax
+
+\newsignal\footnotesignal
+
+\def\dostartfootnote% nog gobble als in pagebody
+ {\bgroup
+ \unskip\unskip
+ \ifdim\lastkern=\footnotesignal
+ \hoog{\kern\@@vnafstand}% gets the font right
+ \fi
+ \ignorespaces
+ \doglobal\increment\internalfootreference
+ \nobreak
+ \iflocation
+ \naarbox{\footnotenumber}[\s!fnt:t:\internalfootreference]%
+ \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
+ \else
+ \footnotenumber
+ \fi
+ \localfootinsert\footins\bgroup
+ \forgetall
+ \setfootnotecorps
+ \redoconvertfont % to undo \undo calls in in headings etc
+ \startpushfootnote
+ \dostartattributes\??vn\relax
+ \interlinepenalty=\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % not actually needed here
+ \splitmaxdepth\dp\strutbox % not actually needed here
+ \ifx\footnotenumber\empty \else
+ \@@vnnummercommando
+ {\iflocation
+ \naarbox{\footnotenumber}[\s!fnt:f:\internalfootreference]%
+ \else
+ \footnotenumber
+ \fi}%
+ \fi
+ \iflocation
+ \rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}%
+ \fi
+ \bgroup
+ \aftergroup\dostopfootnote
+ \begstrut
+ \let\next}
+
+\def\dostopfootnote%
+ {\endstrut
+ \dostopattributes
+ \stoppushfootnote
+ \egroup
+ \egroup
+ \kern\footnotesignal\relax} % \relax is needed to honor spaces
+
+%D \macros
+%D {note}
+%D
+%D Refering to a note is accomplished by the rather short
+%D command:
+%D
+%D \showsetup{\y!note}
+%D
+%D This command is implemented rather straightforward as:
+
+\def\note[#1]%
+ {\iffootnotesenabled
+ \bgroup
+ \unskip
+ \gettextreference{#1}%
+ \naarbox{\hoog{\currenttextreference}}[#1]%
+ \egroup
+ \fi}
+
+%D Normally footnotes are saved as inserts that are called upon
+%D as soon as the pagebody is constructed. The footnote
+%D insertion routine looks just like the \PLAIN\ \TEX\ one,
+%D except that we check for the end note state.
+
+\let\startpopfootnotes = \relax
+\let\stoppopfootnotes = \relax
+
+\def\placefootnoteinserts%
+ {\ifvoid\footins \else
+ \ifendnotes \else
+ \vfill
+ \witruimte % kan dit \vskip\parskip zijn? testen
+ \@@vnvoor
+ \footnoterule
+ \bgroup
+ \setfootnotecorps
+ \startpopfootnotes
+ \unvbox\footins
+ \stoppopfootnotes
+ \egroup
+ \@@vnna
+ \fi
+ \fi}
+
+%D Supporting end notes is surprisingly easy. Even better, we
+%D can combine this feature with solving the common \TEX\
+%D problem of disappearing inserts when they're called for in
+%D deeply nested boxes. The general case looks like:
+%D
+%D \starttypen
+%D \postponefootnotes
+%D \.box{whatever we want with footnotes}
+%D \flushfootnotes
+%D \stoptypen
+%D
+%D This alternative can be used in headings, captions, tables
+%D etc. The latter one sometimes calls for notes local to
+%D the table, which can be realized by saying
+%D
+%D \starttypen
+%D \setlocalfootnotes
+%D some kind of table with local footnotes
+%D \placelocalfootnotes
+%D \stoptypen
+%D
+%D Postponing is accomplished by simply redefining the (local)
+%D insert operation. A not too robust method uses the
+%D \type{\insert} primitive when possible. This method fails in
+%D situations where it's not entirely clear in what mode \TEX\
+%D is. Therefore the auto method can is to be overruled when
+%D needed.
+
+\newbox\postponedfootnotes
+
+\def\autopostponefootnotes%
+ {\gdef\localfootinsert%
+ {\ifinner
+ %\message{[postponed footnote]}%
+ \global\setbox\postponedfootnotes=\vbox\bgroup
+ \unvbox\postponedfootnotes
+ \let\next=\gobbletwoarguments
+ \else
+ %\message{[inserted footnote]}%
+ \let\next=\insert
+ \fi
+ \next}}
+
+\def\postponefootnotes%
+ {\let\autopostponefootnotes=\postponefootnotes
+ \gdef\localfootinsert%
+ {%\message{[postponed footnote]}%
+ \global\setbox\postponedfootnotes=\vbox\bgroup
+ \unvbox\postponedfootnotes
+ \gobbletwoarguments}}
+
+\def\flushfootnotes%
+ {\ifinpagebody \else \ifinner \else
+ \ifendnotes \else \ifvoid\postponedfootnotes \else
+ %\ifvmode % less interference, but also less secure
+ \bgroup
+ \scratchdimen=\pagegoal
+ \advance\scratchdimen by -\pagetotal
+ \ifdim\scratchdimen<\ht\postponedfootnotes
+ \message{[moved footnote]}%
+ \fi
+ \egroup
+ \global\let\localfootinsert=\insert
+ \insert\footins\bgroup\unvbox\postponedfootnotes\egroup
+ %\fi
+ \fi\fi
+ \fi\fi}
+
+\def\placefootnotesintext#1%
+ {\bgroup
+ \@@vnvoor
+ \setfootnotecorps
+ \startpopfootnotes
+ \unvbox#1\relax
+ \stoppopfootnotes
+ \@@vnna
+ \egroup}
+
+%D \macros
+%D {startlocalfootnotes,placelocalfootnotes}
+%D
+%D The next two macros can be used in for instance tables, as
+%D we'll demonstrate later on.
+%D
+%D \showsetup{\y!startlocalfootnotes}
+%D \showsetup{\y!placelocalfootnotes}
+
+\newbox\localpostponedfootnotes
+
+\def\collectlocalfootnotes%
+ {\gdef\localfootinsert##1%
+ {%\message{[local footnote]}%
+ \global\setbox\localpostponedfootnotes=\vbox\bgroup
+ \unvbox\localpostponedfootnotes
+ \let\next}}
+
+\def\dostartlocalfootnotes[#1]%
+ {\let\autopostponefootnotes=\postponefootnotes
+ \let\postponefootnotes=\collectlocalfootnotes
+ \setupfootnotes[#1]%
+ \savenumber[\v!voetnoot]%
+ \resetnummer[\v!voetnoot]%
+ \collectlocalfootnotes}
+
+\def\startlocalfootnotes%
+ {\bgroup % here because we support \vbox\startlocalfootnotes
+ \dosingleempty\dostartlocalfootnotes}
+
+\def\stoplocalfootnotes%
+ {\restorenumber[\v!voetnoot]%
+ \egroup}
+
+\def\doplacelocalfootnotes[#1]%
+ {\bgroup
+ \setupfootnotes[#1]%
+ \placefootnotesintext\localpostponedfootnotes
+ \egroup}
+
+\def\placelocalfootnotes%
+ {\dosingleempty\doplacelocalfootnotes}
+
+%D These commands can be used like:
+%D
+%D \startbuffer
+%D \startlocalfootnotes[breedte=.3\hsize,n=0]
+%D \plaatstabel
+%D {Some Table}
+%D \plaatsonderelkaar
+%D {\starttabel[|l|r|]
+%D \HL
+%D \VL Nota\voetnoot{Bene} \VL Bene\voetnoot{Nota} \VL\SR
+%D \VL Bene\voetnoot{Nota} \VL Nota\voetnoot{Bene} \VL\SR
+%D \HL
+%D \stoptabel}
+%D {\placelocalfootnotes}
+%D \stoplocalfootnotes
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Because this table placement macro expect box content, and
+%D thanks to the grouping of the local footnotes, we don't need
+%D additional braces.
+%D
+%D \haalbuffer
+
+%D \macros
+%D {placefootnotes}
+%D
+%D We still have no decent command for placing footnotes
+%D somewhere else than at the bottom of the page (for which no
+%D user action is needed). Footnotes (endnotes) can be
+%D placed by using
+%D
+%D \showsetup{\y!placefootnotes}
+
+\def\doplacefootnotes[#1]%
+ {\bgroup
+ \setupfootnotes[#1]%
+ \ifendnotes
+ \ifinpagebody \else
+ \placefootnotesintext\postponedfootnotes
+ \fi
+ \else
+ \placefootnoteinserts
+ \fi
+ \egroup}
+
+\def\placefootnotes%
+ {\dosingleempty\doplacefootnotes}
+
+%D Now how can this mechanims be hooked into \CONTEXT\ without
+%D explictly postponing footnotes? The solution turned out to
+%D be rather simple:
+%D
+%D \starttypen
+%D \everypar {...\flushfootnotes...}
+%D \neverypar {...\postponefootnoes}
+%D \stoptypen
+%D
+%D and
+%D
+%D \starttypen
+%D \def\ejectinsert%
+%D {...
+%D \flushfootnotes
+%D ...}
+%D \stoptypen
+%D
+%D We can use \type{\neverypar} because in most commands
+%D sensitive to footnote gobbling we disable \type{\everypar}
+%D in favor for \type{\neverypar}. In fact, this footnote
+%D implementation is the first to use this scheme.
+
+%D When typesetting footnotes, we have to return to the
+%D footnote specific corps size, which is in most cases derived
+%D from the global document corps size. In the previous macros
+%D we already used a footnote specific font setting macro.
+
+\def\setfootnotecorps%
+ {\restoreglobalcorps
+ \switchtocorps[\@@vnkorps]}
+
+%D The footnote mechanism defaults to a traditional one
+%D column way of showing them. By default we precede them by
+%D a small line.
+
+\setupfootnotes
+ [\c!plaats=\v!pagina,
+ \c!wijze=\v!per\v!deel,
+ \c!sectienummer=\v!nee,
+ \c!conversie=,
+ \c!lijn=\v!aan,
+ \c!voor=\blanko,
+ \c!korps=\v!klein,
+ \c!letter=,
+ \c!na=,
+ \c!margeafstand=.5em,
+ \c!kolomafstand=1em,
+ \c!afstand=.125em,
+ \c!breedte=\zetbreedte,
+ \c!hoogte=\teksthoogte,
+ \c!nummercommando=\formatfootnumber,
+ \c!n=1]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex new file mode 100644 index 000000000..a67390ce9 --- /dev/null +++ b/tex/context/base/core-rul.tex @@ -0,0 +1,2280 @@ +%D \module
+%D [ file=core-rul,
+%D version=1997.09.05,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Ruled Stuff Handling,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / Ruled Stuff Handling}
+
+\unprotect
+
+%D \macros
+%D {linewidth, setuplinewidth}
+%D
+%D This module deals with rules (lines) in several ways. First
+%D we introduce two macros that can be used to set some common
+%D characteristics.
+%D
+%D \showsetup{\y!setuplinewidth}
+%D
+%D The linewidth is available in \type{\linewidth}. The
+%D preset value of .4pt equals the default hard coded \TEX\
+%D rule width.
+
+\newdimen\linewidth
+
+\def\dosetuplinewidth[#1]%
+ {\assigndimension{#1}{\linewidth}{0.2pt}{0.4pt}{0.6pt}}
+
+\def\setuplinewidth%
+ {\dosingleargument\dosetuplinewidth}
+
+% \def\dosetuprules[#1]%
+% {\getparameters[\??ln][#1]%
+% \setuplinewidth[\@@lndikte]}
+%
+% \def\setuprules%
+% {\dosingleargument\dosetuprules}
+
+%D \TEX\ lacks support for color and even gray scales. The next
+%D macros can provide a sort of poor mans gray scales as well
+%D as give access to more suitable methods of rendering. Such a
+%D method looks like:
+%D
+%D \starttypen
+%D \def\methodegraybox\width#1\depth#2\height#3\raster#4\radius#5\\
+%D { ... }
+%D \stoptypen
+%D
+%D The string \type{graybox} is a common element in the name,
+%D so we can have for instance \type {\postscriptgraybox} or
+%D \type {\texgraybox}. The first three arguments take a
+%D dimension, the fourth one takes a number between~0 and~1,
+%D and the last argument specifies a radius of the box when
+%D rounded corners are used, so:
+
+%D \startbuffer
+%D \periodgraybox\width.5\hsize\height1cm\depth0cm\raster.85\radius0pt\\
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D becomes:
+%D
+%D %\startregelcorrectie
+%D % \vbox to 1cm{\haalbuffer}
+%D %\stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \unprotect
+%D \vbox to 1cm
+%D {\getvalue{\v!punt graybox}\width.5\hsize\height1cm\depth0cm\raster.85\radius0pt\\}
+%D \protect
+%D \stopregelcorrectie
+%D
+%D There are two predefined methodes, one uses periods and the
+%D other uses small rules. The second method is less
+%D efficient, but sometimes give better results. The dimensions
+%D of the resullting box are set to zero.
+
+\setvalue{\v!punt graybox}%
+ {\processraster\symbol\rasterdot}
+
+\setvalue{\v!lijn graybox}%
+ {\processraster\symbol\rasterbox}
+
+\def\rasterdot%
+ {\rasterfont.}
+
+\def\rasterbox%
+ {\hss\vrule\!!width.4pt\!!height.4pt\!!depth\!!zeropoint}
+
+%D Now of course we need:
+
+\ifx\rasterfont\undefined \def\rasterfont{\fivepoint} \fi
+
+%D We implement two pure \TEX\ based generators, that use
+%D \type{\leaders} to quickly gerenate the gray pattern. One
+%D should beware of \DIMENSION\ conflicts, so we use some
+%D registers above~8. These macros are memory hungry and byte
+%D spoiling.
+
+\def\processraster\symbol#1\width#2\height#3\depth#4\raster#5\corner#6\radius#7\\%
+ {\bgroup
+ \forgetall
+ \mindermeldingen
+ \dimen10=\!!onepoint
+ \dimen10=\@@rsfactor\dimen10
+ \dimen10=#5\dimen10
+ \setbox2=\hbox to #2
+ {\cleaders\hbox to 2\dimen10{#1\hss}\hss}%
+ \dimen12=#3
+ \advance\dimen12 by #4
+ \setbox0=\vbox to \dimen12
+ {\cleaders\vbox to 2\dimen10{\box2\vss}\vss}%
+ \setbox0=\hbox
+ {\hskip-.5\dimen10\lower0.5\dimen10\copy0
+ \hskip-\wd0\hskip\dimen10\lower1.5\dimen10\box0}%
+ \box0
+ \egroup}
+
+%D \macros
+%D {setupscreens}
+%D
+%D The previous macro uses a predefined constant
+%D \type{\@@rsfactor}. This factor can be set by:
+%D
+%D \showsetup{\y!setupscreens}
+
+\def\setupscreens%
+ {\dodoubleargument\getparameters[\??rs]}
+
+%D The most appropriate way to call for this feature is
+%D using \type{\graybox}, which is defined as:
+
+\def\graybox{\getvalue{\@@rsmethode graybox}}
+
+%D This macro takes the five arguments mentioned earlier and
+%D obey the user's settings.
+
+%D We just introduced two pure \TEX\ methods for generating
+%D rasters. However, it's far more efficient and comfortable in
+%D terms of speed, memory usage and file size, to use a driver
+%D supported method.
+
+\setvalue{\v!extern graybox}\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\%
+ {\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\}
+
+%D For compatibility reasons we also define the original one:
+
+\setvalue{\v!postscript graybox}%
+ {\getvalue{\v!extern graybox}}
+
+%D A quite valid way of letting drivers do the job, is giving
+%D a solid rule a gray texture.
+
+\def\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\%
+ {\startraster[#4]%
+ \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\%
+ \stopraster}
+
+%D We don't have to stick to a \TEX\ drawn rule, but
+%D also can use rounded or even fancier shapes, as we will
+%D see later on.
+
+\def\dofilledbox\width#1\height#2\depth#3\corner#4\radius#5\\%
+ {\bgroup
+ \doifelse{#4}{\v!rond}
+ {\dimen0=#5\relax % just in case of .x\corpssize
+ \ifdim\dimen0=\!!zeropoint
+ \dofilledlinedbox\width#1\height#2\depth#3\\%
+ \else
+ \dofilledroundbox\width#1\height#2\depth#3\radius#5\\%
+ \fi}
+ {\dofilledlinedbox\width#1\height#2\depth#3\\}%
+ \egroup}
+
+\def\dofilledlinedbox\width#1\height#2\depth#3\\%
+ {\vrule\!!width#1\!!height#2\!!depth#3}%
+
+\def\dofilledroundbox\width#1\height#2\depth#3\radius#4\\%
+ {\ovalbox{#1}{#2}{#3}{\linewidth}{#4}{\v!nee}{\v!ja}}
+
+\def\ovalbox#1#2#3#4#5#6#7%
+ {\bgroup
+ \scratchdimen=#1\edef\ovalwid{\number\scratchdimen}%
+ \scratchdimen=#2\edef\ovalhei{\number\scratchdimen}%
+ \scratchdimen=#3\edef\ovaldep{\number\scratchdimen}%
+ \scratchdimen=#4\edef\ovallin{\number\scratchdimen}%
+ \scratchdimen=#5\edef\ovalrad{\number\scratchdimen}%
+ \doifelse{#6}{\v!ja} % will be a macro that handles
+ {\def\ovalstr{1}} % start, stop, ja, nee, aan, uit
+ {\def\ovalstr{0}}% % and something \doif
+ \doifelse{#7}{\v!ja}
+ {\def\ovalfil{1}}
+ {\def\ovalfil{0}}%
+ \doovalbox
+ {\ovalwid}{\ovalhei}{\ovaldep}
+ {\ovallin}{\ovalrad}
+ {\ovalstr}{\ovalfil}%
+ \egroup}
+
+%D The oval box is drawn using a special macro, depending on
+%D the driver in use.
+
+%D It won't be a surprise that we not only provide gray boxes,
+%D but also colored ones. Here it is:
+
+\def\setcolorbox\width#1\height#2\depth#3\color#4\corner#5\radius#6\\%
+ {\ifincolor
+ \doifsomething{#4}
+ {\startcolor[#4]%
+ \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\%
+ \stopcolor}%
+ \else
+ \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\%
+ \fi}
+
+\def\colorbox%
+ {\setcolorbox}
+
+%D \macro
+%D {defineoverlay, overlaywidth, overlayheight}
+%D
+%D Before we define the macro that actually takes card of the
+%D backgrounds, we introduce overlays. An overlay is something
+%D that contrary to its name lays {\em under} the text. An
+%D example of an overlay definition is:
+%D
+%D \startbuffer[tmp-1]
+%D \defineoverlay
+%D [fancy]
+%D [{\externfiguur
+%D [gene-011]
+%D [type=eps,methode=mps,
+%D breedte=\overlaywidth,
+%D hoogte=\overlayheight]}]
+%D \stopbuffer
+%D
+%D \typebuffer[tmp-1]
+%D
+%D That for instance can be uses in:
+%D
+%D \startbuffer[tmp-2]
+%D \omlijnd[achtergrond=fancy]{How Fancy!}
+%D \omlijnd[achtergrond=fancy,kader=uit]{Even More Fancy!}
+%D \stopbuffer
+%D
+%D and looks like:
+%D
+%D \startregelcorrectie
+%D \vbox{\baselineskip24pt\haalbuffer[tmp-1]\haalbuffer[tmp-2]}
+%D \stopregelcorrectie
+%D
+%D The formal definition is:
+%D
+%D \showsetup{\y!defineoverlay}
+%D
+%D This macro's definition is a bit obscure, due the many
+%D non||used arguments and the two step call that enable the
+%D setting of the width, height and depth variables.
+
+\def\defineoverlay%
+ {\dodoubleargument\dodefineoverlay}
+
+\def\dodefineoverlay[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{executeoverlay##1}{\executedefinedoverlay##1\\#2\\}}%
+ \processcommalist[#1]\docommando}
+
+\long\def\executedefinedoverlay#1\\#2\\#3#4#5#6#7#8#9%
+ {\bgroup
+ \scratchdimen=#3\edef\overlaywidth {\the\scratchdimen}%
+ \scratchdimen=#4\edef\overlayheight{\the\scratchdimen}%
+ %\message{[overlay: #1\space w: \overlaywidth\space h: \overlayheight]}%
+ \setbox0=\hbox{#2}%
+ \wd0=\overlaywidth
+ \ht0=\overlayheight
+ \dp0=\!!zeropoint
+ \box0
+ \egroup}
+
+%D The empty case is:
+
+\def\executeoverlay#1#2#3#4#5#6#7%
+ {}
+
+%D We predefine two already familiar backgrounds:
+
+\setvalue{executeoverlay\v!raster}#1#2#3#4#5#6#7%
+ {\graybox\width#1\height#2\depth#3\raster#5\corner#6\radius#7\\}
+
+\setvalue{executeoverlay\v!kleur}#1#2#3#4#5#6#7%
+ {\colorbox\width#1\height#2\depth#3\color#4\corner#6\radius#7\\}
+
+%D After all these preparations, the background macro does no
+%D bring to many surprises. One has to keep in mind that this
+%D macro starts up a call chain, depending on the background
+%D one needs:
+%D
+%D \startopsomming[opelkaar]
+%D \som a raster, color or user defined shape
+%D \som square or round corners
+%D \som a \TEX\ or driver based method
+%D \stopopsomming
+%D
+%D Here we go:
+
+\newbox\extraframebox
+
+\def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner
+ #6\radius#7\depth#8\\%
+ {\vbox
+ {\offinterlineskip
+ \dimen0=#5\relax
+ \dimen2=\dimen0
+ \advance\dimen2 by #8
+ \dimen4=2\dimen0
+ \advance\dimen4 by \wd#1
+ \dimen6=\dimen0
+ \advance\dimen6 by \ht#1
+ \advance\dimen6 by \dp#1
+ \advance\dimen6 by \dimen2
+ \setbox\extraframebox=\hbox
+ {\executeifdefined{executeoverlay#2}\gobblesevenarguments
+ {\dimen4}{\dimen6}{\!!zeropoint}{#3}{#4}{#6}{#7}}
+ \setbox\extraframebox=\hbox
+ {\lower\dimen2\vbox{\moveleft\dimen0\box\extraframebox}}
+ \wd\extraframebox=\wd#1
+ \ht\extraframebox=\ht#1
+ \dp\extraframebox=\dp#1
+ \vbox{\copy\extraframebox}
+ \vskip-\ht\extraframebox
+ \vbox{\box#1}}}
+
+%D Besides backgrounds (overlays) we also need some macros to
+%D draw outlines (ruled borders). Again we have to deal with
+%D square and round corners. The first category can be handled
+%D by \TEX\ itself, the latter one depends on the driver.
+
+\def\dooutlinebox#1\color#2\offset#3\corner#4\radius#5\depth#6\toggle#7\\%
+ {\vbox % rules on top of box
+ {\offinterlineskip
+ \dimen0=#3\relax
+ \dimen2=\dimen0
+ \advance\dimen2 by #6
+ \dimen4=2\dimen0
+ \advance\dimen4 by \wd#1
+ \dimen6=\dimen0
+ \advance\dimen6 by \ht#1
+ \advance\dimen6 by \dp#1
+ \advance\dimen6 by \dimen2
+ \setbox\extraframebox=\hbox
+ {\dostrokedbox\width\dimen4\height\dimen6\depth\!!zeropoint
+ \corner#4\radius#5\toggle#7\\}
+ \setbox\extraframebox=\hbox
+ {\lower\dimen2\vbox{\moveleft\dimen0\box\extraframebox}}
+ \wd\extraframebox=\wd#1
+ \ht\extraframebox=\ht#1
+ \dp\extraframebox=\dp#1
+ \vbox{\box#1}
+ \vskip-\ht\extraframebox
+ \doifsomething{#2}
+ {\color[#2]{\vbox{\box\extraframebox}}}
+ {\vbox{\box\extraframebox}}}}
+
+\def\dostrokedbox\width#1\height#2\depth#3\corner#4\radius#5\toggle#6\\%
+ {\bgroup
+ \doifelse{#4}{\v!rond}
+ {\dimen0=#5\relax % just in case of .x\corpssize
+ \ifdim\dimen0=\!!zeropoint
+ \dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\%
+ \else
+ \dostrokedroundbox\width#1\height#2\depth#3\radius#5\\%
+ \fi}
+ {\dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\}%
+ \egroup}
+
+%D The toggle argument in these calls concern the individual
+%D rules: left, right, top and bottom. Each cna be turned on,
+%D depending on the general state (\type{#4}) or the individual
+%D ones (\type{#5}, \type{#6}, \type{#7} and \type{#8}).
+
+\def\dostrokedlinedbox\width#1\height#2\depth#3\toggle
+ #4\left#5\right#6\top#7\bottom#8\\%
+ {\vbox
+ {\setbox0=\null\wd0=#1\ht0=#2\dp0=#3%
+ \vbox
+ {\getvalue{t\@@frame@@#4#7}%
+ \hbox
+ {\getvalue{l\@@frame@@#4#5}%
+ \box0
+ \getvalue{r\@@frame@@#4#6}}
+ \getvalue{b\@@frame@@#4#8}}}}
+
+\def\@@frame@@{@@frame@@}
+
+\setvalue{t\@@frame@@\v!aan\v!aan}{\hrule\!!height\linewidth\kern-\linewidth}
+\setvalue{t\@@frame@@\v!uit\v!aan}{\hrule\!!height\linewidth\kern-\linewidth}
+ \setvalue{t\@@frame@@\v!aan}{\hrule\!!height\linewidth\kern-\linewidth}
+\setvalue{b\@@frame@@\v!aan\v!aan}{\kern-\linewidth\hrule\!!height\linewidth}
+\setvalue{b\@@frame@@\v!uit\v!aan}{\kern-\linewidth\hrule\!!height\linewidth}
+ \setvalue{b\@@frame@@\v!aan}{\kern-\linewidth\hrule\!!height\linewidth}
+\setvalue{l\@@frame@@\v!aan\v!aan}{\vrule\!!width\linewidth\kern-\linewidth}
+\setvalue{l\@@frame@@\v!uit\v!aan}{\vrule\!!width\linewidth\kern-\linewidth}
+ \setvalue{l\@@frame@@\v!aan}{\vrule\!!width\linewidth\kern-\linewidth}
+\setvalue{r\@@frame@@\v!aan\v!aan}{\kern-\linewidth\vrule\!!width\linewidth}
+\setvalue{r\@@frame@@\v!uit\v!aan}{\kern-\linewidth\vrule\!!width\linewidth}
+ \setvalue{r\@@frame@@\v!aan}{\kern-\linewidth\vrule\!!width\linewidth}
+
+%D I condidered using the low level support command
+%D \type{\ruledhbox}, but this would slow down processing by a
+%D factor~3.
+
+%D Before we come to using these macros we yet have to define
+%D the rounded corner alternative, which after all is not that
+%D hard because it uses the previously defined macro \type
+%D {\ovalbox}.
+
+\def\dostrokedroundbox\width#1\height#2\depth#3\radius#4\\%
+ {\ovalbox{#1}{#2}{#3}{\linewidth}{#4}{\v!ja}{\v!nee}}
+
+%D The next few macros are probably the most misused ones in
+%D \CONTEXT. They deal with putting rules around boxes, provide
+%D backgrounds, offer alignment features, and some more. We
+%D start with defining some booleans. These give an impression
+%D of what we are going to take into account.
+
+\newif\ifboxhasoffset
+\newif\ifboxhaswidth
+\newif\ifboxhasheight
+\newif\ifboxhasformat
+\newif\ifboxhasstrut
+\newif\ifboxisoverlaid
+
+%D We also need a few \DIMENSIONS:
+
+\newdimen\@@localoffset
+\newdimen\@@globalwidth
+
+%D The content of the box will be (temporary) saved in a box:
+
+\newbox\framebox
+
+%D We also need a box for outlines and backgrounds:
+
+\newbox\extraframebox
+
+%D \macros
+%D {framed, setupframed}
+%D
+%D Ruled boxes are typeset using \type{\framed}. This command
+%D is quite versatile and, although some users will probably
+%D seldom use it, one cannot overlook its features.
+%D
+%D \showsetup{\y!setupframed}
+%D \showsetup{\y!framed}
+%D
+%D This general macro is a special version of an even more
+%D general case, that can easily be linked into other macros
+%D that need some kind of framing. The local version is called
+%D with an extra parameter: the variable identifier. The reason
+%D for passing this identifier between brackets lays in the
+%D mere fact that this way we can use the optional argument
+%D grabbers.
+
+\unexpanded\def\framed%
+ {\bgroup
+ \presetlocalframed[\??ol]%
+ \dodoubleempty\startlocalframed[\??ol]}
+
+\def\presetlocalframed[#1]%
+ {\copylocalframed[#1][\??oi]}
+
+\def\copylocalframed[#1]#2[#3]%
+ {\copyparameters[#1][#3]
+ [\c!breedte,\c!hoogte,\c!offset,\c!dummy,
+ \c!straal,\c!hoek,\c!diepte,\c!kader,\c!kaderkleur,
+ \c!bovenkader,\c!onderkader,\c!linkerkader,\c!rechterkader,
+ \c!lijndikte,\c!kaderoffset,\c!achtergrondoffset,
+ \c!achtergrond,\c!achtergrondraster,\c!achtergrondkleur,
+ \c!uitlijnen,\c!onder,\c!boven,\c!strut,\c!plaats]%
+ \copyparameters[#1\c!achtergrond][#1]
+ [\c!straal,\c!hoek,\c!diepte]%
+ \copyparameters[#1\c!kader][#1]
+ [\c!straal,\c!hoek,\c!diepte]}
+
+\def\setupframed%
+ {\dodoubleargument\getparameters[\??oi]}
+
+%D The normal case first presets all parameters and next starts
+%D looking for the user supplied ones. The first step is
+%D omitted in the local case, because these are preset at
+%D declaration time and keep their values unless explictly
+%D changed. By presetting the variables everytime the normal
+%D command is called, we can use this command nested, without
+%D the unwanted side effect of inheritance.
+
+\def\localframed%
+ {\bgroup
+ \dodoubleargument\startlocalframed}
+
+%D Before we go into details, we present (and implement) the
+%D main framing routine. I saw no real reason for splitting the
+%D next two macros into smaller pieces. The content will be
+%D collected in a horizontal or vertical box with fixed or free
+%D dimensions and specific settings concerning aligment and
+%D offsets.
+
+\def\startlocalframed[#1][#2]%
+ {\bgroup
+ \edef\@@framed{#1}%
+ \getparameters[\@@framed][#2]%
+ \edef\localoffset{\getvalue{\@@framed\c!offset}}%
+ \edef\localwidth{\getvalue{\@@framed\c!breedte}}%
+ \edef\localheight{\getvalue{\@@framed\c!hoogte}}%
+ \edef\localformat{\getvalue{\@@framed\c!uitlijnen}}%
+ \edef\localstrut{\getvalue{\@@framed\c!strut}}%
+ \doifvaluesomething{\@@framed\c!lijndikte}
+ {\linewidth=\getvalue{\@@framed\c!lijndikte}}%
+ \doifelsenothing{\localformat}
+ {\boxhasformatfalse}
+ {\boxhasformattrue
+ \edef\beforeframedbox{\getvalue{\@@framed\c!boven}}%
+ \edef\afterframedbox{\getvalue{\@@framed\c!onder}}%
+ \dosetraggedcommand{\localformat}}%
+ \doifelse{\localoffset}{\v!geen}
+ {\boxhasoffsetfalse
+ \boxhasstrutfalse
+ \boxisoverlaidfalse
+ \@@localoffset=\linewidth}
+ {\doifelse{\localoffset}{\v!overlay}
+ {\boxhasoffsetfalse
+ \boxhasstrutfalse
+ \boxisoverlaidtrue
+ \@@localoffset=\!!zeropoint}
+ {\boxhasoffsettrue
+ \boxhasstruttrue
+ \boxisoverlaidfalse
+ \@@localoffset=\localoffset
+ \advance\@@localoffset by \linewidth}}%
+ \doifelse{\localwidth}{\v!passend}
+ {\ifboxhasformat
+ \boxhaswidthtrue
+ \!!widtha=\hsize
+ \else
+ \boxhaswidthfalse
+ \fi}
+ {\doifelse{\localwidth}{\v!ruim}
+ {\boxhaswidthtrue
+ \!!widtha=\hsize}
+ {\boxhaswidthtrue
+ \!!widtha=\localwidth}}%
+ \doifelse{\localheight}{\v!passend}
+ {\boxhasheightfalse} % no longer: \boxhasstrutfalse
+ {\doifelse{\localheight}{\v!ruim}
+ {\boxhasheightfalse}
+ {\boxhasheighttrue
+ \!!heighta=\localheight}}%
+ \ifdim\!!widtha=\hsize
+ \parindent=\!!zeropoint
+ \setlocalhsize
+ \!!widtha=\localhsize
+ \fi
+ \advance\!!widtha by -2\@@localoffset
+ \advance\!!heighta by -2\@@localoffset
+ \doif{\localstrut}{\v!nee}
+ {\boxhasstrutfalse}%
+ \ifboxhasstrut
+ \setstrut
+ \let\localbegstrut=\begstrut
+ \let\localendstrut=\endstrut
+ \let\localstrut =\strut
+ \else
+ \let\localbegstrut=\relax
+ \let\localendstrut=\relax
+ \let\localstrut =\relax
+ \fi
+ \ifboxhasheight
+ \let\\=\vboxednewline
+ \ifboxhaswidth
+ \let\hairline=\vboxedhairline
+ \ifboxhasformat
+ \let\next=\doformatboxSomeFormat
+ \else
+ \let\next=\doformatboxNoFormat
+ \fi
+ \else
+ \let\hairline=\hboxedhairline
+ \ifboxhasformat
+ \let\next=\doformatboxHeight
+ \else
+ \let\next=\doformatboxVSize
+ \fi
+ \fi
+ \else
+ \ifboxhaswidth
+ \ifboxhasformat
+ \let\hairline=\vboxedhairline
+ \let\\=\vboxednewline
+ \let\next=\doformatboxWidth
+ \else
+ \let\hairline=\hboxedhairline
+ \let\\=\hboxednewline
+ \let\next=\doformatboxHSize
+ \fi
+ \else
+ \let\hairline=\hboxedhairline
+ \let\\=\hboxednewline
+ \let\next=\doformatboxNoSize
+ \fi
+ \fi
+ \def\dowithframedbox{\aftergroup\stoplocalframed}%
+ \afterassignment\dowithframedbox
+ \setbox\framebox=\next}
+
+%D Carefull analysis of this macro will learn us that not all
+%D branches in the last conditionals can be encountered, that
+%D is, some assignments to \type{\next} will never occur.
+%D Nevertheless we implement the whole scheme, if not for
+%D future extensions.
+%D
+%D The last few lines tell what to do after the content of the
+%D box is collected and passed to the next macro. In the case
+%D of a fixed width and centered alignment, the content is
+%D evaluated and used to determine the most natural width. The
+%D rest of the code deals with backgrounds and frames.
+
+\def\stoplocalframed%
+ {\dontshowcomposition
+ \ifboxhasformat
+ \doif{\localwidth}{\v!passend}
+ {\doreshapeframedbox
+ \boxhaswidthfalse}%
+ \fi
+ \ifboxhaswidth
+ \wd\framebox=\!!widtha
+ \fi
+ \ifboxhasheight
+ \ht\framebox=\!!heighta
+ \fi
+ \doifvalue{\@@framed\c!dummy}{\v!ja}
+ {\setbox0=\null
+ \wd0=\wd\framebox \ht0=\ht\framebox \dp0=\dp\framebox
+ \setbox\framebox=\box0\relax}%
+ \ifboxhasoffset
+ \dooffsetframebox
+ \fi
+ \ifboxisoverlaid \else
+ \dolocateframebox
+ \fi
+ \doframedbox
+ \doifvaluesomething{\@@framed\c!achtergrond}
+ {\dobackedbox}%
+ \doifvalue{\@@framed\c!plaats}{\v!laag}
+ {\doinlineframedbox}%
+ \box\framebox
+ \egroup
+ \egroup}
+
+%D The last conditional takes care of the special situation of
+%D in||line \inframed[hoogte=3cm]{framed} boxes. Such boxes have
+%D to be \inframed{aligned} with the running text.
+
+\def\doinframed[#1]% we could omit #1] but readibility ...
+ {\framed[\c!plaats=\v!laag,#1]}
+
+\unexpanded\def\inframed%
+ {\dosingleempty\doinframed}
+
+%D When we set \type{\c!dummy} to \type{\v!ja}, we get
+%D ourselves a frame and/or background, but no content, so
+%D actually we have a sort of phantom framed box.
+
+%D This previous framing macros needs a lot of alternatives for
+%D putting rules around boxes, inserting offsets and aligning
+%D text. Each step is handled by separate macros.
+
+\def\dooffsetframebox%
+ {\doifinstringelse{\getvalue{\@@framed\c!offset}}{\v!geen\c!offset}
+ {}{\doifelsevaluenothing{\@@framed\c!offset}
+ {}{\edef\do{\kern\getvalue{\@@framed\c!offset}}%
+ \setbox\framebox=\vbox{\do\hbox{\do\box\framebox\do}\do}}}}
+
+\def\dolocateframebox%
+ {\setbox\framebox=\vbox
+ {\kern\linewidth
+ \hbox{\kern\linewidth\box\framebox\kern\linewidth}
+ \kern\linewidth}}
+
+%D Let's hope that the next few examples show us enough of
+%D what needs to be done by the auxiliary macros.
+%D
+%D \startbuffer
+%D \framed[hoogte=1cm,offset=.5cm] {rule based learning}
+%D \framed[hoogte=1cm,offset=0cm] {rule based learning}
+%D \framed[hoogte=1cm,offset=geen] {rule based learning}
+%D \framed[hoogte=1cm,offset=overlay]{rule based learning}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \hbox{\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D \startbuffer
+%D \framed[offset=.5cm] {rule based learning}
+%D \framed[offset=0cm] {rule based learning}
+%D \framed[offset=geen] {rule based learning}
+%D \framed[offset=overlay]{rule based learning}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \hbox{\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D \startbuffer
+%D \framed[strut=nee,offset=.5cm] {rule based learning}
+%D \framed[strut=nee,offset=0cm] {rule based learning}
+%D \framed[strut=nee,offset=geen] {rule based learning}
+%D \framed[strut=nee,offset=overlay]{rule based learning}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \hbox{\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D \startbuffer
+%D \framed[breedte=3cm,uitlijnen=links] {rule\\based\\learning}
+%D \framed[breedte=3cm,uitlijnen=midden] {rule\\based\\learning}
+%D \framed[breedte=3cm,uitlijnen=rechts] {rule\\based\\learning}
+%D \framed[breedte=passend,uitlijnen=midden] {rule\\based\\learning}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \hbox{\mindermeldingen\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D So now we're ready for the complicated stuff. We distinguish
+%D between borders with straight lines and those with round
+%D corners. When using the first alternative it is possible to
+%D turn off one or more lines. More fancy shapes are also
+%D possible by specifying dedicated backgrounds. Turning lines
+%D on and off is implemented as efficient as possible and as a
+%D result is interface language dependant. This next
+%D implementation evolved from simpler ones. It puts for
+%D instance the rules on top of the content and provides
+%D additional offset capabilities. The lot of calls to other
+%D macros makes this mechanism not that easy to comprehend.
+
+\def\doframedbox%
+ {\setbox\framebox=\vbox
+ {\dooutlinebox\framebox
+ \color \getvalue{\@@framed\c!kaderkleur}%
+ \offset \getvalue{\@@framed\c!kaderoffset}%
+ \corner \getvalue{\@@framed\c!kaderhoek}%
+ \radius \getvalue{\@@framed\c!kaderstraal}%
+ \depth \getvalue{\@@framed\c!kaderdiepte}%
+ \toggle \getvalue{\@@framed\c!kader}%
+ \left \getvalue{\@@framed\c!linkerkader}%
+ \right \getvalue{\@@framed\c!rechterkader}%
+ \top \getvalue{\@@framed\c!bovenkader}%
+ \bottom \getvalue{\@@framed\c!onderkader}\\}}
+
+%D Getting the backgrounds right takes less code. Again we
+%D have to take care of additional offsets.
+
+\def\dobackedbox%
+ {\setbox\framebox=\vbox
+ {\dobackgroundbox\framebox
+ \background \getvalue{\@@framed\c!achtergrond}%
+ \color \getvalue{\@@framed\c!achtergrondkleur}%
+ \raster \getvalue{\@@framed\c!achtergrondraster}%
+ \offset \getvalue{\@@framed\c!achtergrondoffset}%
+ \corner \getvalue{\@@framed\c!achtergrondhoek}%
+ \radius \getvalue{\@@framed\c!achtergrondstraal}%
+ \depth \getvalue{\@@framed\c!achtergronddiepte}\\}}
+
+%D We handle left, right or middle alignment as well as fixed
+%D or free widths and heights. Each combination gets its own
+%D macro.
+
+\def\dopresetformatbox%
+ {\forgetall
+ \oninterlineskip}
+
+\def\doformatboxSomeFormat%
+ {\vbox to \!!heighta
+ \bgroup
+ \dopresetformatbox
+ \hsize\!!widtha
+ \vsize\!!heighta
+ \raggedcommand
+ \beforeframedbox
+ \bgroup
+ \localbegstrut
+ \aftergroup\localendstrut
+ \aftergroup\afterframedbox
+ \aftergroup\egroup
+ \let\next=}
+
+\def\doformatboxNoFormat%
+ {\vbox to \!!heighta
+ \bgroup
+ \dopresetformatbox
+ \hsize\!!widtha
+ \vsize\!!heighta
+ \raggedcenter
+ \vss
+ \bgroup
+ \localbegstrut
+ \aftergroup\localendstrut
+ \aftergroup\vss
+ \aftergroup\egroup
+ \let\next=}
+
+\def\doformatboxHeight%
+ {\vbox to \!!heighta
+ \bgroup
+ \dopresetformatbox
+ \raggedcommand
+ \vss
+ \bgroup
+ \aftergroup\localendstrut
+ \aftergroup\vss
+ \aftergroup\egroup
+ \localbegstrut
+ \let\next=}
+
+\def\doformatboxWidth%
+ {\vbox
+ \bgroup
+ \dopresetformatbox
+ \hsize\!!widtha
+ \raggedcommand
+ \bgroup
+ \localbegstrut
+ \aftergroup\localendstrut
+ \aftergroup\egroup
+ \let\next=}
+
+\def\doformatboxVSize%
+ {\vbox to \!!heighta
+ \bgroup
+ \forgetall
+ \vsize\!!heighta
+ \vss
+ \bgroup
+ \aftergroup\vss
+ \aftergroup\egroup
+ \hbox
+ \bgroup
+ \aftergroup\egroup
+ \localstrut
+ \let\next=}
+
+\def\doformatboxHSize%
+ {\hbox to \!!widtha
+ \bgroup
+ \forgetall
+ \hss
+ \localstrut
+ \bgroup
+ \aftergroup\hss
+ \aftergroup\egroup
+ \let\next=}
+
+\def\doformatboxNoSize%
+ {\hbox
+ \bgroup
+ \localstrut
+ \let\next=}
+
+%D On the next page we show some examples of how these macros
+%D come into action. The examples show us how
+%D \type{\v!passend}, \type{\v!ruim} dimensions influence the
+%D formatting. Watch the visualized struts. \voetnoot {Here we
+%D used \type{\toonstruts}.}
+%D
+%D \startuitstellen
+%D \bgroup
+%D \toonstruts
+%D \mindermeldingen
+%D \startregelcorrectie
+%D \halign{#\enskip&#\enskip&#\enskip&#\enskip&#\enskip&#\cr
+%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=] {a\par b\par c}\cr
+%D \noalign{\vskip1em}
+%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=ja] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=ja] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=ja] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=ja] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=ja] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=ja] {a\par b\par c}\cr
+%D \noalign{\vskip1em}
+%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=rechts] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=rechts] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=rechts] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=rechts] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=rechts] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=rechts] {a\par b\par c}\cr
+%D \noalign{\vskip1em}
+%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=links] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=links] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=links] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=links] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=links] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=links] {a\par b\par c}\cr
+%D \noalign{\vskip1em}
+%D \omlijnd[breedte=.2\hsize, hoogte=.2\hsize, uitlijnen=midden] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=ruim, uitlijnen=midden] {a\par b\par c}&
+%D \omlijnd[breedte=.2\hsize, hoogte=passend, uitlijnen=midden] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=.2\hsize, uitlijnen=midden] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=ruim, uitlijnen=midden] {a\par b\par c}&
+%D \omlijnd[breedte=passend, hoogte=passend, uitlijnen=midden] {a\par b\par c}\cr}
+%D \stopregelcorrectie
+%D \blanko[2*groot]
+%D \egroup
+%D \stopuitstellen
+
+%D It is possible to let the frame macro calculate the width
+%D of a centered box automatically (\type{\v!passend}). When
+%D doing so, we need to reshape the box:
+
+\def\doreshapeframedbox%
+ {\beginofshapebox
+ \unvcopy\framebox
+ \endofshapebox
+ \global\@@globalwidth=\!!zeropoint
+ \reshapebox
+ {\setbox0=\hbox{\unhbox\shapebox}%
+ \ifdim\wd0>\@@globalwidth
+ \global\@@globalwidth=\wd0
+ \fi}%
+ \dosetraggedcommand{\localformat}%
+ \raggedcommand
+ \setbox\framebox=\vbox
+ {\hsize\@@globalwidth
+ \reshapebox{\hbox to \hsize{\unhbox\shapebox}}%
+ \flushshapebox}%
+ \ifboxhasheight \else
+ \dp\framebox=\dp\strutbox
+ \fi}
+
+%D The examples on the next page show how one can give the
+%D frame as well as the background an additional offset and
+%D even a bit more depth. The blue outline is the frame, the
+%D red box is the background and the small black outline is the
+%D vsiualization of the resulting box, that is, we applied
+%D \type{\ruledhbox} to the result.
+
+%D \startuitstellen
+%D \bgroup
+%D \unprotect
+%D \mindermeldingen
+%D
+%D \startbuffer
+%D \vbox to \vsize
+%D \bgroup
+%D \startuitlijnen[midden]
+%D \vss
+%D \leavevmode\vbox to .8\vsize
+%D \bgroup
+%D \hsize=300pt
+%D \setupframed
+%D [\c!achtergrond=\v!kleur,
+%D \c!achtergrondkleur=DemoRed,
+%D \c!breedte=300pt,
+%D \c!hoogte=60pt,
+%D \c!kaderkleur=DemoBlue,
+%D \c!lijndikte=2pt]
+%D \def\status%
+%D {\c!achtergrondoffset=\@@olachtergrondoffset\\
+%D \c!kaderoffset=\@@olkaderoffset\\
+%D \c!diepte=\@@oldiepte}
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=0pt,kaderoffset=0pt]{\status}}
+%D \vss
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=0pt]{\status}}
+%D \vss
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=0pt,kaderoffset=5pt]{\status}}
+%D \vss
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=2pt,kaderoffset=5pt]{\status}}
+%D \vss
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=2pt]{\status}}
+%D \vss
+%D \leavevmode \ruledhbox{\framed[achtergrondoffset=5pt,kaderoffset=5pt]{\status}}
+%D \egroup
+%D \vss
+%D \stopuitlijnen
+%D \egroup
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D {\setupframed[diepte=4pt]\haalbuffer}
+%D
+%D \protect
+%D \egroup
+%D \stopuitstellen
+
+%D When typesetting the framed box inline, we have to keep the
+%D baseline intact outside as well as inside the framed box.
+
+\def\doinlineframedbox%
+ {\getboxheight\dimen2\of\box\framebox
+ \advance\dimen2 by -\ht\strutbox
+ \dimen0=.5\dimen2
+ \ifboxhasoffset
+ \advance\dimen0 by \getvalue{\@@framed\c!offset}
+ \fi
+ \advance\dimen0 by 2\linewidth
+ \setbox\framebox=\hbox{\lower\dimen0\box\framebox}%
+ \ht\framebox\ht\strutbox
+ \dp\framebox\dp\strutbox
+ \box\framebox}
+
+%D We can draw lines from left to right and top to bottom by
+%D using the normal \type{\hairline} command. Both directions
+%D need a different treatment.
+%D
+%D \startbuffer
+%D \framed[breedte=4cm] {alfa\hairline beta\hairline gamma}
+%D \framed[hoogte=2cm] {alfa\hairline beta\hairline gamma}
+%D \framed[breedte=4cm,hoogte=2cm]{alfa\hairline beta\hairline gamma}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \hbox{\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D These macros try to adapt their behaviour as good as
+%D possible to the circumstances and act as natural as
+%D possible.
+
+\def\vboxedhairline%
+ {\bgroup
+ \dimen2=\ifboxhasoffset \localoffset \else \!!zeropoint \fi
+ \dimen4=\dimen2
+ \advance\dimen4 by \linewidth
+ \setbox0=\vbox
+ {\advance\hsize by 2\dimen4
+ \vskip\dimen2
+ \hrule
+ \!!height\linewidth
+ \!!depth\!!zeropoint
+ \!!width\hsize
+ \vskip\dimen2}%
+ \endgraf\nointerlineskip\endgraf
+ \moveleft\dimen4\box0
+ \endgraf\nointerlineskip\endgraf
+ \localbegstrut
+ \egroup}
+
+\def\hboxedhairline%
+ {\bgroup
+ \dimen2=\ifboxhasoffset \localoffset \else \!!zeropoint \fi
+ \ifboxhasheight
+ \dimen4=\localheight \divide\dimen4 by 2
+ \dimen6=\dimen4
+ \advance\dimen4 by \dp\strutbox
+ \advance\dimen6 by -\dp\strutbox
+ \advance\dimen4 by -2\linewidth
+ \advance\dimen6 by 2\linewidth
+ \else
+ \dimen4=\ht\strutbox
+ \advance\dimen4 by \dimen2
+ \dimen6=\dp\strutbox
+ \advance\dimen6 by \dimen2
+ \fi
+ \unskip
+ \setbox0=\hbox
+ {\hskip\dimen2
+ \vrule
+ \!!height\dimen4
+ \!!depth\dimen6
+ \!!width\linewidth
+ \hskip\dimen2}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \box0
+ \ignorespaces
+ \egroup}
+
+%D The argument of the frame command accepts \type{\\} as a
+%D sort of newline signal. In horizontal boxes it expands to a
+%D space.
+
+\def\vboxednewline%
+ {\endgraf\ignorespaces}
+
+\def\hboxednewline%
+ {\unskip\normalspace\ignorespaces}
+
+%D We can set each rule on or off. The default setting is
+%D inherited from \type{\c!kader}. An earlier implementation
+%D use a bit different approach, but the new one seems more
+%D natural:
+%D
+%D \bgroup
+%D \steltypenin[marge=0pt]
+%D \startregelcorrectie
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=aan] {\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=aan,onderkader=uit]{\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=aan,onderkader=aan]{\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=uit] {\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=uit,onderkader=uit]{\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D
+%D \startbuffer
+%D \omlijnd[offset=overlay,kader=uit,onderkader=aan]{\DemoRed\blokje}
+%D \stopbuffer
+%D \hbox{\haalbuffer\vbox{\typebuffer}}
+%D \stopregelcorrectie
+%D \egroup
+
+%D \macros
+%D {setupblackrules}
+%D
+%D The graphic capabilities of \TEX\ do not go beyond simple
+%D filled rules, except of course when using specials. Let's
+%D start with a warning: using this commands is far more slower
+%D than using the \TEX\ primitives \type{\hrule} and
+%D \type{\vrule}, but they save us some tokens. The
+%D characteristics of these rule drawing command can be set by:
+%D
+%D \showsetup{\y!setupblackrules}
+
+\def\setupblackrules%
+ {\dodoubleargument\getparameters[\??bj]}
+
+%D \macros
+%D {blackrule}
+%D
+%D The simple command draws only one rule. Its optional
+%D argument can be used to specify the dimensions. By setting
+%D the width, height or depth to \type{\v!max}, one gets the
+%D natural dimensions.
+%D
+%D \showsetup{\y!blackrule}
+
+\def\doblackrule[#1]%
+ {\bgroup
+ \getparameters[\??bj][#1]%
+ \setstrut
+ \doif{\@@bjbreedte}{\v!max}{\def\@@bjbreedte{1em}}%
+ \doif{\@@bjhoogte} {\v!max}{\def\@@bjhoogte{\ht\strutbox}}%
+ \doif{\@@bjdiepte} {\v!max}{\def\@@bjdiepte{\dp\strutbox}}%
+ \vrule
+ \!!width\@@bjbreedte
+ \!!height\@@bjhoogte
+ \!!depth\@@bjdiepte
+ \egroup}
+
+\unexpanded\def\blackrule%
+ {\dosingleempty\doblackrule}
+
+%D \macros
+%D {blackrules}
+%D
+%D One can call for a sequence of black rules, if needed
+%D equally spaced over the given width.
+%D
+%D \showsetup{\y!blackrules}
+%D
+%D The two alternative calls are therefore:
+%D
+%D \startbuffer
+%D Tell me, is this according to the \blokjes[n=6]?
+%D These \blokjes[variant=b,n=10,afstand=.2em,breedte=4cm] are quite clear.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or:
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D We could of course have implemented this macro using
+%D \type{\leaders}, but this would probably have taken more
+%D tokens.
+
+\def\doblackrules[#1]%
+ {\bgroup
+ \getparameters[\??bj][#1]%
+ \!!widtha=\@@bjbreedte
+ \!!widthb=\@@bjafstand
+ \doif{\@@bjvariant}{\c!b}
+ {\scratchcounter=\@@bjn
+ \ifnum\scratchcounter=1
+ \!!widthb=\!!zeropoint
+ \else
+ \advance\scratchcounter by -1
+ \advance\!!widtha by -\scratchcounter\!!widthb
+ \divide\!!widtha by \@@bjn
+ \fi}%
+ \dorecurse{\@@bjn}
+ {\vrule
+ \!!width\!!widtha
+ \!!height\@@bjhoogte
+ \!!depth\@@bjdiepte
+ \hskip\!!widthb}%
+ \unskip
+ \egroup}
+
+\unexpanded\def\blackrules%
+ {\dosingleempty\doblackrules}
+
+%D The next commands can be used to draw margin rules. We
+%D support two methods: \marginrule{one for in||line use} and
+%D one that acts on a paragraph. Drawing a margin rule is
+%D rather straightforward because we can use the commands that
+%D put text in the margin.
+
+\def\dodrawmarginrule%
+ {\setbox0=\hbox
+ {\vrule
+ \!!height\strutheight
+ \!!depth\strutdepth
+ \!!width\@@kadikte}%
+ \vsmashbox0
+ \box0}
+
+\def\drawmarginrule%
+ {\strut\inlinker{\dodrawmarginrule}}
+
+%D \macros
+%D {marginrule}
+%D
+%D The first method gobbles words and simply puts a bar in the
+%D margin. This method is not entirely robust.
+%D
+%D \showsetup{\y!marginrule}
+
+\definecomplexorsimple\marginrule
+
+\def\simplemarginrule%
+ {\let\processword=\drawmarginrule
+ \processwords}
+
+\def\complexmarginrule[#1]%
+ {\ifnum#1<\@@kaniveau\relax \else
+ \def\@@kadefaultwidth{#1}%
+ \expandafter\simplemarginrule
+ \fi}
+
+%D We need an auxiliary variable
+
+\def\@@kadefaultwidth{1}
+
+%D \macros
+%D {setupmarginrules}
+%D
+%D This macro definitions show us that we can pass an optional
+%D level, which is matched against the previous set one. The
+%D level can be set up with
+%D
+%D \showsetup{\y!setupmarginrules}
+
+\def\setupmarginrules%
+ {\dodoubleargument\getparameters[\??ka]}
+
+%D \macros
+%D {startmarginrule}
+%D
+%D The second method collects text and reformats it afterwards,
+%D using the shapebox macros. We prevent local margin rules.
+%D
+%D \showsetup{\y!startmarginrule}
+
+\definecomplexorsimple\startmarginrule
+
+\def\simplestartmarginrule%
+ {\bgroup
+ \let\drawmarginrule=\relax
+ \let\stopmarginrule=\dostopmarginrule
+ \beginofshapebox}
+
+\def\complexstartmarginrule[#1]%
+ {\bgroup
+ \let\drawmarginrule=\relax
+ \ifnum#1<\@@kaniveau\relax
+ \let\stopmarginrule=\egroup
+ \else
+ \def\@@kadefaultwidth{#1}%
+ \let\stopmarginrule=\dostopmarginrule
+ \expandafter\beginofshapebox
+ \fi}
+
+\def\dostopmarginrule%
+ {\endofshapebox
+ \reshapebox
+ {\hbox{\inlinkermarge{\dodrawmarginrule}\box\shapebox}}%
+ \flushshapebox
+ \egroup}
+
+%D \startbuffer
+%D \stelkantlijnin[niveau=5]
+%D
+%D \startkantlijn[1]
+%D First we set the level at~5. Next we typeset this first
+%D paragraph as a level~1 one. As expected no rule show up.
+%D \stopkantlijn
+%D
+%D \startkantlijn[5]
+%D The second paragraph is a level~5 one. As we can se here,
+%D the marginal rule gets a width according to its level.
+%D \stopkantlijn
+%D
+%D \startkantlijn[8]
+%D It will of course be no surprise that this third paragraph
+%D has a even thicker margin rule. This behavior can be
+%D overruled by specifying the width explictly.
+%D \stopkantlijn
+%D \stopbuffer
+%D
+%D In next example we show most features. Watch the rule
+%D thickness adapting itself to the level.
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D We just said:
+%D
+%D \typebuffer
+
+%D \macros
+%D {vl, hl}
+%D
+%D The command \type{\vl} draws a vertical rule \vl\ with strut
+%D dimensions, multiplied with the factor specified in the
+%D optional argument. The height and depth are clipped \vl[3]
+%D to the baselinedistance. Its horizontal counterpart
+%D \type{\hl} draws a horizontal rule \hl\ with a width of 1em,
+%D multiplied with the optional factor. The horizontal rule is
+%D drawn on top of the baseline.
+%D
+%D \showsetup{\y!vl}
+%D \showsetup{\y!hl}
+
+\def\complexvl[#1]%
+ {\bgroup
+ \dimen0=#1\ht\strutbox
+ \dimen2=#1\dp\strutbox
+ \setbox0=\hbox
+ {\vrule
+ \!!width\linewidth
+ \!!height\dimen0
+ \!!depth\dimen2}%
+ \dp0=\dp\strutbox
+ \ht0=\ht\strutbox
+ \box0
+ \egroup}
+
+\def\complexhl[#1]%
+ {\hbox
+ {\vrule
+ \!!width#1em
+ \!!height\linewidth
+ \!!depth\!!zeropoint}}
+
+\def\simplevl%
+ {\complexvl[1]}
+
+\def\simplehl%
+ {\complexhl[1]}
+
+\definecomplexorsimple\vl
+\definecomplexorsimple\hl
+
+% gejat van Knuth (zie \copyright, p356)
+
+\def\omcirkeld#1%
+ {{\ooalign{\hfil\raise0.07ex\hbox{{\tfx#1}}\hfil\crcr\mathhexbox20D}}}
+
+\def\copyright
+ {\omcirkeld{c}}
+
+%D \macros
+%D {hairline, thinrule, thinrules, setupthinrules}
+%D
+%D Drawing thin lines can of course easily be accomplished by
+%D the \TEX\ primitives \type{\hrule} and \type{\vrule}. The
+%D next few macros however free us from some specifications.
+%D
+%D \startbuffer
+%D some text
+%D
+%D \hairline
+%D
+%D some more text
+%D
+%D \thinrule
+%D
+%D more and more text
+%D
+%D hi \thinrule\ there
+%D
+%D and then the final text
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D becomes
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D So we've got
+%D
+%D \showsetup{\y!hairline}
+%D \showsetup{\y!thinrule}
+%D
+%D Both can be set up with:
+%D
+%D \showsetup{\y!setupthinrules}
+%D
+%D We also have
+%D
+%D \showsetup{\y!thinrules}
+%D
+%D which looks like: \thinrules[n=2]
+
+\def\thinrule%
+ {\strut
+ \leaders
+ \hrule\!!height\@@dlhoogte\!!depth\@@dlhoogte
+ \hfill
+ \strut}
+
+\def\hairline%
+ {\endgraf
+ \thinrule
+ \endgraf}
+
+\def\dosetupthinrules[#1]%
+ {\getparameters[\??dl][#1]%
+ \assignvalue{\@@dlafstand}{\@@dl@@afstand}{1.0}{1.5}{2.0}}
+
+\def\setupthinrules%
+ {\dosingleargument\dosetupthinrules}
+
+\def\dothinrules[#1]%
+ {\bgroup
+ \dosetupthinrules[#1]%
+ \@@dlvoor
+ \spacing\@@dl@@afstand
+ \dorecurse
+ {\@@dln}
+ {\thinrule\ifnum\recurselevel<\@@dln\endgraf\fi}%
+ \@@dlna
+ \egroup}
+
+\def\thinrules%
+ {\dosingleempty\dothinrules}
+
+%D \macros
+%D {startframedtext, setupframedtexts,
+%D defineframedtext, start<<framedtext>>, <<framedtext>>}
+%D
+%D The general framing command we discussed previously, is not
+%D entirely suited for what we call framed texts, as for
+%D instance used in intermezzo's. The next examples show what
+%D we have in mind.
+%D
+%D \startbuffer[framed-0]
+%D \stelkadertekstenin
+%D [kader=uit,
+%D breedte=\hsize,
+%D achtergrond=raster]
+%D
+%D \startkadertekst
+%D By default the framed text is centered \dots
+%D \stopkadertekst
+%D
+%D \startkadertekst[rechts]
+%D \dots\ but we can also align left, middle and right.
+%D \stopkadertekst
+%D \stopbuffer
+%D
+%D \startbuffer[framed-1]
+%D \definieerkadertekst
+%D [Example]
+%D [breedte=6cm,
+%D hoogte=5cm]
+%D
+%D \startExample
+%D \typebuffer[framed-1]
+%D \stopExample
+%D \stopbuffer
+%D
+%D \startbuffer[framed-2]
+%D \definieerkadertekst
+%D [Example]
+%D [breedte=6cm]
+%D
+%D \startExample
+%D \typebuffer[framed-2]
+%D \stopExample
+%D \stopbuffer
+%D
+%D \startbuffer[framed-3]
+%D \definieerkadertekst
+%D [Example]
+%D [hoogte=5cm]
+%D
+%D \startExample
+%D \typebuffer[framed-3]
+%D \stopExample
+%D \stopbuffer
+%D
+%D \startbuffer[framed-4]
+%D \definieerkadertekst
+%D [Example]
+%D [breedte=passend,hoogte=ruim]
+%D
+%D \Example{a very exciting example}
+%D \stopbuffer
+%D
+%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-0] \egroup
+%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-1] \egroup
+%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-2] \egroup
+%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-3] \egroup
+%D \bgroup \steltypenin[marge=0pt] \haalbuffer[framed-4] \egroup
+%D
+%D Here we can see that we have a predefined framed text class
+%D as well as the tools for defining our own. So we have:
+%D
+%D \showsetup{\y!setupframedtexts}
+%D
+%D as well as the definition command:
+%D
+%D \showsetup{\y!defineframedtext}
+%D
+%D that generates two commands:
+%D
+%D \showsetup{\e!start<<\y!framedtext>>}
+%D \showsetup{<<\y!framedtext>>}
+%D
+%D The next definition shows the defaults.
+
+\def\dodefineframedtext[#1][#2]%
+ {\presetlocalframed[\??kd#1]%
+ \getparameters[\??kd#1]
+ [\c!breedte=0.75\hsize,
+ \c!hoogte=\v!passend,
+ \c!uitlijnen=\v!ja,
+ \c!boven=,
+ \c!onder=\vfill,
+ \c!offset=1em,
+ \c!korps=,
+ \c!letter=,
+ \c!kleur=,
+ \c!links=\hfill,
+ \c!rechts=\hfill,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!binnen=,
+ \c!kader=\v!aan,
+ \c!bovenkader=,
+ \c!onderkader=,
+ \c!linkerkader=,
+ \c!rechterkader=,
+ \c!straal=.5\corpssize,
+ \c!hoek=\v!recht,
+ \c!achtergrond=,
+ \c!achtergrondkleur=,
+ \c!achtergrondraster=\@@rsraster,
+ #2]%
+ \setvalue{\e!start#1}{\dostartframedtext[#1]}%
+ \setvalue{\e!stop#1}{\dostopframedtext[#1]}
+ \setvalue{#1}{\doframedtext[#1]}}
+
+\def\defineframedtext%
+ {\dodoubleempty\dodefineframedtext}
+
+%D We define the general (and original) case by just saying:
+
+\defineframedtext[\v!framedtext]
+
+%D We need several steps before the actual job is done,
+%D because we have to handle an optional identifier (and
+%D because these commands evolved out of a single case).
+
+\def\dosetupframedtexts[#1][#2]%
+ {\ifsecondargument
+ \getparameters[\??kd#1][#2]%
+ \else
+ \getparameters[\??kd\v!framedtext][#1]%
+ \fi}
+
+\def\setupframedtexts%
+ {\dodoubleempty\dosetupframedtexts}
+
+\def\dostartframedtext%
+ {\bgroup\dotripleempty\dodostartframedtext}
+
+\def\dodostartframedtext[#1][#2][#3]%
+ {\doifinstringelse{=}{#2}
+ {\dododostartframedtext[#1][][#2]}
+ {\dododostartframedtext[#1][#2][#3]}}
+
+\def\dododostartframedtext[#1][#2][#3]%
+ {\processaction
+ [#2]
+ [ \c!links=>\letvalue{\??kd#1\c!links}=\relax,
+ \c!rechts=>\letvalue{\??kd#1\c!rechts}=\relax,
+ \s!default=>\letvalue{\??kd#1\c!links}=\relax,
+ \s!unknown=>]%
+ \forgetparindent
+ \setbox\framebox=\vbox
+ \bgroup
+ \expanded{\switchtocorps[\getvalue{\??kd#1\c!korps}]}%
+ \localframed[\??kd#1][\c!strut=\v!nee,#3]%
+ \bgroup
+ \blanko[\v!blokkeer]%
+ \let\\=\endgraf
+ \getvalue{\??kd#1\c!binnen}%
+ \dostartattributes{\??kd}{}}
+
+\def\dostopframedtext[#1]%
+ {\endgraf
+ \removelastskip
+ \dostopattributes
+ \baselinecorrection % new, inside box
+ \egroup
+ \egroup
+ \ifinsidefloat
+ \box\framebox
+ \else
+ \doplaats[\??kd#1][\c!regelcorrectie=\v!aan]{\box\framebox}%
+ \fi
+ \egroup}
+
+%D The simple brace (or group) delimited case is typeset
+%D slightly different and is not aligned.
+
+\def\doframedtext%
+ {\bgroup\dodoubleempty\dodoframedtext}
+
+\def\dodoframedtext[#1][#2]%
+ {\expanded{\switchtocorps[\getvalue{\??kd#1\c!korps}]}%
+ \localframed[\??kd#1][\c!strut=\v!nee,#2]%
+ \bgroup
+ \blanko[\v!blokkeer]%
+ \let\\=\endgraf
+ \getvalue{\??kd#1\c!binnen}%
+ \dostartattributes{\??kd}{}%
+ \bgroup
+ \aftergroup\docloseframedtext
+ \let\next=}
+
+\def\docloseframedtext%
+ {\removelastskip
+ \dostopattributes
+ \egroup
+ \egroup}
+
+%D \macros
+%D {textrule, starttextrule, setuptextrules}
+%D
+%D Putting rules before and after a paragraph is very space
+%D sensitive, but the next command handles that quite well. It
+%D comes in to disguises:
+%D
+%D \startbuffer
+%D \textrule[boven]{fragments}
+%D \input reich
+%D \textrule
+%D \stopbuffer
+%D
+%D \bgroup \typebuffer \haalbuffer \egroup
+%D
+%D \startbuffer
+%D \setuptextrules
+%D [breedte=90pt,afstand=12pt,lijnkleur=blauw,
+%D korps=klein,letter=\sc,kleur=rood]
+%D
+%D \starttextrule{Ship Building Tools}
+%D \nl \steltolerantiein[soepel] \input materie
+%D \stoptextrule
+%D \stopbuffer
+%D
+%D \bgroup \typebuffer \haalbuffer \egroup
+%D
+%D \startbuffer
+%D \setuptextrules
+%D [plaats=inmarge,
+%D korps=klein,letter=schuinvet]
+%D
+%D \starttextrule{wonderful}
+%D \input tufte
+%D \stoptextrule
+%D \stopbuffer
+%D
+%D \bgroup \typebuffer \haalbuffer \egroup
+%D
+%D The formal definition of these commands is:
+%D
+%D \showsetup{\y!textrule}
+%D \showsetup{\y!starttextrule}
+%D \showsetup{\y!setuptextrules}
+%D
+%D The implementation looks a bit complicated due to the
+%D optional arguments.
+
+\def\setuptextrules%
+ {\dodoubleargument\getparameters[\??tl]}
+
+\def\complextextrule[#1]%
+ {\processaction
+ [#1]
+ [ \v!boven=>\let\next=\dotoptextrule,
+ \v!onder=>\let\next=\dobottomtextrule,
+ \s!default=>\let\next=\dobottomtextrule,
+ \s!unknown=>\let\next=\dobottomtextrule]%
+ \dosinglegroupempty\next}
+
+\definecomplexorsimple\textrule
+
+\def\simpletextrule%
+ {\dosinglegroupempty\dounknowntextrule}
+
+\def\docomplextextrule#1%
+ {\bgroup
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\leftskip
+ \setbox0=\hbox to \hsize
+ {\dimen4=.5ex
+ \dimen6=-.5ex
+ \advance\dimen4 by .5\linewidth
+ \advance\dimen6 by .5\linewidth
+ \dimen8=\@@tlafstand
+ \doifnothing{#1}{\firstargumentfalse}%
+ \iffirstargument
+ \doifelse{\@@tlplaats}{\v!inmarge}%
+ {\llap{\doattributes{\??tl}{#1}\hskip\linkermargeafstand}}
+ {\color[\@@tllijnkleur]
+ {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlbreedte}%
+ \hbox spread 2\dimen8{\hss\doattributes{\??tl}{\strut#1}\hss}}%
+ \fi
+ \color[\@@tllijnkleur]
+ {\leaders\hrule\!!height\dimen4\!!depth\dimen6\hfill}}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \noindent\box0
+ \egroup}
+
+\def\dobottomtextrule#1%
+ {\ifhmode
+ \endgraf
+ \fi
+ \dimen0=\dp\strutbox
+ \ifdim\prevdepth<\dp\strutbox
+ \ifdim\prevdepth>\!!zeropoint
+ \advance\dimen0 by -\prevdepth
+ \fi
+ \fi
+ \advance\dimen0 by .5ex
+ \vskip\dimen0
+ \@@tltussen
+ \doifelsenothing{#1}
+ {\bgroup
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\leftskip
+ \nointerlineskip
+ \moveleft-\leftskip\vbox
+ {\color[\@@tllijnkleur]
+ {\hrule\!!depth\linewidth\!!height\!!zeropoint\!!width\hsize}}%
+ \egroup}
+ {\docomplextextrule{#1}}%
+ \prevdepth\!!zeropoint % look at this
+ \@@tlna
+ \pagina[\v!voorkeur]}
+
+\def\dotoptextrule#1%
+ {\pagina[\v!voorkeur]
+ \witruimte
+ \@@tlvoor
+ \docomplextextrule{#1}%
+ \geenwitruimte
+ \@@tltussen
+ \endgraf}
+
+\def\dobottomtextrule#1%
+ {\ifhmode
+ \endgraf
+ \fi
+ \dimen0=\dp\strutbox
+ \ifdim\prevdepth<\dp\strutbox
+ \ifdim\prevdepth>\!!zeropoint
+ \advance\dimen0 by -\prevdepth
+ \fi
+ \fi
+ \advance\dimen0 by .5ex
+ \vskip\dimen0
+ \@@tltussen
+ \doifelsenothing{#1}
+ {\bgroup
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\leftskip
+ \nointerlineskip
+ \moveleft-\leftskip\vbox
+ {\color[\@@tllijnkleur]
+ {\hrule\!!depth\linewidth\!!height\!!zeropoint\!!width\hsize}}%
+ \egroup}
+ {\docomplextextrule{#1}}%
+ \prevdepth\!!zeropoint % look at this
+ \@@tlna
+ \pagina[\v!voorkeur]}
+
+\def\dounknowntextrule%
+ {\iffirstargument
+ \let\next=\dotoptextrule
+ \else
+ \def\next{\dobottomtextrule{}}%
+ \fi
+ \next}
+
+%D The grouped commands also supports corps switching:
+
+\def\starttextrule#1%
+ {\bgroup
+ \dotoptextrule{#1}
+ \switchtocorps[\@@tlkorps]}
+
+\def\stoptextrule%
+ {\dobottomtextrule{}%
+ \egroup}
+
+%D \macros
+%D {fillinrules, setupfillinrules}
+%D
+%D The next few commands do not really deserve a place in a
+%D core module, because they deal with specific typography.
+%D Nevertheless I decided to make them part of the core,
+%D because they permit us to make questionaires. Let's start
+%D with some examples.
+%D
+%D \fillinrules[n=2,breedte=passend]{first}
+%D \fillinrules[n=2,breedte=ruim]{first}
+%D \fillinrules[n=2,breedte=3cm]{first}
+%D \fillinrules[n=2,breedte=3cm,afstand=.5em,scheider=:]{first}
+%D \fillinrules[n=2]{first}{last}
+%D \fillintext{first}{last} \input reich \par
+%D
+%D The main command is \type{\fillinrules}. This command takes
+%D one and an optional second argument and sets a paragraph with
+%D empty visualized lines.
+%D
+%D \showsetup{\y!fillinrules}
+%D \showsetup{\y!setupfillinrules}
+
+\def\setupfillinrules%
+ {\dodoubleargument\getparameters[\??il]}
+
+\definecomplexorsimpleempty\fillinrules
+
+\def\complexfillinrules[#1]%
+ {\def\docomplexfillinrules##1##2%
+ {\dodocomplexfillinrules[#1]{##1}{##2}{\thinrules[n=\@@iln]}}%
+ \dodoublegroupempty\docomplexfillinrules}
+
+\def\dodocomplexfillinrules[#1]#2#3#4%
+ {\endgraf
+ \@@ilvoor
+ \begingroup
+ \setupfillinrules[#1]%
+ \noindent
+ \doifelse{\@@ilbreedte}{\v!passend}
+ {\let\@@ilafstand=\!!zeropoint
+ \setbox0=\hbox}
+ {\doifelse{\@@ilbreedte}{\v!ruim}
+ {\setbox0=\hbox}
+ {\setbox0=\hbox to \@@ilbreedte}}
+ \bgroup
+ \doattributes{\??il}{\strut#2\hfill\@@ilscheider}%
+ \hskip\@@ilafstand
+ \egroup
+ \hangindent=\wd0\relax
+ \parindent=\hangindent
+ \box0\relax
+ \stelwitruimtein[\v!groot]%
+ \ignorespaces
+ #4%
+ \doifsomething{#3}
+ {\doifnot{\@@ilbreedte}{\v!passend}
+ {\kern\@@ilafstand}
+ \doattributes{\??il}{#3\strut}}%
+ \endgroup
+ \endgraf
+ \@@ilna}
+
+%D \macros
+%D {fillintext}
+%D
+%D To provide compatible layouts when texts and lines are
+%D mixed, one can typeset a paragraph by using the command
+%D \type{\fillintext}.
+%D
+%D \showsetup{\y!fillintext}
+
+\definecomplexorsimpleempty\fillintext
+
+\def\complexfillintext[#1]%
+ {\def\docomplexfillintext##1##2%
+ {\dowithnextbox
+ {\dodocomplexfillinrules[#1]{##1}{\hfill##2}{\unhbox\nextbox\unskip}}%
+ \hbox\bgroup\let\par\egroup\ignorespaces}%
+ \dodoublegroupempty\docomplexfillintext}
+
+%D \macros
+%D {fillinline, setupfillinlines}
+%D
+%D Another member of the family takes care of putting a (often
+%D small) rule after a piece of text, like
+%D
+%D \startbuffer
+%D \fillinline \input reich \par
+%D \fillinline[marge=0cm] \input reich \par
+%D \stopbuffer
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D which was typeset by saying:
+%D
+%D \typebuffer
+%D
+%D The two commands that take care of this are:
+%D
+%D \showsetup{\y!fillinline}
+%D \showsetup{\y!setupfillinlines}
+
+\def\setupfillinlines%
+ {\dodoubleargument\getparameters[\??iv]}
+
+\definecomplexorsimpleempty\fillinline
+
+\def\complexfillinline[#1]%
+ {%\endgraf % interferes with \doordefinieren cum suis
+ \@@ivvoor
+ \begingroup
+ \setupfillinlines[#1]%
+ \advance\rightskip by \@@ivmarge
+ \parfillskip\!!zeropoint
+ \def\par%
+ {\unskip\hfill
+ \dimen0=\@@ivbreedte
+ \advance\dimen0 by -\@@ivafstand
+ \ifdim\dimen0>\@@ivmarge\else\expandafter\rlap\fi
+ {\kern\@@ivafstand
+ \vrule
+ \!!width\dimen0
+ \!!height.5\linewidth
+ \!!depth.5\linewidth}%
+ \endgraf % !
+ \endgroup
+ \endgraf % !
+ \@@ilna}}
+
+%D \stopdocumentation
+%D \bgroup
+%D
+%D \stelkadertekstenin
+%D [setuptext]
+%D [achtergrond=kleur,achtergrondkleur=wit]
+%D
+%D \startbuffer
+%D \stelachtergrondin
+%D [achtergrondoffset=4pt,
+%D achtergrond=raster,
+%D kader=aan,
+%D kaderkleur=rood,
+%D linkeroffset=2pt]
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D \startachtergrond
+%D
+%D \macros
+%D {setupbackground,startbackground,background}
+%D
+%D The section deals with backgrounds in the running text. This
+%D means that texts is to be collected and split over pages. To
+%D show what can be done, we provide this part of the
+%D documentation with some gray background and a red frame.
+%D Both the background and frame can have all characteristics
+%D of \type{\framed}. This time we used the setting:
+%D
+%D \typebuffer
+%D
+%D The implementation is not that sophisticated, but suffices.
+%D The main problem with this kind of functionality is to get
+%D the spacing all right.
+
+%D Specifying the background is more or less the same as
+%D specifying a framed box.
+%D
+%D \showsetup{\y!setupbackground}
+
+\presetlocalframed[\??ag]
+
+\def\dosetupbackground[#1]%
+ {\getparameters[\??ag][#1]%
+ \doifelse{\@@agstatus}{\v!start}
+ {\let\startbackground=\dostartbackground
+ \let\stopbackground =\dostopbackground
+ \let\background =\dobackground}
+ {\let\startbackground=\relax
+ \let\stopbackground =\relax
+ \let\background =\relax}}
+
+\def\setupbackground%
+ {\dosingleargument\dosetupbackground}
+
+%D Actually typesetting the background is implemented rather
+%D straightforward. We need to handle some spacing as well as
+%D the (often) a bit smaller horizontal size.
+%D
+%D \showsetup{\y!startbackground}
+%D
+%D Although we could have used a scratch one, we first
+%D declare a boolean.
+
+\newif\ifbackgroundsplit
+
+%D The \type{\vbox to \lineheight{}\vskip\!!zeropoint}
+%D construction gives the first real line a decent height by
+%D adding a dummy line.
+
+\def\dostartbackground%
+ {\bgroup
+ \setbox0=\vbox\bgroup
+ \vbox to \lineheight{}\vskip\!!zeropoint
+ \blanko[\v!blokkeer]
+ \advance\hsize by -\@@aglinkeroffset
+ \advance\hsize by -\@@agrechteroffset}
+
+%D This dummy line is removed by \type{\setbox2=\vsplit0 to
+%D \lineheight}. That way \type{\topskip} takes care of the
+%D lineheight. I'll probably forget to apply this trick
+%D elsewhere.
+%D
+%D {\em Beware: especially the bottom depth handling needs
+%D a more advanced implementation, consistent with main
+%D document features. Future versions therefore can break a
+%D bit different.}
+
+\def\dostopbackground%
+ {\endgraf
+ \removelastskip
+ \egroup
+ \everypar{}
+ \splitmaxdepth=\boxmaxdepth
+ \splittopskip=\topskip
+ \setbox2=\vsplit0 to \lineheight
+ \loop
+ \ifdim\prevdepth<\dp\strutbox
+ \dimen8=\dp\strutbox
+ \else
+ \dimen8=\prevdepth
+ \fi
+ %\advance\dimen0 by \topskip
+ %\advance\dimen0 by -\baselineskip
+ \ifdim\pagegoal=\maxdimen
+ \dimen0=\teksthoogte
+ \advance\dimen0 by \topskip
+ \advance\dimen0 by -\baselineskip
+ \advance\dimen0 by -\dp\strutbox
+ \else
+ \dimen0=\pagegoal
+ \advance\dimen0 by -\dimen8
+ \advance\dimen0 by -\parskip
+ \fi
+ \advance\dimen0 by -\pagetotal
+ \advance\dimen0 by -\@@agbovenoffset
+ \advance\dimen0 by -\@@agonderoffset
+ \ifdim\dimen0>2\lineheight
+ \ifdim\ht0>\dimen0
+ \setbox2=\vsplit0 to \dimen0
+ \backgroundsplittrue
+ \else
+ \setbox2=\box0
+ \backgroundsplitfalse
+ \fi
+ \else
+ \setbox2=\box0
+ \backgroundsplitfalse
+ \fi
+ \setbox2=\vbox \ifbackgroundsplit to \dimen0 \fi
+ {\vskip\@@agbovenoffset
+ \dimen0=\dp\strutbox
+ \advance\dimen0 by -\dp0
+ \popsplitcolor
+ \ifbackgroundsplit\unvbox\else\box\fi2
+ \ifdim\dimen0>\!!zeropoint
+ \vskip\dimen0
+ \fi
+ \vskip\@@agonderoffset
+ \vss}
+ \vskip\dimen8 % looks better
+ \witruimte
+ \ifbackgroundsplit\ifdim\pagegoal<\maxdimen
+ \pagegoal=1.1\pagegoal % be a bit more tolerant
+ \fi\fi
+ \localframed[\??ag][\c!offset=\v!overlay]
+ {\hskip\@@aglinkeroffset\box2\hskip\@@agrechteroffset}%
+ \ifbackgroundsplit
+ \pagina
+ \fi
+ \ifdim\ht0>\!!zeropoint \repeat
+ \egroup}
+
+%D As a bonus we also have a short command, that is of not
+%D much use, but kept there for historic reasons.
+%D
+%D \showsetup{\y!background}
+
+\def\dobackground%
+ {\bgroup
+ \dowithnextbox
+ {\localframed
+ [\??ag][\c!offset=\v!overlay]
+ {\box\nextbox}%
+ \egroup}
+ \vbox}
+
+%D \stopdocumentation
+%D \stopachtergrond
+%D \egroup
+
+% \setuprules
+% [\c!dikte=\v!middel]
+
+\setuplinewidth
+ [\v!middel]
+
+\setupframed
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!ruim,
+ \c!offset=0.25ex,
+ \c!dummy=\v!nee,
+ \c!kader=\v!aan,
+ \c!bovenkader=,
+ \c!onderkader=,
+ \c!linkerkader=,
+ \c!rechterkader=,
+ \c!straal=.5\corpssize,
+ \c!lijndikte=\linewidth,
+ \c!hoek=\v!recht,
+ \c!diepte=\!!zeropoint,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=,
+ \c!achtergrondoffset=\!!zeropoint,
+ \c!kaderkleur=,
+ \c!kaderoffset=\!!zeropoint,
+ \c!uitlijnen=,
+ \c!onder=\vss,
+ \c!boven=,
+ \c!strut=\v!ja,
+ \c!plaats=\v!normaal]
+
+\setupscreens
+ [\c!factor=1.0,
+ \c!methode=\v!extern, % \c!methode=\v!punt
+ \c!raster=0.95]
+
+\setupblackrules
+ [\c!n=1,
+ \c!breedte=1em,
+ \c!hoogte=1ex,
+ \c!diepte=\!!zeropoint,
+ \c!variant=\c!a,
+ \c!afstand=.25ex]
+
+\setupmarginrules
+ [\c!niveau=0,
+ \c!dikte=\@@kadefaultwidth\linewidth]
+
+\setupthinrules
+ [\c!afstand=\v!klein,
+ \c!n=3,
+ \c!hoogte=.5\linewidth,
+ \c!diepte=\@@dlhoogte,
+ \c!voor=,
+ \c!na=]
+
+\setuptextrules
+ [\c!plaats=\v!links,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!tussen=,
+ \c!breedte=2em,
+ \c!letter=\v!vet,
+ \c!kleur=,
+ \c!lijnkleur=,
+ \c!korps=,
+ \c!afstand=.5em]
+
+\setupfillinrules
+ [\c!breedte=\v!ruim,
+ \c!afstand=1em,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!n=1,
+ \c!scheider=,
+ \c!letter=\v!normaal,
+ \c!kleur=]
+
+\setupfillinlines
+ [\c!breedte=3cm,
+ \c!marge=\@@ivbreedte,
+ \c!afstand=1em,
+ \c!voor=\blanko,
+ \c!na=\blanko]
+
+\setupbackground
+ [\c!linkeroffset=.5\corpssize,
+ \c!rechteroffset=\@@aglinkeroffset,
+ \c!bovenoffset=\!!zeropoint,
+ \c!onderoffset=\@@agbovenoffset,
+ \c!status=\v!start,
+ \c!straal=.5\corpssize,
+ \c!hoek=\v!recht,
+ \c!kader=\v!uit,
+ \c!diepte=\!!zeropoint,
+ \c!achtergrond=\v!raster,
+ \c!kleur=,
+ \c!achtergrondkleur=\@@agkleur,
+ \c!raster=\@@rsraster]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex new file mode 100644 index 000000000..8558044ac --- /dev/null +++ b/tex/context/base/core-tab.tex @@ -0,0 +1,2037 @@ +%D \module
+%D [ file=core-tab,
+%D version=1997.10.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=\TABLE\ Embedding,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% e-tex: reverse rows or vadjust or ... in tables
+% \ifalign
+% \xhrule : calls for 'special' with width
+
+% melden als in kleur conflict, uitgestelde test op \SR\SR
+
+% verengelsen
+% interface
+
+% footnotes flushen
+% \......TABLE........ namen
+% kolommen testen
+% unbreakable kop definieren
+% voetnoten
+% meldingen
+% als direct \use{max} dan fout
+% \BREAKPOINT
+% breedte lijn telt
+% errors: ook gray in handle
+
+% \AR -> als in DL dan \DR
+
+% nieuw:
+%
+% \NL / \NL[blanko] is skip, nog default?
+% geen \HL in a row
+% \HL[n]
+% \VL[n] + remembers
+% c{colorspec} key
+% \HC[color[width]
+% \VC[color]
+% meldingen row, column, use, advise
+% \AR: UITSTELLEN / EXPERIMENTEEL
+
+
+% WAARDELOZE ERROR HANDLER
+
+% THIS RENEWED MODULE WORKS OK BUT STILL LOOKS BAD
+
+\writestatus{loading}{Context Core Macros / TaBlE Embedding}
+
+%D We felt no need to write our own table building macros,
+%D simply because Michael Wichura made a terrific one. This
+%D package is quite complete and well documented. In \CONTEXT\
+%D we provide a shell for consistent spacing as well as color
+%D support. Implementing these features without adapting the
+%D original macros is not trivial. One easilly gets conflicts
+%D with \type{\omit}, \type{\span} and \type{\noalign}, which
+%D means that we end up postponing and overloading macros,
+%D mostly global. Now, let's start with loading the main
+%D macros:
+
+\doifundefined{BeginTable}{\doinputonce{table.tex}}
+
+\unprotect
+
+%D \macros
+%D {inintable, ifsplittable}
+%D
+%D First we declare some variables. These show a bit what we
+%D are dealing with. First we introdoce some booleans that
+%D enable us, inside as well as outside this module, to
+%D determine in what mode we are.
+
+\newif\ifintable
+\newif\ifsplittables
+
+%D \macros
+%D {iftracetable}
+%D
+%D When I documented this module, I felt the need for tracing
+%D options. After implementing this feature, I also added
+%D warnings, error recovery and automatic spacing.
+
+\newif\iftracetables
+
+%D We show this feature in an eample that also shows some of
+%D the basic table typesetting commands.
+%D
+%D \startbuffer
+%D \starttabel[|||]
+%D \HL
+%D \VL first \VL second \VL\AR
+%D \HL
+%D \VL alfa \VL 1 \VL\AR
+%D \VL beta \VL 2 \VL\AR
+%D \VL gamma \VL 3 \VL\AR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \startcombinatie[2]
+%D {\tracetablesfalse\haalbuffer} {\type{\tracetablesfalse}}
+%D {\tracetablestrue\haalbuffer} {\type{\tracetablestrue}}
+%D \stopcombinatie
+%D
+%D This table is specified as:
+%D
+%D \typebuffer
+%D
+%D This examples shows about the minimum of commands needed to
+%D typeset such a table. In this table, the \type {\AR} is
+%D automatically translated into the more primitive (but more
+%D verbose) commands \type {\SR}, \type {\FR}, \type {\MR} and
+%D \type {\LR} commands.
+%D
+%D \startbuffer
+%D \starttabellen[|||]
+%D \HL
+%D \VL first \VL second \VL\AR
+%D \HL
+%D \VL alfa \VL 1 \VL\AR
+%D \VL beta \VL 2 \VL\AR
+%D \VL gamma \VL 3 \VL\AR
+%D \HL
+%D \stoptabellen
+%D \stopbuffer
+%D
+%D When we use the split table feature, we get a bit more
+%D information.
+%D
+%D {\tracetablesfalse\haalbuffer}
+%D
+%D Sometimes in tables information shows up that is not typed
+%D in by the user. These messages give a cue in what aspect a
+%D table definition is wrong.
+%D
+%D \startbuffer
+%D \starttabel[||||]
+%D \HL
+%D \VL first second \VL third \VL\AR
+%D \HL
+%D \VL alfa \VL 1 \VL a \VL\AR
+%D \VL beta \VL 2 \VL b \VL
+%D \VL gamma \VL \THREE{3} c \VL\AR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Those terrible table has three errors, which all show up in
+%D typeset messages. Errors cannot always recovered 100\% and
+%D therefore can result in two or more succesive messages, like
+%D in the last row.
+%D
+%D \haalbuffer
+
+%D Bringing color into tables is complicated by the mere fact
+%D that color is not part of \TEX. The main complication is
+%D that we don't know in advance how wide a column will be. I
+%D implemented color support in tables in the early 90's
+%D because I needed it for some articles on color. I have to
+%D admit that I seldom use the mechanism.
+%D
+%D Most color support in \CONTEXT\ makes use of colored rules.
+%D At first sight, one is tempted to implement colors in tables
+%D in a similar way, but as said, we don't know the dimensions
+%D in advance. It turns out however that we don't have to,
+%D simply because alignments take care of stretching rules to
+%D the appropritate dimensions. This means that we can provide
+%D backgrounds by coloring rules with the height of a row,
+%D skipping upwards and finally drawing the content, like in:
+%D
+%D \gdef\ShowExample%
+%D {\startfiguurtekst
+%D {geen}
+%D {\haalbuffer}
+%D \typebuffer
+%D \stopfiguurtekst}
+%D
+%D \startbuffer
+%D \starttabel[|c|c|]
+%D \HL
+%D \BL[2] \SR
+%D \VL test \VL test \VL\SR
+%D \HL
+%D \VL test \VL test \VL\FR
+%D \VL test \VL test \VL\MR
+%D \VL test \VL test \VL\LR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D Just to be complete we show how the other columns can be
+%D given a background. Later we will provide more details over
+%D the commands used.
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \BL[3] \SR
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \BC \BL[2] \SR
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \BC \BC \BL \SR
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \BC \BL \SR
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \BL \BL \SR
+%D \HL
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+
+%D In these examples we can clearly see that for being a real
+%D background, the color or gray specification has to precede
+%D the content. Just to keep things simple, we can recall this
+%D specification later on:
+%D
+%D \startbuffer
+%D \starttabel[|c|c|c|]
+%D \BC \BL \SR
+%D \HL
+%D \VL test \VL test \VL test \VL\SR
+%D \HL
+%D \BR\FR
+%D \VL test \VL test \VL test \VL\FR
+%D \BR\MR
+%D \VL test \VL test \VL test \VL\MR
+%D \BR\LR
+%D \VL test \VL test \VL test \VL\LR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D Close study learns that we can put the specification
+%D before or after the \type{\HL}, whatever suits best. Keeping
+%D track of these specifications is taken care of by the next
+%D variables:
+
+\newif \ifTABLEgrayline % executing gray line
+\newif \ifTABLEgraydone % gray line executed
+\newtoks \TABLEgraytoks % gray line specification
+
+%D A third major extension, besides spacing and color support,
+%D concerns splitting tables over pages. We don't give
+%D examples here, because its a waste of space.
+
+\newdimen\TABLEheight % These can be \newskimens
+\newdimen\TABLEmaxheight % given a few \relax's when
+\newdimen\TABLEheadheight % testing them with \ifdim.
+\newdimen\TABLEtailheight
+\newdimen\TABLEcaptionheight
+
+\newif\ifTABLEinbreak
+
+%D Nog vervangen:
+
+\def\c!Table {Table}
+
+%D We alraady saw that the table macros report errors and
+%D provide automatic spacing. These features can only be
+%D implemented by keeping track of the state, often the last
+%D command on a row.
+
+\chardef\TABLEunknown = 0
+
+\chardef\TABLEseparaterow = 1
+\chardef\TABLEfirstrow = 2
+\chardef\TABLEmidrow = 3
+\chardef\TABLElastrow = 4
+\chardef\TABLErule = 5
+\chardef\TABLEskip = 6
+\chardef\TABLEautorow = 7
+
+\chardef\TABLEforcefirstrow = 1
+\chardef\TABLEforcelastrow = 2
+
+\chardef\TABLEmissingrow = 1
+\chardef\TABLEmissingcolumn = 2
+\chardef\TABLEspanoverflow = 3
+\chardef\TABLEdivisionoverflow = 4
+
+%D We store these states using efficient \type {\chardef}'s.
+%D Like most variables, these are global ones. When needed,
+%D especially when we flush the backgrounds, we can temporary
+%D disable the assignment.
+
+\newif\ifsetTABLEaction
+
+\def\setTABLEaction#1%
+ {\ifsetTABLEaction\global\chardef\TABLEaction#1\fi}
+
+\def\setTABLEforce#1%
+ {\ifsetTABLEaction\global\chardef\TABLEforce#1\fi}
+
+\def\setTABLEerror#1%
+ {\global\chardef\TABLEerror#1}
+
+%D Before we come to using these variables, we redefine and/or
+%D adapt some \TABLE\ macros. Within \TABLE's the \type{|} and
+%D \type{"} have special meanings in templates and are active
+%D during. Their meaning can therefore conflict with those
+%D elsewhere defined. To be compatible with traditional \TABLE\
+%D as well as \CONTEXT's \type{||} and the active \type{"}
+%D extensions for my german friends, we do some catcode magic.
+
+\newif\ifForgetTableBarAndQuote \ForgetTableBarAndQuotetrue
+
+\bgroup
+\catcode`\|=\@@active
+\catcode`\"=\@@active
+\gdef\pushouterbarandquote%
+ {\ifForgetTableBarAndQuote
+ \ifnum\catcode`\|=\@@active \else
+ \catcode`\|=\@@active
+ \def|{\ifmmode\vert\else\char`\|\fi}%
+ \fi
+ \let\outertablebar=|%
+ \ifnum\catcode`\"=\@@active \else
+ \catcode`\"=\@@active
+ \def"{\char`\"}%
+ \fi
+ \let\outertablequote="%
+ \fi}
+\gdef\popouterbarandquote%
+ {\ifForgetTableBarAndQuote
+ \let|=\outertablebar
+ \let"=\outertablequote
+ \else
+ \redefinetablebarandquote
+ \fi}
+\gdef\ObeyTableBarAndQuote%
+ {\ForgetTableBarAndQuotefalse
+ \ifintable
+ \redefinetablebarandquote
+ \fi}
+\egroup
+
+%D \macros
+%D {ObeyTableBarAndQuote}
+%D
+%D As said, the \type{|} and \type{"} active characters are
+%D often used for other purposes. By default, the outside
+%D meanings are therefore preserved and available inside
+%D tables. If for some reason one wants to use the \TABLE\
+%D primitives, one can say:
+%D
+%D \starttypen
+%D \ObeyTableBarAndQuote
+%D \stoptypen
+%D
+%D To keep things verbose, as well as to show what \TABLE\
+%D commands we affect, we show some meanings.
+
+\def\normalTABLEshortrule {\!ttShortHrule} % \-
+\def\normalTABLElongrule {\!ttLongHrule} % \=
+\def\normalTABLEfullrule {\!ttFullHrule} % \_
+\def\normalTABLEendofrow {\!ttEndOfRow} % \\
+\def\normalTABLEsimplebar {\unskip\!ttRightGlue&&} % |
+\def\normalTABLEcomplexbar {\unskip\!ttRightGlue&\omit\!ttAlternateVrule} % \|
+\def\normalTABLEquote {\unskip\!ttRightGlue&\omit&} % "
+\def\normalTABLElineformat {\normalTABLEendofrow+}
+\def\normalTABLElineending {\normalTABLEendofrow0 }
+\def\normalTABLEsinglerule {&\normalTABLElongrule&}
+\def\normalTABLEmultirule#1{&\use{#1}\normalTABLElongrule&}
+
+%D To give an impression of what the (well documented) source
+%D of \TABLE\ looks like, we first implement an alternative for
+%D the numeric keys. The quantity keys (\type{q} and \type{Q})
+%D support the more european way of writing numbers:
+%D
+%D \startsmaller
+%D 100.000.000,00 instead of 100,000,000.00
+%D \stopsmaller
+%D
+%D The next table shows how to use these keys. We use braces
+%D instead of brackets because we need brackets to specify the
+%D format.
+%D
+%D \startbuffer
+%D \starttabel{|q[00,000]|Q[00,00]|}
+%D \HL
+%D \VL -1,2 \VL 12,35 \VL\FR
+%D \VL 11,203 \VL 2,4 \VL\LR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+%D
+%D Although a more efficient implementation is possible |<|we
+%D can for instance share common macros|>| we just adapt a copy
+%D of the numeric ones. To permit double loading of this
+%D module, we check for the existence of one of the macros.
+
+\letvalue{!tk<\string q>}=\undefined
+\letvalue{!tk<\string Q>}=\undefined
+
+%D We just copy the original {\em comments}.
+%D
+%D \em Key \type{q}: quantity item, non||math mode.
+
+\NewFormatKey q%
+ {\def\!tqStyle{}%
+ \futurelet\!tnext\!tqTestForBracket}
+
+%D \em Key \type{Q}: quantity item, math mode.
+
+\NewFormatKey Q%
+ {\def\!tqStyle{$}%
+ \futurelet\!tnext\!tqTestForBracket}
+
+%D \em Note: the space between a quantity entry and the
+%D following \type{|}, \type{"}, or \type{\|} is mandatory.
+%D empty quantity entries are not allowed: use \type{{}} or
+%D \type{\omit} instead.
+%D
+%D \em Test for bracket: invoked by the keys \type{q} and
+%D \type{Q}.
+
+\def\!tqTestForBracket%
+ {\ifx[\!tnext
+ \!thx\!tqGetArgument
+ \else
+ \!thx\!tqGetCode
+ \fi}
+
+%D \em Get code: e.g. \type{4}, or \type{4,0}, \type{0,4}, or
+%D \type{10,2}.
+
+\def\!tqGetCode#1 % note the blank
+ {\!tqConvertCode #1,,!}
+
+%D \em Convert code: e.g. converts above to \type{[0000]},
+%D \type{[0000,]}, \type{[,0000]}, \type{[0000000000,00]}.
+
+\def\!tqConvertCode #1,#2,#3!%
+ {\begingroup
+ \aftergroup\edef
+ \aftergroup\!ttemp
+ \aftergroup{%
+ \aftergroup[%
+ \!taCountA #1
+ \!thLoop
+ \ifnum \!taCountA>0
+ \advance\!taCountA -1
+ \aftergroup0
+ \repeat
+ \def\!ttemp{#3}%
+ \ifx\!ttemp\empty
+ \else
+ \aftergroup,
+ \!taCountA #2
+ \!thLoop
+ \ifnum\!taCountA>0
+ \advance\!taCountA -1
+ \aftergroup0
+ \repeat
+ \fi
+ \aftergroup]\aftergroup}%
+ \endgroup\relax
+ \!thx\!tqGetArgument\!ttemp}
+
+%D \em Get argument:
+%D
+%D \starttypen
+%D <sample left field> <optional, sample right field>
+%D \stoptypen
+
+\def\!tqGetArgument[#1]%
+ {\!tqMakeQuantityTemplate\!tqStyle#1,,!}
+
+%D \em Make quantity template.
+
+\def\!tqMakeQuantityTemplate#1#2,#3,#4!% #1=<empty> or $
+ {\def\!ttemp{#4}%
+ \ifx\!ttemp\empty
+ \!taDimenC=0pt
+ \else
+ \setbox0=\hbox{\m@th #1,#3#1}%
+ \!taDimenC=\wd0
+ \fi
+ \setbox0=\hbox{\m@th #1#2#1}%
+ \!thToksEdef\!taDataColumnTemplate=
+ {\noexpand\!tqSetQuantityItem{\the\wd0 }{\the\!taDimenC}{#1}%
+ \the\!taDataColumnTemplate}%
+ \ReadFormatKeys}
+
+%D \em Set numeric item.
+
+\def\!tqSetQuantityItem #1#2#3#4 %
+ {\!tqSetQuantityItemA{#1}{#2}{#3}#4,,!}
+
+\def\!tqSetQuantityItemA #1#2#3#4,#5,#6!%
+ {\def\!ttemp%
+ {#6}%
+ \hbox to #1
+ {\hss\m@th#3#4#3}%
+ \hbox to #2
+ {\ifx\!ttemp\empty
+ \else
+ \m@th#3,#5#3%
+ \fi
+ \hss}}
+
+%D Here ends the Q||extension. Did you watch the clever use
+%D of aftergroup in \type{\!tqConvertCode}.
+
+% %D We also (have to) define a key for \type{\kap}:
+%
+% \letvalue{!tk<\string K>}=\undefined
+%
+% \NewFormatKey K%
+% {\ReadFormatKeys b\kap}
+
+%D A few pages back we saw backgrounds, further on we will see
+%D colored rules, and here we provide a means to color the
+%D entries in a column. (We can of course always use the normal
+%D color commands for individual entries.) We could not use the
+%D lowercase~\type{c}, because that one is used to force {\em
+%D centering}.
+%D
+%D \startbuffer
+%D \starttabel[|C{red}|C{green}|C{blue}|]
+%D \VL R(ed) \VL G(reen) \VL B(lue) \VL\SR
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \ShowExample
+
+\letvalue{!tk<\string C>}=\undefined
+
+\NewFormatKey C#1%
+ {\ReadFormatKeys b{\localstartcolor[#1]} a{\localstopcolor}}
+
+%D So now we have three new keys:
+%D
+%D \starttabel[|||]
+%D \HL
+%D \NC \bf key \NC \bf meaning \NC\AR
+%D \HL
+%D \NC Q[x,y] \NC math mode formatted numbers \NC\AR
+%D \NC q[x,y] \NC text mode formatted numbers \NC\AR
+%D \NC C{identifier} \NC column entry color \NC\AR
+%D \HL
+%D \stoptabel
+
+%D Later on, we're going to implement multiple page table
+%D support, therefore the next \TABLE\ macro needs to be
+%D slightly adapted, i.c. the penalty is removed.
+
+\def\!ttFullHruleA%
+ {\!ttGetHalfRuleThickness
+ \hrule\!thHeight\dimen0\!thDepth\dimen0
+ %\penalty0
+ \egroup}
+
+%D We'll see that when we want to give a vertical rule a color,
+%D we have to set and reset states. After heavy testing it
+%D proved most useful to extend a \TABLE\ primitive with some
+%D hooks. One thing to keep in mind is that \type{&} keeps
+%D assignments local.
+
+\let\TABLEbeforebar=\empty
+\let\TABLEafterbar =\empty
+
+\def\!ttInsertVrule%
+ {\hfil
+ \TABLEbeforebar % added
+ \vrule \!thWidth
+ \ifnum\!tgCode=1
+ \ifx\!tgValue\empty
+ \LineThicknessFactor
+ \else
+ \!tgValue
+ \fi
+ \LineThicknessUnit
+ \else
+ \!tgValue
+ \fi
+ \TABLEafterbar % added
+ \hfil
+ &}
+
+%D We already shows the next one, but here we slightly adapt
+%D the macro by adding an \type{\expandafter}. The space after
+%D \type{#1} is crucial!
+
+\def\normalTABLEcomplexbar#1%
+ {\unskip\!ttRightGlue&\omit\expandafter\!ttAlternateVrule#1 }
+
+%D To get rid of interfering \type{\omit}'s when we are
+%D checking the number of columns and reporting problems. The
+%D extensions concern the second level check, the first
+%D subbranch and advancing the column.
+
+\def\!ttuse#1%
+ {\ifnum#1>\@ne
+ \omit
+ \scratchcounter=\currentTABLEcolumn % added
+ \advance\scratchcounter by #1 % added
+ \advance\scratchcounter by -1 % added
+ \ifnum\scratchcounter>\maxTABLEcolumn % added
+ \def\next% % added
+ {\setTABLEerror\TABLEspanoverflow % added
+ \handleTABLEerror}% % added
+ \else % added
+ \def\next% % added
+ {\global\advance\currentTABLEcolumn by #1 % added
+ \global\advance\currentTABLEcolumn by -1 % added
+ \mscount=#1 % \mscount is in Plain
+ \advance\mscount by \m@ne
+ \advance\mscount by \mscount
+ \!thLoop
+ \ifnum\mscount>\@ne
+ \sp@n % from Plain (\span\omit \advance\mscount\m@ne)
+ \repeat
+ \span}%
+ \fi % added
+ \else % added
+ \def\next% conflicts with possible next \omit % added
+ {\global\advance\currentTABLEcolumn by 1 }% % added
+ \fi
+ \next} % added
+
+%D All commands that are executed between rows are to be put in
+%D \type {\noalign}. We can however not verify if we (that is
+%D \TABLE) does or did not enter this mode. A moderate dirty
+%D but useful trick is using our own alternative:\voetnoot{Once
+%D one has entered the stage of redefining \TEX\ primitives,
+%D such hacks become a second nature. However, redefining \type
+%D {\omit} and \type{\span} is not that easy.}
+
+\def\TABLEnoalign%
+ {\noalign\bgroup\let\noalign=\relax\let\next=}
+
+%D \macros
+%D {starttable}
+%D
+%D The rest of this module is not easy to comprehend, mainly
+%D because we have to take care of:
+%D
+%D \startopsomming[opelkaar]
+%D \som \type{\startopsomming[template]}
+%D \som \type{\startopsomming{template}}
+%D \som \type{\startopsomming[predefined]}
+%D \stopopsomming
+%D
+%D as well as:
+%D
+%D \startopsomming[verder]
+%D \som restart after table break
+%D \stopopsomming
+%D
+%D The official specification of the start command is:
+%D
+%D \showsetup{\y!starttabel}
+
+\def\starttabel%
+ {\bgroup
+ \ifinsidefloat\else
+ \startbaselinecorrection
+ \fi
+ \postponefootnotes
+ \firststagestartTABLE}
+
+\def\stoptabel%
+ {\finishTABLE
+ \ifinsidefloat\else
+ \stopbaselinecorrection
+ \goodbreak % compensates all the nobreaks
+ \fi
+ \egroup}
+
+%D Before we can grab the argument, we have to make sure that
+%D the \CATCODES\ are set. The first stage takes care of that.
+
+\def\firststagestartTABLE%
+ {\bgroup % kan-ie weg?
+ \global\intabletrue
+ \pushouterbarandquote
+ \catcode`\|=\@@other
+ \complexorsimple{secondstagestartTABLE}}
+
+\def\simplesecondstagestartTABLE#1%
+ {\complexsecondstagestartTABLE[{#1}]}
+
+%D \macros
+%D {definetabletemplate}
+%D
+%D The complex (and main) start macro first takes care of the
+%D predefined case. Such a predefined setup looks like:
+%D
+%D \starttypen
+%D \definetabletemplate[test][|||]
+%D
+%D \starttabel[test]
+%D \VL test \VL test \VL\AR
+%D \VL test \VL test \VL\AR
+%D \VL test \VL test \VL\AR
+%D \stoptabel
+%D \stoptypen
+%D
+%D The implementation of the definition macro is not that
+%D complicated:
+
+\def\dodefinetabletemplate[#1][#2]%
+ {\setgvalue{\c!Table#1}{\complexsecondstagestartTABLE[#2]}%
+ \egroup}
+
+\def\definetabletemplate%
+ {\bgroup
+ \catcode`\|=\@@other
+ \dodoubleargument\dodefinetabletemplate}
+
+%D Templates defined this way get protected names, that cannot
+%D conflict with existing commands.
+%D
+%D \showsetup{\y!definetabletemplate}
+%D
+%D The second half of the next macro prepares table
+%D splitting.
+
+\def\complexsecondstagestartTABLE#1[#2]%
+ {\convertargument|\to\asciiA
+ \convertargument#2\to\asciiB
+ \doifinstringelse{\asciiA}{\asciiB}
+ {\gdef\restartTABLE{\thirdstagestartTABLE{#2}}}
+ {\doifdefinedelse{\c!Table#2}
+ {\gdef\restartTABLE{\getvalue{\c!Table#2}}}
+ {\gdef\restartTABLE{\getvalue{#2}}}}%
+ \prepareTABLEsplitting
+ \restartTABLE
+ \TABLEhead}
+
+%D The third stage involves a lot of (re)sets, which we will
+%D explain later.
+
+\def\thirdstagestartTABLE#1%
+ {\global\setTABLEactiontrue
+ \setTABLEaction\TABLEunknown
+ \setTABLEforce\TABLEunknown
+ \setTABLEerror\TABLEunknown
+ \global\let\TABLEgrayline=\empty
+ \global\let\nextTABLEgrayline=\empty
+ \global\TABLEgraylinefalse
+ \global\TABLEgraydonefalse
+ \global\let\TABLEgraylineerror =\empty
+ \global\let\TABLEgraylinestatus=\empty
+ \resetVLvalues
+ \appendtoks\popouterbarandquote\to\EveryTable
+ \appendtoks\localTABLEsetup\to\EveryTable
+ \BeginTable[\ifsplittables u\else b\fi]%
+ \defineTABLEunits
+ \defineTABLEsteps
+ \defineTABLErules
+ \defineTABLEdivisions
+ \defineTABLEshorthands
+ \defineTABLEbackgrounds
+ \defineTABLEendings
+ \doifsomething{#1}
+ {\def\TABLEformat{#1}%
+ \expandafter\getTABLEnofcolumns\expandafter{\TABLEformat}%
+ \expandafter\BeginFormat\TABLEformat\EndFormat}}
+
+\def\finishTABLE%
+ {\chuckTABLEautorow
+ \unskip\crcr
+ \EndTable
+ \global\intablefalse
+ \egroup}
+
+%D The preparation for split columns concerns some
+%D calculations. Although not explicitly needed, one can
+%D predefine a tablehead as well as a tail. Each table fragment
+%D is preceded by such a head and ends with a tail. This means
+%D that, in order to determine the available heigth, we have to
+%D take the head and tail into account. Because we want to
+%D support captions too, we will also reserve some space for
+%D those later on.
+
+\def\prepareTABLEsplitting%
+ {\global\TABLEheight=\!!zeropoint
+ \ifsplittables
+ \ifx\TABLEhead\empty
+ \global\TABLEheadheight=\!!zeropoint
+ \else
+ \setbox0=\vbox
+ \bgroup
+ \def\doEndOfTableLine##1##2##3{\normalTABLElineformat##2##3}%
+ \restartTABLE\TABLEhead
+ \finishTABLE
+ \global\TABLEheadheight=\ht0
+ \fi
+ \ifx\TABLEtail\empty
+ \global\TABLEtailheight=\!!zeropoint
+ \else
+ \setbox0=\vbox
+ \bgroup
+ \def\doEndOfTableLine##1##2##3{\normalTABLElineformat##2##3}%
+ \restartTABLE\TABLEtail
+ \finishTABLE
+ \global\TABLEtailheight=\ht0
+ \fi
+ \else
+ \global\TABLEheadheight=\!!zeropoint
+ \global\TABLEtailheight=\!!zeropoint
+ \fi
+ \global\TABLEheight=\!!zeropoint
+ \calculatemaxTABLEheight\docalculatemaxTABLEheight}
+
+%D \macros
+%D {starttables}
+%D
+%D Split tables are specified using the plural form of the
+%D start and stop commands.
+%D
+%D \showsetup{starttables}
+%D
+%D For example:
+%D
+%D \starttypen
+%D \starttabellen[|||]
+%D \HL
+%D \VL element \VL atom weight \VL\AR
+%D \HL
+%D \VL ....... \VL ........... \VL\AR
+%D \VL ....... \VL ........... \VL\AR
+%D \HL
+%D \stoptabellen
+%D \stoptypen
+
+\def\starttabellen%
+ {\bgroup
+ \ifinsidefloat\else
+ \baselinecorrection
+ \flushfootnotes
+ \topbaselinecorrection
+ \fi
+ \forgetall
+ \global\let\absmaxTABLEheight=\!!zeropoint
+ \splittablestrue
+ \global\TABLEinbreakfalse
+ \firststagestartTABLE}
+
+\def\stoptabellen%
+ {\TABLEtail
+ \finishTABLE
+ \ifinsidefloat\else
+ \flushfootnotes
+ \botbaselinecorrection
+ \fi
+ \egroup}
+
+%D When the table in the previous example is split across
+%D pages, only the first gets a head. We could have said
+%D something like:
+%D
+%D \starttypen
+%D \starttabelkop
+%D \HL
+%D \VL element \VL atom weight \VL\AR
+%D \HL
+%D \stoptabelkop
+%D
+%D \starttabelstaart
+%D \HL
+%D \stoptabelstaart
+%D
+%D \starttabellen[|||]
+%D \VL ....... \VL ........... \VL\AR
+%D \VL ....... \VL ........... \VL\AR
+%D \stoptabellen
+%D \stoptypen
+%D
+%D This time each split table gets a head line and ends with
+%D a rule. Keep in mind that such heads also apply to the
+%D unbroken ones and should be defined local (grouped) if
+%D needed. The rather complicated definition below is due to
+%D the fact that the stopcondition is interface language
+%D dependant.
+
+\let\TABLEhead =\empty
+\let\TABLEtail=\empty
+
+\letvalue{\e!start \e!tabelkop}=\undefined
+\letvalue{\e!stop \e!tabelkop}=\undefined
+\letvalue{\e!start\e!tabelstaart}=\undefined
+\letvalue{\e!stop \e!tabelstaart}=\undefined
+
+\expanded
+ {\def\csname\e!start\e!tabelkop\endcsname##1\csname\e!stop\e!tabelkop\endcsname%
+ {\noexpand\def\noexpand\TABLEhead{##1}}}
+
+\expanded
+ {\def\csname\e!start\e!tabelstaart\endcsname##1\csname\e!stop\e!tabelstaart\endcsname%
+ {\noexpand\def\noexpand\TABLEtail{##1}}}
+
+%D Redudant \type{\HL}'s are removed automatically, so
+%D mid||lines can be used without problems.
+
+%D When calculating the available height of a split table, we
+%D try to handle multi||column mode as good as possible. This
+%D algoritm evolved during the development of the split option
+%D and will probably be improved bit by bit.
+
+\def\docalculatemaxTABLEheight%
+ {\ifbinnenkolommen
+ \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\%
+ \else
+ \ifdim\pagegoal<\maxdimen
+ \dimen0=\pagetotal
+ \dimen2=\pagegoal
+ \else
+ \dimen0=\!!zeropoint
+ \dimen2=\teksthoogte
+ \fi
+ \fi
+ \advance\dimen2 by -\dimen0
+ \global\TABLEmaxheight=\dimen2
+ \ifdim\prevdepth<\maxdimen\ifdim\prevdepth>\!!zeropoint
+ \global\advance\TABLEmaxheight by -2\dp\strutbox
+ \global\advance\TABLEmaxheight by -\parskip
+ \fi\fi}
+
+\def\nocalculatemaxTABLEheight%
+ {\ifbinnenkolommen
+ \getcolumnstatus\column\scratchcounter\total\dimen0\goal\dimen2\\%
+ \else
+ \dimen0=\!!zeropoint
+ \dimen2=\teksthoogte
+ \fi
+ \advance\dimen2 by -\dimen0
+ \global\TABLEmaxheight=\dimen2
+ \global\advance\TABLEmaxheight by -\dp\strutbox}
+
+\def\calculatemaxTABLEheight#1%
+ {\ifsplittables
+ #1\relax
+ \ifdim\TABLEmaxheight<3\baselineskip \relax % instelbaar maken
+ \ifbinnenkolommen
+ \nobreak
+ \kern\dimen2
+ \goodbreak
+ \else
+ \goodbreak % \pagina
+ \fi
+ \removeTABLEtopskip
+ \nocalculatemaxTABLEheight
+ \fi
+ \ifdim\TABLEmaxheight<\absmaxTABLEheight % forces equal columns
+ \global\TABLEmaxheight=\absmaxTABLEheight
+ \else
+ \xdef\absmaxTABLEheight{\the\TABLEmaxheight}%
+ \fi
+ \global\TABLEheight=\!!zeropoint
+ \else
+ \global\TABLEmaxheight=\maxdimen
+ \fi}
+
+%D When splitting tables, we have to remove the top skip when
+%D we're in the main vertical list, else we remove whatever
+%D skip \TEX\ adds.
+
+\def\removeTABLEtopskip%
+ {\ifinsidefloat
+ \hbox{\strut}\kern-\lineheight
+ \else
+ \hbox{}\kern-\topskip
+ \fi}
+
+%D We need an alternative for the normal complex or simple
+%D commands, because assignments in these system commands
+%D conflict with \type{\noalign}. This alternative is about
+%D as efficient as possible.
+
+\def\complexorsimpleTable#1#2%
+ {\getvalue{\if[\noexpand#2\s!complex\else\s!simple\fi\c!Table#1}#2}
+
+%D The order of the next macros is more or less random. First
+%D we implement error recovery. Errors are reported to the
+%D screen and log file as well as visualized in the table in
+%D teletype.
+
+\def\handleTABLEerror%
+ {\ifTABLEgrayline \else
+ \ifnum\TABLEerror=\TABLEunknown \else
+ \setTABLEaction\TABLEunknown
+ \global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty
+ \fi
+ \ifcase\TABLEerror
+ % no error
+ \or
+ % \TABLEmissingrow
+ \tttf [missing row]%
+ \writestatus{TABLE}{missing row}%
+ \SR
+ \or
+ % \TABLEmissingcolumn
+ \fillTABLEcolumns
+ \tttf [missing column]%
+ \writestatus{TABLE}{missing column}%
+ \SR
+ \or
+ % \TABLEspanoverflow
+ \fillTABLEcolumns
+ \tttf [columnspan too large]%
+ \writestatus{TABLE}{columnspan too large}%
+ \SR
+ \or
+ % \TABLEdivisionoverflow
+ \fillTABLEcolumns
+ \tttf [division line too long]%
+ \writestatus{TABLE}{division line too long}%
+ \SR
+ \fi
+ \fi
+ \ifnum\TABLEerror=\TABLEunknown \else
+ \crcr
+ \TABLEnoalign
+ {\nobreak
+ \setTABLEaction\TABLEunknown
+ \setTABLEerror\TABLEunknown
+ \global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty
+ \global\currentTABLEcolumn=0 }%
+ \fi}
+
+\def\fillTABLEcolumns%
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn \else
+ \global\advance\currentTABLEcolumn by 1
+ \normalTABLEquote
+ \expandafter\fillTABLEcolumns
+ \fi}
+
+%D Next we enter the more complicated area of column and row
+%D switching. I won't go into much detail from now on, but just
+%D mention the general principles.
+%D
+%D \startopsomming[3*ruim]
+%D \sym{\type{\SR}} end a separate row (between rules)
+%D \sym{\type{\FR}} end a first row (after a rule)
+%D \sym{\type{\MR}} end a mid row (between text lines)
+%D \sym{\type{\LR}} end a last row (before a rule)
+%D \stopopsomming
+%D
+%D and best of all:
+%D
+%D \startopsomming[verder]
+%D \sym{\type{\AR}} end a row with automatic spacing
+%D \stopopsomming
+%D
+%D As far as possible, we report confusing situations. In
+%D most cases one can use \type{\AR}, which transfigurates
+%D itself into one of the other types.
+%D
+%D \starttypen
+%D \starttabel[||]
+%D \HL
+%D \VL a separate row \VL\SR
+%D \HL
+%D \VL a first row \VL\FR
+%D \VL a mid row \VL\MR
+%D \VL a last row \VL\LR
+%D \HL
+%D \stoptabel
+%D \stoptypen
+%D
+%D In this example we could have used \type{\AR} without
+%D problems.
+%D
+%D Color or gray scale backgrounds precede the content. They
+%D are passed over horizontal (division) lines when needed.
+%D Errors in the color template are traced elsewhere. Here we
+%D only check for inconsistent spacing. Due to the way \TEX\
+%D handles alignments, we cannot automate spacing for colored
+%D rows and columns.
+
+\chardef\TABLErowzero=0
+
+\def\checkTABLErow#1% pure for message purposes
+ {\ifTABLEgraydone
+ \convertargument #1\to\asciiA
+ \convertcommand\TABLEendBCL\to\asciiB
+ \ifx\asciiA\asciiB \else
+ \writestatus{TABLE}{confusing \asciiA\space and \asciiB}%
+ \gdef\TABLEgraylineerror%
+ {\global\let\TABLEgraylineerror=\empty
+ [\asciiA\unskip<->\asciiB\unskip]}%
+ \fi
+ \global\TABLEgraydonefalse
+ \fi}
+
+\def\defineTABLEendings%
+ {\let\SR=\TableSR
+ \let\FR=\TableFR
+ \let\MR=\TableMR
+ \let\LR=\TableLR
+ \let\AR=\TableAR}
+
+\def\TableSR%
+ {\ifTABLEgrayline \else
+ \ifnum\TABLEaction=\TABLEfirstrow
+ \writestatus{TABLE}{change \string\SR\space into \string\MR/\string\LR}%
+ \else\ifnum\TABLEaction=\TABLEmidrow
+ \writestatus{TABLE}{change \string\SR\space into \string\MR/\string\LR}%
+ \else\ifnum\TABLEaction=\TABLEmidrow
+ \writestatus{TABLE}{change \string\SR\space into \string\MR/\string\LR}%
+ \fi\fi\fi
+ \fi
+ \checkTABLErow\SR
+ \endTABLErow\TABLEseparaterow\TABLErowfactor\TABLErowfactor}
+
+\def\TableFR%
+ {\ifTABLEgrayline \else
+ \ifnum\TABLEaction=\TABLEmidrow
+ \writestatus{TABLE}{change \string\FR\space into \string\MR/\string\LR}%
+ \else\ifnum\TABLEaction=\TABLElastrow
+ \writestatus{TABLE}{change \string\FR\space into \string\MR/\string\LR}%
+ \fi\fi
+ \fi
+ \checkTABLErow\FR
+ \endTABLErow\TABLEfirstrow\TABLErowfactor\TABLErowzero}
+
+\def\TableMR%
+ {\ifTABLEgrayline \else
+ \ifnum\TABLEaction=\TABLErule
+ \writestatus{TABLE}{change \string\MR\space into \string\FR/\string\SR}%
+ \else\ifnum\TABLEaction=\TABLElastrow
+ \writestatus{TABLE}{change \string\MR\space into \string\FR}%
+ \fi\fi
+ \fi
+ \checkTABLErow\MR
+ \endTABLErow\TABLEmidrow00}
+
+\def\TableLR%
+ {\ifTABLEgrayline \else
+ \ifnum\TABLEaction=\TABLErule
+ \writestatus{TABLE}{change \string\LR\space into \string\FR/\string\SR}%
+ \fi
+ \fi
+ \checkTABLErow\LR
+ \endTABLErow\TABLElastrow\TABLErowzero\TABLErowfactor}
+
+%D The next macros handle the actual row ending. This macro
+%D also take care of space corrections due to table splitting
+%D when \type{\MR} and collegues are used. When tracing is
+%D enabled, the corrections as well as the values used to
+%D determine the available space are shown (in color).
+
+\let\beforeTABLEline=\empty
+\let\afterTABLEline =\empty
+
+\def\endTABLErow#1#2#3%
+ {\setTABLEaction#1%
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \handleTABLEbreak#2#3%
+ \beforeTABLEline
+ \ifcase#1\relax
+ % unknown
+ \or
+ \endofTABLEline[blue][\SR->\SR]\TABLErowfactor\TABLErowfactor
+ \or
+ \endofTABLEline[red][\FR->\FR]\TABLErowfactor\TABLErowzero
+ \or
+ \ifnum\TABLEforce=\TABLEforcelastrow
+ \endofTABLEline[red][\MR->\LR]\TABLErowzero\TABLErowfactor
+ \else\ifnum\TABLEforce=\TABLEforcefirstrow
+ \endofTABLEline[red][\MR->\FR]\TABLErowfactor\TABLErowzero
+ \else
+ \endofTABLEline[green][\MR->\MR]\TABLErowzero\TABLErowzero
+ \fi\fi
+ \or
+ \endofTABLEline[red][\LR->\LR]\TABLErowzero\TABLErowfactor
+ \fi
+ \TABLEnoalign
+ {\setTABLEforce\TABLEunknown
+ \global\currentTABLEcolumn=0 }%
+ \afterTABLEline
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi}
+
+%D Handling \type{\AR} is postponed till the next row. The
+%D check takes care of the first and mid rows, the chuck macro
+%D |<|how about that name|>| handles the last row.
+
+\def\TableAR%
+ {\ifTABLEgraydone
+ \global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty
+ \global\TABLEgraydonefalse
+ \TABLEendBCL
+ \else
+ \global\let\checkTABLEautorow=\docheckTABLEautorow
+ \global\let\chuckTABLEautorow=\dochuckTABLEautorow
+ \fi}
+
+\let\checkTABLEautorow=\empty
+\let\chuckTABLEautorow=\empty
+
+\def\docheckTABLEautorow%
+ {\global\let\checkTABLEautorow=\empty
+ \ifnum\TABLEaction=\TABLErule \FR
+ \else\ifnum\TABLEaction=\TABLEunknown \FR
+ \else \MR
+ \fi\fi}
+
+\def\dochuckTABLEautorow%
+ {\global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty
+ \ifnum\TABLEaction=\TABLErule \SR
+ \else\ifnum\TABLEaction=\TABLEunknown \SR
+ \else \LR
+ \fi\fi}
+
+%D When a table is split, we also add a tail and when present
+%D we repeat the table head.
+
+\def\handleTABLEbreak#1#2%
+ {\ifsplittables
+ \setbox0=\hbox{\AugmentedTableStrut{#1}{#2}}%
+ \getboxheight\dimen0\of\box0%
+ \ifTABLEgrayline \else
+ \global\advance\TABLEheight by \dimen0
+ \fi
+ \ifTABLEinbreak
+ \global\let\beforeTABLEline=\empty
+ \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
+ \else
+ \dimen2=\TABLEheight
+ \advance\dimen2 by \dp\strutbox
+ \advance\dimen2 by \TABLEtailheight
+ \advance\dimen2 by \TABLEcaptionheight
+ \advance\dimen2 by \lineheight % we're ahead
+ \ifdim\dimen2>\TABLEmaxheight
+ \gdef\beforeTABLEline%
+ {\setTABLEforce\TABLEforcelastrow}%
+ \gdef\afterTABLEline%
+ {\TABLEnoalign
+ {\nobreak
+ \global\TABLEinbreaktrue}%
+ \TABLEtail
+ \TABLEnoalign
+ {\goodbreak
+ \calculatemaxTABLEheight\nocalculatemaxTABLEheight
+ \removeTABLEtopskip
+ \setTABLEaction\TABLEunknown
+ \setTABLEforce \TABLEunknown}%
+ \TABLEhead
+ \TABLEnoalign
+ {\nobreak
+ \global\TABLEinbreakfalse
+ \setTABLEforce\TABLEforcefirstrow}}%
+ \else
+ \global\let\beforeTABLEline=\empty
+ \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
+ \fi
+ \fi
+ \else
+ \global\let\beforeTABLEline=\empty
+ \gdef\afterTABLEline{\TABLEnoalign{\nobreak}}%
+ \fi}
+
+%D When tables are split, the spacing before and after a
+%D horizontal rule is corrected according to whet we expect.
+
+\def\endofTABLEline[#1][#2->#3]#4#5%
+ {\ifx#2#3\else
+ \writestatus{TABLE}{\string#2\space changed into \string#3}%
+ \fi
+ \iftracetables
+ \bgroup
+ \tttf\space
+ \ifnum\TABLEerror=\TABLEunknown
+ \ifx#2#3\else\string#2->\fi
+ \else
+ ->%
+ \fi
+ \color[#1]{\string#3}%
+ \ifsplittables\space\the\TABLEmaxheight/\the\TABLEheight\fi
+ \ifx\TABLEgraylineerror\empty
+ \space\TABLEgraylinestatus
+ \else
+ \space\TABLEgraylineerror
+ \fi
+ \egroup
+ \else\ifx\TABLEgraylineerror\empty \else
+ \bgroup
+ \tttf\space\TABLEgraylineerror
+ \egroup
+ \fi\fi
+ \global\let\TABLEgraylinestatus=\empty
+ \global\let\TABLEgraylineerror =\empty
+ \expandafter\normalTABLElineformat#4#5\crcr % \crcr nodig ?
+ \TABLEnoalign{\nobreak\global\setTABLEactiontrue}}
+
+%D In order to prevent (as good as possible) alignment overflow
+%D and therefore \TEX\ error messages, we check the maximum
+%D number of columns. We keep track of the current column and
+%D maximum column by means of two \COUNTERS. Keep in mind that
+%D the number of \type{|}'s and \type{\VL}'s or alike is always
+%D one more than the number of columns.
+
+\newcount\currentTABLEcolumn
+\newcount\maxTABLEcolumn
+
+%D While defining this macro we change the \CATCODE\ of
+%D \type{|}. When counting the bars, we use a non active
+%D representation of the bar, simply because we cannot be sure
+%D if the bar is active or not.\voetnoot{Normally it is, but
+%D \TABLE\ changes the catcode when needed.
+
+\bgroup
+\catcode`\|=\@@other
+\gdef\getTABLEnofcolumns#1%
+ {\bgroup
+ \convertargument#1\to\ascii
+ \@EA\doglobal\@EA\counttoken\@EA|\@EA\in\ascii\to\maxTABLEcolumn
+ \global\advance\maxTABLEcolumn by -1
+ \egroup}
+\egroup
+
+%D \startopsomming[3*ruim]
+%D \sym{\type{\VL}} a vertical line
+%D \sym{\type{\VC}} a vertical colored line
+%D \sym{\type{\HL}} a horizontal line
+%D \sym{\type{\HC}} a horizontal colored line
+%D \stopopsomming
+
+\def\defineTABLErules%
+ {\let\VL=\TableVL
+ \let\VC=\TableVC
+ \let\HL=\TableHL
+ \let\HC=\TableHC}
+
+\def\TableVL%
+ {\checkTABLEautorow
+ \nextTABLEgrayline
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \else
+ \global\advance\currentTABLEcolumn by 1
+ \expandafter\doTableVL
+ \fi}
+
+\def\doTableVL%
+ {\complexorsimpleTable{VL}}
+
+\def\complexTableVL[#1]%
+ {\scratchcounter=0#1%
+ \multiply\scratchcounter by \@@tiVLwidth
+ \setxvalue{wVL\the\currentTABLEcolumn}{\the\scratchcounter}%
+ \simpleTableVL}
+
+\def\simpleTableVL%
+ {\doifundefined{wVL\the\currentTABLEcolumn}%
+ {\setgvalue{wVL\the\currentTABLEcolumn}{\@@tiVLwidth}}%
+ \gdef\TABLEbeforebar%
+ {\getvalue{bVL\the\currentTABLEcolumn}%
+ \global\letvalue{bVL\the\currentTABLEcolumn}=\empty}%
+ \gdef\TABLEafterbar%
+ {\getvalue{eVL\the\currentTABLEcolumn}%
+ \global\letvalue{eVL\the\currentTABLEcolumn}=\empty}%
+ \edef\@@tiVLwidth{\getvalue{wVL\the\currentTABLEcolumn}}%
+ \expanded{\normalTABLEcomplexbar{\@@tiVLwidth}}}
+
+\def\resetVLvalues%
+ {\dostepwiserecurse{0}{\maxTABLEcolumn}{1}
+ {\global\setvalue{wVL\recurselevel}{\@@tiVLwidth}%
+ \global\letvalue{bVL\recurselevel}=\empty
+ \global\letvalue{eVL\recurselevel}=\empty}%
+ \global\currentTABLEcolumn=0 }
+
+\def\TableVC%
+ {\checkTABLEautorow
+ \nextTABLEgrayline
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \else
+ \global\advance\currentTABLEcolumn by 1
+ \expandafter\doTableVC
+ \fi}
+
+\def\doTableVC%
+ {\complexorsimpleTable{VC}}
+
+\def\complexTableVC[#1]%
+ {\global\setvalue{bVC\the\currentTABLEcolumn}%
+ {\localstartcolor[#1]}%
+ \global\setvalue{eVC\the\currentTABLEcolumn}%
+ {\localstopcolor}%
+ \simpleTableVC}
+
+\def\simpleTableVC%
+ {\global\setvalue{bVL\the\currentTABLEcolumn}%
+ {\getvalue{bVC\the\currentTABLEcolumn}}%
+ \global\setvalue{eVL\the\currentTABLEcolumn}%
+ {\getvalue{eVC\the\currentTABLEcolumn}}%
+ \doTableVL}
+
+\def\TableHL%
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \chuckTABLEautorow
+ \else\ifnum\currentTABLEcolumn=0
+ \chuckTABLEautorow
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi\fi
+ \complexorsimpleTable{HL}}
+
+\def\complexTableHL[#1]%
+ {\TABLEnoalign
+ {\scratchcounter=0#1%
+ \multiply\scratchcounter by \@@tiHLheight
+ \edef\@@tiHLheight{\the\scratchcounter}%
+ \simpleTableHL}}
+
+\def\simpleTableHL%
+ {\TABLEnoalign
+ {\nobreak
+ \ifnum\TABLEaction=\TABLErule
+ \writestatus{TABLE}{skipping \string\HL}% \statusmessage
+ \else
+ \ifnum\TABLEaction=\TABLEmidrow
+ \writestatus{TABLE}{change \string\MR\space into \string\LR/\string\SR}%
+ \else\ifnum\TABLEaction=\TABLEfirstrow
+ \writestatus{TABLE}{change \string\MR\space into \string\SR}%
+ \fi\fi
+ \startHLcommand
+ \expandafter\normalTABLEfullrule\@@tiHLheight
+ \stopHLcommand
+ \global\let\startHLcommand=\empty
+ \global\let\stopHLcommand =\empty
+ \accountTABLElinewidth
+ \fi
+ \setTABLEaction\TABLErule
+ \nobreak}}
+
+\let\startHLcommand=\empty
+\let\stopHLcommand =\empty
+
+\def\TableHC%
+ {\complexorsimpleTable{HC}}
+
+\def\complexTableHC[#1]%
+ {\TABLEnoalign
+ {\gdef\startHCcommand{\localstartcolor[#1]}%
+ \gdef\stopHCcommand {\localstopcolor}}%
+ \simpleTableHC}
+
+\def\simpleTableHC%
+ {\TABLEnoalign
+ {\global\let\startHLcommand=\startHCcommand
+ \global\let\stopHLcommand =\stopHCcommand}%
+ \HL}
+
+%D \startopsomming[3*ruim]
+%D \sym{\type{\NL}} a vertical skip
+%D \sym{\type{\NR}} goto the next row
+%D \sym{\type{\NC}} goto the next column
+%D \sym{\type{\FC}} a first column
+%D \sym{\type{\MC}} a mid column
+%D \sym{\type{\LC}} a last column
+%D \stopopsomming
+
+% n+1 uitleggen
+
+\def\defineTABLEsteps%
+ {\let\NL=\TableNL
+ \let\NR=\TableNR
+ \let\NC=\TableNC
+ \let\FC=\TableNC
+ \let\MC=\TableNC
+ \let\LC=\TableNC}
+
+\def\TableNL%
+ {\complexorsimpleTable{NL}}
+
+\def\complexTableNL[#1]%
+ {\TABLEnoalign
+ {\edef\@@tiNL{#1}%
+ \simpleTableNL}}%
+
+\def\simpleTableNL%
+ {\TABLEnoalign
+ {\nobreak
+ \setbox0=\vbox{\blanko[\@@tiNL]}%
+ \global\advance\TABLEheight by \ht0
+ \vskip\ht0
+ \nobreak}}
+
+\def\TableNR%
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \global\currentTABLEcolumn=0
+ \normalTABLElineending
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi
+ \TABLEnoalign
+ {\nobreak
+ \setTABLEaction\TABLEunknown}}
+
+\def\TableNC%
+ {\checkTABLEautorow
+ \nextTABLEgrayline
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \else
+ \global\advance\currentTABLEcolumn by 1
+ \normalTABLEquote
+ \fi}
+
+\bgroup
+\catcode`\|=\@@active
+\catcode`\"=\@@active
+\gdef\redefinetablebarandquote%
+ {\def|{\VL}% % \normalTABLEsimplebar
+ \def\|##1{\VL[##1]}% % \normalTABLEcomplexbar
+ \def"{\NC}} % \normalTABLEquote
+\egroup
+
+%D \startopsomming[3*ruim]
+%D \sym{\type{\DL}}
+%D \sym{\type{\DC}}
+%D \sym{\type{\DR}}
+%D \stopopsomming
+
+\newif\ifTABLEdivision
+
+\def\defineTABLEdivisions%
+ {\global\TABLEdivisionfalse % in start
+ \let\DL=\TableDL
+ \let\DC=\TableDC
+ \let\DR=\TableDR}
+
+\def\checkTABLEdivision%
+ {\ifTABLEdivision \else
+ \chuckTABLEautorow
+ \global\currentTABLEcolumn=0
+ \global\TABLEdivisiontrue
+ \fi}
+
+\def\TableDL%
+ {\checkTABLEdivision
+ \complexorsimpleTable{DL}}
+
+\def\simpleTableDL%
+ {\complexTableDL[1]}
+
+\def\complexTableDL[#1]%
+ {\ifnum\TABLEaction=\TABLErule
+ \writestatus{TABLE}{skipping \string\DL}%
+ \else
+ \ifnum\TABLEaction=\TABLEmidrow
+ \writestatus{TABLE}{change \string\MR\space into \string\LR/\string\SR}%
+ \else\ifnum\TABLEaction=\TABLEfirstrow
+ \writestatus{TABLE}{change \string\MR\space into \string\SR}%
+ \fi\fi
+ \setTABLEaction=\TABLEunknown
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \fi
+ %\startHLcommand
+ \ifnum#1=1
+ \global\advance\currentTABLEcolumn by 2
+ \let\next=\normalTABLEsinglerule
+ \else
+ \ifnum#1<\maxTABLEcolumn
+ \global\advance\currentTABLEcolumn by 2
+ \def\next{\normalTABLEmultirule{#1}}%
+ \else
+ \setTABLEerror\TABLEdivisionoverflow
+ \let\next=\handleTABLEerror
+ \fi
+ \fi
+ \next
+ %\stopHLcommand
+ %\global\let\startHLcommand=\empty
+ %\global\let\stopHLcommand =\empty
+ \fi}
+
+\def\TableDC%
+ {\checkTABLEdivision
+ \checkTABLEautorow
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \else
+ \global\advance\currentTABLEcolumn by 1
+ \normalTABLEquote
+ \fi}
+
+\def\TableDR%
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \global\currentTABLEcolumn=0
+ \normalTABLElineending
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi
+ \TABLEnoalign
+ {\nobreak
+ \global\TABLEdivisionfalse
+ \accountTABLElinewidth % temporary solution
+ \setTABLEaction\TABLErule}}
+
+\def\accountTABLElinewidth%
+ {\scratchdimen=\LineThicknessUnit
+ \global\advance\TABLEheight by \@@tiHLheight\scratchdimen}
+
+%D \startopsomming[3*ruim]
+%D \sym{\type{\BC}}
+%D \sym{\type{\BR}}
+%D \sym{\type{\BACKGROUND}}
+%D \sym{\type{\CL}}
+%D \sym{\type{\RL}}
+%D \sym{\type{\BL}}
+%D \sym{\type{\RASTER}}
+%D \sym{\type{\COLOR}}
+%D \stopopsomming
+
+\def\defineTABLEbackgrounds%
+ {\let\CL =\TableCL
+ \let\RL =\TableRL
+ \let\BC =\TableBC
+ \let\BL =\TableBL
+ \let\BR =\TableBR
+ \let\BACKGROUND=\TableBR
+ \let\RASTER =\TableRASTER
+ \let\COLOR =\TableCOLOR}
+
+\def\TableCL% % much in common with \HL
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \chuckTABLEautorow
+ \else\ifnum\currentTABLEcolumn=0
+ \chuckTABLEautorow
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi\fi
+ \TABLEnoalign\bgroup\complexorsimpleTable{CL}}
+
+\def\simpleTableCL%
+ {\complexTableCL[\@@tiachtergrondkleur]}%
+
+\def\complexTableCL[#1]#2%
+ {\docomplexTableCL[#1]#2\egroup}
+
+\def\docomplexTableCL%
+ {\dodocomplexTableFullGL\CL\localstartcolor\localstopcolor}
+
+\def\TableRL% % much in common with \CL
+ {\ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \chuckTABLEautorow
+ \else\ifnum\currentTABLEcolumn=0
+ \chuckTABLEautorow
+ \else
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \fi\fi
+ \TABLEnoalign\bgroup\complexorsimpleTable{RL}}
+
+\def\simpleTableRL%
+ {\complexTableRL[\@@tiachtergrondraster]}%
+
+\def\complexTableRL[#1]#2%
+ {\docomplexTableRL[#1]#2\egroup}
+
+\def\docomplexTableRL%
+ {\dodocomplexTableFullGL\RL\localstartraster\localstopraster}
+
+\def\checkTABLEgrayline#1#2%
+ {\!!doneatrue
+ \ifx#1\AR
+ \!!doneafalse
+ \else\ifx#1\SR\else\ifx#1\FR\else\ifx#1\MR\else\ifx#1\LR\else
+ \!!doneafalse
+ \fi\fi\fi\fi\fi
+ \if!!donea
+ \gdef\TABLEgraylinestatus%
+ {[\string#1]}%
+ \gdef\TABLEendBCL%
+ {#1}%
+ \else
+ \gdef\TABLEgraylineerror%
+ {[\string#2\string#1->\string#2\string\SR]}%
+ \gdef\TABLEendBCL%
+ {\SR}%
+ \fi}
+
+\def\dodocomplexTableFullGL#1#2#3[#4]#5%
+ {\global\let\TABLEgraylineerror =\empty
+ \global\let\TABLEgraylinestatus=\empty
+ \gdef\nextTABLEgrayline%
+ {\TABLEnoalign
+ {\let\endTABLErow=\endTABLErowGL
+ \checkTABLEgrayline#5#1\TABLEendBCL
+ #2[#4]%
+ \hrule\!!height\TABLEgraylineHeight
+ \nobreak
+ \vskip-\TABLEgraylineHeight
+ \nobreak
+ #3%
+ \doPostTableGL}}}
+
+\def\endTABLErowGL#1#2#3%
+ {\ifcase#1\relax
+ % unknown
+ \or
+ \doPreTableGL\TABLErowfactor\TABLErowfactor
+ \or
+ \doPreTableGL\TABLErowfactor\TABLErowzero
+ \or
+ \ifnum\TABLEforce=\TABLEforcelastrow
+ \doPreTableGL\TABLErowzero\TABLErowfactor
+ \else\ifnum\TABLEforce=\TABLEforcefirstrow
+ \doPreTableGL\TABLErowfactor\TABLErowzero
+ \else
+ \doPreTableGL\TABLErowzero\TABLErowzero
+ \fi\fi
+ \or
+ \doPreTableGL\TABLErowzero\TABLErowfactor
+ \fi}
+
+\def\doPreTableGL#1#2% betere namen
+ {\xdef\OldLineThicknessFactor{\the\LineThicknessFactor}%
+ \xdef\OldLineThicknessUnit{\the\LineThicknessUnit}%
+ \global\LineThicknessFactor=1
+ \setbox0=\hbox{\AugmentedTableStrut{#1}{#2}}%
+ \getboxheight\dimen0\of\box0\relax
+ \xdef\TABLEgraylineHeight{\the\dimen0}%
+ \global\LineThicknessUnit=\TABLEgraylineHeight}
+
+\def\doPostTableGL%
+ {\global\LineThicknessFactor=\OldLineThicknessFactor
+ \global\LineThicknessUnit =\OldLineThicknessUnit}
+
+\def\TableBACKGROUND%
+ {\TableBR}
+
+\def\simpleTableRASTER#1%
+ {\docomplexTableRASTER[1]#1}
+
+\def\complexTableRASTER[#1]%
+ {\docomplexTableRASTER[#1]}
+
+\def\simpleTableCOLOR%
+ {\docomplexTableCOLOR[1]}
+
+\def\complexTableCOLOR[#1]%
+ {\docomplexTableCOLOR[#1]}
+
+\def\TableRASTER%
+ {\complexorsimpleTable{RASTER}}
+
+\def\TableCOLOR%
+ {\complexorsimpleTable{COLOR}}
+
+\def\addtoTABLEgrayline#1%
+ {\TABLEgraytoks=\expandafter{\TABLEgrayline}%
+ \xdef\TABLEgrayline{\the\TABLEgraytoks\noexpand#1}}
+
+\def\setTableBCL#1#2%
+ {\ifx#1#2%
+ \gdef\TABLEgraylinestatus{[\string#1]}%
+ \gdef\TABLEendBCL{#1}%
+ \addtoTABLEgrayline{#1}%
+ \else
+ \gdef\TABLEgraylineerror{[\string#1->\string#2]}%
+ \gdef\TABLEendBCL{#2}%
+ \addtoTABLEgrayline{#2}%
+ \fi}
+
+\def\gobbleTableBCL#1%
+ {\ifx#1\BC \let\next=\doTableBC \else
+ \ifx#1\BL \let\next=\doTableBL \else
+ \ifx#1\SR \setTableBCL\SR\SR \let\next=\egroup \else
+ \ifx#1\FR \setTableBCL\FR\FR \let\next=\egroup \else
+ \ifx#1\MR \setTableBCL\MR\MR \let\next=\egroup \else
+ \ifx#1\LR \setTableBCL\LR\LR \let\next=\egroup \else
+ \setTableBCL#1\SR \let\next=\egroup
+ \fi\fi\fi\fi\fi\fi
+ \next}
+
+\def\executeTABLEgrayline%
+ {\TABLEnoalign
+ {\def\BC%
+ {\advance\currentTABLEcolumn by 1 }%
+ \def\dodocomplexTableGL##1##2[##3,##4,##5,##6]%
+ {\BC\advance\currentTABLEcolumn by ##3 }%
+ \let\endTABLErow=\endTABLEgrayrow
+ \currentTABLEcolumn=0
+ \TABLEgrayline\TABLEendBCL % determine n of columns and height
+ \advance\currentTABLEcolumn by -1
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ % error message too long line
+ \global\let\TABLEgrayline=\empty
+ \else
+ % \message{n of color columns: \the\currentTABLEcolumn}\wait
+ \global\TABLEgraylinetrue % vanaf hier nog checken
+ \fi
+ \global\currentTABLEcolumn=0}%
+ \unskip\TABLEgrayline\TABLEendBCL
+ \TABLEnoalign
+ {\nobreak
+ \vskip-\TABLEgraylineHeight
+ \nobreak
+ \global\setTABLEactiontrue
+ \global\currentTABLEcolumn=0
+ \global\let\nextTABLEgrayline=\empty
+ \global\TABLEgraydonetrue
+ \global\TABLEgraylinefalse}}
+
+\def\docomplexTableCOLOR[#1]%
+ {\dodocomplexTableGL\localstartcolor\localstopcolor
+ [#1,\@@tiachtergrondkleur,,]}
+
+\gdef\docomplexTableRASTER[#1]%
+ {\dodocomplexTableGL\localstartraster\localstopraster%
+ [#1,\@@tiachtergrondraster,,]}
+
+% nog \= == \- als alternatief
+% nog eens
+
+\def\dodocomplexTableGL#1#2[#3,#4,#5,#6]%
+ {\doifelsenothing{#4}{#1[#5]}{#1[#4]}%
+ \doPreTableGL\TABLEendofrowheight\TABLEendofrowdepth
+ \ifnum#3=1 % else conflict with \omit in \=
+ \let\next=\normalTABLEsinglerule
+ \else
+ \def\next{\normalTABLEmultirule{#3}}%
+ \fi
+ \next
+ \doPostTableGL
+ #2}
+
+% \BC \BL
+% \BL \BC
+
+\def\TableBC%
+ {\ifTABLEgrayline
+ \normalTABLEquote
+ \else
+ \TABLEnoalign\bgroup
+ \global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \let\BL=\doTableBL
+ \let\BC=\doTableBC
+ \expandafter\doTableBC
+ \fi}
+
+\def\doTableBC%
+ {\addtoTABLEgrayline{\BC}%
+ \gobbleTableBCL}
+
+\def\TableBL%
+ {\TABLEnoalign\bgroup
+ \global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \let\BL=\doTableBL
+ \let\BC=\doTableBC
+ \doTableBL}
+
+\def\doTableBL%
+ {\complexorsimpleTable{BL}}
+
+\def\complexTableBL[#1]#2% nodig?
+ {\doprocessTableBL[#1,\@@tiachtergrond,]#2}
+
+\def\simpleTableBL#1% nodig?
+ {\doprocessTableBL[1,\@@tiachtergrond,]#1}
+
+\def\dodoprocessTableBL[#1,#2,#3]%
+ {\processaction
+ [#2]
+ [ color=>{\addtoTABLEgrayline{\complexTableCOLOR[#1,#3]}},
+ c=>{\addtoTABLEgrayline{\complexTableCOLOR[#1,#3]}},
+ raster=>{\addtoTABLEgrayline{\complexTableRASTER[#1,#3]}},
+ r=>{\addtoTABLEgrayline{\complexTableRASTER[#1,#3]}}]}
+
+\def\doprocessTableBL[#1]%
+ {\getfromcommalist[#1][1]%
+ \expandafter\doifnumberelse\expandafter{\commalistelement}
+ {\dodoprocessTableBL[#1]}
+ {\dodoprocessTableBL[1,#1]}%
+ \gobbleTableBCL}
+
+\def\TableBR#1%
+ {\TABLEnoalign
+ {\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \checkTABLEgrayline#1\BR
+ \global\TABLEgraylinetrue}}
+
+\def\endTABLEgrayrow#1#2#3%
+ {\ifcase#1\relax
+ \global\chardef\TABLEendofrowheight=\TABLErowfactor
+ \global\chardef\TABLEendofrowdepth =\TABLErowfactor
+ \or
+ \global\chardef\TABLEendofrowheight=\TABLErowfactor
+ \global\chardef\TABLEendofrowdepth =\TABLErowfactor
+ \or
+ \global\chardef\TABLEendofrowheight=\TABLErowfactor
+ \global\chardef\TABLEendofrowdepth =\TABLErowzero
+ \or
+ \ifnum\TABLEforce=\TABLEforcelastrow
+ \global\chardef\TABLEendofrowheight=\TABLErowzero
+ \global\chardef\TABLEendofrowdepth =\TABLErowfactor
+ \else\ifnum\TABLEforce=\TABLEforcefirstrow
+ \global\chardef\TABLEendofrowheight=\TABLErowfactor
+ \global\chardef\TABLEendofrowdepth =\TABLErowzero
+ \else
+ \global\chardef\TABLEendofrowheight=\TABLErowzero
+ \global\chardef\TABLEendofrowdepth =\TABLErowzero
+ \fi\fi
+ \or
+ \global\chardef\TABLEendofrowheight=\TABLErowzero
+ \global\chardef\TABLEendofrowdepth =\TABLErowfactor
+ \fi}
+
+\def\defineTABLEshorthands%
+ {\def\TWO {\use{2}}%
+ \def\THREE{\use{3}}%
+ \def\FOUR {\use{4}}%
+ \def\FIVE {\use{5}}%
+ \def\SIX {\use{6}}%
+ \def\REF {\ReFormat}}
+
+\def\defineTABLEunits%
+ {\processaction
+ [\@@tiafstand]
+ [ \v!geen=>\OpenUp{0}{0}\def\LOW{\Lower6 },
+ \v!klein=>\OpenUp{0}{0}\def\LOW{\Lower6 }, % == baseline
+ \v!middel=>\OpenUp{1}{1}\def\LOW{\Lower7 },
+ \v!groot=>\OpenUp{2}{2}\def\LOW{\Lower8 }]%
+ \doifelse{\@@tiafstand}{\v!geen}
+ {\chardef\TABLErowfactor=0 }
+ {\chardef\TABLErowfactor=2 }}
+
+\def\dohandlebar%
+ {\ifmmode
+ \let\next=\domathmodebar
+ \else\ifintable
+ \let\next=\domathmodebar
+ \else
+ \let\next=\dotextmodebar
+ \fi\fi
+ \next}
+
+% De macro's t.b.v. instellingen.
+
+\def\steltabellenin%
+ {\dosingleargument\dosteltabellenin}
+
+\def\dosteltabellenin[#1]%
+ {\getparameters[\??ti][#1]%
+ \assignalfadimension{\@@tiVL}{\@@tiVLwidth} {2}{4}{6}%
+ \assignalfadimension{\@@tiHL}{\@@tiHLheight}{2}{4}{6}}
+
+\def\localTABLEsetup%
+ {\@@ticommandos\relax
+ \expanded{\switchtocorps[\@@tikorps]}%
+ \StrutHeightFactor =8
+ \StrutDepthFactor =4
+ \LineThicknessFactor=4
+ \NormalTLTU ={.1pt}%
+ \NormalTSU ={\normalbaselineskip\divide\StrutUnit by 12 }%
+ \NormalTableUnits}
+
+\steltabellenin
+ [HL=\v!middel,
+ VL=\v!middel,
+ NL=\v!klein,
+ \c!afstand=\v!middel,
+ \c!korps=\the\corpssize,
+ \c!commandos=,
+ \c!achtergrond=\v!raster,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=]
+
+\def\ifintabel{\ifintable} % upward compatible
+
+\protect \endinput
+
\ No newline at end of file diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex new file mode 100644 index 000000000..634490aef --- /dev/null +++ b/tex/context/base/core-ver.tex @@ -0,0 +1,594 @@ +%D \module
+%D [ file=core-ver,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Verbatim,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Core Macros / Verbatim}
+
+\unprotect
+
+% \type{ <crlf> char} geeft bagger
+
+%D We are going to embed the general verbatim support macros in
+%D a proper environment. First we show the common setup
+%D macro, so we know what features are supported. The options
+%D are hooked into the support macros via the \type{\obey}
+%D macros.
+
+\def\setupcommonverbatim#1%
+ {\def\verbatimfont{\tttf}%
+ \doifvalue{#1\c!spatie}{\v!aan}
+ {\def\obeyspaces{\setcontrolspaces}}%
+ \doifvalue{#1\c!tab}{\v!aan}
+ {\def\obeytabs{\settabskips}}%
+ \doifvalue{#1\c!pagina}{\v!nee}
+ {\def\obeypages{\ignorepages}}%
+ \ExpandFirstAfter\processaction
+ [\getvalue{#1\c!optie}]
+ [\v!commandos=>\def\obeycharacters{\setupcommandsintype{#1}}%
+ \let\obeytabs=\ignoretabs,
+ \v!schuin=>\let\obeycharacters=\setupslantedtype
+ \let\obeytabs=\ignoretabs,
+ \v!normaal=>\let\obeycharacters=\setupgroupedtype,
+ \v!geen=>\let\obeycharacters=\relax,
+ \v!kleur=>\let\obeycharacters=\setupprettytextype
+ \let\obeytabs=\ignoretabs]}
+
+%D The verbatim commands have a rather long and turbulent
+%D history. Most users of \CONTEXT\ probably will never use
+%D some of the features, but I've kept in mind that when one is
+%D writing a users manual, about everything can and undoubtly
+%D will be subject to a verbatim treatment.
+%D
+%D Verbatim command are very sensitive to argument processing,
+%D which is a direct result of the \CATCODES\ being fixed at
+%D reading time. With our growing understanding of \TEX,
+%D especially of the mechanism that can be used for looking
+%D ahead and manipulating \CATCODES, the verbatim support
+%D became more and more advanced and natural.
+%D
+%D Typesetting inline verbatim can be accomplished by
+%D \type{\type}, which in this sentence was typeset by saying
+%D just \type{\type{\type}}, which in turn was typeset by
+%D \onbekend. Using the normal grouping characters \type{{}} is
+%D the most natural way of using this command.
+%D
+%D A second, more or less redundant, alternative is delimiting
+%D the argument with an own character. This method was
+%D implemented in the context of a publication in the \MAPS,
+%D where this way of delimiting is recognized by \LATEX\ users.
+%D
+%D The third, more original alternative, is the one using
+%D \type{<<} and \type{>>} as delimiters. This alternative can
+%D be used in situations where slanted typeseting is needed.
+
+\def\lesscharacter {<}
+\def\morecharacter {>}
+
+\chardef\texescape = `\\
+\chardef\leftargument = `\{
+\chardef\rightargument = `\}
+
+%D \macros
+%D {type}
+%D {}
+%D
+%D We define \type{\type} as a protected command. First we
+%D set the catcodes of \type{<} and \type{>} and then we start
+%D looking ahead.
+
+\unexpanded\def\type%
+ {\bgroup
+ \catcode`\<=\@@other
+ \catcode`\>=\@@other
+ \futurelet\next\dotype}
+
+%D Next we distinguish between the three alternatives and call
+%D for the appropriate macros.
+
+\def\dotype%
+ {\ifx\next\bgroup
+ \initializetype
+ \initializetypegrouping
+ \def\next%
+ {\afterassignment\protectfirsttype\let\next=}%
+ \else\if\next<%
+ \doifelse{\@@tyoptie}{\v!geen}
+ {\initializetype
+ \setupnotypegrouping
+ \def\next%
+ {\let\next=}}
+ {\def\next<##1%
+ {\initializetype
+ \if##1<%
+ \else
+ \setupalternativetypegrouping
+ ##1%
+ \fi}}%
+ \else
+ \def\next##1%
+ {\initializetype
+ \catcode`##1=\@@endgroup}%
+ \fi\fi
+ \next}
+
+\bgroup
+\catcode`\[=\@@begingroup
+\catcode`\]=\@@endgroup
+\catcode`\{=\@@active
+\catcode`\}=\@@active
+\gdef\initializetypegrouping%
+ [\catcode`\{=\@@active
+ \catcode`\}=\@@endgroup % otherwise things go wrong ...
+ \def\activerightargument%
+ [\rightargument
+ \egroup]%
+ \def\activeleftargument%
+ [\bgroup
+ \leftargument %% this way TeXEdit can check: {
+ \catcode`\}=\@@active % ... in alignments (tables)
+ \let}=\activerightargument]%
+ \let{=\activeleftargument]% %% this way TeXEdit can check: }
+\egroup
+
+\bgroup
+\catcode`\<=\@@active
+\catcode`\>=\@@active
+\gdef\setupalternativetypegrouping%
+ {\catcode`\<=\@@active
+ \catcode`\>=\@@active
+ \def<%
+ {\bgroup
+ \switchslantedtype}%
+ \def>%
+ {\egroup}}
+\egroup
+
+\def\setupnotypegrouping%
+ {\catcode`\<=\@@begingroup
+ \catcode`\>=\@@endgroup}
+
+%D When writing the manual to \CONTEXT\ and documenting this
+%D source we needed to typeset \type{<<} and \type{>>}. Because
+%D we wanted to do this in the natural way, we've adapted the
+%D original definition a bit. We still show teh original
+%D because we think it's shows a bit better what we are
+%D doing.
+%D
+%D \starttypen
+%D \bgroup
+%D \catcode`\<=\@@active
+%D \catcode`\>=\@@active
+%D \gdef\setupgroupedtype%
+%D {\catcode`\<=\@@active
+%D \catcode`\>=\@@active
+%D \def<%
+%D {\def\do%
+%D {\ifx\next<%
+%D \def\next{\bgroup\switchslantedtype\let\next=}%
+%D \else
+%D \let\next=\lesscharacter
+%D \fi
+%D \next}%
+%D \futurelet\next\do}%
+%D \def>%
+%D {\def\do%
+%D {\ifx\next>%
+%D \def\next{\egroup\let\next=}%
+%D \else
+%D \let\next=\morecharacter
+%D \fi
+%D \next}%
+%D \futurelet\next\do}}
+%D \egroup
+%D \stoptypen
+%D
+%D The final implementation looks a bit further and treats the
+%D lone \type{<<} and \type{>>} a bit different.
+
+\def\doenterdoublelesstype%
+ {\ifx\next\egroup
+ \lesscharacter\lesscharacter
+ \else
+ \bgroup\switchslantedtype
+ \let\doenterdoublemoretype=\egroup
+ \fi}
+
+\def\doenterdoublemoretype%
+ {\def\doenterdoubletype%
+ {\ifx\next\egroup
+ \morecharacter\morecharacter
+ \fi}}
+
+\bgroup
+\catcode`\<=\@@active
+\catcode`\>=\@@active
+\gdef\setupgroupedtype%
+ {\catcode`\<=\@@active
+ \catcode`\>=\@@active
+ \def\doless%
+ {\ifx<\next
+ \def\next%
+ {\def\enterdoubletype%
+ {\futurelet\next\doenterdoublelesstype}%
+ \afterassignment\enterdoubletype
+ \let\next=}%
+ \else
+ \let\next=\lesscharacter
+ \fi
+ \next}%
+ \def\domore%
+ {\ifx>\next
+ \def\next%
+ {\def\enterdoubletype%
+ {\futurelet\next\doenterdoublemoretype}%
+ \afterassignment\enterdoubletype
+ \let\next=}%
+ \else
+ \let\next=\morecharacter
+ \fi
+ \next}%
+ \def<{\futurelet\next\doless}%
+ \def>{\futurelet\next\domore}}
+\egroup
+
+\newif\ifslantedtypeactivated
+\newif\ifslantedtypepermitted
+
+\def\switchslantedtype%
+ {\ifslantedtypepermitted
+ \ifslantedtypeactivated
+ \slantedtypeactivatedfalse\tttf
+ \else
+ \slantedtypeactivatedtrue\ttsl
+ \fi
+ \fi}
+
+\def\setupcommandsintype#1%
+ {\setupgroupedtype
+ \edef\!!stringa{\getvalue{#1\c!escape}}%
+ \@EA\catcode\@EA`\!!stringa=\@@escape}
+
+\def\setupslantedtype%
+ {\setupgroupedtype
+ \slantedtypepermittedtrue}
+
+\bgroup
+\catcode`\<=\active
+\catcode`\>=\active
+\gdef\doprotectfirsttype%
+ {\ifx\next<%
+ \let\next=\relax
+ \else\ifx\next\bgroup
+ \let\next=\relax
+ \else\ifx\next\activeleftargument
+ \let\next=\relax
+ \else
+ \let\next=\string
+ \fi\fi\fi
+ \next}
+\egroup
+
+\def\protectfirsttype%
+ {\futurelet\next\doprotectfirsttype}
+
+%D The neccessary initializations are done by calling
+%D \type{\initializetype} which in return calls for the support
+%D macro \type{\setupinlineverbatim}.
+
+\def\initializetype%
+ {\let\obeylines=\ignorelines
+ \setupcommonverbatim{\??ty}%
+ \setupinlineverbatim}
+
+%D \macros
+%D {setuptype}
+%D {}
+%D
+%D Some characteristics of \type{\type} can be set up by:
+
+\def\setuptype%
+ {\dodoubleargument\getparameters[\??ty]}
+
+%D \macros
+%D {typ}
+%D {}
+%D
+%D Although it's not clear from the macros, one character trait
+%D of this macros, which are build on top of the support
+%D module, is that they don't hyphenate. We therefore offer the
+%D alternative \type{\typ}. The current
+%D implementation works all right, but a decent hyphenation
+%D support of \type{\tt} text will be implemented soon.
+
+% \def\obeyhyphens% % after fontswitch
+% {\def\obeyedspace%
+% {\hyphenchar\font=45
+% \spaceskip.5em\!!plus.25em\!!minus.25em\relax%
+% \def\obeyedspace{ }}}
+
+\unexpanded\def\typ%
+ {\bgroup
+ \def\obeyedspace{ }%
+ \tttf\hyphenchar\font=45
+ \ttsl\hyphenchar\font=45
+ \spaceskip.5em\!!plus.25em\!!minus.25em\relax
+ \futurelet\next\dotype}
+
+%D \macros
+%D {tex,arg,mat,dis}
+%D {}
+%D
+%D Sometimes, for instance when we pass verbatim text as an
+%D argument, the fixed \CATCODES\ interfere with our wishes. An
+%D experimental implementation of character by character
+%D processing of verbatim text did overcome this limitation,
+%D but we've decided not to use that slow and sometimes
+%D troublesome solution. Instead we stick to some 'old'
+%D \CONTEXT\ macros for typesetting typical \TEX\ characters.
+%D
+%D The next implementation is more clear but less versatile,
+%D so we treated it for a beter one.
+%D
+%D \starttypen
+%D \def\dospecialtype#1#2%
+%D {\bgroup
+%D \initializetype
+%D \catcode`\{=\@@begingroup
+%D \catcode`\}=\@@endgroup
+%D \def\dospecialtype%
+%D {\def\dospecialtype{#2\egroup}%
+%D \bgroup
+%D \aftergroup\dospecialtype
+%D #1}%
+%D \afterassignment\dospecialtype
+%D \let\next=}
+%D
+%D \unexpanded\def\tex{\dospecialtype\texescape\relax}
+%D \unexpanded\def\arg{\dospecialtype\leftargument\rightargument}
+%D \unexpanded\def\mat{\dospecialtype\$\$}
+%D \unexpanded\def\dis{\dospecialtype{\$\$}{\$\$}}
+%D \stoptypen
+%D
+% %D For sometime we used the better but less readable is
+% %D alternative
+% %D
+% %D \starttypen
+% %D \def\doprocessgroup#1#2#3%
+% %D {\bgroup
+% %D #1%
+% %D \def\doprocessgroup%
+% %D {\def\doprocessgroup{#3\egroup}%
+% %D \bgroup
+% %D \aftergroup\doprocessgroup
+% %D #2}%
+% %D \afterassignment\doprocessgroup
+% %D \let\next=}
+% %D
+% %D \def\setgroupedtype%
+% %D {\initializetype
+% %D \catcode`\{=\@@begingroup
+% %D \catcode`\}=\@@endgroup}
+% %D
+% %D \unexpanded\def\tex{\doprocessgroup\setgroupedtype\texescape\relax}
+% %D \unexpanded\def\arg{\doprocessgroup\setgroupedtype\leftargument\rightargument}
+% %D \unexpanded\def\mat{\doprocessgroup\setgroupedtype\$\$}
+% %D \unexpanded\def\dis{\doprocessgroup\setgroupedtype{\$\$}{\$\$}}
+% %D \stoptypen
+% %D
+%D
+%D But since \type{\groupedcommand} became available, we use
+%D however
+
+\def\setgroupedtype%
+ {\initializetype
+ \catcode`\{=\@@begingroup
+ \catcode`\}=\@@endgroup}
+
+\unexpanded\def\tex{\groupedcommand{\setgroupedtype\texescape}{\relax}}
+\unexpanded\def\arg{\groupedcommand{\setgroupedtype\leftargument}{\rightargument}}
+\unexpanded\def\mat{\groupedcommand{\setgroupedtype\$}{\$}}
+\unexpanded\def\dis{\groupedcommand{\setgroupedtype\$\$}{\$\$}}
+
+%D \macros
+%D {starttyping}
+%D {}
+%D
+%D Display verbatim is realized far more easy, which is mostly
+%D due to the fact that we use \type{\stop...} as delimiter.
+%D The implementation inherits some features, for instance the
+%D support of linenumbering, which can best be studied in the
+%D documented support module.
+
+\def\initializetyping#1%
+ {\doifelsevalue{\??tp#1\c!marge}{\v!standaard}
+ {\ifdim\voorwit=\!!zeropoint
+ \advance\leftskip by \@@sllinks
+ \else
+ \advance\leftskip by \voorwit
+ \fi}
+ {\advance\leftskip by \getvalue{\??tp#1\c!marge}}%
+ \processaction
+ [\getvalue{\??tp#1\c!blanko}]
+ [\v!standaard=>\skip0=\tussenwit,
+ \v!klein=>\skip0=\blankokleinmaat,
+ \v!middel=>\skip0=\blankomiddelmaat,
+ \v!groot=>\skip0=\blankogrootmaat,
+ \v!regel=>\skip0=\baselineskip,
+ \v!geen=>\skip0=\!!zeropoint,
+ \s!unknown=>\skip0=\getvalue{\??tp#1\c!blanko}]%
+ \edef\verbatimbaselineskip{\the\skip0}%
+ \setupcommonverbatim{\??tp#1}}
+
+%D The basic display verbatim commands are defined in an
+%D indirect way. As we will see, they are a specific case of a
+%D more general mechanism.
+
+\def\dostarttyping#1%
+ {\getvalue{\??tp#1\c!voor}%
+ \startopelkaar % includes \bgroup
+ \initializetyping{#1}%
+ \expandafter\processdisplayverbatim\expandafter{\s!stop#1}}
+
+\def\dostoptyping#1%
+ {\stopopelkaar % includes \egroup
+ \getvalue{\??tp#1\c!na}}
+
+%D \macros
+%D {definetyping}
+%D {}
+%D
+%D For most users the standard \type{\start}||\type{\stop}||pair
+%D will suffice, but for documentation purposes the next
+%D definition command can be of use:
+%D
+%D \starttypen
+%D \definetyping[extratyping][margin=3em]
+%D
+%D \startextratyping
+%D these extra ones are indented by 1 em
+%D \stopextratyping
+%D \stoptypen
+%D
+%D The definitions default to the standard typing values.
+
+\def\presettyping[#1][#2]%
+ {\getparameters
+ [\??tp#1]
+ [\c!voor=\@@tpvoor,
+ \c!na=\@@tpna,
+ \c!spatie=\@@tpspatie,
+ \c!pagina=\@@tppagina,
+ \c!tab=\@@tptab,
+ \c!optie=\@@tpoptie,
+ \c!marge=\@@tpmarge,
+ \c!blanko=\@@tpblanko,
+ \c!escape=\@@tpescape,
+ #2]}
+
+\def\dodefinetyping[#1][#2]%
+ {\setvalue{\e!start#1}{\dostarttyping{#1}}%
+ \setvalue{\e!stop#1}{\dostoptyping{#1}}%
+ \presettyping[#1][#2]}
+
+\def\definetyping%
+ {\dodoubleempty\dodefinetyping}
+
+\definetyping[\v!typen]
+
+%D \macros
+%D {setuptyping}
+%D {}
+%D
+%D The setup of typing accepts two arguments. The optional
+%D first one identifies the user defined ones. If only one
+%D argument is given, the values apply to both the standard
+%D command \type{\starttyping} and \type{\typefile}.
+
+%\indirect\def\setuptyping\dodoubleempty[#1][#2]%
+% {\iffirstargument
+% \getparameters[\??tp#1][#2]%
+% \else
+% \getparameters[\??tp][#1]%
+% \fi}
+%
+%\doubleemptied\def\setuptyping[#1][#2]%
+% {\iffirstargument
+% \getparameters[\??tp#1][#2]%
+% \else
+% \getparameters[\??tp][#1]%
+% \fi}
+
+\def\dosetuptyping[#1][#2]%
+ {\ifsecondargument
+ \getparameters[\??tp#1][#2]%
+ \else
+ \getparameters[\??tp][#1]%
+ \fi}
+
+\def\setuptyping%
+ {\dodoubleempty\dosetuptyping}
+
+%D We use the \CONTEXT\ color system for switching to and from
+%D color mode. We can always redefine these colors afterwards.
+
+\definecolor [texprettyone] [r=.9, g=.0, b=.0] % red
+\definecolor [texprettytwo] [r=.0, g=.8, b=.0] % green
+\definecolor [texprettythree] [r=.0, g=.0, b=.9] % blue
+\definecolor [texprettyfour] [r=.8, g=.8, b=.6] % yellow
+
+%D We can use some core color commands. These are faster than
+%D the standard color swithing ones and work ok on a line by
+%D line basis.
+
+\def\texbeginofpretty[#1]{\startcolormode{#1}}
+\def\texendofpretty {\stopcolormode}
+
+%D \macros
+%D {EveryPar, EveryLine, iflinepar}
+%D {}
+%D
+%D One of the features of these commands is the support of
+%D \type{\EveryPar}, \type{\EveryLine} and \type{\iflinepar}.
+%D In the documentation of the verbatim support module we give
+%D some examples of line- and paragraph numerbering using these
+%D macros.
+
+%D \macros
+%D {typefile}
+%D {}
+%D
+%D Typesetting files verbatim (for the moment) only supports
+%D colorization of \TEX\ sources as valid option. The other
+%D setup values are inherited from display verbatim.
+%D The implementation of \type{\typefile} is straightforward:
+
+\presettyping[\v!file][]
+
+\def\typefile#1%
+ {\getvalue{\??tp\v!file\c!voor}%
+ \startopelkaar % includes \bgroup
+ \doifnotvalue{\??tp\v!file\c!optie}{\v!kleur}
+ {\setuptyping[\v!file][\c!optie=\v!geen]}%
+ \initializetyping\v!file
+ \processfileverbatim{#1}%
+ \stopopelkaar % includes \egroup
+ \getvalue{\??tp\v!file\c!na}}
+
+%D The setups for inline verbatim default to:
+
+\setuptype
+ [\c!spatie=\v!uit,
+ \c!pagina=\v!nee,
+ \c!tab=\v!nee,
+ \c!optie=\v!normaal]
+
+%D The setups for display verbatim and file verbatim are
+%D shared. One can adapt the extra defined typing environments,
+%D but they also default to the values below. Watch the
+%D alternative escape character.
+
+\setuptyping
+ [ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!spatie=\v!uit,
+ \c!pagina=\v!nee,
+ \c!tab=\v!aan,
+ \c!optie=\v!geen,
+ \c!marge=\!!zeropoint,
+ \c!blanko=\v!regel,
+ \c!escape=/]
+
+\permitshiftedendofverbatim
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-vis.tex b/tex/context/base/core-vis.tex new file mode 100644 index 000000000..4d6e579a0 --- /dev/null +++ b/tex/context/base/core-vis.tex @@ -0,0 +1,311 @@ +%D \module
+%D [ file=core-vis,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Visualization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D This module adds some more visualization cues to the ones
+%D supplied in the support module.
+%D
+%D %\everypar dual character, \the\everypar and \everypar=
+%D %\hrule cannot be grabbed in advance, switches mode
+%D %\vrule cannot be grabbed in advance, switches mode
+%D %
+%D %\indent only explicit ones
+%D %\noindent only explicit ones
+%D %\par only explicit ones
+%D
+%D %\leftskip only if explicit one
+%D %\rightskip only if explicit one
+
+\writestatus{loading}{Context Support Macros / Visualization}
+
+\unprotect
+
+%D \macros
+%D {indent, noindent,
+%D leavevmode,
+%D par}
+%D {}
+%D
+%D \TeX\ acts upon paragraphs. In mosts documents paragraphs
+%D are separated by empty lines, which internally are handled as
+%D \type{\par}. Paragraphs can be indented or not, depending on
+%D the setting of \type{\parindent}, the first token of a
+%D paragraph and/or user suppressed or forced indentation.
+%D
+%D Because the actual typesetting is based on both explicit
+%D user and implicit system actions, visualization is only
+%D possible for the user supplied \type{\indent},
+%D \type{\noindent}, \type{\leavevmode} and \type{\par}. Other
+%D 'clever' tricks will quite certainly lead to more failures
+%D than successes, so we only support these three explicit
+%D primitives and one macro:
+
+\let\normalnoindent = \noindent
+\let\normalindent = \indent
+\let\normalpar = \par
+
+\let\normalleavevmode = \leavevmode
+
+\def\showparagraphcue#1#2#3#4#5%
+ {\bgroup
+ \scratchdimen#1\relax
+ \dontinterfere
+ \dontcomplain
+ \boxrulewidth=5\testrulewidth
+ #3#4\relax
+ \setbox0=\normalhbox to \scratchdimen
+ {#2{\ruledhbox to \scratchdimen
+ {\vrule
+ #5 20\testrulewidth
+ \!!width \!!zeropoint
+ \normalhss}}}%
+ \smashbox0
+ \normalpenalty\!!tenthousand
+ \box0
+ \egroup}
+
+\def\ruledhanging%
+ {\ifdim\hangindent>\!!zeropoint\relax
+ \ifnum\hangafter<0
+ \normalhbox
+ {\boxrulewidth=5\testrulewidth
+ \setbox0=\ruledhbox to \hangindent
+ {\scratchdimen=\ht\strutbox
+ \advance\scratchdimen by \dp\strutbox
+ \vrule
+ \!!width\!!zeropoint
+ \!!height\!!zeropoint
+ \!!depth-\hangafter\scratchdimen}%
+ \normalhskip-\hangindent
+ \smashbox0
+ \raise\ht\strutbox\box0}%
+ \fi
+ \fi}
+
+\def\ruledparagraphcues%
+ {\bgroup
+ \dontcomplain
+ \normalhbox to \!!zeropoint
+ {\ifdim\leftskip>\!!zeropoint\relax
+ \showparagraphcue\leftskip\llap\relax\relax\!!depth
+ \normalhskip-\leftskip
+ \fi
+ \ruledhanging
+ \normalhskip\hsize
+ \ifdim\rightskip>\!!zeropoint\relax
+ \normalhskip-\rightskip
+ \showparagraphcue\rightskip\relax\relax\relax\!!depth
+ \fi}%
+ \egroup}
+
+\def\ruledpar%
+ {\relax
+ \ifhmode
+ \showparagraphcue{40\testrulewidth}\relax\rightrulefalse\relax\!!height
+ \fi
+ \normalpar}
+
+\def\rulednoindent%
+ {\relax
+ \normalnoindent
+ \ruledparagraphcues
+ \showparagraphcue{40\testrulewidth}\llap\leftrulefalse\relax\!!height}
+
+\def\ruledindent%
+ {\relax
+ \normalnoindent
+ \ruledparagraphcues
+ \ifdim\parindent>\!!zeropoint\relax
+ \showparagraphcue\parindent\relax\relax\relax\!!height
+ \else
+ \showparagraphcue{40\testrulewidth}\llap\relax\relax\!!height
+ \fi
+ \normalhskip\parindent}
+
+\def\ruledleavevmode%
+ {\relax
+ \normalleavevmode
+ \ifdim\parindent>\!!zeropoint\relax
+ \normalhskip-\parindent
+ \ruledparagraphcues
+ \showparagraphcue\parindent\relax\leftrulefalse\rightrulefalse\!!height
+ \normalhskip\parindent
+ \else
+ \ruledparagraphcues
+ \showparagraphcue{40\testrulewidth}\llap\leftrulefalse\rightrulefalse\!!height
+ \fi}
+
+\def\dontshowimplicits%
+ {\let\noindent = \normalnoindent
+ \let\indent = \normalindent
+ \let\leavevmode = \normalleavevmode
+ \let\par = \normalpar}
+
+\def\showimplicits%
+ {\testrulewidth = \defaulttestrulewidth
+ \let\noindent = \rulednoindent
+ \let\indent = \ruledindent
+ \let\leavevmode = \ruledleavevmode
+ \let\par = \ruledpar}
+
+%D The next few||line examples show the four cues. Keep in
+%D mind that we only see them when we explicitly open or close
+%D a paragraph.
+%D
+%D \bgroup
+%D \def\voorbeeld#1%
+%D {#1Visualizing some \TeX\ primitives and Plain \TeX\
+%D macros can be very instructive, at least it is to me.
+%D Here we see {\tt\string#1} and {\tt\string\ruledpar} in
+%D action, while {\tt\string\parindent} equals
+%D {\tt\the\parindent}.\ruledpar}
+%D
+%D \showimplicits
+%D
+%D \voorbeeld \indent
+%D \voorbeeld \noindent
+%D \voorbeeld \leavevmode
+%D
+%D \parindent=60pt
+%D
+%D \voorbeeld \indent
+%D \voorbeeld \noindent
+%D \voorbeeld \leavevmode
+%D
+%D \startsmaller
+%D \voorbeeld \indent
+%D \voorbeeld \noindent
+%D \voorbeeld \leavevmode
+%D \stopsmaller
+%D \egroup
+%D
+%D These examples also demonstrate the visualization of
+%D \type{\leftskip} and \type{\rightskip}.
+
+\newcounter\ruledbaselines
+
+\def\debuggertext#1%
+ {\ifx\ttxx\undefined
+ $\scriptscriptstyle#1$%
+ \else
+ {\ttxx#1}%
+ \fi}
+
+\def\ruledbaseline%
+ {\vrule \!!width \!!zeropoint
+ \bgroup
+ \dontinterfere
+ \doglobal\increment\ruledbaselines
+ \scratchdimen=3\baselineskip
+ \setbox\scratchbox=\normalvbox to 2\scratchdimen
+ {\leaders
+ \normalhbox
+ {\strut
+ \vrule
+ \!!height \testrulewidth
+ \!!depth \testrulewidth
+ \!!width 120pt}
+ \normalvfill}%
+ \smashbox\scratchbox
+ \advance\scratchdimen by \strutheightfactor\baselineskip
+ \setbox\scratchbox=\normalhbox
+ {\normalhskip -48pt
+ \normalhbox to 24pt
+ {\normalhss\debuggertext\ruledbaselines\normalhskip6pt}%
+ \raise\scratchdimen\box\scratchbox}%
+ \smashbox\scratchbox
+ \box\scratchbox
+ \egroup}
+
+\def\showbaselines%
+ {\testrulewidth=\defaulttestrulewidth
+ \EveryPar{\ruledbaseline}}
+
+%D {\em Not yet documented!}
+
+\def\makecutbox#1%
+ {\edef\ruledheight{\the\ht#1}%
+ \edef\ruleddepth {\the\dp#1}%
+ \edef\ruledwidth {\the\wd#1}%
+ \setbox\scratchbox=\normalvbox
+ {\dontcomplain
+ \offinterlineskip
+ \scratchdimen=12pt\relax
+ \def\verrule##1##2%
+ {\vrule
+ \!!width\boxrulewidth
+ \!!height##1\scratchdimen
+ \!!depth##2\scratchdimen}%
+ \def\horrule##1##2##3%
+ {\normalhskip##1\scratchdimen
+ \vrule
+ \!!height\boxrulewidth
+ \!!width##2\scratchdimen
+ \normalhskip##3\scratchdimen}%
+ \normalvskip-3\scratchdimen
+ \normalhbox to \ruledwidth
+ {\verrule{3}{-1}\normalhss\verrule{3}{-1}}%
+ \normalhbox to \ruledwidth
+ {\horrule{-3}{2}{1}\normalhss\horrule{1}{2}{-3}}%
+ \normalvskip-\boxrulewidth
+ \vskip\ruledheight
+ \ifdim\ruleddepth>\!!zeropoint\relax
+ \normalvskip-.5\boxrulewidth
+ \normalhbox to \ruledwidth
+ {\horrule{-2}{1}{1}\normalhss\horrule{1}{1}{-2}}%
+ \normalvskip-.5\boxrulewidth
+ \vskip\ruleddepth
+ \fi
+ \normalvskip-\boxrulewidth
+ \normalhbox to \ruledwidth
+ {\horrule{-3}{2}{1}\normalhss\horrule{1}{2}{-3}}%
+ \normalhbox to \ruledwidth
+ {\verrule{-1}{3}\normalhss\verrule{-1}{3}}}%
+ \dp\scratchbox=\ruleddepth % This re-bounding is needed and
+ \ht\scratchbox=\ruledheight % surfaced while typesetting continuous
+ \setbox\scratchbox=\normalhbox % double culumns with pagecutmark
+ {\lower\ruleddepth\box\scratchbox}%
+ \setbox#1=\ifhbox#1\normalhbox\else\normalvbox\fi
+ {\normalhbox
+ {\wd#1=\!!zeropoint
+ \box#1\relax
+ \box\scratchbox}}%
+ \wd#1=\ruledwidth
+ \ht#1=\ruledheight
+ \dp#1=\ruleddepth}
+
+\def\cuthbox%
+ {\normalhbox\bgroup
+ \dowithnextbox{\makecutbox\nextbox\box\nextbox\egroup}%
+ \normalhbox}
+
+\def\cutvbox%
+ {\normalvbox\bgroup
+ \dowithnextbox{\makecutbox\nextbox\box\nextbox\egroup}%
+ \normalvbox}
+
+\def\cutvtop%
+ {\normalvtop\bgroup
+ \dowithnextbox{\makecutbox\nextbox\box\nextbox\egroup}%
+ \normalvtop}
+
+%
+% \cutvbox
+% \cutvtop
+% \cuthbox
+%
+% \cutvbox{\ruledvbox{hello\par world \par \strut ziezo}}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/docs-ini.tex b/tex/context/base/docs-ini.tex new file mode 100644 index 000000000..b78dfca0f --- /dev/null +++ b/tex/context/base/docs-ini.tex @@ -0,0 +1,41 @@ +%D \module
+%D [ file=docs-ini,
+%D versie=1995.10.10,
+%D naam=\CONTEXT\ Document Macros (ini),
+%D auteur=J. Hagen,
+%D datum=\currentdate,
+%D copyright=J. Hagen]
+
+\writestatus{loading}{Context Document Macros (ini)}
+
+\unprotect
+
+%I n=Documenten
+%I c=\startdocument
+%I
+%I Ten behoeve van veel voorkomende soorten documenten
+%I zijn speciale commando's beschikbaar. Bij dergelijke
+%I documenten worden in plaats van de gebruikelijke
+%I commando's \starttekst..\stoptekst de onderstaande
+%I commando's gebruikt:
+%I
+%I \startdocument[soort document]
+%I \stopdocument
+%I
+%I Documenten worden gedefinieerd in files met de naam
+%I docs-xxx, waarbij xxx de eerste drie letters van het
+%I soort overzicht zijn.
+%I
+%I Vooralsnog zijn alleen 'brief', 'sheet', 'sticker' en
+%I 'lijst' beschikbaar.
+
+\definieerfilegroep
+ [document]
+ [file=docs,
+ voor=\starttekst,
+ na=\stoptekst]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-ams.tex b/tex/context/base/font-ams.tex new file mode 100644 index 000000000..265b6d6d9 --- /dev/null +++ b/tex/context/base/font-ams.tex @@ -0,0 +1,497 @@ +%D \module
+%D [ file=font-ams,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=AMS Math Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D Here we implement the symbol fonts as provided by the
+%D American Mathematical Society. The names of these symbols
+%D can be found in The Joy of \TeX\ by M.~Spivak.
+%D
+%D First we extend the already defined font sets a bit. We make
+%D use of the \type{sa} option.
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt] [mm]
+ [ma=msam10 sa 1,
+ mb=msbm10 sa 1]
+
+\definecorps [8pt,7pt] [mm]
+ [ma=msam7 sa 1,
+ mb=msbm7 sa 1]
+
+\definecorps [6pt,5pt,4pt] [mm]
+ [ma=msam5 sa 1,
+ mb=msbm5 sa 1]
+
+%D We already have defined some additional math families. This
+%D means that do not have to do this again. It would exhaust our
+%D limited pool of \type{\fam}'s anyway.
+
+\unprotect
+
+\let\msafam@=\hexmafam
+\let\msbfam@=\hexmbfam
+
+\protect
+
+%D The following piece of \TEX\ is part of the distribution
+%D of the \AMS\ fonts. The macros are slightly adapted to the
+%D \CONTEXT\ way of font handling, which means that we have
+%D commented out some sections. The comments are original.
+
+%D \starttypen
+%D %% @texfile{
+%D %% filename="amssym.def",
+%D %% version="2.1",
+%D %% date="5-APR-1991",
+%D %% filetype="TeX: option",
+%D %% copyright="Copyright (C) American Mathematical Society,
+%D %% all rights reserved. Copying of this file is
+%D %% authorized only if either:
+%D %% (1) you make absolutely no changes to your copy
+%D %% including name; OR
+%D %% (2) if you do make changes, you first rename it to some
+%D %% other name.",
+%D %% author="American Mathematical Society",
+%D %% address="American Mathematical Society,
+%D %% Technical Support Department,
+%D %% P. O. Box 6248,
+%D %% Providence, RI 02940,
+%D %% USA",
+%D %% telephone="401-455-4080 or (in the USA) 800-321-4AMS",
+%D %% email="Internet: Tech-Support@Math.AMS.org",
+%D %% codetable="ISO/ASCII",
+%D %% checksumtype="line count",
+%D %% checksum="108",
+%D %% keywords="amsfonts, tex",
+%D %% abstract="This file contains definitions that perform the same
+%D %% functions as similar ones in AMS-TeX, so that the file
+%D %% AMSSYM.TEX can be used outside of AMS-TeX. Instructions
+%D %% for using this file and the AMS symbol fonts are
+%D %% included in the AMSFonts 2.0 User's Guide."
+%D %% }
+%D \stoptypen
+
+\expandafter\ifx\csname amssym.def\endcsname\relax \else\endinput\fi
+
+%D Store the catcode of the @ in the csname so that it can be
+%D restored later.
+
+\expandafter\edef\csname amssym.def\endcsname%
+ {\catcode`\noexpand\@=\the\catcode`\@\normalspace}
+
+%D Set the catcode to 11 for use in private control sequence
+%D names.
+
+\catcode`\@=11
+
+%D Include all definitions related to the fonts msam, msbm and
+%D eufm, so that when this file is used by itself, the results
+%D with respect to those fonts are equivalent to what they
+%D would have been using \AMSTEX. Most symbols in fonts msam
+%D and msbm are defined using \type{\newsymbol}; however, a few
+%D symbols that replace composites defined in plain must be
+%D defined with \type{\mathchardef}.
+
+\def\undefine#1%
+ {\let#1\undefined}
+
+\def\newsymbol#1#2#3#4#5%
+ {\let\next@\relax
+ \ifnum#2=\@ne
+ \let\next@\msafam@
+ \else
+ \ifnum#2=\tw@
+ \let\next@\msbfam@
+ \fi
+ \fi
+ \mathchardef#1="#3\next@#4#5}
+
+\def\mathhexbox@#1#2#3%
+ {\relax
+ \ifmmode
+ \mathpalette{}{\m@th\mathchar"#1#2#3}%
+ \else
+ \leavevmode
+ \hbox{$\m@th\mathchar"#1#2#3$}%
+ \fi}
+
+%D \starttypen
+%D \def\hexnumber@#1%
+%D {\ifcase#1
+%D 0\or 1\or 2\or 3\or
+%D 4\or 5\or 6\or 7\or
+%D 8\or 9\or A\or B\or
+%D C\or D\or E\or F\fi}
+%D
+%D \font\tenmsa=msam10
+%D \font\sevenmsa=msam7
+%D \font\fivemsa=msam5
+%D \newfam\msafam
+%D \textfont\msafam=\tenmsa
+%D \scriptfont\msafam=\sevenmsa
+%D \scriptscriptfont\msafam=\fivemsa
+%D
+%D \edef\msafam@%
+%D {\hexnumber@\msafam}
+%D \stoptypen
+
+\mathchardef\dabar@"0\msafam@39
+
+\def\dashrightarrow {\mathrel{\dabar@\dabar@\mathchar"0\msafam@4B}}
+\def\dashleftarrow {\mathrel{\mathchar"0\msafam@4C\dabar@\dabar@}}
+\let\dasharrow \dashrightarrow
+\def\ulcorner {\delimiter"4\msafam@70\msafam@70 }
+\def\urcorner {\delimiter"5\msafam@71\msafam@71 }
+\def\llcorner {\delimiter"4\msafam@78\msafam@78 }
+\def\lrcorner {\delimiter"5\msafam@79\msafam@79 }
+\def\yen {{\mathhexbox@\msafam@55 }}
+\def\checkmark {{\mathhexbox@\msafam@58 }}
+\def\circledR {{\mathhexbox@\msafam@72 }}
+\def\maltese {{\mathhexbox@\msafam@7A }}
+
+%D \starttypen
+%D \font\tenmsb=msbm10
+%D \font\sevenmsb=msbm7
+%D \font\fivemsb=msbm5
+%D \newfam\msbfam
+%D \textfont\msbfam=\tenmsb
+%D \scriptfont\msbfam=\sevenmsb
+%D \scriptscriptfont\msbfam=\fivemsb
+%D
+%D \edef\msbfam@%
+%D {\hexnumber@\msbfam}
+%D \stoptypen
+
+\def\Bbb#1%
+ {{\fam\msbfam\relax#1}}
+
+\def\widehat#1%
+ {\setbox\z@\hbox{$\m@th#1$}%
+ \ifdim\wd\z@>\tw@ em%
+ \mathaccent"0\msbfam@5B{#1}%
+ \else
+ \mathaccent"0362{#1}%
+ \fi}
+
+\def\widetilde#1%
+ {\setbox\z@\hbox{$\m@th#1$}%
+ \ifdim\wd\z@>\tw@ em%
+ \mathaccent"0\msbfam@5D{#1}%
+ \else
+ \mathaccent"0365{#1}%
+ \fi}
+
+%D \starttypen
+%D \font\teneufm=eufm10
+%D \font\seveneufm=eufm7
+%D \font\fiveeufm=eufm5
+%D \newfam\eufmfam
+%D \textfont\eufmfam=\teneufm
+%D \scriptfont\eufmfam=\seveneufm
+%D \scriptscriptfont\eufmfam=\fiveeufm
+%D \def\frak#1{{\fam\eufmfam\relax#1}}
+%D \let\goth\frak
+%D \stoptypen
+
+%D Restore the catcode value for @ that was previously saved.
+
+\csname amssym.def\endcsname
+
+%D \starttypen
+%D %% @texfile{
+%D %% filename="amssym.tex",
+%D %% version="2.1a",
+%D %% date="31-OCT-1991",
+%D %% filetype="TeX: option",
+%D %% copyright="Copyright (C) American Mathematical Society,
+%D %% all rights reserved. Copying of this file is
+%D %% authorized only if either:
+%D %% (1) you make absolutely no changes to your copy
+%D %% including name; OR
+%D %% (2) if you do make changes, you first rename it to some
+%D %% other name.",
+%D %% author="American Mathematical Society",
+%D %% address="American Mathematical Society,
+%D %% Technical Support Department,
+%D %% P. O. Box 6248,
+%D %% Providence, RI 02940,
+%D %% USA",
+%D %% telephone="401-455-4080 or (in the USA) 800-321-4AMS",
+%D %% email="Internet: Tech-Support@Math.AMS.org",
+%D %% codetable="ISO/ASCII",
+%D %% checksumtype="line count",
+%D %% checksum="279",
+%D %% keywords="amstex, ams-tex, tex, amsfonts, math symbols",
+%D %% abstract="This file defines names for all the math symbols in
+%D %% the math symbol fonts of the AMSFonts package (MSAM and
+%D %% MSBM). If this file is not used by way of the AMS-TeX
+%D %% \UseAMSsymbols command, it must be used in conjunction
+%D %% with AMSSYM.DEF, which provides a definition of the
+%D %% \newsymbol and \undefine commands.
+%D %% Instructions for using the AMS symbol fonts are
+%D %% included in: AMS-TeX 2.1 User's Guide; AMSFonts 2.1
+%D %% User's Guide; The Joy of TeX, editions dated 1990 or
+%D %% later."
+%D %% }
+%D \stoptypen
+
+%D Save the current value of the @-sign catcode so that it can
+%D be restored afterwards. This allows us to call amssym.tex
+%D either within an \AMSTEX\ document style file or by itself,
+%D in addition to providing a means of testing whether the file
+%D has been previously loaded. We want to avoid inputting this
+%D file twice because when \AMSTEX\ is being used
+%D \type{\newsymbol} will give an error message if used to
+%D define a control sequence name that is already defined.
+
+%D If the csname is not equal to \type{\relax}, we assume this
+%D file has already been loaded and \type{\endinput}
+%D immediately.
+
+\expandafter\ifx\csname pre amssym.tex at\endcsname\relax \else \endinput\fi
+
+%D Otherwise we store the catcode of the @ in the csname.
+
+\expandafter\chardef\csname pre amssym.tex at\endcsname=\the\catcode`\@
+
+%D Set the catcode to 11 for use in private control sequence
+%D names.
+
+\catcode`\@=11
+
+%D Most symbols in fonts msam and msbm are defined using
+%D \type{\newsymbol}. A few that are delimiters or otherwise
+%D require special treatment have already been defined as soon
+%D as the fonts were loaded. Finally, a few symbols that
+%D replace composites defined in plain must be undefined first.
+
+\newsymbol\boxdot 1200
+\newsymbol\boxplus 1201
+\newsymbol\boxtimes 1202
+\newsymbol\square 1003
+\newsymbol\blacksquare 1004
+\newsymbol\centerdot 1205
+\newsymbol\lozenge 1006
+\newsymbol\blacklozenge 1007
+\newsymbol\circlearrowright 1308
+\newsymbol\circlearrowleft 1309
+\undefine\rightleftharpoons
+\newsymbol\rightleftharpoons 130A
+\newsymbol\leftrightharpoons 130B
+\newsymbol\boxminus 120C
+\newsymbol\Vdash 130D
+\newsymbol\Vvdash 130E
+\newsymbol\vDash 130F
+\newsymbol\twoheadrightarrow 1310
+\newsymbol\twoheadleftarrow 1311
+\newsymbol\leftleftarrows 1312
+\newsymbol\rightrightarrows 1313
+\newsymbol\upuparrows 1314
+\newsymbol\downdownarrows 1315
+\newsymbol\upharpoonright 1316
+ \let\restriction\upharpoonright
+\newsymbol\downharpoonright 1317
+\newsymbol\upharpoonleft 1318
+\newsymbol\downharpoonleft 1319
+\newsymbol\rightarrowtail 131A
+\newsymbol\leftarrowtail 131B
+\newsymbol\leftrightarrows 131C
+\newsymbol\rightleftarrows 131D
+\newsymbol\Lsh 131E
+\newsymbol\Rsh 131F
+\newsymbol\rightsquigarrow 1320
+\newsymbol\leftrightsquigarrow 1321
+\newsymbol\looparrowleft 1322
+\newsymbol\looparrowright 1323
+\newsymbol\circeq 1324
+\newsymbol\succsim 1325
+\newsymbol\gtrsim 1326
+\newsymbol\gtrapprox 1327
+\newsymbol\multimap 1328
+\newsymbol\therefore 1329
+\newsymbol\because 132A
+\newsymbol\doteqdot 132B
+ \let\Doteq\doteqdot
+\newsymbol\triangleq 132C
+\newsymbol\precsim 132D
+\newsymbol\lesssim 132E
+\newsymbol\lessapprox 132F
+\newsymbol\eqslantless 1330
+\newsymbol\eqslantgtr 1331
+\newsymbol\curlyeqprec 1332
+\newsymbol\curlyeqsucc 1333
+\newsymbol\preccurlyeq 1334
+\newsymbol\leqq 1335
+\newsymbol\leqslant 1336
+\newsymbol\lessgtr 1337
+\newsymbol\backprime 1038
+\newsymbol\risingdotseq 133A
+\newsymbol\fallingdotseq 133B
+\newsymbol\succcurlyeq 133C
+\newsymbol\geqq 133D
+\newsymbol\geqslant 133E
+\newsymbol\gtrless 133F
+\newsymbol\sqsubset 1340
+\newsymbol\sqsupset 1341
+\newsymbol\vartriangleright 1342
+\newsymbol\vartriangleleft 1343
+\newsymbol\trianglerighteq 1344
+\newsymbol\trianglelefteq 1345
+\newsymbol\bigstar 1046
+\newsymbol\between 1347
+\newsymbol\blacktriangledown 1048
+\newsymbol\blacktriangleright 1349
+\newsymbol\blacktriangleleft 134A
+\newsymbol\vartriangle 134D
+\newsymbol\blacktriangle 104E
+\newsymbol\triangledown 104F
+\newsymbol\eqcirc 1350
+\newsymbol\lesseqgtr 1351
+\newsymbol\gtreqless 1352
+\newsymbol\lesseqqgtr 1353
+\newsymbol\gtreqqless 1354
+\newsymbol\Rrightarrow 1356
+\newsymbol\Lleftarrow 1357
+\newsymbol\veebar 1259
+\newsymbol\barwedge 125A
+\newsymbol\doublebarwedge 125B
+\undefine\angle
+\newsymbol\angle 105C
+\newsymbol\measuredangle 105D
+\newsymbol\sphericalangle 105E
+\newsymbol\varpropto 135F
+\newsymbol\smallsmile 1360
+\newsymbol\smallfrown 1361
+\newsymbol\Subset 1362
+\newsymbol\Supset 1363
+\newsymbol\Cup 1264
+ \let\doublecup\Cup
+\newsymbol\Cap 1265
+ \let\doublecap\Cap
+\newsymbol\curlywedge 1266
+\newsymbol\curlyvee 1267
+\newsymbol\leftthreetimes 1268
+\newsymbol\rightthreetimes 1269
+\newsymbol\subseteqq 136A
+\newsymbol\supseteqq 136B
+\newsymbol\bumpeq 136C
+\newsymbol\Bumpeq 136D
+\newsymbol\lll 136E
+ \let\llless\lll
+\newsymbol\ggg 136F
+ \let\gggtr\ggg
+\newsymbol\circledS 1073
+\newsymbol\pitchfork 1374
+\newsymbol\dotplus 1275
+\newsymbol\backsim 1376
+\newsymbol\backsimeq 1377
+\newsymbol\complement 107B
+\newsymbol\intercal 127C
+\newsymbol\circledcirc 127D
+\newsymbol\circledast 127E
+\newsymbol\circleddash 127F
+\newsymbol\lvertneqq 2300
+\newsymbol\gvertneqq 2301
+\newsymbol\nleq 2302
+\newsymbol\ngeq 2303
+\newsymbol\nless 2304
+\newsymbol\ngtr 2305
+\newsymbol\nprec 2306
+\newsymbol\nsucc 2307
+\newsymbol\lneqq 2308
+\newsymbol\gneqq 2309
+\newsymbol\nleqslant 230A
+\newsymbol\ngeqslant 230B
+\newsymbol\lneq 230C
+\newsymbol\gneq 230D
+\newsymbol\npreceq 230E
+\newsymbol\nsucceq 230F
+\newsymbol\precnsim 2310
+\newsymbol\succnsim 2311
+\newsymbol\lnsim 2312
+\newsymbol\gnsim 2313
+\newsymbol\nleqq 2314
+\newsymbol\ngeqq 2315
+\newsymbol\precneqq 2316
+\newsymbol\succneqq 2317
+\newsymbol\precnapprox 2318
+\newsymbol\succnapprox 2319
+\newsymbol\lnapprox 231A
+\newsymbol\gnapprox 231B
+\newsymbol\nsim 231C
+\newsymbol\ncong 231D
+\newsymbol\diagup 231E
+\newsymbol\diagdown 231F
+\newsymbol\varsubsetneq 2320
+\newsymbol\varsupsetneq 2321
+\newsymbol\nsubseteqq 2322
+\newsymbol\nsupseteqq 2323
+\newsymbol\subsetneqq 2324
+\newsymbol\supsetneqq 2325
+\newsymbol\varsubsetneqq 2326
+\newsymbol\varsupsetneqq 2327
+\newsymbol\subsetneq 2328
+\newsymbol\supsetneq 2329
+\newsymbol\nsubseteq 232A
+\newsymbol\nsupseteq 232B
+\newsymbol\nparallel 232C
+\newsymbol\nmid 232D
+\newsymbol\nshortmid 232E
+\newsymbol\nshortparallel 232F
+\newsymbol\nvdash 2330
+\newsymbol\nVdash 2331
+\newsymbol\nvDash 2332
+\newsymbol\nVDash 2333
+\newsymbol\ntrianglerighteq 2334
+\newsymbol\ntrianglelefteq 2335
+\newsymbol\ntriangleleft 2336
+\newsymbol\ntriangleright 2337
+\newsymbol\nleftarrow 2338
+\newsymbol\nrightarrow 2339
+\newsymbol\nLeftarrow 233A
+\newsymbol\nRightarrow 233B
+\newsymbol\nLeftrightarrow 233C
+\newsymbol\nleftrightarrow 233D
+\newsymbol\divideontimes 223E
+\newsymbol\varnothing 203F
+\newsymbol\nexists 2040
+\newsymbol\Finv 2060
+\newsymbol\Game 2061
+\newsymbol\mho 2066
+\newsymbol\eth 2067
+\newsymbol\eqsim 2368
+\newsymbol\beth 2069
+\newsymbol\gimel 206A
+\newsymbol\daleth 206B
+\newsymbol\lessdot 236C
+\newsymbol\gtrdot 236D
+\newsymbol\ltimes 226E
+\newsymbol\rtimes 226F
+\newsymbol\shortmid 2370
+\newsymbol\shortparallel 2371
+\newsymbol\smallsetminus 2272
+\newsymbol\thicksim 2373
+\newsymbol\thickapprox 2374
+\newsymbol\approxeq 2375
+\newsymbol\succapprox 2376
+\newsymbol\precapprox 2377
+\newsymbol\curvearrowleft 2378
+\newsymbol\curvearrowright 2379
+\newsymbol\digamma 207A
+\newsymbol\varkappa 207B
+\newsymbol\Bbbk 207C
+\newsymbol\hslash 207D
+\undefine\hbar
+\newsymbol\hbar 207E
+\newsymbol\backepsilon 237F
+
+%D Restore the catcode value for @ that was previously saved.
+
+\catcode`\@=\csname pre amssym.tex at\endcsname
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-cmr.tex b/tex/context/base/font-cmr.tex new file mode 100644 index 000000000..f642f5ca5 --- /dev/null +++ b/tex/context/base/font-cmr.tex @@ -0,0 +1,502 @@ +%D \module
+%D [ file=font-cmr,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Computer Modern,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D The Computer Modern Roman is derived from the Monotype~8a
+%D Times Roman. In this module, that is loaded by default, we
+%D define all relevant alternatives.
+
+\definecorps [12pt] [rm]
+ [tf=cmr12,
+ bf=cmbx12,
+ it=cmti12,
+ sl=cmsl12,
+ bi=cmbxti10 at 12pt,
+ bs=cmbxsl10 at 12pt,
+ tfa=cmr12 scaled \magstep1,
+ tfb=cmr12 scaled \magstep2,
+ tfc=cmr12 scaled \magstep3,
+ tfd=cmr12 scaled \magstep4,
+ sc=cmcsc10 at 12pt]
+
+\definecorps [12pt] [ss]
+ [tf=cmss12,
+ bf=cmssbx10 at 12pt,
+ it=cmssi12,
+ sl=cmssi12,
+ bi=cmssbx10 at 12pt,
+ bs=cmssbx10 at 12pt,
+ tfa=cmss12 scaled \magstep1,
+ tfb=cmss12 scaled \magstep2,
+ tfc=cmss12 scaled \magstep3,
+ tfd=cmss12 scaled \magstep4,
+ sc=cmss10]
+
+\definecorps [12pt] [tt]
+ [tf=cmtt12,
+ sl=cmsltt10 at 12pt,
+ it=cmitt10 at 12pt,
+ tfa=cmtt12 scaled \magstep1,
+ tfb=cmtt12 scaled \magstep2,
+ tfc=cmtt12 scaled \magstep3,
+ tfd=cmtt12 scaled \magstep4]
+
+\definecorps [12pt] [mm]
+ [ex=cmex10 at 12pt,
+ mi=cmmi12,
+ sy=cmsy10 at 12pt]
+
+\definecorps [12pt] [hw]
+ [tf=cmtt12]
+
+\definecorps [12pt] [cg]
+ [tf=cmtt12]
+
+\definecorps [11pt] [rm]
+ [tf=cmr10 at 11pt,
+ bf=cmbx10 at 11pt,
+ sl=cmsl10 at 11pt,
+ it=cmti10 at 11pt,
+ bi=cmbxti10 at 11pt,
+ bs=cmbxsl10 at 11pt,
+ tfa=cmr9 scaled \magstep2,
+ tfb=cmr9 scaled \magstep3,
+ tfc=cmr9 scaled \magstep4,
+ tfd=cmr9 scaled \magstep5,
+ sc=cmcsc10 at 11pt]
+
+\definecorps [11pt] [ss]
+ [tf=cmss10 at 11pt,
+ bf=cmssbx10 at 11pt,
+ it=cmssi10 at 11pt,
+ sl=cmssi10 at 11pt,
+ bi=cmssbx10 at 11pt,
+ bs=cmssbx10 at 11pt,
+ tfa=cmss9 scaled \magstep2,
+ tfb=cmss9 scaled \magstep3,
+ tfc=cmss9 scaled \magstep4,
+ tfd=cmss9 scaled \magstep5,
+ sc=cmss9]
+
+\definecorps [11pt] [tt]
+ [tf=cmtt10 at 11pt,
+ sl=cmsltt10 at 11pt,
+ it=cmitt10 at 11pt]
+
+\definecorps [11pt] [mm]
+ [ex=cmex10 at 11pt,
+ mi=cmmi10 at 11pt,
+ sy=cmsy10 at 11pt]
+
+\definecorps [11pt] [hw]
+ [tf=cmtt10 at 11pt]
+
+\definecorps [11pt] [cg]
+ [tf=cmtt10 at 11pt]
+
+\definecorps [10pt] [rm]
+ [tf=cmr10,
+ bf=cmbx10,
+ it=cmti10,
+ sl=cmsl10,
+ bi=cmbxti10,
+ bs=cmbxsl10,
+ tfa=cmr10 scaled \magstep1,
+ tfb=cmr10 scaled \magstep2,
+ tfc=cmr10 scaled \magstep3,
+ tfd=cmr10 scaled \magstep4,
+ sc=cmcsc10]
+
+\definecorps [10pt] [ss]
+ [tf=cmss10,
+ bf=cmssbx10,
+ it=cmssi10,
+ sl=cmssi10,
+ bi=cmssbx10,
+ bs=cmssbx10,
+ tfa=cmss10 scaled \magstep1,
+ tfb=cmss10 scaled \magstep2,
+ tfc=cmss10 scaled \magstep3,
+ tfd=cmss10 scaled \magstep4,
+ sc=cmss8]
+
+\definecorps [10pt] [tt]
+ [tf=cmtt10,
+ sl=cmsltt10,
+ it=cmitt10,
+ tfa=cmtt10 scaled \magstep1,
+ tfb=cmtt10 scaled \magstep2,
+ tfc=cmtt10 scaled \magstep3,
+ tfd=cmtt10 scaled \magstep4]
+
+\definecorps [10pt] [mm]
+ [ex=cmex10,
+ mi=cmmi10,
+ sy=cmsy10]
+
+\definecorps [10pt] [hw]
+ [tf=cmtt10]
+
+\definecorps [10pt] [cg]
+ [tf=cmtt10]
+
+\definecorps [9pt] [rm]
+ [tf=cmr9,
+ bf=cmbx9,
+ it=cmti9,
+ sl=cmsl9,
+ bi=cmbxti10 at 9pt,
+ bs=cmbxsl10 at 9pt,
+ tfa=cmr9 scaled \magstep1,
+ tfb=cmr9 scaled \magstep2,
+ tfc=cmr9 scaled \magstep3,
+ tfd=cmr9 scaled \magstep4,
+ sc=cmcsc10 at 9pt]
+
+\definecorps [9pt] [ss]
+ [tf=cmss9,
+ bf=cmssbx10 at 9pt,
+ it=cmssi9,
+ sl=cmssi9,
+ bi=cmssbx10 at 9pt,
+ bs=cmssbx10 at 9pt,
+ tfa=cmss9 scaled \magstep1,
+ tfb=cmss9 scaled \magstep2,
+ tfc=cmss9 scaled \magstep3,
+ tfd=cmss9 scaled \magstep4,
+ sc=cmss10 at 7pt]
+
+\definecorps [9pt] [tt]
+ [tf=cmtt9,
+ sl=cmsltt10 at 9pt,
+ it=cmitt10 at 9pt]
+
+\definecorps [9pt] [mm]
+ [ex=cmex10 at 9pt,
+ mi=cmmi9,
+ sy=cmsy9]
+
+\definecorps [9pt] [hw]
+ [tf=cmtt9]
+
+\definecorps [9pt] [cg]
+ [tf=cmtt9]
+
+\definecorps [8pt] [rm]
+ [tf=cmr8,
+ bf=cmbx8,
+ it=cmti8,
+ sl=cmsl8,
+ bi=cmbxti10 at 8pt,
+ bs=cmbxsl10 at 8pt,
+ tfa=cmr8 scaled \magstep1,
+ tfb=cmr8 scaled \magstep2,
+ tfc=cmr8 scaled \magstep3,
+ tfd=cmr8 scaled \magstep4,
+ sc=cmcsc10 at 8pt]
+
+\definecorps [8pt] [ss]
+ [tf=cmss8,
+ bf=cmssbx10 at 8pt,
+ it=cmssi8,
+ sl=cmssi8,
+ bi=cmssbx10 at 8pt,
+ bs=cmssbx10 at 8pt,
+ tfa=cmss8 scaled \magstep1,
+ tfb=cmss8 scaled \magstep2,
+ tfc=cmss8 scaled \magstep3,
+ tfd=cmss8 scaled \magstep4,
+ sc=cmss10 at 6pt]
+
+\definecorps [8pt] [tt]
+ [tf=cmtt8,
+ sl=cmsltt10 at 8pt,
+ it=cmitt10 at 8pt]
+
+\definecorps [8pt] [mm]
+ [ex=cmex10 at 8pt,
+ mi=cmmi8,
+ sy=cmsy8]
+
+\definecorps [8pt] [hw]
+ [tf=cmtt8]
+
+\definecorps [8pt] [cg]
+ [tf=cmtt8]
+
+\definecorps [7pt] [rm]
+ [tf=cmr7,
+ bf=cmbx7,
+ it=cmti10 at 7pt,
+ sl=cmsl10 at 7pt,
+ bi=cmbxti10 at 7pt,
+ bs=cmbxsl10 at 7pt,
+ tfa=cmr7 scaled \magstep1,
+ tfb=cmr7 scaled \magstep2,
+ tfc=cmr7 scaled \magstep3,
+ tfd=cmr7 scaled \magstep4,
+ sc=cmcsc10 at 7pt]
+
+\definecorps [7pt] [ss]
+ [tf=cmss10 at 7pt,
+ bf=cmssbx10 at 7pt,
+ it=cmssi10 at 7pt,
+ sl=cmssi10 at 7pt,
+ bs=cmssbx10 at 7pt,
+ bi=cmssbx10 at 7pt,
+ tfa=cmss8, % scaled 1000,
+ tfb=cmss8 scaled \magstep1,
+ tfc=cmss8 scaled \magstep2,
+ tfd=cmss8 scaled \magstep3,
+ sc=cmss10 at 5pt]
+
+\definecorps [7pt] [tt]
+ [tf=cmtt10 at 7pt,
+ sl=cmsltt10 at 7pt,
+ it=cmitt10 at 7pt]
+
+\definecorps [7pt] [mm]
+ [ex=cmex10 at 7pt,
+ mi=cmmi7,
+ sy=cmsy7]
+
+\definecorps [6pt] [rm]
+ [tf=cmr6,
+ bf=cmbx6,
+ it=cmti10 at 6pt,
+ sl=cmsl10 at 6pt,
+ bi=cmbxti10 at 6pt,
+ bs=cmbxsl10 at 6pt,
+ tfa=cmr6 scaled \magstep1,
+ tfb=cmr6 scaled \magstep2,
+ tfc=cmr6 scaled \magstep3,
+ tfd=cmr6 scaled \magstep4,
+ sc=cmcsc10 at 6pt]
+
+\definecorps [6pt] [ss]
+ [tf=cmss10 at 6pt,
+ bf=cmssbx10 at 6pt,
+ it=cmssi10 at 6pt,
+ sl=cmssi10 at 6pt,
+ bs=cmssbx10 at 6pt,
+ bi=cmssbx10 at 6pt,
+ sc=cmss10 at 4pt]
+
+\definecorps [6pt] [tt]
+ [tf=cmtt10 at 6pt,
+ sl=cmsltt10 at 6pt,
+ it=cmitt10 at 6pt]
+
+\definecorps [6pt] [mm]
+ [ex=cmex10 at 6pt,
+ mi=cmmi6,
+ sy=cmsy6]
+
+\definecorps [5pt] [rm]
+ [tf=cmr5,
+ bf=cmbx5,
+ it=cmti10 at 5pt,
+ sl=cmsl10 at 5pt,
+ bi=cmbxti10 at 5pt,
+ bs=cmbxsl10 at 5pt,
+ tfa=cmr5 scaled \magstep1,
+ tfb=cmr5 scaled \magstep2,
+ tfc=cmr5 scaled \magstep3,
+ tfd=cmr5 scaled \magstep4,
+ sc=cmcsc10 at 5pt]
+
+\definecorps [5pt] [ss]
+ [tf=cmss10 at 5pt,
+ bf=cmssbx10 at 5pt,
+ it=cmssi10 at 5pt,
+ sl=cmssi10 at 5pt,
+ bs=cmssbx10 at 5pt,
+ bi=cmssbx10 at 5pt,
+ sc=cmss10 at 3pt]
+
+\definecorps [5pt] [tt]
+ [tf=cmtt10 at 5pt,
+ sl=cmsltt10 at 5pt,
+ it=cmitt10 at 5pt]
+
+\definecorps [5pt] [mm]
+ [ex=cmex10 at 5pt,
+ mi=cmmi5,
+ sy=cmsy5]
+
+\definecorps [4pt] [rm]
+ [tf=cmr10 at 4pt,
+ bf=cmbx10 at 4pt,
+ it=cmti10 at 4pt,
+ sl=cmsl10 at 4pt,
+ bi=cmbxti10 at 4pt,
+ bs=cmbxsl10 at 4pt,
+ sc=cmr10 at 4pt]
+
+\definecorps [4pt] [ss]
+ [tf=cmss10 at 4pt,
+ bf=cmssbx10 at 4pt,
+ it=cmssi10 at 4pt,
+ sl=cmssi10 at 4pt,
+ bs=cmssbx10 at 4pt,
+ bi=cmssbx10 at 4pt,
+ sc=cmss10 at 4pt]
+
+\definecorps [4pt] [tt]
+ [tf=cmtt10 at 4pt,
+ sl=cmsltt10 at 4pt,
+ it=cmitt10 at 4pt]
+
+\definecorps [4pt] [mm]
+ [ex=cmex10 at 4pt,
+ mi=cmmi10 at 4pt,
+ sy=cmsy10 at 4pt]
+
+%D We also define some large alternatives that can be used for
+%D titlepages and section headings.
+
+\definecorps [12pt] [rm]
+ [bfa=cmbx12 scaled \magstep1,
+ bfb=cmbx12 scaled \magstep2,
+ bfc=cmbx12 scaled \magstep3,
+ bfd=cmbx12 scaled \magstep4,
+ ita=cmti12 scaled \magstep1,
+ itb=cmti12 scaled \magstep2,
+ itc=cmti12 scaled \magstep3,
+ itd=cmti12 scaled \magstep4,
+ sla=cmsl12 scaled \magstep1,
+ slb=cmsl12 scaled \magstep2,
+ slc=cmsl12 scaled \magstep3,
+ sld=cmsl12 scaled \magstep4,
+ bsa=cmbxsl10 scaled \magstep2,
+ bsb=cmbxsl10 scaled \magstep3,
+ bsc=cmbxsl10 scaled \magstep4,
+ bsd=cmbxsl10 scaled \magstep5,
+ sca=cmcsc10 scaled \magstep2,
+ scb=cmcsc10 scaled \magstep3,
+ scc=cmcsc10 scaled \magstep4,
+ scd=cmcsc10 scaled \magstep5]
+
+\definecorps [11pt] [rm]
+ [bfa=cmbx9 scaled \magstep2,
+ bfb=cmbx9 scaled \magstep3,
+ bfc=cmbx9 scaled \magstep4,
+ bfd=cmbx9 scaled \magstep5,
+ ita=cmti9 scaled \magstep2,
+ itb=cmti9 scaled \magstep3,
+ itc=cmti9 scaled \magstep4,
+ itd=cmsl9 scaled \magstep5,
+ sla=cmsl9 scaled \magstep2,
+ slb=cmsl9 scaled \magstep3,
+ slc=cmsl9 scaled \magstep4,
+ sld=cmsl9 scaled \magstep5,
+ sca=cmcsc9 scaled \magstep2,
+ scb=cmcsc9 scaled \magstep3,
+ scc=cmcsc9 scaled \magstep4,
+ scd=cmcsc9 scaled \magstep5]
+
+\definecorps [10pt] [rm]
+ [bfa=cmbx10 scaled \magstep1,
+ bfb=cmbx10 scaled \magstep2,
+ bfc=cmbx10 scaled \magstep3,
+ bfd=cmbx10 scaled \magstep4,
+ sla=cmsl10 scaled \magstep1,
+ slb=cmsl10 scaled \magstep2,
+ slc=cmsl10 scaled \magstep3,
+ sld=cmsl10 scaled \magstep4,
+ bsa=cmbxsl10 scaled \magstep1,
+ bsb=cmbxsl10 scaled \magstep2,
+ bsc=cmbxsl10 scaled \magstep3,
+ bsd=cmbxsl10 scaled \magstep4,
+ sca=cmcsc10 scaled \magstep1,
+ scb=cmcsc10 scaled \magstep2,
+ scc=cmcsc10 scaled \magstep3,
+ scd=cmcsc10 scaled \magstep4]
+
+\definecorps [9pt] [rm]
+ [bfa=cmbx9 scaled \magstep1,
+ bfb=cmbx9 scaled \magstep2,
+ bfc=cmbx9 scaled \magstep3,
+ bfd=cmbx9 scaled \magstep4,
+ ita=cmti9 scaled \magstep1,
+ itb=cmti9 scaled \magstep2,
+ itc=cmti9 scaled \magstep3,
+ itd=cmti9 scaled \magstep4,
+ sla=cmsl9 scaled \magstep1,
+ slb=cmsl9 scaled \magstep2,
+ slc=cmsl9 scaled \magstep3,
+ sld=cmsl9 scaled \magstep4,
+ sca=cmcsc9 scaled \magstep1,
+ scb=cmcsc9 scaled \magstep2,
+ scc=cmcsc9 scaled \magstep3,
+ scd=cmcsc9 scaled \magstep4]
+
+\definecorps [8pt] [rm]
+ [bfa=cmbx8 scaled \magstep1,
+ bfb=cmbx8 scaled \magstep2,
+ bfc=cmbx8 scaled \magstep3,
+ bfd=cmbx8 scaled \magstep4,
+ sca=cmcsc8 scaled \magstep1,
+ scb=cmcsc8 scaled \magstep2,
+ scc=cmcsc8 scaled \magstep3,
+ scd=cmcsc8 scaled \magstep4]
+
+\definecorps [7pt] [rm]
+ [bfa=cmbx7 scaled \magstep1,
+ bfb=cmbx7 scaled \magstep2,
+ bfc=cmbx7 scaled \magstep3,
+ bfd=cmbx7 scaled \magstep4]
+
+\definecorps [6pt] [rm]
+ [bfa=cmbx6 scaled \magstep1,
+ bfb=cmbx6 scaled \magstep2,
+ bfc=cmbx6 scaled \magstep3,
+ bfd=cmbx6 scaled \magstep4]
+
+\definecorps [12pt] [ss]
+ [bfa=cmss12 scaled \magstep1,
+ bfb=cmss12 scaled \magstep2,
+ bfc=cmss12 scaled \magstep3,
+ bfd=cmss12 scaled \magstep4,
+ sla=cmssi10 scaled \magstep2,
+ slb=cmssi10 scaled \magstep3,
+ slc=cmssi10 scaled \magstep4,
+ sld=cmssi10 scaled \magstep5,
+ bsa=cmssi10 scaled \magstep2,
+ bsb=cmssi10 scaled \magstep3,
+ bsc=cmssi10 scaled \magstep4,
+ bsd=cmssi10 scaled \magstep5]
+
+\definecorps [10pt] [ss]
+ [bfa=cmss10 scaled \magstep1,
+ bfb=cmss10 scaled \magstep2,
+ bfc=cmss10 scaled \magstep3,
+ bfd=cmss10 scaled \magstep4,
+ sla=cmssi10 scaled \magstep1,
+ slb=cmssi10 scaled \magstep2,
+ slc=cmssi10 scaled \magstep3,
+ sld=cmssi10 scaled \magstep4,
+ bsa=cmssi10 scaled \magstep1,
+ bsb=cmssi10 scaled \magstep2,
+ bsc=cmssi10 scaled \magstep3,
+ bsd=cmssi10 scaled \magstep4]
+
+\definecorps [12pt] [tt]
+ [sla=cmsltt10 scaled \magstep2,
+ slb=cmsltt10 scaled \magstep3,
+ slc=cmsltt10 scaled \magstep4,
+ sld=cmsltt10 scaled \magstep5]
+
+\definecorps [10pt] [tt]
+ [sla=cmsltt10 scaled \magstep1,
+ slb=cmsltt10 scaled \magstep2,
+ slc=cmsltt10 scaled \magstep3,
+ sld=cmsltt10 scaled \magstep4]
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-con.tex b/tex/context/base/font-con.tex new file mode 100644 index 000000000..3d4c7d5a2 --- /dev/null +++ b/tex/context/base/font-con.tex @@ -0,0 +1,62 @@ +%D \module
+%D [ file=font-con,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Concrete Roman,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D The Concrete Modern Roman is just an alternative Computer
+%D Modern Roman.
+
+\definecorps [12pt] [rm]
+ [tf=ccr10 at 12pt, % scaled \magstep1
+ it=ccti10 at 12pt, % scaled \magstep1
+ sl=ccsl10 at 12pt, % scaled \magstep1
+ sc=cccsc10 at 12pt] % scaled \magstep1
+
+\definecorps [11pt] [rm]
+ [tf=ccr10 at 11pt, % scaled \magstephalf
+ it=ccti10 at 11pt, % scaled \magstephalf
+ sl=ccsl10 at 11pt, % scaled \magstephalf
+ sc=cccsc10 at 11pt] % scaled \magstephalf
+
+\definecorps [10pt] [rm]
+ [tf=ccr10,
+ it=ccti10,
+ sl=ccsl10,
+ sc=cccsc10]
+
+\definecorps [9pt] [rm]
+ [tf=ccr9,
+ it=ccr9,
+ sl=ccr9,
+ sc=ccr9]
+
+\definecorps [8pt] [rm]
+ [tf=ccr8,
+ it=ccr8,
+ sl=ccr8,
+ sc=ccr8]
+
+\definecorps [7pt] [rm]
+ [tf=ccr7,
+ it=ccr7,
+ sl=ccr7,
+ sc=ccr7]
+
+\definecorps [6pt] [rm]
+ [tf=ccr6,
+ it=ccr6,
+ sl=ccr6,
+ sc=ccr6]
+
+\definecorps [5pt] [rm]
+ [tf=ccr5,
+ it=ccr5,
+ sl=ccr5,
+ sc=ccr5]
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-eul.tex b/tex/context/base/font-eul.tex new file mode 100644 index 000000000..4a219dc4c --- /dev/null +++ b/tex/context/base/font-eul.tex @@ -0,0 +1,174 @@ +%D \module
+%D [ file=font-eul,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Euler,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D The Euler Fonts are designed by Herman Zapf and can be
+%D used with the Concrete Fonts defined elsewhere.
+
+\definecorps [12pt] [mm] % scaled \magstep1
+ [mi=eurm10 at 12pt,
+ ex=euex10 at 12pt,
+ ma=euex10 at 12pt,
+ mb=eusm10 at 12pt,
+ mc=eufm10 at 12pt]
+
+\definecorps [11pt] [mm] % scaled \magstephalf
+ [mi=eurm10 at 11pt,
+ ex=euex10 at 11pt,
+ ma=euex10 at 11pt,
+ mb=eusm10 at 11pt,
+ mc=eufm10 at 11pt]
+
+\definecorps [10pt] [mm]
+ [mi=eurm10,
+ ex=euex10,
+ ma=euex10,
+ mb=eusm10,
+ mc=eufm10]
+
+\definecorps [9pt] [mm]
+ [mi=eurm10 at 9pt,
+ ex=euex10 at 9pt,
+ ma=euex10 at 9pt,
+ mb=eusm10 at 9pt,
+ mc=eufm10 at 9pt]
+
+\definecorps [8pt] [mm]
+ [mi=eurm7 at 8pt,
+ ex=euex10 at 8pt,
+ ma=euex10 at 8pt,
+ mb=eusm7 at 8pt,
+ mc=eufm7 at 8pt]
+
+\definecorps [7pt] [mm]
+ [mi=eurm7,
+ ex=euex10 at 7pt,
+ ma=euex10 at 7pt,
+ mb=eusm7,
+ mc=eufm7]
+
+\definecorps [6pt] [mm]
+ [mi=eurm7 at 6pt,
+ ex=euex10 at 6pt,
+ ma=euex10 at 6pt,
+ mb=eusm7 at 6pt,
+ mc=eufm7 at 6pt]
+
+\definecorps [5pt] [mm]
+ [mi=eurm5,
+ ex=euex10 at 5pt,
+ ma=euex10 at 5pt,
+ mb=eusm5,
+ mc=eufm5]
+
+%D Here we copy part of the files that are distributed along
+%D with these fonts, but first we define some extra families.
+
+\let\exfam=\mafam % was A
+\let\smfam=\mbfam % was 8
+\let\fmfam=\mcfam % was 9
+
+\let\hexexfam=\hexmafam
+\let\hexsmfam=\hexmbfam
+\let\hexfmfam=\hexmcfam
+
+%D Now we're up to the redefinitions.
+
+\mathcode`0="7130
+\mathcode`1="7131
+\mathcode`2="7132
+\mathcode`3="7133
+\mathcode`4="7134
+\mathcode`5="7135
+\mathcode`6="7136
+\mathcode`7="7137
+\mathcode`8="7138
+\mathcode`9="7139
+
+\mathchardef\intop ="1\hexexfam 52
+\mathchardef\ointop ="1\hexexfam 48
+\mathchardef\coprod ="1\hexexfam 60
+\mathchardef\prod ="1\hexexfam 51
+\mathchardef\sum ="1\hexexfam 50
+\mathchardef\braceld ="\hexexfam 7A
+\mathchardef\bracerd ="\hexexfam 7B
+\mathchardef\bracelu ="\hexexfam 7C
+\mathchardef\braceru ="\hexexfam 7D
+\mathchardef\infty ="0\hexexfam 31
+
+\mathchardef\nearrow ="3\hexexfam 25
+\mathchardef\searrow ="3\hexexfam 26
+\mathchardef\nwarrow ="3\hexexfam 2D
+\mathchardef\swarrow ="3\hexexfam 2E
+\mathchardef\Leftrightarrow ="3\hexexfam 2C
+\mathchardef\Leftarrow ="3\hexexfam 28
+\mathchardef\Rightarrow ="3\hexexfam 29
+\mathchardef\leftrightarrow ="3\hexexfam 24
+\mathchardef\leftarrow ="3\hexexfam 20
+\mathchardef\rightarrow ="3\hexexfam 21
+
+\let\gets =\leftarrow
+\let\to =\rightarrow
+
+\mathcode`\^^W ="3\hexexfam 24
+\mathcode`\^^X ="3\hexexfam 20
+\mathcode`\^^Y ="3\hexexfam 21
+\mathcode`\^^K ="3\hexexfam 22
+\mathcode`\^^A ="3\hexexfam 23
+
+\def\uparrow {\delimiter"3\hexexfam 22378 }
+\def\downarrow {\delimiter"3\hexexfam 23379 }
+\def\updownarrow {\delimiter"3\hexexfam 6C33F }
+\def\Uparrow {\delimiter"3\hexexfam 2A37E }
+\def\Downarrow {\delimiter"3\hexexfam 2B37F }
+\def\Updownarrow {\delimiter"3\hexexfam 6D377 }
+
+\mathchardef\leftharpoonup ="3\hexexfam 18
+\mathchardef\leftharpoondown ="3\hexexfam 19
+\mathchardef\rightharpoonup ="3\hexexfam 1A
+\mathchardef\rightharpoondown ="3\hexexfam 1B
+
+\mathcode`+="2\hexfmfam 2B
+\mathcode`-="2\hexfmfam 2D
+\mathcode`!="0\hexfmfam 21
+\mathcode`(="4\hexfmfam 28 \delcode`(="\hexfmfam 28300
+\mathcode`)="5\hexfmfam 29 \delcode`)="\hexfmfam 29301
+\mathcode`[="4\hexfmfam 5B \delcode`[="\hexfmfam 5B302
+\mathcode`]="5\hexfmfam 5D \delcode`]="\hexfmfam 5D303
+\mathcode`=="3\hexfmfam 3D
+
+\mathchardef\Relbar ="303D % we need the old = to match \Arrows
+\mathchardef\Gamma ="7100
+\mathchardef\Delta ="7101
+\mathchardef\Theta ="7102
+\mathchardef\Lambda ="7103
+\mathchardef\Xi ="7104
+\mathchardef\Pi ="7105
+\mathchardef\Sigma ="7106
+\mathchardef\Upsilon ="7107
+\mathchardef\Phi ="7108
+\mathchardef\Psi ="7109
+\mathchardef\Omega ="710A
+
+\let\varsigma =\sigma % Euler doesn't have these
+\let\varrho =\rho % Euler doesn't have these
+\mathchardef\aleph ="0D40
+
+\def\rbrace {\delimiter"5\hexsmfam 67A09 } \let\}=\rbrace
+\def\lbrace {\delimiter"4\hexsmfam 66A08 } \let\{=\lbrace
+
+\mathchardef\leq ="3\hexsmfam 14 \let\le=\leq
+\mathchardef\geq ="3\hexsmfam 15 \let\ge=\geq
+\mathchardef\Re ="0\hexsmfam 3C
+\mathchardef\Im ="0\hexsmfam 3D
+
+\def\vert {\delimiter"\hexsmfam 6A30C }
+\def\backslash {\delimiter"\hexsmfam 6E30F }
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex new file mode 100644 index 000000000..228fa0e39 --- /dev/null +++ b/tex/context/base/font-ini.tex @@ -0,0 +1,2548 @@ +%D \module
+%D [ file=font-ini,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Font Macros (ini)}
+
+\unprotect
+
+\startmessages dutch library: fonts
+ title: korps
+ 1: codering --, groepeer zonodig
+ 2: variant -- wordt geladen
+ 3: onbekende variant --
+ 4: korps -- is niet gedefinieerd
+ 5: stijl -- is niet gedefinieerd
+ 6: -- wordt geladen
+ 7: onbekend formaat --
+ 8: stijl -- gedefinieerd
+\stopmessages
+
+\startmessages english library: fonts
+ title: corps
+ 1: coding --, one could use grouping
+ 2: variant -- is loaded
+ 3: unknown variant --
+ 4: corps -- is not defined
+ 5: style -- is not defined
+ 6: -- is loaded
+ 7: unknown format --
+ 8: style -- defined
+\stopmessages
+
+\startmessages german library: fonts
+ title: Fliesstext
+ 1: Kodierung --, Gruppierung moeglich
+ 2: Variante -- ist geladen
+ 3: Unbekannte Variante --
+ 4: Fliesstext -- ist nicht definiert
+ 5: Stil -- ist nicht definiert
+ 6: -- ist geladen
+ 7: unbekanntes Format --
+ 8: Stil -- definiert
+\stopmessages
+
+%D This module is one of the oldest modules of \CONTEXT. The
+%D macros below evolved out of the \PLAIN\ \TEX\ macros and
+%D therefore use a similar naming scheme (\type{\rm},
+%D \type{\bf}, etc). This module grew out of our needs. We
+%D started with the \PLAIN\ \TEX\ definitions, generalized the
+%D underlaying macros, and extended those to a level at which
+%D probably no one will ever recognize them.
+%D
+%D One important characteristic of the font mechanism presented
+%D here is the postponing of font loading. This makes it
+%D possible to distribute \type{fmt} files without bothering
+%D about the specific breed of \type{tfm} files.
+%D
+%D Another feature implemented here is the massive switching
+%D from roman to {\ss sans serif}, {\tt teletype} or else. This
+%D means one doesn't have to take care of all kind of relations
+%D between fonts.
+
+%D \macros
+%D {rm,ss,tt,hw,cg}
+%D
+%D Fonts are defined in separate files. When we define a font,
+%D we distinguish between several styles. In most cases we will
+%D use:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC roman \NC \type{\rm} \NC\FR
+%D \NC sansserif \NC \type{\ss} \NC\MR
+%D \NC type \NC \type{\tt} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D The number of styles is not limited to these three. When
+%D using Lucida Bright we can for instance also define:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC handwritten \NC \type{\hw} \NC\FR
+%D \NC calligraphy \NC \type{\cg} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D Anyone who feels the need, can define additional ones, like
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC faxfont \NC \type{\ff} \NC\FR
+%D \NC blackboard \NC \type{\bb} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D Or even
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC hebrew \NC \type{\hb} \NC\SR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D Styles are grouped in font sets. At the moment there are
+%D three main sets defined:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l|l||]
+%D \HL
+%D \NC Computer Modern Roman \NC Knuth \NC \type{cmr} \NC\FR
+%D \NC Lucida Bright \NC Bigelow \& Holmes \NC \type{lbr} \NC\MR
+%D \NC Standard Postscript Fonts \NC Adobe \NC \type{pos} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D There are also some Computer Modern Roman alternatives:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l|l||]
+%D \HL
+%D \NC Computer Modern Roman \NC Knuth \& Sauter \NC \type{sau} \NC\FR
+%D \NC Euler fonts \NC Zapf \NC \type{eul} \NC\MR
+%D \NC Computer Modern Concrete \NC Knuth \& Zapf \NC \type{con} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D All these definitions are ordered in files with names like
+%D \type{font-cmr} and \type{font-pos}, where the last three
+%D characters specifiy the name as known to \CONTEXT.
+%D
+%D Within such a font set (\type{cmr}) and style (\type{\rm})
+%D we can define a number of text font alternatives:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC typeface \NC \type{\tf} \NC\FR
+%D \NC boldface \NC \type{\bf} \NC\MR
+%D \NC slanted \NC \type{\sl} \NC\MR
+%D \NC italic \NC \type{\it} \NC\MR
+%D \NC boldslanted \NC \type{\bs} \NC\MR
+%D \NC bolditalic \NC \type{\bi} \NC\MR
+%D \NC smallcaps \NC \type{\sc} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+
+%D The more primitive is (still) predefined:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC oldstyle \NC \type{\os} \NC\SR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D The availability of these alternatives depends on the
+%D completeness of a font family and of course the definitions
+%D in the font files.
+%D
+%D But let's not forget math. In addition to the previous \TEX\
+%D families (the mysterious \type{\fam}'s) we've got some more:
+%D
+%D \startregelcorrectie
+%D \starttabel[|l||]
+%D \HL
+%D \NC Math Roman \NC \type{\mr} \NC\FR
+%D \NC Math Italic \NC \type{\mi} \NC\MR
+%D \NC Math Symbol \NC \type{\sy} \NC\MR
+%D \NC Math Extra \NC \type{\ex} \NC\MR
+%D \NC Math A \NC \type{\ma} \NC\MR
+%D \NC Math B \NC \type{\mb} \NC\MR
+%D \NC Math C \NC \type{\mc} \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D Users can call for specific fonts in many ways. Switches to
+%D other typefaces, like the switch from normal to bold, are as
+%D intuitive as possible, which means that all dependant fonts
+%D also switch. One can imagine that this takes quite some
+%D processing time.
+%D
+%D Internally fonts are stored as combination of size, style
+%D and alternative, e.g. \type{12pt}+\type{\ss}+\type{\bf}.
+%D Users are not confronted with sizes, but use the style or
+%D style+alternative to activate them.
+%D
+%D During the definition of a corps one can also declare the
+%D available larger alternatives:
+%D
+%D \starttypen
+%D \tf \tfa \tfb \tfc ...
+%D \bf \bfa \bfb \bfc ...
+%D \sl \sla \slb \slc ...
+%D \stoptypen
+%D
+%D The smaller ones are automatically supplied and derived from
+%D the the corps environment.
+%D
+%D \starttypen
+%D \tfx \tfxx
+%D \bfx \bfxx
+%D \slx \slxx
+%D \stoptypen
+%D
+%D There are only two smaller alternatives per style. The
+%D larger alternatives on the other hand have no limitations.
+%D
+%D These larger alternatives are mostly used in chapter and
+%D section titles or on title pages. When one switches to a
+%D larger alternative, the bold an other ones automatically
+%D adapt themselves:
+%D
+%D \startbuffer
+%D \tfd Hi \bf there\sl, here \tfb I \bf am
+%D \stopbuffer
+%D
+%S \startsmaller
+%D \typebuffer
+%S \stopsmaller
+%D
+%D therefore becomes:
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D Maybe this mechanism isn't always as logic, but as said
+%D before, we tried to make it as intuitive as possible.
+%D
+%D So a specific kind of glyph can be characterized by:
+%D
+%D \startsmaller
+%D family (cmr) + corps (12pt) + style (rm) + alternative (bf) + size (a)
+%D \stopsmaller
+%D
+%D The last component (the size) is optional.
+%D
+%D We introduced \type{\tf} as command to call for the current
+%D normally sized typeface. This commands results in roman,
+%D sans serif, teletype or whatever style is in charge. Such
+%D rather massive switches of style sometimes take more
+%D processing time than comfortable. Of course there is a
+%D workaround for this: we can call fonts directly by means of
+%D commands like:
+%D
+%D \starttypen
+%D \rmtf \sssl \tttf \rmbsa
+%D \stoptypen
+%D
+%D One should realize that this fast calls have limitations,
+%D they lack for instance automatic super- and subscript
+%D support.
+%D
+%D This leaves us two more commands: \type{\tx} and
+%D \type{\txx}. These activate a smaller and even more smaller
+%D font than the current one and adapt themselves to the
+%D current alternative, so when \type{\bf} is active,
+%D \type{\tx} gives a smaller boldface, which in turn can be
+%D called directly by \type{\bfx}.
+%D
+%D These two smaller alternatives are specified by the corps
+%D environment and therefore not necessarily have similar sizes
+%D as \type{\scriptsize} and \type{\scriptscriptsize}. The main
+%D reason for this incompatibility (which can easily be undone)
+%D lays in the fact that we often want a bit bigger characters
+%D than in math mode. In \CONTEXT\ for instance the \type{\tx}
+%D and \type{\txx} commands are used for surrogate
+%D \kap{smallcaps} which support both nesting and alternatives,
+%D like in {\bf\kap{a \kap{small} world}}, which was typeset by
+%D
+%D \starttypen
+%D \bf\kap{a \kap{small} world}
+%D \stoptypen
+%D
+%D And compare $\rm \scriptstyle THIS$ with the slightly larger
+%D \kap{THIS}: \ruledhbox{$\rm \scriptstyle\ scriptstyle THIS$}
+%D or \ruledhbox{\kap{THIS x style}} makes a big difference.
+
+%D \macros
+%D {mf}
+%D
+%D Math fonts are a species in their own. They are tightly
+%D hooked into smaller and even smaller ones of similar breed
+%D to form a tight family. Let's first see how these are
+%D related:
+%D
+%D \startbuffer
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+ \bi x^2 =\rm 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+{\bi x^2}=\rm 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+ \bi x^2 =\tf 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+{\bi x^2}=\tf 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+ \bi x^2 =\bf 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+{\bi x^2}=\bf 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+ \bi x^2 =\sl 6x^2$
+%D $\tf x^2+\bf x^2+\sl x^2+\it x^2+\bs x^2+{\bi x^2}=\sl 6x^2$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Gives both an expected and unexpected result:
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D We see here that the character shapes change accordingly to
+%D the current family, but that the symbols are always typeset
+%D in the font assigned to \type{\fam0}.
+%D
+%D \startbuffer
+%D $\tf\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D $\bf\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D $\sl\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D $\bs\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D $\it\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D $\bi\mf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = 6x^2$
+%D \stopbuffer
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D In this example we see a new command \type{\mf} surface
+%D which means as much as {\em math font}. This commands
+%D reactivates the last font alternative and therefore equals
+%D \type{\bf}, \type{\sl} etc. but by default it equals
+%D \type{\tf}:
+
+\def\mf{\tf}
+
+%D The previous example was typeset saying:
+%D
+%D \typebuffer
+%D
+%D Beware: the exact location of \type{\mf} is not that
+%D important, we could as well has said
+%D
+%D \startbuffer
+%D $\bf x^2 + x^2 + x^2 + x^2 + x^2 + x^2 = \mf 6x^2$
+%D \stopbuffer
+%D
+%D This is due to the way \TEX\ handles fonts in math mode.
+%D
+%D Of course we'll have to redefine \type{\mf} every time we
+%D change the current \type{\fam}.
+
+%D \macros
+%D {mbox,enablembox,mathop}
+%D
+%D Now how can we put this to use? Will the next sequence
+%D give the desired result?
+%D
+%D \startbuffer
+%D $\bf x^2 + \hbox{\mf whatever} + \sin(2x)$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D It won't!
+%D
+%D \startvoorbeeld
+%D \let\mathop=\normalmathop \haalbuffer
+%D \stopvoorbeeld
+%D
+%D The reason for this is that \type{\sin} is defined as:
+%D
+%D \starttypen
+%D \def\sin{\mathop{\rm sin}\nolimits}
+%D \stoptypen
+%D
+%D We can fix this by defining
+
+\let\normalmathop=\mathop
+
+\def\mathop%
+ {\normalmathop
+ \bgroup
+ \let\rm=\mf
+ \let\next=}
+
+%D Of course this can be fixed, if not by a very dirty trick:
+%D redefining the \TEX\ primitive \type{\hbox}:
+%D
+%D \starttypen
+%D \let\normalhbox=\hbox
+%D
+%D \def\hbox%
+%D {\ifmmode\mbox\else\normalhbox\fi}
+%D \stoptypen
+%D
+%D With
+%D
+%D \starttypen
+%D \def\mbox#1#%
+%D {\normalhbox#1\bgroup\mf\let\next=}
+%D \stoptypen
+%D
+%D or more robust, that is, also accepting \type{\hbox\bgroup}:
+%D
+%D \starttypen
+%D \def\mbox%
+%D {\normalhbox\bgroup\mf
+%D \dowithnextbox{\box\nextbox\egroup}%
+%D \normalhbox}
+%D \stoptypen
+%D
+%D And now:
+%D
+%D \startbuffer
+%D $\bf x^2 + \hbox{whatever} + \sin(2x)$
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Indeed gives:
+%D
+%D \startvoorbeeld
+%D \enablembox\haalbuffer
+%D \stopvoorbeeld
+%D
+%D But, do we want this kind of trickery to be activated? No,
+%D simply because we cannot be sure of incompatibilties,
+%D although for instance unboxing goes ok. Therefore we
+%D introduce:
+
+\def\normalmbox%
+ {\normalhbox\bgroup\mf
+ \dowithnextbox{\box\nextbox\egroup}\normalhbox}
+
+\def\mbox%
+ {\ifmmode\normalmbox\else\normalhbox\fi}
+
+\def\enablembox%
+ {\appendtoks
+ \let\normalhbox=\hbox
+ \let\hbox=\mbox
+ \to\everymath}
+
+%D So in fact one can enable feature if needed. I would say:
+%D go along, but use grouping if needed!
+
+%D \macros
+%D {mrfam,mifam,syfam,exfam,
+%D bsfam,bifam,scfam,tffam,
+%D mafam,mbfam,msfam}
+%D
+%D After this short mathematical excursion, we enter the world
+%D of fonts and fontswitching. We start with something very
+%D \TEX: \type{\fam} specified font families. \TEX\ uses
+%D families for managing fonts in math mode. Such a family has
+%D three members: text, script and scriptscript: $x^{y^z}$. In
+%D \CONTEXT\ we take a bit different approach than \PLAIN\
+%D \TEX\ does. \PLAIN\ \TEX\ needs at least four families for
+%D typesetting math. We use those but give them symbolic names.
+
+\def\mrfam{0} % 0 (Plain TeX) Math Roman
+\def\mifam{1} % 1 (Plain TeX) Math Italic
+\def\syfam{2} % 2 (Plain TeX) Math Symbol
+\def\exfam{3} % 3 (Plain TeX) Math Extra
+
+%D \PLAIN\ \TEX\ also defines families for {\it italic}, {\sl
+%D slanted} and {\bf bold} typefaces, so we don't have to
+%D define them here.
+%D
+%D \starttypen
+%D \itfam % 4 (Plain TeX) Italic
+%D \slfam % 5 (Plain TeX) Slanted
+%D \bffam % 6 (Plain TeX) Boldface
+%D \stoptypen
+%D
+%D Family~7 in \PLAIN\ \TEX\ is not used in \CONTEXT, because
+%D we do massive switches from roman to sans serif, teletype or
+%D other faces.
+%D
+%D \starttypen
+%D \ttfam % 7 (Plain TeX) can be reused!
+%D \stoptypen
+%D
+%D We define ourselves some more families for {\bs bold
+%D slanted}, {\bi bold italic} and {\sc Small Caps}, so
+%D we can use them in math mode too. Instead of separate
+%D families for {\ss sans serif} and \type{teletype} we use the
+%D more general \type{\tffam}, which stands for typeface.
+
+\newfam\bsfam % 8 (ConTeXt) BoldSlanted
+\newfam\bifam % 9 (ConTeXt) BoldItalic
+\newfam\scfam % A (ConTeXt) SmallCaps
+\newfam\tffam % B (ConTeXt) TypeFace
+
+%D Normally \type{\mrfam} equals \type{\tffam}, but a more
+%D distinctive alternatives are possible, for instance the
+%D Euler and Concrete Typefaces.
+%D
+%D After having defined all those in nature non||mathematical
+%D families, we define ourselves some real math ones. These are
+%D needed for the \AMS\ Symbol Fonts and Extended Lucida
+%D Bright.
+
+\newfam\mafam % C (ConTeXt) Math A Fam (AmsTeX A)
+\newfam\mbfam % D (ConTeXt) Math B Fam (AmsTeX B)
+\newfam\mcfam % E (ConTeXt) Math C Fam
+
+%D Because there are 16~families and because \type{\ttfam}
+%D isn't used, at the moment we have two families left:~7
+%D and~F.
+%D
+%D To ease the support of font packages, we als define
+%D shortcuts to these familynames. This is necessary because
+%D the family names are in fact \type{\chardef}'s, which means
+%D that we're dealing with numbers (one can check this by
+%D applying \type{\showthe} and \type{\show}). In the
+%D specification of math symbols however we need hexadecimal
+%D numbers, so we have to convert the \type{\fam}'s value.
+
+\def\hexnumber#1%
+ {\ifcase#1
+ 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or A\or B\or C\or D\or E\or F%
+ \fi}
+
+\edef\hexmrfam {\hexnumber\mrfam} \edef\hexbsfam {\hexnumber\bsfam}
+\edef\hexmifam {\hexnumber\mifam} \edef\hexbifam {\hexnumber\bifam}
+\edef\hexsyfam {\hexnumber\syfam} \edef\hexscfam {\hexnumber\scfam}
+\edef\hexexfam {\hexnumber\exfam} \edef\hextffam {\hexnumber\tffam}
+\edef\hexitfam {\hexnumber\itfam} \edef\hexmafam {\hexnumber\mafam}
+\edef\hexslfam {\hexnumber\slfam} \edef\hexmbfam {\hexnumber\mbfam}
+\edef\hexbffam {\hexnumber\bffam} \edef\hexmcfam {\hexnumber\mcfam}
+
+%D We define some (very private) constants to improve speed,
+%D memory usage and consistency.
+
+\def\@plain@ {@f@pl@} % plain TeX encoding vector
+\def\@size@ {@f@si@} % corps size prefix (12pt etc)
+\def\@style@ {@f@st@} % full style prefix (roman etc)
+\def\@shortstyle@ {@f@sh@} % short style prefix (rm etc)
+\def\@letter@ {@f@le@} % first alternative typeface
+\def\@noletter@ {@f@no@} % second alternative typeface
+
+%D We also define a list of all text (i.e.\ non math symbol)
+%D families. I considered using something like:
+%D
+%D \starttypen
+%D \def\familylist%
+%D {\do\c!tf\do\c!sl\do\c!it\do\c!bf\do\c!bs\do\c!bi\do\c!sc}
+%D \stoptypen
+%D
+%D By assigning \type{\do} some suitable meaning one can
+%D process such lists quite fast. The current implementation
+%D uses the commalist processing macros and is not that
+%D slow either.
+
+\def\familylist%
+ {\c!tf,\c!sl,\c!it,\c!bf,\c!bs,\c!bi,\c!sc}
+
+%D All used styles, like rm, ss and tt, are saved in a comma
+%D separated list. Appart from practical limitations one can
+%D define as many styles as needed, but first we
+
+\let\stylelist=\empty
+
+%D Further on we have to take some precautions when dealing
+%D with special characters like~\type{~}, \type{_}
+%D and~\type{^}, so let us define ourselve some handy macros
+%D first.
+
+\def\protectfontcharacters%
+ {\catcode`\~=\@@letter
+ \catcode`\_=\@@letter
+ \catcode`\^=\@@letter\relax}
+
+\def\unprotectfontcharacters%
+ {\catcode`\~=\@@active
+ \catcode`\_=\@@subscript
+ \catcode`\^=\@@superscript\relax}
+
+%D The completeness of the Computer Modern Roman typefaces
+%D makes clear how incomplete other faces are. To honour 7~bit
+%D \ASCII, these fonts were designed using only the first 127
+%D values of the 256 ones that can be presented by one byte.
+%D Nowadays 8~bit character codings are more common, mainly
+%D because they permit us to predefine some composed
+%D characters, which are needed in most european languages.
+%D
+%D Supporting more than the standard \TEX\ encoding vector
+%D |<|which in itself is far from standard and differs per
+%D font|>| puts a burden on the fonts mechanism. The \CONTEXT\
+%D mechanism is far from complete, but can handle several
+%D schemes at once. The main problem lays in the accented
+%D characters and ligatures like~ff, although handling
+%D ligatures is not the responsibility of this module.
+%D
+%D By default, we use \PLAIN\ \TEX's approach of placing
+%D accents. All other schemes sooner or later give problems
+%D when we distribute \DVI||files are distributed across
+%D machines and platforms. Nevertheless, we have to take care
+%D of different encoding vectors, which tell us where to find
+%D the characters we need. This means that all kind of
+%D character placement macro's like \type{\"} and \type{\ae}
+%D have to be implemented and adapted in a way that suits
+%D these vectors.
+%D
+%D The main difference between different vector is the way
+%D accents are ordered and/or the availability of prebuilt
+%D accented characters. Accented characters can for instance be
+%D called for by sequences like \type{\"e}. Here the \type{\"}
+%D is defined as:
+%D
+%D \starttypen
+%D \def\"#1{{\accent"7F #1}}
+%D \stoptypen
+%D
+%D This macro places the accent \accent"7F {} on top of an~e
+%D gives \"e. Some fonts however can have prebuild accents and
+%D use a more direct approach like
+%D
+%D \starttypen
+%D \def\"#1{\if#1e\char 235\else ... \fi}
+%D \stoptypen
+%D
+%D The latter approach is not used in \CONTEXT, because we
+%D store relevant combinations of accents and characters in
+%D individual macros.
+
+%D We define character substitutes and commands with definition
+%D commands like:
+%D
+%D \starttypen
+%D \startcoding[texnansi]
+%D
+%D \defineaccent " a 228
+%D \defineaccent ^ e 234
+%D \defineaccent ' {\dotlessi} 237
+%D
+%D \definecharacter ae 230
+%D \definecharacter oe 156
+%D
+%D \definecommand b \newansib
+%D \definecommand c \newansic
+%D
+%D \stopcoding
+%D \stoptypen
+%D
+%D The last argument of \type{\defineaccent} and
+%D \type{\definecharacter} tells \TEX\ the position of the
+%D accented character in the encoding vector. In order to
+%D complish this, we tag each implementation with the character
+%D coding identifier. We therefore need two auxiliary variables
+%D \type{\charactercoding} and \type{\nocharactercoding}. These
+%D contain the current and default encoding vectors and both
+%D default to the \PLAIN\ one.
+
+\let\charactercoding = \@plain@
+\let\nocharactercoding = \@plain@
+
+%D \macros
+%D {startcoding}
+%D
+%D Before we can redefine accents and special characters, we
+%D have to tell \CONTEXT\ what encoding is in force. The next
+%D command is responsible for doing this and also takes care of
+%D the definition of the recoding commands.
+
+\def\startcoding[#1]%
+ {\protectfontcharacters
+ \showmessage{\m!fonts}{1}{#1}%
+ \def\charactercoding{@#1@}}
+
+\def\stopcoding%
+ {\let\charactercoding=\@plain@
+ \unprotectfontcharacters}
+
+%D \macros
+%D {defineaccent, definecharacter, definecommand}
+%D
+%D The actual definition of accents, special characters and
+%D commands is done with the next three commands.
+
+\def\defineaccent#1 #2 #3 %
+ {\setvalue{\charactercoding#1\string#2}{\char#3}}%
+
+\def\definecommand#1 #2 %
+ {\setvalue{\charactercoding\string#1}{#2}}
+
+\def\definecharacter#1 #2 %
+ {\setvalue{\charactercoding\string#1}{\char#2}}
+
+%D Here we see that redefining accents is characters is more
+%D or less the same as redefining commands. We also could have
+%D said:
+%D
+%D \starttypen
+%D \def\defineaccent#1 #2 {\definecommand#1\string#2 \char}
+%D \def\definecharacter#1 {\definecommand#1 \char}
+%D \stoptypen
+
+%D \macros
+%D {redefineaccent}
+%D
+%D Telling \CONTEXT\ how to treat accents and special
+%D characters is a two stage process. First we signal the
+%D system which commands are to be adapted, after which we can
+%D redefine their behavior when needed. We showed this in the
+%D previous paragraphs. These redefinitions are grouped at the
+%D end of this file, but we show some examples here.
+%D
+%D Accents or accent generating commands are redefined by:
+%D
+%D \starttypen
+%D \redefineaccent ' % grave
+%D \redefineaccent " % dieresis
+%D \redefineaccent ^ % circumflex
+%D \redefineaccent v % caron
+%D \stoptypen
+%D
+%D The original \PLAIN\ \TEX\ meaning of each accent generating
+%D command is saved first. Next these commands are redefined to
+%D do an indirect call to a macro that acts according to the
+%D encoding vector in use.
+
+\def\redefineaccent%
+ {\protectfontcharacters
+ \doredefineaccent}
+
+\def\doredefineaccent#1 %
+ {\def\!!stringa{\nocharactercoding\string#1}%
+ \@EA\letvalue\@EA\!!stringa\@EA=\csname\string#1\endcsname
+ \setvalue{\string#1}{\dohandleaccent#1}%
+ \unprotectfontcharacters}
+
+%D The next (in fact three) macros to take care of \type{\"e}
+%D as well as \type{\"{e}} situations. The latter one is always
+%D handled by \TEX's \type{\accent} primitive, but the former
+%D one can put the accents on top of characters as well as use
+%D \type{\char} to call for a character directly.
+
+\unexpanded\def\dohandleaccent#1%
+ {\def\dodohandleaccent%
+ {\ifx\next\bgroup
+ \def\next{\getvalue{\nocharactercoding#1}}%
+ \else
+ \def\next{\dododohandleaccent#1}%
+ \fi
+ \next}%
+ \futurelet\next\dodohandleaccent}
+
+\def\dododohandleaccent#1#2%
+ {\bgroup
+ \ifundefined{\charactercoding#1\string#2}%
+ \def\\{\getvalue{\nocharactercoding#1}#2\egroup}%
+ \else
+ \def\\{\getvalue{\charactercoding#1\string#2}\egroup}%
+ \fi
+ \\}
+
+%D The trick with \type{\\} is needed to prevent spaces from
+%D being gobbled after the accented character, should we have
+%D \type{\next}, we should have ended up with gobbled spaces.
+
+%D \macros
+%D {redefinecommand}
+%D
+%D Redefinition of encoding dependant commands like \type{\b}
+%D and \type{\c} can be triggered by:
+%D
+%D \starttypen
+%D \redefinecommand b % something math
+%D \redefinecommand c % something math
+%D \stoptypen
+%D
+%D Handling of characters is easier than handling accents
+%D because here we don't have to take care of arguments. We
+%D just call for the right glyph in the right place.
+%D
+%D The \type{\next} construction permits handling of commands
+%D that take arguments. This means that we can use this
+%D command to redefine accent handling commands too.
+
+\def\redefinecommand#1 %
+ {\def\!!stringa{\nocharactercoding#1}%
+ \@EA\letvalue\@EA\!!stringa\@EA=\csname#1\endcsname
+ \setvalue{#1}{\dohandlecommand{#1}}}%
+
+\unexpanded\def\dohandlecommand#1%
+ {\doifdefinedelse{\charactercoding#1}
+ {\def\next{\getvalue{\charactercoding#1}}}
+ {\def\next{\getvalue{\nocharactercoding#1}}}%
+ \next}
+
+%D \macros
+%D {redefinecharacter}
+%D
+%D Special characters, which differ from accented characters
+%D in that they are to be presented as they are, are redefined
+%D by
+%D
+%D \starttypen
+%D \redefinecharacter ae % ae
+%D \redefinecharacter cc % ccedilla
+%D \stoptypen
+%D
+%D To keep things simple, we just copy this command:
+
+\let\redefinecharacter=\redefinecommand
+
+%D \macros
+%D {magfactor,magfactorhalf}
+%D
+%D There are several ways to specify a font. Three of them are
+%D pure \TeX\ ones, the fourth one is new:
+%D
+%D \starttypen
+%D \font\name=cmr12
+%D \font\name=cmr12 at 10pt
+%D \font\name=cmr12 scaled \magstep2
+%D \font\name=cmr12 sa 1.440
+%D \stoptypen
+%D
+%D The non||\TEX\ alternative \type{sa} stands for {\em scaled
+%D at}. This means as much as: scale the corpssize with this
+%D factor. The value 1.440 in this example is derived
+%D from the \type{\magstep}'s as mentioned in
+%D \in{table}[tab:magstep]. We therefore introduce
+%D \type{\magfactor} as an alternative for \type{\magstep}.
+%D
+%D \plaatstabel[hier][tab:magstep]
+%D {Factors to be used with \type{sa.}}
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \NC \bf magstep \NC \bf equivalent \NC \bf factor \NC\SR
+%D \HL
+%D \NC 1 \NC \type{\magfactor1} \NC 1.200 \NC\FR
+%D \NC 2 \NC \type{\magfactor2} \NC 1.440 \NC\MR
+%D \NC 3 \NC \type{\magfactor3} \NC 1.728 \NC\MR
+%D \NC 4 \NC \type{\magfactor4} \NC 2.074 \NC\MR
+%D \NC 5 \NC \type{\magfactor5} \NC 2.488 \NC\LR
+%D \HL
+%D \stoptabel
+
+\def\magfactor#1%
+ {\ifcase#1 1.000\or 1.200\or 1.440\or 1.728\or 2.074\or 2.488\or 1\fi}
+
+\def\magfactorhalf%
+ {1.095}
+
+%D These macros enable the use of definitions like \type{sa
+%D \magfactor3} which saves us both (mis|)|calculations and
+%D potential mistypings.
+%D
+%D Because \type{sa} is not a \TEX\ supported alternative, we
+%D have to test for it ourselves. In doing so, we need an
+%D auxiliary \DIMENSION. We cannot use \type{\scratchdimen}
+%D because font loading can happen at any moment due to
+%D postponed loading. We could instead have used dirty grouping
+%D tricks, but this one works too.
+
+\newdimen\scaledfont
+
+\def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed!
+ {\edef\fontscale{#2}%
+ \ifx\fontscale\empty
+ \expandafter\font\csname#4#5\endcsname=#1\relax
+ \else
+ \scaledfont=#4\relax
+ \expandafter\font\csname#4#5\endcsname=#1 at \fontscale\scaledfont\relax
+ \fi}
+
+%D I considered checking for mistakenly use of \PLAIN's
+%D \type{\magstep}'s but although it would take only a few
+%D lines of code, this would not add to consistent use. I
+%D therefore removed this check.
+
+\def\dodoloadfont#1#2#3%
+ {\expanded{\docalculatefont\getvalue{\??ft#1#2} sa sa*#1*#2*}%
+ #3\relax
+ \getvalue{#1#2}}
+
+%D A more ugly but correct alternative for this is:
+%D
+%D \starttypen
+%D \def\docalculatefont#1sa #2sa#3*#4*#5*%
+%D {\edef\fontscale{#2}%
+%D \scaledfont=#4\relax
+%D \expandafter\font\csname#4#5\endcsname=#1
+%D \ifx\fontscale\empty\else at \fontscale\scaledfont\fi}
+%D \stoptypen
+%D
+%D This one saves a few bytes of memory, but is not particular
+%D faster due to the often unneeded assignment.
+
+%D The loading macro is used in two macros. One of them takes
+%D care of fixed width teletype fonts.
+
+\def\doloadfont#1#2%
+ {\debuggerinfo{\m!fonts}{loaded #1#2}%
+ \dodoloadfont{#1}{#2}{}}
+
+\def\doloadttfont#1#2%
+ {\debuggerinfo{\m!fonts}{loaded fixed #1#2}%
+ \dodoloadfont{#1}{#2}{\expandafter\hyphenchar\csname#1#2\endcsname=-1}}
+
+%D \macros
+%D {getfontname}
+%D
+%D The names of the fonts can be called with the rather simple
+%D macro \type{\getfontname}. When for instance we pass
+%D \type{12ptrmtf} as argument, we get \getfontname{12ptrmtf}.
+
+\def\getfontname#1%
+ {\getvalue{\??ft#1}}
+
+%D Now we enter the area of font switching. The switching
+%D mechanism has to take care of several situations, like:
+%D
+%D \startopsomming[opelkaar]
+%D \som changing the overal document fonts (including margins,
+%D headers and footers)
+%D \som changing local fonts (only the running text)
+%D \som smaller and even more smaller alternatives (super-
+%D and subscripts)
+%D \stopopsomming
+%D
+%D \TEX\ offers a powerfull family mechanism for super- and
+%D subscripts in math mode. In text mode however, we don't use
+%D families for the smaller alternatives, and therefore have
+%D to take care of it otherwise.
+
+%D \macros
+%D {definecorpsenvironment}
+%D
+%D The relationship between the several sizes of a font, is
+%D defined by:
+%D
+%D \showsetup{\y!definecorpsenvironment}
+%D
+%D Later on we will see how these parameters are used, so for
+%D the moment we stick with an example:
+%D
+%D \starttypen
+%D \definecorpsenvironment
+%D [12pt]
+%D [ text=12pt,
+%D script=9pt,
+%D scriptscript=7pt,
+%D x=10pt,
+%D xx=8pt,
+%D big=12pt,
+%D small=10pt]
+%D \stoptypen
+%D
+%D The first argument specifies the corps size to which the
+%D settings apply. All second parameters are specified in
+%D dimensions and tell us more about related sizes.
+%D
+%D Due to the fact that \type{\c!text} and \type{\s!text} can
+%D have a similar meaning, and therefore can lead to an
+%D unwanted loop, we temporary redefine \type{\c!text}. For
+%D the moment this in only place that some trickery is needed
+%D to fool the multilingual interface.
+
+\def\definecorpsenvironment%
+ {\dodoubleempty\dodefinecorpsenvironment}
+
+\def\dodefinecorpsenvironment[#1][#2]%
+ {\let\c!savedtext=\c!text
+ \let\c!text=\s!text
+ \doifundefined{\??ft#1\s!text}
+ {\getparameters[\??ft#1]
+ [\s!text=#1,\s!script=#1,\s!scriptscript=#1,
+ \c!x=#1,\c!xx=#1,
+ \c!groot=#1,\c!klein=#1]}%
+ \getparameters[\??ft#1][#2]%
+ \let\c!text=\c!savedtext
+ \setvalue{\@size@#1}{\docompletefontswitch[#1]}}
+
+%D We default all parameters to the main corps size (begin
+%D \type{#1}), so the next setup is valid too:
+%D
+%D \starttypen
+%D \definecorpsenvironment[24pt]
+%D \stoptypen
+%D
+%D All parameters can be redefined when needed, so one does
+%D not have to stick to the default ones.
+
+%D \macros
+%D {definecorps}
+%D
+%D The next step in defining a corps involves the actual font
+%D files, which can be recognized by their extension
+%D \type{tfm}. Installing those file is often beyond the
+%D scope of the user and up to the system administrator.
+%D
+%D \showsetup{\y!definecorps}
+%D
+%D This commands takes three arguments, where \showparameter\
+%D takes a (series of) corps size(s) and \showparameter\
+%D the style group to which the definitions belong.
+%D
+%D Argument \showparameter\ accepts any suitable alternative,
+%D as specified by the \TEX\ families, extended with a, b and
+%D higher sizes or the normal \TEX\ mathematical families and
+%D some more.
+%D
+%D We show two examples, that show all the alternative
+%D scaling options. The \type{\tfa} alternatives can be
+%D extended with \type{\bfa}, \type{\slb}, etc. or even
+%D \type{e} and higher alternatives.
+%D
+%D \starttypen
+%D \definecorps [12pt] [rm]
+%D [tf=cmr12,
+%D bf=cmbx12,
+%D it=cmti12,
+%D sl=cmsl12,
+%D bi=cmbxti10 at 12pt,
+%D bs=cmbxsl10 at 12pt,
+%D tfa=cmr12 scaled \magstep1,
+%D tfb=cmr12 scaled \magstep2,
+%D tfc=cmr12 scaled \magstep3,
+%D tfd=cmr12 scaled \magstep4,
+%D sc=cmcsc10 at 12pt]
+%D
+%D \definecorps [12pt,11pt,10pt,9pt,8pt] [rm]
+%D [tf=lbr sa 1,
+%D bf=lbd sa 1,
+%D it=lbi sa 1,
+%D sl=lbsl sa 1,
+%D bi=lbdi sa 1,
+%D bs=lbdi sa 1,
+%D tfa=lbr sa 1.200,
+%D tfb=lbr sa 1.440,
+%D tfc=lbr sa 1.728,
+%D tfd=lbr sa 2.074,
+%D sc=lbr sa 0.833]
+%D \stoptypen
+%D
+%D The second example shows that we can define more sizes at
+%D once. The main difference between these examples is that the
+%D Computer Modern Roman come in many design sizes. This means
+%D that there we cannot define them in bulk using \type{sa}.
+%D Instead of \type{rm} (roman) one can define \type{ss} (sans
+%D serif), \type{tt} (teletype), \type{hw} (hand written),
+%D \type{cg} (calygraphic) and whatever styles.
+
+\def\definecorps%
+ {\dotripleargument\dodefinecorps}
+
+%D The first argument may be a comma separated list. This,
+%D combined with specifications using \type{sa} can save a lot
+%D of typing. Although all arguments should be specified, we
+%D treat the second argument as optional.
+
+\def\dodefinecorps[#1][#2][#3]%
+ {\ifthirdargument
+ \def\dododefinecorps##1%
+ {\dodododefinecorps[##1][#2][#3]}%
+ \processcommalist[#1]\dododefinecorps
+ \else
+ \definecorps[#1][\c!rm][#2]%
+ \fi}
+
+%D Defining a corps involves two actions: defining the specific
+%D style related alternatives, like \type{\rma}, \type{\bfa}
+%D and \type{\rmsla}, and storing the definitions of their
+%D corps size related fonts. The first step is corps
+%D independant but executed every time. This permits user
+%D definitions like \type{\tfw} or \type{\bfq} for real large
+%D alterbatives.
+
+\def\dodododefinecorps[#1][#2][#3]%
+ {\geteparameters[\??ft#1#2][#3]% We expand them!
+ \dodefinecorpsenvironment[#1][]% Just to be sure.
+ \def\doiffamily##1##2##3\\%
+ {\rawdoifinsetelse{##1##2}{\familylist}
+ {\doifsomething{##3}
+ {\setvalue{#2##3}% eg: \rma, \ssa
+ {\donottest\switchtofontstyle{#2}{##3}}%
+ \setvalue{##1##2##3}% eg: \tfa, \bfa
+ {\donottest\switchtofontalternative{##1##2}{##3}}%
+ \setvalue{#2##1##2##3}% eg: \rmtfa, \ssbfa
+ {\donottest\switchtofontstylealternative{#2}{##1##2}{##3}}}}
+ {}}%
+ \def\dodefinefont##1%
+ {\doifdefined{\??ft#1#2##1}
+ {\letvalue{@#1#2##1@}=\charactercoding
+ \doifelse{#2}{\c!tt}
+ {\setvalue{#1#2##1}{\donottest\doloadttfont{#1}{#2##1}}}
+ {\setvalue{#1#2##1}{\donottest\doloadfont{#1}{#2##1}}}%
+ \bgroup
+ \let\relax=\empty
+ \debuggerinfo
+ {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}%
+ \egroup}%
+ \expandafter\doiffamily##1\\}%
+ \processassignlist[#3]\dodefinefont}
+
+%D These macros show that quite some definitions take place.
+%D Fonts are not loeaded yet! This means that at format
+%D generation time, no font files are preloaded.
+%D
+%D We could have use \type{\unexpanded\setvalue} instead of
+%D the \type{\donottest} prefixes. However, this would lead to
+%D about 400 extra entries in the hash table.
+%D
+%D We can save ourselved some 400 csnames by packing the name
+%D and the encoding. But ..... not done yet .....
+
+%D \macros
+%D {everycorps,EveryCorps}
+%D
+%D Every change in corps size has conseqences for the baseline
+%D distance and skips between paragraphs. These are initialized
+%D in other modules. Here we only provide the hooks that
+%D garantees their handling.
+
+\newevery \everycorps \EveryCorps
+
+%D At the system level one can initialize thing like:
+%D
+%D \starttypen
+%D \appendtoks \setupspacing \to \everycorps
+%D \stoptypen
+%D
+%D While users can add their own non standard commands like:
+%D
+%D \starttypen
+%D \EveryCorps{\message{changing to corps \the\corpssize}}
+%D \stoptypen
+%D
+%D Personnaly I never felt the need for such extensions, but
+%D at least its possible.
+
+%D \macros
+%D {globalcorpssize,localcorpssize}
+%D
+%D Next we'll do the tough job of font switching. Here we
+%D have to distinguish between the global (overal) corps size
+%D and the local (sometimes in the textflow) size. We store
+%D these dimensions in two \DIMENSION\ registers.
+
+\newdimen\globalcorpssize \globalcorpssize=12pt
+\newdimen\localcorpssize \localcorpssize =\globalcorpssize
+
+%D \macros
+%D {corpssize}
+%D
+%D These two registers are not to be misused in calculations.
+%D For this purpose we keep a copy:
+
+\newdimen\corpssize \corpssize=\globalcorpssize
+
+%D \macros
+%D {outputresolution}
+%D
+%D Sometimes (to be honest: not in this module) we need to
+%D take the system resolution into account. Therefore we also
+%D define a macro:
+
+\def\outputresolution {300}
+
+%D \macros
+%D {corpsfactor,corpspoints}
+%D
+%D For multiplication purposes we keep an auxiliary counter
+%D and macro (here the expansion is not explicitly needed):
+
+\newcount\corpspoints \dimensiontocount\corpssize\corpspoints
+
+\edef\corpsfactor{\withoutpt\the\corpssize}
+
+%D When we assign for instance 12pt to a \DIMENSION\ register
+%D the \type{\the}'d value comes out as 12.0pt, which is
+%D often not the way users specifies the corps size. Therefore
+%D we also store normalized value.
+
+\def\normalizecorpssize#1\to#2%
+ {\scratchdimen=#1\relax
+ \doifinstringelse{.0}{\withoutpt\the\scratchdimen}
+ {\dimensiontocount\scratchdimen\scratchcounter
+ \edef#2{\the\scratchcounter pt}}
+ {\edef#2{\the\scratchdimen}}}
+
+\normalizecorpssize\corpssize\to\normalizedglobalcorpssize
+\normalizecorpssize\corpssize\to\normalizedlocalcorpssize
+\normalizecorpssize\corpssize\to\normalizedcorpssize
+
+%D To be internationalized:
+
+\def\korpsgrootte {\corpssize}
+\def\korpspunten {\corpspoints}
+
+%D some day.
+
+%D \macros
+%D {fontsize,fontstyle}
+%D
+%D Within a corps, fonts can come in different sizes. For
+%D instance \type{\tf} is accompanied by \type{\tfa},
+%D \type{\tfb} etc. The third character in these sequences
+%D represents the size. The actual size is saved in a macro
+
+\let\fontsize = \empty
+
+%D The style, being roman (\type{\rm}), sans serif (\type{\ss})
+%D etc. is also available in a macro in \type{rm}, \type{ss}
+%D etc. form:
+
+\let\fontstyle = \empty
+
+%D All things related to fonts are grouped into files with
+%D names like \expandafter\type\expandafter{\f!fontprefix cmr}.
+%D These files are loaded by:
+
+\def\doreadfontdefinitionfile#1%
+ {\doifundefined{\c!file\f!fontprefix#1}%
+ {\setvalue{\c!file\f!fontprefix#1}{}%
+ \edef\saveddqcatcode{\the\catcode`"}%
+ \catcode`\"=\@@other
+ \readsysfile{\f!fontprefix#1}
+ {\showmessage{\m!fonts}{2}{#1}}
+ {\showmessage{\m!fonts}{3}{#1}}%
+ \catcode`\"=\saveddqcatcode}}
+
+%D Such files are only loaded once! This permits redundant
+%D loading, but at the same time forced grouping when we want
+%D continuously mix all kind of font, which of course is a kind
+%D of typographically sin. The \type{"} is made inactibe if
+%D needed to prevent problems with loading files that use this
+%D character in numbers.
+
+\def\doswitchpoints[#1]%
+ {\expanded{\dodoswitchpoints{#1}}}
+
+\def\dodoswitchpoints#1%
+ {\doifdefinedelse{\@size@#1}
+ {\getvalue{\@size@#1}%
+ \localcorpssize=#1\relax
+ \normalizecorpssize\localcorpssize\to\normalizedcorpssize
+ \the\everycorps}
+ {\showmessage{\m!fonts}{4}{#1}}}
+
+\def\doswitchstyle[#1]%
+ {\doifdefinedelse{\@style@#1}
+ {\getvalue{\@style@#1}%
+ \edef\fontstyle{#1}}
+ {\showmessage{\m!fonts}{5}{#1}}}
+
+%D \TEX\ loads font metric files like \type{cmr10.tfm} and
+%D \type{tir.tfm} only once. In \PLAIN\ \TEX\ some font files
+%D are {\em preloaded}. This means that the font files are
+%D loaded, but not accessible yet by name. This is accomplished
+%D by saying:
+%D
+%D \starttypen
+%D \font\preloaded=cmr10 at 11pt
+%D \stoptypen
+%D
+%D and using the name \type{\preloaded} again and again, so
+%D fonts are indeed loaded, but unnamed, and therefore
+%D unaccessible. In \CONTEXT\ we don't preload fonts, not even
+%D the \PLAIN\ \TEX\ ones, although users can access them. Now
+%D why is this done?
+
+%D Defining fonts using \type{\definecorps} takes time, so we
+%D prefer to predefine at least the Computer Modern Roman
+%D fonts. However, loading all those fonts at definition time
+%D would take both time and space. But even worse, once fonts
+%D are loaded into memory, their encoding vector is fixed,
+%D which is a handicap when we want to distribute the compact
+%D \type{fmt} files. So what we want to do is defining fonts in
+%D a way that postpones the loading. We accomplish this by only
+%D loading the fonts when we switch to another corps size.
+%D Among the other alternatives, such as loading the font at
+%D the moment of activation and redefining the activation
+%D macro afterwards, this proved to be the most efficient
+%D alternative.
+%D
+%D The next few macros take care of the one exeption on this
+%D scheme. When at format generation time we load the default
+%D font file, the one that defines the Computer Modern Fonts,
+%D we don't want the fonts metrics to end up in the format
+%D file, so we temporary prohibit loading. This means that at
+%D runtime we have to load the default corps size just before
+%D we start typesetting.
+%D
+%D Therefore we have to signal the font switching macros that
+%D we are preloading fonts. As long as the next boolean is,
+%D true, no loading is done.
+
+\newif\ifloadingfonts \loadingfontstrue
+
+%D \macros
+%D {preloadfonts}
+%D
+%D Preloading is only called for once, during the startup
+%D sequence of a session. After the loading job is done, the
+%D macro relaxes itself and reset the signal.
+
+\def\preloadfonts%
+ {\showmessage{\m!fonts}{6}{\normalizedcorpssize\normalspace\fontstyle}%
+ \doswitchpoints[\normalizedcorpssize]%
+ \doswitchstyle[\fontstyle]%
+ \global\let\preloadfonts=\relax
+ \global\loadingfontsfalse}
+
+%D Here comes the main font switching macros. These macros
+%D handle changes in size as well as returning to the global
+%D corps size.
+
+\def\dosetfont[#1]%
+ {\doifelse{#1}{\v!globaal}
+ {\restoreglobalcorps}
+ {\processcommalist[#1]\dodosetfont
+ \ifloadingfonts\else
+ \doswitchpoints[\normalizedcorpssize]%
+ \doswitchstyle[\fontstyle]%
+ \fi}}
+
+\def\dodosetfont#1%
+ {\dododosetfont{#1}{\showmessage{\m!fonts}{4}{#1}}}
+
+\def\dododosetfont#1#2%
+ {\doifnumberelse{#1}
+ {\scratchdimen=#1\relax
+ \normalizecorpssize\scratchdimen\to\normalizedsetfont
+ \doifdefinedelse{\@size@\normalizedsetfont}
+ {\localcorpssize=\normalizedsetfont
+ \let\normalizedcorpssize=\normalizedsetfont}
+ {#2\dosetsubstitutefont{#1}}}
+ {\doifdefinedelse{\@style@#1}
+ {\edef\fontstyle{#1}}
+ {\doreadfontdefinitionfile{#1}}}}
+
+%D When users specify for instance a 13 point corps while no
+%D such corps is defined, the system automatically tries to
+%D find a best fit, that is the nearest smaller defined
+%D corpszize. A smaller one is definitely better than a larger
+%D one, simply because otherwise a lot of overfull box messages
+%D are more probable to occur. By taking a value slightly
+%D smaller than half a point, we can use the next method.
+
+\def\dosetsubstitutefont#1%
+ {\scratchdimen=#1\relax
+ \advance\scratchdimen by .499pt
+ \dimensiontocount\scratchdimen\scratchcounter
+ \advance\scratchcounter by -1
+ \ifnum\scratchcounter>3
+ \dododosetfont{\the\scratchcounter pt}{}%
+ \fi}
+
+%D Next we're going to implement some switching macros we
+%D already used in when defining fonts. The first one takes
+%D care of the style and is used by commands like \type{\rma}.
+
+\def\switchtofontstyle#1#2%
+ {\getvalue{#1}%
+ \getvalue{\c!tf#2}}
+
+%D The second one is responsible for commands like \type{\bfa}
+%D and the third one handles the combined \type{\rmbfa}
+%D alternatives.
+
+\def\switchtofontalternative#1#2%
+ {\def\fontsize{#2}%
+ \setfontstyle{\fontstyle}{\fontstyle}%
+ \donottest\getvalue{#1}}
+
+\def\switchtofontstylealternative#1#2#3%
+ {\getvalue{\normalizedcorpssize#1#2#3}}
+
+%D Setting the normal sized as well as the x and xx smaller
+%D sizes is accomplished by the next set of macros. When in
+%D math mode, the commands \type{\tx} and \type{\txx} are
+%D just a switch to the script and double script styles, but
+%D in text mode the values defined by the corpsenvironment are
+%D used.
+
+\def\dosetsomextypeface#1%
+ {\doifdefinedelse{#1}
+ {\getvalue{#1}}
+ {\showmessage{\m!fonts}{7}{#1}}}%
+
+\def\dosetxtypeface#1%
+ {\ifmmode
+ \scriptstyle
+ \else
+ \dosetsomextypeface
+ {\getvalue{\??ft\normalizedcorpssize\c!x}% % pt
+ \getvalue{\@shortstyle@\fontstyle}% % rm
+ #1}% % tf
+ \unexpanded\def\tx{\dosetxxtypeface{#1}}%
+ \fi}
+
+\def\dosetxxtypeface#1%
+ {\ifmmode
+ \scriptscriptstyle
+ \else
+ \dosetsomextypeface
+ {\getvalue{\??ft\normalizedcorpssize\c!xx}% % pt
+ \getvalue{\@shortstyle@\fontstyle}% % rm
+ #1}% % tf
+ \let\tx=\relax
+ \let\txx=\relax
+ \fi}
+
+%D These macros also show us that when we call for \type{\tx},
+%D this macro is redefined to be \type{\txx}. Therefore calls
+%D like:
+%D
+%D \startbuffer
+%D {small \tx is \tx beautiful}
+%D {small \tx is \txx beautiful}
+%D {small \txx is \tx beautiful}
+%D {small \txx is \txx beautiful}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D result in:
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D Setting the main size involves the style list and therefore
+%D takes a bit more time. Keep in mind that the fontsize is
+%D represented by a character or empty.
+
+\def\settextfont#1%
+ {\def\dosettextfont##1%
+ {\doifdefinedelse{\textface#1##1\fontsize}
+ {\setvalue{#1##1}{\donottest\getvalue{\textface#1##1\fontsize}}}
+ {\setvalue{#1##1}{\donottest\getvalue{\textface#1##1}}}}%
+ \rawprocesscommalist[\familylist]\dosettextfont}
+
+\def\settextfonts%
+ {\rawprocesscommalist[\stylelist]\settextfont}
+
+%D All three sizes come together in the macro:
+
+\def\settypefaces#1#2%
+ {\setvalue{#2}%
+ {\donottest\dosettypeface{#1}{#2}}%
+ \setvalue{#2\c!x}%
+ {\donottest\dosetxtypeface{#2}}%
+ \setvalue{#2\c!xx}%
+ {\donottest\dosetxxtypeface{#2}}}%
+
+%D Earlier in this module we defined some \TEX\ families. Here
+%D we introduce the macros that are responsible for setting
+%D them. The first argument of the next macro takes the style
+%D in its short form (rm, ss, etc). The second argument is the
+%D alternative (tf, bf, etc).
+
+%D Before actually assigning the font to a family we activate
+%D it. This is needed because loading of fonts is postponed
+%D until the first time it's called for. This also forces us to
+%D set the text family after we've set the script ones, else
+%D the latter one would be in force after executing this macro.
+
+\def\settextfamily#1#2%
+ {\def\setfamily##1##2%
+ {\doifdefinedelse{##2#1#2}
+ {\debuggerinfo{\m!fonts}{defined ##2#1#2}%
+ \getvalue{##2#1#2}\relax % activate font
+ \expandafter##1\getvalue{#2\s!fam}=\getvalue{##2#1#2}}
+ {\doifdefinedelse{##2#1\c!tf}
+ {\debuggerinfo{\m!fonts}{##2#1#2 replaced by ##2#1\c!tf}%
+ \getvalue{##2#1\c!tf}\relax % activate font
+ \expandafter##1\getvalue{#2\s!fam}=\getvalue{##2#1\c!tf}}
+ {\debuggerinfo{\m!fonts}{not defined ##2#1#2}}}}%
+ \scriptscriptfont\getvalue{#2\s!fam}=\scriptfont\getvalue{#2\s!fam}%
+ \setfamily\scriptscriptfont\scriptscriptface
+ \scriptfont\getvalue{#2\s!fam}=\textfont\getvalue{#2\s!fam}%
+ \setfamily\scriptfont\scriptface
+ \textfont\getvalue{#2\s!fam}=\textfont\tffam
+ \setfamily\textfont\textface}
+
+%D \macros
+%D {defineoverallstyle}
+%D
+%D When setting of switching the overall style we can use the
+%D short identifier like rm and ss, but when defined we can
+%D also use more verbose names like roman or sansserif. Such
+%D names are defined by:
+%D
+%D \starttypen
+%D \defineoverallstyle [roman, rm] [rm]
+%D \defineoverallstyle [sansserif, ss] [ss]
+%D \stoptypen
+
+\def\dodefineoverallstyle[#1][#2]%
+ {\rawdoifinsetelse{#2}{\stylelist}
+ {\debuggerinfo{\m!fonts}{unknown style #2}}
+ {\addtocommalist{#2}\stylelist
+ \showmessage{\m!fonts}{8}{#2}}%
+ \setvalue{#2\c!x}%
+ {\getvalue{#2}\getvalue{\c!tf\c!x}}%
+ \setvalue{#2\c!xx}%
+ {\getvalue{#2}\getvalue{\c!tf\c!xx}}%
+ \def\docommando##1%
+ {\setvalue{\@shortstyle@##1}{#2}%
+ \setvalue{\@style@##1}{\getvalue{#2}}%
+ \setvalue{#2}{\donottest\setfontstyle{##1}{#2}}}%
+ \processcommalist[#1]\docommando}
+
+\def\defineoverallstyle%
+ {\dodoubleargument\dodefineoverallstyle}
+
+%D CHECKEN WAT \type{\fontstyle} HIER DOET
+
+\def\setfontstyle#1#2% #1:name (roman, romaan) #2:style (rm)
+ {\edef\fontstyle{#1}%
+ \def\dosettextfamily##1%
+ {\settextfamily{#2}{##1}%
+ \settypefaces{#2}{##1}}%
+ \rawprocesscommalist[\familylist]\dosettextfamily
+ \fam\tffam\relax
+ \unexpanded\def\tx{\tfx}%
+ \donottest\tf}
+
+%D Setting the math families looks much like setting the texts\
+%D ones. This time however we use the 12 point font as a
+%D default when nothing is defined. This enables us to
+%D implement partial schemes. Here we also set the
+%D \type{\skewchar}, which takes care of accents in math mode
+%D (actually it's the largest accent). The first family needs a
+%D bit different treatment because it can be set to the default
+%D roman as well as a user defined font.
+
+\def\setmathfamilies%
+ {\setskewchar{\textface\c!mm\c!mi}{'177}%
+ \setskewchar{\textface\c!mm\c!sy}{'60}%
+ \setmathfamily\mrfam\textface\scriptface\scriptscriptface
+ {\c!mm\c!mr}{\c!rm\c!tf}%
+ \setmathfamily\mifam\textface\scriptface\scriptscriptface
+ {\c!mm\c!mi}{}%
+ \setmathfamily\syfam\textface\scriptface\scriptscriptface
+ {\c!mm\c!sy}{}%
+ \setmathfamily\exfam\textface\textface\textface
+ {\c!mm\c!ex}{}%
+ \setmathfamily\mafam\textface\scriptface\scriptscriptface
+ {\c!mm\c!ma}{}%
+ \setmathfamily\mbfam\textface\scriptface\scriptscriptface
+ {\c!mm\c!mb}{}%
+ \setmathfamily\mcfam\textface\scriptface\scriptscriptface
+ {\c!mm\c!mc}{}}
+
+%D When setting the \type{\skewchar} we need to test on the
+%D availability first.
+
+\def\setskewchar#1#2%
+ {\doifdefined{#1}
+ {\getvalue{#1}\expandafter\skewchar\getvalue{#1}=#2\relax}}
+
+%D First we try to set the font at the math specific one (the
+%D fifth argment), next we take the alternative the last
+%D argument, which of often empty, and finally we default to
+%D the 12 point alternative.
+
+\def\setmathfamily#1#2#3#4#5#6%
+ {\def\dosetmathfamily##1##2%
+ {\doifdefinedelse{##2#5}
+ {\getvalue{##2#5}\relax
+ ##1#1=\getvalue{##2#5}\relax}
+ {\doifdefinedelse{##2#6}
+ {\getvalue{##2#6}\relax
+ ##1#1=\getvalue{##2#6}\relax}
+ {\doifdefinedelse{12pt#5}
+ {\getvalue{12pt#5}\relax
+ ##1#1=\getvalue{12pt#5}\relax}
+ {##1#1=\nullfont}}}}%
+ \dosetmathfamily\scriptscriptfont{#4}%
+ \dosetmathfamily\scriptfont{#3}%
+ \dosetmathfamily\textfont{#2}}
+
+%D The previous macros show that it's is not always
+%D neccessary to define the whole bunch of fonts, take for
+%D instance the sequence:
+%D
+%D \starttypen
+%D \setupcorps
+%D [ams]
+%D
+%D \definecorps [24pt] [mm]
+%D [ma=msam10 at 24pt,
+%D mb=msbm10 at 24pt]
+%D
+%D \switchtocorps
+%D [24pt]
+%D
+%D This is a 24pt $\blacktriangleleft$
+%D \stoptypen
+%D
+%D Here we didn't define the 24 point corps environment, so
+%D it's defined automatically. Of course one can always use the
+%D \TEX\ primitive \type{\font} to switch to whatever font
+%D needed.
+
+%D When asking for a complete font switch, for instance from 10
+%D to 12~points, the next macro does the job. First we
+%D normalize the size, nect we define the current range of
+%D text, script and scriptscript sizes, then we set the text
+%D fonts and the math families and finally we activate the
+%D default typeface and also set the font specific parameters
+%D assigned to \type{\everycorps}
+
+\def\docompletefontswitch[#1]%
+ {\corpssize=#1\relax
+ \dimensiontocount\corpssize\corpspoints
+ \edef\corpsfactor{\withoutpt\the\corpssize}%
+ \normalizecorpssize\corpssize\to\normalizedcorpssize
+ \edef\textface{\getvalue{\??ft\normalizedcorpssize\s!text}}%
+ \edef\scriptface{\getvalue{\??ft\normalizedcorpssize\s!script}}%
+ \edef\scriptscriptface{\getvalue{\??ft\normalizedcorpssize\s!scriptscript}}%
+ \settextfonts
+ \setmathfamilies
+ \rmtf
+ \the\everycorps}
+
+%D \macros
+%D {setupcorps,switchtocorps}
+%D
+%D The next two macros are user ones. With \type{\setupcorps}
+%D one can set the document corps size, font family, style
+%D and/or options defined in files, for example:
+%D
+%D \starttypen
+%D \setupcorps[cmr,ams,12pt,roman]
+%D \stoptypen
+%D
+%D This command affects the document as a whole: text, headers
+%D and footers. The second macro however affects only the text:
+%D
+%D \starttypen
+%D \switchtocorps[10pt]
+%D \stoptypen
+%D
+%D So we've got:
+%D
+%D \showsetup{\y!setupcorps}
+%D \showsetup{\y!switchtocorps}
+%D
+%D Both macros look alike. The second one also has to take
+%D all kind of keywords into account.
+
+\def\setupcorps[#1]%
+ {\doifsomething{#1}
+ {\dosetfont[#1]%
+ \globalcorpssize=\localcorpssize
+ \normalizecorpssize\globalcorpssize\to\normalizedglobalcorpsize
+ \let\globalfontstyle=\fontstyle
+ \the\everycorps}}
+
+\unexpanded\def\switchtocorps[#1]%
+ {\doifsomething{#1}
+ {\doifdefinedelse{\??ft\normalizedcorpssize\interfaced{#1}}
+ {\doswitchpoints[\getvalue{\??ft\normalizedcorpssize\interfaced{#1}}]%
+ \doswitchstyle[\fontstyle]}
+ {\dosetfont[#1]}%
+ \the\everycorps}}
+
+%D Because the last macro can appear in arguments or be assigned
+%D to parameters, we protect this one for unwanted expansion.
+
+\def\dosetmathfont#1%
+ {\def\rm{\fam0}%
+ \edef\mffam{\getvalue{#1\s!fam}}%
+ \textfont\mrfam=\textfont\mffam
+ \scriptfont\mrfam=\scriptfont\mffam
+ \scriptscriptfont\mrfam=\scriptscriptfont\mffam}
+
+\def\dosettypeface#1#2%
+ {\doifdefinedelse{@\normalizedcorpssize#1#2@}
+ {\edef\charactercoding{\getvalue{@\normalizedcorpssize#1#2@}}}
+ {\let\charactercoding=\@plain@}%
+ \unexpanded\def\tx%
+ {\dosetxtypeface{#2\fontsize}}%
+ \unexpanded\def\txx%
+ {\dosetxxtypeface{#2\fontsize}}%
+ \expandafter\fam\getvalue{#2\s!fam}%
+ \def\mf{\donottest{\dosetmathfont{#2}}}%
+ \donottest\getvalue{#1#2}}
+
+%D \macros
+%D {os}
+%D
+%D Old style numerals can be typeset with \type{\os} and look
+%D like {\os 1234567890} instead of the more common looking
+%D 1234567890.
+%D
+%D {\em Some day this macro will be made more geneal. For the
+%D moment it's behavior is tigthly coupled to the Computer
+%D Modern Roman.}
+
+\def\os%
+ {\getvalue{\normalizedcorpssize\c!mm\c!mi}}
+
+%D \macros
+%D {definecorpsswitch}
+%D
+%D \PLAIN\ \TEX\ defines some macro's like \type{\tenpoint}
+%D to switch to a specific corpssize. Just for the sake of
+%D compatibility we can define them like:
+%D
+%D \starttypen
+%D \definecorpsswitch [twelvepoint] [12pt]
+%D \stoptypen
+%D
+%D We don't support language specific synonyms here, mainly
+%D because \PLAIN\ \TEX\ is english anyway.
+
+\def\dodefinecorpsswitch[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{##1}{\switchtocorps[#2]}}%
+ \processcommalist[#1]\docommando}
+
+\def\definecorpsswitch%
+ {\dodoubleargument\dodefinecorpsswitch}
+
+%D \macros
+%D {setsmallcorps,setmaincorps,setbigcorps}
+%D
+%D When we're typesetting at for instance 10pt, we can call for
+%D the \type{small} as well as the \type{big} alternative,
+%D related to this main size, using \type{\switchtocorps[small]}.
+%D The three alternatives can be activated by the next three
+%D system calls and are defined by the corpsenvironment.
+
+\def\setsmallcorps%
+ {\doswitchpoints[\getvalue{\??ft\normalizedcorpssize\v!klein}]%
+ \doswitchstyle[\fontstyle]}
+
+\def\setmaincorps%
+ {\doswitchpoints[\normalizedcorpssize]%
+ \doswitchstyle[\fontstyle]}
+
+\def\setbigcorps%
+ {\doswitchpoints[\getvalue{\??ft\normalizedcorpssize\v!groot}]%
+ \doswitchstyle[\fontstyle]}
+
+%D \macros
+%D {restoreglobalcorps}
+%D
+%D Users can set whatever font available while typesetting text.
+%D Pagenumnbers, footers, headers etc. however must be typeset
+%D in the main corps and style of the document. Returning to
+%D the global state can be done with the next macro:
+
+\def\restoreglobalcorps%
+ {\let\fontsize=\empty
+ \doswitchpoints[\normalizedglobalcorpsize]%
+ \doswitchstyle[\globalfontstyle]%
+ \redoconvertfont % just in case a pagebreak occurs
+ \tf}
+
+%D This macro has to be called when entering the pagebody
+%D handling routine as well as the footnote insert routine.
+%D Users can access this feature |<|for instance when one wants
+%D to typeset tables and alike in the main corps and style
+%D while the running text is temporary set to a smaller one|>|
+%D by saying \type{\switchtocorps[global]}.
+
+%D \macros
+%D {rasterfont}
+%D
+%D There are (at the moment) two situations in which we want to
+%D have fast access to a particular font. When we are using
+%D \TEX\ to typeset rasters, we use small {\rasterfont.}'s
+%D (a rather small period indeed), the same as \PICTEX\ uses
+%D for drawing purposes.
+
+\def\rasterfont%
+ {\getvalue{\!!fivepoint\c!rm\c!tf}}
+
+%D \macros
+%D {infofont}
+%D
+%D The second situation occurs when we enable the info mode,
+%D and put all kind of status information in the margin. We
+%D don't want huge switches to the main corps and style, so
+%D here too we use a direct method.
+
+\def\infofont%
+ {\getvalue{\!!sixpoint\c!tt\c!tf}%
+ \the\everycorps}
+
+%D \macros
+%D {definealternativestyle}
+%D
+%D In the main modules we are going to implement lots of
+%D parameterized commands and one of these parameters will
+%D concern the font to use. To suit consistent use of fonts we
+%D here implement a mechanism for defining the keywords that
+%D present a particular style or alternative.
+%D
+%D \starttypen
+%D \definealternativestyle [keywords] [\style] [\nostyle]
+%D \stoptypen
+%D
+%D The first command is used in the normal textflow, while the
+%D second command takes care of headings and alike. Consider
+%D the next two definitions:
+%D
+%D \starttypen
+%D \definealternativestyle [bold] [\bf] []
+%D \definealternativestyle [cap] [\kap] [\kap]
+%D \stoptypen
+%D
+%D A change \type{\bf} in a heading which is to be set in
+%D \type{\tfd} does not look that well, so therefore we leave
+%D the second argument of \type{\definealternativestyle} empty.
+%D When we capatalize characters using the pseudo small cap
+%D command \type{\kap}, we want this to take effect in both
+%D text and headings, which is accomplished by assigning both
+%D arguments.
+
+\def\dodefinealternativestyle[#1][#2][#3]%
+ {\def\docommando##1%
+ {\doifundefined{##1}
+ {\expandafter\ifx\csname##1\endcsname#2\else
+ \setvalue{##1}{\groupedcommand{#2}{}}%
+ \fi}%
+ \setvalue{\@letter@##1}{#2}%
+ \setvalue{\@noletter@##1}{#3}}%
+ \processcommalist[#1]\docommando}
+
+\def\definealternativestyle%
+ {\dotripleargument\dodefinealternativestyle}
+
+%D This command also defines the keyword as command. This means
+%D that the example definition of \type{bold} we gave before,
+%D results in a command \type{\bold} which can be used as:
+%D
+%D \startbuffer
+%D He's a \bold{man} man with a {\bold head}.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D or
+%D
+%D \startvoorbeeld
+%D \definealternativestyle[bold][\bf][]\haalbuffer
+%D \stopvoorbeeld
+%D
+%D Such definitions are of course unwanted for \type{\kap}
+%D because this would result in an endless recursive call.
+%D Therefore we check on the existance of both the command and
+%D the substitution. The latter is needed because for instance
+%D \type{\type} is an entirely diferent command. That command
+%D handles verbatim, while the style command would just switch
+%D to teletype font. This is just an example of a tricky
+%D naming coincidence.
+
+%D \macros
+%D {doconvertfont,noconvertfont,
+%D dontconvertfont,redoconvertfont}
+%D
+%D After having defined such keywords, we can call for them by
+%D using
+%D
+%D \starttypen
+%D \doconvertfont{keyword}{text}
+%D \stoptypen
+%D
+%D We deliberately pass an argument. This enables us to
+%D assign converters that handle one agrument, like
+%D \type{\kap}.
+%D
+%D By default the first specification is used to set the style,
+%D exept when we say \type{\dontconvertfont}, after which the
+%D second specification is used. We can also directly call for
+%D \type{\noconvertfont}. In nested calls, we can restore the
+%D conversion by saying \type{\redoconvertfont}.
+
+\unexpanded\def\dodoconvertfont#1#2%
+ {\doifdefinedelse{\@letter@#1}
+ {\doifelsenothing{#1}
+ {\def\next{}}
+ {\def\next{\getvalue{\@letter@#1}}}}
+ {\doifdefinedelse{#1}
+ {\def\next{\getvalue{#1}}}
+ {\def\next{#1}}}%
+ \next{#2}}
+
+\let\doconvertfont=\dodoconvertfont
+
+\def\noconvertfont#1#2%
+ {\doifdefinedelse{\@noletter@#1}
+ {\doifelsenothing{#1}
+ {\def\next{}}
+ {\def\next{\getvalue{\@noletter@#1}}}}
+ {\def\next{#1}}%
+ \next{#2}}
+
+\unexpanded\def\dontconvertfont%
+ {\let\doconvertfont=\noconvertfont}
+
+\unexpanded\def\redoconvertfont%
+ {\let\doconvertfont=\dodoconvertfont}
+
+%D These commands are not grouped! Grouping is most probably
+%D done by the calling macro's and would lead to unnecessary
+%D overhead.
+
+%D \macros
+%D {em,emphasistypeface,emphasisboldface}
+%D
+%D The next macro started as a copy of Donald Arseneau's
+%D \type{\em} (\TUGNEWS\ Vol.~3, no.~1, 1994). His
+%D implementation was a bit more sophisticated version of the
+%D standard \LATEX\ one. We furter enhanced the macro, so now
+%D it also adapts itself to boldface mode. Because we favor
+%D {\sl slanted} type over {\it italic}, we made the emphasis
+%D adaptable, for instance:
+%D
+%D \starttypen
+%D \def\emphasistypeface {\it}
+%D \def\emphasisboldface {\bi}
+%D \stoptypen
+%D
+%D But we prefer:
+
+\def\emphasistypeface {\sl}
+\def\emphasisboldface {\bs}
+
+\unexpanded\def\em%
+ {\ifnum\fam=\itfam
+ \def\emphasistypeface{\it}\tf
+ \else\ifnum\fam=\slfam
+ \def\emphasistypeface{\sl}\tf
+ \else\ifnum\fam=\bffam
+ \emphasisboldface
+ \else\ifnum\fam=\bsfam
+ \def\emphasisboldface{\bs}\bf
+ \else\ifnum\fam=\bifam
+ \def\emphasisboldface{\bi}\bf
+ \else
+ \emphasistypeface
+ \fi\fi\fi\fi\fi
+ \ifdim\fontdimen1\font>\!!zeropoint
+ \expandafter\aftergroup
+ \fi
+ \emphasiscorrection}
+
+%D Donald's (adapted) macros take the next character into
+%D account when placing italic correction. As a bonus we also
+%D look for something that looks like a dash, in which case we
+%D don't correct.
+
+\def\emphasiscorrection%
+ {\ifhmode
+ \expandafter\emphasislook
+ \fi}
+
+\def\emphasislook%
+ {\begingroup
+ \futurelet\next\emphasistest}
+
+\def\emphasistest%
+ {\ifcat\noexpand\next,%
+ \setbox\scratchbox=\hbox{\next}%
+ \ifdim\ht\scratchbox<.3ex
+ \let\doemphasiscorrection\endgroup
+ \fi
+ \fi
+ \doemphasiscorrection}
+
+\def\doemphasiscorrection%
+ {\scratchskip=\lastskip
+ \ifdim\scratchskip=\!!zeropoint
+ \/\relax
+ \else
+ \unskip\/\hskip\scratchskip
+ \fi
+ \endgroup}
+
+%D We end with some examples which show the behavior when
+%D some punctuation is met. We also show how the mechanism
+%D adapts itself to bold, italic and slanted typing.
+%D
+%D \startbuffer
+%D test {test}test \par
+%D test {\em test}test \par
+%D test {\em test}--test \par
+%D
+%D test {test}, test \par
+%D test {\em test}, test \par
+%D
+%D test {\em test {\em test {\em test} test} test} test \par
+%D test {\bf test {\em test {\em test} test} test} test \par
+%D test {\sl test {\em test {\em test} test} test} test \par
+%D test {\it test {\em test {\em test} test} test} test \par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D We get:
+%D
+%D \startvoorbeeld
+%D \startopelkaar
+%D \haalbuffer
+%D \stopopelkaar
+%D \stopvoorbeeld
+
+%D \macros
+%D {setfont}
+%D
+%D Every now and then we want to define a font directly, for
+%D instance when we typeset title pages. The next macro saves
+%D some typing:
+
+\def\setfont%
+ {\def\dosetfont%
+ {\nextfont\stelinterliniein}%
+ \afterassignment\dosetfont
+ \font\nextfont=}
+
+%D One can call this macro as:
+%D
+%D \starttypen
+%D \setfont cmr10 at 60pt
+%D \stoptypen
+%D
+%D After which the font is active and the baselines and
+%D struts are set.
+
+%D \macros
+%D {showcorps}
+%D
+%D One can call for a rather simple overview of a corps and the
+%D relations between its alternative fonts.
+%D
+%D \showsetup{\y!showcorps}
+%D
+%D The current corps (here we omitted the argument) looks like:
+%D
+%D \showcorps
+%D
+%D The implementation is rather straightforward in using
+%D \type{\halign}.
+
+\def\doshowcorps[#1]%
+ {\startbaselinecorrection
+ \vbox
+ {\def\bigstrut##1##2%
+ {\hbox{\vrule
+ \!!height ##1\ht\strutbox
+ \!!depth ##2\dp\strutbox
+ \!!width \!!zeropoint}}
+ \doifelsenothing{#1}
+ {\def\title{\the\korpsgrootte}}
+ {\switchtocorps[#1]\def\title{#1}}
+ \tabskip\!!zeropoint
+ \parindent\!!zeropoint
+ \def\next##1##2##3%
+ {&&##1&&##2\tf##3&&##2\sc##3%
+ &&##2\sl##3&&##2\it##3&&##2\bf##3&&##2\bs##3&&##2\bi##3%
+ &&##2\tfx##3&&##2\tfxx##3%
+ &&##2\tfa##3&&##2\tfb##3&&##2\tfc##3&&##2\tfd##3&\cr}%
+ \setlocalhsize
+ \halign to \localhsize
+ {\bigstrut{1.5}{2}##&\vrule##
+ \tabskip=\!!zeropoint \!!plus 1fill
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&##\vrule
+ \tabskip=\!!zeropoint\cr
+ \noalign{\hrule}
+ &\multispan{29}{\vrule\hfil\tttf\strut[\title]\hfil\vrule}\cr
+ \noalign{\hrule}\next{}{\tt\string}{}
+ \noalign{\hrule}\next{\tt\string\rm}{\rm}{Ag}
+ \noalign{\hrule}\next{\tt\string\ss}{\ss}{Ag}
+ \noalign{\hrule}\next{\tt\string\tt}{\tt}{Ag}
+ \noalign{\hrule}}}
+ \stopbaselinecorrection}
+
+\def\showcorps%
+ {\dosingleempty\doshowcorps}
+
+%D \macros
+%D {showcorpsenvironment}
+%D
+%D The current corpsenvironment is:
+%D
+%D \showcorpsenvironment
+%D
+%D This overview is generated using:
+%D
+%D \showsetup{\y!showcorpsenvironment}
+
+\def\doshowcorpsenvironment[#1]%
+ {\startbaselinecorrection
+ \vbox
+ {\tabskip\!!zeropoint
+ \parindent\!!zeropoint
+ \doifelsenothing{#1}
+ {\def\title{\the\korpsgrootte}}
+ {\switchtocorps[#1]\def\title{#1}}
+ \def\do##1##2%
+ {\getvalue{\??ft##1##2}}
+ \def\next##1##2%
+ {&&##1{##2}{\s!text}&&##1{##2}{\s!script}&&##1{##2}{\s!scriptscript}%
+ &&##1{##2}{\c!x}&&##1{##2}{\c!xx}%
+ &&##1{##2}{\v!klein}&&##1{##2}{\v!groot}&\cr
+ \noalign{\hrule}}
+ \def\donext##1%
+ {\doifdefined{\??ft##1\s!text}{\next\do##1}}
+ \setlocalhsize
+ \halign to \localhsize
+ {##&\vrule##\strut
+ \tabskip=\!!zeropoint \!!plus 1fill
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##&\hfil##\hfil&\vrule##
+ &\hfil##\hfil&##\vrule
+ \tabskip=\!!zeropoint\cr
+ \noalign{\hrule}
+ &\multispan{15}{\vrule\hfil\tttf\strut[\title]\hfil}\vrule\cr
+ \noalign{\hrule}
+ \next\bf\relax
+ \donext\!!twelvepoint\donext\!!elevenpoint\donext\!!tenpoint
+ \donext\!!ninepoint \donext\!!eightpoint \donext\!!sevenpoint
+ \donext\!!sixpoint \donext\!!fivepoint \donext\!!fourpoint}}
+ \stopbaselinecorrection}
+
+\def\showcorpsenvironment%
+ {\dosingleempty\doshowcorpsenvironment}
+
+%D Fonts can only be used when loaded. In \CONTEXT\ we
+%D postpone the loading of fonts, even when we load \PLAIN.
+%D This means that we have to redefine one of the \PLAIN\
+%D macros. Let's tell that to the user first:
+
+\writestatus{loading}{Postponed Plain TeX Font Definitions}
+
+%D \macros
+%D {bordermatrix}
+%D
+%D In \PLAIN\ \TEX\ the width of a parenthesis is stored in
+%D the \DIMENSION\ \type{\p@renwd}. This value is derived from
+%D the width of \type{\tenrm B}, so let's take care of it now:
+
+\let\normalbordermatrix=\bordermatrix
+
+\def\bordermatrix%
+ {\bgroup
+ \setbox0=\hbox{\getvalue{\textface\c!mm\c!ex}B}%
+ \global\p@renwd=\wd0\relax
+ \egroup
+ \normalbordermatrix}
+
+%D Because we want to be as \PLAIN\ compatible as possible, we
+%D make most of \PLAIN's font mechanisme available to the
+%D \CONTEXT\ user.
+
+\def\setplainfonts#1#2%
+ {\setvalue{ten#1}{\getvalue{\!!tenpoint#2}}%
+ \setvalue{seven#1}{\getvalue{\!!sevenpoint#2}}%
+ \setvalue{five#1}{\getvalue{\!!fivepoint#2}}}
+
+\setplainfonts {\c!rm} {\c!rm\c!tf}
+\setplainfonts {\c!bf} {\c!rm\c!bf}
+\setplainfonts {\c!sl} {\c!rm\c!sl}
+\setplainfonts {\c!it} {\c!rm\c!it}
+\setplainfonts {\c!tt} {\c!rm\c!tt}
+\setplainfonts {\c!sy} {\c!mm\c!sy}
+\setplainfonts {\c!ex} {\c!mm\c!ex}
+\setplainfonts {\c!i} {\c!mm\c!mi}
+
+\let\setplainfonts=\undefined
+
+%D \macros
+%D {ss, SS}
+%D
+%D We are going to redefine \type{\ss} but for those wo still
+%D want to have access to the german \SS, we save it's value in
+%D \type{\SS}. Ok, I should have used \type{\sf} insead of
+%D \type{\ss} in the first place.
+
+\let\SS=\ss
+
+%D \macros
+%D {xi}
+%D
+%D We are going to redefine \type{\xi}, but fortunately this
+%D is a math mode character, so we can just say:
+
+\let\normalxi=\xi
+
+%D \macros
+%D {dotlessi,dotlessj}
+%D
+%D We also save both dotless~\dotlessi\ and~\dotlessj. This
+%D way we still have them were we expect them, even when
+%D macros of font providers redefine them.
+
+\let\dotlessi=\i
+\let\dotlessj=\j
+
+%D \macros
+%D {smashaccent}
+%D {}
+%D
+%D When we let \TEX\ put an accent on top of a character, such
+%D composed characters can get more height that height of a
+%D standard \type{\strut}. The next macro takes care of such
+%D unwanted compositions.
+%D
+%D We need to reach over the number that specifies the accent,
+% %D and in doing so we use \type{\hyphenchar} as a placeholder
+%D and in doing so we use \type{\scratchcounter} as a placeholder
+%D because it accepts 8 bit numbers in octal, decimal or
+%D hexadecimal format. Next we set the height of the accented
+%D character to the natural height of the character.
+
+\let\normalaccent=\accent
+
+\def\dodosmashaccent#1%
+ {\setbox0=\hbox{#1}%
+ \setbox2=\hbox{\normalaccent\scratchcounter#1}%
+ \ht2=\ht0\box2
+ \egroup
+ \nobreak}
+
+\def\dosmashaccent%
+ {\afterassignment\dodosmashaccent\expandafter\scratchcounter}
+
+\def\smashaccent%
+ {\dontleavehmode
+ \bgroup
+ \let\accent=\dosmashaccent}
+
+%D For instance we can say:
+%D
+%D \starttypen
+%D \smashaccent\"Uberhaupt
+%D \stoptypen
+%D
+%D But normally one will use it as a prefix in definitions.
+
+%D \macros
+%D {moveaccent}
+%D
+%D Exact positioning of accents cns be realized by saying:
+%D
+%D \starttypen
+%D \moveaccent{-.1ex}\"uberhaupt
+%D \stoptypen
+%D
+%D Again, this one will mostly used as a prefix in definitions.
+
+\def\dodomoveaccent#1%
+ {\dimen2=\fontdimen5\font
+ \dimen4=\dimen2
+ \advance\dimen4 by -\dimen0
+ \fontdimen5\font=\dimen4
+ \normalaccent\scratchcounter#1\relax
+ \fontdimen5\font=\dimen2
+ \egroup}
+
+\def\domoveaccent%
+ {\afterassignment\dodomoveaccent\expandafter\scratchcounter}
+
+\def\moveaccent#1%
+ {\dontleavehmode
+ \bgroup
+ \dimen0=#1\relax
+ \let\accent=\domoveaccent}
+
+%D \macros
+%D {everyuppercase, EveryUppercase}
+%D
+%D When we want to uppercase strings of characters, we have to
+%D take care of those characters that have a special meaning or
+%D are only accessible by means of macros. The next hack was
+%D introduced when Tobias Burnus started translating head and
+%D label texts into spanish and italian. The first application
+%D of this token register therefore can be found in the module
+%D that deals with these texts.
+
+\newevery \everyuppercase \EveryUppercase
+
+\appendtoks \def\i{I}\to \everyuppercase
+\appendtoks \def\j{J}\to \everyuppercase
+\appendtoks \def\ss{SS}\to \everyuppercase
+\appendtoks \let\l=\L\to \everyuppercase
+\appendtoks \let\ae=\AE\to \everyuppercase
+\appendtoks \let\aa=\AA\to \everyuppercase
+\appendtoks \let\o=\O\to \everyuppercase
+\appendtoks \let\oe=\OE\to \everyuppercase
+
+%D \macros
+%D {everysanitize, EverySanitize}
+%D
+%D Whenever we are sanitizing strings, like we sometimes do
+%D when we deal with specials, the next token register can be
+%D called.
+
+\newevery \everysanitize \EverySanitize
+
+%D \macros
+%D {obeylccodes}
+%D
+%D One way of manipulating characters is changing the their
+%D \type{\lccode} and applying \type{\lowcase}. An example of
+%D this can be found in \type{spec-mis}.
+
+\def\obeylccodes%
+ {\scratchcounter=32
+ \loop
+ \ifnum\scratchcounter<127
+ \lccode\scratchcounter=\scratchcounter
+ \advance\scratchcounter by 1
+ \repeat
+ \ifeightbitcharacters
+ \scratchcounter=128
+ \loop
+ \ifnum\scratchcounter<255
+ \lccode\scratchcounter=`.
+ \advance\scratchcounter by 1
+ \repeat
+ \fi}
+
+%D Here come the definitions.
+
+\redefineaccent ' % grave
+\redefineaccent ` % acute
+\redefineaccent " % dieresis
+\redefineaccent ^ % circumflex
+\redefineaccent ~ % tilde
+\redefineaccent v % caron
+\redefineaccent u % breve
+\redefineaccent . % dotaccent
+\redefineaccent H % hungarumlaut
+\redefineaccent t % ........
+
+\redefinecharacter ae % ae
+\redefinecharacter AE % AE
+\redefinecharacter oe % oe
+\redefinecharacter OE % OE
+\redefinecharacter o % oslash
+\redefinecharacter O % Oslash
+\redefinecharacter ss % germandbls
+\redefinecharacter SS % germandbls
+\redefinecharacter aa % aring
+\redefinecharacter AA % Aring
+\redefinecharacter cc % ccedilla
+\redefinecharacter CC % Ccedilla
+
+\redefinecommand b
+\redefinecommand c
+
+\definecorpsenvironment
+ [\!!fourteenpointfour]
+ [ \s!text=\!!fourteenpointfour,
+ \s!script=\!!elevenpoint,
+ \s!scriptscript=\!!ninepoint,
+ \c!x=\!!twelvepoint,
+ \c!xx=\!!tenpoint,
+ \c!groot=\!!fourteenpointfour,
+ \c!klein=\!!twelvepoint]
+
+\definecorpsenvironment
+ [\!!twelvepoint]
+ [ \s!text=\!!twelvepoint,
+ \s!script=\!!ninepoint,
+ \s!scriptscript=\!!sevenpoint,
+ \c!x=\!!tenpoint,
+ \c!xx=\!!eightpoint,
+ \c!groot=\!!fourteenpointfour,
+ \c!klein=\!!tenpoint]
+
+\definecorpsenvironment
+ [\!!elevenpoint]
+ [ \s!text=\!!elevenpoint,
+ \s!script=\!!eightpoint,
+ \s!scriptscript=\!!sixpoint,
+ \c!x=\!!ninepoint,
+ \c!xx=\!!sevenpoint,
+ \c!groot=\!!twelvepoint,
+ \c!klein=\!!ninepoint]
+
+\definecorpsenvironment
+ [\!!tenpoint]
+ [ \s!text=\!!tenpoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!eightpoint,
+ \c!xx=\!!sixpoint,
+ \c!groot=\!!twelvepoint,
+ \c!klein=\!!eightpoint]
+
+\definecorpsenvironment
+ [\!!ninepoint]
+ [ \s!text=\!!ninepoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sevenpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!elevenpoint,
+ \c!klein=\!!sevenpoint]
+
+\definecorpsenvironment
+ [\!!eightpoint]
+ [ \s!text=\!!eightpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sixpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!tenpoint,
+ \c!klein=\!!sixpoint]
+
+\definecorpsenvironment
+ [\!!sevenpoint]
+ [ \s!text=\!!sevenpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sixpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!ninepoint,
+ \c!klein=\!!fivepoint]
+
+\definecorpsenvironment
+ [\!!sixpoint]
+ [ \s!text=\!!sixpoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!fivepoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!eightpoint,
+ \c!klein=\!!fivepoint]
+
+\definecorpsenvironment
+ [\!!fivepoint]
+ [ \s!text=\!!fivepoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!fivepoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!sevenpoint,
+ \c!klein=\!!fivepoint]
+
+\definecorpsenvironment
+ [\!!fourpoint]
+ [ \s!text=\!!fourpoint,
+ \s!script=\!!fourpoint,
+ \s!scriptscript=\!!fourpoint,
+ \c!x=\!!fourpoint,
+ \c!xx=\!!fourpoint,
+ \c!groot=\!!sixpoint,
+ \c!klein=\!!fourpoint]
+
+\definecorpsswitch [fourteenpointfour] [\!!fourteenpointfour]
+\definecorpsswitch [twelvepoint] [\!!twelvepoint]
+\definecorpsswitch [elevenpoint] [\!!elevenpoint]
+\definecorpsswitch [tenpoint] [\!!tenpoint]
+\definecorpsswitch [ninepoint] [\!!ninepoint]
+\definecorpsswitch [eightpoint] [\!!eightpoint]
+\definecorpsswitch [sevenpoint] [\!!sevenpoint]
+\definecorpsswitch [sixpoint] [\!!sixpoint]
+\definecorpsswitch [fivepoint] [\!!fivepoint]
+\definecorpsswitch [fourpoint] [\!!fourpoint]
+
+\definecorpsswitch [xii] [\!!twelvepoint]
+\definecorpsswitch [xi] [\!!elevenpoint]
+\definecorpsswitch [x] [\!!tenpoint]
+\definecorpsswitch [ix] [\!!ninepoint]
+\definecorpsswitch [viii] [\!!eightpoint]
+\definecorpsswitch [vii] [\!!sevenpoint]
+\definecorpsswitch [vi] [\!!sixpoint]
+
+\defineoverallstyle [\v!romaan, \c!rm] [\c!rm]
+\defineoverallstyle [\v!schreefloos, \c!ss] [\c!ss]
+\defineoverallstyle [\v!type, \c!tt] [\c!tt]
+\defineoverallstyle [\v!handschrift, \c!hw] [\c!hw]
+\defineoverallstyle [\v!calligrafie, \c!cg] [\c!cg]
+
+\definealternativestyle [\v!mediaeval] [\os] []
+\definealternativestyle [\v!normaal] [\tf] []
+\definealternativestyle [\v!vet] [\bf] []
+\definealternativestyle [\v!type] [\tt] []
+\definealternativestyle [\v!schuin] [\sl] []
+\definealternativestyle [\v!vetschuin,\v!schuinvet] [\bs] []
+\definealternativestyle [\v!klein,\v!kleinnormaal] [\tfx] []
+\definealternativestyle [\v!kleinvet] [\bfx] []
+\definealternativestyle [\v!kleintype] [\ttx] []
+\definealternativestyle [\v!kleinschuin] [\slx] []
+\definealternativestyle [\v!kleinvetschuin,\v!kleinschuinvet] [\bsx] []
+\definealternativestyle [\v!kap,\v!kapitaal] [\kap] [\kap]
+
+%D We still have to take care of \type{\xi}, so:
+
+\def\xi%
+ {\ifmmode\normalxi\else\elevenpoint\fi}
+
+%D By default we load the Computer Modern Roman fonts and
+%D activate the 12pt roman corps. Sans serif and teletype are
+%D also available and can be called for by \type{\ss} and
+%D \type{\tt}.
+
+%D We also load the high \ASCII\ waarde as defined by the
+%D standard \kap{IBM PC} codepage. Finaly we load the
+%D \POSTSCRIPT\ standard predefined accented characters
+%D encoding vector as provided by Y\&Y named \type{texnansi}.
+%D These are for instance used when we load Lucida Bright
+%D (\type{lbr}) or \POSTSCRIPT\ Times Roman (\type{ptr}),
+%D Helvetica (\type{phv}) and Courier (\type{pcr}) which are
+%D also available as whole (\type{\setupcorps[pos]}).
+
+\setupcorps [cmr, 12pt, \v!romaan, ibm, ans]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-lbr.tex b/tex/context/base/font-lbr.tex new file mode 100644 index 000000000..a5ed56f4a --- /dev/null +++ b/tex/context/base/font-lbr.tex @@ -0,0 +1,339 @@ +%D \module
+%D [ file=font-lbr,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Lucida Bright,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D The Lucida Bright fonts are both good looking and and
+%D complete. These fonts have prebuilt accented characters,
+%D which means that we use another encoding vector: \YandY\
+%D texnansi. These fonts are a good illustration that a 12
+%D point corps is indeed never that size. The Lucida Bright
+%D fonts come in one design size.
+
+\startcoding[texnansi]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
+ [tf=lbr sa 1,
+ bf=lbd sa 1,
+ it=lbi sa 1,
+ sl=lbsl sa 1,
+ bi=lbdi sa 1,
+ bs=lbdi sa 1,
+ tfa=lbr sa 1.200,
+ tfb=lbr sa 1.440,
+ tfc=lbr sa 1.728,
+ tfd=lbr sa 2.074,
+ sc=lbr sa 0.833]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
+ [tf=lsr sa 1,
+ bf=lsd sa 1,
+ it=lsi sa 1,
+ sl=lsi sa 1,
+ bi=lsdi sa 1,
+ bs=lsdi sa 1,
+ tfa=lsr sa 1.200,
+ tfb=lsr sa 1.440,
+ tfc=lsr sa 1.728,
+ tfd=lsr sa 2.074,
+ sc=lsr sa 0.833]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
+ [tf=lstr sa 1,
+ sl=lsto sa 1,
+ tfa=lstr sa 1.200,
+ tfb=lstr sa 1.440,
+ tfc=lstr sa 1.728,
+ tfd=lstr sa 2.074]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [hw]
+ [tf=lbh sa 1]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [cg]
+ [tf=lbc sa 1]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [mm]
+ [ex=lbme sa 1,
+ mi=lbmo sa 1,
+ sy=lbms sa 1,
+ ma=lbma sa 1]
+
+\definecorps [7pt,6pt,5pt] [rm]
+ [tf=lbr sa 1,
+ bf=lbd sa 1,
+ sl=lbi sa 1,
+ it=lbi sa 1]
+
+\definecorps [7pt,6pt,5pt] [ss]
+ [tf=lsr sa 1,
+ sl=lsd sa 1,
+ it=lsi sa 1,
+ bf=lsi sa 1]
+
+\definecorps [7pt,6pt,5pt] [tt]
+ [tf=lstr sa 1,
+ sl=lsto sa 1]
+
+\definecorps [7pt,6pt,5pt] [mm]
+ [ex=lbme sa 1,
+ mi=lbmo sa 1,
+ sy=lbms sa 1,
+ ma=lbma sa 1]
+
+%D Defining the larger alternatives takes only a few
+%D commands, thanks to \type{sa}.
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
+ [bfa=lbd sa 1.200,
+ bfb=lbd sa 1.440,
+ bfc=lbd sa 1.728,
+ bfd=lbd sa 2.074,
+ sla=lbsl sa 1.200,
+ slb=lbsl sa 1.440,
+ slc=lbsl sa 1.728,
+ sld=lbsl sa 2.074,
+ bsa=lbdi sa 1.200,
+ bsb=lbdi sa 1.440,
+ bsc=lbdi sa 1.728,
+ bsd=lbdi sa 2.074]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
+ [bfa=lsr sa 1.200,
+ bfb=lsr sa 1.440,
+ bfc=lsr sa 1.728,
+ bfd=lsr sa 2.074,
+ sla=lsd sa 1.200,
+ slb=lsd sa 1.440,
+ slc=lsd sa 1.728,
+ sld=lsd sa 2.074,
+ bsa=lsi sa 1.200,
+ bsb=lsi sa 1.440,
+ bsc=lsi sa 1.728,
+ bsd=lsi sa 2.074]
+
+\definecorps [14.4pt,12pt,10pt] [tt]
+ [sla=lsto sa 1.220,
+ slb=lsto sa 1.440,
+ slc=lsto sa 1.728,
+ sld=lsto sa 2.074]
+
+\stopcoding
+
+%D Firt we implement some alternatives for \AMS\ symbols.
+%D These can be overrules by loading the \AMS\ font module
+%D afterwards.
+
+\mathchardef\blacktriangleleft ="01F0
+\mathchardef\blacktriangleright="01F1
+\mathchardef\boxtimes ="02EC
+
+%D Here I copied the definition file that is part of the
+%D \YandY\ distribution.
+
+%D \framed[breedte=\hsize]
+%D {Copyright (C) 1991 - 1993 \YandY, Inc. All Rights Reserved}
+
+%D This part of the definition is adapted bij J. Hagen. There
+%D is already an extra family: \type{\mafam} (Math A ). Also,
+%D the loading of fonts is done somewhere else.
+
+\unprotect
+
+\let\arfam = \mafam
+\let\thearfam = \hexmafam
+
+%D This part is adapted to the \CONTEXT\ font||naming method.
+%D Also, we use \type{\setskewchar}, which activates the not
+%D yet loaded font.
+
+%D The next definitions are already taken care of.
+
+%D \starttypen
+%D % \setskewchar{12ptmmmi}='177
+%D % \setskewchar{11ptmmmi}='177
+%D % \setskewchar{10ptmmmi}='177
+%D % \setskewchar{9ptmmmi}='177
+%D % \setskewchar{8ptmmmi}='177
+%D % \setskewchar{7ptmmmi}='177
+%D % \setskewchar{6ptmmmi}='177
+%D % \setskewchar{5ptmmmi}='177
+%D \stoptypen
+
+%D \starttypen
+%D % \setskewchar{12ptmmsy}='60
+%D % \setskewchar{11ptmmsy}='60
+%D % \setskewchar{10ptmmsy}='60
+%D % \setskewchar{9ptmmsy}='60
+%D % \setskewchar{8ptmmsy}='60
+%D % \setskewchar{7ptmmsy}='60
+%D % \setskewchar{6ptmmsy}='60
+%D % \setskewchar{5ptmmsy}='60
+%D \stoptypen
+
+%D Adjusted for LucidaNewMath||Extension at 10pt and math axis
+%D at 3.13pt Note: delimiter increments are 5.5pt (as opposed
+%D to 6pt in \kap{CM}).
+
+\def\big #1{{\hbox{$\left#1\vbox to8.20\p@{}\right.\n@space$}}}
+\def\Big #1{{\hbox{$\left#1\vbox to10.80\p@{}\right.\n@space$}}}
+\def\bigg #1{{\hbox{$\left#1\vbox to13.42\p@{}\right.\n@space$}}}
+\def\Bigg #1{{\hbox{$\left#1\vbox to16.03\p@{}\right.\n@space$}}}
+\def\biggg #1{{\hbox{$\left#1\vbox to17.72\p@{}\right.\n@space$}}}
+\def\Biggg #1{{\hbox{$\left#1\vbox to21.25\p@{}\right.\n@space$}}}
+\def\n@space {\nulldelimiterspace\z@ \m@th}
+
+%D Define some extra large sizes. It's always done using
+%D extensible parts.
+
+\def\bigggl{\mathopen\biggg}
+\def\bigggr{\mathclose\biggg}
+\def\Bigggl{\mathopen\Biggg}
+\def\Bigggr{\mathclose\Biggg}
+
+%D The following is needed if the roman text font is {\em
+%D not} just \kap{LBR}.
+
+%D Draw the small sizes of $[$ and $]$ from \kap{LBMO} instead
+%D of \kap{LBR}.
+
+\mathcode`\[="4186 \delcode`\[="186302
+\mathcode`\]="5187 \delcode`\]="187303
+
+%D Draw the small sizes of $($ and $)$ from \kap{LBMO} instead
+%D of \kap{LBR}.
+
+\mathcode`\(="4184 \delcode`\(="184300
+\mathcode`\)="5185 \delcode`\)="185301
+
+%D The small sizes of $\{$ and $\}$ are already drawn from
+%D \kap{LBMS}.
+
+%D Draw small $/$ from \kap{LBMO} instead of \kap{LBR}.
+
+\mathcode`\/="013D \delcode`\/="13D30E
+
+%D Draw $=$ and $+$ from \kap{LBMS} instead of \kap{LBR}.
+
+\mathcode`\=="3283 \mathcode`\+="2282
+
+%D Make open face brackets accessible, i.e. [[ and ]].
+
+\def\ldbrack{\delimiter"4182382}
+\def\rdbrack{\delimiter"5183383}
+
+%D Provide access to surface integral signs (linked from text
+%D to display size).
+
+\mathchardef\surfintop="1390
+\def\surfint{\surfintop\nolimits}
+
+%D Make medium size integrals available ({\em not} linked to
+%D display size).
+
+\mathchardef\midintop="1392
+\def\midint{\midintop\nolimits}
+
+\mathchardef\midointop="1393
+\def\midoint{\midointop\nolimits}
+
+\mathchardef\midsurfintop="1394
+\def\midsurfint{\midsurfintop\nolimits}
+
+%D Extensible integral (use with \type{\bigg}, \type{\Bigg},
+%D \type{\biggg}, \type{\Biggg} etc).
+
+\def\largeint{\delimiter"135A395}
+
+%D Various types of small integrals.
+
+\mathchardef\dblint ="0188
+\mathchardef\trplint ="0189
+\mathchardef\contint ="018A
+\mathchardef\surfint ="018B
+\mathchardef\volint ="018C
+\mathchardef\clwint ="018D
+\mathchardef\cclwcint="018E
+\mathchardef\clwcint ="018F
+
+%D To close up gaps in special math characters constructed
+%D from pieces.
+
+\def\joinrel{\mathrel{\mkern-4mu}}
+
+%D Some characters that need construction in \kap{CM} exist
+%D complete in \kap{LBMO} or \kap{LBMS}.
+
+\mathchardef\bowtie="31F6
+\mathchardef\models="32EE
+\mathchardef\doteq ="32C9
+\mathchardef\cong ="329B
+\mathchardef\angle ="028B
+
+%D Some more characters.
+
+% \mathchardef\hbar ="0\thearfam 1B
+\mathchardef\hbar ="019D
+\mathchardef\neq ="3\thearfam 94
+\mathchardef\rightleftharpoons="3\thearfam 7A
+\mathchardef\leftrightharpoons="3\thearfam 79
+\mathchardef\hookleftarrow ="3\thearfam 3C
+\mathchardef\hookrightarrow ="3\thearfam 3E
+\mathchardef\mapsto ="3\thearfam 2C
+
+% \def\longmapsto{\mapstochar\longrightarrow}
+
+%D The ( is not large enough for strut in \kap{LBMO}.
+
+\def\mathstrut{\vphantom{f}}
+
+%D In $n$\hoog{th} root, don't want the $n$ to come too close
+%D to the radical.
+
+\def\r@@t#1#2%
+ {\setbox\z@\hbox{$\m@th#1\sqrt{#2}$}
+ \dimen@\ht\z@ \advance\dimen@-\dp\z@
+ \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-7.5mu \box\z@}
+
+%D Draw upper case upright greek from LucidaNewMath||Extension.
+
+\mathchardef\Gamma ="03D0
+\mathchardef\Delta ="03D1
+\mathchardef\Theta ="03D2
+\mathchardef\Lambda ="03D3
+\mathchardef\Xi ="03D4
+\mathchardef\Pi ="03D5
+\mathchardef\Sigma ="03D6
+\mathchardef\Upsilon="03D7
+\mathchardef\Phi ="03D8
+\mathchardef\Psi ="03D9
+\mathchardef\Omega ="03DA
+
+%D Draw upper case italic greek from LucidaNewMath||Italic.
+
+\mathchardef\varGamma ="0100
+\mathchardef\varDelta ="0101
+\mathchardef\varTheta ="0102
+\mathchardef\varLambda ="0103
+\mathchardef\varXi ="0104
+\mathchardef\varPi ="0105
+\mathchardef\varSigma ="0106
+\mathchardef\varUpsilon="0107
+\mathchardef\varPhi ="0108
+\mathchardef\varPsi ="0109
+\mathchardef\varOmega ="010A
+
+%D \type{\matrix} is changed because \kap{LBMO} is not at 10pt.
+
+\def\matrix#1%
+ {\null\,\vcenter{\normalbaselines\m@th
+ \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
+ \mathstrut\crcr\noalign{\kern-0.9\baselineskip}
+ #1\crcr\mathstrut\crcr\noalign{\kern-0.9\baselineskip}}}\,}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/font-pcr.tex b/tex/context/base/font-pcr.tex new file mode 100644 index 000000000..93839fe67 --- /dev/null +++ b/tex/context/base/font-pcr.tex @@ -0,0 +1,40 @@ +%D \module
+%D [ file=font-pcr,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Adobe Courier,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D This module defines the Standard Adobe Courier. We use
+%D the \YandY\ texnansi encoding vector.
+
+\startcoding[texnansi]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
+ [tf=com sa 1,
+ sl=coo sa 1,
+ tfa=com sa 1.200,
+ tfb=com sa 1.440,
+ tfc=com sa 1.728,
+ tfd=com sa 2.074]
+
+\definecorps [7pt,6pt,5pt] [tt]
+ [tf=com sa 1,
+ sl=coo sa 1]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt]
+ [tf=com sa 1,
+ sl=coo sa 1]
+
+\definecorps [14.4pt,12pt,10pt] [tt]
+ [sla=coo sa 1.200,
+ slb=coo sa 1.440,
+ slc=coo sa 1.728,
+ sld=coo sa 2.074]
+
+\stopcoding
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-phv.tex b/tex/context/base/font-phv.tex new file mode 100644 index 000000000..649cdb136 --- /dev/null +++ b/tex/context/base/font-phv.tex @@ -0,0 +1,53 @@ +%D \module
+%D [ file=font-phv,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Adobe Helvetica,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D This module defines the Standard Adobe Helvetica. We use
+%D the \YandY\ texnansi encoding vector.
+
+\startcoding [texnansi]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
+ [tf=hv sa 1,
+ bf=hvb sa 1,
+ it=hvo sa 1,
+ sl=hvo sa 1,
+ bs=hvbo sa 1,
+ bi=hvbo sa 1,
+ tfa=hv sa 1.200,
+ tfb=hv sa 1.440,
+ tfc=hv sa 1.728,
+ tfd=hv sa 2.074,
+ sc=hv sa 0.833]
+
+\definecorps [7pt,6pt,5pt] [ss]
+ [tf=hv sa 1,
+ bf=hvb sa 1,
+ it=hvo sa 1,
+ sl=hvo sa 1,
+ bs=hvbo sa 1,
+ bi=hvbo sa 1]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
+ [bfa=hvb sa 1.200,
+ bfb=hvb sa 1.440,
+ bfc=hvb sa 1.728,
+ bfd=hvb sa 2.074,
+ sla=hvo sa 1.200,
+ slb=hvo sa 1.440,
+ slc=hvo sa 1.728,
+ sld=hvo sa 2.074,
+ bsa=hvbo sa 1.200,
+ bsb=hvbo sa 1.440,
+ bsc=hvbo sa 1.728,
+ bsd=hvbo sa 2.074]
+
+\stopcoding
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-pos.tex b/tex/context/base/font-pos.tex new file mode 100644 index 000000000..4783df561 --- /dev/null +++ b/tex/context/base/font-pos.tex @@ -0,0 +1,18 @@ +%D \module
+%D [ file=font-pos,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Standard Postscript,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+
+%D This file load the Adobe Times Roman, Helvetica and
+%D Courier.
+
+\input font-ptm
+\input font-phv
+\input font-pcr
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/font-ptm.tex b/tex/context/base/font-ptm.tex new file mode 100644 index 000000000..ada19fa92 --- /dev/null +++ b/tex/context/base/font-ptm.tex @@ -0,0 +1,53 @@ +%D \module
+%D [ file=font-ptm,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Adobe Times Roman,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D This module defines the Standard Adobe Times Roman. We use
+%D the \YandY\ texnansi encoding vector.
+
+\startcoding [texnansi]
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
+ [tf=tir sa 1,
+ bf=tib sa 1,
+ it=tii sa 1,
+ sl=tii sa 1, % tio
+ bi=tibi sa 1,
+ bs=tib sa 1, % tibio
+ tfa=tir sa 1.200,
+ tfb=tir sa 1.440,
+ tfc=tir sa 1.728,
+ tfd=tir sa 2.074,
+ sc=tir sa 0.833]
+
+\definecorps [7pt,6pt,5pt] [rm]
+ [tf=tir sa 1,
+ bf=tib sa 1,
+ it=tii sa 1,
+ sl=tii sa 1, % tio
+ bi=tibi sa 1,
+ bs=tib sa 1] % tibio
+
+\definecorps [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
+ [bfa=tib sa 1.200,
+ bfb=tib sa 1.440,
+ bfc=tib sa 1.728,
+ bfd=tib sa 2.074,
+ sla=tii sa 1.200, % tio
+ slb=tii sa 1.440, % tio
+ slc=tii sa 1.728, % tio
+ sld=tii sa 2.074, % tio
+ bsa=tib sa 1.200, % tibio
+ bsb=tib sa 1.440, % tibio
+ bsc=tib sa 1.728, % tibio
+ bsd=tib sa 2.074] % tibio
+
+\stopcoding
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex new file mode 100644 index 000000000..b6504ffeb --- /dev/null +++ b/tex/context/base/lang-alt.tex @@ -0,0 +1,87 @@ +%D \module
+%D [ file=lang-alt,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Altaic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Uigur, Uzbek
+% Azeri/Azerbaijani, Chuvash, TURKISH, Turkmen
+% Kazakh, Kazar, Kireghiz, Noghay, Talar
+% Buryat, Kalmuck, Khalkha
+
+\writestatus{loading}{Altaic Languages}
+
+\unprotect
+
+\installlanguage
+ [\s!tr]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\setupheadtext [\s!tr] [\v!inhoud=Fihrist]
+\setupheadtext [\s!tr] [\v!tabellen=Cetrel..]
+\setupheadtext [\s!tr] [\v!figuren=Risim..]
+\setupheadtext [\s!tr] [\v!grafieken=Grafik..]
+\setupheadtext [\s!tr] [\v!intermezzos=Entermezzos]
+\setupheadtext [\s!tr] [\v!index=Endeks]
+\setupheadtext [\s!tr] [\v!afkortingen=K\i saltma..]
+\setupheadtext [\s!tr] [\v!logos=Logos]
+\setupheadtext [\s!tr] [\v!eenheden=Birlik]
+
+\setuplabeltext [\s!tr] [\v!tabel=Cetrel ]
+\setuplabeltext [\s!tr] [\v!figuur=Risim ]
+\setuplabeltext [\s!tr] [\v!intermezzo=Entermezzo ]
+\setuplabeltext [\s!tr] [\v!grafiek=Grafik ]
+\setuplabeltext [\s!tr] [\v!hoofdstuk=]
+\setuplabeltext [\s!tr] [\v!paragraaf=]
+\setuplabeltext [\s!tr] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!tr] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!tr] [\v!bijlage=]
+\setuplabeltext [\s!tr] [\v!deel=Fas\i l ]
+\setuplabeltext [\s!tr] [\v!regel=sat\i r]
+\setuplabeltext [\s!tr] [\v!regels=sat\i r..]
+
+\setuplabeltext [\s!tr] [\v!january=ocak]
+\setuplabeltext [\s!tr] [\v!february=\c{s}ubat]
+\setuplabeltext [\s!tr] [\v!march=mart]
+\setuplabeltext [\s!tr] [\v!april=nisan]
+\setuplabeltext [\s!tr] [\v!may=may\i s]
+\setuplabeltext [\s!tr] [\v!june=haziran]
+\setuplabeltext [\s!tr] [\v!july=temmuz]
+\setuplabeltext [\s!tr] [\v!august=a\u{g}ustos]
+\setuplabeltext [\s!tr] [\v!september=eyl\"ul]
+\setuplabeltext [\s!tr] [\v!october=ekim]
+\setuplabeltext [\s!tr] [\v!november=kas\i m]
+\setuplabeltext [\s!tr] [\v!december=aral\i k]
+
+\setuplabeltext [\s!tr] [\v!sunday=pazar]
+\setuplabeltext [\s!tr] [\v!monday=pazartesi]
+\setuplabeltext [\s!tr] [\v!tuesday=sal\i]
+\setuplabeltext [\s!tr] [\v!wednesday=\c{c}ar\c{s}amba]
+\setuplabeltext [\s!tr] [\v!thursday=per\c{s}embe]
+\setuplabeltext [\s!tr] [\v!friday=cuma]
+\setuplabeltext [\s!tr] [\v!saturday=cumartesi]
+
+%D \ShowAllLanguageValues [\s!tr] [turkish] turks fruit
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-ana.tex b/tex/context/base/lang-ana.tex new file mode 100644 index 000000000..742d5f6fb --- /dev/null +++ b/tex/context/base/lang-ana.tex @@ -0,0 +1,21 @@ +%D \module
+%D [ file=lang-ana,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Anatolian Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Anatolian Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-art.tex b/tex/context/base/lang-art.tex new file mode 100644 index 000000000..d91be59fb --- /dev/null +++ b/tex/context/base/lang-art.tex @@ -0,0 +1,23 @@ +%D \module
+%D [ file=lang-art,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Artificial Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Esperanto
+
+\writestatus{loading}{Artificial Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex new file mode 100644 index 000000000..2d95f3735 --- /dev/null +++ b/tex/context/base/lang-bal.tex @@ -0,0 +1,23 @@ +%D \module
+%D [ file=lang-bal,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Baltic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Lettish/Latvian, Lithuanian
+
+\writestatus{loading}{Baltic Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-cel.tex b/tex/context/base/lang-cel.tex new file mode 100644 index 000000000..2f104e9e1 --- /dev/null +++ b/tex/context/base/lang-cel.tex @@ -0,0 +1,23 @@ +%D \module
+%D [ file=lang-cel,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Celtic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Breton, Welsh, Irish, Manx, Scottish Gaelic
+
+\writestatus{loading}{Celtic Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-da.pat b/tex/context/base/lang-da.pat new file mode 100644 index 000000000..7259cee1d --- /dev/null +++ b/tex/context/base/lang-da.pat @@ -0,0 +1,1154 @@ +\endinput
+
+% dkhyphen.tex; created by Frank Jensen (fj@iesd.auc.dk)
+%
+% This file contains the hyphenation patterns for danish.
+%
+\patterns{
+.ae3
+.an3k
+.an1s
+.be5la
+.be1t
+.bi4tr
+.der3i
+.diagno5
+.her3
+.hoved3
+.ne4t5
+.n^^e6v5nt.
+.om1
+.ove4
+.po1
+.s^^e53
+.til3
+.yd5r
+.^^e6r5i
+.^^f8v3r
+ab5le
+3abst
+a3c
+ade5la
+5adg
+a1e
+5afg
+5a4f1l
+af3r
+af4ri
+5afs
+a4gef
+a4gi
+ag5in
+ag5si
+3agti
+a4gy
+a3h
+ais5t
+a3j
+a5ka
+a3ke
+a5kr
+aku5
+a3la
+a1le
+a1li
+al3k
+4alkv
+a1lo
+al5si
+a3lu
+a1ly
+am4pa
+3analy
+an4k5r
+a3nu
+3anv
+a5o
+a5pe
+a3pi
+a5po
+a1ra
+ar5af
+1arb
+a1re
+5arg
+a1ri
+a3ro
+a3sa
+a3sc
+a1si
+a3sk
+a3so
+3a3sp
+a3ste
+a3sti
+a1ta1
+a1te
+a1ti
+a4t5in
+a1to
+ato5v
+a5tr
+a1tu
+a3t^^f8
+a5va
+a1ve
+a5v^^e6
+a5z
+1ba
+ba4ti
+4bd
+1be
+be1k
+be3ro
+be5ru
+be1s4
+be1tr
+1bi
+bi5sk
+b1j
+4b1n
+1bo
+bo4gr
+bo3ra
+bo5re
+1br4
+br^^f8d3
+4bs
+bs5k
+b3so
+b1st
+b5t
+3bu
+bu4s5tr
+b5w
+1by
+by5s
+5b^^e6
+4c1c
+1ce
+ce5ro
+3ch
+4ch.
+ci4o
+ck3
+5cy
+3da
+4d3af
+d5anta
+da4s
+d1b
+d1d4
+1de
+de5d
+4de4lem
+der5eri
+de4rig
+de5sk
+d1f
+d1g
+d3h
+1di
+di1e
+di5l
+d3j
+d1k
+d1l
+d1m
+4d1n
+3do
+4dop
+d5ov
+d1p
+4drett
+5d4reve
+3drif
+3driv
+d5ros
+d5ru
+5dr^^f8v
+ds5an
+ds5in
+d1ski
+d4sm
+dst^^e54
+d4su
+dsu5l
+ds5vi
+d3ta
+d1te
+dt5o
+d5tr
+dt5u
+1du
+dub5
+d1v
+3dy
+3d^^e6
+3d^^f8
+e5ad
+e3af
+e5ag
+e3ak
+e1al
+ea4la
+e3an
+e5ap
+e3at
+e3bl
+ebs3
+e1ci
+ed5ar
+edde4
+eddel5
+e4do
+ed5ra
+ed3re
+ed3rin
+ed4str
+e3e
+3eff
+e3fr
+3eft
+e3gu
+e1h
+e3in
+ei5s
+e3je
+e4j5el
+e1ka
+e3ke
+e3kl
+4e1ko
+e5kr
+ek5sa
+3eksem
+3eksp
+e3ku
+e1kv
+e5ky
+e3lad
+el3ak
+el3ar
+e1las
+e3le
+e4lek
+3elem
+e1li
+5elim
+e3lo
+el5sa
+e5lu
+e3ly
+e3l^^e6
+e3l^^f8
+e4mad
+em4p5le
+em1s
+en5ak
+e4nan
+4enn
+e4no
+en3so
+e5nu
+e5ol
+e3op
+e1or
+e3ov
+epi3
+e1pr
+e3ra
+er3af
+e4rag
+e4rak
+e1re
+e4ref
+er5ege
+5erhv
+e1ri
+e4rib
+er1k
+ero5d
+er5ov
+er3s
+er5tr
+e3rum
+er5un
+e5ry
+e3r^^f8
+er5^^f8n
+e1ta
+e1te
+etek4s
+e1ti
+e3tj
+e1to
+e3tr
+e3tu
+e1ty
+e5t^^e6
+e5t^^f8
+e3um
+e3un
+3eur
+e1va
+e3ve
+e4v3erf
+e1vi
+e1v^^e6
+e5x
+e3^^e6
+e5^^e5
+1fa
+fa4ce
+fags3
+f1b
+f1d
+1fe
+fej4
+fejl1
+f1f
+f1g
+f1h
+1fi
+f1k
+3fl
+1fo
+for1en
+fo4ri
+f1p
+f1s4
+4ft
+f3ta
+f1te
+f1ti
+f5to
+f5tvi
+1fu
+f1v
+3fy
+3f^^e6
+3f^^f8
+f^^f84r5en
+1ga
+g3art
+g1b
+g1d
+1ge
+4g5enden
+ger3in
+ge3s
+g3f
+g1g
+g1h
+1gi
+gi4b
+gi3st
+gi^^f84
+5gj
+g3k
+g1l
+g1m
+3go
+4g5om
+g5ov
+g3p
+1gr
+gs1a
+gsde4len
+g4se
+gsha4
+g5sla
+gs3or
+gs1p
+g5s4tide
+g4str
+gs1v
+g4s^^f8
+g5s^^e5
+g3ta
+g1te
+g1ti
+g5to
+g3tr
+gt4s
+g3ud
+gun5
+g3v
+1gy
+g5yd
+3g^^e6
+3g^^f81
+3g^^e5
+4ha.
+heds3
+he5s
+4het
+hi4e
+hi4n5
+hi3s
+ho5ko
+ho5ve
+4h3t
+hun4
+hund3
+hvo4
+i1a
+i3b
+i4ble
+i1c
+i3dr
+ids5k
+i1el
+i1en
+i3er
+i3et.
+if3r
+i3gu
+i3h
+i5i
+i5j
+i1ka
+i1ke
+ik1l
+i5ko
+ik3re
+ik5ri
+iks5t
+ik4tu
+i3ku
+ik3v
+i3lag
+il3eg
+il5ej
+il5el
+i3li
+i4l5id
+il3k
+i1lo
+il5u
+i3mu
+ind3t
+5inf
+ings1
+in3s
+in4sv
+inter1
+i3nu
+i3od
+i3og
+i5ok
+i3ol
+ion4
+ions1
+i5o5r
+i3ot
+i5pi
+i3pli
+i5pr
+i3re
+i3ri
+ir5t
+i3sc
+i3si
+i4sm
+is3p
+i1ster
+i3sti
+i5sua
+i1ta
+i1te
+i1ti
+i3to
+i3tr
+it5re.
+i1tu
+i3ty
+i5t^^e6
+i1u
+i1va
+i1ve
+i1vi
+i3^^f8
+j3ag
+jde4rer
+jds1
+jek4to
+4j5en.
+j5k
+j3le
+j3li
+jlmeld5
+jlmel4di
+j3r
+jre5
+ju3s
+5kap
+k5au
+5kav
+k5b
+kel5s
+ke3sk
+ke5st
+ke4t5a
+k3h
+ki3e
+ki3st
+k1k
+k5lak
+k1le
+3klu
+k4ny
+5kod
+1kon
+ko3ra
+3kort
+ko3v
+1kra
+5kry
+ks3an
+k1si
+ks3k
+ks1p
+k3ste
+k5stu
+ks5v
+k1t
+k4tar
+k4terh
+kti4e
+kt5re
+kt5s
+3kur
+1kus
+3kut
+k4vo
+k4vu
+3k^^f8
+3k^^e5
+5lab
+lad3r
+5lagd
+la4g3r
+5lam
+1lat
+l1b
+ldiagnos5
+l3dr
+ld3st
+1le.
+5led
+4lele
+le4mo
+3len
+1ler
+1les
+4leu
+l1f
+lfin4
+lfind5
+l1go1
+l3h
+li4ga
+lingeni^^f84
+4l5ins
+4l3int
+li5o
+l3j
+l1ke
+l1ko
+l3ky
+l1l
+l5mu
+lo4du
+l3op
+4l5or
+3lov
+4l3p
+l4ps
+l3r
+4ls
+lses1
+ls5in
+l5sj
+l1ta
+l4taf
+l1te
+l4t5erf
+l3ti
+lt3o
+l3tr
+l3tu
+lu5l
+l3ve
+l3vi
+l3v^^e6
+5l^^f8s
+1ma
+m1b
+m3d
+1me
+4m5ej
+m3f
+m1g
+m3h
+1mi
+mi3k
+m5ing
+mi4o
+mi5sty
+m3k
+m1l
+m1m
+mmen5
+m1n
+3mo
+mo4da
+4mop
+4m5ov
+m1pe
+m3pi
+m3pl
+m1po
+m3pr
+m1r
+mse5s
+ms5in
+m5sk
+ms3p
+m3ste
+ms5v
+m3ta
+m3te
+m3ti
+m3tr
+m5t^^e5
+m1ud
+1mul
+mu1li
+3my
+1m^^e6
+3m^^f8
+3m^^e5
+3na
+4nak
+1nal
+n1b
+n1c
+4nd
+n3dr
+nd5si
+nd5sk
+nd5sp
+1ne
+ne5a
+ne4da
+nemen4
+nement5e
+neo4
+n3erk
+n5erl
+ne5sl
+ne5st
+n1f
+n4go
+4n1h
+1ni
+4nim
+ni5o
+ni3st
+n1ke
+n1ko
+n3kr
+n3ku
+n5kv
+n3k^^e6
+4n1l
+n1m
+n1n
+1no
+n3ord
+n5p
+n3r
+4ns
+n3si
+n1sku
+ns3po
+n1sta
+n5sti
+n1ta
+nta4le
+n1te
+n1ti
+ntiali4
+n3to
+n1tr
+nt4s5t
+nt4su
+n3tu
+n3ty
+n5t^^e6
+4n1v
+3ny
+n3z
+3n^^e6
+4n5^^e6b
+5n^^f8
+o3a
+o4as
+ob3li
+o1c
+o4din
+od5ri
+od5s
+od5un
+o1e
+of5r
+o4gek
+o4gel
+o4g5o
+og5re
+og5sk
+o5h
+o5in
+oi6s5e
+o1j
+o3ka
+o1ke
+o3ku
+o3la
+o3le
+o1li
+o1lo
+o3lu
+o5ly
+o5l^^e6
+1omr
+on3k
+ook5
+o3or
+o5ov
+o3pi
+op3l
+op3r
+op3s
+3opta
+4or.
+or1an
+3ordn
+ord5s
+o3re.
+o3reg
+o3rek
+o3rer
+o3re3s
+o3ret
+o3ri
+3orient
+or5im
+o4r5in
+or3k
+or5o
+or3sl
+or3st
+or3^^f8
+o3si
+o3so
+o3t
+o1te
+o5un
+ov4s
+o5^^e5
+3pa
+pa5gh
+p5anl
+p3d
+4pec
+3pen
+1per
+pe1ra
+pe5s
+pe3u
+p3f
+4p5h
+1pla
+p4lan
+4ple.
+4pler
+4ples
+p3m
+p3n
+5pok
+4po3re
+3pot
+4p5p4
+p4ro
+1proc
+5pr^^e6
+p3sk
+p5so
+ps4p
+p3st
+p1t
+1pu
+pu5b
+p5ule
+p5v
+5py3
+5p^^e6d
+p^^e53
+qu4
+4raf
+ra5is
+4rarb
+r1b
+r4d5ar
+r3dr
+rd4s3
+4reks
+1rel
+re5la
+r5enss
+5rese
+re5spo
+4ress
+re3st
+re5s4u
+5rett
+r1f
+r1gu
+r1h
+ri1e
+ri5la
+4rimo
+r4ing
+ringse4
+ringso4r
+4rinp
+4rint
+r3ka
+r1ke
+r1ki
+rk3so
+r3ku
+r5k^^e6
+r1l
+rmo4
+r5mu
+r1n
+ro1b
+ro3p
+r3or
+r3p
+r1r
+rre5s
+rro4n5
+r1sa
+r1si
+r5skr
+r4sk5v
+rs4n
+r3sp
+r5stu
+r5su
+r3sv
+r5tal
+r1te
+r4teli
+r1ti
+r3to
+r4t5or
+rt5rat
+rt3re
+r5tri
+r5tro
+rt3s
+r5ty
+r5t^^e6
+r5t^^f8
+r3ud
+run4da
+5rut
+r3va
+r1ve
+r3vi
+r3v^^e6
+ry4s
+r5^^e6l
+4r^^f8n
+5r^^f8r
+3r^^e5d
+r5^^e5r
+s3af
+1sam
+sa4ma
+s3ap
+s1ar
+1sat
+4s1b
+s1d
+sdy4
+1se
+s4ed
+5s4er
+se4se
+s1f
+4s1g4
+4s3h
+si4bl
+1sig
+s5int
+5sis
+5sit
+5siu
+s5ju
+4sk.
+1skab
+1ske
+s3kl
+sk5s4
+5sky
+s4k^^e5
+s1le
+s1li
+slo3
+5slu
+s5ly
+3sl^^e5
+s1m
+s4my
+4snin
+s4nit
+s4n^^e6
+so5k
+5sol
+5som.
+3somm
+s5oms
+5somt
+3son
+4s1op
+sp4
+3spec
+4sper
+3s4pi
+s1pl
+3sprog.
+s5r4
+s1s4
+4st.
+5s4tam
+1stan
+st5as
+3stat
+1stav
+1ste.
+1sted
+3stel
+5stemo
+1sten
+5step
+3ster.
+3stes
+5stet
+5stj
+3sto
+st5om
+1str
+5st^^f8
+1st^^e5
+s1ud
+3sul
+s3un
+3sur
+s3ve
+3s4y
+1sy1s
+1s^^e6
+4s5^^e6n
+1s^^f8
+s5^^f8k
+s^^e54r5
+5ta.
+1tag
+tands3
+4tanv
+4tb
+tede4l
+teds5
+3teg
+5tekn
+teo1
+5term
+te5ro
+4t1f
+6t3g
+t1h
+tialis5t
+3tid
+ti4en
+ti3st
+ti4^^f8
+4t3k
+4t1l
+tli4s5
+t1m
+t1n
+to5ra
+to1re
+to1ri
+tor4m
+4t3p
+t4ra
+4tres
+tro5v
+1try
+3tr^^e6k.
+4ts
+t3si
+ts4pa
+ts5pr
+t3st
+ts5ul
+t4s^^f8
+t5s^^e5
+4t1t
+t5uds
+5tur
+t5ve
+t3v^^e6
+1typ
+u1a
+5udl
+ud5r
+ud3s
+3udv
+u1e
+ue4t5
+uge4ri
+ugs3
+u5gu
+u3i
+u5kl
+uk4ta
+uk4tr
+u1la
+u1le
+u5ly
+u3l^^e6
+u5pe
+up5l
+u5q
+u3ra
+u3re
+u4r3eg
+u1rer
+u3ro
+us5a
+u3si
+u5ska
+u5so
+us5v
+u1te
+u1ti
+u1to
+ut5r
+ut5s4
+5u5v
+va5d
+3varm
+1ved
+ve4l5e
+ve4reg
+ve3s
+5vet
+v5h
+vi4l3in
+1vis
+v5j
+v5k
+vl4
+v3le
+v5li
+vls1
+1vo
+4v5om
+v5p
+v5re
+v3st
+v5su
+v5t
+3vu
+3v^^e6rd
+1v^^e6rk
+5v^^e5
+y3a
+y5dr
+y3e
+y3ke
+y5ki
+yk3li
+y3ko
+yk4s5
+y3kv
+y5li
+y5lo
+y5mu
+yns5
+y5o
+y1pe
+y3pi
+y3re
+yr3ek
+y3ri
+y3si
+y3ti
+y5t3r
+y5ve
+y5v^^e6
+zi5o
+^^e6b3l
+^^e63c
+^^e63e
+^^e6g5a
+^^e64gek
+^^e64g5r
+^^e6gs5
+^^e65i
+^^e65kv
+^^e6lle4
+^^e6n1dr
+^^e65o
+^^e61re
+^^e6r4g5r
+^^e63ri
+^^e6r4ma
+^^e6r4mo
+^^e6r5s
+^^e65si
+^^e63so
+^^e63ste
+^^e63ve
+^^f8de5
+^^f83e
+^^f81je
+^^f83ke
+^^f83le
+^^f8ms5
+^^f8n3st
+^^f8n4t3
+^^f81re
+^^f83ri
+^^f8rne3
+^^f8r5o
+^^f81ve
+^^e51d
+^^e51e
+^^e55h
+^^e53l
+^^e53re
+^^e5rs5t
+^^e55sk
+^^e53t
+}
+\endinput
diff --git a/tex/context/base/lang-de.pat b/tex/context/base/lang-de.pat new file mode 100644 index 000000000..e0373ee4e --- /dev/null +++ b/tex/context/base/lang-de.pat @@ -0,0 +1,2581 @@ +% These are optimized german hyphenation patterns for use with TeX
+% generated at
+% Rechenzentrum Ruhr-Universitaet Bochum
+% Universitaetsstrasse 150
+% D-4630 Bochum 1
+% as of 1986-11-01.
+% Copyright Rechenzentrum der Ruhr-Universitaet Bochum 1986
+% General permission for non-profit use is granted.
+% For commercial use, contact the above address.
+\patterns{%
+.ab5b
+.ab5l
+.ab1r
+.ana5c
+.an3s6
+.at6h
+.au2f1
+.au2s3
+.be3erb
+.da6r1
+.einge3
+.en2t1
+.er5bl
+.er6da
+.er4d3r
+.er1e
+.er1i
+.erwi3s
+.es5c
+.est5ri
+.fal4sc
+.fe2s
+.fest3
+.for4t
+.gan4
+.ge5na
+.he2l
+.he2r
+.her3a
+.herr3s
+.in1
+.ingeni5
+.lab6b5r
+.liie4
+.li3t
+.mi2t1
+.nul4
+.or6a
+.pa4s3te
+.pf4
+.rap4s
+.rau4m
+.ro6str
+.sch6
+.see1
+.spor4
+.ta5la
+.tal4g
+.ta6to
+.tisch3
+.tor4f3
+.tu1s
+.um5
+.un5sc
+.ur1
+.vol4l3
+.wah4l3
+.wohl3e
+.wun4s
+.zi2e
+aa2gr
+aa3ru
+aat4s3
+a5au
+1abd
+ab5eb
+ab5eis
+a4bend.
+ab5erk
+1abf
+3abg
+1abko
+a1bl
+5a6bon
+ab1re
+ab1ru
+1abs
+abs2p
+ab3sz
+3abtei
+ab5ur
+1abw
+1abz
+4ach.
+ach1a
+a1che
+a6chent
+a1chi
+ach1l
+ach3m
+a1cho
+a1chu
+ach1w
+a1d
+a4d3ac
+ade4n
+2adi
+adi3en
+1adj
+1adl
+ad5ri
+ad6t5
+5adv
+a3e1
+ae4d
+af1an
+a5far
+a6fent
+af3ers
+3afri
+a4g3ei
+age4n
+age2s
+ag1l
+a1g2n
+ag1re
+a6gri
+ag5rie
+a1ha
+a1he
+a6h5erh
+a1hi
+ahl1a
+ah1le
+ah6ner
+ah5o
+ah1re
+ah5ri
+ah1ru
+ai1e
+a5ind
+ai1sc
+a3isch.
+a5iv.
+a1j
+2a1ke
+a5ki
+5akk
+ak5n
+3aktu
+a6kus
+a3lag
+a3lak
+ala6n
+a5lang
+al3ans
+al1au
+al6bl
+al1c
+al6der
+ald5r
+2a1le
+a4l3e4b
+al5ein
+a6l5eng
+a6l5ins
+al4lar
+a1lo
+alo6p
+1alph
+al2tr
+al5tra
+a1lu6
+al5um
+al5ute
+3a2mei
+am2sc
+am2ta
+a1mu
+3analy
+a2n1au
+and5arm
+ande4s
+an2d3r
+1anfa
+3anfer
+3angab
+an6go
+6ani
+ani6o
+an5ion.
+an2k1r
+1anl
+5anm
+anma3c
+an1om
+3a2n1or
+an5sd
+1anst
+1antr
+1anw
+3anzug
+an6z5w
+a1o
+a1pa
+3apfel
+a1pi
+3appa
+a1pr
+a1ra
+a2r1al
+a2r1au
+3arbei
+6arben
+1ar1c
+ar6da
+ar6dr
+a1re2
+a6rei
+ar6fr
+2a1ri
+ar2na
+a1ro
+a6r5o6d
+a6r5or
+ar6p5f
+6arrt
+ar6schm
+ar6tau
+3artig.
+a5r6tio
+ar6t5ram
+1arzt
+1a2sia
+asi2s
+aso3
+as5pa
+a6stes
+a6st5re
+a1ta
+at5eig
+a1th
+athe5
+at5her
+1athl
+2a1ti
+1atm
+a1to
+at5ort
+a1t6r
+at6s5e
+atz1a
+au3a
+aude6r5
+au6dr
+au2fa
+au6f5enl
+1aufg
+5auf1l
+1aufn
+auf1t
+au6ga
+3auge.
+aum5p
+aun2e
+1ausb
+1ausf
+1ausg
+au4s3tr
+3ausz
+1auto
+auwei6
+a1v
+a1w
+a1x
+a4xio
+a1z
+1ba
+2b1ab
+b1ac
+6b5af
+ba6k
+bak5i
+bak5r
+ba1la
+2b1am
+ba1na
+b3arb
+ba1ru
+2b1b
+b2bli
+bbu6
+6b1c
+4b1d
+5bdg
+1be
+be1a
+be1ch
+be3en
+be3erd
+be1g
+bei5b
+4b3eigen
+be5inh
+bei3s
+be1na
+ben3d4w
+be1ra
+be5r6e
+be1ur
+4b1f6
+2b1g
+2b1h
+1bi
+bi5on
+bi6stu
+4b1j
+2b1k
+2b1lag
+b5lam
+b5lein
+4blich
+6blich.
+b4lie
+b4lind
+1b2lio
+b4lit
+4b1m
+bma3c
+2b1n
+1bo
+bo1ra
+bo1re
+6b1p
+6braa
+6brecht
+3bri
+5brie
+bro1
+bro4n
+2b1s
+b5sc
+b6sn
+b6sof
+bs6t1h
+bs5tol
+bs2zi
+2b1t
+b2t1h
+1bu
+5buch.
+6b1v
+2b1w
+1by
+6b5z
+5ca
+1ce
+2ch.
+ch1ah
+3chari
+2chei
+ch3eil
+ch5eis
+chi5er.
+6chj
+ch3ler
+4ch2m
+chn2
+5chn.
+ch2na
+ch5orc
+chr6
+ch5rt
+2cht
+6chuh
+chut2
+5ci
+6c2k
+ck1a
+ck1ei
+ck5l
+ck3n
+ck5sp
+1co
+co6u
+c3t
+cti6
+1cu
+6d5abr
+6dabt
+1dac
+d5achs
+da5la
+da6lu
+3damp
+da5na
+2danl
+danla4
+6danzu
+6d1ap
+da2r5a6
+6d1arb
+1dat
+4d1aus
+2d1b
+2d1d
+1de
+de1a
+de6be
+de1ch
+2d1ein
+de6lau
+de6lo
+den5a
+den3g
+der3ab
+der3an
+de5re.
+6d5erhi
+6derneu
+de3r4o
+de2s1a
+de4sin
+6d5eul
+2d1f
+2d1g
+2d1h
+1di
+di1na
+6dinf
+6d5inn
+di5ot
+di1sc
+di3s4pe
+di4str
+di6ta
+2d1j
+2d1k
+2d1l
+2d1m
+2d1n6
+1do
+d2on
+6dord
+2d1p
+6dq
+dr2
+4drad
+1drah
+d1rec
+d1ren
+6d5rh
+1dro
+d6roh
+6d5rot
+1dru
+2ds
+d6san
+dsanga6
+d1sc
+d1sp
+2dt
+d5ti
+d5to
+d1tr
+1du
+2d1uh
+6d5umk
+durch3
+6d5urt
+2d1v
+2d1w
+dwa6r
+dy1
+2d1z
+e1ac
+ea4gent
+e1ah
+e1ak
+e1al.
+e5alg
+e3als
+e1am
+e1an
+e4ano
+e1ar.
+e5arb
+e3arf
+e3arm
+eatu6
+e1b
+eb6ac
+e4b3ar
+eb6rie
+eb2se
+eb2sk
+e1che
+e1chi
+e1cho
+ech6s5en
+e1chu
+ecke4
+e1d
+ede4re
+ee5a
+ee5e
+e1ei
+eei6g
+e5em.
+ee5ro
+ee6tat
+eeu6
+e1e2x1
+e1f
+efek4
+efe3ra
+ef2fl
+ef3ta
+e6fum
+ege6sp
+eg1lo
+eg3lu
+eg3s4t
+e1ha
+eh1ap
+e1he
+ehe3ra
+e1hi
+eh1le
+ehl6er
+2ehm
+eh1mu
+e1ho
+ehr1a
+eh1re
+eh1ri
+ehr4s
+eh1ru
+eh5s
+e1hu
+eh1w
+e1hy
+ei1a
+ei6ba
+ei4chi
+ei1e
+1eign
+6eil.
+ei5le
+1eina
+ein1g
+3einhal
+ein5k
+3einlag
+3einn
+ei2n1o
+3eintei
+ei5p
+eipf6
+e1irr
+ei4str
+ei2t3a
+eit1h
+ei6t5um
+e1j
+e1ke
+e1ki
+e1k2l
+e1kn
+ekte4
+e1la
+el3al
+e4l1ar
+el5aus
+e1le
+el1ec
+el5ein
+el3eisen
+1elek
+3elem
+4elem.
+ele6n
+elf4
+5elf.
+elg2
+e1lo
+el6s5o
+3eltern
+elt3h
+e1lu
+el1um
+6emi
+1emp1f
+e1mu
+en3achs
+en1am
+e2n1ar
+en3a6s
+en5auf
+en6d5ess
+e4nein
+en5eis
+e6nel
+e6n5end
+3energi
+en3ers
+en4men
+en4san
+ensen6
+en5spa
+6enst
+3entf
+3entla
+3entsp
+1entw
+enwi2
+e1o2b
+e2om
+e5or.
+eo5re
+eor4h
+e5ort
+2ep
+e1pa
+e1pf2
+ep6p3a
+e1pr
+ep5to
+e1q
+er1ac
+er5alb
+er5amt
+e3rand
+er3ans
+er5a6si
+e1rat
+e3raum
+er3aus
+er4bli
+3erbs
+er1c
+5erdb
+2e1re
+er3eck
+ere2h
+3ereig
+e4r3ein
+ere2k
+e5rem
+er3ero
+er3ers
+ere2s
+er3ess
+2e1ri
+e3rif
+er3ins
+e3rit
+5erneu
+e1ro.
+er3ob
+e6rof
+e3rog
+e1rol
+er1or
+ero5s
+3ersatz
+er5sc
+ersch4
+er2th
+e5rtn
+2e1ru
+er5uhr
+er1um
+e1s
+esa6
+6esc
+esch4l
+6esi
+esi3g2
+es3int
+e2sk
+es2ko
+es5op
+es2pu
+e6stin
+es6tr
+est5ro
+e1ta
+e1ti
+1etn
+e1to
+e1tr
+et2t3a
+et4tr
+etu1s
+e6ty
+6etz
+eu6ga
+euge6n
+euk2
+e3um.
+eun2e
+e5unt
+e5us.
+eu6zw
+e1v
+e1w
+ewa1s
+ewi2s
+ex3a4m
+5exp
+e1z
+fa1b
+5fah
+fai5
+fan5d
+fa1sc
+2f1b2
+4f3c
+4f1d
+1fe
+6f5eb
+fe6be
+6f5eins
+fe2l5a
+fe6lo
+fe2mi
+6femp
+fen5ei
+2f1f
+ffe5i
+ff5ing
+f6flo
+ff2sp
+2f3g2
+fge1
+fgewen4
+2f1h
+1fi
+fi1na
+2f1k
+f5leb
+6f5lein
+2f1m
+2f1n
+1fo
+foh1
+f4on
+2f1op
+fo1re
+fort5r
+fo5ru
+2f1p
+f1q
+fr4
+f6re.
+f5reic
+f5reis
+f1ric
+f5rig
+1fris
+2f1s
+f2sk
+f2sn
+fspu6
+2ft
+ft5ak
+f6tent
+ft1h
+f1ti
+f1tr
+ft4su
+ftwa6r
+1fu
+6f1v
+2f1w
+f1z
+1ga
+6gabz
+ga6d
+ga1la
+gang3a
+6ganl
+2g1arm
+g3arti
+2g1b
+4gd
+g5da
+3ge
+ge1a
+ge1e
+6g5eff
+gef2l
+ge1g2l
+ge4ig
+ge1na
+genlini6
+ge1o
+ge1ra
+ge1ro
+ges2p
+ge1ur
+2g1f
+2g1g
+gge6bu
+gg1le
+2g1h
+1gi
+2g1k
+g5leb
+3gleic
+g3lein
+3glem
+g1ler
+6g5leu
+g2lie
+6g1los
+g6ly
+2g1m
+g1n
+6gn.
+g6nin
+1go
+6gob
+2gog
+g2on
+go1r
+got6
+gott5
+2g1p
+1gr6
+g3reic
+gri2e
+6groh
+2gs
+gsa4g
+g6s1ak
+g4s1an
+gsan6zu
+g5sat
+gs1au4
+g1s6c
+g2s1e
+g5seil
+g5set
+g2s1i
+g2s1o
+g2s1p
+g5s6pi
+gs3tak
+g2s3tr
+g2s1u
+2g1t
+g2t1h
+1gu
+gu5a
+gu2e
+gu2i
+6g5und
+gung6
+gu2t1
+2g1v
+2g1w
+5g6wes
+2g1z
+ha5be
+ha6bei
+haf6e
+haft4s
+ha5la
+hal4b3r
+2hap
+h6ari
+h5arm.
+h3arme
+har6th
+haufga6
+h1b
+h1c
+h1d
+6hea
+he2bl
+h3echt
+he6fa
+h5e6he.
+6helt
+1hemm
+h1emp
+he6ni
+hen4ru
+hen4sta
+hen6wa
+6heo1
+her5bl
+he5rin
+her4zw
+heu3s
+he3xa
+h1f6
+h1g
+h1h
+hil4fr
+h3ins
+h1k
+hkon6z
+hlaf3r
+hl5anz
+h1le.
+h6l5ein
+hl3erh
+h1les
+h2lif
+h2lit
+6hm
+h2ma
+h3man
+h2mi
+h2mo
+h5nam
+h2nei
+hn3ein
+h2nel
+h6n5id
+h2nip
+h2nit
+h2nor
+h2nul
+ho5be
+hoch1
+hoh1l
+h2on
+ho1re
+ho3sl
+ho4s3p
+h1p
+h1q
+h3rech
+h5ref
+hren6s
+h1ric
+h3ros
+hr5st
+hr6ste
+hr2th
+h1s
+h6s5ac
+hs5amt
+h2san
+h6sau
+h6sein
+h2sk
+h6spu
+hs5tau
+hs5tie
+h4s3tu
+2ht
+ht5ac
+ht3ar
+hte6b
+h2t1ec
+ht1e2h
+h4temp
+h6t5ers
+ht1h
+h1ti
+h6tin
+h3tra
+ht5re
+h5tro
+ht6so
+ht6spa
+hub3l
+hu6f5
+huh3
+hu6ha
+h5uhr
+hu2la
+2husi
+h1v
+hwi2d1
+h1z
+i1al.
+i5ala
+i1alb
+i1ald
+i5alet
+i1alf
+i1alk
+i3all
+i3alp
+i1als
+i3alv
+i5alz
+i1an
+i1a6r
+i1asm
+i5ast.
+i1at.
+i6b5eis
+ibe6s
+i1br
+ib5ren
+i6b5unt
+ich1a
+i1che
+i1chi
+ich3l
+ich3m
+ich4sa
+icht3an
+i1chu
+ich1w
+i1d
+i2dea
+i6d5ei
+ide5ri
+id5ru
+idu5a
+ie2bl
+ie6b5re
+ieder3e
+ie3e
+ie6felt
+ief3f6
+ie2f5l
+ie6fr
+iege4r3e
+ie6lei
+ie4lek
+i1ell
+ielo6b
+ie2lu
+i1en.
+i5ens.
+i5env
+i1enz
+ie3o
+ier3a2
+ie6r5in
+ie6s5c
+ie6ta
+ie6t5ert
+iet5h
+2if
+i1fa
+if5an
+if1l
+if1r
+i5f6ro
+i1g
+ig3art
+i6g5ei
+i2gl
+ig3le
+i2gn
+ig6r
+i5ha
+i1he
+i5hi
+ih1n
+i1hu
+i6h5um
+ih1w
+6i1i2
+i1j
+i1k
+i1la
+i6lans
+ild5ent
+i1le
+ile6h
+il5ehe
+i6lel
+il2fl
+ilf4s
+illu5s
+il2m5a6
+i1lo
+i1lu
+il6z5i
+i6mel
+i6m5id
+im4man
+i1mu
+in3arb
+in1au
+6ind.
+i6n5eh
+i2n1ei
+i6n5erl
+i6n5erw
+3infek
+inge6bir
+3inhab
+5inj
+in6pu
+ins5ert
+in5spe
+3instr
+io1c
+i1o2d
+i5ol.
+i3om.
+ion6
+i1ons1
+i1or
+i5os.
+i5ox
+i1pa
+i1pi
+i1pr
+i1ra
+i1re
+i1ri
+ir2k5l
+i5rol
+is5amt
+i6scheh
+ischen4
+isch3la
+isch3r
+i5stra
+ist3re
+i1ta
+i5t6ak
+it5ein
+it1hi
+i1ti
+i4tia
+i6t5in
+i1to
+it5raf
+it3rau
+it1re
+i1tri
+it4t3r
+itu3al
+i1u
+i1v
+i1w
+i1z
+i6za
+1ja
+je2t1
+jo3r4a
+1ju
+ju5t
+1ka
+kaf5
+ka1la
+ka1na
+2kanl
+6kapf
+k5arm
+ka3ru
+kauf4s
+4k3aus
+kau5t6
+2k1b
+6k1d
+kehrs3
+6k5eic
+2k1eig
+ke6lo
+ken6sta
+ke1ra
+6kerd
+4k1f
+4k1g
+kgela6
+2k1h
+ki1c
+kie6l5
+k5im
+ki5o
+ki6r
+kit2s
+4kiz
+2k1k
+kl6
+1kla
+k3leit
+2k1ler
+2klic
+k2lin
+kli1s
+kloi6
+4klung.
+2k1m
+k2n2
+kni4e
+1k2o
+ko1i
+kol3l
+ko3o4
+6kop.
+kop6f1
+ko1r6a
+kor6der
+6k5ox
+2k1p6
+1kr
+6krad
+2k1rec
+2ks
+k1sc
+k6so
+2k1t
+k6tau
+k2t1h
+1ku
+ku1c
+2k1uh5
+kuie5re
+kun6s
+kunst3
+6kunt
+ku3ta
+6k1v
+6k1w
+2k1z
+lach5r
+5lack.
+1lad
+lade3
+6ladv
+laf5l
+laf3t
+la2g1a
+4lal
+l3amt
+la1na
+1land
+lap6pl
+l1arb
+la5ru
+la1sc
+la6s5p
+la6sta
+6latm
+6laug
+6lav
+l1b
+l6b5e6b
+lb2s
+lbst1
+6lc
+l1che
+l1chi
+6ld
+ld5a6n
+l6d5eb
+ld1re
+ld5rom
+le4b3ri
+2lec
+5led
+3lef
+4l3eff
+1leh
+6lehe
+lei6br
+lei4fa
+4leisen
+2lem6e
+6lemp
+4lentw
+5lepa
+le4rer
+l3erg
+5leri
+2l1err
+4l1erz
+le3sk
+6l5eth
+l1f
+lfo6
+lf5ra
+l1g
+l6g5au
+6l1h
+1li
+2lick
+li1en
+3lig
+li5gn
+2lim
+li1na
+li5ne
+4l3inh
+6linj
+6linz
+6lish
+2lix
+l1j
+l1k
+lk5erd
+lk2l
+lk2s3
+l1la
+l5lad
+l1le
+ll5eis
+l3li
+l1lo
+l2l1or
+ll5ov
+ll4spr
+ll5th
+l1lu
+6l1m
+l4m3o4d
+l5na
+l5o4bl
+6lock
+l5ohr
+l2on
+2l1ord
+lo1re
+lo5ro
+1los.
+3lose
+lo6s5tr
+6lou
+lo6ve
+l1p
+lp2f2
+l2pt
+l1q
+l1r
+l1s
+l2s1er
+l2sk
+ls2p
+2l1t
+lt5amp
+ltanla6
+lt3ans
+l5te
+l6t3ein
+l2th
+lt5ho
+lt1re
+lt5um
+5luf
+luft3a
+1lun
+lung4
+3lung.
+6l5uni
+4l3unte
+2l1urg
+lu4st3r
+lu5the
+l1v
+lve5ru
+l1w
+1ly
+lz3ar
+1ma
+ma2dr
+ma4gna
+2m1ago
+ma5la
+mal3d
+ma6lei
+ma6lut
+2m1ana
+mani5e
+4mappa
+2m1arb
+3m6as
+ma1sc
+mau1s
+2m1b
+mb6r
+6m1d
+1me
+me1ch
+3meld
+me5nad
+men6e
+me6ni
+6m5enth
+4mentsp
+m2er
+me1ra
+me1ro
+mer5t
+3mes
+me1th
+2m1f4
+mfan2
+2m1g
+2m1h
+1mi
+mi3ak
+6mibe
+3mig
+mi5gl
+mi1na
+mise1
+5mitt
+2m1k
+2m1l6
+6m1m
+m6mab
+m6m5ak
+m2m1ei
+mme4r5a
+2m1n
+1m2o
+mo6dr
+mo2o
+mo1ra
+mo6st5
+m1pa
+m1pi
+m5pr
+m1q
+6m1r
+2m1s
+m6san
+m5sche
+msch4l
+ms6k
+2m1t
+m5tam
+mt1ar
+m2t1h
+1mun
+mu1sc
+5musi
+mu1ta
+2m1v
+2m1w
+my5a
+2m1z
+1na.
+6n1ab
+na2c
+nach5e
+nacht4s3t
+na6der
+1nadi
+1n2ag
+na5gl
+1nah
+1nai
+1nal.
+5nale
+n3alt
+6n5amt
+4n1an.
+n1and
+2n1ang
+6n5anr
+n3anzu
+n4ar.
+2narc
+n1arm
+5n6ars
+4n3art
+1nat
+5nat.
+3nate
+2natm
+4nauf
+n5auss
+n3aust
+1nav
+n1b2
+n1c
+nch3m
+n1d
+nda5ru
+nde4lan
+nde4s3e
+n2dot
+nd1ta
+1ne
+ne2bl
+6n5ebn
+2nec
+n3eck.
+2nee
+3neei
+ne2h
+4neif
+6neis
+n2en.
+n2ens
+nen4tr
+ne6p
+n2er.
+ne1ra
+2n1erb
+4n3erd
+nerfor4
+4nerg
+n3ergi
+n2erh
+n1erk
+n1err
+n2ert
+6n5ertr
+4n3erz
+6n5ess
+6n5e6tu
+n1f
+n5fa
+nf2l
+6ng
+n4g3ac
+ng1lo
+ng6na
+ng2sa
+n1h
+5n6he.
+n5hie
+nho6s
+1ni
+ni5ak
+ni1al
+ni1b
+ni4d
+nie4d3r
+ni1el
+ni1en
+4n3i4gel
+4n1imp
+2n1ind
+n6ing
+n3ins
+ni3ol
+nir2s
+n1j
+n6ji
+n1ke
+n1ki
+n1kle
+n6klo
+n1kn
+n3l
+n5lan
+n6lande
+nli2m
+n1m
+nmen2
+nmo1
+n1na
+n6nau
+nni1s
+nn5sp
+nn4tak
+n5nu
+1no
+no5be
+no1c
+n5o6d
+no6ke
+6n5o6le
+no2ma
+n4on
+no3ny
+nor2a
+n3ort
+no6t5a
+n1p2
+npa2t
+n1q
+n1r
+nsa2b
+n2s1ak
+n6s5alt
+ns3ang
+n1sc
+n5sche
+n4schli
+ns6de
+n6self
+n6s5ent
+nsi3g4
+nsi4ons
+ns3par
+ns5tat.
+n6stor
+6nt
+n1ta
+n5te.
+nt1eh
+n3t4en
+nte3na
+nten4ar
+nter3a
+n6t5ess
+nt5hie
+nt1ho
+n1ti
+nti2d
+n1to
+n6t5o6d
+n1tr
+nt5rin
+n5trop
+nt1s
+nt5sa
+ntu1a
+nt1z
+1nu
+2nuc
+2nud
+4n3uh
+n3ums
+n5umw
+nung4
+2n1unt
+2nup
+2nur
+nu6si
+n6ut
+nu5ta
+n1v
+n5w
+nwid3r
+nwi5sc
+nwoh3l
+n1z
+n6zar
+nzi4ga
+o1a
+oa2l
+oa6m
+oa6x
+ob6ab
+o4ber
+1obj
+o1bl
+ob5la
+ob5li
+ob1r
+1obs6
+ob6sta
+o1che
+o3chu
+o1d
+od5ele
+od5ru
+o5e6b
+o1ef
+o1e2l
+o5er
+o5e6x
+o1fa1
+1o4fen
+of6fin
+3offiz
+of2fl
+of6f5r
+o5fl
+4o1g
+o5g6h
+og2n
+o5ha
+o1he
+o1hi
+ohl1a
+oh3len
+o1ho
+oh1re
+oh5ru
+o1hu
+oh3w
+o5hy
+o1id.
+o5ism
+o1j
+o1k
+o6kula
+6okult
+o1la
+o1le
+ole1r
+ol6fr
+ol4gl
+olk5r
+ol2la
+ol6lei
+o1lo
+o1lu
+o2m1ab
+om6an
+o6m5au
+o6mene
+o6m5erz
+o1mu
+1on.
+o1na
+on5a6m
+o4n3arb
+on5g6
+o6n5ok
+6onsmel
+6onsn
+6onspr
+o1of
+o5on
+o1or
+o1pa
+o6pau
+oper6
+opf5l
+o1pi
+op2p3l
+o1pr
+1opt
+or1a
+or2al
+o3r4ant
+or4as
+o3r2at
+1ordn
+o6r1ei
+o3ren.
+1orga
+or2gl
+o1ri
+or1or
+or6t5au
+o1s2k
+os2lo
+o4sta
+oste6r5
+o1ta
+ot6e
+otem5
+otemp6
+o5t6h
+o1ti
+o1to
+ot1r
+ot6ro
+ot2tr
+ou5i
+o1un
+3ou5t
+o1v
+o1w
+o1x
+o1z6
+4pab
+pa5g6
+p6ak
+pa3la
+pa6no
+1pap
+pa4r3af
+6parg
+3partei
+pau1
+p1b
+p3c
+1pe
+pe5ep
+2pek
+pen5k
+pe1ra
+pere4
+pe4re.
+2perr
+pfa6
+pf5ade
+pf3as
+p4ferd
+pf5t
+1ph
+2ph.
+p5han
+6phb
+4p3hei
+6pht
+6phz
+pie6la
+pi1en
+5pil
+pi1s
+pis4k
+p1k
+1pl6
+4p3ler
+p2li
+2plig
+2p3lu
+p1m
+p1n
+1p4o
+po1ch
+3pol
+po1ra
+po1re
+p1pa
+ppe4n1
+pp3f
+p6p5ha
+p1pi
+p1pr
+pp1s
+5prei
+5pres
+3prod
+5prog
+ps5er
+p1t
+pt1ac
+pteu6
+p2to
+pt5ro
+1pu
+pu1b2
+puf6fr
+6p5uh
+2pur
+pu6rei
+pu1ta
+p5v
+6p5w
+5py5
+p1z
+1qu2
+6rabd
+r1abt
+1rad
+ra4dan
+6radd
+ra4dr
+raf1a
+ra4fer
+1rahm
+r5ahn
+ra4l5o
+r4anb
+r2and
+r6ane
+r5angr
+r3anzu
+3rape
+1rapi
+2r1ar
+3rar.
+rar2s
+r6at.
+ra6ta
+ra6the
+6r1auf
+6r3aug
+r1b
+r1che
+rch1l
+6r1d
+rd5erge
+1re.
+re3alt
+re6b5l
+5recht
+2reck
+re1e
+3regi
+4reig
+6r5eime
+rei6sa
+reli3ef
+6remp
+re1pi
+6repp
+1rer
+5r6er.
+6rerb
+6r5erd
+6r5erf
+r3erla
+r4ersei
+6r5erzi
+5res.
+2ress
+r1e2w
+6r5e6x
+r1f
+rf4lie
+r1g
+rge4bl
+r4gn
+r1h
+rhe6ber.
+ri5alg
+ri1el
+ri1en
+ri3er.
+ri6fa
+riie6
+6r5inb
+2r3ind
+r4inde
+1rinn
+4rins
+2r1ir
+ri1sc
+ri5sko
+r2it
+ri6tal
+rizi5
+r1j
+r1k
+rkau6e
+rk6lo
+r1l
+r1m
+rmen4s
+r1na
+rn5ade
+rna6r
+rn5ari
+rn3eif
+r6nene
+rn6er
+rn3g
+rn1k
+r6n5or
+ro5ba
+ro1ch
+1rohr
+ro5i6
+r2on
+ro1re
+ro1sp
+rovisi6
+r1p2
+r6p5an
+rpf2
+rpro6g5n
+r4p5t
+r5pu
+rpum6
+r1q
+4rr
+r5r6a
+r5re
+rres2
+r1ri
+r1ro
+r3ru
+6r1s
+r6sanf
+r3sche
+rschri6
+rs2k
+r6sku
+rs2n
+rs2p
+rswi3
+rswid4
+r1t
+rt3ac
+r2t1ar
+r6t5erl
+r6t5erm
+rt1he
+r2t1hi
+rt4so
+rt6s5ti
+1ruf
+2rum
+6rundz
+r6ung.
+6r1unt
+6r1u4r3
+ru1ta
+r1v
+r1w
+ry2
+r1z
+rz5ac
+r6zad
+r6z1ar
+r2z1em
+1sa
+2s1ab
+sab5l
+s3a4der
+sa1fa
+sa3fl
+sa3fr
+sa5ik
+sa1la
+2s1alp
+5sam.
+5samk
+s3anb
+san2c
+s6ann
+2s1ap
+2s1ar
+3s4ar.
+2s1atl
+4s1aus
+2s1b
+2sch.
+2schb
+1sche
+4schec
+schen4b
+schen4h
+schen4z
+2schf
+4schh
+1schi
+2schk
+sch6ne
+3schof
+6schp
+3schri
+2schs
+2scht
+sch5ta
+5schu
+6schv
+2s1d
+1se
+se5ag
+6s5ec
+se4e
+see5i
+se6h5a
+6s1eig
+5s6eit
+4selem
+sen6e
+6sersa
+se5ru
+se6ruh
+ser6um
+s1erz
+2s1ex
+2s1f
+2s1g2
+2s1h
+1si
+si1b
+si1en
+4s3inte
+si5ru
+si1sc
+s1j
+s1k
+6sk.
+3skiz
+s5ku
+2s1l
+5slav
+s5li
+2s1m
+s1n
+1so
+s2on
+s1ord
+so1re
+4sorga
+sp2
+1spal
+spani5e
+6spap
+s2pei
+1spek
+s2pez
+s1pf2
+1spi
+6spil
+2s3pla
+1spr
+s5ps
+s6pul
+1spur
+s1q
+2s1r4
+2s5s2
+ssag6
+ssali6
+ssen6st
+1s2t
+2st.
+st2ab
+4staf
+2stag
+2stak
+st5anb
+4stanf
+st3ans
+4starbei
+4staus
+2stb
+2std
+ste6g5
+st4ei
+ste6ne
+ste5re
+6sterm
+6st3eur
+6s5tex
+2stf
+2stg
+2sth
+st3ho
+6stj
+2stk
+2stl
+2stm
+6stn
+2stp
+6stref
+6strun
+2st1s
+5s6tub
+5s6tun
+2stv
+2stw
+4stz
+1su
+su6b3
+such4s
+2s1v
+2s1w
+swi2d1
+1sy
+2s1z
+szula6
+ta4bla
+2tac
+3tafe
+3t4ag
+ta2g1a
+ta6ka
+6tamp
+t1amt
+tan6c
+t5anf
+tan6k5l
+4tanl
+6tanw
+4tarb
+t3arbe
+t1arm
+ta1sc
+ta6sto
+3taube.
+2t1b2
+tbi6b5
+2t1c
+2t1d
+1te
+te2a
+5techn
+2teh
+teh5l
+4teif
+3teil
+tei4l3a
+4teinh
+6t1eis
+te6lau
+te6lo
+ten1a
+ten5g
+te2ni
+ten3s6p
+te6nu
+te3ral
+te4ren
+te5ren.
+te6r5it
+3term
+t5e6se
+3test
+te6sto
+te6str
+te5th
+te3xa
+2t1f2
+2t1g2
+6th.
+2t1ha
+t1heb
+2t1hei
+3theo
+1thes
+thi1s
+2th1l
+th3m
+1thr
+3thus
+2t1id
+ti1en
+tik6
+t3ind
+ti6q
+ti5tr
+t1j
+2t1k
+2t5l6
+tle4digt
+tlo4b
+2t1m
+2t5n
+to5be
+to1ch
+tode2
+to6del
+to4d3er
+toh1
+toi6r
+t2on
+to1ra
+t1ord
+to1re
+5tou
+2t1p
+tpf2
+tr4a
+6trad
+3trag
+tra1s
+4trec
+t3rech
+5t6ree
+5t6ref
+6treg
+t5reih
+t5rep
+3t4ret
+3trib
+t6rie
+5trieb
+5t6rigk
+tri4o3
+t6rop
+t3rot.
+2trs
+5trun
+2ts
+t2s1an
+t2s1au
+t1sc
+t5sche
+ts3ort
+t1spa
+ts3th
+ts3un
+t2s1ur
+2t1t
+t5ta.
+tt5ab
+tt3eif
+t5t6ra
+tt1re
+t6tro
+tt5ru
+1tu
+6tuh
+tul4p
+5tum.
+tun6f
+6t1unt
+tu4ran
+tur2m3
+2t1v
+2t1w
+1ty
+2tz
+tz1an
+t6zent
+tz6th
+tz5wi
+u6ale
+u1ar.
+u1br
+ubs2k
+6uc
+uch3a
+u1che
+u1chi
+uch1l
+uch1r
+u1chu
+uch1w
+u1d
+udi3en
+u6d5on
+u1e
+ue2n
+uen1e
+uer1a
+u1fa
+u6f3ent
+uff2l
+uf1la
+uf1re
+u1g
+u6gabt
+ug5am
+ug2gl
+u2gl
+u2gn
+u1ha
+u1he
+u1hi
+u1ho
+uh1re
+u1ie2
+ui5em
+u1ig
+u3in.
+u1j
+u1ke
+u1kl
+ukle5i
+u1kn
+u1la
+u1le
+ul6lo
+u1lo
+ulo6i
+ul6sa
+u1lu
+um5ak
+1uml
+3umschl
+u1mu
+u1n1a
+un6al
+un4d3ar
+5undz
+un1e
+une2b
+une6d
+3unfal
+un1gl
+un5gn
+un2g3r
+ungs1
+ungs3ta
+un1in
+u4nion
+un1kl
+un1o
+1unr
+un1s2p
+3unterr
+u5n1u
+unvol4
+unvoll3
+u1or
+u5os.
+u1pa
+upe6
+uper3
+up6fi
+u1pi
+u1pr
+up2ta
+up6tr
+up4tur
+u1ra
+ura6d
+ur6an.
+u1re
+ur5eis
+u1ri
+1url
+ur6nan
+u1ro
+3ursa
+u1ru
+ur2za
+ur2z1w
+usch3w
+us5im
+us3tau
+ute5re
+ut5h
+ut6her
+u1ti
+u1to
+u1tr
+ut4schl
+ut6s5t
+u1u
+u1v
+u1w
+u1z
+va6t5a
+va6tei
+ve2r1
+vera6
+ver5b2
+vere2
+ve2sp
+vete3
+2v1g
+vi4el
+vi5et
+vi6la
+vi3ro
+vi1ru
+v2o
+vol4k
+vo6n
+vor5a
+vor1c
+vo4r1e
+2v1t
+wa4g3n
+1wald
+wan6dar
+war5u
+war2z5
+1was
+w6e
+wede5r
+we6fl
+we6ga
+we6g5eng
+we6g5es
+weg1l
+we2g3r
+weib4s
+1weis
+wei5sc
+wel4t
+welt3a
+welt3r
+we4ra
+werbe3
+werbes4
+wer6bl
+wer4fl
+wer6ga
+wer4ka
+wer4kl
+wer6ta
+we2sp
+we6str
+1wid
+wil6den
+wil6dr
+win4d3r
+wi1sc
+wi6schl
+wi6schn
+wo1c
+wo3ren
+wo6r5i
+wor5u
+wu1s
+wu2t1
+4w3w
+x1ak
+6x5amt
+x5and
+xan5t
+1xe
+x1emp
+x5erz
+6x1h
+1xi
+xi5c
+xich6
+x1k
+x6o
+x1p2
+6x1t
+x6ta
+xti6
+1xu
+6xy
+x1z
+y5al.
+y1c
+y1d
+y1e6
+y1g
+y5i
+y1k2
+yklo3
+y1l
+ym1
+yna5
+yn5e
+yn1t
+y5om
+y1p
+ype4
+yper3
+y6ps
+y2p3t
+y1r
+yr5r6
+y1s
+y6te
+y1t6h
+y1ti
+y1z
+6z5ab
+z3a4der
+1zah
+z5al
+6z5am
+zanla6
+z1arb
+zausga6
+2z1b
+6z5c
+6zd
+1ze
+zei6t5er
+ze5m6e
+zen3a
+zen6za
+ze5ra
+zerhau6
+2z1f
+2z1g
+2z1h
+1zi
+zi3alg
+zi5alr
+zi5cho
+zi1en
+z3imp
+6z5inf
+6zinh
+zinha6
+zin6ser
+zi1sc
+zi3th
+zi3tr
+2z1k
+2z1l
+2z1m
+4z1n
+5zo
+zo5f
+zo6gl
+zo5re
+zor4na
+2z1p
+2z1r
+2z1s6
+2z1t
+z4t3end
+zte5r
+zt5hi
+1zu
+zu1a
+zu1b2
+zuch4
+zucht3
+zu1f2
+zu5i
+zun2a
+zun2e
+6zunt
+zu3o
+zu1s
+zu1t
+2z1v
+3zwan
+2z1wer
+zwer6k5
+z3wo
+zy5
+2z5z6}
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-en.pat b/tex/context/base/lang-en.pat new file mode 100644 index 000000000..57341a7a2 --- /dev/null +++ b/tex/context/base/lang-en.pat @@ -0,0 +1,4468 @@ +% The Plain TeX hyphenation tables [NOT TO BE CHANGED IN ANY WAY!]
+\patterns{ % just type <return> if you're not using INITEX
+.ach4
+.ad4der
+.af1t
+.al3t
+.am5at
+.an5c
+.ang4
+.ani5m
+.ant4
+.an3te
+.anti5s
+.ar5s
+.ar4tie
+.ar4ty
+.as3c
+.as1p
+.as1s
+.aster5
+.atom5
+.au1d
+.av4i
+.awn4
+.ba4g
+.ba5na
+.bas4e
+.ber4
+.be5ra
+.be3sm
+.be5sto
+.bri2
+.but4ti
+.cam4pe
+.can5c
+.capa5b
+.car5ol
+.ca4t
+.ce4la
+.ch4
+.chill5i
+.ci2
+.cit5r
+.co3e
+.co4r
+.cor5ner
+.de4moi
+.de3o
+.de3ra
+.de3ri
+.des4c
+.dictio5
+.do4t
+.du4c
+.dumb5
+.earth5
+.eas3i
+.eb4
+.eer4
+.eg2
+.el5d
+.el3em
+.enam3
+.en3g
+.en3s
+.eq5ui5t
+.er4ri
+.es3
+.eu3
+.eye5
+.fes3
+.for5mer
+.ga2
+.ge2
+.gen3t4
+.ge5og
+.gi5a
+.gi4b
+.go4r
+.hand5i
+.han5k
+.he2
+.hero5i
+.hes3
+.het3
+.hi3b
+.hi3er
+.hon5ey
+.hon3o
+.hov5
+.id4l
+.idol3
+.im3m
+.im5pin
+.in1
+.in3ci
+.ine2
+.in2k
+.in3s
+.ir5r
+.is4i
+.ju3r
+.la4cy
+.la4m
+.lat5er
+.lath5
+.le2
+.leg5e
+.len4
+.lep5
+.lev1
+.li4g
+.lig5a
+.li2n
+.li3o
+.li4t
+.mag5a5
+.mal5o
+.man5a
+.mar5ti
+.me2
+.mer3c
+.me5ter
+.mis1
+.mist5i
+.mon3e
+.mo3ro
+.mu5ta
+.muta5b
+.ni4c
+.od2
+.odd5
+.of5te
+.or5ato
+.or3c
+.or1d
+.or3t
+.os3
+.os4tl
+.oth3
+.out3
+.ped5al
+.pe5te
+.pe5tit
+.pi4e
+.pio5n
+.pi2t
+.pre3m
+.ra4c
+.ran4t
+.ratio5na
+.ree2
+.re5mit
+.res2
+.re5stat
+.ri4g
+.rit5u
+.ro4q
+.ros5t
+.row5d
+.ru4d
+.sci3e
+.self5
+.sell5
+.se2n
+.se5rie
+.sh2
+.si2
+.sing4
+.st4
+.sta5bl
+.sy2
+.ta4
+.te4
+.ten5an
+.th2
+.ti2
+.til4
+.tim5o5
+.ting4
+.tin5k
+.ton4a
+.to4p
+.top5i
+.tou5s
+.trib5ut
+.un1a
+.un3ce
+.under5
+.un1e
+.un5k
+.un5o
+.un3u
+.up3
+.ure3
+.us5a
+.ven4de
+.ve5ra
+.wil5i
+.ye4
+4ab.
+a5bal
+a5ban
+abe2
+ab5erd
+abi5a
+ab5it5ab
+ab5lat
+ab5o5liz
+4abr
+ab5rog
+ab3ul
+a4car
+ac5ard
+ac5aro
+a5ceou
+ac1er
+a5chet
+4a2ci
+a3cie
+ac1in
+a3cio
+ac5rob
+act5if
+ac3ul
+ac4um
+a2d
+ad4din
+ad5er.
+2adi
+a3dia
+ad3ica
+adi4er
+a3dio
+a3dit
+a5diu
+ad4le
+ad3ow
+ad5ran
+ad4su
+4adu
+a3duc
+ad5um
+ae4r
+aeri4e
+a2f
+aff4
+a4gab
+aga4n
+ag5ell
+age4o
+4ageu
+ag1i
+4ag4l
+ag1n
+a2go
+3agog
+ag3oni
+a5guer
+ag5ul
+a4gy
+a3ha
+a3he
+ah4l
+a3ho
+ai2
+a5ia
+a3ic.
+ai5ly
+a4i4n
+ain5in
+ain5o
+ait5en
+a1j
+ak1en
+al5ab
+al3ad
+a4lar
+4aldi
+2ale
+al3end
+a4lenti
+a5le5o
+al1i
+al4ia.
+ali4e
+al5lev
+4allic
+4alm
+a5log.
+a4ly.
+4alys
+5a5lyst
+5alyt
+3alyz
+4ama
+am5ab
+am3ag
+ama5ra
+am5asc
+a4matis
+a4m5ato
+am5era
+am3ic
+am5if
+am5ily
+am1in
+ami4no
+a2mo
+a5mon
+amor5i
+amp5en
+a2n
+an3age
+3analy
+a3nar
+an3arc
+anar4i
+a3nati
+4and
+ande4s
+an3dis
+an1dl
+an4dow
+a5nee
+a3nen
+an5est.
+a3neu
+2ang
+ang5ie
+an1gl
+a4n1ic
+a3nies
+an3i3f
+an4ime
+a5nimi
+a5nine
+an3io
+a3nip
+an3ish
+an3it
+a3niu
+an4kli
+5anniz
+ano4
+an5ot
+anoth5
+an2sa
+an4sco
+an4sn
+an2sp
+ans3po
+an4st
+an4sur
+antal4
+an4tie
+4anto
+an2tr
+an4tw
+an3ua
+an3ul
+a5nur
+4ao
+apar4
+ap5at
+ap5ero
+a3pher
+4aphi
+a4pilla
+ap5illar
+ap3in
+ap3ita
+a3pitu
+a2pl
+apoc5
+ap5ola
+apor5i
+apos3t
+aps5es
+a3pu
+aque5
+2a2r
+ar3act
+a5rade
+ar5adis
+ar3al
+a5ramete
+aran4g
+ara3p
+ar4at
+a5ratio
+ar5ativ
+a5rau
+ar5av4
+araw4
+arbal4
+ar4chan
+ar5dine
+ar4dr
+ar5eas
+a3ree
+ar3ent
+a5ress
+ar4fi
+ar4fl
+ar1i
+ar5ial
+ar3ian
+a3riet
+ar4im
+ar5inat
+ar3io
+ar2iz
+ar2mi
+ar5o5d
+a5roni
+a3roo
+ar2p
+ar3q
+arre4
+ar4sa
+ar2sh
+4as.
+as4ab
+as3ant
+ashi4
+a5sia.
+a3sib
+a3sic
+5a5si4t
+ask3i
+as4l
+a4soc
+as5ph
+as4sh
+as3ten
+as1tr
+asur5a
+a2ta
+at3abl
+at5ac
+at3alo
+at5ap
+ate5c
+at5ech
+at3ego
+at3en.
+at3era
+ater5n
+a5terna
+at3est
+at5ev
+4ath
+ath5em
+a5then
+at4ho
+ath5om
+4ati.
+a5tia
+at5i5b
+at1ic
+at3if
+ation5ar
+at3itu
+a4tog
+a2tom
+at5omiz
+a4top
+a4tos
+a1tr
+at5rop
+at4sk
+at4tag
+at5te
+at4th
+a2tu
+at5ua
+at5ue
+at3ul
+at3ura
+a2ty
+au4b
+augh3
+au3gu
+au4l2
+aun5d
+au3r
+au5sib
+aut5en
+au1th
+a2va
+av3ag
+a5van
+ave4no
+av3era
+av5ern
+av5ery
+av1i
+avi4er
+av3ig
+av5oc
+a1vor
+3away
+aw3i
+aw4ly
+aws4
+ax4ic
+ax4id
+ay5al
+aye4
+ays4
+azi4er
+azz5i
+5ba.
+bad5ger
+ba4ge
+bal1a
+ban5dag
+ban4e
+ban3i
+barbi5
+bari4a
+bas4si
+1bat
+ba4z
+2b1b
+b2be
+b3ber
+bbi4na
+4b1d
+4be.
+beak4
+beat3
+4be2d
+be3da
+be3de
+be3di
+be3gi
+be5gu
+1bel
+be1li
+be3lo
+4be5m
+be5nig
+be5nu
+4bes4
+be3sp
+be5str
+3bet
+bet5iz
+be5tr
+be3tw
+be3w
+be5yo
+2bf
+4b3h
+bi2b
+bi4d
+3bie
+bi5en
+bi4er
+2b3if
+1bil
+bi3liz
+bina5r4
+bin4d
+bi5net
+bi3ogr
+bi5ou
+bi2t
+3bi3tio
+bi3tr
+3bit5ua
+b5itz
+b1j
+bk4
+b2l2
+blath5
+b4le.
+blen4
+5blesp
+b3lis
+b4lo
+blun4t
+4b1m
+4b3n
+bne5g
+3bod
+bod3i
+bo4e
+bol3ic
+bom4bi
+bon4a
+bon5at
+3boo
+5bor.
+4b1ora
+bor5d
+5bore
+5bori
+5bos4
+b5ota
+both5
+bo4to
+bound3
+4bp
+4brit
+broth3
+2b5s2
+bsor4
+2bt
+bt4l
+b4to
+b3tr
+buf4fer
+bu4ga
+bu3li
+bumi4
+bu4n
+bunt4i
+bu3re
+bus5ie
+buss4e
+5bust
+4buta
+3butio
+b5uto
+b1v
+4b5w
+5by.
+bys4
+1ca
+cab3in
+ca1bl
+cach4
+ca5den
+4cag4
+2c5ah
+ca3lat
+cal4la
+call5in
+4calo
+can5d
+can4e
+can4ic
+can5is
+can3iz
+can4ty
+cany4
+ca5per
+car5om
+cast5er
+cas5tig
+4casy
+ca4th
+4cativ
+cav5al
+c3c
+ccha5
+cci4a
+ccompa5
+ccon4
+ccou3t
+2ce.
+4ced.
+4ceden
+3cei
+5cel.
+3cell
+1cen
+3cenc
+2cen4e
+4ceni
+3cent
+3cep
+ce5ram
+4cesa
+3cessi
+ces5si5b
+ces5t
+cet4
+c5e4ta
+cew4
+2ch
+4ch.
+4ch3ab
+5chanic
+ch5a5nis
+che2
+cheap3
+4ched
+che5lo
+3chemi
+ch5ene
+ch3er.
+ch3ers
+4ch1in
+5chine.
+ch5iness
+5chini
+5chio
+3chit
+chi2z
+3cho2
+ch4ti
+1ci
+3cia
+ci2a5b
+cia5r
+ci5c
+4cier
+5cific.
+4cii
+ci4la
+3cili
+2cim
+2cin
+c4ina
+3cinat
+cin3em
+c1ing
+c5ing.
+5cino
+cion4
+4cipe
+ci3ph
+4cipic
+4cista
+4cisti
+2c1it
+cit3iz
+5ciz
+ck1
+ck3i
+1c4l4
+4clar
+c5laratio
+5clare
+cle4m
+4clic
+clim4
+cly4
+c5n
+1co
+co5ag
+coe2
+2cog
+co4gr
+coi4
+co3inc
+col5i
+5colo
+col3or
+com5er
+con4a
+c4one
+con3g
+con5t
+co3pa
+cop3ic
+co4pl
+4corb
+coro3n
+cos4e
+cov1
+cove4
+cow5a
+coz5e
+co5zi
+c1q
+cras5t
+5crat.
+5cratic
+cre3at
+5cred
+4c3reta
+cre4v
+cri2
+cri5f
+c4rin
+cris4
+5criti
+cro4pl
+crop5o
+cros4e
+cru4d
+4c3s2
+2c1t
+cta4b
+ct5ang
+c5tant
+c2te
+c3ter
+c4ticu
+ctim3i
+ctu4r
+c4tw
+cud5
+c4uf
+c4ui
+cu5ity
+5culi
+cul4tis
+3cultu
+cu2ma
+c3ume
+cu4mi
+3cun
+cu3pi
+cu5py
+cur5a4b
+cu5ria
+1cus
+cuss4i
+3c4ut
+cu4tie
+4c5utiv
+4cutr
+1cy
+cze4
+1d2a
+5da.
+2d3a4b
+dach4
+4daf
+2dag
+da2m2
+dan3g
+dard5
+dark5
+4dary
+3dat
+4dativ
+4dato
+5dav4
+dav5e
+5day
+d1b
+d5c
+d1d4
+2de.
+deaf5
+deb5it
+de4bon
+decan4
+de4cil
+de5com
+2d1ed
+4dee.
+de5if
+deli4e
+del5i5q
+de5lo
+d4em
+5dem.
+3demic
+dem5ic.
+de5mil
+de4mons
+demor5
+1den
+de4nar
+de3no
+denti5f
+de3nu
+de1p
+de3pa
+depi4
+de2pu
+d3eq
+d4erh
+5derm
+dern5iz
+der5s
+des2
+d2es.
+de1sc
+de2s5o
+des3ti
+de3str
+de4su
+de1t
+de2to
+de1v
+dev3il
+4dey
+4d1f
+d4ga
+d3ge4t
+dg1i
+d2gy
+d1h2
+5di.
+1d4i3a
+dia5b
+di4cam
+d4ice
+3dict
+3did
+5di3en
+d1if
+di3ge
+di4lato
+d1in
+1dina
+3dine.
+5dini
+di5niz
+1dio
+dio5g
+di4pl
+dir2
+di1re
+dirt5i
+dis1
+5disi
+d4is3t
+d2iti
+1di1v
+d1j
+d5k2
+4d5la
+3dle.
+3dled
+3dles.
+4dless
+2d3lo
+4d5lu
+2dly
+d1m
+4d1n4
+1do
+3do.
+do5de
+5doe
+2d5of
+d4og
+do4la
+doli4
+do5lor
+dom5iz
+do3nat
+doni4
+doo3d
+dop4p
+d4or
+3dos
+4d5out
+do4v
+3dox
+d1p
+1dr
+drag5on
+4drai
+dre4
+drea5r
+5dren
+dri4b
+dril4
+dro4p
+4drow
+5drupli
+4dry
+2d1s2
+ds4p
+d4sw
+d4sy
+d2th
+1du
+d1u1a
+du2c
+d1uca
+duc5er
+4duct.
+4ducts
+du5el
+du4g
+d3ule
+dum4be
+du4n
+4dup
+du4pe
+d1v
+d1w
+d2y
+5dyn
+dy4se
+dys5p
+e1a4b
+e3act
+ead1
+ead5ie
+ea4ge
+ea5ger
+ea4l
+eal5er
+eal3ou
+eam3er
+e5and
+ear3a
+ear4c
+ear5es
+ear4ic
+ear4il
+ear5k
+ear2t
+eart3e
+ea5sp
+e3ass
+east3
+ea2t
+eat5en
+eath3i
+e5atif
+e4a3tu
+ea2v
+eav3en
+eav5i
+eav5o
+2e1b
+e4bel.
+e4bels
+e4ben
+e4bit
+e3br
+e4cad
+ecan5c
+ecca5
+e1ce
+ec5essa
+ec2i
+e4cib
+ec5ificat
+ec5ifie
+ec5ify
+ec3im
+eci4t
+e5cite
+e4clam
+e4clus
+e2col
+e4comm
+e4compe
+e4conc
+e2cor
+ec3ora
+eco5ro
+e1cr
+e4crem
+ec4tan
+ec4te
+e1cu
+e4cul
+ec3ula
+2e2da
+4ed3d
+e4d1er
+ede4s
+4edi
+e3dia
+ed3ib
+ed3ica
+ed3im
+ed1it
+edi5z
+4edo
+e4dol
+edon2
+e4dri
+e4dul
+ed5ulo
+ee2c
+eed3i
+ee2f
+eel3i
+ee4ly
+ee2m
+ee4na
+ee4p1
+ee2s4
+eest4
+ee4ty
+e5ex
+e1f
+e4f3ere
+1eff
+e4fic
+5efici
+efil4
+e3fine
+ef5i5nite
+3efit
+efor5es
+e4fuse.
+4egal
+eger4
+eg5ib
+eg4ic
+eg5ing
+e5git5
+eg5n
+e4go.
+e4gos
+eg1ul
+e5gur
+5egy
+e1h4
+eher4
+ei2
+e5ic
+ei5d
+eig2
+ei5gl
+e3imb
+e3inf
+e1ing
+e5inst
+eir4d
+eit3e
+ei3th
+e5ity
+e1j
+e4jud
+ej5udi
+eki4n
+ek4la
+e1la
+e4la.
+e4lac
+elan4d
+el5ativ
+e4law
+elaxa4
+e3lea
+el5ebra
+5elec
+e4led
+el3ega
+e5len
+e4l1er
+e1les
+el2f
+el2i
+e3libe
+e4l5ic.
+el3ica
+e3lier
+el5igib
+e5lim
+e4l3ing
+e3lio
+e2lis
+el5ish
+e3liv3
+4ella
+el4lab
+ello4
+e5loc
+el5og
+el3op.
+el2sh
+el4ta
+e5lud
+el5ug
+e4mac
+e4mag
+e5man
+em5ana
+em5b
+e1me
+e2mel
+e4met
+em3ica
+emi4e
+em5igra
+em1in2
+em5ine
+em3i3ni
+e4mis
+em5ish
+e5miss
+em3iz
+5emniz
+emo4g
+emoni5o
+em3pi
+e4mul
+em5ula
+emu3n
+e3my
+en5amo
+e4nant
+ench4er
+en3dic
+e5nea
+e5nee
+en3em
+en5ero
+en5esi
+en5est
+en3etr
+e3new
+en5ics
+e5nie
+e5nil
+e3nio
+en3ish
+en3it
+e5niu
+5eniz
+4enn
+4eno
+eno4g
+e4nos
+en3ov
+en4sw
+ent5age
+4enthes
+en3ua
+en5uf
+e3ny.
+4en3z
+e5of
+eo2g
+e4oi4
+e3ol
+eop3ar
+e1or
+eo3re
+eo5rol
+eos4
+e4ot
+eo4to
+e5out
+e5ow
+e2pa
+e3pai
+ep5anc
+e5pel
+e3pent
+ep5etitio
+ephe4
+e4pli
+e1po
+e4prec
+ep5reca
+e4pred
+ep3reh
+e3pro
+e4prob
+ep4sh
+ep5ti5b
+e4put
+ep5uta
+e1q
+equi3l
+e4q3ui3s
+er1a
+era4b
+4erand
+er3ar
+4erati.
+2erb
+er4bl
+er3ch
+er4che
+2ere.
+e3real
+ere5co
+ere3in
+er5el.
+er3emo
+er5ena
+er5ence
+4erene
+er3ent
+ere4q
+er5ess
+er3est
+eret4
+er1h
+er1i
+e1ria4
+5erick
+e3rien
+eri4er
+er3ine
+e1rio
+4erit
+er4iu
+eri4v
+e4riva
+er3m4
+er4nis
+4ernit
+5erniz
+er3no
+2ero
+er5ob
+e5roc
+ero4r
+er1ou
+er1s
+er3set
+ert3er
+4ertl
+er3tw
+4eru
+eru4t
+5erwau
+e1s4a
+e4sage.
+e4sages
+es2c
+e2sca
+es5can
+e3scr
+es5cu
+e1s2e
+e2sec
+es5ecr
+es5enc
+e4sert.
+e4serts
+e4serva
+4esh
+e3sha
+esh5en
+e1si
+e2sic
+e2sid
+es5iden
+es5igna
+e2s5im
+es4i4n
+esis4te
+esi4u
+e5skin
+es4mi
+e2sol
+es3olu
+e2son
+es5ona
+e1sp
+es3per
+es5pira
+es4pre
+2ess
+es4si4b
+estan4
+es3tig
+es5tim
+4es2to
+e3ston
+2estr
+e5stro
+estruc5
+e2sur
+es5urr
+es4w
+eta4b
+eten4d
+e3teo
+ethod3
+et1ic
+e5tide
+etin4
+eti4no
+e5tir
+e5titio
+et5itiv
+4etn
+et5ona
+e3tra
+e3tre
+et3ric
+et5rif
+et3rog
+et5ros
+et3ua
+et5ym
+et5z
+4eu
+e5un
+e3up
+eu3ro
+eus4
+eute4
+euti5l
+eu5tr
+eva2p5
+e2vas
+ev5ast
+e5vea
+ev3ell
+evel3o
+e5veng
+even4i
+ev1er
+e5verb
+e1vi
+ev3id
+evi4l
+e4vin
+evi4v
+e5voc
+e5vu
+e1wa
+e4wag
+e5wee
+e3wh
+ewil5
+ew3ing
+e3wit
+1exp
+5eyc
+5eye.
+eys4
+1fa
+fa3bl
+fab3r
+fa4ce
+4fag
+fain4
+fall5e
+4fa4ma
+fam5is
+5far
+far5th
+fa3ta
+fa3the
+4fato
+fault5
+4f5b
+4fd
+4fe.
+feas4
+feath3
+fe4b
+4feca
+5fect
+2fed
+fe3li
+fe4mo
+fen2d
+fend5e
+fer1
+5ferr
+fev4
+4f1f
+f4fes
+f4fie
+f5fin.
+f2f5is
+f4fly
+f2fy
+4fh
+1fi
+fi3a
+2f3ic.
+4f3ical
+f3ican
+4ficate
+f3icen
+fi3cer
+fic4i
+5ficia
+5ficie
+4fics
+fi3cu
+fi5del
+fight5
+fil5i
+fill5in
+4fily
+2fin
+5fina
+fin2d5
+fi2ne
+f1in3g
+fin4n
+fis4ti
+f4l2
+f5less
+flin4
+flo3re
+f2ly5
+4fm
+4fn
+1fo
+5fon
+fon4de
+fon4t
+fo2r
+fo5rat
+for5ay
+fore5t
+for4i
+fort5a
+fos5
+4f5p
+fra4t
+f5rea
+fres5c
+fri2
+fril4
+frol5
+2f3s
+2ft
+f4to
+f2ty
+3fu
+fu5el
+4fug
+fu4min
+fu5ne
+fu3ri
+fusi4
+fus4s
+4futa
+1fy
+1ga
+gaf4
+5gal.
+3gali
+ga3lo
+2gam
+ga5met
+g5amo
+gan5is
+ga3niz
+gani5za
+4gano
+gar5n4
+gass4
+gath3
+4gativ
+4gaz
+g3b
+gd4
+2ge.
+2ged
+geez4
+gel4in
+ge5lis
+ge5liz
+4gely
+1gen
+ge4nat
+ge5niz
+4geno
+4geny
+1geo
+ge3om
+g4ery
+5gesi
+geth5
+4geto
+ge4ty
+ge4v
+4g1g2
+g2ge
+g3ger
+gglu5
+ggo4
+gh3in
+gh5out
+gh4to
+5gi.
+1gi4a
+gia5r
+g1ic
+5gicia
+g4ico
+gien5
+5gies.
+gil4
+g3imen
+3g4in.
+gin5ge
+5g4ins
+5gio
+3gir
+gir4l
+g3isl
+gi4u
+5giv
+3giz
+gl2
+gla4
+glad5i
+5glas
+1gle
+gli4b
+g3lig
+3glo
+glo3r
+g1m
+g4my
+gn4a
+g4na.
+gnet4t
+g1ni
+g2nin
+g4nio
+g1no
+g4non
+1go
+3go.
+gob5
+5goe
+3g4o4g
+go3is
+gon2
+4g3o3na
+gondo5
+go3ni
+5goo
+go5riz
+gor5ou
+5gos.
+gov1
+g3p
+1gr
+4grada
+g4rai
+gran2
+5graph.
+g5rapher
+5graphic
+4graphy
+4gray
+gre4n
+4gress.
+4grit
+g4ro
+gruf4
+gs2
+g5ste
+gth3
+gu4a
+3guard
+2gue
+5gui5t
+3gun
+3gus
+4gu4t
+g3w
+1gy
+2g5y3n
+gy5ra
+h3ab4l
+hach4
+hae4m
+hae4t
+h5agu
+ha3la
+hala3m
+ha4m
+han4ci
+han4cy
+5hand.
+han4g
+hang5er
+hang5o
+h5a5niz
+han4k
+han4te
+hap3l
+hap5t
+ha3ran
+ha5ras
+har2d
+hard3e
+har4le
+harp5en
+har5ter
+has5s
+haun4
+5haz
+haz3a
+h1b
+1head
+3hear
+he4can
+h5ecat
+h4ed
+he5do5
+he3l4i
+hel4lis
+hel4ly
+h5elo
+hem4p
+he2n
+hena4
+hen5at
+heo5r
+hep5
+h4era
+hera3p
+her4ba
+here5a
+h3ern
+h5erou
+h3ery
+h1es
+he2s5p
+he4t
+het4ed
+heu4
+h1f
+h1h
+hi5an
+hi4co
+high5
+h4il2
+himer4
+h4ina
+hion4e
+hi4p
+hir4l
+hi3ro
+hir4p
+hir4r
+his3el
+his4s
+hith5er
+hi2v
+4hk
+4h1l4
+hlan4
+h2lo
+hlo3ri
+4h1m
+hmet4
+2h1n
+h5odiz
+h5ods
+ho4g
+hoge4
+hol5ar
+3hol4e
+ho4ma
+home3
+hon4a
+ho5ny
+3hood
+hoon4
+hor5at
+ho5ris
+hort3e
+ho5ru
+hos4e
+ho5sen
+hos1p
+1hous
+house3
+hov5el
+4h5p
+4hr4
+hree5
+hro5niz
+hro3po
+4h1s2
+h4sh
+h4tar
+ht1en
+ht5es
+h4ty
+hu4g
+hu4min
+hun5ke
+hun4t
+hus3t4
+hu4t
+h1w
+h4wart
+hy3pe
+hy3ph
+hy2s
+2i1a
+i2al
+iam4
+iam5ete
+i2an
+4ianc
+ian3i
+4ian4t
+ia5pe
+iass4
+i4ativ
+ia4tric
+i4atu
+ibe4
+ib3era
+ib5ert
+ib5ia
+ib3in
+ib5it.
+ib5ite
+i1bl
+ib3li
+i5bo
+i1br
+i2b5ri
+i5bun
+4icam
+5icap
+4icar
+i4car.
+i4cara
+icas5
+i4cay
+iccu4
+4iceo
+4ich
+2ici
+i5cid
+ic5ina
+i2cip
+ic3ipa
+i4cly
+i2c5oc
+4i1cr
+5icra
+i4cry
+ic4te
+ictu2
+ic4t3ua
+ic3ula
+ic4um
+ic5uo
+i3cur
+2id
+i4dai
+id5anc
+id5d
+ide3al
+ide4s
+i2di
+id5ian
+idi4ar
+i5die
+id3io
+idi5ou
+id1it
+id5iu
+i3dle
+i4dom
+id3ow
+i4dr
+i2du
+id5uo
+2ie4
+ied4e
+5ie5ga
+ield3
+ien5a4
+ien4e
+i5enn
+i3enti
+i1er.
+i3esc
+i1est
+i3et
+4if.
+if5ero
+iff5en
+if4fr
+4ific.
+i3fie
+i3fl
+4ift
+2ig
+iga5b
+ig3era
+ight3i
+4igi
+i3gib
+ig3il
+ig3in
+ig3it
+i4g4l
+i2go
+ig3or
+ig5ot
+i5gre
+igu5i
+ig1ur
+i3h
+4i5i4
+i3j
+4ik
+i1la
+il3a4b
+i4lade
+i2l5am
+ila5ra
+i3leg
+il1er
+ilev4
+il5f
+il1i
+il3ia
+il2ib
+il3io
+il4ist
+2ilit
+il2iz
+ill5ab
+4iln
+il3oq
+il4ty
+il5ur
+il3v
+i4mag
+im3age
+ima5ry
+imenta5r
+4imet
+im1i
+im5ida
+imi5le
+i5mini
+4imit
+im4ni
+i3mon
+i2mu
+im3ula
+2in.
+i4n3au
+4inav
+incel4
+in3cer
+4ind
+in5dling
+2ine
+i3nee
+iner4ar
+i5ness
+4inga
+4inge
+in5gen
+4ingi
+in5gling
+4ingo
+4ingu
+2ini
+i5ni.
+i4nia
+in3io
+in1is
+i5nite.
+5initio
+in3ity
+4ink
+4inl
+2inn
+2i1no
+i4no4c
+ino4s
+i4not
+2ins
+in3se
+insur5a
+2int.
+2in4th
+in1u
+i5nus
+4iny
+2io
+4io.
+ioge4
+io2gr
+i1ol
+io4m
+ion3at
+ion4ery
+ion3i
+io5ph
+ior3i
+i4os
+io5th
+i5oti
+io4to
+i4our
+2ip
+ipe4
+iphras4
+ip3i
+ip4ic
+ip4re4
+ip3ul
+i3qua
+iq5uef
+iq3uid
+iq3ui3t
+4ir
+i1ra
+ira4b
+i4rac
+ird5e
+ire4de
+i4ref
+i4rel4
+i4res
+ir5gi
+ir1i
+iri5de
+ir4is
+iri3tu
+5i5r2iz
+ir4min
+iro4g
+5iron.
+ir5ul
+2is.
+is5ag
+is3ar
+isas5
+2is1c
+is3ch
+4ise
+is3er
+3isf
+is5han
+is3hon
+ish5op
+is3ib
+isi4d
+i5sis
+is5itiv
+4is4k
+islan4
+4isms
+i2so
+iso5mer
+is1p
+is2pi
+is4py
+4is1s
+is4sal
+issen4
+is4ses
+is4ta.
+is1te
+is1ti
+ist4ly
+4istral
+i2su
+is5us
+4ita.
+ita4bi
+i4tag
+4ita5m
+i3tan
+i3tat
+2ite
+it3era
+i5teri
+it4es
+2ith
+i1ti
+4itia
+4i2tic
+it3ica
+5i5tick
+it3ig
+it5ill
+i2tim
+2itio
+4itis
+i4tism
+i2t5o5m
+4iton
+i4tram
+it5ry
+4itt
+it3uat
+i5tud
+it3ul
+4itz.
+i1u
+2iv
+iv3ell
+iv3en.
+i4v3er.
+i4vers.
+iv5il.
+iv5io
+iv1it
+i5vore
+iv3o3ro
+i4v3ot
+4i5w
+ix4o
+4iy
+4izar
+izi4
+5izont
+5ja
+jac4q
+ja4p
+1je
+jer5s
+4jestie
+4jesty
+jew3
+jo4p
+5judg
+3ka.
+k3ab
+k5ag
+kais4
+kal4
+k1b
+k2ed
+1kee
+ke4g
+ke5li
+k3en4d
+k1er
+kes4
+k3est.
+ke4ty
+k3f
+kh4
+k1i
+5ki.
+5k2ic
+k4ill
+kilo5
+k4im
+k4in.
+kin4de
+k5iness
+kin4g
+ki4p
+kis4
+k5ish
+kk4
+k1l
+4kley
+4kly
+k1m
+k5nes
+1k2no
+ko5r
+kosh4
+k3ou
+kro5n
+4k1s2
+k4sc
+ks4l
+k4sy
+k5t
+k1w
+lab3ic
+l4abo
+laci4
+l4ade
+la3dy
+lag4n
+lam3o
+3land
+lan4dl
+lan5et
+lan4te
+lar4g
+lar3i
+las4e
+la5tan
+4lateli
+4lativ
+4lav
+la4v4a
+2l1b
+lbin4
+4l1c2
+lce4
+l3ci
+2ld
+l2de
+ld4ere
+ld4eri
+ldi4
+ld5is
+l3dr
+l4dri
+le2a
+le4bi
+left5
+5leg.
+5legg
+le4mat
+lem5atic
+4len.
+3lenc
+5lene.
+1lent
+le3ph
+le4pr
+lera5b
+ler4e
+3lerg
+3l4eri
+l4ero
+les2
+le5sco
+5lesq
+3less
+5less.
+l3eva
+lev4er.
+lev4era
+lev4ers
+3ley
+4leye
+2lf
+l5fr
+4l1g4
+l5ga
+lgar3
+l4ges
+lgo3
+2l3h
+li4ag
+li2am
+liar5iz
+li4as
+li4ato
+li5bi
+5licio
+li4cor
+4lics
+4lict.
+l4icu
+l3icy
+l3ida
+lid5er
+3lidi
+lif3er
+l4iff
+li4fl
+5ligate
+3ligh
+li4gra
+3lik
+4l4i4l
+lim4bl
+lim3i
+li4mo
+l4im4p
+l4ina
+1l4ine
+lin3ea
+lin3i
+link5er
+li5og
+4l4iq
+lis4p
+l1it
+l2it.
+5litica
+l5i5tics
+liv3er
+l1iz
+4lj
+lka3
+l3kal
+lka4t
+l1l
+l4law
+l2le
+l5lea
+l3lec
+l3leg
+l3lel
+l3le4n
+l3le4t
+ll2i
+l2lin4
+l5lina
+ll4o
+lloqui5
+ll5out
+l5low
+2lm
+l5met
+lm3ing
+l4mod
+lmon4
+2l1n2
+3lo.
+lob5al
+lo4ci
+4lof
+3logic
+l5ogo
+3logu
+lom3er
+5long
+lon4i
+l3o3niz
+lood5
+5lope.
+lop3i
+l3opm
+lora4
+lo4rato
+lo5rie
+lor5ou
+5los.
+los5et
+5losophiz
+5losophy
+los4t
+lo4ta
+loun5d
+2lout
+4lov
+2lp
+lpa5b
+l3pha
+l5phi
+lp5ing
+l3pit
+l4pl
+l5pr
+4l1r
+2l1s2
+l4sc
+l2se
+l4sie
+4lt
+lt5ag
+ltane5
+l1te
+lten4
+ltera4
+lth3i
+l5ties.
+ltis4
+l1tr
+ltu2
+ltur3a
+lu5a
+lu3br
+luch4
+lu3ci
+lu3en
+luf4
+lu5id
+lu4ma
+5lumi
+l5umn.
+5lumnia
+lu3o
+luo3r
+4lup
+luss4
+lus3te
+1lut
+l5ven
+l5vet4
+2l1w
+1ly
+4lya
+4lyb
+ly5me
+ly3no
+2lys4
+l5yse
+1ma
+2mab
+ma2ca
+ma5chine
+ma4cl
+mag5in
+5magn
+2mah
+maid5
+4mald
+ma3lig
+ma5lin
+mal4li
+mal4ty
+5mania
+man5is
+man3iz
+4map
+ma5rine.
+ma5riz
+mar4ly
+mar3v
+ma5sce
+mas4e
+mas1t
+5mate
+math3
+ma3tis
+4matiza
+4m1b
+mba4t5
+m5bil
+m4b3ing
+mbi4v
+4m5c
+4me.
+2med
+4med.
+5media
+me3die
+m5e5dy
+me2g
+mel5on
+mel4t
+me2m
+mem1o3
+1men
+men4a
+men5ac
+men4de
+4mene
+men4i
+mens4
+mensu5
+3ment
+men4te
+me5on
+m5ersa
+2mes
+3mesti
+me4ta
+met3al
+me1te
+me5thi
+m4etr
+5metric
+me5trie
+me3try
+me4v
+4m1f
+2mh
+5mi.
+mi3a
+mid4a
+mid4g
+mig4
+3milia
+m5i5lie
+m4ill
+min4a
+3mind
+m5inee
+m4ingl
+min5gli
+m5ingly
+min4t
+m4inu
+miot4
+m2is
+mis4er.
+mis5l
+mis4ti
+m5istry
+4mith
+m2iz
+4mk
+4m1l
+m1m
+mma5ry
+4m1n
+mn4a
+m4nin
+mn4o
+1mo
+4mocr
+5mocratiz
+mo2d1
+mo4go
+mois2
+moi5se
+4mok
+mo5lest
+mo3me
+mon5et
+mon5ge
+moni3a
+mon4ism
+mon4ist
+mo3niz
+monol4
+mo3ny.
+mo2r
+4mora.
+mos2
+mo5sey
+mo3sp
+moth3
+m5ouf
+3mous
+mo2v
+4m1p
+mpara5
+mpa5rab
+mpar5i
+m3pet
+mphas4
+m2pi
+mpi4a
+mp5ies
+m4p1in
+m5pir
+mp5is
+mpo3ri
+mpos5ite
+m4pous
+mpov5
+mp4tr
+m2py
+4m3r
+4m1s2
+m4sh
+m5si
+4mt
+1mu
+mula5r4
+5mult
+multi3
+3mum
+mun2
+4mup
+mu4u
+4mw
+1na
+2n1a2b
+n4abu
+4nac.
+na4ca
+n5act
+nag5er.
+nak4
+na4li
+na5lia
+4nalt
+na5mit
+n2an
+nanci4
+nan4it
+nank4
+nar3c
+4nare
+nar3i
+nar4l
+n5arm
+n4as
+nas4c
+nas5ti
+n2at
+na3tal
+nato5miz
+n2au
+nau3se
+3naut
+nav4e
+4n1b4
+ncar5
+n4ces.
+n3cha
+n5cheo
+n5chil
+n3chis
+nc1in
+nc4it
+ncour5a
+n1cr
+n1cu
+n4dai
+n5dan
+n1de
+nd5est.
+ndi4b
+n5d2if
+n1dit
+n3diz
+n5duc
+ndu4r
+nd2we
+2ne.
+n3ear
+ne2b
+neb3u
+ne2c
+5neck
+2ned
+ne4gat
+neg5ativ
+5nege
+ne4la
+nel5iz
+ne5mi
+ne4mo
+1nen
+4nene
+3neo
+ne4po
+ne2q
+n1er
+nera5b
+n4erar
+n2ere
+n4er5i
+ner4r
+1nes
+2nes.
+4nesp
+2nest
+4nesw
+3netic
+ne4v
+n5eve
+ne4w
+n3f
+n4gab
+n3gel
+nge4n4e
+n5gere
+n3geri
+ng5ha
+n3gib
+ng1in
+n5git
+n4gla
+ngov4
+ng5sh
+n1gu
+n4gum
+n2gy
+4n1h4
+nha4
+nhab3
+nhe4
+3n4ia
+ni3an
+ni4ap
+ni3ba
+ni4bl
+ni4d
+ni5di
+ni4er
+ni2fi
+ni5ficat
+n5igr
+nik4
+n1im
+ni3miz
+n1in
+5nine.
+nin4g
+ni4o
+5nis.
+nis4ta
+n2it
+n4ith
+3nitio
+n3itor
+ni3tr
+n1j
+4nk2
+n5kero
+n3ket
+nk3in
+n1kl
+4n1l
+n5m
+nme4
+nmet4
+4n1n2
+nne4
+nni3al
+nni4v
+nob4l
+no3ble
+n5ocl
+4n3o2d
+3noe
+4nog
+noge4
+nois5i
+no5l4i
+5nologis
+3nomic
+n5o5miz
+no4mo
+no3my
+no4n
+non4ag
+non5i
+n5oniz
+4nop
+5nop5o5li
+nor5ab
+no4rary
+4nosc
+nos4e
+nos5t
+no5ta
+1nou
+3noun
+nov3el3
+nowl3
+n1p4
+npi4
+npre4c
+n1q
+n1r
+nru4
+2n1s2
+ns5ab
+nsati4
+ns4c
+n2se
+n4s3es
+nsid1
+nsig4
+n2sl
+ns3m
+n4soc
+ns4pe
+n5spi
+nsta5bl
+n1t
+nta4b
+nter3s
+nt2i
+n5tib
+nti4er
+nti2f
+n3tine
+n4t3ing
+nti4p
+ntrol5li
+nt4s
+ntu3me
+nu1a
+nu4d
+nu5en
+nuf4fe
+n3uin
+3nu3it
+n4um
+nu1me
+n5umi
+3nu4n
+n3uo
+nu3tr
+n1v2
+n1w4
+nym4
+nyp4
+4nz
+n3za
+4oa
+oad3
+o5a5les
+oard3
+oas4e
+oast5e
+oat5i
+ob3a3b
+o5bar
+obe4l
+o1bi
+o2bin
+ob5ing
+o3br
+ob3ul
+o1ce
+och4
+o3chet
+ocif3
+o4cil
+o4clam
+o4cod
+oc3rac
+oc5ratiz
+ocre3
+5ocrit
+octor5a
+oc3ula
+o5cure
+od5ded
+od3ic
+odi3o
+o2do4
+odor3
+od5uct.
+od5ucts
+o4el
+o5eng
+o3er
+oe4ta
+o3ev
+o2fi
+of5ite
+ofit4t
+o2g5a5r
+og5ativ
+o4gato
+o1ge
+o5gene
+o5geo
+o4ger
+o3gie
+1o1gis
+og3it
+o4gl
+o5g2ly
+3ogniz
+o4gro
+ogu5i
+1ogy
+2ogyn
+o1h2
+ohab5
+oi2
+oic3es
+oi3der
+oiff4
+oig4
+oi5let
+o3ing
+oint5er
+o5ism
+oi5son
+oist5en
+oi3ter
+o5j
+2ok
+o3ken
+ok5ie
+o1la
+o4lan
+olass4
+ol2d
+old1e
+ol3er
+o3lesc
+o3let
+ol4fi
+ol2i
+o3lia
+o3lice
+ol5id.
+o3li4f
+o5lil
+ol3ing
+o5lio
+o5lis.
+ol3ish
+o5lite
+o5litio
+o5liv
+olli4e
+ol5ogiz
+olo4r
+ol5pl
+ol2t
+ol3ub
+ol3ume
+ol3un
+o5lus
+ol2v
+o2ly
+om5ah
+oma5l
+om5atiz
+om2be
+om4bl
+o2me
+om3ena
+om5erse
+o4met
+om5etry
+o3mia
+om3ic.
+om3ica
+o5mid
+om1in
+o5mini
+5ommend
+omo4ge
+o4mon
+om3pi
+ompro5
+o2n
+on1a
+on4ac
+o3nan
+on1c
+3oncil
+2ond
+on5do
+o3nen
+on5est
+on4gu
+on1ic
+o3nio
+on1is
+o5niu
+on3key
+on4odi
+on3omy
+on3s
+onspi4
+onspir5a
+onsu4
+onten4
+on3t4i
+ontif5
+on5um
+onva5
+oo2
+ood5e
+ood5i
+oo4k
+oop3i
+o3ord
+oost5
+o2pa
+ope5d
+op1er
+3opera
+4operag
+2oph
+o5phan
+o5pher
+op3ing
+o3pit
+o5pon
+o4posi
+o1pr
+op1u
+opy5
+o1q
+o1ra
+o5ra.
+o4r3ag
+or5aliz
+or5ange
+ore5a
+o5real
+or3ei
+ore5sh
+or5est.
+orew4
+or4gu
+4o5ria
+or3ica
+o5ril
+or1in
+o1rio
+or3ity
+o3riu
+or2mi
+orn2e
+o5rof
+or3oug
+or5pe
+3orrh
+or4se
+ors5en
+orst4
+or3thi
+or3thy
+or4ty
+o5rum
+o1ry
+os3al
+os2c
+os4ce
+o3scop
+4oscopi
+o5scr
+os4i4e
+os5itiv
+os3ito
+os3ity
+osi4u
+os4l
+o2so
+os4pa
+os4po
+os2ta
+o5stati
+os5til
+os5tit
+o4tan
+otele4g
+ot3er.
+ot5ers
+o4tes
+4oth
+oth5esi
+oth3i4
+ot3ic.
+ot5ica
+o3tice
+o3tif
+o3tis
+oto5s
+ou2
+ou3bl
+ouch5i
+ou5et
+ou4l
+ounc5er
+oun2d
+ou5v
+ov4en
+over4ne
+over3s
+ov4ert
+o3vis
+oviti4
+o5v4ol
+ow3der
+ow3el
+ow5est
+ow1i
+own5i
+o4wo
+oy1a
+1pa
+pa4ca
+pa4ce
+pac4t
+p4ad
+5pagan
+p3agat
+p4ai
+pain4
+p4al
+pan4a
+pan3el
+pan4ty
+pa3ny
+pa1p
+pa4pu
+para5bl
+par5age
+par5di
+3pare
+par5el
+p4a4ri
+par4is
+pa2te
+pa5ter
+5pathic
+pa5thy
+pa4tric
+pav4
+3pay
+4p1b
+pd4
+4pe.
+3pe4a
+pear4l
+pe2c
+2p2ed
+3pede
+3pedi
+pedia4
+ped4ic
+p4ee
+pee4d
+pek4
+pe4la
+peli4e
+pe4nan
+p4enc
+pen4th
+pe5on
+p4era.
+pera5bl
+p4erag
+p4eri
+peri5st
+per4mal
+perme5
+p4ern
+per3o
+per3ti
+pe5ru
+per1v
+pe2t
+pe5ten
+pe5tiz
+4pf
+4pg
+4ph.
+phar5i
+phe3no
+ph4er
+ph4es.
+ph1ic
+5phie
+ph5ing
+5phisti
+3phiz
+ph2l
+3phob
+3phone
+5phoni
+pho4r
+4phs
+ph3t
+5phu
+1phy
+pi3a
+pian4
+pi4cie
+pi4cy
+p4id
+p5ida
+pi3de
+5pidi
+3piec
+pi3en
+pi4grap
+pi3lo
+pi2n
+p4in.
+pind4
+p4ino
+3pi1o
+pion4
+p3ith
+pi5tha
+pi2tu
+2p3k2
+1p2l2
+3plan
+plas5t
+pli3a
+pli5er
+4plig
+pli4n
+ploi4
+plu4m
+plum4b
+4p1m
+2p3n
+po4c
+5pod.
+po5em
+po3et5
+5po4g
+poin2
+5point
+poly5t
+po4ni
+po4p
+1p4or
+po4ry
+1pos
+pos1s
+p4ot
+po4ta
+5poun
+4p1p
+ppa5ra
+p2pe
+p4ped
+p5pel
+p3pen
+p3per
+p3pet
+ppo5site
+pr2
+pray4e
+5preci
+pre5co
+pre3em
+pref5ac
+pre4la
+pre3r
+p3rese
+3press
+pre5ten
+pre3v
+5pri4e
+prin4t3
+pri4s
+pris3o
+p3roca
+prof5it
+pro3l
+pros3e
+pro1t
+2p1s2
+p2se
+ps4h
+p4sib
+2p1t
+pt5a4b
+p2te
+p2th
+pti3m
+ptu4r
+p4tw
+pub3
+pue4
+puf4
+pul3c
+pu4m
+pu2n
+pur4r
+5pus
+pu2t
+5pute
+put3er
+pu3tr
+put4ted
+put4tin
+p3w
+qu2
+qua5v
+2que.
+3quer
+3quet
+2rab
+ra3bi
+rach4e
+r5acl
+raf5fi
+raf4t
+r2ai
+ra4lo
+ram3et
+r2ami
+rane5o
+ran4ge
+r4ani
+ra5no
+rap3er
+3raphy
+rar5c
+rare4
+rar5ef
+4raril
+r2as
+ration4
+rau4t
+ra5vai
+rav3el
+ra5zie
+r1b
+r4bab
+r4bag
+rbi2
+rbi4f
+r2bin
+r5bine
+rb5ing.
+rb4o
+r1c
+r2ce
+rcen4
+r3cha
+rch4er
+r4ci4b
+rc4it
+rcum3
+r4dal
+rd2i
+rdi4a
+rdi4er
+rdin4
+rd3ing
+2re.
+re1al
+re3an
+re5arr
+5reav
+re4aw
+r5ebrat
+rec5oll
+rec5ompe
+re4cre
+2r2ed
+re1de
+re3dis
+red5it
+re4fac
+re2fe
+re5fer.
+re3fi
+re4fy
+reg3is
+re5it
+re1li
+re5lu
+r4en4ta
+ren4te
+re1o
+re5pin
+re4posi
+re1pu
+r1er4
+r4eri
+rero4
+re5ru
+r4es.
+re4spi
+ress5ib
+res2t
+re5stal
+re3str
+re4ter
+re4ti4z
+re3tri
+reu2
+re5uti
+rev2
+re4val
+rev3el
+r5ev5er.
+re5vers
+re5vert
+re5vil
+rev5olu
+re4wh
+r1f
+rfu4
+r4fy
+rg2
+rg3er
+r3get
+r3gic
+rgi4n
+rg3ing
+r5gis
+r5git
+r1gl
+rgo4n
+r3gu
+rh4
+4rh.
+4rhal
+ri3a
+ria4b
+ri4ag
+r4ib
+rib3a
+ric5as
+r4ice
+4rici
+5ricid
+ri4cie
+r4ico
+rid5er
+ri3enc
+ri3ent
+ri1er
+ri5et
+rig5an
+5rigi
+ril3iz
+5riman
+rim5i
+3rimo
+rim4pe
+r2ina
+5rina.
+rin4d
+rin4e
+rin4g
+ri1o
+5riph
+riph5e
+ri2pl
+rip5lic
+r4iq
+r2is
+r4is.
+ris4c
+r3ish
+ris4p
+ri3ta3b
+r5ited.
+rit5er.
+rit5ers
+rit3ic
+ri2tu
+rit5ur
+riv5el
+riv3et
+riv3i
+r3j
+r3ket
+rk4le
+rk4lin
+r1l
+rle4
+r2led
+r4lig
+r4lis
+rl5ish
+r3lo4
+r1m
+rma5c
+r2me
+r3men
+rm5ers
+rm3ing
+r4ming.
+r4mio
+r3mit
+r4my
+r4nar
+r3nel
+r4ner
+r5net
+r3ney
+r5nic
+r1nis4
+r3nit
+r3niv
+rno4
+r4nou
+r3nu
+rob3l
+r2oc
+ro3cr
+ro4e
+ro1fe
+ro5fil
+rok2
+ro5ker
+5role.
+rom5ete
+rom4i
+rom4p
+ron4al
+ron4e
+ro5n4is
+ron4ta
+1room
+5root
+ro3pel
+rop3ic
+ror3i
+ro5ro
+ros5per
+ros4s
+ro4the
+ro4ty
+ro4va
+rov5el
+rox5
+r1p
+r4pea
+r5pent
+rp5er.
+r3pet
+rp4h4
+rp3ing
+r3po
+r1r4
+rre4c
+rre4f
+r4reo
+rre4st
+rri4o
+rri4v
+rron4
+rros4
+rrys4
+4rs2
+r1sa
+rsa5ti
+rs4c
+r2se
+r3sec
+rse4cr
+rs5er.
+rs3es
+rse5v2
+r1sh
+r5sha
+r1si
+r4si4b
+rson3
+r1sp
+r5sw
+rtach4
+r4tag
+r3teb
+rten4d
+rte5o
+r1ti
+rt5ib
+rti4d
+r4tier
+r3tig
+rtil3i
+rtil4l
+r4tily
+r4tist
+r4tiv
+r3tri
+rtroph4
+rt4sh
+ru3a
+ru3e4l
+ru3en
+ru4gl
+ru3in
+rum3pl
+ru2n
+runk5
+run4ty
+r5usc
+ruti5n
+rv4e
+rvel4i
+r3ven
+rv5er.
+r5vest
+r3vey
+r3vic
+rvi4v
+r3vo
+r1w
+ry4c
+5rynge
+ry3t
+sa2
+2s1ab
+5sack
+sac3ri
+s3act
+5sai
+salar4
+sal4m
+sa5lo
+sal4t
+3sanc
+san4de
+s1ap
+sa5ta
+5sa3tio
+sat3u
+sau4
+sa5vor
+5saw
+4s5b
+scan4t5
+sca4p
+scav5
+s4ced
+4scei
+s4ces
+sch2
+s4cho
+3s4cie
+5scin4d
+scle5
+s4cli
+scof4
+4scopy
+scour5a
+s1cu
+4s5d
+4se.
+se4a
+seas4
+sea5w
+se2c3o
+3sect
+4s4ed
+se4d4e
+s5edl
+se2g
+seg3r
+5sei
+se1le
+5self
+5selv
+4seme
+se4mol
+sen5at
+4senc
+sen4d
+s5ened
+sen5g
+s5enin
+4sentd
+4sentl
+sep3a3
+4s1er.
+s4erl
+ser4o
+4servo
+s1e4s
+se5sh
+ses5t
+5se5um
+5sev
+sev3en
+sew4i
+5sex
+4s3f
+2s3g
+s2h
+2sh.
+sh1er
+5shev
+sh1in
+sh3io
+3ship
+shiv5
+sho4
+sh5old
+shon3
+shor4
+short5
+4shw
+si1b
+s5icc
+3side.
+5sides
+5sidi
+si5diz
+4signa
+sil4e
+4sily
+2s1in
+s2ina
+5sine.
+s3ing
+1sio
+5sion
+sion5a
+si2r
+sir5a
+1sis
+3sitio
+5siu
+1siv
+5siz
+sk2
+4ske
+s3ket
+sk5ine
+sk5ing
+s1l2
+s3lat
+s2le
+slith5
+2s1m
+s3ma
+small3
+sman3
+smel4
+s5men
+5smith
+smol5d4
+s1n4
+1so
+so4ce
+soft3
+so4lab
+sol3d2
+so3lic
+5solv
+3som
+3s4on.
+sona4
+son4g
+s4op
+5sophic
+s5ophiz
+s5ophy
+sor5c
+sor5d
+4sov
+so5vi
+2spa
+5spai
+spa4n
+spen4d
+2s5peo
+2sper
+s2phe
+3spher
+spho5
+spil4
+sp5ing
+4spio
+s4ply
+s4pon
+spor4
+4spot
+squal4l
+s1r
+2ss
+s1sa
+ssas3
+s2s5c
+s3sel
+s5seng
+s4ses.
+s5set
+s1si
+s4sie
+ssi4er
+ss5ily
+s4sl
+ss4li
+s4sn
+sspend4
+ss2t
+ssur5a
+ss5w
+2st.
+s2tag
+s2tal
+stam4i
+5stand
+s4ta4p
+5stat.
+s4ted
+stern5i
+s5tero
+ste2w
+stew5a
+s3the
+st2i
+s4ti.
+s5tia
+s1tic
+5stick
+s4tie
+s3tif
+st3ing
+5stir
+s1tle
+5stock
+stom3a
+5stone
+s4top
+3store
+st4r
+s4trad
+5stratu
+s4tray
+s4trid
+4stry
+4st3w
+s2ty
+1su
+su1al
+su4b3
+su2g3
+su5is
+suit3
+s4ul
+su2m
+sum3i
+su2n
+su2r
+4sv
+sw2
+4swo
+s4y
+4syc
+3syl
+syn5o
+sy5rin
+1ta
+3ta.
+2tab
+ta5bles
+5taboliz
+4taci
+ta5do
+4taf4
+tai5lo
+ta2l
+ta5la
+tal5en
+tal3i
+4talk
+tal4lis
+ta5log
+ta5mo
+tan4de
+tanta3
+ta5per
+ta5pl
+tar4a
+4tarc
+4tare
+ta3riz
+tas4e
+ta5sy
+4tatic
+ta4tur
+taun4
+tav4
+2taw
+tax4is
+2t1b
+4tc
+t4ch
+tch5et
+4t1d
+4te.
+tead4i
+4teat
+tece4
+5tect
+2t1ed
+te5di
+1tee
+teg4
+te5ger
+te5gi
+3tel.
+teli4
+5tels
+te2ma2
+tem3at
+3tenan
+3tenc
+3tend
+4tenes
+1tent
+ten4tag
+1teo
+te4p
+te5pe
+ter3c
+5ter3d
+1teri
+ter5ies
+ter3is
+teri5za
+5ternit
+ter5v
+4tes.
+4tess
+t3ess.
+teth5e
+3teu
+3tex
+4tey
+2t1f
+4t1g
+2th.
+than4
+th2e
+4thea
+th3eas
+the5at
+the3is
+3thet
+th5ic.
+th5ica
+4thil
+5think
+4thl
+th5ode
+5thodic
+4thoo
+thor5it
+tho5riz
+2ths
+1tia
+ti4ab
+ti4ato
+2ti2b
+4tick
+t4ico
+t4ic1u
+5tidi
+3tien
+tif2
+ti5fy
+2tig
+5tigu
+till5in
+1tim
+4timp
+tim5ul
+2t1in
+t2ina
+3tine.
+3tini
+1tio
+ti5oc
+tion5ee
+5tiq
+ti3sa
+3tise
+tis4m
+ti5so
+tis4p
+5tistica
+ti3tl
+ti4u
+1tiv
+tiv4a
+1tiz
+ti3za
+ti3zen
+2tl
+t5la
+tlan4
+3tle.
+3tled
+3tles.
+t5let.
+t5lo
+4t1m
+tme4
+2t1n2
+1to
+to3b
+to5crat
+4todo
+2tof
+to2gr
+to5ic
+to2ma
+tom4b
+to3my
+ton4ali
+to3nat
+4tono
+4tony
+to2ra
+to3rie
+tor5iz
+tos2
+5tour
+4tout
+to3war
+4t1p
+1tra
+tra3b
+tra5ch
+traci4
+trac4it
+trac4te
+tras4
+tra5ven
+trav5es5
+tre5f
+tre4m
+trem5i
+5tria
+tri5ces
+5tricia
+4trics
+2trim
+tri4v
+tro5mi
+tron5i
+4trony
+tro5phe
+tro3sp
+tro3v
+tru5i
+trus4
+4t1s2
+t4sc
+tsh4
+t4sw
+4t3t2
+t4tes
+t5to
+ttu4
+1tu
+tu1a
+tu3ar
+tu4bi
+tud2
+4tue
+4tuf4
+5tu3i
+3tum
+tu4nis
+2t3up.
+3ture
+5turi
+tur3is
+tur5o
+tu5ry
+3tus
+4tv
+tw4
+4t1wa
+twis4
+4two
+1ty
+4tya
+2tyl
+type3
+ty5ph
+4tz
+tz4e
+4uab
+uac4
+ua5na
+uan4i
+uar5ant
+uar2d
+uar3i
+uar3t
+u1at
+uav4
+ub4e
+u4bel
+u3ber
+u4bero
+u1b4i
+u4b5ing
+u3ble.
+u3ca
+uci4b
+uc4it
+ucle3
+u3cr
+u3cu
+u4cy
+ud5d
+ud3er
+ud5est
+udev4
+u1dic
+ud3ied
+ud3ies
+ud5is
+u5dit
+u4don
+ud4si
+u4du
+u4ene
+uens4
+uen4te
+uer4il
+3ufa
+u3fl
+ugh3en
+ug5in
+2ui2
+uil5iz
+ui4n
+u1ing
+uir4m
+uita4
+uiv3
+uiv4er.
+u5j
+4uk
+u1la
+ula5b
+u5lati
+ulch4
+5ulche
+ul3der
+ul4e
+u1len
+ul4gi
+ul2i
+u5lia
+ul3ing
+ul5ish
+ul4lar
+ul4li4b
+ul4lis
+4ul3m
+u1l4o
+4uls
+uls5es
+ul1ti
+ultra3
+4ultu
+u3lu
+ul5ul
+ul5v
+um5ab
+um4bi
+um4bly
+u1mi
+u4m3ing
+umor5o
+um2p
+unat4
+u2ne
+un4er
+u1ni
+un4im
+u2nin
+un5ish
+uni3v
+un3s4
+un4sw
+unt3ab
+un4ter.
+un4tes
+unu4
+un5y
+un5z
+u4ors
+u5os
+u1ou
+u1pe
+uper5s
+u5pia
+up3ing
+u3pl
+up3p
+upport5
+upt5ib
+uptu4
+u1ra
+4ura.
+u4rag
+u4ras
+ur4be
+urc4
+ur1d
+ure5at
+ur4fer
+ur4fr
+u3rif
+uri4fic
+ur1in
+u3rio
+u1rit
+ur3iz
+ur2l
+url5ing.
+ur4no
+uros4
+ur4pe
+ur4pi
+urs5er
+ur5tes
+ur3the
+urti4
+ur4tie
+u3ru
+2us
+u5sad
+u5san
+us4ap
+usc2
+us3ci
+use5a
+u5sia
+u3sic
+us4lin
+us1p
+us5sl
+us5tere
+us1tr
+u2su
+usur4
+uta4b
+u3tat
+4ute.
+4utel
+4uten
+uten4i
+4u1t2i
+uti5liz
+u3tine
+ut3ing
+ution5a
+u4tis
+5u5tiz
+u4t1l
+ut5of
+uto5g
+uto5matic
+u5ton
+u4tou
+uts4
+u3u
+uu4m
+u1v2
+uxu3
+uz4e
+1va
+5va.
+2v1a4b
+vac5il
+vac3u
+vag4
+va4ge
+va5lie
+val5o
+val1u
+va5mo
+va5niz
+va5pi
+var5ied
+3vat
+4ve.
+4ved
+veg3
+v3el.
+vel3li
+ve4lo
+v4ely
+ven3om
+v5enue
+v4erd
+5vere.
+v4erel
+v3eren
+ver5enc
+v4eres
+ver3ie
+vermi4n
+3verse
+ver3th
+v4e2s
+4ves.
+ves4te
+ve4te
+vet3er
+ve4ty
+vi5ali
+5vian
+5vide.
+5vided
+4v3iden
+5vides
+5vidi
+v3if
+vi5gn
+vik4
+2vil
+5vilit
+v3i3liz
+v1in
+4vi4na
+v2inc
+vin5d
+4ving
+vio3l
+v3io4r
+vi1ou
+vi4p
+vi5ro
+vis3it
+vi3so
+vi3su
+4viti
+vit3r
+4vity
+3viv
+5vo.
+voi4
+3vok
+vo4la
+v5ole
+5volt
+3volv
+vom5i
+vor5ab
+vori4
+vo4ry
+vo4ta
+4votee
+4vv4
+v4y
+w5abl
+2wac
+wa5ger
+wag5o
+wait5
+w5al.
+wam4
+war4t
+was4t
+wa1te
+wa5ver
+w1b
+wea5rie
+weath3
+wed4n
+weet3
+wee5v
+wel4l
+w1er
+west3
+w3ev
+whi4
+wi2
+wil2
+will5in
+win4de
+win4g
+wir4
+3wise
+with3
+wiz5
+w4k
+wl4es
+wl3in
+w4no
+1wo2
+wom1
+wo5ven
+w5p
+wra4
+wri4
+writa4
+w3sh
+ws4l
+ws4pe
+w5s4t
+4wt
+wy4
+x1a
+xac5e
+x4ago
+xam3
+x4ap
+xas5
+x3c2
+x1e
+xe4cuto
+x2ed
+xer4i
+xe5ro
+x1h
+xhi2
+xhil5
+xhu4
+x3i
+xi5a
+xi5c
+xi5di
+x4ime
+xi5miz
+x3o
+x4ob
+x3p
+xpan4d
+xpecto5
+xpe3d
+x1t2
+x3ti
+x1u
+xu3a
+xx4
+y5ac
+3yar4
+y5at
+y1b
+y1c
+y2ce
+yc5er
+y3ch
+ych4e
+ycom4
+ycot4
+y1d
+y5ee
+y1er
+y4erf
+yes4
+ye4t
+y5gi
+4y3h
+y1i
+y3la
+ylla5bl
+y3lo
+y5lu
+ymbol5
+yme4
+ympa3
+yn3chr
+yn5d
+yn5g
+yn5ic
+5ynx
+y1o4
+yo5d
+y4o5g
+yom4
+yo5net
+y4ons
+y4os
+y4ped
+yper5
+yp3i
+y3po
+y4poc
+yp2ta
+y5pu
+yra5m
+yr5ia
+y3ro
+yr4r
+ys4c
+y3s2e
+ys3ica
+ys3io
+3ysis
+y4so
+yss4
+ys1t
+ys3ta
+ysur4
+y3thin
+yt3ic
+y1w
+za1
+z5a2b
+zar2
+4zb
+2ze
+ze4n
+ze4p
+z1er
+ze3ro
+zet4
+2z1i
+z4il
+z4is
+5zl
+4zm
+1zo
+zo4m
+zo5ol
+zte4
+4z1z2
+z4zy
+}
+\hyphenation{ % Do NOT make any alterations to this list! --- DEK
+as-so-ciate
+as-so-ciates
+dec-li-na-tion
+oblig-a-tory
+phil-an-thropic
+present
+presents
+project
+projects
+reci-procity
+re-cog-ni-zance
+ref-or-ma-tion
+ret-ri-bu-tion
+ta-ble
+}
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-fr.pat b/tex/context/base/lang-fr.pat new file mode 100644 index 000000000..374822e74 --- /dev/null +++ b/tex/context/base/lang-fr.pat @@ -0,0 +1,511 @@ +% The FPlain TeX hyphenation tables [NOT TO BE CHANGED IN ANY WAY!]
+\lccode`\'= 39
+\patterns{ % just type <return> if you're not using INITEX
+1ba
+1be
+1bi
+1bo
+1bu
+1by
+4bes.
+1b2l
+4ble.
+4bles.
+1b2r
+4bre.
+4bres.
+1ca
+1ce
+1ci
+1co
+1cu
+1cy
+4ces.
+1c2h
+4che.
+4ches.
+2chb
+2chg
+2chm
+2chn
+2chp
+2chs
+2cht
+2chw
+.ch4
+ch2l
+4chle.
+4chles.
+ch2r
+4chre.
+4chres.
+1c2k
+4cke
+4ckes.
+2ckb
+2ckf
+2ckg
+2ck3h
+2ckp
+2cks
+2ckt
+1c2l
+4cle
+4cles
+1c2r
+4cre.
+4cres.
+1da
+1de
+1di
+1do
+1du
+1dy
+4des.
+d1d2h
+1d2r
+4dre.
+4dres.
+1fa
+1fe
+1fi
+1fo
+1fu
+1fy
+4fes.
+1f2l
+4fle.
+4fles.
+1f2r
+4fre.
+4fres.
+1ga
+1ge
+1gi
+1go
+1gu
+1gy
+4ges
+4gue
+4gues.
+1g2ha
+1g2he
+1g2hi
+1g2ho
+1g2hy
+1g2l
+4gle.
+4gles
+1g2n
+4gne.
+4gnes.
+1g2r
+4gre.
+4gres.
+1ha
+1he
+1hi
+1ho
+1hu
+1hy
+4hes.
+1j
+2jk
+4jes.
+1ka
+1ke
+1ki
+1ko
+1ku
+1ky
+4kes.
+1k2h
+.kh4
+1k2r
+1la
+1le
+1li
+1lo
+1lu
+1ly
+4les.
+1ma
+1me
+1mi
+1mo
+1mu
+1my
+4mes.
+1na
+1ne
+1ni
+1no
+1nu
+1ny
+4nes.
+1pa
+1pi
+1po
+1pu
+1py
+4pes.
+1p2h
+4phe.
+4phes.
+ph2l
+4phles.
+4phles.2phn
+ph2r
+4phre.
+4phres.
+2ohs
+2pht
+.ph4
+1p2l
+4ple.
+4ples.
+1p2r
+4pre.
+4pres.
+1q
+4que.
+4ques.
+1ra
+1re
+1ri
+1ro
+1ru
+1ry
+4res.
+1r2h
+4rhe.
+4rhes.
+1sa
+1se
+1si
+1so
+1su
+1sy
+4ses.
+1s2ch
+4sch.
+2schs
+4sche.
+4sches.
+.sch4
+.sh4
+1s2h
+2shm
+2shr
+2shs
+4she.
+4shes.
+1ta
+1te
+1ti
+1to
+1tu
+1ty
+4tes.
+1t2h
+.th4
+4the.
+4thes.
+2thl
+2thm
+2thn
+th2r
+2ths
+4tre.
+4tres.
+1va
+1ve
+1vi
+1vo
+1vu
+1vy
+4ves.
+1v2r
+4vre.
+4vres.
+1wa
+1xe
+1wi
+1wo
+1wu
+4wes.
+1w2r
+1za
+1ze
+1zi
+1zo
+1zu
+1zy
+4zes.
+'a4
+'e4
+'i4
+'o4
+'u4
+'y4
+2'2
+1d'
+dis2
+fis2
+gis2
+tung2s3
+lis2t
+mis2
+e2s3ch
+i2s3chia
+i2s3chio
+1alcool
+1algi
+i1arthr
+2t3heur
+2r3heur
+2t3houd
+2s3hom
+2r3hydr
+o1ioni
+3ph2tis
+1p2neu
+1p2sych
+1s2caph
+1s2cop
+e2s3cop
+di2s3cop
+1s2lav
+1s2lov
+1s2patia
+1s2perm
+1s2por
+1s2piel
+1s2piros
+1s2tandard
+ois2tas
+pro2s3tt
+1i1s2tat
+1s2tein
+1s2tigm
+ois2tim
+1s2tock
+1s2tomos
+ois2tom
+ois2trad
+ois2tratu
+ois2triction
+1s2troph
+a2s3tro
+apo2s3tr
+u2s3tr
+1s2tructu
+1s2tyle
+.anti1a2
+.anti1e2
+.anti2enne
+.anti1s2
+'anti1a2
+'anti1e2
+'anti2enne
+'anti1s2
+.bi1a2c
+.nbi1au
+.bio1a2
+.bi1u2
+.bi2s1a2
+.ci2s1alp
+co1acc
+co1acqco1a2d
+co1ar
+co1assoc
+co1assur
+co1au
+co1ax
+co1ef
+co1en
+co1ex
+.con4
+.cons4
+co2nurb
+.co1o2
+.co2o3lie
+.di1a2cid
+.di1ald
+.di1a2mi
+.di1a2tomi
+.di1e2n
+.di2s3h
+.dv2s1a2
+.dy2s1i2
+.dv2s1o2
+.dy2s1u2
+.dy2s3
+.en1a2
+'en1a2
+en1i2vr
+.en1o2
+'en1o2
+.eu2ria2
+'eu2ria2
+extra1
+hypera2
+hypere2
+hyperi2
+hypero2
+hypers2
+hyperu2
+hype4d1
+hypo1a2
+hypo1e2
+hypo1i2
+hypo1o2
+hypo1u2
+hypo1s2
+.in1a2
+.in2a3nit
+.in2augur
+.in1e2
+.in2effab
+.inept
+.in2er
+.in2exora
+.in1i2
+.in2i3miti
+.in2i3q
+.in2i3t
+.in1o2
+.in2o3cul
+.in2ond
+.in1s2tab
+.in1u2
+.in2uit
+.in2u3l
+'in1a2
+'in2a3nit
+'in2augur
+'in1e2
+'in2effab
+'in2ept
+'in2ert
+'in2exora
+'in1i2
+'in2i3miti
+'in2i3q
+'in2i3t
+'in1o2
+'in2o3cul
+'in2ond
+'in1s2tab
+'in1u2
+'in2uit
+'in2u3l
+.intera2
+.intere2
+.interi2
+.intero2
+.interu2
+.inters2
+.inte4r3
+'intera2
+'intere2
+'interi2
+'intero2
+'interu2
+'inters2
+'inte4r3
+.ma2lia2dres
+.ma2lia2dro
+.ma2liap
+.ma2lia2v
+.ma2lien
+.ma2l1int
+.ma2lioc
+.ma2lio2d
+.mono1a2
+.mono1e2x
+.mono1i2
+.mono1o2
+.mono1u2
+.mono1s2
+.no2n1obs
+omni1s2
+oxy1a2
+.pa2n1a2f
+.pa2n1a2ra
+.pa2n1is
+.pa2n1o2ph
+.pa2n1opt
+.para1s2
+.pa2ria2che
+.per1a2
+.per1e2
+.per1i2
+.per1u2
+per3h
+.pe4r
+photo1s2
+poly1a2
+pol1ye2
+.pos2t3r
+.postis2
+radio1a2
+.re1s2
+.re2s3cap
+.re2s3cisi
+.re2s3ciso
+.re2s3cou
+.re2s3cri
+.re2s3pect
+.re2s3pir
+.re2s3plend
+.re2s3pons
+.re2s3quil
+.re2s3s
+.re2s3t
+.re3s4tab
+.re3s4tag
+.re3s4tand
+.re3s4tat
+.re3s4tim
+.re3s4tip
+.re3s4toc
+.re3s4top
+.re3s4tr
+.re4s5trein
+.re4s5trict
+.re4s5trin
+.re3s4tu
+.re3s4ty
+sesqui1a2
+.su2b1a2
+sub1s2
+.sub1ur
+supero2
+supers2
+supe4r1
+.su2r1a2
+.su3r2a3t
+.su2r1e2
+.su3r2eau
+.su2r1int
+.su2r1if
+.su2r1ox
+thermo1s2
+tran2s1a2
+tran3s2act
+tran3s2ats
+tran2s3h
+tran2s1o2
+tran2s3p
+tran2s1u2
+.tri1a2c
+.tri1a2n
+.tri1a2t
+po1astre
+vol2tiamp
+}
+\hyphenation{ % Do NOT make any alterations to this list! --- DEK
+}
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex new file mode 100644 index 000000000..f55809e64 --- /dev/null +++ b/tex/context/base/lang-ger.tex @@ -0,0 +1,527 @@ +%D \module
+%D [ file=lang-ger,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Germanic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Danish, Faeroese, Icelandic, Norwegian, Swedish, German, Yiddish
+% Afrikaans, Dutch, English, Flemush, Frisian, Plattdeutsch
+
+\writestatus{loading}{Germanic Languages}
+
+\unprotect
+
+\installlanguage
+ [\s!nl]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!en]
+ [\c!spatiering=\v!ruim,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!start] % always preloaded!
+
+\installlanguage
+ [\s!de]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence={\hbox{--~}},
+ \c!rightsentence={\hbox{~--}},
+ \c!leftsubsentence={--},
+ \c!rightsubsentence={--},
+ \c!leftquote=\lowerleftsingleninequote,
+ \c!rightquote=\upperrightsinglesixquote,
+ \c!leftquotation=\lowerleftdoubleninequote,
+ \c!rightquotation=\upperrightdoublesixquote,
+ \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!da]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!sv]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!af]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!no]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+%D Hey look, some experiment:
+
+\installlanguage
+ [nlx]
+ [\c!spatiering=\v!opelkaar,
+ \c!default=\s!nl,
+ \c!status=\v!stop]
+
+%D For compatibility reasons we also define:
+
+\installlanguage [du] [\s!de]
+
+\let\normaldoublequote="
+
+\startlanguagespecifics[\s!de]
+
+ \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary}
+ \installcompoundcharacter "e {\moveaccent{-.1ex}\"e\midworddiscretionary}
+ \installcompoundcharacter "i {\moveaccent{-.1ex}\"\i\midworddiscretionary}
+ \installcompoundcharacter "o {\moveaccent{-.1ex}\"o\midworddiscretionary}
+ \installcompoundcharacter "u {\moveaccent{-.1ex}\"u\midworddiscretionary}
+ \installcompoundcharacter "s {\SS}
+ \installcompoundcharacter "z {\SS}
+
+ \installcompoundcharacter "A {\smashaccent\"A}
+ \installcompoundcharacter "E {\smashaccent\"E}
+ \installcompoundcharacter "I {\smashaccent\"I}
+ \installcompoundcharacter "O {\smashaccent\"O}
+ \installcompoundcharacter "U {\smashaccent\"U}
+ \installcompoundcharacter "Z {SZ}
+ \installcompoundcharacter "S {SS}
+
+\stoplanguagespecifics
+
+\startlanguagespecifics[\s!de]
+
+ \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}}
+ \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}}
+ \installcompoundcharacter "ll {\discretionary{ll-}{l}{ll}}
+ \installcompoundcharacter "mm {\discretionary{mm-}{m}{mm}}
+ \installcompoundcharacter "nn {\discretionary{nn-}{n}{nn}}
+ \installcompoundcharacter "pp {\discretionary{pp-}{p}{pp}}
+ \installcompoundcharacter "rr {\discretionary{rr-}{r}{rr}}
+ \installcompoundcharacter "tt {\discretionary{tt-}{t}{tt}}
+
+ \installcompoundcharacter "CK {\discretionary {K-}{K}{CK}}
+ \installcompoundcharacter "FF {\discretionary{FF-}{F}{FF}}
+ \installcompoundcharacter "LL {\discretionary{LL-}{L}{LL}}
+ \installcompoundcharacter "MM {\discretionary{MM-}{M}{MM}}
+ \installcompoundcharacter "NN {\discretionary{NN-}{N}{NN}}
+ \installcompoundcharacter "PP {\discretionary{PP-}{P}{PP}}
+ \installcompoundcharacter "RR {\discretionary{RR-}{R}{RR}}
+ \installcompoundcharacter "TT {\discretionary{TT-}{T}{TT}}
+
+\stoplanguagespecifics
+
+\startlanguagespecifics[\s!de]
+
+ \installcompoundcharacter "` {\handlequotation\c!leftquotation}
+ \installcompoundcharacter "' {\handlequotation\c!rightquotation}
+ \installcompoundcharacter ". {\kern.1em\ignorespaces}
+
+ \def\setupDElanguage%
+ {\setuplanguage
+ [\s!de]
+ [\c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\leftsubguillemot,
+ \c!rightsubsentence=\rightsubguillemot]}
+
+ \installcompoundcharacter "< {{\setupDElanguage|<|}}
+ \installcompoundcharacter "> {{\setupDElanguage|>|}}
+
+\stoplanguagespecifics
+
+\setupheadtext [\s!en] [\v!inhoud=Contents]
+\setupheadtext [\s!nl] [\v!inhoud=Inhoud]
+\setupheadtext [\s!de] [\v!inhoud=Inhalt]
+\setupheadtext [\s!da] [\v!inhoud=Indhold]
+\setupheadtext [\s!sv] [\v!inhoud=Inneh\aa l]
+\setupheadtext [\s!af] [\v!inhoud=Inhoud]
+\setupheadtext [\s!no] [\v!inhoud=Innhold]
+
+\setupheadtext [\s!en] [\v!tabellen=Tables]
+\setupheadtext [\s!nl] [\v!tabellen=Tabellen]
+\setupheadtext [\s!de] [\v!tabellen=Tabellen]
+\setupheadtext [\s!da] [\v!tabellen=Tablen]
+\setupheadtext [\s!sv] [\v!tabellen=Tabellen]
+\setupheadtext [\s!af] [\v!tabellen=Tabellen]
+\setupheadtext [\s!no] [\v!tabellen=Tabellen]
+
+\setupheadtext [\s!en] [\v!figuren=Figures]
+\setupheadtext [\s!nl] [\v!figuren=Figuren]
+\setupheadtext [\s!de] [\v!figuren=Abbildungen]
+\setupheadtext [\s!da] [\v!figuren=Figuren]
+\setupheadtext [\s!sv] [\v!figuren=Figuren]
+\setupheadtext [\s!af] [\v!figuren=Afbeeldingen]
+\setupheadtext [\s!no] [\v!figuren=Avbildningen]
+
+\setupheadtext [\s!en] [\v!grafieken=Graphics]
+\setupheadtext [\s!nl] [\v!grafieken=Grafieken]
+\setupheadtext [\s!de] [\v!grafieken=Graphiken]
+\setupheadtext [\s!da] [\v!grafieken=Grafiken]
+\setupheadtext [\s!sv] [\v!grafieken=Grafiskt]
+\setupheadtext [\s!af] [\v!grafieken=Grafieken]
+\setupheadtext [\s!no] [\v!grafieken=Grafikken]
+
+\setupheadtext [\s!en] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!nl] [\v!intermezzos=Intermezzo's]
+\setupheadtext [\s!de] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!da] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!sv] [\v!intermezzos=Intermezzot]
+\setupheadtext [\s!af] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!no] [\v!intermezzos=Intermezzos]
+
+\setupheadtext [\s!en] [\v!index=Index]
+\setupheadtext [\s!nl] [\v!index=Index]
+\setupheadtext [\s!de] [\v!index=Index]
+\setupheadtext [\s!da] [\v!index=Indeks]
+\setupheadtext [\s!sv] [\v!index=Index]
+\setupheadtext [\s!af] [\v!index=Indeks]
+\setupheadtext [\s!no] [\v!index=Indeks]
+
+\setupheadtext [\s!en] [\v!afkortingen=Abbreviations]
+\setupheadtext [\s!nl] [\v!afkortingen=Afkortingen]
+\setupheadtext [\s!de] [\v!afkortingen=Abk\"urzungen]
+\setupheadtext [\s!da] [\v!afkortingen=Abbreviations]
+\setupheadtext [\s!sv] [\v!afkortingen=F\"orkortningen]
+\setupheadtext [\s!af] [\v!afkortingen=Afkortingen]
+\setupheadtext [\s!no] [\v!afkortingen=Forkortelsen]
+
+\setupheadtext [\s!en] [\v!logos=Logos]
+\setupheadtext [\s!nl] [\v!logos=Logo's]
+\setupheadtext [\s!de] [\v!logos=Logos]
+\setupheadtext [\s!da] [\v!logos=Logos]
+\setupheadtext [\s!sv] [\v!logos=Logo]
+\setupheadtext [\s!af] [\v!logos=Logos]
+\setupheadtext [\s!no] [\v!logos=Logos]
+
+\setupheadtext [\s!en] [\v!eenheden=Units]
+\setupheadtext [\s!nl] [\v!eenheden=Eenheden]
+\setupheadtext [\s!de] [\v!eenheden=Einheiten]
+\setupheadtext [\s!da] [\v!eenheden=Enheden]
+\setupheadtext [\s!sv] [\v!eenheden=Enheten]
+\setupheadtext [\s!af] [\v!eenheden=Eenheiden]
+\setupheadtext [\s!no] [\v!eenheden=Enheten]
+
+\setuplabeltext [\s!en] [\v!tabel=Table ]
+\setuplabeltext [\s!nl] [\v!tabel=Tabel ]
+\setuplabeltext [\s!de] [\v!tabel=Tabelle ]
+\setuplabeltext [\s!da] [\v!tabel=Tabel ]
+\setuplabeltext [\s!sv] [\v!tabel=Tabell ]
+\setuplabeltext [\s!af] [\v!tabel=Tabel]
+\setuplabeltext [\s!no] [\v!tabel=Tabell ]
+
+\setuplabeltext [\s!en] [\v!figuur=Figure ]
+\setuplabeltext [\s!nl] [\v!figuur=Figuur ]
+\setuplabeltext [\s!de] [\v!figuur=Abbildung ]
+\setuplabeltext [\s!da] [\v!figuur=Figur ]
+\setuplabeltext [\s!sv] [\v!figuur=Figur ]
+\setuplabeltext [\s!af] [\v!figuur=Afbeelding ]
+\setuplabeltext [\s!no] [\v!figuur=Avbildning ]
+
+\setuplabeltext [\s!en] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!nl] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!de] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!da] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!sv] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!af] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!no] [\v!intermezzo=Intermezzo ]
+
+\setuplabeltext [\s!en] [\v!grafiek=Graphic ]
+\setuplabeltext [\s!nl] [\v!grafiek=Grafiek ]
+\setuplabeltext [\s!de] [\v!grafiek=Graphik ]
+\setuplabeltext [\s!da] [\v!grafiek=Grafik ]
+\setuplabeltext [\s!sv] [\v!grafiek=Grafisk ]
+\setuplabeltext [\s!af] [\v!grafiek=Grafiek ]
+\setuplabeltext [\s!no] [\v!grafiek=Grafikk ]
+
+\setuplabeltext [\s!en] [\v!hoofdstuk=]
+\setuplabeltext [\s!nl] [\v!hoofdstuk=]
+\setuplabeltext [\s!de] [\v!hoofdstuk=]
+\setuplabeltext [\s!da] [\v!hoofdstuk=]
+\setuplabeltext [\s!sv] [\v!hoofdstuk=]
+\setuplabeltext [\s!af] [\v!hoofdstuk=]
+\setuplabeltext [\s!no] [\v!hoofdstuk=]
+
+\setuplabeltext [\s!en] [\v!paragraaf=]
+\setuplabeltext [\s!nl] [\v!paragraaf=]
+\setuplabeltext [\s!de] [\v!paragraaf=]
+\setuplabeltext [\s!da] [\v!paragraaf=]
+\setuplabeltext [\s!sv] [\v!paragraaf=]
+\setuplabeltext [\s!af] [\v!paragraaf=]
+\setuplabeltext [\s!no] [\v!paragraaf=]
+
+\setuplabeltext [\s!en] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!nl] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!de] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!da] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sv] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!af] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!no] [\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!en] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!nl] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!de] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!da] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sv] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!af] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!no] [\v!sub\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!en] [\v!bijlage=]
+\setuplabeltext [\s!nl] [\v!bijlage=]
+\setuplabeltext [\s!de] [\v!bijlage=]
+\setuplabeltext [\s!da] [\v!bijlage=]
+\setuplabeltext [\s!sv] [\v!bijlage=]
+\setuplabeltext [\s!af] [\v!bijlage=]
+\setuplabeltext [\s!no] [\v!bijlage=]
+
+\setuplabeltext [\s!en] [\v!deel=Part ]
+\setuplabeltext [\s!nl] [\v!deel=Deel ]
+\setuplabeltext [\s!de] [\v!deel=Teil ]
+\setuplabeltext [\s!da] [\v!deel=Del ]
+\setuplabeltext [\s!sv] [\v!deel=Del ]
+\setuplabeltext [\s!af] [\v!deel=Deel ]
+\setuplabeltext [\s!no] [\v!deel=Del ]
+
+\setuplabeltext [\s!en] [\v!regel=line]
+\setuplabeltext [\s!nl] [\v!regel=regel]
+\setuplabeltext [\s!de] [\v!regel=Zeile]
+\setuplabeltext [\s!da] [\v!regel=linie]
+\setuplabeltext [\s!sv] [\v!regel=rad]
+\setuplabeltext [\s!af] [\v!regel=re\"el]
+\setuplabeltext [\s!no] [\v!regel=linje]
+
+\setuplabeltext [\s!en] [\v!regels=lines]
+\setuplabeltext [\s!nl] [\v!regels=regels]
+\setuplabeltext [\s!de] [\v!regels=Zeilen]
+\setuplabeltext [\s!da] [\v!regels=linien]
+\setuplabeltext [\s!sv] [\v!regels=raden]
+\setuplabeltext [\s!af] [\v!regels=re\"elen]
+\setuplabeltext [\s!no] [\v!regels=linjen]
+
+\setuplabeltext [\s!en] [\v!january=January]
+\setuplabeltext [\s!en] [\v!february=February]
+\setuplabeltext [\s!en] [\v!march=March]
+\setuplabeltext [\s!en] [\v!april=April]
+\setuplabeltext [\s!en] [\v!may=May]
+\setuplabeltext [\s!en] [\v!june=June]
+\setuplabeltext [\s!en] [\v!july=July]
+\setuplabeltext [\s!en] [\v!august=August]
+\setuplabeltext [\s!en] [\v!september=September]
+\setuplabeltext [\s!en] [\v!october=October]
+\setuplabeltext [\s!en] [\v!november=November]
+\setuplabeltext [\s!en] [\v!december=December]
+
+\setuplabeltext [\s!nl] [\v!january=januari]
+\setuplabeltext [\s!nl] [\v!february=februari]
+\setuplabeltext [\s!nl] [\v!march=maart]
+\setuplabeltext [\s!nl] [\v!april=april]
+\setuplabeltext [\s!nl] [\v!may=mei]
+\setuplabeltext [\s!nl] [\v!june=juni]
+\setuplabeltext [\s!nl] [\v!july=juli]
+\setuplabeltext [\s!nl] [\v!august=augustus]
+\setuplabeltext [\s!nl] [\v!september=september]
+\setuplabeltext [\s!nl] [\v!october=oktober]
+\setuplabeltext [\s!nl] [\v!november=november]
+\setuplabeltext [\s!nl] [\v!december=december]
+
+\setuplabeltext [\s!de] [\v!january=Januar]
+\setuplabeltext [\s!de] [\v!february=Februar]
+\setuplabeltext [\s!de] [\v!march=M\"arz]
+\setuplabeltext [\s!de] [\v!april=April]
+\setuplabeltext [\s!de] [\v!may=Mai]
+\setuplabeltext [\s!de] [\v!june=Juni]
+\setuplabeltext [\s!de] [\v!july=Juli]
+\setuplabeltext [\s!de] [\v!august=August]
+\setuplabeltext [\s!de] [\v!september=September]
+\setuplabeltext [\s!de] [\v!october=Oktober]
+\setuplabeltext [\s!de] [\v!november=November]
+\setuplabeltext [\s!de] [\v!december=Dezember]
+
+\setuplabeltext [\s!da] [\v!january=januar]
+\setuplabeltext [\s!da] [\v!february=februar]
+\setuplabeltext [\s!da] [\v!march=marts]
+\setuplabeltext [\s!da] [\v!april=april]
+\setuplabeltext [\s!da] [\v!may=maj]
+\setuplabeltext [\s!da] [\v!june=juni]
+\setuplabeltext [\s!da] [\v!july=juli]
+\setuplabeltext [\s!da] [\v!august=august]
+\setuplabeltext [\s!da] [\v!september=september]
+\setuplabeltext [\s!da] [\v!october=oktober]
+\setuplabeltext [\s!da] [\v!november=november]
+\setuplabeltext [\s!da] [\v!december=december]
+
+\setuplabeltext [\s!sv] [\v!january=januari]
+\setuplabeltext [\s!sv] [\v!february=februari]
+\setuplabeltext [\s!sv] [\v!march=mars]
+\setuplabeltext [\s!sv] [\v!april=april]
+\setuplabeltext [\s!sv] [\v!may=maj]
+\setuplabeltext [\s!sv] [\v!june=juni]
+\setuplabeltext [\s!sv] [\v!july=juli]
+\setuplabeltext [\s!sv] [\v!august=augusti]
+\setuplabeltext [\s!sv] [\v!september=september]
+\setuplabeltext [\s!sv] [\v!october=oktober]
+\setuplabeltext [\s!sv] [\v!november=november]
+\setuplabeltext [\s!sv] [\v!december=december]
+
+\setuplabeltext [\s!af] [\v!january=januarie]
+\setuplabeltext [\s!af] [\v!february=februarie]
+\setuplabeltext [\s!af] [\v!march=maart]
+\setuplabeltext [\s!af] [\v!april=april]
+\setuplabeltext [\s!af] [\v!may=mei]
+\setuplabeltext [\s!af] [\v!june=junie]
+\setuplabeltext [\s!af] [\v!july=julie]
+\setuplabeltext [\s!af] [\v!august=augustus]
+\setuplabeltext [\s!af] [\v!september=september]
+\setuplabeltext [\s!af] [\v!october=oktober]
+\setuplabeltext [\s!af] [\v!november=november]
+\setuplabeltext [\s!af] [\v!december=desember]
+
+\setuplabeltext [\s!no] [\v!january=januar]
+\setuplabeltext [\s!no] [\v!february=februae]
+\setuplabeltext [\s!no] [\v!march=mars]
+\setuplabeltext [\s!no] [\v!april=april]
+\setuplabeltext [\s!no] [\v!may=mai]
+\setuplabeltext [\s!no] [\v!june=juni]
+\setuplabeltext [\s!no] [\v!july=juli]
+\setuplabeltext [\s!no] [\v!august=august]
+\setuplabeltext [\s!no] [\v!september=september]
+\setuplabeltext [\s!no] [\v!october=oktober]
+\setuplabeltext [\s!no] [\v!november=november]
+\setuplabeltext [\s!no] [\v!december=desember]
+
+\setuplabeltext [\s!en] [\v!sunday=Sunday]
+\setuplabeltext [\s!en] [\v!monday=Monday]
+\setuplabeltext [\s!en] [\v!tuesday=Tuesday]
+\setuplabeltext [\s!en] [\v!wednesday=Wednesday]
+\setuplabeltext [\s!en] [\v!thursday=Thursday]
+\setuplabeltext [\s!en] [\v!friday=Friday]
+\setuplabeltext [\s!en] [\v!saturday=Saturday]
+
+\setuplabeltext [\s!nl] [\v!sunday=zondag]
+\setuplabeltext [\s!nl] [\v!monday=maandag]
+\setuplabeltext [\s!nl] [\v!tuesday=dinsdag]
+\setuplabeltext [\s!nl] [\v!wednesday=woensdag]
+\setuplabeltext [\s!nl] [\v!thursday=donderdag]
+\setuplabeltext [\s!nl] [\v!friday=vrijdag]
+\setuplabeltext [\s!nl] [\v!saturday=zaterdag]
+
+\setuplabeltext [\s!de] [\v!sunday=Sonntag]
+\setuplabeltext [\s!de] [\v!monday=Montag]
+\setuplabeltext [\s!de] [\v!tuesday=Dienstag]
+\setuplabeltext [\s!de] [\v!wednesday=Mittwoch]
+\setuplabeltext [\s!de] [\v!thursday=Donnerstag]
+\setuplabeltext [\s!de] [\v!friday=Freitag]
+\setuplabeltext [\s!de] [\v!saturday=Samstag]
+
+\setuplabeltext [\s!da] [\v!sunday=s\o ndag]
+\setuplabeltext [\s!da] [\v!monday=mandag]
+\setuplabeltext [\s!da] [\v!tuesday=tirsdag]
+\setuplabeltext [\s!da] [\v!wednesday=onsdag]
+\setuplabeltext [\s!da] [\v!thursday=torsdag]
+\setuplabeltext [\s!da] [\v!friday=fredag]
+\setuplabeltext [\s!da] [\v!saturday=l\o rdag]
+
+\setuplabeltext [\s!sv] [\v!sunday=s\"ondag]
+\setuplabeltext [\s!sv] [\v!monday=m\aa ndag]
+\setuplabeltext [\s!sv] [\v!tuesday=tisdag]
+\setuplabeltext [\s!sv] [\v!wednesday=onsdag]
+\setuplabeltext [\s!sv] [\v!thursday=torsdag]
+\setuplabeltext [\s!sv] [\v!friday=fredag]
+\setuplabeltext [\s!sv] [\v!saturday=l\"ordag]
+
+\setuplabeltext [\s!af] [\v!sunday=sondag]
+\setuplabeltext [\s!af] [\v!monday=maandag]
+\setuplabeltext [\s!af] [\v!tuesday=dinsdag]
+\setuplabeltext [\s!af] [\v!wednesday=woensdag]
+\setuplabeltext [\s!af] [\v!thursday=donderdag]
+\setuplabeltext [\s!af] [\v!friday=vrydag]
+\setuplabeltext [\s!af] [\v!saturday=saterdag]
+
+\setuplabeltext [\s!no] [\v!sunday=s\o ndag]
+\setuplabeltext [\s!no] [\v!monday=mandag]
+\setuplabeltext [\s!no] [\v!tuesday=tirsdag]
+\setuplabeltext [\s!no] [\v!wednesday=onsdag]
+\setuplabeltext [\s!no] [\v!thursday=torsdag]
+\setuplabeltext [\s!no] [\v!friday=fredag]
+\setuplabeltext [\s!no] [\v!saturday=l\o rdag]
+
+%D \ShowAllLanguageValues [\s!en] [english] engelse humor
+%D \ShowAllLanguageValues [\s!nl] [dutch] nederlandse zuinigheid
+%D \ShowAllLanguageValues [\s!de] [german] duitse degelijkheid
+%D \ShowAllLanguageValues [\s!da] [danish] deense ...
+%D \ShowAllLanguageValues [\s!sv] [swedish] zweedse ...
+%D \ShowAllLanguageValues [\s!af] [afrikaans] afrikaanse ...
+%D \ShowAllLanguageValues [\s!no] [norwegian] noorse ...
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex new file mode 100644 index 000000000..51590dd06 --- /dev/null +++ b/tex/context/base/lang-grk.tex @@ -0,0 +1,23 @@ +%D \module
+%D [ file=lang-grk,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Greek Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Modern Greek
+
+\writestatus{loading}{Greek Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-hnl.tex b/tex/context/base/lang-hnl.tex new file mode 100644 index 000000000..32317499f --- /dev/null +++ b/tex/context/base/lang-hnl.tex @@ -0,0 +1,33 @@ +%I n=Afbreekregels
+%I c=\taal,\vertaal
+%I
+%I Er kunnen verschillende afbreekregels worden gehanteerd.
+%I Deze worden ingesteld met het commando:
+%I
+%I \taal[taal]
+%I
+%I waarbij voor taal kan worden ingevuld:
+%I
+%I nl nederlands
+%I en engels
+%I du duits
+%I fa frans
+%I
+%I Er zijn ook verkorte commando's beschikbaar:
+%I
+%I \nl \en \du \fa
+%P
+%I Er kan automatisch van taal gewisseld worden met het
+%I commando:
+%I
+%I \vertaal[nl=,en=,nl=,fa=,...]
+%I
+%I Afhankelijk van de actuele taal, wordt de toegekende tekst
+%I gezet: \en this is an \vertaal[nl=voorbeeld,en=example],
+%I \nl of in goed nederlands: een \vertaal.
+%I
+%I Als niets wordt meegegeven, dan wordt de laatst opgegeven
+%I waarde gebruikt.
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-ind.tex b/tex/context/base/lang-ind.tex new file mode 100644 index 000000000..29df64cae --- /dev/null +++ b/tex/context/base/lang-ind.tex @@ -0,0 +1,23 @@ +%D \module
+%D [ file=lang-ind,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Indo||Iranian Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% 34 languages
+
+\writestatus{loading}{Indo-Iranian Languages}
+
+\unprotect
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex new file mode 100644 index 000000000..0609e6620 --- /dev/null +++ b/tex/context/base/lang-ini.tex @@ -0,0 +1,509 @@ +%D \module
+%D [ file=lang-ini,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D This module implements the (for the moment still simple)
+%D multi||language support of \CONTEXT, which should not be
+%D confused with the multi||lingual interface. This support
+%D will be extended when needed.
+
+\writestatus{loading}{Context Language Macros / Initialization}
+
+\unprotect
+
+\startmessages dutch library: linguals
+ title: taal
+ 1: afbreekpatronen voor -- geladen
+ 2: geen afbreekpatronen voor --
+ 3: afbreekdefinities voor -- geladen
+ 4: geen afbreekdefinities voor --
+ 5: afbreekpatronen voor -- niet geladen
+ 6: taal -- is niet gedefinieerd
+ 7: taal specifieke opties [--] introduceren een skip van --
+ 8: taal specifieke opties [--] naadloos toegevoegd
+\stopmessages
+
+\startmessages english library: linguals
+ title: language
+ 1: patterns for -- loaded
+ 2: no patterns for --
+ 3: hyphenations for -- loaded
+ 4: no hyphenations for --
+ 5: patterns for -- not loaded
+ 6: language -- is undefined
+ 7: language specific options [--] introduce a -- skip
+ 8: language specific options [--] seamless appended
+\stopmessages
+
+\startmessages german library: linguals
+ title: Sprache
+ 1: Trennmuster fuer -- geladen
+ 2: Keine Trennmuster fuer --
+ 3: Trenndefinitionen fuer -- geladen
+ 4: Keine Trenndefinitionen fuer --
+ 5: Trennmuster fuer -- nicht geladen
+ 6: Sprache -- ist undefiniert
+ 7: Sprachenspezifische Option [--] fuegt eine Luecke von -- ein
+ 8: Sprachenspezifische Option [--] nahtlos hinzugefuegt
+\stopmessages
+
+% dutch : \lccode`\'=`\'
+% english : \lccode`\'=0
+% german : \lccode`\'=`\'
+% french : \lccode`\'=`\'
+
+%D When loading hyphenation patterns, \TEX\ assign a number to
+%D each loaded table, starting with~0. Switching to a specific
+%D table is done by assigning the relevant number to the
+%D predefined \COUNTER\ \type{\language}. Unfortunately the
+%D name of this command suits very well the name of the
+%D language switching command we are to define, so let's save
+%D this primitive under another name:
+
+\let\normallanguage = \language
+
+%D We keep track of the last loaded patterns by means of a
+%D pseudo \COUNTER. This just one of those situations in which
+%D we don't want to spent a real one.
+
+\newcounter\loadedlanguage
+
+%D \macros
+%D {currentlanguage}
+%D {}
+%D
+%D Instead of numbers,we are going to use symbolic names for
+%D the languages. The current langage is saved in the macro
+%D \type{\currentlanguage}.
+
+\let\currentlanguage = \empty
+
+%D \macros
+%D {installlanguage}
+%D {}
+%D
+%D Hyphenation patterns can only be loaded when the format file
+%D is prepared. The next macro takes care of this loading. A
+%D language is specified with
+%D
+%D \showsetup{\y!installlanguage}
+%D
+%D When \type{\c!status} equals \type{\v!start}, both patterns
+%D and additional hyphenation specifications are loaded. These
+%D files are seached for on the system path and are to be
+%D named:
+%D
+%D \starttypen
+%D \f!languageprefix-identifier.\f!patternsextension
+%D \f!languageprefix-identifier.\f!hyhensextension
+%D \stoptypen
+%D
+%D The \type{\c!spatiering} specifies how the spaces after
+%D punctuation has to be handled. English is by tradition more
+%D tolerant to inter||sentence spacing than other languages.
+%D
+%D This macro also defines \type{\identifier} as a shortcut
+%D switch to the language. Furthermore the command defined as
+%D being language specific, are executed. With
+%D \type{\c!default} we can default to another language
+%D (patterns) at format generation time. This default language
+%D is overruled when the appropriate patterns are loaded (some
+%D implementations support run time addition of patterns to a
+%D preloaded format).
+
+\def\dodoinstalllanguage#1%
+ {\doifundefined{#1}{\setvalue{#1}{\language[#1]}}%
+ \expanded{\noexpand\uppercase{\noexpand\edef\noexpand\ascii{#1}}}%
+ \doifundefined{\ascii}{\setvalue{\ascii}{\language[#1]}}}
+
+\def\doinstalllanguage[#1][#2]%
+ {\doifinstringelse{=}{#2}
+ {\doifdefinedelse{\??la#1\c!nummer}%
+ {\getparameters[\??la#1][#2]}
+ {\setvalue{\l!prefix!#1}{#1}%
+ \setevalue{\??la#1\c!nummer}{\loadedlanguage}%
+ \increment\loadedlanguage
+ \dodoinstalllanguage{#1}%
+ \getparameters
+ [\??la#1]
+ [\s!lefthyphenmin=2,
+ \s!righthyphenmin=2,
+ \c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!status=\v!stop,
+ \s!done=\v!nee,
+ \c!default=#1,
+ #2]}%
+ \language=\getvalue{\??la#1\c!nummer}\relax
+ \doifelsevalue{\??la#1\c!status}{\v!start}
+ {\doifelsevalue{\??la#1\s!done}{\v!nee}
+ {\readsysfile{\f!languageprefix#1.\f!patternsextension}
+ {\getparameters[\??la#1][\s!done=\v!ja,\c!default=#1]%
+ \showmessage{\m!linguals}{1}{#1}}
+ {\showmessage{\m!linguals}{2}{#1}}%
+ \readsysfile{\f!languageprefix#1.\f!hyphensextension}
+ {\showmessage{\m!linguals}{3}{#1}}
+ {\showmessage{\m!linguals}{4}{#1}}}
+ {\showmessage{\m!linguals}{1}{#1}%
+ \showmessage{\m!linguals}{3}{#1}}}
+ {\showmessage{\m!linguals}{5}{#1}}}
+ {\setvalue{\l!prefix!#1}{#2}%
+ \dodoinstalllanguage{#1}}%
+ }% \language[#1]} gave unwanted side effect of loading language specifics
+
+\def\installlanguage%
+ {\dodoubleargument\doinstalllanguage}
+
+%D When the second argument is a language identifier, a
+%D synonym is created. This feature is present because we
+%D used dutch mnemonics in the dutch version, but nowadays
+%D conform a standard.
+
+%D \macros
+%D {setuplanguage}
+%D
+%D Quick and dirty, but useful:
+%D
+%D \showsetup{\y!setuplanguage}
+
+\def\setuplanguage[#1]%
+ {\dodoubleargument\getparameters[\??la#1]}
+
+%D The values \type {\c!leftsentence} and \type
+%D {\c!rightsentence} can be (and are) used to implement
+%D automatic subsentence boundary glyphs, like in {\fr
+%D |<|french guillemots|>|} or {\de |<|german guillemots|>|} or
+%D {\nl |<|dutch dashes|>|} like situations. Furthermore \type
+%D {\c!leftquotation} and \type {\c!leftquote} come into view
+%D \citaat {when we quote} or \citeer {quote} something.
+
+%D \macros
+%D {currentdatespecification}
+%D
+%D Just to make things easy we can ask for the current date
+%D specification by saying:
+
+\def\currentdatespecification%
+ {\getvalue{\??la\currentlanguage\c!datum}}
+
+%D This scommand is not meant for users.
+
+%D Carefull reading of these macros shows that it's legal to
+%D say
+%D
+%D \starttypen
+%D \installlanguage [du ] [de]
+%D \stoptypen
+
+%D \macros
+%D {language,mainlanguage}
+%D {}
+%D
+%D Switching to another language (actually another hyphenation
+%D pattern) is done with:
+%D
+%D \starttypen
+%D \language[identifier]
+%D \stoptypen
+%D
+%D or with \type{\identifier}. Just to be compatible with
+%D \PLAIN\ \TEX, we still support the original meaning, so
+%D
+%D \starttypen
+%D \language=1
+%D \stoptypen
+%D
+%D is a valid operation.
+%D
+%D \showsetup{\y!language}
+%D \showsetup{\y!mainlanguage}
+%D
+%D Both commands take a predefined language identifier as
+%D argument. We can use \type{\mainlanguage[identifier]} for
+%D setting the (indeed) main language. This is the language
+%D used for translating labels like {\em figure} and {\em
+%D table}. The main language defaults to the current language.
+%D
+%D We take care of local as well as standardized language
+%D switching (fr and fa, de and du, but nl and nl).
+
+\def\docomplexlanguage[#1]%
+ {\processaction
+ [\getvalue{\??la#1\c!default}]
+ [ #1=>\normallanguage=\getvalue{\??la#1\c!nummer},
+ \s!default=>\normallanguage=\getvalue{\??la#1\c!nummer},
+ \s!unknown=>\expanded{\language[\getvalue{\??la#1\c!default}]}]%
+ \edef\currentlanguage{#1}%
+ \enablelanguagespecifics[#1]%
+ \lefthyphenmin =0\getvalue{\??la#1\s!lefthyphenmin}\relax
+ \righthyphenmin=0\getvalue{\??la#1\s!righthyphenmin}\relax
+ \processaction
+ [\getvalue{\??la#1\c!spatiering}]
+ [\v!opelkaar=>\frenchspacing,
+ \v!ruim=>\nonfrenchspacing,
+ \s!unknown=>\frenchspacing]}
+
+\def\complexlanguage[#1]%
+ {\doifdefinedelse{\l!prefix!#1}
+ {\expanded{\docomplexlanguage[\getvalue{\l!prefix!#1}]}}
+ {\showmessage{\m!linguals}{6}{#1}}}
+
+\def\simplelanguage%
+ {\normallanguage}
+
+\definecomplexorsimple\language
+
+\let\currentmainlanguage=\empty
+
+\def\mainlanguage[#1]%
+ {\edef\currentmainlanguage{#1}} % We expand indeed!
+
+%D \macros
+%D {startlanguagespecifics,enablelanguagespecifics}
+%D {}
+%D
+%D Each language has its own typographic pecularities. Some of
+%D those can be influenced by parameters, others are handled by
+%D the interface, but as soon as specific commands come into
+%D view we need another mechanism. In the macro that activates
+%D a language, we call \type{\enablelanguagespecifics}. This
+%D macro in return calls for the setup of language specific
+%D macros. Such specifics are defined as:
+%D
+%D \starttypen
+%D \startlanguagespecifics[de]
+%D \installcompoundcharacter "a {\"a}
+%D \installcompoundcharacter "e {\"e}
+%D \installcompoundcharacter "s {\SS}
+%D \stoplanguagespecifics
+%D \stoptypen
+%D
+%D Instead of \type{[du]} we can pass a comma separated
+%D list, like \type{[du,nl]}. Next calls to this macro add the
+%D specifics to the current list.
+%D
+%D Before we actually read the specifics, we first take some
+%D precautions that will prevent spurious spaces to creep into
+%D the list.
+
+\def\startlanguagespecifics%
+ {\bgroup
+ \catcode`\^^I=\@@ignore
+ \catcode`\^^M=\@@ignore
+ \catcode`\^^L=\@@ignore
+ \dostartlanguagespecifics}
+
+%D The main macro looks quite complicated but actually does
+%D nothing special. By embedding \type{\do} we can easily
+%D append to the lists and also execute them at will. Just to
+%D be sure, we check on spurious spaces.
+
+\long\def\dostartlanguagespecifics[#1]#2\stoplanguagespecifics%
+ {\egroup
+ \long\def\docommando##1%
+ {\doifdefinedelse{\??la##1\??la}
+ {\long\def\do####1####2####3%
+ {\setvalue{\??la####1\??la}{\do{####1}{####2####3}}}%
+ \getvalue{\??la##1\??la}{#2}}
+ {\setvalue{\??la##1\??la}{\do{##1}{#2}}}%
+ \bgroup
+ \setbox0=\hbox{\enablelanguagespecifics[##1]}%
+ \ifdim\wd0>\!!zeropoint
+ \showmessage{\m!linguals}{7}{##1,\the\wd0\space}\wait
+ \else
+ \showmessage{\m!linguals}{8}{##1}%
+ \fi
+ \egroup}%
+ \processcommalist[#1]\docommando}
+
+%D Enabling them is rather straightforward. We only have to
+%D define \type{\do} in such a way that \type{{ }} is removed
+%D and the language key is gobbled.
+
+\def\enablelanguagespecifics[#1]%
+ {\long\def\do##1##2{##2}%
+ \getvalue{\??la#1\??la}}
+
+%D \macros
+%D {leftguillemot,rightguillemot,leftsubguillemot,rightsubguillemot,
+%D ...single...quote,...double...quote}
+%D {}
+%D
+%D We assign logical names to all kind of quote and sentence
+%D boundary characters.
+
+\def\lowerleftsingleninequote {\char44 }
+\def\lowerleftdoubleninequote {\char44\kern-.1em\char44 }
+\def\upperleftsingleninequote {\char39 }
+\def\upperleftdoubleninequote {\char34\kern-.1em}
+\def\upperleftsinglesixquote {\char96 }
+\def\upperleftdoublesixquote {\char96\kern-.1em\char96 }
+
+\def\lowerrightsingleninequote {\char44 }
+\def\lowerrightdoubleninequote {\char44\kern-.1em\char44 }
+\def\upperrightsingleninequote {\char39 }
+\def\upperrightdoubleninequote {\char34 }
+\def\upperrightsinglesixquote {\char96 }
+\def\upperrightdoublesixquote {\kern-.125em\char92 }
+
+\unexpanded\def\leftguillemot%
+ {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
+
+\unexpanded\def\rightguillemot%
+ {\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}
+
+\unexpanded\def\leftsubguillemot%
+ {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle<$}}}
+
+\unexpanded\def\rightsubguillemot%
+ {\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
+
+%D Just like with subsentence boundary symbols, quotes
+%D placement depends on the current language, therefore we show
+%D the defaults here.
+%D
+%D \def\ShowLanguageValues [#1] [#2] #3 #4
+%D {\blanko
+%D \startregelcorrectie
+%D \vbox\bgroup
+%D \language[#1]%
+%D \setbox0=\hbox to \hsize{\hss\bf#2 subsentence symbol and quotes\hss}
+%D \dp0=0pt
+%D \box0
+%D \vskip.5em
+%D \hrule
+%D \vskip.5em
+%D \hbox to \hsize
+%D {\hfil\citaat{#3 #4}\hfil\citeer{#2}\hfil\strut|<||<|#3|>|#4|>|\hfil}
+%D \vskip.5em
+%D \hrule
+%D \egroup
+%D \stopregelcorrectie
+%D \blanko}
+%D
+%D \ShowLanguageValues [nl] [dutch] nederlandse zuinigheid
+%D \ShowLanguageValues [en] [english] engelse humor
+%D \ShowLanguageValues [de] [german] duitse degelijkheid
+%D \ShowLanguageValues [fr] [french] franse slag
+%D \ShowLanguageValues [sp] [spanish] spaans benauwd
+%D \ShowLanguageValues [it] [italian] italiaanse ...
+%D \ShowLanguageValues [da] [danish] deense ...
+%D \ShowLanguageValues [pt] [portuguese] portugese ...
+%D \ShowLanguageValues [sv] [swedish] zweedse ...
+%D \ShowLanguageValues [pl] [polish] poolse ...
+%D \ShowLanguageValues [fi] [finnish] finse ...
+%D \ShowLanguageValues [af] [afrikaans] afrikaanse ...
+%D \ShowLanguageValues [no] [norwegian] noorse ...
+%D \ShowLanguageValues [tr] [turkish] turks fruit
+
+%D We support a lot of languages. These are specified and
+%D loaded in separate files, according to their roots. Here
+%D we only take care of (postponed) setting of the current
+%D language.
+%D
+%D \unprotect
+%D \plaatstabel{The germanic languages (\type{lang-ger})}
+%D \starttabel[||||]
+%D \HL
+%D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR
+%D \HL
+%D \NC \s!nl \NC dutch \NC germanic \NC\FR
+%D \NC \s!en \NC english \NC germanic \NC\MR
+%D \NC \s!de \NC german \NC germanic \NC\MR
+%D \NC \s!da \NC danish \NC germanic \NC\MR
+%D \NC \s!sv \NC swedish \NC germanic \NC\MR
+%D \NC \s!af \NC afrikaans \NC germanic \NC\MR
+%D \NC \s!no \NC norwegian \NC germanic \NC\LR
+%D \HL
+%D \stoptabel
+%D \protect
+%D
+%D \unprotect
+%D \plaatstabel{The italic languages (\type{lang-ita})}
+%D \starttabel[||||]
+%D \HL
+%D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR
+%D \HL
+%D \NC \s!fr \NC french \NC italic \NC\FR
+%D \NC \s!sp \NC spanish \NC italic \NC\MR
+%D \NC \s!it \NC italian \NC italic \NC\MR
+%D \NC \s!pt \NC portuguese \NC italic \NC\LR
+%D \HL
+%D \stoptabel
+%D \protect
+%D
+%D \unprotect
+%D \plaatstabel{The slavic languages (\type{lang-sla})}
+%D \starttabel[||||]
+%D \HL
+%D \NC \bf mnemonic \NC \bf language \NC \bf group \NC \bf file \NC\SR
+%D \HL
+%D \NC \s!pl \NC polish \NC slavic \NC lang-sla \NC\SR
+%D \HL
+%D \stoptabel
+%D \protect
+%D \unprotect
+%D
+%D \plaatstabel{The altaic languages (\type{lang-alt})}
+%D \starttabel[||||]
+%D \HL
+%D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR
+%D \HL
+%D \NC \s!tr \NC turkish \NC altaic \NC\SR
+%D \HL
+%D \stoptabel
+%D
+%D \plaatstabel{The uralic languages (\type{lang-ura})}
+%D \starttabel[||||]
+%D \HL
+%D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR
+%D \HL
+%D \NC \s!fi \NC finnish \NC uralic \NC\SR
+%D \HL
+%D \stoptabel
+%D \protect
+
+%D We default to the language belonging to the interface. This
+%D is one of the few places outside the interface modules where
+%D \type{\startinterface} is used.
+
+% \language[\s!en] \mainlanguage[\currentlanguage]
+
+\startinterface dutch \appendtoks \language[\s!nl]\to \everyjob \stopinterface
+\startinterface english \appendtoks \language[\s!en]\to \everyjob \stopinterface
+\startinterface german \appendtoks \language[\s!de]\to \everyjob \stopinterface
+\startinterface french \appendtoks \language[\s!fr]\to \everyjob \stopinterface
+\startinterface spanish \appendtoks \language[\s!sp]\to \everyjob \stopinterface
+\startinterface italian \appendtoks \language[\s!it]\to \everyjob \stopinterface
+\startinterface danish \appendtoks \language[\s!da]\to \everyjob \stopinterface
+\startinterface portuguese \appendtoks \language[\s!pt]\to \everyjob \stopinterface
+\startinterface swedish \appendtoks \language[\s!sv]\to \everyjob \stopinterface
+\startinterface polish \appendtoks \language[\s!pl]\to \everyjob \stopinterface
+\startinterface finish \appendtoks \language[\s!fi]\to \everyjob \stopinterface
+\startinterface afrikaans \appendtoks \language[\s!af]\to \everyjob \stopinterface
+\startinterface norwegian \appendtoks \language[\s!no]\to \everyjob \stopinterface
+\startinterface turkish \appendtoks \language[\s!tr]\to \everyjob \stopinterface
+
+\appendtoks \mainlanguage[\currentlanguage] \to \everyjob
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-it.pat b/tex/context/base/lang-it.pat new file mode 100644 index 000000000..7b0ecd599 --- /dev/null +++ b/tex/context/base/lang-it.pat @@ -0,0 +1,519 @@ +\endinput
+
+% (c) IBM Corporation 1992.
+%
+% This is ihyphen.tex version 1.2 as of 11 May 1992.
+%
+% Italian language hyphenation patterns for 8-bit character set,
+% using the Extended TeX Font Encoding Scheme --- Latin.
+%
+% Written by:
+% Salvatore Filippone
+% IBM ECSEC
+% Viale Oceano Pacifico 171/173
+% 00144 Roma, ITALY
+%
+% Internet: filippon@romvmnic.vnet.ibm.com
+%
+\patterns{
+2a1a ^^e01a ^^e11a
+a1e ^^e01e ^^e11e
+a2i ^^e01i ^^e11i
+a3i2a
+a3i2e
+a3i2o
+a2j
+a1o ^^e01o ^^e11o
+a2u ^^e01u ^^e11u
+a2y
+1ba 1b^^e0 1b^^e1
+2b1b2
+1b2c2
+2b1d2
+1be 1b^^e8 1b^^e9
+1b2f2
+1b2g2
+1b2h2
+1bi 1b^^ec 1b^^ed
+1bj
+1b2l2
+1b2m2
+2b1n2
+1bo 1b^^f3 1b^^f2
+1b2p2
+1b2q2
+1b2r2
+2b1s2
+1b2t2
+1bu 1b^^fa 1b^^f9
+1b2v2
+1b2w2
+1b2x2
+1by
+1b2z2
+1ca 1c^^e1 1c^^e0
+1c2b2
+2c1c2
+1c2d2
+1ce 1c^^e9 1c^^e8
+1c2f2
+1c2g2
+1c2h
+1ci 1c^^ec 1c^^ed
+1cj
+1c2l2
+2c1m
+2c1n
+1co 1c^^f3 1c^^f2
+1c2p2
+2c1q2
+1c2r2
+1c2s2
+2c1t
+1cu 1c^^fa 1c^^f9
+1c2v2
+1c2w2
+1c2x2
+1cy
+2c1z2
+1da 1d^^e1 1d^^e0
+1d2b2
+1d2c2
+2d1d
+1de 1d^^e9 1d^^e8
+1d2f2
+1d2g2
+1d2h2
+1di 1d^^ec 1d^^ed
+1dj
+1d2l2
+2d1m
+2d1n
+1do 1d^^f3 1d^^f2
+1d2p2
+1d2q2
+1d2r2
+2d1s2
+1d2t2
+1du 1d^^fa 1d^^f9
+2d1v2
+1d2w2
+1d2x2
+1dy
+2d1z2
+e1a ^^e91a ^^e81a
+2e1e 2^^e91e2 2^^e81e2
+e2i ^^e91i ^^e81i
+e3i2a
+e3i2e
+e3i2o
+e2j
+e1o ^^e91o ^^e81o
+e2u ^^e91u ^^e81u
+e2y
+1fa 1f^^e1 1f^^e0
+1f2b2
+1f2c2
+1f2d2
+1fe 1f^^e9 1f^^e8
+2f1f2
+2f1g
+1f2h2
+1fi 1f^^ec 1f^^ed
+1fj
+1f2l
+1f2m2
+1f2n2
+1fo 1f^^f3 1f^^f2
+1f2p2
+1f2q2
+1f2r2
+2f1s
+2f1t
+1fu 1f^^fa 1f^^f9
+1f2v2
+1f2w2
+1f2x2
+1fy
+1f2z2
+1ga 1g^^e1 1g^^e0
+2g1b
+2g1c
+2g1d
+1ge 1g^^e9 1g^^e8
+2g1f
+2g1g
+1g2h2
+1gi 1g^^ec 1g^^ed
+1gj
+1g2l2
+2g1m
+1g2n2
+1go 1g^^f3 1g^^f2
+1g2p2
+1g2q2
+1g2r2
+1g2s2
+1g2t2
+1gu 1g^^fa 1g^^f9
+1g2v2
+1g2w2
+1g2x2
+1gy
+1g2z2
+i2a ^^ec1a ^^ed1a
+i2e ^^ec1e ^^ed1e
+2i1i 2^^ec1i2 2^^ed1i2
+i2j
+i2o ^^ec1o ^^ed1o
+i2u ^^ec1u ^^ed1u
+i2y
+j2a
+j2e
+j2i
+2j1j2
+j2o
+j2u
+j2y
+1ka 1k^^e1 1k^^e0
+1ke 1k^^e9 1k^^e8
+1ki 1k^^ec 1k^^ed
+1kj
+1ko 1k^^f3 1k^^f2
+1ku 1k^^fa 1k^^f9
+1ky
+1la 1l^^e1 1l^^e0
+2l1b2
+2l1c2
+2l1d2
+1le 1l^^e9 1l^^e8
+2l1f2
+2l1g2
+l1h
+1li 1l^^ec 1l^^ed
+1lj
+2l1l2
+2l1m2
+2l1n2
+1lo 1l^^f3 1l^^f2
+2l1p2
+2l1q2
+2l1r2
+2l1s2
+2l1t2
+1lu 1l^^fa 1l^^f9
+2l1v2
+2l1w2
+2l1x2
+1ly
+2l1z2
+1ma 1m^^e1 1m^^e0
+2m1b2
+2m1c2
+2m1d2
+1me 1m^^e9 1m^^e8
+2m1f2
+2m1g2
+2m1h2
+1mi 1m^^ec 1m^^ed
+1mj
+m1l
+2m3m2
+2m1n2
+1mo 1m^^f3 1m^^f2
+2m1p2
+2m1q2
+2m1r2
+2m1s2
+2m1t2
+1mu 1m^^fa 1m^^f9
+2m1v2
+2m1w2
+2m1x2
+1my
+2m1z2
+1na 1n^^e1 1n^^e0
+2n1b2
+2n1c2
+2n1d2
+1ne 1n^^e9 1n^^e8
+2n1f2
+2n1g2
+2n1h2
+1ni 1n^^ec 1n^^ed
+1nj
+2n1l2
+2n1m2
+2n1n2
+1no 1n^^f3 1n^^f2
+2n1p2
+2n1q2
+2n1r2
+2n1s2
+2n1t2
+1nu 1n^^fa 1n^^f9
+2n1v2
+2n1w2
+2n1x2
+1ny
+2n1z2
+o1a ^^f31a ^^f21a
+o1e ^^f31e ^^f21e
+o2i ^^f31i ^^f21i
+o3i2a
+o3i2e
+o3i2i
+o3i2o
+o2j
+2o1o 2^^f31o 2^^f21o
+o2u ^^f31u ^^f21u
+o2y
+1pa 1p^^e1 1p^^e0
+1p2b2
+1p2c2
+2p1d2
+1pe 1p^^e9 1p^^e8
+1p2f2
+1p2g2
+1p2h2
+1pi 1p^^ec 1p^^ed
+1pj
+1p2l2
+2p1m
+1p2n2
+1po 1p^^f3 1p^^f2
+2p1p2
+1p2q2
+1p2r2
+2p1s2
+.p2s2
+2p1t2
+1pu 1p^^fa 1p^^f9
+1p2v2
+1p2w2
+1p2x2
+1py
+2p1z
+1qa 1q^^e1 1q^^e0
+1q2b2
+1q2c2
+1q2d2
+1qe 1q^^e9 1q^^e8
+1q2f2
+1q2g2
+1q2h2
+1qi 1q^^ec 1q^^ed
+1qj
+1q2l2
+1q2m2
+1q2n2
+1qo 1q^^f3 1q^^f2
+1q2p2
+2q1q2
+1q2r2
+1q2s2
+1q2t2
+1qu 1q^^fa 1q^^f9
+1q2v2
+1q2w2
+1q2x2
+1qy
+q2z
+1ra 1r^^e1 1r^^e0
+2r1b2
+2r1c2
+2r1d2
+1re 1r^^e9 1r^^e8
+2r1f2
+2r1g2
+2r1h2
+1ri 1r^^ec 1r^^ed
+1rj
+2r1l2
+2r1m2
+2r1n2
+1ro 1r^^f3 1r^^f2
+2r1p2
+2r1q2
+2r1r2
+2r1s2
+2r1t2
+1ru 1r^^fa 1r^^f9
+2r1v2
+2r1w2
+2r1x2
+1ry
+2r1z
+1sa 1s^^e1 1s^^e0
+1s2b2
+1s2c2
+1s2d2
+1se 1s^^e9 1s^^e8
+1s2f2
+1s2g2
+1s2h2
+1si 1s^^ec 1s^^ed
+1sj
+1s2l2
+1s2m2
+1s2n2
+1so 1s^^f3 1s^^f2
+1s2p2
+1s2q2
+1s2r2
+2s1s2
+1s2t2
+s2t3m
+1su 1s^^fa 1s^^f9
+1s2v2
+1s2w2
+1s2x2
+1sy
+2s1z2
+1ta 1t^^e1 1t^^e0
+1t2b2
+1t2c2
+1t2d2
+1te 1t^^e9 1t^^e8
+1t2f2
+1t2g2
+1t2h2
+1ti 1t^^ec 1t^^ed
+1tj
+1t2l2
+1t2m2
+1t2n2
+1to 1t^^f3 1t^^f2
+1t2p2
+1t2q2
+1t2r2
+1t2s2
+2t1t2
+1tu 1t^^fa 1t^^f9
+1t2v2
+1t2w2
+1t2x2
+1ty
+1t2z2
+u2a ^^fa1a ^^f91a
+u2e ^^fa1e ^^f91e
+u2i ^^fa1i ^^f91i
+u2j
+u2o ^^fa1o ^^f91o
+2u1u2 2^^fa1u2 2^^f91u2
+u2y
+1va 1v^^e1 1v^^e0
+1v2b2
+1v2c2
+1v2d2
+1ve 1v^^e9 1v^^e8
+1v2f2
+1v2g2
+1v2h2
+1vi 1v^^ec 1v^^ed
+1vj
+1v2l2
+1v2m2
+1v2n2
+1vo 1v^^f3 1v^^f2
+1v2p2
+1v2q2
+1v2r2
+1v2s2
+1v2t2
+1vu 1v^^fa 1v^^f9
+2v1v2
+1v2w2
+1v2x2
+1vy
+1v2z2
+1wa 1w^^e1 1w^^e0
+1w2b2
+1w2c2
+1w2d2
+1we 1w^^e9 1w^^e8
+1w2f2
+1w2g2
+1w2h2
+1wi 1w^^ec 1w^^ed
+1wj
+1w2l2
+1w2m2
+1w2n2
+1wo 1w^^f3 1w^^f2
+1w2p2
+1w2q2
+1w2r2
+1w2s2
+1w2t2
+1wu 1w^^fa 1w^^f9
+w2v
+2w1w2
+1w2x2
+1wy
+1w2z2
+1xa 1x^^e1 1x^^e0
+1x2b2
+1x2c2
+1x2d2
+1xe 1x^^e9 1x^^e8
+1x2f2
+1x2g2
+1x2h2
+1xi 1x^^ec 1x^^ed
+1xj
+1x2l2
+1x2m2
+1x2n2
+1xo 1x^^f3 1x^^f2
+1x2p2
+1x2q2
+1x2r2
+1x2s2
+1x2t2
+1xu 1x^^fa 1x^^f9
+1x2v2
+1x2w2
+2x1x2
+1xy
+1x2z2
+y2a
+y2e
+y2i
+y2j
+y2o
+y2u
+y1y
+1za 1z^^e1 1z^^e0
+1z2b2
+1z2c2
+1z2d2
+1ze 1z^^e9 1z^^e8
+1z2f2
+1z2g2
+1z2h2
+1zi 1z^^ec 1z^^ed
+1zj
+1z2l2
+1z2m2
+1z2n2
+1zo 1z^^f3 1z^^f2
+1z2p2
+1z2q2
+1z2r2
+1z2s2
+1z2t2
+1zu 1z^^fa 1z^^f9
+1z2v2
+1z2w2
+1z2x2
+1zy
+2z1z
+.pre3a
+.pre3i
+.pre3o
+.pre3u
+.su2b3l
+.su2b3r
+}
+
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex new file mode 100644 index 000000000..d2fc6f204 --- /dev/null +++ b/tex/context/base/lang-ita.tex @@ -0,0 +1,282 @@ +%D \module
+%D [ file=lang-ita,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Italic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Latin, Italian, Rhaeto-Romanic, Rumanian, Sardian
+% Catalan, French, Ladino, Portuguese, Proven\c{c}al, Spanish
+
+\writestatus{loading}{Italic Languages}
+
+\unprotect
+
+\installlanguage
+ [\s!fr]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=\leftguillemot,
+ \c!rightsentence=\rightguillemot,
+ \c!leftsubsentence=\leftsubguillemot,
+ \c!rightsubsentence=\rightsubguillemot,
+ \c!leftquote=\leftsubguillemot,
+ \c!rightquote=\rightsubguillemot,
+ \c!leftquotation=\leftguillemot,
+ \c!rightquotation=\rightguillemot,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!sp]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!it]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\lowerrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\lowerrightdoubleninequote,
+ \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [\s!pt]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+%D For compatibility reasons we also define:
+
+\installlanguage [fa] [\s!fr]
+
+\setupheadtext [\s!fr] [\v!inhoud=Table des mati\`eres]
+\setupheadtext [\s!sp] [\v!inhoud=\'Indice]
+\setupheadtext [\s!it] [\v!inhoud=Indice]
+\setupheadtext [\s!pt] [\v!inhoud=Conte\'ud]
+
+\setupheadtext [\s!fr] [\v!tabellen=Tables]
+\setupheadtext [\s!sp] [\v!tabellen=Tablas]
+\setupheadtext [\s!it] [\v!tabellen=Tabelle]
+\setupheadtext [\s!pt] [\v!tabellen=Tabelas]
+
+\setupheadtext [\s!fr] [\v!figuren=Figures]
+\setupheadtext [\s!sp] [\v!figuren=Ilustraci\'ons]
+\setupheadtext [\s!it] [\v!figuren=Illustrazioni]
+\setupheadtext [\s!pt] [\v!figuren=Figuras]
+
+\setupheadtext [\s!fr] [\v!grafieken=Graphiques]
+\setupheadtext [\s!sp] [\v!grafieken=Gr\'aficos]
+\setupheadtext [\s!it] [\v!grafieken=Grafice]
+\setupheadtext [\s!pt] [\v!grafieken=Gr\'aficos]
+
+\setupheadtext [\s!fr] [\v!intermezzos=Interm\`edes]
+\setupheadtext [\s!sp] [\v!intermezzos=intermedios]
+\setupheadtext [\s!it] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!pt] [\v!intermezzos=Intermezzi]
+
+\setupheadtext [\s!fr] [\v!index=Index]
+\setupheadtext [\s!sp] [\v!index=\'Indice]
+\setupheadtext [\s!it] [\v!index=Indice]
+\setupheadtext [\s!pt] [\v!index=\'Indice]
+
+\setupheadtext [\s!fr] [\v!afkortingen=Abr\'eviations]
+\setupheadtext [\s!sp] [\v!afkortingen=Abreviaci\'ons]
+\setupheadtext [\s!it] [\v!afkortingen=Abbreviazioni]
+\setupheadtext [\s!pt] [\v!afkortingen=Abreviaturas]
+
+\setupheadtext [\s!fr] [\v!logos=Logos]
+\setupheadtext [\s!sp] [\v!logos=Logotipos]
+\setupheadtext [\s!it] [\v!logos=Logotipi]
+\setupheadtext [\s!pt] [\v!logos=Logotipos]
+
+\setupheadtext [\s!fr] [\v!eenheden=Unit\'es]
+\setupheadtext [\s!sp] [\v!eenheden=Unidads]
+\setupheadtext [\s!it] [\v!eenheden=Unit\`a]
+\setupheadtext [\s!pt] [\v!eenheden=Unidades]
+
+\setuplabeltext [\s!fr] [\v!tabel=Table ]
+\setuplabeltext [\s!sp] [\v!tabel=Tablas ]
+\setuplabeltext [\s!it] [\v!tabel=Tabella ]
+\setuplabeltext [\s!pt] [\v!tabel=Tabela ]
+
+\setuplabeltext [\s!fr] [\v!figuur=Figure ]
+\setuplabeltext [\s!sp] [\v!figuur=Ilustraci\'on ]
+\setuplabeltext [\s!it] [\v!figuur=Illustrazione ]
+\setuplabeltext [\s!pt] [\v!figuur=Figura ]
+
+\setuplabeltext [\s!fr] [\v!intermezzo=Interm\`ede ]
+\setuplabeltext [\s!sp] [\v!intermezzo=intermedio ]
+\setuplabeltext [\s!it] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!pt] [\v!intermezzo=Intermezzo ]
+
+\setuplabeltext [\s!fr] [\v!grafiek=Illustration ]
+\setuplabeltext [\s!sp] [\v!grafiek=Gr\'afico ]
+\setuplabeltext [\s!it] [\v!grafiek=Grafica ]
+\setuplabeltext [\s!pt] [\v!grafiek=Gr\'afico ]
+
+\setuplabeltext [\s!fr] [\v!hoofdstuk=]
+\setuplabeltext [\s!sp] [\v!hoofdstuk=]
+\setuplabeltext [\s!it] [\v!hoofdstuk=]
+\setuplabeltext [\s!pt] [\v!hoofdstuk=]
+
+\setuplabeltext [\s!fr] [\v!paragraaf=]
+\setuplabeltext [\s!sp] [\v!paragraaf=]
+\setuplabeltext [\s!it] [\v!paragraaf=]
+\setuplabeltext [\s!pt] [\v!paragraaf=]
+
+\setuplabeltext [\s!fr] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sp] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!it] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!pt] [\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!fr] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sp] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!it] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!pt] [\v!sub\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!fr] [\v!bijlage=]
+\setuplabeltext [\s!sp] [\v!bijlage=]
+\setuplabeltext [\s!it] [\v!bijlage=]
+\setuplabeltext [\s!pt] [\v!bijlage=]
+
+\setuplabeltext [\s!fr] [\v!deel=Section ]
+\setuplabeltext [\s!sp] [\v!deel=Parte ]
+\setuplabeltext [\s!it] [\v!deel=Parte ]
+\setuplabeltext [\s!pt] [\v!deel=Parte ]
+
+\setuplabeltext [\s!fr] [\v!regel=ligne]
+\setuplabeltext [\s!sp] [\v!regel=l\'\i nea]
+\setuplabeltext [\s!it] [\v!regel=riga]
+\setuplabeltext [\s!pt] [\v!regel=linha]
+
+\setuplabeltext [\s!fr] [\v!regels=lignes]
+\setuplabeltext [\s!sp] [\v!regels=l\'\i neas]
+\setuplabeltext [\s!it] [\v!regels=rige]
+\setuplabeltext [\s!pt] [\v!regels=linhas]
+
+\setuplabeltext [\s!fr] [\v!january=janvier]
+\setuplabeltext [\s!fr] [\v!february=f\'evrier]
+\setuplabeltext [\s!fr] [\v!march=mars]
+\setuplabeltext [\s!fr] [\v!april=avril]
+\setuplabeltext [\s!fr] [\v!may=mai]
+\setuplabeltext [\s!fr] [\v!june=juin]
+\setuplabeltext [\s!fr] [\v!july=juillet]
+\setuplabeltext [\s!fr] [\v!august=ao\^ut]
+\setuplabeltext [\s!fr] [\v!september=septembre]
+\setuplabeltext [\s!fr] [\v!october=octobre]
+\setuplabeltext [\s!fr] [\v!november=novembre]
+\setuplabeltext [\s!fr] [\v!december=d\'ecembre]
+
+\setuplabeltext [\s!sp] [\v!january=jenero]
+\setuplabeltext [\s!sp] [\v!february=febrero]
+\setuplabeltext [\s!sp] [\v!march=marzo]
+\setuplabeltext [\s!sp] [\v!april=abril]
+\setuplabeltext [\s!sp] [\v!may=mayo]
+\setuplabeltext [\s!sp] [\v!june=junio]
+\setuplabeltext [\s!sp] [\v!july=julio]
+\setuplabeltext [\s!sp] [\v!august=agosto]
+\setuplabeltext [\s!sp] [\v!september=septimbre]
+\setuplabeltext [\s!sp] [\v!october=octubre]
+\setuplabeltext [\s!sp] [\v!november=noviembre]
+\setuplabeltext [\s!sp] [\v!december=deciembre]
+
+\setuplabeltext [\s!it] [\v!january=gennaio]
+\setuplabeltext [\s!it] [\v!february=febbraio]
+\setuplabeltext [\s!it] [\v!march=marzo]
+\setuplabeltext [\s!it] [\v!april=aprile]
+\setuplabeltext [\s!it] [\v!may=maggio]
+\setuplabeltext [\s!it] [\v!june=giugno]
+\setuplabeltext [\s!it] [\v!july=luglio]
+\setuplabeltext [\s!it] [\v!august=agosto]
+\setuplabeltext [\s!it] [\v!september=settembre]
+\setuplabeltext [\s!it] [\v!october=ottobre]
+\setuplabeltext [\s!it] [\v!november=novembre]
+\setuplabeltext [\s!it] [\v!december=dicembre]
+
+\setuplabeltext [\s!pt] [\v!january=janeiro]
+\setuplabeltext [\s!pt] [\v!february=fevereiro]
+\setuplabeltext [\s!pt] [\v!march=mar\c{c}o]
+\setuplabeltext [\s!pt] [\v!april=abril]
+\setuplabeltext [\s!pt] [\v!may=maio]
+\setuplabeltext [\s!pt] [\v!june=junho]
+\setuplabeltext [\s!pt] [\v!july=julho]
+\setuplabeltext [\s!pt] [\v!august=agosto]
+\setuplabeltext [\s!pt] [\v!september=setembro]
+\setuplabeltext [\s!pt] [\v!october=outubro]
+\setuplabeltext [\s!pt] [\v!november=novembro]
+\setuplabeltext [\s!pt] [\v!december=dezembro]
+
+\setuplabeltext [\s!fr] [\v!sunday=dimanche]
+\setuplabeltext [\s!fr] [\v!monday=lundi]
+\setuplabeltext [\s!fr] [\v!tuesday=mardi]
+\setuplabeltext [\s!fr] [\v!wednesday=mercredi]
+\setuplabeltext [\s!fr] [\v!thursday=jeudi]
+\setuplabeltext [\s!fr] [\v!friday=vendredi]
+\setuplabeltext [\s!fr] [\v!saturday=samedi]
+
+\setuplabeltext [\s!sp] [\v!sunday=domingo]
+\setuplabeltext [\s!sp] [\v!monday=lunes]
+\setuplabeltext [\s!sp] [\v!tuesday=martes]
+\setuplabeltext [\s!sp] [\v!wednesday=mi\'ercoles]
+\setuplabeltext [\s!sp] [\v!thursday=jueves]
+\setuplabeltext [\s!sp] [\v!friday=viernes]
+\setuplabeltext [\s!sp] [\v!saturday=s\'abado]
+
+\setuplabeltext [\s!it] [\v!sunday=domenica]
+\setuplabeltext [\s!it] [\v!monday=luned\`\i]
+\setuplabeltext [\s!it] [\v!tuesday=marted\`\i]
+\setuplabeltext [\s!it] [\v!wednesday=mercoled\`\i]
+\setuplabeltext [\s!it] [\v!thursday=gioved\`\i]
+\setuplabeltext [\s!it] [\v!friday=venerd\`\i]
+\setuplabeltext [\s!it] [\v!saturday=sabato]
+
+\setuplabeltext [\s!pt] [\v!sunday=domingo]
+\setuplabeltext [\s!pt] [\v!monday=segunda-feira]
+\setuplabeltext [\s!pt] [\v!tuesday=ter\c{c}a-feira]
+\setuplabeltext [\s!pt] [\v!wednesday=quarta-feira]
+\setuplabeltext [\s!pt] [\v!thursday=quinta-feira]
+\setuplabeltext [\s!pt] [\v!friday=sexta-feira]
+\setuplabeltext [\s!pt] [\v!saturday=s\'abado]
+
+%D \ShowAllLanguageValues [\s!fr] [french] franse slag
+%D \ShowAllLanguageValues [\s!sp] [spanish] spaans benauwd
+%D \ShowAllLanguageValues [\s!it] [italian] italiaanse ...
+%D \ShowAllLanguageValues [\s!pt] [portuguese] portugese ...
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex new file mode 100644 index 000000000..38501603b --- /dev/null +++ b/tex/context/base/lang-lab.tex @@ -0,0 +1,179 @@ +%D \module
+%D [ file=lang-lab,
+%D version=1997.08.27,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Language Head and Label Texts,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Language Head and Label Texts}
+
+\unprotect
+
+%D In this module we deal with language dependant labels and
+%D prefixes, like in {\em Figure~12} and {\em Chapter 1}. In
+%D this file we set the default values. Users can easily
+%D overrule these.
+%D
+%D This module is dedicated to the grandfather of Tobias
+%D Burnus, who's extensive languages oriented library helped us
+%D a lot in finding the right translations. All those labels
+%D are collected in files that reflect their common ancestor.
+
+%D \macros
+%D {setupheadtext, setuplabeltext}
+%D
+%D First we present some macros that deal with what we will
+%D call head and label texts. Such texts are defines by:
+%D
+%D \showsetup{\y!setupheadtext}
+%D \showsetup{\y!setuplabeltext}
+%D
+%D In a few paragraphs we'll show quite a lot of examples
+%D of its use.
+
+\def\setupheadtext%
+ {\dosetupsometextprefix\v!kop}
+
+\def\setuplabeltext%
+ {\dosetupsometextprefix\c!label}
+
+\let\handletextprefix=\relax
+
+\def\dodosetupsometextprefix#1%
+ {\def\dododosetupsometextprefix[##1][##2]%
+ {\ifsecondargument
+ \def\docommando####1{\dodocommando[#1##1][####1]}%
+ \processcommalist[##2]\docommando
+ \else
+ \def\docommando####1{\dodocommando[#1\currentmainlanguage][####1]}%
+ \processcommalist[##1]\docommando
+ \fi}%
+ \dodoubleempty\dododosetupsometextprefix}
+
+\def\dosetupsometextprefix#1%
+ {\def\dodocommando[##1][##2=##3]%
+ {\setvalue{##1##2}{\handletextprefix{##3}}}%
+ \dodosetupsometextprefix{#1}}
+
+%D By setting \type{\handletextprefix} to something else than
+%D \type{\relax}, like \type{\uppercase}, one can influence the
+%D conversion.
+%D
+%D These commands accept all kind of inputs:
+%D
+%D \starttypen
+%D \setuplabeltext [language] [label=text]
+%D \setuplabeltext [language] [label=text,label=text,...]
+%D \setuplabeltext [label=text]
+%D \setuplabeltext [label=text,label=text,...]
+%D \stoptypen
+%D
+%D The last two cases concern the current language.
+
+%D \macros
+%D {headtext, labeltext, LABELTEXT}
+%D
+%D Once defined, head and label texts can be called upon using:
+%D
+%D \showsetup{\y!headtext}
+%D \showsetup{\y!labeltext}
+%D
+%D The latter one has an upcased alternative \type{\LABELTEXT}.
+
+\def\headtext%
+ {\dogetupsometextprefix\v!kop}
+
+\def\labeltext%
+ {\dogetupsometextprefix\c!label}
+
+\def\LABELTEXT#1%
+ {\bgroup
+ \let\handletextprefix=\uppercase
+ \the\everyuppercase
+ \dogetupsometextprefix\c!label{#1}% not \labeltext (see \MONTH)
+ \egroup}
+
+\unexpanded\def\dogetupsometextprefix#1#2%
+ {\doifdefinedelse{#1\currentmainlanguage#2}
+ {\getvalue{#1\currentmainlanguage#2}}
+ {\doifdefinedelse{#1#2}
+ {\getvalue{#1#2}}
+ {{\tttf[#1: #2/\currentmainlanguage]~}}}}
+
+%D \macros
+%D {presetheadtext,presetlabeltext}
+%D
+%D The next two macros enable us to automatically define
+%D head and label texts without replacing predefined ones.
+%D This are internal macros.
+
+\def\dopresetsometextprefix#1%
+ {\def\dodocommando[##1][##2=##3]%
+ {\doifundefined{##1##2}
+ {\setvalue{##1##2}{\handletextprefix{##3}}}}%
+ \dodosetupsometextprefix{#1}}
+
+\def\presetheadtext%
+ {\dopresetsometextprefix\v!kop}
+
+\def\presetlabeltext%
+ {\dopresetsometextprefix\c!label}
+
+%D \macros
+%D {translate}
+%D {}
+%D
+%D Sometismes macros contain language specific words that are to
+%D be typeset. Such macros can be made (more) language
+%D independant by using:
+%D
+%D \showsetup{\y!translate}
+%D
+%D like for instance:
+%D
+%D \starttypen
+%D \translate[en=something,nl=iets]
+%D \stoptypen
+%D
+%D which expands to {\em something} or {\em iets}, depending on
+%D de current language.
+
+\def\dotranslate[#1]%
+ {\getparameters[\??lg][#1]%
+ \getvalue{\??lg\currentlanguage}}
+
+\unexpanded\def\translate%
+ {\dosingleempty\dotranslate}
+
+%D When used without argument, the last defined values are
+%D used. This enables repetitive use like
+%D
+%D \starttypen
+%D \en \translate\ means \nl \translate
+%D \stoptypen
+
+%D \macros
+%D {assigntranslation}
+%D {}
+%D
+%D This macro is a system macro, and can be used to assign a
+%D translation to a macro. Its form is:
+%D
+%D \starttypen
+%D \assigntranslation[en=something,nl=iets]\to\command
+%D \stoptypen
+
+\def\assigntranslation[#1]\to#2%
+ {\getparameters[\??lg][#1]%
+ \edef#2{\getvalue{\??lg\currentlanguage}}}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-nl.hyp b/tex/context/base/lang-nl.hyp new file mode 100644 index 000000000..7d997255d --- /dev/null +++ b/tex/context/base/lang-nl.hyp @@ -0,0 +1,5 @@ +% additional hyphenations
+
+\hyphenation{vrije-tijds-be-ste-ding}
+
+\endinput
diff --git a/tex/context/base/lang-nl.pat b/tex/context/base/lang-nl.pat new file mode 100644 index 000000000..9bc73109c --- /dev/null +++ b/tex/context/base/lang-nl.pat @@ -0,0 +1,7947 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% These are TeX hyphenation patterns for Dutch generated at the
+% Computer Science Department of Utrecht University.
+% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
+% Telephone: +31-30-531454, e-mail: postmaster@cs.ruu.nl
+%
+% Copyright (c) 1989 by CELEX.
+% CELEX, Wundtlaan 1, 6525 XD Nijmegen, The Netherlands.
+% Telephone: +31-80-615751, email: celex@hnympi52.bitnet
+%
+% General permission for non-profit usage is granted.
+% For commercial usage contact CELEX at the above address.
+% Copying of this file is only permitted with inclusion of
+% this copyright notice and with these same restrictions.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\patterns{%
+.aan5
+.aard5a
+.aard5r
+.aarts5
+.ab5l
+.ad3ek
+.ad3eq
+.ad3op
+.ad3or
+.ad5ren
+.ad3s
+.af3ra
+.al3f
+.aller5
+.al5m
+.al4st
+.am3p
+.an3d4
+.an4kl
+.an5od
+.an3th
+.ap2n
+.ar3tr
+.as3p
+.as1t
+.as5th
+.as3tr
+.at5j
+.at4r
+.ba3ta
+.be3la
+.be5lo
+.berg5l
+.bij1
+.bit5se
+.bli4
+.boot5j
+.bu2s
+.ca4te.
+.cater5
+.ce4len
+.co4ler
+.culot4
+.daar5
+.da4gi
+.dag3r
+.da4k
+.de2a
+.denk5r
+.de3ra
+.de3ro
+.des5p
+.de5sta
+.di4s
+.dom5o
+.du5et
+.edel5a
+.ed3w
+.ek3s
+.ek4w
+.elo3
+.en3t
+.er5aa
+.er4f3l
+.erop3
+.ert4
+.er3ui
+.es3
+.eu5t
+.exi1
+.gaat3
+.ga4me.
+.ge3f
+.ge3la
+.ge5le
+.ge5lo
+.ge3n4a
+.ge5ne
+.ge5no
+.ge3r4a
+.ge5r4e
+.ges4
+.ge3sk
+.gram5e
+.haar5s
+.hand5a
+.handels5
+.hand5s
+.he2a
+.he2r
+.her3i
+.her3u
+.ho4les
+.ho4met
+.honing5
+.hy4de
+.ij2s
+.ij4s3l
+.ijs5t
+.ima4ge
+.in1
+.in3d4
+.in5g
+.ingeni5
+.ink4
+.innes5
+.in3s4
+.in3t
+.jes2
+.ka4taa
+.ka4te.
+.ke5na
+.ke3ra
+.ker4kl
+.kerk5u
+.kerst5r
+.klok5
+.koot5
+.kort5a
+.krop5a
+.lak5l
+.la5th
+.lead5
+.le4b
+.leef5
+.le4go
+.le4gr
+.lek5w
+.le5ni
+.len4s
+.lente5
+.les3
+.le3th
+.lip5l
+.long5a
+.loot5
+.los5
+.luit4
+.mede5
+.mein3
+.me5li
+.melk5o
+.mer4k5l
+.me3so
+.miet5j
+.mij4n5i
+.mo4s
+.mos3k
+.na3fl
+.na1s
+.negen5
+.nes5tel
+.ne4t5j
+.no5t
+.och3
+.oe4r
+.oe4s3
+.olf4
+.olie3
+.om1a
+.on1
+.on3i
+.on3s
+.on2t
+.ont5ee
+.ont5eren
+.ont5ra
+.ont5rol
+.op5at
+.op5r
+.over5e
+.over5s
+.pa2k
+.pee5tj
+.peri5
+.pe4te.
+.piet5j
+.prik3
+.puit4
+.qua5d
+.quit4
+.raat4
+.ran4ch
+.read3
+.record5
+.rei4s5
+.re4mol
+.re5na
+.re5s4cr
+.res3p
+.reu5t
+.rie4t5a
+.rijk4s
+.rij5sp
+.ring5s
+.ro4l
+.ro4q
+.ro4sk
+.sa4p
+.sce4ne
+.seig5
+.se4st
+.se2t
+.sha4
+.sha5ker
+.sis5t
+.ski3s
+.slee5tj
+.sli2
+.snap3
+.so4v5
+.spoor5
+.st2
+.ste4m3
+.ster5an
+.sty4
+.sul3
+.taart5j
+.taat4
+.tan4da
+.ta3ro
+.te4f
+.tek2
+.te5nor
+.ten4tj
+.te4ra
+.ter4pa
+.tes5tat
+.thee3
+.tic5k
+.ti4me
+.ti4na
+.to2s
+.traat4
+.tros5
+.ts4
+.tu4ne.
+.ui2
+.ui3le
+.uit1
+.uit4je
+.vaat5j
+.van3o
+.veld3
+.ven5s
+.ven4t5j
+.ver1
+.ve5ring
+.ver5sta
+.vet5r
+.volg5or
+.vu4l3
+.was3t
+.weet5
+.we2l
+.wel3o
+.wet4s
+.work3
+.xe1
+.ya2l
+.zend5a
+.zes3
+.zit3
+a4a4
+aad3a
+aad3o
+aad3r
+aaf5a
+aag1
+aag3r
+aags4
+aag5so
+aai1
+aak1
+aak3l
+aak5n
+aak3r
+aak3w
+aal1a
+2aald
+aal1e
+aal3k
+aal1o
+4aalr
+aal5sc
+4aalv
+aam1
+aan1
+aan3a
+5aandee
+aan5g
+5aangi
+1aanj
+aan5k
+5aann
+5aansla
+aan3sp
+5aanta
+5aanvr
+3aanwi
+aanzet5
+aap1a
+aar1
+5aardapp
+aar4th
+aart5ro
+aas3e
+aas3f
+aas3p
+aat3a
+aat3h
+aat3o
+aat3r
+a1b
+abak4s3
+aba4s
+abe4la
+ab5err
+ab5ijz
+able2
+a4ble.
+a4bles
+3abonn
+ab3ru
+4ace
+a2ce.
+a3cee
+a3cep
+a4cer.
+a4cers
+a4ces
+5aceta
+2ach.
+a3cha
+2a1che
+4a1chi
+a1cho
+a3chr
+4achs
+a1chu
+2acl
+2aco
+2acr
+4acs
+acu5e
+a1d
+2ad.
+ad2a
+ad3aa
+ad3ad
+ada5g
+ada2r3
+a4dete
+ade4tj
+2adi
+2adl
+5admini
+ad3ora
+2adp
+3adres
+a5dri
+ad5rol
+ad3sla
+ad5uit
+4ady
+2ae
+aege4
+aek4
+ael4
+a4fau
+af3d
+af1dw
+4afe
+af3ei
+afe4la
+a2f5ep
+af5ex
+1afg
+2afi
+a4fin
+af3l
+2afo
+afon4d
+af1r
+af3ric
+af5rie
+af3ris
+af3rit
+af3ru
+af3s
+5afsl
+5aftr
+a4fu
+3afzet
+4aga
+ag1ad
+agas4s
+age2o
+a4gins
+agis5t
+ag3le
+ag3ord
+ag3reg
+ag3roo
+ag3sla
+ag4spr
+ag5ur
+a4g3uu
+a1h
+4ah.
+ahe5ri
+ah3l
+ah5r
+ai1e
+aig4
+aik4
+ails4
+ai4lu
+2ais4
+ai5sa
+ai3sc
+ais5k
+ai1so
+ai4sol
+ai1t
+4a1j
+2ak.
+5akade
+ak3arb
+a4ked
+aker4se
+a2kes
+a2kez
+2akh
+akhou4
+ak3id
+a2k1l
+ak3la
+ak3lo
+ak3na
+ak3ne
+a4kog
+ak3ond
+4akp
+2aks
+4aks.
+5aksij
+ak5spa
+ak1st
+4akt.
+ak5uu
+ak3we
+a1la
+a5lal
+alan4st
+a4lap
+5album
+2ald
+a2lel
+a4lents
+al2fe
+alf3l
+alf2r
+4alia
+alie5tj
+al4kank
+al4kro
+al4mac
+5almana
+al4mol
+a1lo
+al3omt
+alo4n
+al5ou
+al3ph
+als3j
+al2sl
+als5m
+als3oo
+al4stem
+al4sti
+al3tha
+al4t5ro
+a1lu
+5amandel
+4ambe
+1ambt
+ame4ran
+3ameu
+4amm
+am5pe
+am2pl
+ampoo5
+ams5ap
+am4se
+am4sm
+am4sn
+am2sp
+am3spe
+an2aa
+an4af
+a2na2g
+a5nagen
+an5alge
+a4n5ame
+an3arc
+an4ded
+2andj
+and4ri
+a4nec
+an3emi
+a3nen
+an3est
+an4gan
+an4gap
+anges4
+ange5st
+ang5le
+an2gr
+ang5ste
+a3ni
+ani5t
+5anjelie
+4ank.
+an4kaa
+an4kak
+an4kas
+anker5k
+ank5ins
+an4kna
+an4k5of
+an2kr
+ank3ro
+ank5wet
+annet4
+an5opt
+an5ort
+ano3st
+an3scr
+an2so
+an2sp
+5antenn
+antes4
+ant2h
+an3tha
+an5to
+ants5ta
+anu5e
+an5ui
+an5ur
+a4nuu
+anval4s
+a1o
+a2ob
+a4op4
+4ap.
+a1pa
+a2pe.
+a4ped
+ap3j
+ap3le
+a1plu
+a1po
+apo5p
+1appa
+5appels
+3appr
+a1pr
+a4p3rij
+april3
+ap2sl
+ap2sp
+2apu
+a1py
+a1q
+a4ques
+4ar.
+a1ra
+ara5ce
+ara5kl
+a4r5app
+5archief
+5arctic
+ar2da
+ard3ac
+ard3ol
+ard3op
+ar2dr
+ar4dran
+ard3ri
+ard3w
+a4rew
+arg3l
+3argum
+a1ri
+ari4an.
+ari4ce
+ariet4
+ari5ett
+arkeer5
+ar3k4l
+2arl
+ar4map
+ar4mu
+ar4nes
+a1ro
+2aroo
+ar5s2e
+ar4s1l
+ars3la
+ars3m
+ar2sn
+ar5sni
+ar2so
+ar4spa
+ar4spr
+ars5tal
+ar4stek
+ar4str
+ar4tak
+ar4tap
+art5een
+5artike
+ar2tj
+ar4top
+ar2tr
+art4sl
+arts5le
+a3rus
+a1ry
+4asa
+asal4
+as1ap
+a2sc
+as4ch
+as4cr
+a2seb
+a2sec
+as4ee
+a2sel
+a3sem
+as4en
+as2hi
+asi4on.
+asis5t
+a2sl
+as3lam
+as3lan
+as3li
+aslijs4
+as3m
+as3pa
+as5pect.
+as5pecte
+as5per
+as3pi
+as3pl
+assi3s
+3assoc
+5assu
+as1ta
+as3tan
+a5stat
+a4s3te
+as4th
+as3ti
+as5tic
+as3ton
+ast5red
+a1t
+at1ac
+a4talen
+ata1s
+a4taz
+5atelier
+ate4rec
+ate4rek
+ateri5el
+ater5ijs
+4atg
+at2ha
+a3thar
+atie5s4
+a2tj
+3atlas
+3atmos
+2atn
+a2t3re
+a3trek
+at2sl
+at4slo
+ats5lot
+ats5m
+at5sni
+at2sp
+at4stak
+at4sti
+at4stre
+at2tu
+2au
+4au.
+au1ch
+au3e
+3aug
+au3kr
+auli4ne
+aul4le
+aup2
+au5ph
+aur2
+au5re
+4aus
+au3sa
+au5so
+au1t4
+3auto
+au1wi
+4auz
+a1v
+ava5ne
+ava5str
+aven3s
+ave3re
+ave3ri
+aver4u
+a3vi
+avil4l
+1avo
+5avond
+4avot
+a1w
+aw5re
+4ay
+ay4a
+a1z
+aze3s
+aze5tj
+5azia
+1ba
+baar3t
+babe4
+babet4
+ba4ch
+ba4da
+ba4des
+ba4dr
+bag4h
+ba4ka
+bal4kla
+ba3na
+ban4d5r
+band5s
+ba4ne.
+ban4kl
+ban4kn
+ban4k3o
+ban4kr
+bank3w
+ban4q
+ba5ru
+baseli4
+bassi4
+bas3t
+2b1b
+bbe4lag
+bbe4lee
+bbe4n
+2b1c
+2b1d
+3be
+be3am
+be4art
+be3dw
+beet1
+be3g4
+beien5
+beis4
+bei4tj
+be3ke
+be3kl
+be4lex
+bel5f
+bel3k
+bel3sp
+be1ra
+be5r2e
+ber4g5af
+ber4g5et
+bergi4
+ber4gl
+ber4gr
+ber5na
+be1r2o
+ber5oc
+be4ron
+bers4k
+ber4sto
+be5ru
+be1s4
+bes5ac
+bes5k
+be3sm
+bes5s
+bes5te.
+be5stij
+be5stik
+be1tw
+beur4s
+2b1f
+2bg
+4b3h
+1b2i
+bid3s4
+bi4du
+bi5enn
+biet5j
+bi3eu
+bij5a
+bij3d
+bij3k
+bijs2
+bij3sl
+bij3sm
+bin4dr
+bin4tj
+bio3
+bis4a
+bi3se
+bis4tr
+bi1tr
+bit4se
+2b1j
+2b1k
+1b4l
+5blan
+b5led
+blet5j
+bleus4
+3bli
+blik3o
+4blish
+blok3
+2b1m
+b1n
+1bo
+bo5de2
+boe4ga
+boe4kn
+boeren5
+boe3s4
+bo5ko
+bo4les
+bo2ma
+bom3aa
+bo4mo
+bonai4
+bond4s
+bon4tj
+bon4to
+boos4t3
+b5orig
+bor4st5a
+bor4sto
+bor4st5r
+bos3
+bo4sp
+bos4ses
+bo2su
+bo2th
+bot3j
+bo4tu
+bou5ta
+boven3
+boy5
+1b2r2
+braat4
+b4re
+breis4
+brei5st
+bri4a
+bri4l
+bro4n
+bru2l5
+2b1s2
+b3s4c
+b2sla
+bsou4
+2b1t2
+bt4s3
+1bu
+buit4j
+bus3c
+bu2su
+b1v
+2bw
+by5la
+byr4
+bys4
+2b1z
+1ca
+ca4chem
+cae3
+cag4
+ca2k
+came5r
+can4nes
+ca3pa
+ca2pe
+ca5ra
+cara4t
+ca4re.
+ca3ro
+cas3t
+cat2
+ca3ta
+cate4r
+ca3th
+2c1c
+cca5
+cce4s
+1ce
+cee2
+cei4
+3cel
+celi4n
+ce4lop
+4cema
+ce3na
+2ceni
+3cent
+cen4t5j
+4cepa
+ce3ra
+5cere
+ce3r4o
+ce2s
+ce3s2a
+4cesp
+ce3su
+ce2tj
+2ch.
+chaar4s
+char5t
+chas5
+4chav
+2chc
+2che.
+4cheb
+2cheg
+2chek
+che4lee
+4chemu
+4cheor
+4chep
+3cheq
+che3ri
+4chero
+2ches
+2chev
+4chg
+4chh
+chi4k
+5chlo
+4chm
+4chn
+cho3s
+2chp
+3chris
+5chromo
+2cht
+3chum
+2chw
+1chy5
+3ci
+ci4al.
+cier4s
+ci1eu
+ci4le.
+ci4nen
+ci1p
+ci4so
+ci3t4
+ci5ta
+c3j
+2c2k
+cka4
+ck1en
+ck3ers
+c5keten
+ck5etk
+ck3l
+ck3n
+cks4
+1c2l
+cle4v
+c4li
+cli4q
+clo4ne.
+clo4se.
+cly4
+2cn
+cno4
+1co
+3co.
+3coa
+co5ad
+3cod
+5co2k
+3col
+co4le.
+colet4
+co2lu
+3com
+3con
+con3g
+con3s
+con5t4
+cop4
+3copa
+co4pe.
+co3pr
+coquet4
+3cor
+co3ro
+corp2
+corps5
+cor5s
+3cos
+3cot
+3cou
+4cout
+co2v
+cov5erb
+cov5ers
+4c1q
+c4ques
+1c4r2
+cra4y
+2crib
+3cris
+5crit
+cros4
+cross5en
+crui4
+2c1t
+ct3ad
+cte2n
+c2th
+cti4on.
+cti4ons
+c2tj
+ctoi4
+c2ton
+ct5ond
+cto4rin
+c2t5re
+ctu4re.
+1cu
+cu4ad
+cuk4
+3cul
+cur3s
+5cy
+cy4th
+c3z
+1da
+5da.
+3daag
+4daam
+4daanb
+d3aanw
+4d5aap
+4d5acc
+d5adel
+2d1af
+da3fr
+da2ga
+da4ged
+da4g5et
+da4gon
+dag3op
+da4gor
+da2gr
+da2gu
+5dai
+5dak.
+d4a5ke
+5daken
+2d3akk
+dak3l
+da2k3r
+4daks
+d5aksen
+4dalar
+4dalm
+da2l5u
+d2ame
+dames5
+3dan
+da4nas
+dan4kl
+dan4sm
+dans3p
+2d1ap
+d2ape
+3dapes
+5dapu
+da2ra
+2d1arb
+3dari
+dar2m
+darm3a
+das3t
+5dati4
+dat5j
+2d5atl
+5daue
+4d3aut
+da4ve.
+2d1b4
+dbou4wi
+2d1c
+2d3d2
+dde4lev
+dde2n
+dde4red
+dde4ree
+dder5o
+dde3s
+1de
+de1ch
+deeg5
+2deen
+5deen.
+dee4r
+deer5i
+dee3t
+4deff
+4deg.
+2dei
+de4klaa
+de4klag
+de4kna
+4deksa
+de4lac
+4delas
+del3dr
+4delec
+del5eeu
+4delek
+4d3elem
+5delen
+de4leng
+de4lon
+del5or
+de4lov
+del4sl
+del4str
+del5t
+4demai
+4demm
+d5emme
+d4en.
+de4nab
+den4ac
+den4du
+de4nep
+4d5engt
+den4kof
+den4kop
+den4kr
+de2no
+den3oo
+der5aan
+de3rab
+de3ras
+de4rei
+der5ein
+de4rem
+de4rep
+de4ret
+der5fr
+de4rim
+de4rin.
+der3k
+der3na
+der3of
+der3on
+der4sa
+der5th
+4derts
+der5tw
+der1u
+de2s
+desis5
+de4sk
+des5kr
+de3sl
+des4pel
+de3sta
+des3ti
+de5stic
+de3sto
+de3str
+det2
+de3ta
+4deten
+detes5
+de3tw
+4d5eu4ro
+de5us.
+dewin4d
+2dex
+3dex.
+2d1f2
+2d1g
+d4ge.
+d4ges.
+d3g4l
+2d1h
+d3he
+dher5i
+dhun4
+1di
+dia3s2
+dic5k
+5die
+die2f
+dienst5r
+diep5l
+die5sp
+die4tra
+di1eu
+di2ga
+dig3aa
+2dijz
+d5ijzer
+di4ko
+dik5w
+2dind
+d5indi
+2dinf
+d5ingeni5
+din5gh
+2dinr
+2d1ins
+4dinw
+4dinz
+dis5co
+di4sin
+dis5t
+dit5j
+2d1j
+2d1k
+2d3l
+dlan4de
+dli2n
+2d1m
+dmoes4
+2d3n
+1do
+5do.
+5doc
+2doef
+doe2l
+5doi
+d4ok
+dok4r
+dol5f
+dolk3s
+do2mo
+dom2s
+2d5omz
+5don.
+2dont
+3donti
+dont4l
+doorn5ac
+2dop
+do4pe.
+do4pes
+3dopj
+d3o4pl
+5doppen
+3dopt
+d5oree
+2d1org
+do3ro
+dors3m
+do3sk
+5dovl
+2d3p2
+dpren4
+d2r2
+3dra
+4drand
+4drap
+4dras
+d4re.
+d3rec
+d3red
+5dreef
+d3rege
+4d3rel
+d5rem.
+3dremp
+d5rese
+d3resu
+5dreve
+2dric
+dri5en
+dries4
+drie5t
+3d4rif
+d3rijd
+d3rijk
+3drijv
+3drin
+3dris
+d3rit
+dri2v
+4droei
+3drog
+4drok
+d5roman
+d3rond
+d3rood
+4droos
+d3rov
+d4roy
+4d3roz
+4drug
+drug4s
+d3ruim
+3druk
+4drus
+4ds
+ds1a
+dsa4d
+ds2al
+dsas3
+d3sch
+ds4cor
+d4sed
+d2see
+d4sek
+dse4la
+d3sen
+d4ses
+dsex2
+d5sfeer
+d2si
+dsi4ga
+d2sl
+d3slaa
+d3slac
+ds5lam
+d5slang
+ds3lie
+d3slin
+d5s4mak
+ds4mee
+ds3na
+ds3no
+d3snu
+ds1o
+ds2oo
+d4spal
+d5s4pel
+d4spet
+d1spi
+d4spon
+d3spor
+ds4pre
+d1st
+d3sta
+d4staal
+d4stab
+d4staf
+d4stal
+d3ste
+d4stek
+d4s5tera
+ds3th
+d4stit
+d2su
+d3sur
+2d3t2
+1du
+du4bl
+2duil
+dui4t
+4duitg
+du1o
+dus3
+dut5j
+du4wee
+2d1v
+2d1w
+d2wa
+d3waar
+d3wac
+4dwarm
+4d3wat
+d3weg
+d4wei
+d3wek
+d3wer
+d3wes3
+d3wet
+1dy
+4dyo
+dy2s3
+2d1z
+d2zj
+e1a
+e3aa
+e3ac
+e4ade.
+e4ades
+ea2di
+ea4dor
+ead5s4
+ea5fr
+ea2gu
+e3ai
+ea2k
+e2akd
+e4ake
+e4ako
+eals4
+e2am
+e3amb
+e5anc
+e3and
+e3ant
+e4anu
+e5ap
+ea2ri
+ea2s
+ea5si
+e4at.
+e2ath
+e4atm
+eatri4
+eatu4
+eau4n
+eau3s4t
+e1b
+e5bo
+ebo4k
+e3br
+e3cha
+e1che
+ech5es.
+e1chi
+e3cho
+echte5ri
+ec3le
+3econo
+ecor2
+ec4tin
+e1d
+4ed.
+e3dam
+edenk5r
+ed3ijz
+e2dov
+ed5ric
+e3dru
+edsel3
+ed1sp
+ed2w
+e3dwan
+e2e
+ee2da
+eede5r
+ee5do
+eed5w
+ee2f
+eef3l
+ee4gli
+ee2gr
+ee2k
+eek5ak
+eek1e
+ee5ker
+eek5lo
+eek3n
+ee3ko
+ee3kri
+eek5ro
+eek3ur
+eek3uu
+ee2l
+ee3led
+ee3li
+eel3k
+eel4si
+2eem
+ee2n1
+eeng4
+een5ie
+een3k
+een3sl
+eep3ac
+eer1a
+ee2ri
+eer5ijz
+eer3in
+eer3k
+eer3om
+eer5oom
+eer4ov
+eers5ag
+ee2s
+ee3sc
+ees4ch
+ee4sem
+ees3li
+ee3smu
+ee3spr
+ees3te
+ee2t
+eet3h
+eet3oo
+eetra4
+ee4tw
+e5ex
+e4fad
+ef3da
+ef5do
+3effec
+3effek
+ef4fle
+e1fl
+e4fom
+e1f2r
+ef3sm
+e1g
+egas4k
+e4gec
+ege4las
+ege4lov
+ege5ner
+e4gos
+eg3s4
+e1h
+eid4sp
+ei1e
+eie3s
+e1ij
+eil5aar
+eil3d
+eil3m
+ei2lo
+e2in
+ei4nap
+ein4do
+eind5oo
+ein4dr
+ein4du
+ei4ned
+ei5po
+ei4re.
+ei2s3a
+ei5sla
+eis4lo
+eis4p
+eis4ta
+eis4tel
+ei5stene
+ei5str
+eit2
+eite5s
+ei1tj
+ei4too
+eit4s
+eit3z
+5eiwit
+e3j2
+e3kaa
+ekaart5j
+e3kam
+e3kas
+2eke
+ek4er
+ek2et
+e4kez
+ek3ins
+e5klam
+e4klast
+e3kled
+ek3les
+e5klim
+e5klin
+e4koli
+ek3ov
+ek4ru
+ek1sa
+3eksam
+3eksem
+eks1p
+e1kw
+e5ky
+e1la
+e5laag
+elaats5t
+el1ac
+el5adj
+el1af
+el5appel
+el3arb
+e4l5arm
+e4las.
+el5dak
+el2dr
+5electr
+el5eier
+5elektr
+e2lel
+el5elp
+e3len
+e3lep
+e4lert
+e4leta
+ele4t5j
+e3lev
+el4faa
+el4fend
+elf5lo
+3elfta
+el3gl
+elie5t
+e3lig
+eli5kw
+e4lind
+e4linga
+elings5t
+e5lins.
+eli4p
+el5isw
+3elix
+elk3s4
+ellings5
+e1lo
+e2lob
+e3lok
+e2lol
+el3oli
+e4lom
+el5omt
+el5ont
+eloofs5
+e5loos
+el3ops
+el5opt
+el5opv
+e2lor
+e5loz
+els5ag
+el4sj
+el5smed
+els2u
+e1lu
+eluks5
+e1m
+ement5j
+e5meri
+emes3
+em3ins
+e4mir
+5emplacem
+en1ac
+e2nak
+en3akk
+e2nal
+en5als
+en5alt
+en5amb
+en3ana
+e2nap
+en3app
+e5nari
+en5ars
+e2nas
+en3asi
+ena4sp
+e2nav
+e2naz
+en4ce.
+en3dar
+ende4ra
+5enderti
+en5dop
+en4dur
+e2nec
+en3ech
+en3eil
+ene4n3
+e4nent
+en5epo
+e3ner
+e4nerf
+3energ
+e4nerv
+e3nes
+enes5te
+e4nete
+en5eter
+ene4t5j
+e2nex
+en3ga
+enge3s
+engs4
+eng5ste
+e4nid
+enier4t
+en5inga
+enings5
+e4nink
+e3nis
+4enkl
+en4kre
+en5krin
+e2non
+enoot3
+en1op
+eno4pl
+e2nor
+e3nor.
+en3ord
+en1ov
+ens5k
+en2sl
+en2sn
+en2so
+ens3on
+en5ste.
+enst5ijv
+en4stin
+ent2h
+en4trol
+ent4sl
+ent4sp
+en1ui
+e2nun
+en3ur
+e2nuu
+5envelo
+e1o
+eoga4
+e3on
+eonti4n
+e3op
+eop4l
+eop4r
+e4or4ge
+eo1ro
+eo3s4
+eota4
+e1p
+ep2a
+e4paf
+ep4ap
+e4peen
+3epid
+ep3j
+e4poge
+eponde5
+ep5rei
+ep2s
+eps3pr
+ep4tr
+e1q
+e3ra.
+e3raad
+e4raap.
+e5raat4
+er1ac
+er3afd
+e1rai
+er3aks
+e4rall
+e5rami
+e3ranc
+e5rans
+e5ranti
+e3rape
+e1rat
+e2rav
+erd2a
+erd4i
+er3do
+er3d4w
+e5re.
+e5reb
+e3rec
+erecord5
+er5eers
+er3eff
+eregis5
+er5eier
+e4reig
+er5eind
+er3eks
+erel2
+e4r5emm
+e5rena
+ere5nad
+e5rend
+ere4neg
+eren5sl
+er5en5tw
+ere4se.
+ere4tj
+e4rets
+er3gl
+e1ri
+erie3s
+erie3t
+e3rif
+e3rig
+erig5a
+e3rij.
+e3rije
+e4rijs
+e4rijz
+er5ijzer
+e5rik
+e4r3ind
+e5ringst
+er3ins
+e4r3int
+erip4
+e3ris
+e3riz
+erkeers5t
+er3ma
+er5mi
+er3mo
+e3ro.
+e1rob
+e4roc
+e1rod
+e1roe
+e4roed
+er5oef
+er5oev
+er5ogen.
+e3rok
+e1rol
+er3oli
+er5om.
+e3roma
+er5omh
+er3omk
+er1on
+e3ron.
+e5roni
+er3oog
+e5rook
+er3oor
+e2r1op
+ero4pi
+erop5r
+e4r1or
+e1ros
+5erosie
+e3rot
+er1ov
+er3oxy
+er5ste.
+ert4h
+er5ti
+er5to
+er3tr
+e1ru
+e3ruim
+eruit4j
+eru2m
+5erupt
+e2r3ur
+er3uu
+5erwt
+4es.
+es4a2m5
+e3san
+e3sas
+e3sch
+e5sec
+e3sem
+es5enc
+esent5j
+e5sfeer
+es5he
+e3shop
+e5sid
+es3ill
+e3sjo
+3eskad
+e1s2m
+e1sn
+e1so
+es5ob
+e3sol
+e1sp
+es3pek
+e4spen
+e5spendee
+es4poo
+essis5
+est5ac
+e3stad
+es4tak
+est5akt
+e5stali
+es5tant
+e4s3te.
+e5sted
+es5teli
+e3s4tem
+es3ten
+e4s5ten.
+e5stene
+e5steng
+es3ter
+e5sterre
+es4teu
+e2sti
+e5stich
+es3tig
+es3tin
+e3stof
+e1stu
+e3sy
+e1ta
+e3tali
+et4ana
+eta4p
+e4tau
+e3te
+etek4k
+etens5u
+ete3ra
+eter4s5l
+e1th
+et2ha
+et3ham
+etien4
+e3til
+e3ting
+e1tj
+et2jo
+e1to
+e3ton
+etou5c
+etour5
+e1tr
+e5tran
+et5rec
+e5trek
+e4t5rin
+et3rui
+et3sap
+et4sla
+et4sli
+et2sp
+ets3pr
+et4stek
+et3s4u
+e1tu
+5etui.
+et2w
+e3twi
+4eu.
+eu4ce
+eudo5
+eu3e
+eug4dr
+eug4r
+2eui
+e1uit
+eu4ler
+e3um.
+eu4na
+eun3s
+eun3t
+eu5pe
+eu4rad
+eu4rat
+eu4rij
+eur5k
+5europe
+eus3t
+eut2h
+e5uu
+2eu2w1
+euws5a
+e1v
+eval4s
+eve5naa
+5evenre
+evens5e
+even4st
+eve3ri
+evoels5
+evol4ga
+e1w
+e5wen
+ew5er.
+ew5ers
+ew2h
+e3wi
+1exam
+1exem
+4exi
+1exp
+3extr
+ey2n
+eys4
+e1z
+4ez.
+ezen4s
+ezin4s
+1fa
+f3aar
+f4ab
+face4
+facet5
+2f1ach
+5faci
+fa4den
+f4ag
+fa5go
+fa2ke
+fal4to
+4fana
+fant4
+fan4t5j
+fa4re.
+3fase
+f2av
+2f1b
+f1c
+2fd
+f2da
+f4dele
+fde4s3
+fdes4m
+f4dh
+f2din
+fd5inga
+f3doe
+f1dr
+fd4ra
+fd4ru
+fd2w
+1fe
+fe2a
+fede1
+fee4l
+f3een
+3fees
+feest5r
+fei4t5j
+f5elem
+fe4lov
+3fem
+fen3t
+fe3rab
+fe3ran
+fe4ret
+fes3
+fes4p
+fe4tj
+feur4
+2fex
+2f1f2
+ff3s4
+f3fu
+4f3g2
+fge1
+fgo4v
+4f1h
+1fi
+fiber5
+fi3ch
+3fie
+fie3tj
+fiets5p
+fijn5sp
+2f1ijz
+fi4le.
+film3a
+5fine
+fi4nel
+fi4no
+4fint
+fis5t
+fisto3
+f1j
+2f1k
+f2l4
+2f5laa
+f3laf
+fla2p5
+fle2t
+f5lev
+4flie
+4f3lij
+f4lip
+f4lor
+f4lot
+f3loz
+2f3m
+fma4d
+f1n
+1fo
+2foef
+2f3of
+5fok
+f3oms
+fon3te
+f3oog
+2f1o2p
+2f3org
+3form
+fo5ro
+for4tj
+fo1ru
+fo5t
+foto5f
+2f3oud
+foy4
+2f3p
+fr2
+1fra
+f5raam
+fra4m
+f2ras
+f2raz
+f3reg
+fre4t
+f4rez
+f2ri
+f3rij
+fri4te
+f2rod
+4frol
+fru3g
+2f1s
+f2sa
+f3sch
+f3sel
+f4sh
+fsho4
+f3s2j
+f4slap
+f4sled
+fs2m
+f2s1o
+f3ste
+fste4m
+fs5terr
+f3s4ti
+f3stof
+f5stok
+f3stu
+2f1t
+f4tene
+f2th
+f2tj
+ft3je
+f5to
+f5tro
+ftwa4
+1fu
+f2un
+2fuu
+f3uur
+2f1v
+2f1w
+1fy
+4f1z
+1ga
+gaar3t
+4gabc
+gabri5
+gaby4
+2g1ac
+4g5afs
+4gaft
+4gafw
+4gah
+gal2a
+gal5ach
+ga5lav
+ga4mes
+gamo4
+gan3d
+gangers5
+gan5gr
+g5anker
+gan4st
+gapo4
+4g3arb
+5gare
+g3arm
+g3arti
+ga2s
+ga4se
+gas5o
+gas3p
+gas3tr
+2gaut
+4gavo
+gazi2
+4g5azin
+2g1b
+2g1c
+2g1d
+g3de
+g4dell
+g4dim
+g3doe
+gd2s
+1ge
+ge3a
+ge4ari
+ge5au
+4geb.
+2g3ebb
+2gebd
+4gebt
+ge1c
+ge5d
+gedan4
+gee4
+ge3ei
+g3eend
+gee2r
+ge5ess
+geest5r
+gef4
+4geff
+ge5g2
+ge5h
+gei4la
+gei4tj
+gek4l
+ge3k4w
+gel4da
+gel4du
+gel3f
+ge4l5oor
+gel5ore
+gel3sa
+gel3sn
+4gemb
+4gemf
+4gemp
+ge4ned
+gen5ent
+g5engt
+gen3k
+ge4noc
+gen5och
+ge4nof
+ge4nog
+gens4f
+gen5sfe
+gen4su
+gen4tr
+ge5p4
+ge1ra
+ger5aan
+ger4dr
+ge4reng
+ge5req
+ge5rij
+ge1r2o
+ge5roc
+ger4sp
+4gerts
+ge3ru
+geru5m
+ge1s2
+ge3s4a
+ge3sc
+ge5se
+ge3sh
+ge3sj
+4ges4k
+ge5s4l
+ge3s4m
+ge3so
+ges4p
+ge5sper
+ge3spl
+ges4te
+ge5stil
+ge3ta
+get4i
+get4j
+ge5tjo
+ge5tsj
+ge3t4w
+3gev
+2g5ex
+2g1f2
+4g3g4
+gge4nol
+2g1h
+g2het
+g2hum
+1gi
+gier4s
+gi1eu
+gi2f
+2gij
+g5ijzer
+gi4mes
+gi4nes
+2ginf
+g5ingeni5
+gis5trer
+2g1j
+2g1k
+2gl
+g3la2m
+3gla4s
+3glaz
+g2le
+g3leg
+g3lei
+4g5lep
+g3ler
+gli2d5
+glij5ko
+3glik
+g2lim
+gli4n
+g5lio
+3glob
+3glom
+4g3lon
+g1loo
+g1lop
+5glos
+3g2ly
+2g1m
+2g1n
+g3na
+gneet3
+g4ners
+gne4tj
+g2no
+g5nol
+g3non
+1go
+5go.
+go2a
+2goc
+g1och
+godon4
+god4s
+goed5a
+2goef
+goes3
+go5fr
+4goh
+go2k3
+go2ma
+gom5ac
+go4mel
+4g3ong
+4gont
+2g3oor
+2gop
+gop4la
+4gore
+4gorg
+g5orga
+gor4s
+gos5p
+go3tr
+gou4dee
+gouil4
+2gov
+2g1p
+1g2r2
+g3rak
+gra2m
+g4ra2s
+gra4ves
+2g3red
+gree4
+g5reel
+2grei
+g3reis
+4grem
+gren4s
+gre4s
+gres5l
+griet5j
+g3rijk
+grijs5t
+gri4mes
+2griv
+groeps5
+groet5j
+4grok
+g3roke
+4grou
+5groun
+2g5rug
+g3ruim
+g3ruk
+2gs
+gs1a
+gsas3
+g2sc
+g3sch
+gs5chef
+g4sco
+gscorres5
+g4scr
+g2se
+g5se.
+gs1ef
+gs3eig
+gs3eis
+gs3ek
+g3sel
+gs3f
+gs5he
+gsher5
+g2s1i
+gs4ke.
+gs4ken.
+gs4kes
+g2sl
+g5slang
+gs4lep
+gs3lie
+gs5lis
+g3slu
+g4sma
+gs4maak
+g3snoe
+g2s1o
+gs3p
+gs4pel
+g5spele
+gs4pet
+gs4pi
+g3spie
+gs5pir
+gs5taal
+g5staand
+g5staar
+gs5tab
+gs5tac
+g5stal
+g3stam
+g5stat
+g1ste
+g3s4te.
+gs3teh
+g3stel
+g4stelg
+g5ster.
+gs5tera
+g5sters
+gs3th
+g3stig
+g5stof
+g5stok
+g3stu
+g2su
+gs1ui
+gs3uu
+gs5w
+g3sy
+2g1t
+g4tap
+gtui4gi
+1gu
+gu4al
+gu2at
+gu2e
+2gue.
+3guer
+guet4
+guim4
+gui4ne.
+2g3uit
+gun3
+gus3
+2g1v
+2g1w
+3gy
+2g1z
+h2a
+haar3t
+hac5k
+haf4tu
+hair5s
+ha4kr
+hal2f3
+2hamp
+han4d5o
+han5dru
+han3ga
+hang3s
+han4sl
+han5so
+hap5l
+ha2p5r
+hap4se
+haps5te
+ha5ren
+har4t3a
+har4th
+hart3j
+har4to
+hart5sl
+has3
+ha4tek
+ha2t3r
+hat5s
+4h1b
+4hc
+2hd
+h4e
+4he.
+he2ad
+he2ar5
+3hech
+heel3o
+he4fe
+heids5p
+hei5k
+hei4t
+he4kan
+he2kw
+he4lan
+hele4n
+hel4m3a
+he4lov
+hel4pa
+hel4pr
+3hemd
+hemme4
+hen4kr
+2heo
+he4pij
+he2pl
+he2p3r
+hep5s
+he2q
+he1ra
+he5raa
+her3ad
+he3ral
+he3rau
+her3c
+he3rem
+he2ri
+her5inn
+herm5eng
+her4paa
+herp5ac
+her4pr
+her3s
+he3sa
+he2sp
+hes3t
+hete1
+heut5j
+4hew
+4hf
+h3h
+4hi.
+hi5d
+hie4dr
+hie4f
+hie2r1
+hie4to
+hie4tr
+hilip4
+hi4ma
+him4pl
+him4pr
+hin4tj
+hi5q
+2hir2
+hi4re
+hirt5
+his5p
+hi5tr
+4h1j
+2hl
+h2le
+2h2m
+h3ma
+h3me
+h4mer
+h5mo
+4h1n
+h2na
+h2nit
+ho5a
+2hoc
+5hockey
+ho5dr
+5hoed
+hoe4ker
+hoe4k5n
+hoek5st
+hoe4sl
+ho2fa
+hof5d
+ho4fe
+hog4
+ho2k
+ho4le.
+ho4me.
+ho4mec
+ho4mes
+hon3dr
+hon3ga
+ho5ni4
+honig3
+hon4se
+hoo4
+hoofd5r
+hoorn5ac
+ho4pl
+ho4po
+hop4sm
+hop4str
+ho2q
+ho1ro
+hor4se.
+hor4tj
+4ho3ru
+hos5t
+hot5j
+hou4se
+hout5a
+2how
+4h1p
+hpi4
+2h4r
+hra4b
+hri2
+hris5
+hro4b
+hro4k
+4h1s
+2ht
+h4t1a
+h5tans
+ht3au
+h4t3ec
+h4ted
+h2t5ee
+h2tef
+h4teks
+h4temb
+h4ten3t
+hter1
+hte4rin
+hte4ro
+h4tesk
+h2t3ev
+h2tex
+ht1h
+ht1j
+ht1o
+h1ton
+ht5oor
+h4t3r
+ht2s
+ht4ser
+hts1o
+ht4som
+hts3pl
+ht5spoo
+ht5spri
+ht3sta
+hts5teg
+ht4stek
+ht4sten
+hts5u
+ht3u
+hu2ba
+hug2
+huid3a
+huim3a
+hul4der
+hulp3a
+hu4me.
+2hus
+hu4te.
+hu4tes
+hut5j
+huw4do
+4h3v
+2hw
+h2wei
+4hy.
+3hyp
+hype2
+hyper5
+h3z
+i1a
+i4aalt
+i5aaltj
+i3ac
+i3ae
+iaf2
+ia3g
+i3ak
+iak4l
+i2als
+ian4n
+ia5no
+i4ans
+ias4me.
+i3au
+iave4
+i1b
+i2bac
+ibu3e
+i5ca
+ica4p
+i3cen
+i1cha
+i1che
+i3chi
+i1cho
+4ici
+ick5er
+ic5key
+id3ach
+id3ame
+i3dat
+idder5a
+id4e
+5ideolo
+ider4sp
+ider4st
+id2g
+idings5t
+i2d5ir
+id3ru
+id2s1
+id4s5a
+id4si
+ids3l
+ids3o
+ids3p
+id4stem
+ids5tr
+iduw4
+id3w
+ie3a
+ie4dac
+i1ee2
+ie2fl
+ie5fla
+ie2f3r
+ie4gal
+ie4gas
+ie4gu
+iekes4
+ie2kl
+ie2kn
+ie4kond
+ie4kre
+ieks3p
+iek3t
+ie4kuu
+ie4laa
+ie4las
+iel5do
+ie3le
+ielf4
+iel4le
+ie4mov
+i4enc
+ie4nij
+ien4sta
+ien4st5o
+ien4str
+ien4stu
+iep5ac
+ie4plo
+iep5sc
+ie4pui
+ie3rad
+ie3rap
+ier5as
+ie4rat
+ierk4
+ie3roo
+ier4re.
+ier4sl
+ies4e
+ie2sl
+ies3li
+ies3m
+ie2sn
+ie2so
+ie2sp
+ies5se
+ie3sta
+ie4ste
+ies5te.
+ie5stel
+ie4taa
+ie4t5ant
+ie4tap
+ie4tho
+ie2tj
+ie4tog
+iet5oog
+ie4trot
+i5eursb
+i5eurse
+ieuw4a
+2if
+if4tang
+if4tr
+if4tui
+ig5aard
+i5gat
+i4gav
+i4gins
+igit4
+ig3n
+ig4ner.
+igs4
+ig3sc
+ig3sto
+i5gue
+i1h
+i3i
+i4j
+2ij.
+ij1a
+2ij1e
+ije2n3
+ij1i
+ij3o
+2ijt
+ij5te
+ij5ui
+4ik
+i4kak
+iker5k
+ikes4
+i2kij
+i2kn
+ik3na
+ik3ni
+ik3re
+ik5se
+ik1sp
+ik1st
+ik3we
+2il
+i1la
+il3ac
+ila5d
+i3lak
+il2da
+il4din
+il2dr
+ild3ri
+ilds4
+i3len
+ile4t
+ilet5j
+ile3u
+i2l3ez
+ilie5g
+i4link
+ilk5s2
+illa3s
+il2ma
+i1lo
+i3lof
+il3oor
+il3or
+il4sti
+il5te
+il2th
+i3lu
+i5mag
+ima4ges
+i2me.
+i2med
+iment5j
+i4met.
+imma4g
+imme4la
+imon4
+im3op
+imo4r
+5impu
+im4sm
+imte3
+in1ac
+i5nars
+in4as
+in5che
+in4dene
+inder5a
+in5dexe
+3indru
+1indu
+1inf
+in4gaa
+in4gag
+in4gal
+5ingang
+5ingenie
+in2go
+in2gr
+ing3ru
+ing4s3e
+3inhou
+i2n5i4o
+5initia
+in2kn
+ink3na
+3inkom
+inlever5i
+inos4t
+1inri
+in4sa
+insi4d5
+insis5
+in5spe
+3insta
+3in5sti
+5instru
+inta4
+in4tap
+5interpr
+in5top
+int4r
+inuut5
+3invlo
+i3o
+io1a
+iog4
+io4nin
+ion4s3
+io3pr
+io1s4
+io3sko
+iot4r
+io5ui
+i1pa
+ip3ac
+i4perw
+ipe4tj
+ip3j
+i1pl
+i3pot
+i4ps
+ipsi4
+ip4sle
+ipu4r
+i1q
+4ir
+i3ra
+iraat4
+ir2e
+i4red
+ires4
+iret4
+i1ri
+i1ro
+ir2s
+ir3ste
+i1ru
+i1sa
+i4saa
+i2sad
+i4sak
+i4s3ap
+is1ar
+i2sas
+i4sau
+i2sc
+isci4n
+i2s3ei
+i4serv
+ise4tj
+i3sfe
+isi4ne
+i3sji
+is4koo
+i2s3l
+is4laa
+is4lui
+i4s5m
+is3n
+5isola
+is5oli
+is3p
+is5pl
+is3t
+is5tab
+istal3
+ist5ap
+is5tas
+i5s4tat
+is5ten.
+is4th
+isti4n
+is5tor
+is4tra
+is4tre
+is4ty
+2it
+i1ta
+it1ac
+it3ach
+i3tan
+i5te2n
+iten5aa
+i3ter
+i4thou
+i3thy
+i3t2i
+itie5s
+i1to
+i5t2ou
+it5red
+it1ri
+it3ru
+its3ei
+it5sen
+it3smi
+it5sop
+its3u
+i1tu
+it3w
+4i1u2
+ium1
+i5u5r
+i1v
+iver4a
+ive3re
+ive3ri
+ive3s
+i5vi
+i1w
+i1z
+ize5t
+i4zl
+izo5t
+jaar5t
+2jaf
+jager4s
+ja4ke
+ja5la
+j4am
+ja4me
+ja4ne.
+jani4
+ja4no
+jan4sl
+3jar
+jas3p
+jaz2
+2j5b
+jbe4li
+j1c
+jc5k
+4j1d
+j4daa
+jde4ne
+jden4s
+jde3s
+j4dog
+j2dr
+jd3re
+jd3ri
+jd5ros
+jds5li
+j4du
+je2a
+jean4n
+2j1ee4
+2jei
+jek4tr
+j1en
+je3r4o4
+je4s3
+5jesha
+jes5pa
+je5su
+je2t
+je3to
+jet3r
+jet3u
+jeugd5e
+j2f1a
+j4fec
+j2f3ei
+j2f1en
+j2fij
+j4fin
+jf3l
+jf4la
+j2f5ol
+jf5r
+jf2s
+jfs3ec
+jfs5ek
+jfs5tak
+jf5stan
+jf3str
+jft4
+j1g
+jg5laa
+j4gre
+jg4st
+4j1h
+2ji
+3jic
+jif5
+jin3
+ji5t2
+j5j
+2jk
+j2kaa
+jk5aard
+jkaart5j
+j4kag
+j4kar
+j4kas
+j4kek
+j4kerv
+j2kij
+jk5ins
+j2kl
+jk5lap
+j3kle
+jk3li
+jk3lu
+j2kn
+j4kof
+j4kol
+j4kon
+jk5ond
+j2kor
+j2kr
+jk5raa
+jk3re
+jk3ru
+jks3a
+jk2si
+jk2sl
+jks3n
+jk3soo
+jk5stra
+jk3th
+j2kui
+jk3waa
+jk3we
+jk3wi
+j1la
+jlijs4
+jl3k
+j1lo
+j2loe
+2jm
+jm3af
+j3mi
+j2n1a
+j4nerw
+jne3s
+j4net
+jn5eti
+j4nex
+jn3g
+j4nim
+j4nink
+j2n1o
+jn4sce
+jn2si
+jn2sl
+jns5lac
+jn2sp
+jn5sti
+jo4a
+jo5ac
+job2
+joden5
+jo4ke.
+jol4e
+3jon
+jone4
+jo4nes
+jongens5
+j4ou
+jou4l
+3jour
+joy4
+j1p
+jp3ac
+jpe3s
+jp3j
+j2pli
+j4pre
+j4pri
+4j1r
+4js
+js5a
+js4e
+j3sel
+j2s5em
+j2s1i
+j2sl
+js3li
+j3slu
+j4so
+j1sp
+j2spo
+j1sta
+js5teb
+j3stel
+js3ten
+j5s4tend
+j4s3ter
+js5tin
+j1str
+j4stran
+j1stu
+j2su
+2j1t
+j4taar
+j5te.
+j2th
+j3the
+j4top
+j2tr
+jt3ra
+jt4rad
+j3tre
+jt5ri
+j3trok
+ju4a
+juit4
+ju2le
+jumel4
+jus3
+justi4n
+j1v
+jve4n
+jve3ri
+jver4sp
+j1w
+j1z
+jze4ro
+jzer5sm
+1ka
+kaas5
+2k1ac
+3kache
+kadet5
+4kaf.
+4kafs
+k5agen
+4kah
+4kaks
+4kalb
+kalf4s
+kal4k3a
+kal4kl
+4kalt
+k5alta
+2kamb
+kam4pr
+4kang
+ka3n4o
+kan4sl
+kan4t3j
+kant3r
+ka3pa
+ka4pl
+kap3la
+4kappa
+kap3s
+k5arbe
+2karm
+ka5ro
+k3arti
+ka4s
+kas5c
+k5assi
+kas5tre
+kas5tro
+ka4tan
+kat3j
+ka4tog
+ka4too
+katte5s
+ka4tui
+2k3aut
+2kavo
+2k1b
+kbe2k
+kbek3w
+2k1c
+2k1d
+1ke
+2k5ec
+k4ed
+k5edit
+keel3
+2keen
+kee4pl
+keer4s
+k5eik
+keis4
+ke5lel
+ke5let
+2k5emm
+ke4nad
+ken5ak
+ke4n5an
+ke4nau
+ke5nei
+ke4nep
+keni2
+ke2no
+k2ens
+ken5se
+kens5po
+ken3t
+ke3rad
+ker4kn
+ker4ko
+ker4kr
+kerk5ra
+ker4ku
+ker4kw
+ker4n3a
+4kers4ek4
+4kerts
+4kerwt
+k4es
+ke3sta
+ke4s3tr
+ke4th
+ke2t3j
+4ketu
+ke4tw
+k4eu
+2kex
+k1ey
+key3s
+k3ezel
+2k1f2
+2k3g
+2k1h
+1ki
+4kied
+kies4t
+2k1ijz
+4kindu
+2kinr
+2kins
+3kins.
+ki2p
+kip3l
+3kis
+kis4p
+kis4to
+2k1j
+2k1k
+kke5ra
+kker4s
+kke3s4
+1k2l4
+3klac
+4kladi
+k5lake
+4kland
+3klank
+kla2p1
+2klat
+4kleer
+k5leer.
+5kleert
+4kleg
+5klem
+k3len
+k5ler.
+4klera
+3kle4u
+2k3lic
+k3lied
+2klij
+kli4me
+k4lon
+k5lone
+3klont
+k5loop
+kloot5
+k3lope
+5klos
+2k3loz
+2k3luc
+4kluih
+2k1m
+1k2n4
+4knad
+2knam
+3knec
+k5nek
+knies5o
+knie5t
+knip1
+2kniv
+5knol
+knor5
+2knum
+1ko
+4koct
+2koef
+koe4ket
+koe5p
+koe5re
+koe5sta
+koe5tj
+koets5p
+ko5ko
+4kokt
+kole4n3
+k5olie.
+4kolm
+3kom
+ko4m5a
+5kong
+kon3s
+kon4t5j
+4kontw
+2k3oog
+koorts5t
+4kopb
+ko5pe
+2k5oph
+ko4pl
+kop4ri
+3kopt
+koren5a
+2k1org
+kor4ta
+kort3o
+4kos.
+ko4so
+4koss
+5kot
+4kov
+4k5ox
+2k3p2
+kpren4
+1k2r
+kra2b
+k3rad
+3kran
+3krat
+2k3rec
+k5rede
+5kredi
+kret4
+2k3ric
+krijgs5
+k3rijk
+krijs5t
+krij4t
+krijt5j
+2krip
+4krol.
+4kroll
+kron5t
+kro3s
+2krou
+kru4l
+2ks
+k4sad
+ks1ar
+k2sav
+k2see
+ksem3a
+k2s1in
+ks3j
+k3slac
+k2s3li
+ks4mak
+ks4mee
+ks3na
+k1spe
+k1sta
+k4staf
+k4star
+k1ste
+k5ste.
+k4sted
+k4stele
+k3sten
+ks4ti
+k1sto
+ks5trad
+k5stue
+k2sui
+2k1t
+kt5aan
+k5te
+kte2n3
+k2t1h
+k2tin
+k4tj
+ktoet4
+kt3ond
+kt2s
+kt3sc
+kt3se
+1ku
+ku3che
+kui4f
+2k3uit
+kuk4
+5kult
+3kun
+2kuse
+kus4tr
+kut5s2
+4kuus
+2k1v
+k2w
+k3waar
+2k3wac
+k3wag
+3kwak
+k4wal
+1kwam
+3kwar
+2k5wed
+4k3weg
+k3wei
+2k3wer
+k4wes3
+5kwets
+1kwid
+kwie5t
+4kwijd
+k3wijz
+k4wik
+2kwil
+4kwim
+2kwin
+2k3wo
+4ky.
+2k1z
+4laand
+laap3
+4laard
+laar3t
+3labo
+2lac
+3lach.
+3la5che
+lacht4s
+l4aci
+3lact
+la2d3a
+5ladin
+2ladj
+la4dok
+la2dr
+lad3s4
+la4du
+2laf
+la2fa
+lafo4
+la2ga
+lag3aa
+l5agent
+la2g3o
+la2gr
+la3gra
+lag3s4
+lai4d
+lai4n
+la2k3a
+la4ki
+2lal
+l3alb
+la4mac
+lam5ou
+la4mov
+lam4p3j
+lam4p3l
+lam4pol
+4lana
+3land
+lan4da
+lan4do
+land5oo
+lan4d3r
+la4nek
+lan4em
+5lange.
+lang3l
+lan4ka
+lan4k3l
+lan4sl
+l5antil
+lan4t3j
+lap5ac
+3lapj
+la4p3l
+la4p3o
+4lappa
+la2p3r
+2larb
+las3
+la4tam
+la2th
+lat5ho
+lat3j
+la4tro
+lat3s
+la4tui
+2lau
+lau4de.
+lau4m
+la4vat
+2lavo
+la2wr
+la4ze.
+4lazi
+2l1b
+4l1c
+2l1d
+ldaat5
+l2d3ac
+ldak4s
+l4dart
+ld3een
+ld3ei
+l3d4en
+lden5k
+l4dh
+l2dom
+l2don
+l4dos
+l2d3ov
+l5drie
+lds4a
+ld3sl
+ld5sn
+ld1sp
+ld3w
+1le
+le2a
+lea2d
+lea4s
+le3at
+3leb
+ledes4
+lee2
+leeg3
+4leekh
+leem5ac
+lee4p3
+leer5ov
+lee4s3
+2leeu
+2leff
+5leider
+4leier
+4leig
+lei4na
+2l5eks4
+le4kw
+l3elem
+l2en
+l4en.
+le4nad
+3leng
+l5engel
+3leni
+len3k
+len4tr
+len5tre
+leper4
+3le5r4a
+le1ro
+le2s
+les2k
+le3sko
+4lesm
+le4sp
+le3str
+le5ti
+le2tr
+let5ro
+let4sta
+4letu
+levens5
+4levil4
+4lexc
+2lexp
+3ley
+4lf
+l5fab
+l2f1ac
+l2fin
+l5fles
+lf3li
+lf4lo
+l2fo
+l3foe
+l3fou
+lf4ree
+lf4sei
+lfs3m
+lf4spo
+l1g
+l4gaf
+l4gap
+l3gla
+l4gon
+lg1s
+l1h
+1li
+li4ce.
+4lick
+3lid
+lie4ga
+lie4gr
+lieg5u
+li3enn
+lies4t
+lieu3
+3liev
+3ligg
+lij4ko
+lij4ma
+lijm5ac
+3lijn
+4lijp
+3lijs
+lij4st
+lij5ste.
+2l1ijz
+li4ke.
+li2ko
+lilia4
+lil4le.
+4limp
+lim4pj
+2linf
+4linh
+lin4ka
+3linn
+4linr
+2lins
+lin4t3j
+4linv
+4lipj
+li4pl
+li5po
+lis4e
+5lish
+4litary
+li1th
+lit5r
+li5tu
+li4ve.
+l1j4
+lk5aard
+l4kaf
+l4kei
+l4kep
+l4klag
+l4klev
+l2kri
+lk3rij
+lk2s
+lks5tel
+l4kuu
+lk3wi
+4l1l
+l3la
+llas4
+llas5te
+lle5kw
+lles5p
+lle3st
+llinai4
+lls4
+2l1m
+lm3act
+l4med
+l4mind
+lms2
+lm3sc
+lmta4
+4l1n
+lni2
+lo5a
+3lobd
+lo4bo
+lo5dr
+loe4d3a
+loe4d3r
+loem3a
+4loes
+lofd2
+3lofi
+lof3r
+lof4s
+4logig
+lo3go
+lo4gre
+log4s3
+loi4r
+3loka
+lo4kar
+lo2kl
+lo4k5op
+lo2kr
+lo2k3u
+lomp3j
+lom4p5l
+l3omv
+lon4gaa
+long5em
+lon4go
+lon4gr
+lon4t3j
+5look
+3loopb
+4loord
+4loort
+3loper
+4loph
+4l5opl
+4lopn
+lop4r
+2lops
+2lopt
+4lopw
+l4or.
+l1org
+lo1ro
+lo4sp
+los1t
+lo4str
+lo2ta
+lot3ak
+lo2th
+lot3j
+lou2p
+lo4ve.
+lo4wed
+1loz
+2l1p
+l4pac
+lpe4ni
+lpes4
+lp2h
+lp3j
+lp3ond
+l4ques
+2l3r
+lrus5
+2ls
+l3sam
+lschaar5
+ls4cr
+l4sed
+l2sef
+l4sele
+l4sep
+ls2j
+ls3ja
+ls4kel
+l3sla
+l2sle
+ls5led
+l2sli
+ls3lie
+ls4mee
+l5sni
+ls5nu
+l3som
+l5song
+ls5or
+l1sp
+l2spr
+l5sprie
+l1st
+l4stal
+l5stall
+l4steko
+l4stele
+l4stev
+l4stou
+l2su
+2l1t
+ltaar5
+ltai4
+lt2h
+l4thi
+l2t3ho
+l3tj
+l4tjesk
+lt5jesl
+l2tov
+lu4bl
+lu1e
+3lui.
+3luid
+4luit
+lu2ka
+luk5raa
+luk2s
+3lumb
+4luni
+lu5strato
+lu5ta
+lu1th
+lu5wi
+l1v
+lva3no
+lve3ri
+l1w
+1ly
+ly5o
+l1z
+1ma
+5ma.
+3maalt
+maas5
+3m4aat
+5machi
+machts5e
+mac3k
+ma4cl
+ma3de
+2m3adv
+2maf
+5mafo
+ma4geb
+ma4gev
+mai4li
+ma4ke.
+makers5
+4makt
+ma3la
+ma5lei
+ma4lent
+5man.
+man3ac
+m3anal
+man3c
+man5do
+3mans
+man4see
+man4sl
+man4sn
+man4so
+mans3p
+man4st
+4mape
+map4l
+mar4s5t
+mas4p
+ma5str
+ma5ta
+mat3j
+m2av
+may5
+mazi4
+2m1b
+mbi4ne.
+mbi4nes
+mbo4le.
+2m1c
+2m1d
+m5do
+md2s
+md3so
+m3dw
+1me
+3me1c
+3medi
+mee3kr
+mee5kw
+mee3le
+mee3lo
+mee3lu
+mee3ri
+3mees
+mee3sl
+mee3sp
+mee5str
+mee3tr
+m5egg
+me2i
+mein4a
+4melam
+mel4ko
+mel4k5r
+mel4ku
+me5lom
+3m2en
+men4ag
+me5nas
+men4gra
+meng3s
+me4noo
+me5nor
+men5ste
+men4suu
+men4tj
+mep4j
+me1ra
+me4raak
+me4rak
+me4ram
+merg4s
+5merk
+mer4kn
+mer4kw
+mer3n
+mer4on
+3me2s
+mes4ha4
+me5spe
+me3spo
+me5stu
+me5su
+met4aa
+me5te
+3me3th
+3meto
+metrai4
+m4eu
+meus4
+2m1f
+mfi3t
+2m3g
+2m1h
+mhoog5
+1mi
+mi1ch
+miche4
+mick4
+2mid.
+3midd
+midden5
+mie5st
+5mig
+mijl4s
+4mijs
+2m5ijz
+mi5kn
+3mil
+mi4le.
+mi4men
+2minf
+min5go
+2minr
+2mins
+3mis
+mis4la
+mi3sog
+mis4ses
+mis4to
+mis5tr
+3mit
+mi1tr
+2m1j
+2m3k2
+mkaart5j
+2m3l
+2m1m2
+mmel5k
+2m1n
+1mo
+3mod
+mode4l
+3moed
+moed4s
+2moef
+3moei
+moe4raa
+moe2s
+moe5ste.
+moet4s
+3mo3g
+3mole
+m5olie.
+mol4ma
+4molt
+4momv
+mon4a
+m5onder
+monet4
+mo3no
+mon4so
+mon5ta
+m3onts
+3mooi
+2mop
+m3ope
+m3oplo
+5mopp
+mop4sn
+moquet4
+5mora
+mor4e
+mor5g
+mo3ro
+mor4sp
+mos4c
+mo4sl
+mo3sta
+mot4h
+4moud
+5mouw
+mo4ve.
+mo4ver.
+mo4vers
+2m1p
+mp3ach
+m4paf
+m4pes
+m3pj
+mp5lie
+mpon4g
+m4ps
+mp4se4
+2m3r
+4m1s
+m2sa
+m5sal
+m3sau
+m5se.
+ms2j
+m3sje
+m4sle
+m5sleu
+m3s2m
+m2so
+m3son
+m3spl
+m5spor
+m5ster
+ms4ti
+mst5id
+m4ston
+m4stop
+2m5t
+mtes2
+1mu
+mu2m3
+munt5j
+5mus
+mus5t
+3mut
+muur5
+2m1v
+2m1w
+3my
+my3o
+2m1z
+1na
+3na.
+3naal
+3n2aam
+2n1aan3
+4naap
+4naard
+n5aardi
+3naars
+naar3t
+n3aas.
+3nabe
+2nac
+5naco
+n5act
+n4acu
+n5aders
+nadet4
+3nadi
+4n3adm
+n5adv
+2n1af
+naf4l
+n2a1g4
+5naged
+3nagel
+n3agem
+nage5o
+na3gl
+na3gr
+3nai
+na1ij
+4naker
+na3k4l
+3nale
+4n3alf
+3nali
+3n2am
+n2an
+2na5na
+nan4e
+nanes4
+3nant
+nan4tj
+5na1pl
+n5apo
+4nara
+na4rap
+2n1arb
+nar5che
+5nares
+2narg
+2n1arm
+4nars
+2n1art
+na3sc
+na3s4l
+nas4m
+na5sma
+na1sp
+nas5pec
+na3stu
+n3asy
+3n4at.
+3nata
+nat4h
+n4ati
+2natl
+nat4r
+5naven
+n5azij
+2n1b
+2n1c
+n4cheo
+nci4n
+nconsis5
+2n1d
+n4daas
+n4dabo
+n2dac
+n2dar
+nd3art
+n2d5as
+n4daz
+n4d5edi
+n4degg
+nd1ei
+nde5laa
+n5den.
+n4derec
+nder5eg
+nder5og
+nd5eten
+n4dh
+n4dijs.
+nd3ijz
+ndings5
+ndi4se
+n5dji
+n4dof
+n4doli
+nd5olie
+nd3ont
+n4doog
+n2dov
+nd3ove
+nd3rap
+n2dre
+ndrecor5
+nd3rei
+nd5rek
+nds4ben
+nd3si
+nd5smi
+nd1sp
+nd4spra
+n4d5ure
+n2duu
+nd3uur
+nd3w
+1ne
+nebe4s
+n5edit
+2need
+3nee4m
+2n1een
+neer3s
+nees3
+neet5o
+2n3eff
+3ne3g2
+nege4n
+nehen4
+2nei
+3neig
+neil4
+n1ein
+n3elem
+neli4n
+ne5lo
+3n2em
+4n5emb
+4nemm
+4nemp
+ne2n
+n4en.
+n4end.
+nen3g
+nen5k
+4nenke
+nen3o
+nen5slo
+ne4pli
+ne1ra
+n2ere
+n4erg
+5n4eri
+ne4rid
+ner5kl
+ner4sp
+4nerts
+4neru
+4nesm
+ne3sta
+nes5teld
+nes5tele
+nes5telt
+4nesth
+ne3str
+ne4t5ap
+ne4ton
+ne4tru
+4netu
+5neuros
+3neuz
+2n3f2
+2ng
+n2g3ad
+n4gak
+n2gam
+n4gank
+n2gar
+n4geen
+n4gensm
+nge4rap
+nge4ras
+ng4hi
+ng3ij
+n4ginr
+n4g3ins
+ng3lad
+ng2li
+n3glic
+n3glu
+ng3n
+n2g5of
+n2g1on
+ng5raat
+ng3rai
+ng5rie
+n3gro
+ng2s
+ng4sche
+ng4s3le
+ngs5lop
+ngs5tor
+ngs5trek
+ngs5tro
+ng5t
+ngu4a
+4n3h
+nhands4
+nhand5sb
+nhom4
+1n2i
+ni5a
+ni4ce.
+n5idee
+nie5kle
+5nier
+nier5a
+ni3eus
+ni3euz
+3nig
+ni4g5ee
+nij4st
+2nijz
+n3ijze
+nika5s
+nik4s
+3nim
+2nin.
+ni5n2a
+4n3ind
+2n3inf
+4ninga
+ningeni5
+nings5tek
+nin2k3
+2n5inr
+2n3ins
+2n3int
+4ninv
+ni4pl
+ni4sel
+ni3str
+ni3th
+ni1tr
+nits4
+3niv
+n1j2
+2n1k
+nk3aan
+nk5aard
+nkaart5j
+n4kag
+n4karb
+n4kasp
+nk2ey
+n4knaa
+nk5nab
+n4kog
+nk4om
+nkomens5
+nkoo4
+nk3ov
+n3kra
+nk3rek
+nk5rel
+n3kru
+nk1s
+nk5sf
+nk4so
+nk5ste
+n2kw
+n3kwam
+nk3wat
+n5kwen
+nk3wi
+2n3l
+4n3m
+2n3n2
+nnee5t
+nne4pol
+nniks3
+1no
+4nobj
+5noci
+4noec
+2noef
+4noer
+noes3
+no5ic
+n5olie.
+3nolo
+n2oma
+n3omg
+3nomi
+3nomm
+4noms
+4nomw
+3non.
+3nonc
+n3ond
+2n1ont
+3nood
+4noof
+2n1oog
+4n3oorl
+2nop
+5n2opa
+no4pas
+no4poo
+no4por
+4n1org
+5nori
+2nork
+3norm
+3nors
+2nort
+no3s4a
+no3sk
+no3sp
+3nota
+no4tap
+3noter
+3noti
+2nov
+3n2ova
+5n4ow
+2n3p4
+npoor4
+n1q
+2n3r
+4n1s
+n2sa
+n3saal
+n5sag
+n3sal
+ns3ang
+nsas3
+ns3asp
+n3sau
+ns2c
+n3sce
+n3sch
+n4sed
+nsee5t
+n4sef
+n4seg
+nsei5g
+n5set
+n2sev
+ns3f
+ns4fee
+n3sjo
+ns4kri
+n3slaa
+n2sle
+ns5led
+n5sliep
+ns2m
+ns3mar
+n3sme
+n5smij
+ns3moe
+n5smol
+n4s3mu
+n3sne
+n3snij
+n3snoe
+n3soe
+ns3onw
+n3soor
+n4spaa
+n4spot
+ns4ta
+n4staf
+n3ste
+n4steh
+n4s5tent
+n4stenv
+n5ster.
+ns3the
+ns4tie
+n3stig
+n4stij
+nst5ing
+n5ston.
+nst5roos
+n2sui
+ns5uil
+2n1t
+n5taal
+n4t5aard
+n4t5akk
+n4tarc
+ntat4
+ntdu5iker
+n3teg
+n2tei
+nt3eig
+n3tel
+nte4loo
+n5tem
+nt5erfd
+n3tev
+n2th
+n3them
+n5this
+n3thol
+ntie5kl
+nti5kw
+nt3ink
+nt4jo
+n3to
+n4toli
+n4top
+nt3raf
+n5tran
+n4t3rij
+nt5roof
+nt5room
+n5troos
+n3trou
+nt3rui
+nt3ruk
+nt3rus
+nt4sa
+nt4schr
+n5tsj
+nt4sle
+nt5slu
+nt3sm
+nts4ma
+nt1sn
+nt5ste
+nt5t
+n3tu
+n4tuit
+ntu4re.
+ntu4res
+n5twijf
+nt4wis
+1nu
+nu1er
+2nui
+4nuil
+nu5kr
+3num
+2nur
+nuts4h
+n3uur
+5nuut
+nu2wi
+2n1v
+nvel4l
+nvil4
+2n1w
+nwa4v
+nwe4tj
+nx3a
+1n2y
+4ny4i
+4nyo
+2n1z
+o1ag
+o1al
+o1an
+oa4ti
+o5ax
+obal4
+1obj
+obos4
+ob3sk
+o3cha
+o1che
+ochet4
+o3chi
+o5cho
+o3chr
+ocke4
+ock5i
+oc5t4
+4od.
+od1ac
+odden5
+ode3ra
+odie5t
+o4dr
+od3re
+od3ri
+od5si
+ods3oo
+od4sur
+od3w
+oe2da
+oed3aa
+oed3ar
+5oedee
+oed3ei
+oede4n
+oede3s
+oe4don
+oe2dr
+oe2d3u
+oed3w
+oe2f3a
+1oefe
+oef5f
+oe2fi
+oe2fl
+oef3le
+oef5lo
+oe3flu
+oe2f3o
+oe2f3r
+oeg5ij
+oei1
+oei3s4
+oe4kaa
+oek5aan
+oeke4n
+oe2kl
+oe4kna
+oe2k3r
+oek4sl
+oe2ku
+oe2kw
+oel2a
+oe4lap
+oel3ei
+oeleve4
+oelever5i
+oe3li
+oe4lov
+oe4mac
+oe4mak
+oe4mo
+oe2no
+oen5of
+2oep
+oep3ac
+oe2pl
+oe3plo
+oep3lu
+oe2pr
+oeps1
+oep4se
+oe4pu
+oe1ra
+oe4ral
+oeren5e
+oer4sl
+oer4so
+oer4sp
+oe3se
+oe4so
+oe4t5an
+oe4tei
+oe2t3h
+oe2tj
+oe4tol
+oet4so
+oe4tw
+of3at
+ofd1a
+ofd3ei
+of2do
+ofd3on
+of2d3r
+of4du
+ofd3w
+3offic
+offici5el
+offie5
+of3l
+of4la
+of4le
+of4lu
+o3foo
+of2r
+of3ri
+of4sel
+of2si
+of2sl
+of5sm
+of2sp
+of4s5tr
+of4su
+oft2s
+of4tur
+of4tuu
+ofy3
+o1g
+og4aa
+o4gal
+oge4las
+oge4st
+1ogig
+og3le
+og3n
+og2s
+og3sc
+og3spi
+og3ste
+o1h
+2oi1
+oi4ne.
+oinet4
+ois4
+oi3sc
+oist4
+o1j
+o5ji
+o4kaas
+o4kaz
+ok3ef
+o4kes
+o2k3n
+o2k5ou
+o4kre
+o4k3ro
+ok3sa
+ok5spr
+ok1st
+ok4str
+okter4s
+4ol.
+o1la
+ol3ac
+o5lal
+olber4
+ol3ein
+o3len
+ole4ne
+ole1u4
+ol2fa
+olf3l
+olf5ram
+ol4gor
+ol4gre
+ol4gri
+olie3s
+ol4kaa
+olken5
+ol4mes
+ol5mo
+o1lo
+olo3k
+o2lop
+olo5sp
+ol3sj
+o1lu
+ol5uit
+ol3umn
+o4map
+omen4s
+om5ins
+o4mint
+2omm
+omo5s
+om4pj
+ompo4t
+3omro
+om5sl
+om5soe
+om5ste
+on3ac
+onaf5l
+o4nam
+o4naz
+4onc
+2onca
+ond3ac
+4onde.
+4onden
+5onderw
+on4dij
+on4don
+on2dr
+ond3re
+ond3sj
+on4dur
+o2n5ec
+o2ned
+4oneerb
+o4neh
+on4end
+ong5aan
+on4gap
+onge4tj
+ong3le
+ongs5k
+onie5t
+4onin
+onings5t
+oni2q
+4onk
+on4k5ap
+on4klo
+on3kw
+2onn
+onne3s
+2ono
+on2sn
+on3ta
+on4taa
+ont5aar
+5ontbi
+ont5erv
+ontes3
+1ont1h
+on4tre
+ont5rie
+on4t5rom
+3ontva
+3ontw
+o4o2
+4oo.
+oo3c
+oo4d
+ood1a
+ood1e
+ood5i
+ood1o
+ood3r
+ood5ste
+oofd3o
+oof4dr
+oo4g1
+oog3r
+oogs4
+oog3sp
+ook1
+ook5l
+ook5r
+ooks4m
+ook3w
+ool1
+ool5g
+ool5k4
+oom1
+oom5p
+oo4n1
+oon4sa
+oon5t
+oo4p
+oop1a
+oo5per
+oop5i
+oop5o
+oop4sp
+oo4r1
+oor4d5aa
+oor3g
+oor3i
+oor3k
+5oorlog
+oor5m
+oor3sm
+oor5to
+oos3
+oost5r
+oo4t
+oot3h
+oot5i
+oot1o
+oot5r
+o1pa
+o4paar
+op3ach
+o4pad
+o4paf
+o4pak
+opa4n
+3opbre
+op3een
+3openi
+3opera
+o4perw
+op5ete
+op4her
+opie5t
+4op3j
+op3l
+1opn
+4opn.
+4opneu
+o1po
+op1of
+op3ont
+op5p
+5opperv
+op3r
+op4ra
+5oproe
+ops4c
+op3sj
+op3sm
+op1so
+op3sp
+ops4t
+2opt
+3opta
+op5te
+3optim
+o1q
+o1ra
+oraat4
+o3race
+o2rag
+or3ana
+or4ce.
+or4d5am
+or4das
+or4d3oo
+or4dor
+ord3w
+orea5d
+orecord5
+o4reh
+orever4
+4org.
+or4ge.
+4orgi
+org3li
+or5gn
+o1ri
+orie5tj
+3orkes
+ork4l
+orkma4
+or4mac
+or5no
+o3ros
+4orp
+orp5ac
+or5ph
+orp4sc
+or3sme
+or3so
+or4son
+or4tabl
+or4tak
+or4t5ijl
+ort5ond
+or4too
+or4tor
+or4tred
+ort5spr
+ort5uit
+ort3w
+or1u
+o3rum
+or4un
+o5rus
+orwe4gi
+o5ry
+o4sab
+o3sc
+o4sce
+o4sci
+os4co
+os2cr
+o4scu
+o3s4e
+oses4t
+oset3
+oset4t
+osha5k
+o4sj
+os2k
+os5ke
+o2s3l
+os3m
+os3no
+o1s2o
+os1p
+os3pa
+os3pi
+o4s3pr
+o3stat
+os3te
+os4tem
+os4teu
+os4th
+os3ti
+os5tic
+os4tij
+os3tol
+os4tr
+ost3ri
+o5strof
+os3tu
+os4tun
+o3sty
+o1ta
+ot1ac
+o5tag
+ot4ec
+ot5ede
+ote4lan
+o5ten
+o5ter
+o4tesc
+o1th
+o2t1ho
+o5thor
+otli4
+o1to
+oto3a
+otor5o
+ot3re
+ot5rij
+o1tro
+ot4sl
+ot5sla
+ot4spa
+ots5tek
+ot4sti
+ot4str
+ot4stu
+o1tu
+ou5a
+oua5c
+ou3b
+ou2d1a
+ou4des
+ou2do
+oud3r
+ou1e
+oue2t
+ou3is
+ouk4
+oun4g
+ou4rar
+ou4re.
+ou4rem
+ou4res
+ou2ro
+ou4sc
+ous4t
+ous5to
+4out.
+ou2ta
+out1j
+ou2t3o
+ou2t3r
+4outs
+out5sp
+ou1wi
+o1v
+2ovee
+3ovens
+3overg
+o4ves
+2o3vi
+ovis4t
+2ovj
+o1wa
+o4we.
+o1wi
+owie5
+ow2n
+oy2en
+oy4l
+o5yo
+oys4
+o1z
+oze3s
+3paal
+2paan
+paar3t
+2pac
+pa3che
+3pact
+5pacu
+3pad.
+pa2da
+pad3ac
+pa5do
+pa4dr
+pag2a
+4pagg
+pa3gh
+4pake
+4palb
+3pale
+pal5f
+pa3na5
+pa4nad
+5pand.
+5panee
+pa4neu
+pa4nisl
+4pan5k
+pan4tr
+pa4o
+1pap
+pa4pet
+5papi
+pa4pl
+2papp
+3pa3ra
+pard4
+3park
+par4ka
+par4kl
+2p3arm
+1part
+3parti
+part3j
+3partn
+pa5ru
+3pas3
+pas4ses
+pat5j
+4patl
+3patr
+2p3aut
+pa4vl
+2p1b
+2p1c
+2p3d2
+1pe
+pe2ak5
+pe2a4r
+3peb
+4peci
+pede4s5
+pee4n
+2pef
+5peg
+3pei
+pei4la
+4p1eis
+pe2kl
+pek3la
+pe2kn
+pe4l5ak
+pe4lee
+pel3f
+pe4link
+5pelot
+pe4lov
+2p5emm
+3p4en
+pe4nam
+5pend.
+5pende.
+pen5k
+5penn
+penning5s
+pen4se.
+pen3sl
+pen3sm
+pen3sp
+pen3t4
+pe4nu
+peper5s
+4pepi
+3pe1ra
+3perc
+5peree
+pe4rek
+pe4res
+5perg
+3peri
+peri3s4
+3perk
+pe3ron
+3pers
+pers5ag
+per4sc
+pers5po
+per4str
+pe5sta
+pes3ti
+pe5tr
+3peut
+4pex
+2p1f
+2p3g
+pge3s
+2p1h
+p2heu
+3p2hia
+p5hoe
+p5hui
+1pi
+pi4ce.
+pie4k5u
+pi1eu
+pi4ga
+pij3k
+pij5ke
+pij4li
+3pijn
+3pijp
+pij4pa
+pij4pl
+pij4tj
+2pijz
+p5ijzer
+pi4kl
+pi4ko
+pi4nas
+pin5d
+pings5
+4pinj
+pin4kr
+pi5no
+4pinr
+2pins
+p5instr
+pi4ot
+3pis
+pi4sco
+pi4s5t
+pi3th
+pit3j
+pit3r
+pit4sp
+2p1j
+4pja
+p2je
+2p1k
+p2l4
+3pla
+4pla.
+plaat5j
+4plad
+4plam
+p5lamp
+4plang
+p4lant
+4p3lap
+1p4las
+pla4tr
+p4lec
+p3leid
+p3lep
+p4lex
+2plig
+2plij
+pli4t
+3ploe
+pluk5
+2p1m
+2p1n
+p4neum
+pock1
+3pod
+poda5
+poe2s
+poe5tj
+po4ki4
+po4kol
+3pol
+pol5k
+3pom
+4poml
+pomp5j
+3pone
+pon4se.
+pon5ta
+poo4
+4poog.
+poo5len
+4poor.
+poor4tj
+poot1
+3pop
+po4p3a
+po4pi
+pop5s
+po2q
+pore4n
+2p1org
+4pork
+por4t5j
+por4tra
+3pos
+po1sa
+post5in
+post5re
+po4ta
+3poti
+pot1j
+4pov
+po4we
+2p1p
+ppe2n
+ppen5i
+p2r2
+p5raad
+3prac
+3prakt
+p3rand
+3prang
+p5rap
+p3rech
+prek4s3
+3prent
+pren4t5j
+5p4res
+pres3c
+pre4t3j
+pre4tr
+preus4
+5pries
+priet5j
+3prij
+3princ
+4pring
+pring5s
+p4rio
+p4riu
+3prob
+3p4roc
+3prod
+3prof
+5p4rog
+3proj
+4prok
+5prop
+pro5pr
+pro5sc
+pro4s3t
+pru4t
+2ps
+4ps.
+ps5ag
+5psalm
+p3sel
+pse4la
+ps5lan
+ps2m
+ps3ma
+p1sn
+p2sna
+p5soe
+p1sp
+ps4pe
+p1st
+p3ste.
+p3stem
+p5sten
+p5ster.
+p5sters
+ps3th
+ps2u
+3p2sy
+5psyc
+4p1t
+p3te
+ptea4
+p2t1h
+p4tj
+pt2s
+1p2u
+pu3e
+pul4le.
+3pun
+4pun.
+punt3j
+put3j
+pu2t3r
+2p1v
+pvaart5
+2p1w
+py1
+p5yw
+2p1z
+1qu2
+5qua
+2que.
+5queu
+qui5no
+4raalm
+raam5
+2raan
+raap3
+3r2aar
+4r3aard
+raat1
+2rac
+r4ac.
+raccro4
+ra2ce
+rade4ra
+ra3di
+4radr
+2rafd
+rag5l
+ra3gn
+rag4s
+rai4d
+ra4kri
+4ralar
+ra4l5ee
+4ralf
+r1alg
+4ralm
+4ralu
+4ramn
+r4amp
+2rana
+r2anc
+ran4ce
+ran4daa
+rand5sl
+ran4ge.
+ran4ges
+ran4g3o
+ranje5
+ran4sl
+ran5so
+rans3p
+r4anti
+ran4t3j
+ran4tr
+r3antw
+ra4pas
+5rapeu
+1rapi
+3rappo
+ra2pr
+rap5ro
+4r3arb
+r4are
+4r1arm
+4rarr
+4r3art
+ras3l
+ra3son
+5rasp.
+5raspen
+ra5s4tek
+ra5stheni
+r4ati
+rat3j
+2rau
+ra4vel
+ra3yo
+2r1b
+rbonne4
+r1c
+r4chec
+r4chen
+r4chete
+rchi5m
+r2chl
+rci2a
+2r1d
+r4dact
+r3dag
+r2d3ar
+rden5s
+rde5ra
+rder4s
+rdes4s
+r2dol
+rd4re
+rd2s
+rd3sc
+rd3se
+rd3sp
+rd5sto
+rd3str
+rd2w
+rdwa4r
+r4d3wo
+1re
+3re.
+3reac
+rea4d
+re4ade
+rea4m
+3reda
+reda4l
+3redd
+5redenee
+rede4s3
+ree2d1
+ree4k
+2r1een
+reen4e
+reer4ad
+4reers
+4reerw
+2reff
+4reg.
+4regd
+3regel
+rege4s
+4regg
+3regi
+re3gl
+4rego
+4regt
+4reie
+4reil
+4reind
+3reini
+rein5o
+rei4sc
+5reiz
+re4kaa
+5rekeni
+re4kle
+re4klu
+re4kn
+rekor4
+re4kro
+4reks
+re4kuu
+reld3o
+rel4d3r
+re4lei
+relijs4
+rel5k
+rel5l
+rel5s
+re4lur
+reme4t
+remin4
+5r2en.
+re2na
+re4nam
+re4nan
+r2end
+r5endert
+re4nep
+ren5ete
+5renf
+3renh
+4r1eni
+5renkl
+re2no
+ren3of
+re3n4ov
+5rento
+4rentw
+4req
+4r3erf
+re3r2o
+2r3ert
+4r3erv
+2rerw
+r2es
+re1sa
+res4e
+resi3s
+res4koo
+res4kop
+re2sl
+re2sp
+res3pe
+res3pi
+res3t
+5resul
+re4tem
+re4tog
+reu4ko
+2r1ex
+r4faa
+r4fag
+rf5da
+r4feng
+r1fl
+r4flag
+r2f3li
+r4foo
+r1fr
+r2fre
+rf4rek
+rf5rol
+rf2s4
+rf3sc
+r4fur
+4r1g
+r4gab
+r4gart
+rge4a
+r4geen
+r4gei
+r5gel
+r4geng
+r4gerep
+rget4
+rg2l
+r4glu
+rg2ne
+rg5op
+rg1s
+rg3so
+rgs4p
+r1h
+rho4m
+ri5aa
+ri5al
+ri4bl
+rici4e
+ric5ket.
+rief5l
+rie4kap
+rie4lei
+rien4n
+rie4to
+ri1eu
+ri4fa
+ri5fl
+r4ig
+ri4gaa
+rig4l
+rij5kag
+4r5ijl.
+r3ijld
+3rijm
+rijs4t
+rij5ster
+ri2kl
+ri4mer.
+ri4mers
+rim4pr
+ri5n2a
+2rinf
+r2ing
+r5ingan
+ring3l
+ring3r
+2rinh
+rin4kl
+4rinko
+4rinkt
+rin4ne.
+2rinr
+2rins
+r3inv
+ri4oc
+r4is
+ri4sam
+ri3s4ko
+ris4tee
+rist4j
+rit5j
+5ritm
+3rivie
+rivo3l
+r1j4
+rjan4
+rjas4t
+r1k
+rkaart5j
+r4kart
+r2kei
+rke4n
+rken4s
+r4kez
+r4kink
+rk5lat
+r2klo
+r3klok
+r2kne
+r2kob
+rkoot5
+rk5ord
+r5kran
+rk1s
+rk4slu
+rk4taa
+rk2t5r
+rk3waa
+r4kwat
+r2kwe
+r1l
+r3la
+rle4gek
+r4les5t
+rlings4
+rling5sk
+rlo4f3
+rlos5
+r5lu
+rluit4
+r1m
+rma3f4
+r4m5an4c
+r4mart
+r3me
+r4meb
+r4meg
+rme4ra
+rmi4ne.
+rmo5sko
+rmte5s
+2r1n
+rn4aa
+rn4am
+r4nap
+rna4sp
+rnee5t
+r3nei
+r4nele
+r4n3ene
+rnes3
+rne4tj
+r2nex
+r4nid
+r4non
+r4noor
+r3nu
+ro5ar
+roces5
+ro1ch
+2roef
+roe4g3r
+roe4pl
+roe4rei
+roer5s
+roe4ta
+2roev
+ro3fl
+5roga
+roges3
+4roj
+3roker
+rol4a
+ro5lan
+role5s
+rol5g
+2roli
+rol5k
+rollo4
+r2on.
+ron4da
+ron4d3o
+ronds4
+ron4d5u
+r2one
+ronge5t
+r2oni
+ron4ka
+r2ons
+ron4tj
+ron4t3r
+roof3
+roog3
+2r1oor
+ro4pan
+rop4e
+rop4la
+rop2o
+ro4pu
+4roq
+2rorg
+ro5sho
+ro1sk
+ro3sko
+ro1sp
+ross5t
+rot4h
+rot5j
+ro5ton
+ro3tr
+5rotsen
+rot4st
+r1oud
+3rout
+rouwen5e
+rove5ri
+r1p
+rp3j
+rpool4
+rp4sto
+r5q
+rquet4
+2r3r2
+rre4lu
+rre5sl
+rre3sp
+rreur3
+rrie4t
+rron5k
+rru2
+2r1s
+r2sa
+r4saan
+rsail4
+r3sal
+r4s1am
+rs5chef
+r5schi
+rs2cr
+r2sek
+r4selz
+r4serv
+rseve3
+r2s5ez
+rs4hal
+r5s2hi
+rsis5
+rs2ja
+r3sjou
+r3sjt
+rs4kat
+rs4kie
+rs4koo
+rs5led
+r5sleu
+r4sloo
+r5slui
+rs2m
+r3smak
+rs4mit
+r4snaa
+r2sno
+r3snoe
+r4sog
+r4som.
+rs3ong
+r2sor
+rs3ord
+r4spad
+r4spar
+r5spel
+rs4pen
+rsper4s
+r4s5pet
+r4spot
+r4s5put
+rss4
+r4staf
+rs3tas
+rs4te
+r5stes
+rs4ti
+r4stit
+rstof5
+r4stun
+rs4ui
+rsui4t
+2r1t
+rtai4n
+r2tar
+rt3art
+rtati4
+r4tau
+rte4na
+rte5ro
+r4teve
+r2th
+rt3hel
+r3tho
+rt4ij
+r4tink
+r5tof
+rtoi4
+rto4le
+r4tom
+rt5redene
+r2tri
+rt3rij
+r2tru
+rt3ruk
+rt4sec
+rt2sl
+rts3li
+rt4spr
+r4tui4t
+rt2wi
+3rubr
+ru1e
+ru2g
+2rui
+3ruimt
+r5uitr
+ru2k1
+ruk5r
+ru4li
+r2um
+2runi
+ru4pi
+r2u2s
+rus4h5
+ru4st
+rust5o
+rut5j
+4ruu
+ru5we
+r1v
+rvee5t
+rve3ri
+rve5s4
+rvet5j
+rv1ic
+rvil4
+rvoch4
+rvoy2
+r1w
+rwe4tj
+r4wh
+rw2t5j
+r1x
+rxis5
+3ryl
+ry1o
+4r1z
+rzu4e
+3sa.
+3saag
+s1aan
+s5aap
+4s1aar
+3sab
+2s1ac
+3sacr
+s1ad
+2s1af
+sa2fe
+5safo
+s5agent
+5sah
+3sai
+5saj
+s3akko
+s1akt
+1sal
+s4ala
+s3all
+4salm
+s5alma
+s5aln
+3salo
+4salp
+s3alta
+s1amb
+sam5p
+s3ana
+3sanc
+sans5
+5sant
+san4t5j
+3sap.
+s5ape
+sap5l
+2sar
+3sar.
+sa3ra
+s3arb
+s3arc
+3sard
+sa4re.
+3sari
+s1arm
+3s4ars
+s1art
+5sasa
+s3assi
+sas3t
+3s2at
+4s3atl
+4satm
+4s3att
+s5aud
+5saur
+3saus
+s3aut
+3sauz
+s1av
+5sax
+4s3b
+1sc
+2sca
+2sce
+4scel
+4scent
+s2ch
+4sch.
+5schaa
+3sche
+4schec
+5sched
+4scheq
+3s4chi
+4schk
+5scho
+3schr
+2sci
+sci4ne.
+sci4nes
+2scl
+2s2co
+s4cola
+3scoo
+3scop
+3s4core
+scorre4
+2scr
+scra4
+4scris
+2scu
+2scy
+2s1d2
+sde4a
+s3dw
+1se
+3se.
+se2a
+sear2
+sebal4
+sebe4s
+s1ech
+5sect
+4secz
+s5edit
+2s1een
+4seev
+4sei.
+seig4
+seis4t
+3seiz
+5seke
+sek4sl
+s2el
+5sel.
+se4lag
+sel5el
+4s3elem
+3selen
+4self
+sel3k
+se2lo
+3sels
+5selt
+se4m3ac
+s3emm
+se4mo
+s2en
+3s4en.
+se4nem
+se4net
+sen5ete
+sen3k
+se2no
+sen5of
+sen5on
+3sen3s
+sen4tj
+sen3tw
+3s4er
+se1ra
+se5r2e
+4sergo
+4sern
+ser2s
+sert5w
+s5ervar
+se1sa
+s3e2s3p
+sessi4
+se1st
+s3eter
+se2tr
+se5tre
+se4tw
+5seu
+se1u4m
+seur4s
+s3even
+2sex
+s1exa
+2s1f2
+s2fe
+s3fei
+4sfi
+s2fy
+4s5g4
+sge3st
+2s1h
+s4ha.
+sha2k
+5shamp
+sha4p
+sheid4
+s4h5es
+s4hip
+3shir
+s2hop
+s5hope
+s4hort
+s2hot
+5shot.
+s5hote
+3show
+1si
+3sia
+si4dec
+si4dew
+5s4ie
+sie3s
+sie3tj
+si3f
+3s4ig
+2s3ijz
+5silo
+2s5inc
+2s3ind
+2sinf
+sin3gl
+sings5
+4sini
+s3inko
+4sinm
+2sinr
+2s1ins
+2s1int
+4sinv
+s3inz
+5sio
+si4ons
+5sir
+3si2s
+si5sal
+sis4t
+sis5tr
+3sit
+si2z5
+2s1j2
+5s4ja.
+s5jaa
+3sjac
+s3jas
+s3je.
+3sje4r
+4s5jes
+5s2jew
+s4jez
+s2jo
+5sjof
+3sjok
+4sjon
+2s1k
+s3k2a
+skaart5j
+ska4te
+s3ke
+5skele
+3s4ki.
+skie5st
+s3kl
+s3kn
+s5koe
+4s5kof
+s5kol
+s4kopi
+skorre4
+s5kov
+3skrib
+3skrip
+s3k4w
+sky3
+1s2l2
+3sla.
+3slaan
+s3laar
+s3lad
+3slag
+slag3r
+3s4lak
+2s1lam
+3slape
+s3las
+2s3lat
+4s5lau
+s4lav
+s4le.
+s5leder
+5slee.
+3sleep
+4s3leer
+2s3leg
+2s3lei
+4sleng
+3slent
+5sleper
+4s3ler
+s3les
+sle4tj
+3sleu
+5s4leut
+2s3lev
+4s3lez
+3slib5
+2s3lic
+2slid
+4s3lied
+s3lief
+s3lig
+3slijp
+slik5l
+s3lini
+4slinn
+4s3lit
+slo4b
+4sloc
+3sloe
+3slof
+2s3log
+s5loon
+s3loos
+5sloot5
+3s4lot
+slot5a
+slot5o
+4slou
+s4low
+2s3loz
+4s3luc
+3slui
+4slui.
+4sluid
+sluis4t
+5sluit
+s3lus
+4sly
+2s1m
+4smaat5
+s3man
+s3mas
+4s3mat
+4smec
+s2med
+5smeed
+4s3mei
+4smelo
+4smen
+4smes
+3smeu
+3smid.
+4smidd
+smies3
+s2mij
+s5min
+smoes4t
+3smok
+s5mom
+s5mon
+3smul
+s2n
+4s3nac
+2snam
+5snavel
+snee5t
+sne4k
+3snel
+2s3nes3
+s3net
+s3neus4
+4s3nie
+5snijde
+s4nip
+4snit
+4sniv
+s3nog
+s5nom
+snot5a
+5snuf
+5snui
+2snum
+s3nut
+1so1c
+soci3
+1sod
+1soe
+4soef
+5soep
+soeve3
+3sofa
+s1off
+s3oge
+3soi
+1s2ol
+3sold
+so4le.
+so4les
+s5olie.
+3s2om.
+3somm
+2s3oms
+4somz
+5s4on.
+s1ond
+2song
+3sonn
+3s4ons
+2s1on2t
+sont3e
+sont4l
+4sonv
+2s3oog
+5soon
+3s4oort
+2s1op
+3s2op.
+sop2h
+so5phi
+s4opo
+s2opp
+s5opper
+so3pra
+s3opto
+3sor.
+s2orb
+2s1or5g
+3sori
+s3ork
+3sor4s
+s4ort
+sos4t
+s4ot
+sot4h
+sou3t
+2s1ov
+s2p2
+4sp.
+4spaal
+2s3pak
+s4pan
+3spann
+4s3pap
+4s5pas
+3speci
+3s4pee
+speet3
+2spei
+5speler
+3spell
+2spen
+s5pen.
+2sper
+s4perm
+s3pes
+4spex
+1spie
+4spijn
+spi4k
+5s4pio
+2s1p4l
+5splee
+spleet5
+s3plei
+3splet
+spli2
+s3plic
+3splin
+5split
+3spoel
+2spol
+2spom
+5spoor.
+s4pore
+2spos
+5spraak
+4sprac
+3sprek
+4s5prem
+4spres
+3spreu
+s4prie
+4spriem
+4sprij
+4sprob
+5s4pron
+2s3ps
+2spt
+3spui
+2spun
+s1q
+squad5
+4s3r
+srac5
+sregis5
+4s3s2
+s5s4a
+ssa3s
+s4sce
+sschops5
+s4sco
+ss4e
+s5seb
+s5see
+s5sel
+s5sem
+ssen5t
+s5ser
+ssi1s
+ss4k
+s4sm
+s5so
+sson4n
+sspas4
+s5str
+s5su
+s2t
+4st.
+4staanw
+staat5j
+2s4tac
+3stad.
+5staf.
+4stafe
+4stakk
+4stale
+4stali
+sta4lo
+3stamp
+3stand
+s4tap
+3stape
+star3o
+2stas
+5statio
+4stau
+4stavo
+4stax
+s4taz
+4stb
+2stc
+2std
+4stea
+4stec
+s5tech
+3s4ted
+5steek
+3steen
+s3teer
+stee5t
+4steka
+4stema
+5stemm
+4stemo
+5stenic
+5stentv
+4stenu
+4steo
+4sterm
+4steros
+4sterr
+5sterren
+4ste2s
+stes4s
+4steva
+s4tex
+s4tez
+2stf
+4stg
+2sth
+s4tha
+st5hed
+5sthenic
+s3thet
+st1hi
+st1ho
+s4thu
+s4thy
+s4tich
+2stid
+s4tiel
+3stier
+5stift
+3stigm
+4stijd
+3stijf
+3stijl
+st3ijs
+3stikt
+5stild
+s4tilu
+3stimu
+st3ind
+4stins
+4stint
+sti4o
+3stip
+s5tis
+4stite
+2s4t1j
+4stk
+2stl
+st4let
+2stm
+2stn
+2stoc
+4stoef
+4stoej
+3stoel
+4stoer
+4stoes
+5stoet
+4stoez
+4stol.
+sto4ne.
+4s3tong
+st3oog
+stoot5j
+sto4p
+4st3ord
+sto4re.
+4stos
+s4tov
+2stp
+4strad
+s5tradi
+4strap
+5stratief
+5stratiev
+4strav
+4strec
+5streek
+5streerb
+s3tref
+4streg
+4strei
+s4trek
+3strel
+s4trem
+5strep
+4stroe
+s5troep
+s5trog
+s4trol.
+s4troll
+5stroom
+4stroos
+4stroz
+1stru
+s4trui
+4st5s2
+2stt
+2stub
+3stud
+5stuk
+2stv
+2s4t3w
+2sty
+2stz
+1su
+5sua
+su2b1
+sub3r
+3suik
+s1uit
+3suk
+2s1un
+s4us
+3sus.
+4s3v
+svoge4
+4s1w
+1s4y
+sy5c
+3syn
+sy4nan
+sy4ne
+3sys
+4s1z
+taal1
+t3aanv
+4taap
+taarn5
+taart5r
+4taas
+taats5in
+taat4s5t
+5tablet
+2tac
+t3acad
+t1ach
+t4aci
+t2act
+5tactiek
+3tacu
+4tad
+t1ade
+5tado
+tad2s
+tads5p
+tad4ste
+tads5tr
+2taf.
+2tafd
+3ta5fe
+4taff
+4t3afs
+2tafw
+ta4gr
+ta5gra
+3tai
+tai2l3
+ta4ke.
+takt3a
+4tald
+5talent
+3talg
+5talig
+talm3a
+4talt
+ta4mak
+ta4man
+2tamb
+3tamen
+ta4mu
+2ta5na
+t3anal
+tan4d3r
+3tanj
+t2ans
+3tants
+ta4pek
+ta4pes
+5tapi
+ta5ra
+t3arb
+5tarctisc
+4tarea
+3tari
+4t1arm
+ta2ro
+2tart
+t3arti
+tart3s
+5tarw
+tarwe3
+ta4ry.
+4tas4p
+t5aspe
+ta3sta
+ta4tem
+2tatl
+3tau
+4t3aut
+2tav
+ta4ve.
+4tavo
+5tax
+4t1b
+4t1c
+4t3d2
+1te
+3tea
+te4ad
+5tea4m
+tea5ri
+te2as
+3tec
+te5che
+4t5echt
+tec5k
+tec3t
+4ted.
+t3edit
+te3do
+tee5ke
+tee2m1
+4teen3
+t5eenhe
+tege4n3
+t3eind
+teits3
+5tekene
+5tekens
+4tekk
+3tekor
+3teks4
+4tekse
+t5ekster
+tekst5i
+tek3t
+tel5ant
+te4lap
+3telef
+3teleg
+te5lel
+te4loe
+te4log
+tel5oog
+tel5su
+te4luu
+4temm
+te4mor
+3tempo
+4temt
+t2en
+ten4ac
+te5nak
+ten3al
+ten3as
+te4nau
+t5endert
+te4ned
+te4nek
+te4nel
+te4n3et
+ten3k
+te4nol
+ten4se.
+ten4su
+ten4tis
+5tento
+t3entw
+3tenu
+3tenw
+3teo
+te3p2h
+t2er
+te5raal
+ter3af
+ter3ak
+te3ral
+te5rang
+5terapi
+ter5app
+ter4dol
+3terec
+ter5eig
+te4r5el
+te4rem
+te4r5env
+te4reu
+3terh
+teri4m
+5term.
+5termen
+3termi
+ter3na
+5terrei
+ter5se
+ter4spr
+3tes
+te5sap
+tes4ko
+te5staar
+te5stel
+te5stic
+te5stra
+5teti
+t3euro
+4teuv
+te4ve.
+2texe
+4texp
+4t1f2
+tfa4d
+4t3g2
+tgaat5
+2th.
+2t1ha
+3t4ha.
+3t2hag
+4t3hal
+3than.
+2thc
+3the.
+3t2hea
+t5heb
+t5heden
+3thee.
+t5heer
+2t5hei
+5theo
+t2her
+3thera
+t3here
+the5ri
+3therm
+3thes
+t5hiel
+4thl
+4thok
+t4hom
+4t1hoo
+thoof5di
+2t3hor
+t1hou
+t3houd
+t3houw
+2ths
+t1hu
+2thui
+t4hun
+3t2hur
+5thus
+2thyp
+1ti
+5tia
+ti4aalb
+tia4nu
+3tib
+3tica
+3tice
+ti4ce.
+5ticu
+3tie
+ti4eerb
+tie5kla
+tie3ru
+tie3s
+ties4l
+ties4p
+tie3t
+ti1eu
+ti2ga
+tig3aa
+4tigm
+ti2gu
+tig5ur
+5tijd
+tijk5er
+4tijl.
+4tijld
+4tijlt
+3tijn
+tij5t
+2t1ijz
+5tike
+5tiku
+tik4w
+ti4l5aa
+4tiliu
+til4la.
+ti5mer
+ti4mes
+ti4min
+3timm
+5timo
+4timp
+ti4nad
+4tincu
+4tind
+2tinf
+ting5aa
+t5ingeni
+tin4gi
+tin4g3r
+ting5stra
+4tinku
+4tinl
+2tins
+t3inst
+4tinv
+4tinw
+ti4oneu
+3tis
+tis4l
+ti3sli
+ti5s4p
+ti5sto
+tis4tr
+5tite
+ti5th
+ti3tr
+3tiv
+3tiz
+tj2
+2t1ja
+4tjesl
+tje5spr
+4tjeu
+2t1jo
+2t1ju
+4t3k4
+4t1l
+t3la
+5t2lem
+tleve4
+4t3m
+tman5a
+tmanag5er
+tmos3
+4t3n
+3toc
+4tock
+3tod
+to3do
+toe3d
+toe3g
+5toej
+toe5k
+5toe3la
+3toen
+toe3pl
+5toe3s4
+toe3tj
+3toez
+4to2f
+tog4n
+3toil
+to4kan
+4tolf
+tol4pr
+4tolv
+5tomet
+t3oml
+tom4n
+4tomp
+tomp5j
+4toms
+t2on
+2tond
+t5onder
+3tonee
+to4nes
+tonge5t
+ton4gr
+5tonn
+to4non
+2tont
+t2oo4
+toof5
+3toon
+to4pas
+4topb
+4topd
+top4let
+4topm
+2topn
+4topr
+t5opva
+to4q
+5tor.
+tor5ag
+5torens
+2torg
+t3orga
+tor4m3a
+5torr
+5tors
+to5r2u
+5to1s4
+to3sf
+to3sk
+to3sl
+tos5s
+tot4r
+tou1c
+2t5oud
+tove5na
+4toverg
+tove5ri
+to5wr
+4t3p2
+tpa4t
+tper4sp
+tpers5pec
+tpe4t
+4tq
+t2r2
+4t3raad
+4traf
+tra4fo
+3trai
+5trakta
+5traktem
+5trap.
+trap3l
+5tratiesy
+4trato
+t5ratt
+traw4
+5t4re.
+tre4ak
+2trec
+4treda
+tree5t
+4t5reg
+3trein
+4t3reis
+4treiz
+4treke
+tre4kl
+tre4ku
+4trel
+t5rese
+tre2t
+3tribu
+5trice
+t5rief
+trijs5p
+3tril
+4triv
+tro3a
+4troed
+t3roer
+t3roes
+t3rold
+t4rom
+t3rond
+tront5j
+3tros
+t5roven
+5trui.
+trui3t4
+2t1rus
+4ts
+ts4aar
+tsa4le
+ts3as5
+t3sch
+t2s3ef
+t2sei
+ts5eig
+ts5eind
+t2sek
+ts3eks
+t3sen
+t5sen.
+t4seng
+ts1ex
+tsi4ga
+t2sij
+t4sink
+ts2j
+t5sjen
+ts4kel
+ts4kul
+t5sky
+t5slaat
+t5slag.
+ts3lam
+t4slan
+t5slang
+t3slep
+t5sloe
+ts2me
+t4smu
+ts3nat
+t3snoe
+ts1or
+t1sp
+t3span
+t5spel
+t3spi
+t3spor
+t3spre
+t5spru
+t1st
+t4stab
+t5stale
+t4star
+t4s3tas
+t3ste
+t5ste.
+t4steg
+t5sten.
+t4stera
+ts4tes.
+ts4tie
+t3ston
+t3stop
+t3str
+t3stu
+tst4w
+t2su
+t4suit
+4t1t2
+t3t4a
+tta4g
+t3te
+tte3lo
+tte2n
+tten4tj
+ttes5tat
+t3tr
+ttrai4
+tt5s
+t5tw
+4tual.
+4tuals
+5tub
+tu4bel
+5tuc
+tu1e
+5tueu
+3tuin
+4tuip
+tuit4j
+t5uitk
+4tuk
+tuk3sn
+3tum
+tu4mel
+4tump
+tu4nes
+3tunn
+tu1o
+3turb
+3tu4s3
+tuu4
+tu3wa
+4t1v
+tva4l
+2t1w
+4t3wa
+t3we
+twee5l
+twee3s
+twee3t
+t3wie
+t4wijf
+4twil
+t2win
+t3wind
+t3wo
+1ty1
+ty4le.
+3typ
+ty5s4
+4t1z
+u1a
+ua4dro
+uae4
+uaes5
+u4an.
+ua4re.
+ua4res
+uat4s
+4ub
+ub3ac
+ube4li
+u5bi
+u2bo
+u4ce.
+u4ces
+u1cha
+u3chen
+u3chet4
+u5cheu
+u3cho
+uchte5ri
+uchu4
+uck4e
+uc5ki
+ucle5
+uclea5r
+uc4ta
+u1d
+uden4tj
+udet4
+u4dez
+udge4t
+udi4ne
+ud5oom
+ud3ove
+u2dr
+ud4sa
+ud5sme
+ud4sta
+ud4sto
+ud3w
+u1ee
+u1el
+ueli4
+ue4s
+ues3t
+u1eu
+u1fl
+u3f2r
+4ug
+ug4des
+ug2do
+ug3ei
+uge4leg
+uge4ne.
+ugi4e
+u4g3l
+u2go
+ug3on
+u2g3r
+ug3s4
+ug5sto
+ugsto4r
+u3h
+u2i
+ui2da
+ui4deu
+uid3g
+ui2d1o
+uid4sta
+ui2d5u
+ui3e
+uies4
+ui2f5a
+uif3l
+ui2f3r
+ui4fu
+ui4gaa
+ui2go
+ui2g3r
+4uik
+ui2k3a
+ui2k3l
+ui2ko
+ui2k3r
+uik3w
+ui2la
+uil3aa
+ui4lem
+ui5li
+uil3m
+ui2lo
+ui2ma
+ui5me
+uimes4
+ui2m5o
+u4in
+ui4n1a
+ui4nes.
+ui2no
+uin5og
+uin4slo
+ui4pe.
+ui4pes
+ui4pl
+ui4p5o
+ui4p3r
+4uis
+ui2sa
+ui4sl
+ui4t5a
+uite5s
+1uitg
+uit1h
+uit1j
+5uitker
+5uitle
+5ui2t1o
+uit3r
+uit1s
+5uitslag
+uit3sm
+uit3sp
+5uitvoe
+u1j
+uk4e
+uke3no
+u2k3l
+u2k5of
+u2kor
+u2kr
+uk5rak
+uk3ri
+uks4h
+uks4me
+uk5smi
+uk4taa
+uk3w
+u1la
+ul3ac
+uliet4
+ul4kar
+ul2k5n
+ul2l5o
+u1lo
+ul4pak
+ul2p3l
+ul2po
+ul4pr
+ul4ps
+ul4spa
+ul4spu
+ul4stel
+u1lu2
+ulver5ig
+u4mac
+um5ele
+ument5j
+ummi3s
+umpi4
+un2c
+un3che
+unch5r
+un4e
+une4tj
+un3g
+3unif
+3univ
+un4kr
+un2s
+un3sc
+un3se
+uns4t
+unst3a
+un4stei
+unst3r
+unst5ui
+un4tag
+un2tj
+un4t5o
+u3ol
+u1or
+u5os
+4up
+u1pa
+upda4
+u2pe.
+u2pek
+u4pen
+uper5s
+u2pes
+u1pl
+u1po
+u1pr
+u1q
+2ur
+u1ra
+ur3ac
+ur2al
+uras4t
+u4rec
+u4renv
+ures4
+ure5st
+ure4tj
+ur2fa
+ur5gi
+ur3gl
+u1ri
+uri4c
+4urie
+ur5ijz
+u4rind
+urken5
+ur4kie
+u1ro
+u4ront
+ur5ph
+ur2sl
+urs5li
+ur2sn
+ur4spa
+ur4spr
+ur4sui
+u1ru
+u3ry
+u1san
+u2sc
+u3s2cr
+4use
+use5a
+u4sep
+u4sj
+u4s3l
+us3n
+u2so
+us5oli
+u4s3p
+us4se.
+us4ses
+u2st
+us3te
+us4tei
+us3ti
+ust5oor
+us3tr
+4ut
+u1ta
+ut2ad
+u3tan
+u4tees
+u4tef
+u4teks
+u4tem
+uter4n
+ute5ro
+u4tet
+u2tex
+uth5r
+uti4oni
+uti2q
+u1to
+uto5s
+u1tr
+uts4c
+ut1sn
+ut2sp
+ut4sto
+uts5tor
+ut5tl
+u1tu
+ut5w
+uu2
+uur1
+uur3a
+u1v
+uvan4
+uvel4s
+uw1a
+u4wec
+u4wei
+u4weko
+uwen5k
+uwe5s
+u4wij
+u4wind
+uwings5
+u4wink
+uw5inz
+uw1o
+uw3r
+uw5u
+uwui2
+u1z
+uzen5
+uzes4
+uziek3
+vaar5tj
+va4kar
+va2ki
+vak3l
+va2ko
+va4loe
+val4s3p
+va2n
+van5ac
+va5ner
+var5s
+va3se
+va3s4o
+vast5re
+vast5ri
+va4th
+2vc
+veel1
+veep4
+vee5sta
+2vega4
+veis4
+ve4lap
+vel4do
+vel4dr
+vel4d3u
+ve4lis
+ve2na
+ve5nare
+ve5net
+ven3k
+ve2n3o
+ven2s
+ven4se
+vens5er
+vens5lo
+vens5u
+venti4o
+ve2r
+ver1a
+5verd
+ver3da
+verdi4
+ver5ed
+ver5eri
+ver5est
+ver5et
+ver5ijl
+ver5ijs
+ver5ijv
+ver5ingsi
+ver3k4
+ver3n
+ver3p
+ver3sa
+ver5sla
+ver3sm
+ver3sp
+ver5spa
+ver3tw
+ver1u
+5verz
+ve2s3
+ves4c
+ves4po
+ve4st
+ve4tem
+ve2tj
+ve4to
+ve2tr
+2vi2c
+vi3ch
+vier5a
+vie2s
+vies3p
+vie5tj
+vie2w
+vil4t5j
+vi4ne
+ving4
+4vi4ot
+vi4san
+vi4set
+vi4sol
+vi5sor
+vis5ot
+visper4
+vis5tr
+vi1tr
+vi4val
+2v1j
+v2l
+4vlar
+vlei5
+vleis4
+vle3s
+vlooi4t
+3vo
+voel4s
+voet3j
+voe4tr
+voet5sp
+vo2le
+vo2li
+vol3ij
+v4r2
+vrij3k
+vrij5ste
+vue5
+vues4
+vu2lo
+vuur5
+waad1
+wa4b5
+w2ad
+5wade
+wa5d2j
+w2ag
+3wagen
+wa4la
+wa4les
+4wana
+wan4gl
+wa2n3o
+wan3sm
+3wap
+war4tan
+wart3j
+war4to
+wart3r
+wa4s5l
+wa4s3p
+water5a
+wat5j
+watt3u
+2w1b
+w1c
+2w1d
+1we
+we2a
+we2b3a
+we2d1i
+we2dr
+wee5fa
+wee5kla
+wee3lo
+wee5ri
+wee3sl
+wee3sp
+wees4t
+we2g3a
+weg3eb
+we4gerv
+weg3ij
+weg3l
+we2g3o
+we2g3r
+we4ka
+we4kr
+wel3ed
+wel3ee
+we2lo
+wel3om
+we3loo
+wel3s4
+we4mab
+we2mi
+we4mo
+we2n
+we5naar.
+we3ne
+we4nee
+we4nem
+wen4kas
+wen3o
+wer4f5
+wer4gr
+w4erk
+wer4k3l
+wer4k3o
+wer4kr
+wer4k3u
+wer4k3w
+wer4p3a
+wer4p5l
+4werw
+we2s
+wes3p
+wes5tel
+w4et
+5wet.
+we2th
+wezens5
+2w1f
+w1g
+w1h
+wiel5a
+3wijd
+wijs3
+wi2k
+wi5ki
+3wil
+wil4s
+1win
+win4d3r
+3wink
+win4kl
+win2s
+winst5a
+win4ta
+wi4sec
+5wiss
+1wi2t
+wi3te
+wit3h
+wit3j
+wit3o
+wit3r
+w1j
+2w1k
+2w1l
+w1m
+4wn
+wn3ac
+w3nes
+w5ni
+w4oe
+woe3i2
+woel5a
+wo2l
+wol2f
+wolf4s3
+woorden5
+woor4d5r
+worm3a
+4wot
+w1p
+wper4
+w2r
+wri4
+wrijf5
+2w1s
+w2sa
+ws4k
+w2sle
+2w1t
+w1v
+wva2
+4w1w
+wwa4v
+w1z
+xan3
+x1b
+x1c
+xchan4
+xel4
+xf4
+x1h
+xis4
+x1k
+xop4
+x1p
+x5s2
+x1t
+x4tak
+xtie4
+xtraat4
+xtu4r
+xu1
+x3v
+x3w
+xys4
+y1a
+y5ae
+y4ah
+yan4c
+y1b
+yber4t
+y1c
+ycho3
+y1d
+y1e
+y1f
+yfu4
+y1g
+y3gl
+ygu2
+y3h
+y1i
+y1j
+y2k5n
+yl3al
+y4les
+y4let
+yli4n
+y1lo
+ylo3s
+ymfe5
+ymfes4
+ym4fl
+ymor4
+ym4p5j
+y5nec
+y3no
+yn3t
+5yogh
+yon4n
+y1p
+y4pec
+y4ped
+y4pek
+y2pem
+y4pev
+y4pew
+ypo5
+yp5s
+y1r
+yr4e
+y1sa
+y5s4c
+ys4h
+ysha4
+y2s3l
+y1so
+ys5s
+ys3t
+ys4ty
+y1t2
+ytop4
+y3v
+yvet4
+yvon4
+y3w
+ywrit5
+y1z
+3za
+zaf4
+za5i
+za2k3a
+za2k5r
+za2ku
+zalm5a
+zan4da
+zand5ac
+zan4d5r
+zang3s
+zas4
+2zb
+4zc
+4zd
+zee3g
+zee3k
+zee3le
+zee3ro
+zee3s4
+zeg4s5l
+zelf1
+zen4da
+zen5k
+ze2no
+ze4raa
+ze3roo
+zer4sl
+zer4sp
+ze2s
+ze3sc
+zes3e
+ze3sl
+ze3str
+ze4ta
+ze5tak
+ze2th
+ze2ti
+ze4tj
+ze4tr
+zeve2
+zeven3
+2zg
+5zi
+ziek3l
+zie4kr
+zie4kw
+ziel4s3
+zie5t
+zi4ga
+zij4na
+zijn4s
+zij5s
+zings3
+zin4k5l
+zin4si
+zin4sl
+zin4sm
+zi4os
+zi2t
+2zk
+z2l
+2z5ly
+2zm
+zn4
+zo5dr
+zoek5u
+zoet3j
+zoe4tr
+zo3f
+zon3da
+zo4nek
+zon2s
+zon5t
+zo2t
+2zp
+2zs
+4zt
+zus3
+4zv
+z2w
+2z1z
+}
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-nlx.pat b/tex/context/base/lang-nlx.pat new file mode 100644 index 000000000..5e8b46062 --- /dev/null +++ b/tex/context/base/lang-nlx.pat @@ -0,0 +1,8031 @@ +% File: GB90.8pat
+% Author: Piet Tutelaers (rcpt@urc.tue.nl)
+% Version: betarelease 0.9 (May 1993)
+% Purpose: 8-bit hyphenation patterns for TeX
+% These patterns are generated from the `Groene boekje 1990' (GB90) with
+% the following goals in mind:
+% - provide 8-bit patterns
+% - allow hyphenation in first two and last three letters
+% - inhibit hyphenation before a `trema'
+% - don't hyphenate words in a changing syllable (me-nuu.tje)
+% - don't hyphenate words with different hyphenations (buur.t.je)
+%
+% extra symbolen ä ç è é ê ë ï î ö ü
+\catcode`\ä=11\uccode`\ä=`\Ä\lccode`\ä=`\ä % "a
+\catcode`\ç=11\uccode`\ç=`\Ç\lccode`\ç=`\ç % c,
+\catcode`\è=11\uccode`\è=`\È\lccode`\è=`\è % `e
+\catcode`\é=11\uccode`\é=`\É\lccode`\é=`\é % 'e
+\catcode`\ê=11\uccode`\ê=`\Ê\lccode`\ê=`\ê % ^e
+\catcode`\ë=11\uccode`\ë=`\Ë\lccode`\ë=`\ë % "e
+\catcode`\ï=11\uccode`\ï=`\Ï\lccode`\ï=`\ï % "i
+\catcode`\î=11\uccode`\î=`\Î\lccode`\î=`\î % "i
+\catcode`\ä=11\uccode`\ä=`\Ä\lccode`\ä=`\ä % "a
+\catcode`\ñ=11\uccode`\ñ=`\Ñ\lccode`\ñ=`\ñ % ~n
+\catcode`\ö=11\uccode`\ö=`\Ö\lccode`\ö=`\ö % "o
+\catcode`\ü=11\uccode`\ü=`\Ü\lccode`\ü=`\ü % "u
+\catcode`\'=12\lccode`\'=`\'
+%
+\patterns{
+.aan5
+.aarts5
+.a4b5l
+.acht5end
+.a3da
+.a2f3
+.af5ra
+.af5s
+.agent5j
+.a4l3ee
+.a4l3ev
+.alk4
+.al5ko
+.al5m
+.a2lo
+.al3om
+.ame3r
+.am5p
+.a3nac
+.an5d4
+.a4nes
+.ang2
+.a4nis
+.an5th
+.a5o
+.a1p2a
+.a3pl
+.a1pr
+.as3
+.a4s5l
+.a5sti
+.a4su
+.ave5n
+.b4
+.be3la
+.be5l4u
+.be5ra
+.bijs4
+.bi4l
+.bli4
+.boot5j
+.box3
+.co5kes.
+.corre5s
+.d4
+.dan5ste.
+.de2k
+.dek3l
+.des5p
+.deu4r
+.dis5
+.du4w
+.ede4
+.edel3
+.ee4s
+.eest3
+.eet3
+.ei3l
+.e2kl
+.e3kw
+.en5th
+.e3p4
+.er3a
+.er2f
+.e4r3in
+.ert4
+.erts3
+.e4s3
+.es5c
+.es5m
+.e5so
+.es5pr
+.e3th
+.eus5
+.exi5
+.f4
+.fes1
+.g4
+.gaat5
+.ge5la
+.ge5le
+.ge3lo
+.ge5n4a
+.ge5ne
+.ge5no
+.ge5ra
+.ge5re
+.ge5ro
+.ge3s
+.ge1t
+.goes5
+.go4m
+.goot5
+.hemi5
+.ho4lo
+.i2
+.i3d
+.ij4sp
+.im5p
+.in3
+.in5d
+.in5g4
+.in5ktv
+.in5kw
+.ins4
+.int4
+.in5ta
+.i3re
+.is3c
+.is5m
+.i3t
+.j2
+.jaar5
+.k4
+.kee4
+.ke3ra
+.ker4k5l
+.kerk5u
+.koot5
+.kop5l
+.kun2
+.l4
+.le4b5
+.le4g3o
+.le4g3r
+.lemmet5j
+.le2s
+.lof5
+.loot5
+.lo4s3
+.lui5tj
+.m4
+.ma4len
+.mar5che.
+.me5no
+.merk5l
+.mijn5i
+.moot5
+.mo4s
+.n4
+.naat5
+.na5s
+.ne4t3j
+.noot5j
+.oa5
+.oe4r
+.oes5
+.ol3f
+.o2m1
+.o2n
+.on3a
+.on5d
+.onde4
+.o4n1e
+.on5g
+.on1o
+.ons4
+.on5sp
+.on4t3
+.on5to
+.oor5t
+.o5pak
+.o4p3ar
+.o4p3at
+.o4pet
+.o4p5l
+.o2p3o
+.o4p5r
+.op1s
+.o3ro
+.or1t
+.o4s3
+.p4
+.pee5tj
+.pe4k3l
+.per5spec
+.pij5t
+.poort5j
+.po5te
+.r4
+.raads5le
+.raat5
+.rai2
+.ran4d
+.rand5a
+.rens4
+.re5t
+.rie2
+.riet3
+.rijk5a
+.ring5s4
+.roe5t4j
+.s4
+.sa4p3
+.see3
+.seig5
+.se3m
+.servi5c
+.se4s
+.ses5t
+.set3
+.side3
+.si4s
+.slee5tj
+.smids5e.
+.spoor5tj
+.st4
+.t4
+.taart5j
+.te2a
+.te4f
+.tek2
+.te5na
+.tent5j
+.te4ra
+.ter4p5a
+.te2s
+.ti2n
+.tri5s
+.ui2
+.uit1
+.u3ra
+.u3ro
+.u3s
+.vaat5j
+.ve4r1
+.vie2
+.vrij3
+.w4
+.wee4
+.weet3
+.we4l
+.wel3a
+.wel5in
+.wer2
+.wet4s
+.win4s
+.y2
+.zet3a
+.zet3j
+a4a4
+aad1a
+aad3o
+aad3r
+aaf3a
+4aag
+aag3a
+aag5e
+aag3r
+aak3e
+aak3r
+aal5a
+aal1e
+4aal5k
+aal1o
+aal5ste
+aam1a
+aam3o
+aam5p
+aan1
+3aando
+3aandu
+aan5g
+3aanj
+aan5k4
+3aann
+3aans4l
+aan5sp
+3aanv
+aap3i
+aap3o
+aar3a
+aard5as
+aar4du
+aar3e
+aar3i
+aar5k
+4aarn
+aar1o
+aars5te.
+4aart
+aar4ton
+aar3u
+aas5c
+aas5e
+aas5m
+4aast
+aat3a
+aat5e
+aat3h
+aat4j
+aat3o
+aat1r
+a2b
+abak4s5
+a5be
+abet3j
+ab3ijz
+ab5lu
+3abon
+a4b3ru
+4ac.
+4ace
+ace3a
+2ach.
+a3cha
+4a1che
+4a3chi
+a1cho
+a1chr
+2achs
+a1chu
+4ack
+2acl
+ac5le
+2aco
+2acr
+4acs
+4acu
+ad2a
+ad5aa
+ad3ac
+ad3ad
+ad3ak
+ad5al
+3adap
+ada2r3
+ade5le
+ades4
+ad3ete
+2adh
+ad4i
+a4dj
+3adju
+ad3oks
+3adop
+ad3ov
+ad3ro
+ad5sla
+ads5tra
+ad3ui
+ad3un
+ad1w
+4ady
+aege4
+ae3k4
+a3el
+aes3
+ae3u
+af3aa
+a3f4as
+af5de
+af5dw
+afee4
+afe4la
+af3ex
+3afgi
+4afi
+af3l
+a2foe
+afon4d
+af3r
+af5so
+af5sp
+aft4a
+3aftr
+a2f3u
+ag3ad
+ag3ap
+agee5t
+agen5a
+agen4tj
+ager4s
+a4g3ind
+a4g3ins
+ag1l
+ag3of
+ag3ord
+ag4re
+ag5reg
+ag5rei
+ag5ret
+ag3roo
+ag3s2a
+ag3sl
+ag4sle
+ag4sli
+ag3spa
+ag1s4t
+ag3ui
+ag3ur
+a2g3uu
+a1h
+a5hi
+ai5b
+ai1e
+ai4es
+a1ij
+ai5k
+ai4o.
+ai3s4
+ai5sc
+ai4s5l
+aissi5è
+ai5sti
+ai3tj
+4aï
+aïn4
+aïns5
+a1j
+ak3ag
+ak3am
+ak3ap
+a2k3ar
+a3ke
+ak3een
+ak3etu
+a4k3ez
+4akh
+ak3ink
+3akko
+a2k3l
+ak3n
+ak4ni
+a3kof
+ak3ond
+ak5opl
+a3kos
+ak3ri
+ak3ru
+4aks
+aks5m
+ak5spe
+a2k3u
+ak1w
+a1la
+al4aa
+a4l3ach
+ala3d
+al3afs
+a3l4ag
+4ald
+a1le
+al3eff
+ales4t
+ale5ste
+alfs5p
+al2gl
+alk5ei
+al4kla
+alk5sa
+alm4a
+al4m3ac
+a1lo
+alo2n
+alo3s
+al3ou
+a3loy
+al3sa
+als4ag
+al4s5m
+al2sn
+als3oo
+al4spr
+al4stem
+al5ster
+al4sto
+altaar5
+al3tha
+4a1lu
+al3uit
+alus3
+4am.
+a2m3ac
+am3adr
+1ambt
+a3me
+ament4
+ame5rad
+ame4u
+ameus5te
+4amm
+a5moe
+a4m3ol
+am3ove
+am5pe
+3ampè
+am4pl
+4ams
+am2so
+am4s5po
+a2m3ui
+a1na
+a3nad
+a3nap
+an3arc
+an3av
+an4dad
+an4d3ed
+an4dom
+an4doo
+an2dr
+and5rad
+an5dri
+an4dro
+and5roo
+and5sle
+ands5taal
+aneëi4
+a3nen
+an3est
+ane3us
+ang5sn
+angs4t
+a3ni
+ani4a.
+aniet3
+anij4
+an3ion
+a4n3isl
+an3iso
+4anj
+4ank.
+an4kaa
+4anken
+an2kr
+ank3ri
+a1no
+an3or
+ano3s
+an2sa
+an2sm
+an2so
+an3soo
+ans3or
+an4sp
+an4tac
+5antenn
+an3th
+an5to
+a1nu
+an3ur
+an3uu
+a3o
+a4o.
+a4o5b
+a4os
+aos3t
+a4ou
+a4oz
+aoze3
+4ap.
+4a3pa
+ap1ac
+a5pap
+a5par
+a4pas
+ap3as.
+ap3ass
+ap3eks
+ape5l4e
+a4pet
+ap5eten
+a1pi
+apijt5j
+ap3ijz
+ap1j
+ap4l
+ap5laa
+ap5lad
+ap5lak
+ap5len
+a5plu
+a1po
+ap3og
+apo5sta
+1appa
+4appo
+ap3ra
+ap5rac
+ap3re
+a5p4ris
+ap2s3l
+a1pu
+4ar.
+a3ra
+ar3amn
+a4r3app
+ara3s4
+ara5st
+5arctis.
+4ard
+ar2da
+ard3ac
+ard3ak
+ar5de
+ar4d3op
+ar2d1r
+ar4d5re
+ard3w
+a1r4e
+are3st
+are4t
+ar5eve
+ar3gh
+ar2gl
+ar3go
+a1ri
+arie4t
+arij3s
+ar4k3aa
+ar4kla
+ar2m3u
+4a1ro
+a3rok
+ar3oli
+4ar2s
+ar5sch
+ar5se
+ars3l
+ar5slie
+ar3sp
+ar5spe
+ar4spi
+ar4spr
+ars5tal
+ar4stek
+ars3tr
+ars5tra
+ar4t3ak
+art5ank
+ar4tap
+ar3tar
+4arte
+4ar4tj
+4arto
+art5oge
+art5ond
+art5oog
+ar4t3or
+ar2t3r
+ar3tre
+a3ru
+4arw
+a1ry
+a2s
+4asa
+as3aa
+as3af
+as3ak
+as3ap
+a3sau
+as3av
+as4cr
+as4e
+a4s3ec
+a4s3e3t
+a5sex
+a4s5h
+a4sin
+asi4s
+as5ki
+as5ku
+as3l
+a5s4laa
+a4sm
+as5me
+as5mi
+as5mo
+as4n
+as5na
+as3ob
+as3on
+as3oo
+as3os
+as3p
+as5pec
+as5per
+a4st
+as3ta
+as5ta.
+as5taal
+a5stat
+as3te
+as5te.
+as5tee
+a5steni
+as5ter
+as4th
+as5tie
+as3to
+ast5rem
+ast3ri
+a5stu
+a3su
+a3sy
+a1ta
+at1ac
+at3ade
+at3af.
+a4t5am
+at3ank
+ata5s
+atent5r
+ate4r5ad
+ate4r5ec
+a1th
+a5thali
+at3hu
+atië5r
+a2t3j
+at5ja
+at5jo
+a1to
+at3oog
+a1tr
+at1re
+at3rib
+at5ru
+at5sen
+at2sl
+ats3le
+ats3lo
+ats5m
+at4sna
+at4sp
+ats5pa
+at5spi
+at5spl
+at5spo
+at3sta
+at4sti
+ats5tol
+at4t3u
+a1tu
+a2t3ui
+at5w
+2au
+au5b
+au3dr
+3aug
+au3ko
+aun3t
+aure3u
+aus3t
+au3sto
+au3t2
+auter5i
+3auto
+auts5
+au4wij
+ava3s
+aver3a
+ave3re
+ave3r4u
+4avi
+a4v5l
+4avot
+a1w
+aze3s
+3b
+4b.
+baar5tj
+babe4
+ba2di
+ba3gh
+5bak
+bak4sp
+bal4ka
+bal4t
+ba3n2a
+ban4kl
+ban4kn
+ban4kr
+bank3w
+bar3t
+bart3j
+ba3s4a
+bassi4
+4bb
+bba2t
+bbe4l5ee
+bbe4n
+bben3a
+bby5
+4bc
+4b1d
+5be.
+5bed
+be3d4a
+bed2w
+be5dwi
+be5dwo
+beet3
+be3fl
+5be3g
+bei3l
+bei4tj
+5bej
+be5kak
+bek4l
+5bel
+be4lex
+be5l4i
+be3l4o
+be5m
+5ben
+be3ne
+be3n4i
+5ber
+be1ra
+ber4g5af
+ber4gl
+ber4gr
+be1ro
+be4ron
+ber4ov
+be3ru
+5be1s4
+bes5ac
+be2sj
+bes5te.
+bes5tig
+5bet
+be1tw
+b3h
+b2i
+bi5bl
+bid3
+bi2du
+bie4t3j
+bij5d
+bij3k
+bij1p
+bij3s
+bijs5ter
+bij5tr
+bi4k
+bi5la
+bin4dr
+bin4t3j
+bir3
+bi5sa
+bis5m
+bi1tr
+4b1j
+4bk
+b4l
+blad5ij
+b5lap
+b5leg
+ble2s3
+b5lid
+5blie
+5blim
+5blo
+bloot5j
+4bm
+4b3n
+5bo.
+5boe
+boe4g3a
+boe4ka
+boek5s
+boe3st
+bo3fl
+5bog
+5boi
+5boï
+5bo2k
+bokje5
+5bol
+bo2m3a
+bo2m3o
+bo3na
+bonds3
+bont3j
+bo3nu
+5bool
+boon5
+bor4sta
+bor4st5r
+5bos3
+bo3sko
+bos5p
+bo2su
+5bot
+bot5j
+bot5sw
+bo2tu
+bou5ta
+bouw3s
+5box
+br4
+braad5s
+brei3s
+5bri
+bri4l
+bro4n
+bron3o
+4b1s4
+b5sc
+bsi3s4
+b2s5la
+b2s5m
+bsou4
+bs5s
+4bt2
+bt4s5
+5bu
+bune5t
+bu5ri
+bus3a
+buur4tj
+4b3w
+5by
+bys4
+4bz
+4c.
+3ca
+caat5j
+ca1ch
+ca3g2
+came3r
+ca3na
+cant4
+ca5ou
+ca3pr
+cas3
+ca5se
+ca5si
+cas1t
+ca3t
+cau3
+c5c
+3ce
+5ced
+cee4
+5ceel
+5cel
+ce3na
+cen5s4
+ce3ra
+ce3ro
+5ces
+ce3s4a
+ce2sn
+ce3s4t
+ces4u
+ce3ta
+ce4t3j
+cet3o
+1cé
+4ch.
+3chao
+3chec
+3chef
+5chef.
+5chefs
+4cheor
+2chep
+3cheq
+che5rin
+che3us
+1ché
+4chn
+chop4s
+2chp
+4cht
+4chw
+1chy
+3ci
+cier4s5
+ci1eu
+5cil
+ci5le
+ci3ne
+ci5nee
+cis5m
+ci3t
+ci5ta
+c4k3l
+c2k3n
+c4k3r
+c2ku
+3c4l
+cli3e
+c3n
+cno4
+3co
+co2at
+co2k4
+co3ka
+co3kr
+co3la
+5com
+con3g
+co3no
+con5t4
+4coo
+co3p4
+5copa
+corp2
+cor3s
+co3ru
+co3sti
+co3th
+4cout
+c3p
+1cr2
+3cre
+3cris
+croo3
+crus5
+csar5
+c3ste
+4c1t
+ct3afd
+c2t3h
+c2t3j
+c3t4o
+c4t5ond
+c5tor4
+c5tr
+ct3sl
+c2tw
+cty5
+3cu
+cu5b
+cus5t
+c3w
+3cy3
+1ç
+4d.
+1da
+5da.
+3daag
+d4aal
+d3aanw
+daar5e
+2d3acc
+5daden
+2d3af
+da3fr
+3dag
+da2g1a
+da4g3ed
+da4g3et
+da4g3l
+da4gor
+da2gr
+da2gu
+3dai
+4dakk
+da4k5r
+4d3ala
+d4ale
+4dalm
+d2ame
+dam5pl
+3dan
+da4n3a
+d3anke
+dan4kl
+danoot5
+dan4sm
+dans3p
+dan4st
+2d1ap
+4d3ape
+2dar
+da4ra
+4d3arb
+dar4mo
+dar3s
+4dart
+3das3
+3d4at
+da3ta
+da2tr
+5dau
+2db
+dboot5
+dbou4w5i
+2d1c
+dcorre5
+2d5d2
+dde5la
+dder5al
+dde3s
+3de
+5de.
+de3c
+de3d
+5deda
+d4eden
+dee2g3
+dee4r
+dee3t
+de3fl
+d3eg.
+5dega
+5dege
+2d3egg
+de3gl
+4dei
+d3ei.
+d3eie
+d3eig
+d3eis
+deï4s
+de3ke
+4d3ekon
+de4lak
+4delas
+del5do
+del5dr
+del5eek
+de5ler
+de4let
+de4lev
+del5fr
+del4sp
+dels5taa
+del4str
+4demai
+4d3emm
+dem4o
+de3n4ac
+den3ep3
+4d3engt
+de2no
+den3oo
+den5sm
+dent5jes
+5denvl
+de3rab
+de4rad
+de3rak
+de3ram
+de3ran
+de3r4ap
+de3ras
+de4ras.
+5derb
+der5ede
+der5eed
+de4r3ei
+de4rem
+de4r3ep
+derep5e
+de4ret
+de5rij
+de4r3im
+der3og
+der3on
+5ders
+der4s5om
+4d3erts
+de5se
+de3sh
+de4si
+de2sn
+de2so
+de4sp
+des3po
+de5spr
+de3sta
+de3ste
+de5stic
+de3sto
+de3t4
+4d3euro
+de3us.
+de3uss
+deu4tj
+4dexa
+4dexp
+3dè
+2d1f
+2d1g4
+d3ga
+d3gi
+2d1h
+d3he
+dheer4
+3dhi.
+dhis5m
+1di
+dia3s4
+die4tj
+di1eu
+3dig
+di2ga
+dij4kr
+2d3ijz
+di2k3o
+di4k3w
+di5l4e
+di3na
+3ding.
+d5ingel
+d5inh
+d5inr
+4dins
+4d3inw
+2d3inz
+dip4
+di4s
+di5se
+dis5m
+dit3j
+2d1j
+3dji
+2d1k
+2d3l
+2d1m
+2d5n
+1do
+5d4o.
+do5bo
+3doe
+4doef
+doet3
+5doi
+2doks
+5dole
+3d4om
+d5oml
+do2m3o
+dom4s
+do3no
+2d3on4t
+dont3e
+donyx3
+door5tj
+4d3opb
+2d3opl
+4dopv
+d3opz
+2d3org
+dors5m
+dot5j
+2dov
+2d3p
+dpren4
+1dr2
+d3raap
+3drac
+d3rad.
+4d3rand
+4drap
+d1rec
+d3red
+3d4ree
+5dreef
+5d4res
+d4rev
+3dreve
+d3rich
+5drif
+dri3ga
+d3rijd
+d3rijk
+d3rijm
+d3rijs
+5drijv
+d4rin
+5dris
+d3rit
+d4roe
+4d5roei
+d5roer
+3drog
+2d3rok
+4drol
+3d4ron
+d5rond
+4d3rook
+4d3roz
+drug4s
+d3ruit
+5druk
+4d3rus
+2ds
+ds1a
+dsa4d3
+d4s3ed
+d4s3ee
+ds3h
+dsi4g
+dsig5a
+ds3il
+ds3is
+ds3j
+ds4jo
+d4sl
+d5slag
+ds4lan
+ds3li
+ds4lim
+ds3lu
+ds5mal
+d3smee
+ds5mo
+ds3na
+ds3neu
+ds3noo
+ds3on
+ds3op
+ds3or
+d1sp
+d5spak
+d4spal
+ds5par
+d3s4pel
+d4s3pet
+d4spon
+d5s4pro
+ds4t
+d1sta
+d4s5tab
+d3star
+d3ste
+d5ste.
+d4stek
+d5sten
+ds5th
+d3sti
+d1sto
+ds5trem
+d2su
+ds3ur
+ds3uu
+d3sy
+2dt
+d1ta
+dtaart5j
+d1to
+d1tr
+d3tu
+1du
+du3e
+2d3uil
+dui4t
+5duite
+d3uitg
+du3o
+dus5
+dut3j
+2dv
+dvee3
+dve5na
+2dw
+d3wac
+3d2wei
+d3wek
+5dwel
+d3wez
+d3wig
+d1wil
+4d1wo
+3dy3
+dys3e
+dy5st
+2dz
+e1a
+eaan5
+e5ac
+ea3da
+eagent5j
+e2ak
+e3akt
+e5alf
+eal3s4
+e3amb
+eam5p
+eang3
+e3antw
+e3a5o
+e5ap
+e5ard
+eate4
+eb3ac
+e5br
+3ecd
+e1cha
+e1che
+e5chen
+ech3es
+e1chi
+e3cho
+echts5o
+e3chu
+e4c5le
+ecorre5
+3ecz
+e1d
+e3d4ac
+e3d4am
+edans5te
+e5d4as
+edek4l
+ede5rog
+ede5spe
+edie5tj
+4e3do
+edoet4
+edoe5tj
+ed3opv
+e4d3ov
+e3dr
+ed3rod
+ed3rol
+ed4so
+ed5sp
+ed1st
+e4dw
+e5dwan
+ee3a
+ee2d3a
+ee5de
+ee5do
+eed3w
+ee3ee
+ee2f
+eef3r
+eeg1l
+eeg3ou
+ee5in
+ee2k
+ee3ka
+ee5kaa
+eek3ak
+eek5all
+eek1e
+ee3ki
+ee3kl
+eek3lo
+ee3kr
+eek3ro
+eek3ur
+eek3uu
+eek3w
+ee2l
+eel1a
+eel4ee
+eel3ei
+eel5k
+eel3og
+ee3loo
+ee3lop
+eel5so
+eel4su
+ee3lu
+eel3ur
+eel3uu
+4eem
+ee5mo
+ee2n
+een3aa
+een3ad
+een3ar
+een5dr
+een3e
+een5g4
+een5k
+eep3an
+ee5pe
+eep3lo
+eep3ru
+eep4sc
+eep4st
+ee2r
+eer3aa
+eer3al
+ee3ram
+ee3ran
+ee3re
+ee4r3ee
+ee5reg
+ee4r3i4
+eer5k
+eer2o
+eer3og
+eer5oom
+ee3rov
+eers5ag
+eer3sm
+ee3ru
+ee2s
+ee3sj
+ees3lo
+ee3smu
+ee3sn
+ee3soo
+ee3sp
+ees3po
+ees5tek
+ee3sto
+ees3u
+ee2t
+ee3tal
+eet3h
+eet3og
+eet3oo
+eet5or
+ee3tr
+eet3ra
+4eë
+eë4ta
+e3fas
+ef3az
+e3fe
+ef3ei
+ef3ij
+ef3int
+e3flu
+e1fr
+ef4ra
+ef5raa
+e3fran
+ef2s
+ef3sm
+4ega
+eg3all
+egas2
+eg3as.
+ege4las
+egel5ei.
+egel5ov
+ege4raa
+eger5on
+e4g3erv
+e3gi
+eg3ijz
+egiste4
+eg3lui
+3ego.
+eg3ong
+e2g3os
+eg3s4
+eg5sn
+e4g3ur
+e4g3uu
+e5h
+ei5b
+eids5e.
+eids5m
+ei1e
+eie3s
+ei3gl
+e1ij
+ei5kl
+ei3kn
+ei5kr
+eik3s
+ei3la
+ei2lo
+e4in
+ei3n4ac
+ein4d5oo
+ein4dr
+ein5k
+ein5sl
+ei4s3a
+eis5a.
+ei3sh
+ei3sla
+ei3s4lo
+ei4so
+ei4s4p
+ei5spr
+ei3s4ta
+eis5te.
+ei5s4tel
+4eit
+ei5te
+ei3tj
+ei4too
+eit4s
+eive4
+4eiz
+4eï
+e1j4
+ek3aan
+ekaart5j
+ek5af.
+ek3al.
+ek3ang
+e5kaz
+eker4s
+ek5eter
+e4kez
+ek3eze
+ek5loos
+ek3net
+e5kni
+e3ko
+ekoes5
+ek3oss
+ek3rol
+e5kru
+ek3sa
+ek3ske
+eks5m
+ek3sn
+ek3sp
+ek4stel
+e1kw
+e1la
+el1ac
+e2l3af
+el3akk
+el3al
+el3art
+e3las
+el3as.
+e2l3au
+e3laz
+el5azi
+el4dri
+e3le
+e5le.
+e4l3eeu
+el3eff
+el5eier
+e5len
+el4er
+e4l3ert
+el3eta
+el1fl
+el4fr
+elf5sp
+e3li
+e5lig
+e4l3ind
+el5inkt
+el3ins
+eli3pl
+3elix
+el4kon
+el3kr
+elk3sl
+el4k3ur
+e1lo
+e3lob
+e5loep
+el3oes5
+e2l3ol
+el3oms
+el5ond
+el3ont
+el3oog
+e5loos
+el3opg
+el3oph
+el3ops
+el3opv
+e2lor
+el3ord
+el5ore
+el3ove
+e5loz
+el3smi
+el3sta
+el3su
+el5tje.
+e1lu
+el3uit
+em4a
+em5aar
+em3ac
+em5afs
+3emai
+e5man
+4emb
+e3me
+eme4las
+eme4tj
+emf2
+emie4tj
+em3ins
+em4op
+em5opn
+em3org
+em3ov
+em5po
+em2sl
+em1st
+e1na
+en3aap
+e4n3aas
+e2n3ab
+en1ac
+en3ak
+e2n3al
+e4nante
+en3ap
+e5nari
+e2n4as
+en5asi
+en1av
+e2n3az
+enci4
+end3ac
+ender5as
+5enderti
+en5dro
+end5sl
+en4dur
+e5ne.
+en3ech
+e3nee
+en3eed
+enee5t
+en3eg.
+en3egg
+en3ei
+en3eko
+en3ema
+e5nen.
+e4n3ent
+e2nep
+en3epo
+en3erf
+e5nes
+e5net.
+en3ete
+ene4t3j
+e5nett
+engs4
+enier4t
+enin5gr
+eni4s
+enk4l
+en4kre
+enk5tr
+en5kwe
+3enneg
+e1no
+e4n5oc
+en3of
+en3oli
+enoot5
+e4n1op
+en5ops
+en3ord
+eno5s4
+e3not
+en3ov
+en5sch
+en3s4fe
+ens3le
+en4sli
+en4smi
+en4sna
+en5spe
+ens5pot
+en4stij
+enst5ijv
+ens3uu
+en4t4ac
+en3tei
+ente5st
+en1t2h
+en5tl
+ent4r
+ent5rol
+en5tru
+en3tw
+e1nu
+en3ui
+en3ur
+5enveer
+3envij
+3enzes
+3enzev
+e1o
+e3oli
+e3olo
+e5om
+eo3p4r
+eo5ro
+eo5t
+e1pa
+ep3ac
+ep3app
+ep3asp
+ep5een
+e1pi
+3epid
+epiet3
+ep3ijs
+ep3ijz
+epis2
+ep1j
+e1pl
+ep3lod
+ep3lus
+e1po
+e4p3og
+ep3oog
+ep3ork
+e1pr
+e3pra
+ep2s
+eps3j
+eps3l
+ep4sta
+eps5taa
+eps5tal
+e1pu
+ep3uit
+e3ra.
+e1raa
+er5aalm
+er3aan
+e4raap.
+e4r1ac
+e5raco
+e3rad
+er3af.
+er3afv
+e3rag
+e1rai
+e4r3all
+er3ama
+er3ana
+e3ranc
+e5rapi
+er3app
+e3rare
+e1rat
+er3atr
+e3rau
+e4r1av
+er3azi
+er5c
+er3d2a
+er5de
+er5di
+erd4o
+er3d4w
+e1re
+e3re.
+e3rec
+er5editi
+er5eers
+er3eet
+er3eff
+er3eg.
+er3egd
+er3egg
+er3egt
+er3eie
+er3eig
+er3eil
+er5eila
+er5eind
+er3ekw
+e3rel2
+e4r5emm
+e3rend
+ere4ne
+eren5eg
+er5enen.
+eren5ta
+er3eq
+e3res.
+er3esk
+e3ress
+erest5r
+ere4t3j
+e4r3ets
+e2r3ex
+erg2l
+e3ri
+e5rie
+e5rif
+e5rig
+e5rij.
+e5rije
+er3ijl
+e4rijz
+e5rik
+erim3a
+er5inkt
+er3ins
+er3int
+e5rio
+e5ris
+ermij5ni
+e3ro.
+e3rob
+er3oc
+e1rod
+e1roe
+eroe3t4
+er5oev
+er3of
+e3rok
+e3rol
+er3oli
+er3om
+er1on
+er3oog
+e3rook
+e3roos
+er1op
+e2r1or
+e3ros
+e5rose
+e3rot
+er1ov
+e3roz
+e3rö
+errie5tj
+5errillat
+er5tan
+er5te
+ert4h
+er3the
+er5to
+erts5l
+er5t4u
+er1tw
+e1ru
+erug1
+er1ui
+erui5tj
+e2r3ur
+er3uu
+3erwt
+e3ry
+e2sac
+es3ag
+es3al
+es3ar
+es3av
+es4ch
+4ese
+es5emb
+e4s3et
+es3ex
+es5hu
+e5s4id
+es3il
+esis4
+e3sjo
+es5ken
+e3sla
+es3lak
+es3lam
+e3sle
+es3lij
+e3slu
+e1sm
+es3noo
+e1so
+es3ore
+e1sp
+e4spen
+e3spl
+es4poo
+e5s4por
+es4pr
+e4sprie
+espuit5j
+essi4s
+es4sn
+e3staa
+e3stap
+es3tat
+es3te
+e4ste.
+es5teer
+est5ei.
+es4tek
+es5teli
+es5temo
+e4s5ten.
+e5sterre
+e4s5tes
+e3s4tic
+e4stig
+e3stru
+es3uu
+e1sy
+e1ta
+e3ta.
+et3aan
+et3ac
+et3ad
+e3taf
+3etag
+e3tak
+e3tan
+et3art
+e4t3au
+e2tav
+e3te
+et3ein
+4etel
+et5emb
+et3emm
+et3emu
+e5t4en
+etens5u
+eten5tj
+ete3r4a
+eter5sm
+ete3s4t
+et3hu
+et3ins
+e5tja
+e1to
+e5toc
+et5oli
+e3ton
+e3top
+et4or
+e1tr
+et5rec
+et4rek
+et3rim
+e3tru
+et3rui
+et3sl
+et4sla
+ets5lap
+et2s3n
+ets3o
+et4sp
+et5spi
+ets3pr
+et4sta
+ets5tan
+et4stek
+et5s4u
+e1tu
+et1we
+eu5b
+eu3c
+eu5do
+eu1e
+eug4dr
+eu2ka
+eu4ler
+eum3aa
+eu2na
+eun3tj
+eu4rij
+eu1ro
+euro3p
+eus4t
+eu3ste
+eu3tj
+eu5tr
+2euw
+eu4w3e.
+eu2w3i
+eve5n4aa
+3evenr
+e1w
+e5wa
+e5wh
+e5wi
+ew3sk
+1exam
+3exeg
+ex3in
+1exp
+ey3
+e3ya
+ey5sp
+4eza
+4ezen
+ezen4s
+eze5tj
+é3a
+é3d
+édee4
+é3h
+é3r
+éren4
+é3t
+étee4
+è1
+ê1
+4ë
+ë3c
+ë1d
+ëde3s
+ëe4
+ëen3e
+ë3h
+ëi1e
+ë3k
+ë1l
+ë3na
+ënt4
+ënt5h
+ën3tw
+ë3p
+ë1ra
+ë1re
+ë3ri
+ë1ro
+ëro3s
+ë2s5
+ë1t
+ëven4
+ëve5na
+ë4venr
+ëxis5
+2f.
+1fa
+f3aanb
+f3aap
+f4aat
+2fac
+face2
+f1ach
+f4act
+3facu
+4fad
+f3ang
+fant2
+fan4t3j
+fants3
+2f3ap
+f3as.
+fa5st
+3fau
+2fb
+f1c
+2f1d
+fd4an
+fdan5ste
+fde5l
+fde5sp
+fd4i
+f2d3in
+fd5ins
+fd3of
+f3dra
+fd3rek
+fd3rol
+f3dru
+f3dw
+fd2wo
+1fe
+fede3
+f3een
+5fees
+feest5r
+fee3tj
+fel5aan
+fe5laar
+fel5fr
+5fenda
+fe3ran
+fe4r3et
+fe3ro
+fes3
+fe4t3j
+2fex
+3fé
+1fè
+4f1f
+f5fe
+ffs4
+ff3sh
+f1g2
+fge3la
+fge5n
+fger4
+4f3h
+1fi
+3fib
+fi1ch
+fi4e
+5fig
+2f3ijz
+fil2m
+4fint
+5fir
+3fi4s
+fis5m
+f1j
+2f1k
+4f3laa
+f1laf
+1flau
+f3lene
+f3ler.
+fle2t
+flet3j
+f3lez
+2flie
+4flij
+f4lip
+f2lit
+f3lok
+fluit5j
+2f1m
+f1n
+1fo
+foe5d
+2f3of
+f3og
+3fok
+2f3oms
+f4ona
+fonds5l
+fo3no
+fon3t
+f1oog
+f3oom
+2fo2p3
+3f4or
+fo5re
+fort3j
+fo3ru
+fo3sk
+5fot
+2f3oud
+f3ov
+fox3e
+2f5p4
+fr2
+f4ras
+f3rek
+fre4t3
+frie4t
+friet5j
+f4rik
+f4rod
+2f1s
+fs3an
+f3sc
+f5sch
+f4s3cr
+fsho4
+f3sl
+f4slap
+f4s3led
+fsleet5j
+fs5mu
+f3sn
+f4so
+fs3oe
+fsoes5
+fs3on
+f3s4p
+f5spe
+fs4t
+f3sta
+fst3as
+f3ste
+fste4m3
+f3sti
+f3sto
+fst3oc
+f5stok
+f4ston
+f3stu
+4ft
+f1ta
+ft3ac
+f5tand
+ft3art
+ft3h
+f1to
+f1tr
+f1tu
+f5tui
+f3tw
+1fu
+fu4ma
+3f4un
+fu3ro
+2fv
+2f1w
+3fy5
+2fz
+4g.
+1ga
+3ga.
+g4aal
+5gaar.
+gaar5tj
+g4aat
+2g1ac
+4g3afw
+2g3ah
+ga3la
+ga4l3ap
+ga5lo
+g3alt
+3gam
+3gan
+gan5d
+gan4s3t
+gans5te
+gans5tr
+ganti4
+g4ape
+3gar.
+g4are
+3gars
+4g3art
+gar5tj
+ga4s
+ga5sko
+ga5sla.
+ga3sli
+ga5slo
+gas3o
+gas3tr
+gast5rol
+3gat
+3gaw
+2gb
+2g1c
+2g1d
+g5de
+g4d3im
+1ge
+5ge.
+ge3ad
+ge3ak
+ge5al
+ge4ari
+ge5aro
+ge3au
+4g3eb.
+ge1c
+ge3d2
+ge5da
+ge5de
+ge5dr
+ge5dw
+gee4
+gee5si
+geest5r
+geet3a
+ge3f4
+4g3eff
+ge5g4
+gege4s
+g3eik
+geit3j
+ge5ka
+ge5ke
+ge5ki
+ge5kl
+gek4n
+ge3kw
+g4el
+gel5as.
+gel5ass
+gel4d3a
+gel5eg.
+gel5egg
+ge4leie
+gel4o
+gel5oor
+gel3sl
+ge3ma
+ge3m4o
+gems3
+3gen
+5gen.
+ge3n4az
+ge3ne
+ge4n3ed
+gen5end
+gen4er
+4g3engt
+gen5k
+4gensm
+gen4tr
+gent5ra
+ge2ol
+ge5p4
+3ger
+ge1ra
+ger5aap.
+ger4ap
+ger5ape
+ger5as.
+ger4d3r
+ge3r4e
+ge5ree
+ge5reg
+ge5rek
+ge4r5eng
+ge5ri
+ge1ro
+ger4of
+ger4on
+ger5sc
+ger4sp
+4g3erts
+ge3r2u
+ge1s4
+ge5sa
+ge5sc
+ge5se
+ge3sh
+2gesk
+ge5sl
+ge3sn
+ge5so
+ge5spend
+ges5te.
+ge5sto
+ge5sw
+3get
+ge5t4a
+gete4s
+ge5t4i
+ge3tj
+get4r
+ge3ts
+ge5t2w
+ge3ui
+3gev
+ge3x
+1gé
+3gè
+2g1f
+2g3g
+2g1h
+g4her
+1g2i
+gi4ee
+gie4r3a
+giet5s
+gi1eu
+gi2f
+2gij
+4gijz
+gis5m
+2g1j
+2g1k
+g1lam
+1g4la4s5
+g3lat
+3g4laz
+3g4le.
+glee5t
+g3len
+2g3lep
+g3les
+3g2lic
+g3lice
+3g4lië
+g2lim
+3gloe
+g3lof
+3g4lofo
+3glom
+4g3lon
+g3lop
+g2los
+g4lot
+3g2ly
+2g1m
+gmaat5j
+2g1n
+g3na
+gne4t3j
+gnie4t5j
+g2nos
+1go
+go2a
+go5b
+go2do
+god4s3
+gods5t
+2goef
+2gof
+4g3oh
+4g3oli
+go2ma
+g3oml
+2gong
+4g1ont
+2g3oor
+2g3op
+g5ops
+4gore
+gor2s
+go3sk
+gos3t
+gou4d
+goud5ee
+2g3ov
+2g3p
+1gr2
+3gra
+g4rad.
+5graf
+gra2m
+g3ramp
+gras5
+5grav
+2g3red
+gree4
+greet3
+2grem
+g4ren
+gren4s
+gre4s3
+3greu
+grie4t5j
+g5rijd
+g5rijk
+g5rijm
+g5ring
+2g3rit
+2g3riv
+5gron
+groot5j
+g3rou
+g3roz
+2g3rug
+g3ruim
+g3rup
+2gs
+gs1a
+g5sal
+g4s3ar
+g3sc
+gs4ch
+g5scha
+g2sci
+g4sco
+g4s3cr
+g4s3ed
+g4s3ei
+g4s3ek
+gseksa4
+g4si
+gs3ij
+gs3in
+gs3j
+gs4ke.
+gs4ken.
+g2s4l
+g3sla
+g5sla.
+g5slang
+gs5las
+gs5lec
+gs5leg
+gs5let
+gs5leu
+gs5lic
+gs5lie
+g3slo
+g5sloe
+gs5lok
+g5slot
+g4sma
+g4sn
+gs3na
+gs3ne
+g5s4no
+g2s1o
+gs3p
+gs4pa
+gs5pak
+gs5par
+g3s4pe
+g5spee
+g5spel
+g5spet
+g3s4pi
+gs1pl
+g3s4poo
+g3s4por
+g3sta
+gs5taal
+g4staan
+gs3tab
+g4st3ap
+g3ste
+g5stee
+gs3tek
+g5stel
+gs4ten
+gs5tend
+g5ster.
+gs5terr
+g5sters
+gs3th
+gs4ti
+g3stig
+gs5tij
+g5stof
+g5stok
+g4ston
+g5stond
+gst5ons
+gs3tro
+g3stu
+g2s3u
+gs5w
+2gt
+g1ta
+g2t3ap
+gtes4
+gte3st
+g1to
+g1tr
+g1tu
+1gu
+3gu.
+gu5a
+gu4e
+2guit
+gu4lu
+g3uri
+gus3
+2gv
+2g5w
+1gy
+2gz
+2h.
+haar4s
+haar5tj
+haf4t3u
+ha2kr
+hal2f
+4halie
+han5ga
+han4sl
+ha5o
+hap5r
+hap4sp
+har4t3a
+hart3j
+har4t3o
+hart5sl
+ha2t3r
+2hb
+h3c
+2hd
+h2e
+4hea
+3hech
+4hee.
+hee4k3r
+hee4lo
+heeps5c
+hee3tj
+he4f
+hef4fl
+hei4tj
+hei5tr
+heï4s
+he2k3a
+he2kl
+he2k3w
+hel5aard
+he4l3an
+he4l3ee
+hel4m3a
+hel4p3a
+hemi3s4
+he5ne
+hen4kr
+he5n4o
+2heo
+he2p3l
+he4pr
+4he3ra
+her4aa
+he4r3ad
+he4rene
+he4ri
+her3ij
+her3in
+2herm
+herm5eng
+he3ron
+her4p5aa
+her4pr
+hesis5
+he2sp
+2het
+h3g
+h3h
+4hi.
+hie2r3
+hie4ri
+hie4t5o
+hie4tr
+hiet5s
+hij4s
+hi2k3a
+hi4m3ac
+him4pl
+him4pr
+hin4t
+hint3j
+his4te.
+hi3tr
+h3j
+2hl
+h3lam
+h3le
+hlo3
+h3loc
+h3lok
+h3lu
+2hm
+h4mi
+2h3n
+ho5bo
+ho3ch
+hoe4ker
+hoe4s
+hoe3t
+ho4f
+hof5d
+hof3e
+ho3g4
+ho2ka
+hon5dr
+hon5g
+ho1no
+4hoom
+hoor5tj
+hoor5tr
+ho2po
+hop5r
+hor5de
+ho3ro
+hort3j
+4ho3ru
+ho3sa
+ho3sf
+ho3sk
+2how
+2h3p
+hpi4
+2hr
+hra4b
+hri2
+hris5
+hroot5
+4hs
+h3sp
+2ht
+h4t3a
+h4t5emb
+h4t3enn
+h4t3en5t
+h4t3env
+h4t3enz
+hte2r
+hter3a
+hter5e.
+hte4r3o
+h4t3es
+ht5esk
+h2t5ev
+ht3ex
+h2t1h
+h4tij
+h2t1j
+ht3o
+h3too
+ht1r
+ht3ru
+ht4si
+hts3id
+hts3in
+hts3le
+ht4sli
+hts5m
+ht4sna
+ht4so
+ht4spe
+hts5taal
+ht4s5tek
+ht4sti
+ht3u
+ht5w
+huin4s
+huit5j
+3huiz
+hul4der
+4hus
+hut3j
+h3w
+hyl3
+i3a
+ia3f4
+ia3g2
+ia3k4l
+ian3u
+i5a5p
+ia3t2h
+i5av
+i4b
+i5ba
+i5be
+i5bi
+i5bo
+i5br
+ica4p
+i1cha
+i1che
+ichee4
+i1chi
+i1cho
+i3chr
+i5co
+idde4r5a
+id4e
+ider4s
+id2g
+i3di
+idie5t
+id4o
+i3dok
+id3oo
+id5op
+id3re
+id3ru
+id2s
+ids3e.
+id4si
+ids3l
+ids3o
+ids3p
+ids5pa
+ids5taa
+ids5tek
+id4sti
+ids5tor
+ids5tr
+id3ui
+idu3w4
+id1w
+ie3a
+ie4d5ac
+ied3w
+i1ee4
+i5eer
+ie3fle
+ie4g3al
+ie4g3an
+ie4gas
+ie2gr
+ie4k3ap
+ie3ke
+ieke3s
+ie4kl
+iek3li
+ie5klu
+ie4kn
+iek5ond
+iek4s5n
+iek4sp
+ie2k3u
+ie4l3ei
+ie5ler
+iel5f
+i3enc
+iend5r
+ien5sp
+ien4sta
+ien4st5o
+ie4pap
+ie4plo
+iep5str
+ie4pui
+ier3al
+ie3ram
+ier3as
+ie4rat
+ier5enta
+ie1ro
+ier4sl
+ie4sl
+ie5sla
+ie5slu
+ie2sm
+ies5me
+ie2sn
+ie2so
+ies3oo
+ie4spi
+ie4spl
+ie4s3po
+ie3s4ta
+ie5stel
+ie4taa
+ie4t3ak
+ie5te
+ie3th
+ie4t3og
+ie4t3oo
+ie5troe
+ie3twi
+i3ety
+ie3ui
+i1eur
+i1eus
+ieus5te
+i1euz
+ieze4l5a
+i4é
+i5ét
+i3è
+i5èm
+4ië
+ië4ri
+2if
+if3aa
+if3ad
+if4r
+if3ra
+if4tan
+ift5ang
+if4tar
+if3ui
+i2g3aa
+ig5aard
+i4g5av
+ig3een
+igen5er
+ige2s
+ig3esk
+ig3le
+ig3lo
+i4gn
+i5gom
+ig3ond
+i5g4ro
+igs4
+ig3sk
+ig3sl
+ig5sm
+ig3sp
+ig3sto
+i1h
+i3i
+4ij.
+i2j5a
+4ijd.
+4ijdt
+4ij5e
+ije2n3
+4ijf
+ij3i
+4ijli
+4ijn
+ij3o
+i3jou
+4ijsu
+i4ju
+ij3ui
+ik3aar
+ike3s4
+i3ki
+i4kl
+ik4la
+ik5lap
+i5kli
+ik3lo
+ik3lu
+i4k3n
+i5k4ne
+ik3og
+i5kol
+ik3ope
+ik3ord
+i4kr
+ik4ri
+ik3ro
+ik3sj
+iks5m
+ik3s4p
+ik5spa
+ik4s5pi
+ik1st
+ik3wa
+i4k1we
+i3kwi
+ik3win
+i1la
+il3aan
+il3ac
+i3lak
+il3al
+il3au
+il2da
+il2d3r
+i3le
+il3een
+i4l3em
+ile2t
+ile3u
+i4l3ez
+i3li
+il3ink
+ilk4
+il3kr
+il5kw
+illu3
+i1lo
+il3ond
+i5loon
+il3oor
+il3oph
+i2l3or
+il3s2h
+il5so
+il5te
+i1lu
+im5alu
+ima4s
+imie4
+im3op
+im5pa
+3impo
+im4pri
+im3so
+i1na
+in3aap
+i4n3aar
+in1ac
+in5aker
+in3ape
+i3nas
+i5nas.
+in3ass
+in5dac
+ind5sp
+1indu
+in3ede
+in3edi
+in3eed
+in3ert
+3inf
+in2ga
+ing3aa
+ing5aal
+ing3ag
+ing3al
+5ingeni
+ing3l
+in4gr
+ing3re
+ing3ru
+ing4s
+ings5e
+ing5ske
+ings5n
+i3ni
+ini4è
+i4n3i4o
+inis2
+ini3sh
+in4kaa
+in2kn
+inkt3r
+inne3s
+4i1no
+i3noc
+in3og
+i2non
+ino3st
+1inri
+in5sc
+in5se
+in3s4l
+in3smi
+ins4n
+in3so
+in5spo
+in5ste
+in5swi
+in4t3ap
+in5te
+intes3
+in5ti
+in5t4r
+i1nu
+3inva
+i4ny
+i3o
+io3a
+io5b
+ioen4s
+ioes5
+i5o3f4
+i5o3g4
+i5ol
+i5om
+io3no
+ion4s5
+io3pe
+io3pr
+io3ra
+io3s
+iot5j
+io3tr
+io3u
+i1pa
+ip3ac
+ip3af
+i4perw
+ipe4t3j
+i1pi
+ip3j
+i1pl
+i1po
+ip3og
+ip3oo
+ipper4s
+i1pr
+i4ps
+ip4sle
+i3pu
+i3ra
+i1r2e
+ires4
+ire3st
+i3ri
+i3ro
+ir2s
+ir4sc
+ir3sp
+irt4h
+i3ru
+i2s
+i3sa
+is3aa
+is3af
+is3ag
+i5sal
+is3ap
+is1ar
+i5sat
+is3av
+i4sc
+i5scha
+is3cr
+is3ed
+i4s3ei
+is3ell
+is3eng
+is3ete
+iset3j
+i3s2fe
+is3hi
+is3id
+i4sij
+is3ja
+i3sji
+is3l
+is5lag
+is4lan
+is4lot
+is4lui
+i4sm
+is5ma
+is5mi
+is5mo
+is5mu
+i4s5n
+i3so
+i5soe
+i4soo
+is4oor
+is3op
+is3ott
+is3p
+is5par
+is5pas
+is5pl
+is3t
+is1ta
+ist3ap
+is5tas
+is5ten.
+is5tes
+is4th
+i4sti
+is1to
+isto3p
+i3s4tr
+is5tri
+i3su
+i5sy
+4it
+i1ta
+itaat5
+it1ac
+itee4
+it3een
+i5ten
+iten5tj
+i3ter
+ites4
+ite3st
+it1hu
+it2i
+i2tj
+it3ja
+it2je
+it5jesg
+i1to
+it5oef
+it3oog
+it3red
+it1ri
+it1ru
+it3sje
+it3sle
+it1sm
+it1st
+it5ste
+i1tu
+it5w
+i1u
+iu2m
+ium3e
+ive5ran
+ive3re
+i5w
+ix3o
+i3z
+ize3s
+ize5t
+î3
+ï3a
+ï1c
+ï1d
+ïen4
+ïe5ne
+ïllu3
+ï3n3a
+ïns5m
+ï3nu
+ï3o
+ï3ro
+ï5sche
+ïs5m
+ïs3t
+ï1t
+ïze3
+4j.
+jaar4s
+jaars5t
+1jag
+jagers5
+ja5mi
+ja2n3o
+jan4s3l
+ja3pl
+5jar
+jart3j
+5jas
+j2d3aa
+j4d3ee
+jde4n3e
+jden4s5
+jdes4
+jde5sp
+j3di
+j2d3o
+j4dr
+j5dra
+jd3re
+jd3ro
+jd3ru
+jd5s4l
+jd4so
+jd1st
+j4d3u
+jd3w
+j3d4wa
+5jeba
+2j1ee
+jeen3
+j1en
+je2n3a
+je3ro
+je4s3
+5jesaa
+5jesha
+5jesho
+3jeskl
+3jeskn
+jes5m
+5jespe
+je3spr
+3jesr
+3jess
+jes5t
+5jesv
+5jesw
+je2t3
+je3to
+5jeu
+5jeva
+j2f1a
+j2f3ei
+j2f3en
+j4f3ij
+j4f3in
+jf3l
+jf4la
+jf5lap
+j3flat
+j4f3o
+jf3r
+jf4sc
+jf4s3l
+jf2sm
+jg3laa
+j4g3re
+jg2s3
+jg4se
+jgs5l
+jgs5m
+jg5sn
+jg4st
+jg5s4te
+j3h
+3jic
+jif5
+j3ig
+jis5m
+j3j
+4jk
+j2k3aa
+jke5ro
+j2kij
+j2k4l
+jk5lak
+jk5lap
+jk5las
+j3kle
+j3klo
+jk5lu
+j2kna
+j2k3of
+j4k3ol
+j2kr
+jk3raa
+jk3re
+jk4si
+jk2sl
+jks5le
+jks5m
+jks5n
+jk3so
+jks3pr
+j2k3ui
+jk3w
+j1la
+j1le
+jl3ink
+j1lo
+j2loe
+jm3af
+j5m4ar
+jm3op
+jn1a
+j4naa
+j3nag
+jn5ak
+jn4am
+j3n4an
+jne3s
+jn3g4
+j4n3im
+jn3ink
+jn1o
+jn4s3am
+jn2s3l
+jn4sp
+jn5spi
+jnt4
+jn5tr
+job2
+jol4e
+jo5li
+j3om
+3j4on
+jone2
+5jonge
+jonge4t
+joor5t
+jo3ra
+j4ou
+joy5
+j3pa
+j4p3ac
+j2p3em
+jpe3s4
+j3pi
+j4p3ij
+jp3j
+j3pl
+jp3lam
+j3po
+j4p3or
+jp3re
+jp3ri
+j3pro
+j3r
+js3a
+j5se
+j4si
+j2s4l
+j3sla
+js5las
+j3sle
+j3sme
+js5mi
+j2s3n
+j3sni
+js3o
+j1sp
+j4spo
+js3poo
+jspoort5j
+j5spor
+j1sta
+jst5aar
+js3te
+j3stei
+j3s4tel
+j4s5tem
+js5tep
+j4ster
+js4tij
+j3sto
+j4stoo
+js3tou
+j4stra
+jst5ran
+jst5s
+j2su
+j3taal
+jt3aar
+jt1ac
+j3tag
+j3tak
+j3tan
+j3te
+j4t1h
+jt3jes
+j3to
+j3tr
+j4t3ra
+jt4rad
+jt3rot
+j1tu
+jt3w
+1ju
+juit2
+juits3
+juli3
+5jur
+jus3
+juve5
+jve2n
+jve3ra
+jver4s
+jve3t4
+j1w
+jze4r5o
+2k.
+1ka
+3ka.
+k4aat
+2k1ac
+3kace
+5kad4
+kade4t5
+4k4af.
+2kafr
+k3agen
+k4ake
+4kakt
+4kalb
+5kalf
+kalf4s
+kal4k3a
+5kalv
+2kamb
+kamen4
+kam4pr
+kan5d
+2kang
+5kani
+5k4a3no
+kan4t3j
+5kap.
+ka3pr
+kap3s
+kas4pe
+kas3tr
+kast5ra
+kas5tro
+ka4t3aa
+ka4t5ale
+ka4tan
+kat1j
+k3atl
+ka4t3og
+ka4too
+ka5t4r
+kat3s
+4k3aut
+2k3avo
+5kay
+2kb
+2k1c
+2k3d
+1ke
+4keen
+keep3l
+keers5to
+kee3tj
+k4ei.
+k4eie
+kei3s4
+3ken.
+ken5as
+ke3ne
+ke4nep
+ke2n3o
+5kens
+kens5po
+kepie5t4
+5ker.
+ke5rij
+ker4kn
+ker4kr
+kerk5ra
+ker4ku
+ker4kw
+ker4n3a
+ke4r3o
+5kers
+ker4sla
+ker4sm
+4k3erts
+ke2st
+ke3sta
+ke5s4tel
+kes3tr
+3k2et
+5ketel
+ke2t3j
+ket5sp
+4ketu
+3k2eu
+4kex
+2k1f
+2k1g
+2k3h
+1ki
+4kied
+4kiep
+kies4t
+kie4t3j
+k3ijs
+2k1ijz
+ki5kl
+ki3na
+4kindu
+kin3en
+ki4n3es
+5king
+2kinr
+2k3ins
+kio4
+ki2p
+kip3l
+4k5j
+2k5k
+kker4s
+kkers5te
+kke3s4
+1k2l4
+5klac
+kla2p
+5klass
+k3last
+4klat
+3k4lau
+5k4led
+4kleer
+4k5leg
+k3lek
+klemme5t
+k3len
+4klera
+k3les
+5k4leu
+4k3lic
+k3lij
+kli4me
+k4lis
+4klod
+k3loka
+k3lone
+k3lood
+5kloof
+k3lope
+5klos
+2k1loz
+4kluih
+k3lus
+2k1m
+1k2n
+kna4l
+knas5
+2k3nem
+kni2
+5knol
+k3noot
+k3note
+2knum
+1ko
+2k3oct
+ko4e
+koe4ket
+koers5p
+koe3tj
+k4offi
+koge4
+5kogr
+kol2e2
+kolen3
+2kolm
+ko5lo
+3kom
+ko4m3a
+komitee5
+3kon
+kon4t3r
+2k3oog
+koon5
+koor5tj
+k4o4pl
+3kopt
+2k1org
+2k3ork
+korres5
+kort3o
+ko3ru
+ko4s
+4k3os.
+4koss
+k4ost
+kot5j
+4k3ov
+4kox
+2k1p
+kpren4
+1kr4
+3kra
+k3raad
+kra4b
+4k3rad
+k3rand
+4krat
+2k1rec
+kree4
+kreet3
+kre2p
+k3rijk
+2krol
+kron5t
+2k3rou
+3k4ru
+kru4l
+2ks
+ks3ad
+ks3af
+k5sap
+k4s1ar
+ks3as
+k5s4er
+k4s3in
+k3sla
+k4slan
+ks4le
+ks5leg
+ks3li
+ks5mo
+k2s3n
+ks4no
+k4snu
+kso4
+ks3on
+k4s1op
+k4s3pa
+k1spe
+k3spi
+ks3po
+ks3pru
+k3spu
+ks4t
+k1sta
+k3ste
+k4st3ed
+k4stele
+ks5tent
+kste4r
+k3sti
+k3sto
+k4ston
+k4s5tre
+ks5tri
+k3stue
+k2su
+2kt
+k1ta
+ktaat5
+kte2n3
+kter4sp
+ktes4
+kte3st
+kt1h
+k4t3in
+k2t3j
+3ktl
+k3to
+4ktpa
+4k1tr
+k1tu
+3ktv
+4ktvi
+1ku
+kui2f
+3kul
+k3up
+3kus
+kut3j
+2kv
+k1wag
+5k2wam
+3k4was
+2kwed
+kwee3s
+2k5weg
+k1wei
+2k1wer
+5kwes1
+k3wijz
+k4wik
+2kwim
+2kwin
+2k1wo
+3ky5
+2kz
+4l.
+4laaf
+4laand
+laars5tek
+laar5tj
+laats5tr
+2lac
+3lach.
+3lache
+l4aci
+3lact
+la2d3a
+la4det
+2ladj
+2la2dr
+la2du
+3l4ae
+laes4
+la2fa
+la3fl
+lafo2
+4lafs
+la2ga
+la2g3o
+la2gr
+lag3ri
+la4ki
+la3kl
+l3akti
+2lal
+3lald
+la5lo
+la4mo
+lam4p3j
+lamp3l
+2l3ana
+3land
+lan4da
+land5aa
+lan4dr
+land5ra
+land5re
+laneet5
+la4n3ek
+5lange.
+lan4gr
+lan4ka
+lan4k3l
+lank3w
+lan4sl
+lan4t3j
+la4pa
+3lapj
+lap1l
+lap5r
+la2p3u
+2l3arb
+4lart
+l4as
+las3a
+la4si
+la3te
+la4t3he
+la4t3ro
+la3un
+l4auw
+lava5s
+l4az
+4lazi
+lber4
+lbert3
+l1c
+4ld
+ldaat5
+ld3ac
+ldak4
+l3dar
+ld3ari
+ld3art
+ld3ei
+l4dom
+l2d3os
+ld3ov
+ld3ram
+l2d3re
+ld3s4a
+ld5sl
+ld3sm
+l2d3uu
+ld1w
+l4e.
+le2a
+le3ad
+le3an
+le3at
+lee4
+4leekh
+leem5ac
+3leen
+4leep
+lee5ro
+lees3p
+lees5tr
+lee3tj
+le3fl
+legas5
+le4g3ek
+4leig
+lei5sc
+le5ke
+2leks
+le4kw
+le4lim
+lemme4t
+l4en
+5len.
+len3ad
+le4n5ak
+len5as
+3leni
+len5sl
+len4s3p
+len4tr
+len5tre
+le5pe
+3le5r4a
+ler4e
+le5rei
+ler5g4
+le3ro
+lers4
+l5erts
+l5erv
+les3ta
+les3ur
+le3t2h
+le5t4i
+le4t3ro
+4l3etu
+leu3ko
+5leun
+leu5ste
+5leuz
+leven4s5
+4l3exc
+lexis5
+3lé
+lf3ac
+l3fag
+l4f3an
+lfbe5
+l2f3ei
+l2f3el
+l4fend
+lf5ende
+l4fin
+lf3lak
+l3flo
+l4fo
+l5foe
+lf3ol
+lf3on
+lf3op
+l5for
+l5fou
+lf4r
+lf5raa
+lf5ram
+l3fran
+l3fre
+lf5rij
+lf5ro
+l5fru
+lf2sa
+lfs5ei
+lf2sm
+lf4spo
+l2fu
+l3fui
+lf3uu
+l1g
+l5gaar
+l2g3af
+l3gla
+lg3on
+lg3re
+l3gru
+l1h
+1li
+3li.
+3lid.
+li3da
+3lied
+lie4gr
+li3enn
+lies3p
+lie3st
+lie5ta
+3li4è
+li3g4a
+lij4k3o
+lij4m3a
+5lijn
+4lijp
+3lijs
+lij4st
+4lijt
+4l3ijz
+li2ko
+li5kr
+lim4p3j
+5lin.
+lin4da
+li5ne
+l4ing
+lin5gr
+link3a
+lin5ke
+4linkt
+4linr
+4lins
+lin4t3j
+li2p
+4lipj
+li5sa
+li5se
+lis5m
+l3isw
+li1th
+3liv
+l1j2
+lk3af
+lk3alb
+lk3ank
+lk3een
+l4kei
+l2k3em
+l4k3ep
+lk3laa
+lk3lag
+l4k3lev
+lk3ont
+l2k4ri
+lk5rij
+l2k3ro
+lk2s
+lk4sa
+lk4se
+lks5m
+lks5ta
+lks5tel
+l4k3uu
+l4kw
+lk3wi
+2l1l
+l3la
+lla5t4
+l3le
+lle5k
+lle4sp
+l5li
+lli4a.
+llo3s
+ll3ov
+2l1m
+lm3art
+lm3ed
+l4m3ind
+lm3oli
+lm4op
+lm5opn
+l3n
+lni4
+loe4da
+loed3r
+4loefe
+2loes
+3loë
+lof5d2
+lof2s
+lo3go
+5logr
+lo4gre
+log4s
+lo4kar
+lo2kl
+lo2ko
+3lol.
+3lold
+lom4p3l
+4loms
+4l3omt
+l3omv
+3lon.
+lo4na
+lon4gr
+lont3j
+3look
+3loo4n
+2loor
+l4opa
+2loph
+2l3opn
+4lops
+4l3opw
+l4or.
+4l3org
+lo3ru
+lo4sc
+lo4sp
+lo5spe
+lost4
+los5tr
+lo2t3h
+lot5j
+2love
+lox3e
+lo3ys
+3loz
+4l1p
+l3pa
+lpe4ni
+lper5sp
+lpe3s4
+lp3of
+lp3on
+l3pot
+lp5ram
+4l3r
+lrus5
+2ls
+l4s3aa
+l4s3ad
+ls3ag
+l3sak
+l3sal
+ls3an
+l4s3ep
+ls2j
+ls3ja
+ls4ky
+l4s3laa
+l2s3le
+l2s3li
+ls4lin
+l3smee
+ls5mo
+l4so
+l5soe
+ls3of
+l5sol
+l5som
+ls3on
+ls3or
+l1sp
+l5spe
+lspee4
+ls3pol
+l5spor
+l2s3pu
+ls4t
+l1sta
+l1ste
+l5ste.
+l4stele
+l5sten
+l4s5term
+l3sti
+l1sto
+ls5tou
+l5straa
+ls5trak
+l5strat
+l2su
+4lt
+l1ta
+lt1ac
+l4tam
+l5tame
+lt3h
+lt4han
+lt4he
+l3thu
+l3tj
+l1to
+lt5oli
+l2t3ov
+l5tr
+lt3sl
+l1tu
+lt3w
+lu1e
+3lui.
+3luid
+5luih
+lui5ste.
+4luit
+lu3ka
+5lu3na
+lu1o
+lu3sta
+lut3j
+lve3s4
+lvi4s
+l1w
+1ly
+ly5st
+2m.
+1ma
+5m4a.
+5m4aat
+ma4cl
+mae3
+2maf
+m5afl
+5m4ag
+5maj
+ma3ka
+ma5l4a
+mal5ent
+3man
+man3ac
+man4se
+man4sn
+man4so
+mans3p
+man4st
+mans5ta
+man5ste
+mant4r
+ma3pl
+5marc
+mariet5
+5mark
+mar3s4h
+mar4s5t
+mart3j
+3mas
+ma3s4p
+ma5str
+ma5ta
+m3atom
+m3atoo
+mazig5er
+2mb
+mbos4
+mbo3st
+m1c
+2md
+mdis5
+md3so
+1m2e
+3me.
+me5d
+m4ede
+mede5l
+mede5s
+mee5re
+mee5r4i
+5mees
+meest5a
+mee5str
+3mega
+5mei
+mei2n
+3mel
+mel5as.
+5melk
+mel4kr
+5melo
+3men
+me3na
+men5k
+men3sm
+men4t3j
+men4tu
+men4t5w
+me3p4j
+me4r5aak
+me4rad
+mer3ak
+mer4am
+me3ran
+me5re
+merg4s5
+meris4
+5merk
+mer4ka
+mer4kl
+mer4kw
+me3roo
+me2s
+2me3s2h
+mes5m
+me3so
+me3sta
+mest3r
+me5te
+5me3t4h
+me5tr
+me3us.
+3mé
+3mè
+3mê
+2m1f
+mfe4r
+mfi3
+mfoor5
+2m1g
+mgaat5
+mgang4
+mger4
+2m1h
+3m2i
+miaat5
+5midd
+mie5kl
+mies4
+mie3st
+mi4è
+5mig
+mij4ni
+4m3ijs
+4m3ijz
+mi3lo
+4m3inr
+4mins
+4mint
+5misd
+mis5m
+mi4so
+mi4st
+mi5sto
+mis5tr
+mi1tr
+2m3j
+2m3k2
+mkaart5j
+2m3l
+2m1m
+mmi3sl
+m1n
+1mo
+5moe.
+5moed
+moed4s
+5moeë
+2moef
+5moeh
+moe2s
+moe5ste.
+moets5
+5mog
+5mole
+moli5è
+mol4m3a
+4m3omv
+mo3n2a
+mond3r
+mo3no
+mon4so
+5mooi
+moor5tj
+2mop
+m5ope
+mo3ra
+mo5r4e
+mo3ro
+mor4s3p
+5mos3
+mo3s4ta
+mo3th
+mot5j
+4m3oud
+5mouw
+4m1p
+mp3ach
+m4p3af
+m3pl
+mp3leg
+mp3lei
+mp3ler
+mp3lu
+m4pol
+mp3oli
+mpo2t
+mp3rec
+mp3red
+mp3rin
+m3p4se4
+mp3sh
+2m3r
+2ms
+m3sam
+ms3ap
+ms3ar
+ms2j
+m3sje
+m5sla
+ms3len
+m5slo
+ms5nee
+ms3oo
+ms3or
+m3s4p
+ms5pot
+ms4t
+m3sta
+m1ste
+m1sti
+m1sto
+2mt
+m1ta
+m3th
+m1to
+m1tr
+m1tu
+1mu
+5mun
+5mur
+5mus
+mus5t
+5mut
+5muu
+5muz
+2mv
+mvan4
+2m1w
+3my
+2mz
+mze2t
+4n.
+3na.
+1naal
+5n4aam
+2n1aan
+2naap
+4n3aard
+5naars
+naar5tj
+5naat
+2nac
+nacee5t
+3naco
+nad4
+n4aden
+5nae
+na3er
+2n1af
+n4a3g4
+5nai
+5naï
+n4a5ke
+4naker
+na3k4l
+3n4ale
+4n3alf
+3n4ali
+nal5k
+3nam
+n4ami
+na3na
+na3ne
+3n4ani
+n5anj
+n3ank
+5nant.
+nan4t3j
+2nap
+na4pa
+na1pl
+na3pr
+nap3s
+4n3ara
+2n1arb
+2narc
+5nares
+narie5t
+n3ark
+2n1arm
+2n3art
+na3s4
+3na1sa
+na1sp
+nas5te
+5nat.
+2n3atl
+nat2r
+na3us
+2naut
+2nav
+2nb
+nboot5
+n1c
+ncen5
+nch3tr
+2nd
+n3da
+n5daal
+nd3aas
+n4dac
+nd5adel
+n5dale
+nd3alm
+n4dap
+nd3art
+n4d3as
+n4d3az
+nd3edi
+n4deg
+nd1ei
+n5del
+nde5lev
+n5den.
+nd4er
+nder5aal
+nder5al
+n4d5erec
+nder5in.
+ndes4
+n4d3ete
+ndiet5j
+n4d3ijs
+nd3ins
+nd2ji
+n2d3of
+nd5olie
+nd5omd
+nd3oog
+nd5oorl
+n3dov
+n3dr
+nd3rap
+nd3rat
+n4d3re
+nd4ren
+ndre3u
+n5drev
+nd3rot
+nd5slo
+nds5ma
+nd3sme
+nd3soo
+nd3sp
+nd4s5tal
+nd3uri
+nd1w
+ndy5
+1ne
+nebe4s
+2nech
+ne5dw
+nee4
+4need
+4n1een
+nees3
+nee3tj
+neg2
+nege4n
+ne1gl
+ne5g4r
+2nei
+n4ei.
+n4eie
+n4eig
+4neis
+ne4kr
+4n3ela
+3n4eme
+2n3emm
+3n4en.
+4n3enc
+n4end.
+nen5k
+n3enke
+ne2n3o
+ne4p3ol
+5ner.
+ne1ra
+5n2ere
+4nerf
+ne4r3id
+ne3ro
+ner2s
+3nes
+ne3sta
+nes4tei
+ne5stek
+4neter
+5netj
+net5sp
+4neum
+ne3um.
+ne3ume
+ne3ums
+neu5ste
+3né
+4n3f2
+2ng
+ng3ad
+ng3ak
+n4gap
+n2g3ar
+nga5sl
+n5ger
+nge4rap
+nge4ras
+nger5sp
+ng3ij
+n4g3ins
+ng3le
+n3glis
+ng3of
+n2g3on
+ng3ore
+n3gr
+ng3rad
+ng3ram
+n4g3ras
+ng3rat
+ng4re
+n2g4ri
+ng5rie
+ng3rij
+ng3rok
+ng3roo
+ng2s
+ngs3e.
+ngs5le
+ng4slo
+ngs5loop
+ngs5m
+ngs1p
+ngs5pa
+ngs3tr
+ng3uit
+2n1h
+1n2i
+nie5k4a
+nie5kl
+nie4tr
+3nieu
+ni4gee
+ni4g3r
+nij3k
+4n3ijz
+nika3
+3nim
+2n3in.
+4n3ind
+3ning
+5ning.
+ning3r
+ning5re
+nin2k
+n3inkt
+2n3inr
+2n3ins
+4nion
+5nise
+ni4sel
+nis5m
+ni3th
+ni1t4r
+ni5ts
+5nitz
+5niv
+n1j4
+nje5sc
+nje3t4
+4n1k
+nk3aan
+nk5aard
+nkaart5j
+nk4ab
+n2k3af
+n4k3ak
+nk3ana
+n4k3asp
+nker5ku
+n4kerw
+nk3lad
+nk3ler
+nk3lod
+n2k3na
+n3kne
+nk3not
+n2k3of
+n4kog
+nk3oge
+nkoot5
+nk3red
+nk3rek
+nk3roe
+nk3rol
+nk3sn
+nk4s5o
+nk3s4p
+nk1st
+nk4tr
+n4kw
+nk3waa
+nk3wez
+nk1wi
+2n3l
+2n5m
+nmazi4
+n3n4
+nnee5t
+3no.
+4n3oec
+2noef
+noes5te
+noet3j
+noet5s
+n4of
+2n5ofe
+1nog
+no4gal
+4n3oge
+no3ia
+1nom
+4n3om.
+3noma
+3nomi
+2n3omw
+2n3ond
+2n1ont
+4n3onz
+4noof
+2n1oog
+n4oot
+2nop
+n4opa
+n1opg
+n3opn
+no4por
+n3opv
+n4ora
+2nord
+n4ore
+2norg
+no3sf
+no3sp
+n4ot
+not5j
+4n3ou
+2nov
+2n3p
+npoort5
+n5r
+4ns
+n3saal
+ns3ad
+ns3af
+n3sag
+ns5ak
+n3sal
+ns3alp
+n3sam
+ns3an
+n3sapp
+n3sar
+n3sas
+ns3av
+n3s4c
+n5sca
+n5sci
+n4s5co
+n4s5cu
+n4sed
+ns3edi
+nsee5t
+n4s3eg
+nsei5
+n5sen
+ns4fee
+ns3ja
+n3sjo
+n5slag
+ns3lak
+n5slap
+ns3lat
+n4sle
+ns3led
+ns3lie
+n5s4liep
+ns3lop
+ns5mac
+n3sme
+n5smij
+ns5mis
+ns5moe
+n3smol
+ns5mu
+ns3nod
+ns3noo
+n1so
+ns3of
+n4sog
+n5sol
+n4som
+n5som.
+n2son
+n3sp
+n4s3paa
+ns3pad
+n4spl
+ns3por
+n4spot
+ns4t
+n1sta
+n4staak
+n3ste
+n4st3ei
+n5sten.
+ns5tent
+n3sti
+n1sto
+nst5oef
+nst5oor
+n5stru
+nst5uit
+n4sui
+ns3uil
+n4suu
+n5sy
+4nt
+n3ta
+n5taal
+n4t5aard
+ntaar5tj
+n5tab
+nt3ach
+nt3ad
+nt3aga
+n5tal
+n4t3art
+n5tat
+n5teg
+n2tei
+n5tel
+nte4lo
+n5tem
+n5t4en
+nte5re
+nte4st
+nte5ste
+n5tev
+nt3ex
+n3tè
+nt3ha
+n4tho
+n5thol
+nt1hu
+nt4i
+nt5ijz
+nt5inw
+nt4jo
+n1t4o
+n5toe
+nt5oge
+n5toï
+nt5oli
+nt5oms
+nt5oog
+ntoor5
+nt5opn
+n3tr
+nt3rec
+n5tref
+nt3rei
+n5trem
+n4t5rij
+n5troos
+nt3ru
+n5tsj
+nt1sm
+nts5pre
+nts5tan
+nt5ste
+nt5sto
+nts5tro
+n1tu
+nt5uit
+nt3w
+nt2wi
+nt4wis
+3nu.
+nu3a
+nu3en
+nu3et
+2nui
+4n3uil
+nu2lo
+n3ult
+3num
+4n3uni
+2nur
+5n4uri
+nu4s
+nus3o
+nut3sh
+2n3uur
+nu4wi
+nu5wing
+2nv
+nval4s
+4n1w
+nx3
+nx4e
+3ny
+n3yi
+4nz
+nzet5s
+3ñ
+o1a
+o2as
+oas3t
+o3av
+o4b
+o5ba
+obalt3
+o5bi
+3obj
+o5bl
+ob3oor
+ob3or
+obos4
+ob5ov
+o5br
+o3cha
+o1che
+o1chi
+o1cho
+o3chr
+o3chu
+ocos4
+oc5t4
+4od.
+oda3g
+ode4m5o
+o5d4e2n
+ode5sp
+od3on
+o5doo
+od3op.
+od3re
+od5slan
+od5sli
+od5slo
+ods5m
+ods3o
+od4spr
+od1w
+oe4d3aa
+oed3ar
+oe4d3on
+oe4dr
+oed3ri
+oed3ro
+oe2d3u
+oed3w
+oe4f3a
+1oefe
+oe2fi
+oef3la
+oef3le
+oe4f5o
+oe2f3r
+oege3l
+oei5s4
+oek5erk
+oe2k3l
+oe2k3w
+oe3l2a
+oe4lac
+oel4ak
+oe4l3ap
+oe4l3ei
+oe4m5ac
+oeme5tj
+oe5n4e
+oe2n5o
+o3eo
+4oep
+oe4plu
+oe2p3r
+oe2p3u
+oe3ra
+oe4r3aa
+oe4r3al
+oe4rau
+oer5ei.
+oer3o
+oer5om
+oer4sl
+oer4sn
+oer4sp
+oes3a
+oes3li
+oe4s3o
+oes4t
+oe3sta
+oes5ter
+oes5tig
+oes5tin
+oe3sto
+oe4taa
+oe4t3an
+oe4tei
+oet3h
+oe2tj
+oe4tra
+oets3p
+oet3w
+4oë
+4ofa
+of3ar
+of4d1a
+ofd3ei
+of2do
+ofd3on
+of2dr
+ofd3re
+of4d1w
+o3fe
+o3fi
+of3l
+of4la
+o3f4lu
+of3om
+o3fon
+o3foo
+of1r
+of2sa
+of4si
+of4s3l
+of4sp
+ofs5pl
+ofs5tr
+oft2s
+of4tu
+oft3ur
+oft3uu
+og3al.
+og3ap
+4ogee
+ogel5ei
+ogen5t
+1ogig
+4og1l
+4og3n
+o4g5ne
+og4op
+ogs5e.
+og4s5l
+ogs5m
+og3sp
+ogs4pr
+ogs4t
+og5ste
+og3sto
+og4st3r
+o1h
+2oi
+oi4a
+oi2a.
+oi1e
+oile4
+o3ing
+oi3s4
+oi5sc
+ois5m
+oist4
+ois5tj
+oi3tj
+o1j4
+oj5k
+o3kaa
+o4k3aas
+okaat5
+ok3ab
+ok3ag
+o3kal
+ok3an
+ok3ar
+o4k3az
+ok3een
+oki2n
+o3kla
+ok3let
+o2k3li
+ok3lo
+ok3lu
+o2k3n
+ok3ol
+o2k3op
+o2k3ou
+o2k3r
+o5k4ra
+ok3sa
+ok3sp
+ok4spo
+ok1st4
+okter4s
+ok3uu
+ok3w
+4ol.
+o1la
+ol3ac
+ol3ap
+4old
+o1le
+o3le.
+ol1ei
+ol3eks
+o3len
+o3ler
+ole1u2
+olf3l
+olf4s
+olf5sl
+ol2gl
+ol2g3o
+ol2gr
+olg3ri
+o5ling
+o3lit
+ol4k3aa
+ol5kaf
+ol5ke
+ol2kr
+olks1
+ol5kw
+ollie4
+ol3mo
+o1lo
+o5loc
+olo3k4
+ol4om
+o2l3op
+olos3
+ol3ove
+ol4p5ra
+ol1sj
+ol3sk
+ol3sl
+o1lu
+ol3ui
+ol3un
+ol3ur
+4oma
+om3ac
+om3af
+om3eg
+om3ela
+o5men.
+omer5k
+o3me4s
+ome5sp
+om3ez
+om3ins
+om3int
+4omm
+om3op
+om3pa
+om4p3la
+om3ui
+4omy
+o1na
+on1ac
+o3nag
+o3nal
+on3am
+o3nat
+on3au
+2ond.
+ond3ac
+on4ded
+ond5eng
+onde5ras
+onde5st
+on4dij
+ond5om.
+on4dr
+on5dra
+ond5re
+ond3ro
+4onds
+o2n3ec
+on5ei
+on3ekl
+on3eng
+one5ste
+on3ga
+on4gaa
+ong5aap
+ong5ap
+4ongen
+on4gri
+ongs5k
+o3ni
+on4in
+2onk
+on4k3ap
+on3k4i
+on5kw
+onne5st
+on1ov
+on3sm
+on2s3n
+on4spe
+on1st
+on5su
+3ont1h
+on5ti
+on4tj
+on4tog
+on4too
+on2tr
+on5tu
+on1ui
+o4o2
+oo3c
+oo4d
+ood1a
+ood1e
+ood1r
+ood5sl
+ood5ste
+4oof
+oo4g
+oog3a
+oog1e
+oog1r
+ook5s
+ool1a
+ool3e
+ool5f
+oo4l3i
+ool5k
+ool3o
+ool3u
+oo4m
+oom1a
+oom3o
+4oon
+oon3a
+oon5tj
+oop1a
+oop5e
+oor3a
+oor4daa
+oor1e
+oor5i
+oor5m
+oor1o
+oor3sm
+oor5to
+oo4t
+oot1a
+oo3te
+oot1h
+oot5o
+oot3r
+oot4sl
+o1pa
+op3aar
+op3ac
+o4p3ak
+o4p3an
+o2p3as
+op3at.
+op3atl
+5opdr
+o2p3ee
+op5een
+op5eet
+o2p3ei
+op3ete
+op4her
+o1pi
+o2p3id
+opie5t
+op3ijz
+op1j
+op3l
+o1po
+o3poe
+op3of
+o4p3oo
+op3ord
+op3ore
+op3ov
+op3r
+op5rak
+3o4pru
+ops4l
+op3sme
+op3sn
+op5sto
+4opt.
+o1pu
+o4py
+o1ra
+or3ac
+or1af
+or2do
+or4doo
+or4d3or
+ord3w
+o1re
+or4en
+oren3a
+or2g3l
+or3g2n
+o1ri
+or3ins
+or4m3ac
+or4n3ac
+or3no
+or5oe
+oroes5
+or1on
+or1oo
+or1op
+or4p3ac
+orp4sc
+or5se
+or4s5k
+or4t3ak
+orte5n4a
+or4tev
+or4tj
+or4t3oo
+or4tor
+ort5sp
+ort1w
+or1u
+or3ur
+o3ry
+os3aa
+os3ap
+o3sar
+o3s4c
+o5sch
+o5sco
+o5s4e
+ose5st
+os2f
+o3s4fee
+os2ko
+o2s3l
+os5m
+o2s3n
+o1s4o
+os5ol
+os3p
+os4pe
+o5spect.
+o5specte
+os5pek
+os5per
+os4po
+o2st
+os3taa
+os5taal
+os5taar
+ost3ag
+os3tal
+o5s4tas
+os4tat
+os3te
+os5te.
+o3stè
+os3to
+ost3ov
+ost3re
+ost3ri
+o3stro
+os5tru
+os3tu
+o3sy
+o1ta
+ot3aar
+ot3ac
+o2t3ak
+o5tam
+o4t3ap
+ot3as
+o5teb
+ot3ed
+o5tee
+o5tem
+o5ter
+ote5ri
+ote4s5ta
+o1th
+o3t4hi
+o2tho
+ot3hu
+o4t4j
+ot5jo
+o1to
+o2t5ol
+oto3p
+ot3ri4
+o3tro
+ots3a
+ot5si
+ot2s3l
+ot5so
+ot4s5pa
+ot4str
+o1tu
+ot3ui
+o3tul
+ot1w
+ou3a
+ou5b
+ou1c
+ou4d1a
+ouden5t
+ou1e2
+ou3k4
+ou4re.
+ou4res
+ou2ta
+out1j
+ou2t3o
+out3r
+out3sp
+ouw5do
+4ova
+o5ve
+3overg
+2ovi
+ovi5so
+o1wa
+o3we
+o3wi
+own3
+o3wo
+ow3r
+o4x
+1oxy
+oys4
+o3z
+oze3s4
+ö3l
+4p.
+3paal
+4paan
+paar5du
+paar5tj
+2pac
+pacht5s
+p2aci
+5pad.
+pa2d3r
+3pag
+pag4a
+pa3gh
+pa2k
+5pak.
+pak3a
+p4ake
+3pakk
+3pale
+paling5s
+pal5kl
+palli5a
+palm5a
+pal4mo
+pa3na
+pa4n3ad
+4pank
+pan3o
+pan5sp
+pan4t3r
+3pap
+5papi
+pap5l
+pa3pr
+4par.
+3para
+par3d4
+4parr
+par3th
+3parti
+part3j
+pa5ru
+pas3
+pa3sa
+pa4sc
+pa3so
+4pat.
+pa5te
+2patl
+3pau
+4p3aut
+1pav
+2pb
+p1c
+2p3d
+1pe
+pe3au
+3peb
+4peci
+5pectu
+5ped
+pe5de4
+pede5r
+pedes3
+p4ee
+pee4l
+2peen
+3pees
+peet3
+peet4j
+3peë
+3peg
+pe3gl
+3peh
+p4eil
+pek3ee
+pek3la
+pe2k3n
+3pekti
+pe4lak
+pe4l3ee
+pel4i
+pe3lo
+2p3emm
+3pen
+5pen.
+pe4nam
+pe5nan
+pen5k
+5pens
+pen5sm
+pent4
+pe4nu
+3pep
+4pepi
+pep3s
+3pe1ra
+5peri
+per5ijz
+peri3s
+pe3ron
+5pers
+per4sp
+pers5pa
+per5sti
+4perwt
+5pes
+pe5sa
+pe5se
+pe3sta
+pe3sto
+3pet.
+5peter
+pe3um
+3pex
+3pez
+1pé
+3pê
+2p1f2
+2p1g
+pgaat5
+pgei4
+2p1h
+3p4his
+pie4tj
+pi2ga
+pi3gl
+5pij.
+pij4li
+3pijn
+3pijp
+pij4p3a
+pij4p3l
+4pijs
+pij4tj
+2pijz
+pik3l
+pi4ko
+pi4nas
+4p3inj
+pin4k3r
+pin4t
+pi3sko
+pis5m
+pis5ta
+pit3j
+pit4sp
+p1ja
+p3ji
+p1jo
+2p1k
+pkaart5j
+p2l2
+4p3la.
+plaat5j
+pla3di
+pla4kl
+4plam
+p5land
+4p3lang
+3plant
+p5lap
+3p4las
+pla4tr
+plee5tj
+2p5lep
+p3les
+p4lex
+2p3lig
+2plij
+p5lood
+p5lop
+2p1m
+2p1n
+p3no
+p4oe
+3poei
+3poe2s
+poe4s5t
+poe3tj
+3poez
+3poë
+2pof
+po2k3i
+po4ko
+pol5ka
+3pom
+pome3
+4p3oml
+3ponds
+3pone
+pon4sm
+4poog
+p4ool
+poo3li
+4poor.
+poor5s
+poot5
+3pop
+po3pe
+po3pl
+4pori
+2pork
+po3ro
+5portef
+por4t5ra
+3p4os
+po3sf
+po3sk
+pos4taa
+po4ta
+po4tes
+3poth
+3poti
+pot5j
+4pov
+2p5p
+ppe5li
+ppe4n
+ppen5e
+pr4
+p4ra
+3pra.
+praat5
+p5rad
+3prakt
+4pram
+3prao
+p5rap
+3prent
+prent5a
+pren4t5j
+3p4ret
+preu5s
+p3riek
+3pries
+4priet
+pri5m
+5prins
+3p4rio
+5prob
+3proef
+3proev
+5p4rof
+p4rog
+5prop
+pro5pa
+pros5t
+3prov
+pruit5j
+pru2t
+prut3o
+2ps
+p2sa
+ps3af
+ps3as
+ps3at
+ps3au
+p3sc
+p5schi
+p4sco
+ps3le
+ps5ma
+ps5mi
+p2s3na
+p1so
+ps3of
+ps3on
+p3sop
+p1sp
+ps4pe
+p1s4t
+p3sta
+p5stat
+p3ste
+p5ster.
+ps5term
+p5sters
+ps5tor
+3psy
+4pt
+p1ta
+p5ti
+p4t3j
+p1to
+p1tr
+p1tu
+pu5b
+pu3c
+puil3o
+pul4st
+3pun
+4pun.
+5punt
+punt3j
+put3j
+put3r
+4pv
+2p1w
+1py
+py5l
+5pyleen
+4pz
+pzet5
+1q
+qu4
+qui3d
+4r.
+r4a.
+r2aa
+2raan
+3raar
+5raar.
+4r3aard
+5raars
+raar5tj
+raat5jes
+2rac
+5rac.
+r4aci
+4ra5da
+3radb
+rade4r5a
+ra3di
+4r3adr
+3rads
+ra3fa
+2r3afd
+ra4f3on
+ra3fra
+ra3gn
+ra3io
+raï4
+ra3k4l
+ra4kr
+ra5kru
+4r3ala
+ra4l3ee
+4r3alf
+2r3alm
+r3alt
+r5ameu
+4ramn
+4rana
+r2anc
+rand5sl
+ran4g3o
+ran4g5r
+rank3w
+rans3p
+3r4anti
+r3antw
+ra5o.
+ra4pl
+rap3r
+2r3arb
+r2are
+2r1arm
+r3arr
+4r3art
+ra4sk
+ras5m
+ra3sth
+ra5stheni
+ra5str
+rat5sp
+r1c
+r4che.
+r4ches
+r4chet
+r5co
+r1d
+r4d3act
+rd3ama
+rdan5ste
+rd3ar
+r4das.
+rd5elas
+r4denv
+rd5enve
+rde5ra
+rder4s
+rde5sp
+r3do
+r4dol
+rd3oli
+rd5olie
+r4dont
+rd3oos
+rd2ro
+rd3rod
+rd3rol
+r3droo
+rd5sla
+rds3le
+rd3so
+rd3su
+rd1we
+rd5wo
+re2am
+3reda
+3redd
+rede4s3
+4rediti
+3redu
+r4eed
+ree4k
+4r1een
+ree3n4e
+4reers
+ree3tj
+re3fa
+5re1fl
+4reg.
+4regd
+rege4s
+4regg
+5regi
+3re1gl
+4rego
+4regt
+reid5sta
+4reie
+4reil
+4reind
+reis4t
+5reiz
+re4ka
+re2k3l
+re4kn
+re4k3ur
+re4k3uu
+2rek4w
+4rekwi
+reld3o
+rel4dr
+rel5ei.
+re5lui
+re4lur
+remie5tj
+2remm
+5r4en.
+re4naa
+re4n3ar
+3renb
+r5endert
+ren5dr
+re5nek
+r5e5nend
+5renenk
+ren3ep
+renep5e
+ren5erv
+2r1eni
+ren3ko
+re3n4o
+re4n5of
+re4n5oo
+3renti
+r3entw
+re5pa
+4req
+4r1erf
+re3r2o
+2r3ert
+4r3erv
+2rerw
+re3sa
+resi3
+re3s4ko
+re2sl
+5re4s3p
+re5spoo
+re2st
+res5tor
+res3tr
+re5tak
+re5t4i
+re4t3og
+re4tri
+reuk5s
+5revo
+4rey
+3ré
+r4f3aa
+r2f3ag
+rf3al
+r3fe
+r4f3eng
+r3fi
+r4f3lag
+rf3lat
+r1fle
+r4fli
+r3flu
+rf3op
+rf4ov
+r1fr
+r2f3re
+rf2s
+rf3sm
+r4f3ur
+r4f3uu
+r1g
+rg4al
+r3ge
+rge2a
+r4g3een
+r4g3ei
+rg4eis
+rge4l5aa
+r4g5erep
+r5gew
+rg3ij
+r4g3lu
+rg4ov
+r5grij
+rg4ro
+rg1s4
+rg2s5m
+r3h
+ridde4
+r4ie
+rie5kl
+rie5pl
+ri1eu
+ri3fl
+ri3fr
+4rijl
+rijs5l
+rij5ster
+rij4tr
+rik4o
+rik5r
+ril3m
+ri4maa
+rim2s5
+r4ing
+4r3inh
+rin4kl
+r3inko
+4rinkt
+ri3no
+4rinr
+4rins
+4rint
+ri3sc
+ri5sco
+ris5m
+ri5so
+ris5ten
+rist4j
+ri4s5to
+ri3tr
+r1j
+rkaart5j
+rk3ang
+rk3art
+r3ke
+r4k3ei
+rke4n
+rken4s
+r4k3eze
+rk3iep
+r4k3ink
+rk3lat
+rk5leer
+rk3let
+rk3olm
+rkoot5
+rk3oss
+rk3rat
+r5kri
+rk5roos
+r5kru
+rk1s
+rks4f
+rk4s3l
+rks4p
+rk2t3r
+r1kw
+rk3waa
+r4kwat
+rk3wet
+rk3win
+r3l
+rlos3
+r5lu
+r1m
+r3ma
+rma3f
+r4m3ap
+r2m3eb
+r2m3eg
+rmer3a
+r5mi
+r5moe
+rm3ont
+rm3op
+rm3s4a
+rm4sl
+2r1n
+r3na
+rn4aa
+rn5aan
+r5n4am
+r4n3ap
+rnee5t
+r4n3ene
+rne4t
+rne5ta
+rnet3j
+rn5oof
+rn3ops
+rns4
+rn5sp
+rn5tj
+r3nu
+ro5be
+r4och
+ro3d4o
+r4oe
+4roeg
+roe4g3r
+roe4p3l
+roe4rei
+roes5te
+roet3j
+3roë
+roge4s
+3rogy
+1roï
+r4ok
+3rol.
+ro2l3a
+rol3g4
+4roli
+r4ome
+r4on.
+ro2na
+ron3ad
+ron4d3o
+ron4d3u
+r2one
+ron4ka
+r2onn
+r4o1no
+r2ons
+4ront
+ron4ta
+ront3j
+ron4t3r
+ro3nu
+3roof
+2r1oor
+4rop.
+ro4paa
+ro3pe
+rop4la
+ro5po
+rop5ra
+rop3s
+r2opt
+ro3ro
+ro3sf
+ro3sn
+ro4sp
+ro3ta
+ro5te
+ro3t2h
+rot5j
+r1oud
+3rout
+4roxy
+r1p
+r3pa
+rp3ank
+r3pe
+r3pi
+r4p3j
+rp4lo
+rpoort5j
+rp3rec
+r3psa
+rp2st
+2r5r
+rre4lei
+rre4l3u
+rre3s4p
+rri3er
+rrie4t
+rron5k
+rroot5
+2rs
+r1saa
+rs3ad
+rs4ag
+r3saks
+r3sal
+rs3alm
+rs5am
+rs3ap
+rs3ar
+rs3ass
+rs3av
+rsboot5
+r3sc
+r4sco
+r4sec
+r4s3ek
+rs1ex
+r4s3ez
+r1sja
+r3skat
+r3s4kie
+rs5ku
+r5slag
+rs3lat
+rs3leg
+r5slep
+r5sleu
+r3s4lie
+rs5loep
+r5slui
+r5smaak
+rs5maal
+r3sme
+r3smi
+r4smid
+rs3nac
+r5sni
+rs4no
+rs5noo
+rs5not
+r1so
+r2s3op
+r1sp
+rs3pad
+r5span
+r5spel
+rs3pet
+r5spit
+r4s4pl
+r5spli
+r5spog
+rs3pol
+r1s4t
+rstaat4
+rst5akk
+rs5tas
+r4stav
+r3ste
+r5stend
+rs5term
+r3sti
+r4stit
+r3sto
+r4store
+r5stran
+r3stre
+rs5trei
+rst5roz
+r3stu
+rs2ui
+r1ta
+rt3ac
+rt1ad
+rt3af.
+r4tank
+rt3ape
+r2t3ar
+r2tav
+r2t3ec
+rte5la
+rte4na
+rt5eve
+rt5ha
+rt3he
+rt3hi
+r5t4i
+r3tj
+rt3ja
+rt3jo
+r1to
+r5tof
+rtoi2
+r5tol
+r4tom
+rt3om.
+rt5onr
+rt3ord
+r5tori
+r1tr
+rt4rek
+r2t3ri
+rt4rit
+rt3ru
+rt4sek
+rt4s3l
+rt3sle
+rts5m
+rt4s5n
+rt4spr
+rts5tan
+r1tu
+r4t3ui4t
+rt3we
+ru3a
+ru5ba
+rude3r
+ru1e
+ru2g
+2rui
+ru2k
+ruk3i
+ru2l
+rul3a
+ru4li
+r2um
+ru4m3i
+r2un
+runet5j
+r4us
+rut3j
+4ruu
+ru4wi
+ru5wig
+rvaat5
+rvee3t
+rvi4c
+rvil4
+rvloot5
+r1w
+r5wa
+r5we
+rwe3st
+r3x
+4rz
+rzet3j
+4s.
+5s4a.
+2s1aan5
+s3aap
+3saat
+3sab
+4s1ac
+5sacr
+3sae
+4saf
+sa3g4
+3sah
+3sai
+3saj
+3saka
+3sake
+s1akt
+s2ala
+1sali
+4salm
+5s4alo
+4salp
+4samb
+samen5t
+5samm
+s3ank
+1sant
+san4t3j
+5sap.
+s3ape
+s3apo
+sa3pr
+4s3arb
+s4ari
+4s1art
+sart5se
+sa3sc
+s4ase
+sa3s4p
+1sat
+s3atl
+2s3att
+1sau
+4s3aut
+4sav
+4s5b
+sboot5je.
+1s2c
+4sca
+2sce
+3sch
+4sch.
+4schao
+5schap
+5sche.
+4schef
+5schen
+5schep
+5scher
+5scho
+5schr
+5schu
+4sci
+sci4n
+4scl
+2sco
+s4cola
+5scoo
+3s4cop
+5scope
+5scopi
+scorres5
+3scout
+2scu
+4s1d
+s3da
+s5de
+sdis5
+s5dr
+s3dw
+3se
+5s4e.
+se4al
+se4ar
+s5ech
+5sedo
+s3eed
+4seen
+see4t
+see5ts
+4seev
+4s3ei.
+seig4
+s4ein
+5sein.
+5seine
+5seiz
+se4l3ag
+sel5eig
+s3elek
+sel5k
+se3lo
+se2ma
+sem5ac
+4s5emm
+5sen.
+se4n3em
+se4net
+5senh
+se2n5o
+sens4
+sen5sl
+sep3en
+se1r4a
+se4r5au
+se5r2e
+4serg
+se3ro
+ser4s3p
+s4es
+se5sa
+se3s4t
+ses5ten
+s4et.
+s4eta
+4sete
+set3h
+5se2tj
+set5w
+se3um
+4sex
+3sé
+3sè
+s1f
+s3fa
+4sfi
+s3fl
+s3fo
+4s5g
+sgaat5
+2s1h
+s4ha.
+sheids5
+s4h3es
+3s4hi
+s5hie
+s2hot
+s3hote
+3si
+5si.
+5s4i4e
+sie5kl
+sies4
+si4è
+si3f
+5sig
+si3g4a
+si5ge
+si5go
+s3ijv
+4s1ijz
+4s3inc
+4s3ind
+sin3g4l
+s3inko
+4s3inm
+si3no
+4sinr
+4s1ins
+4s3inz
+s4io
+sis3an
+si4se
+si4s3i
+sis5te.
+sis5tr
+si3tr
+sj2
+3s4ja.
+2sjas
+s1je
+s5je.
+s3jeb
+3sjee
+1sje4r
+sjer3i
+s5jes
+3s4jez
+sj3k
+3sjok
+4s5jon
+1sjou
+2s1k4
+4sk.
+s3ka
+skaart5j
+skie3s
+skiet4
+s3koc
+4skou
+s4kul
+1s2l4
+s4la.
+s3lad
+3s4lag
+s5lamp.
+s5lampe
+4s5land
+s3las
+2slat
+s4lav
+5slee.
+5sleeë
+s3leef
+5sleep
+4s5leer
+2sleg
+s5lei
+s3leng
+5slent
+4s3ler
+s3les
+3slet
+sle4t3j
+3s4leu
+s5leug
+5sleur
+4s5lev
+s3lez
+5slib
+2s3lic
+4slid
+4s5lied
+s5lif
+s5lig
+5slijp
+s5lijs
+5s4lik
+5sling
+s5lini
+2sliv
+slob3
+2s3loc
+3s4loe
+s3log
+s5loon
+sloor5
+s3loos
+5sloot5
+s3los
+4s3lou
+2sloz
+2s5luc
+3slui
+4s5lui.
+4sluid
+sluis4t
+5sluit
+2s3lus
+s4m
+4smaat
+2s5man
+smans3
+s5mas
+4s5mat
+3smed
+4smei
+4smelo
+s5men
+4s5mes
+smeu5ste
+5smid.
+s5min
+4smis
+5smit
+1smok
+s5mon
+1s2n4
+2snam
+3s4nav
+5s4ned
+s4nee
+snee5t
+sne2k
+3s4nel
+2snes
+2sneu
+s3neuz
+s4ni
+s5nie
+s5nim
+s3nit
+4sniv
+4snod
+s3nog
+2snoo
+3snuf
+s3nut
+3s4oc
+5sod
+1soe
+3soep
+s3off
+s3og
+so3gl
+3soi
+so2k3
+3sol
+so3lo
+3s2om
+s4om.
+s3oml
+5somm
+4s3oms
+s3omz
+s4on.
+3sona
+4s3ond
+2s3ong
+so3no
+s4ons
+4s1on2t3
+4s3onv
+s3onz
+4s5oog
+s3ook
+s3oor.
+s3oord
+5soort
+3s4op.
+2s3opg
+s3opn
+3sopp
+so3pr
+2s3opv
+4s3ord
+2s1org
+so3ro
+sor4s
+3s2ort
+so3s4
+so5st
+3s4ot
+so3tr
+4sott
+sou3t
+2s1ov
+s2p
+4sp.
+4spaal
+5spaan
+5spaat
+4spad
+4spak
+2spap
+5spar.
+5sparr
+4s3pas
+4spau
+5spectie.
+5specties
+5spectiv
+5specto
+speet5
+2speg
+s5pei
+spe2k
+2spen
+s4pene
+4spers
+spers5p
+spes4
+spe3st
+2spet
+4spex
+4spez
+s4ph
+spie5tj
+4spijn
+4spijp
+5spil
+5spio
+2s3p4l
+s5pla
+spli4
+4s5plu
+2spol
+4spom
+s4pore
+sport5r
+2spos
+4spoth
+s5pred
+3sprie
+sp5riem
+5spriet
+4s3prij
+5spron
+4s3ps
+4spt
+4spun
+5spur
+2s3r
+4s3s4
+s5sa
+s5sc
+s5se
+ssei3s
+s5si
+ssis4
+ssi3st
+s5sm
+s5snu
+s5so
+ss5pas
+s5su
+s2t
+4st.
+5staan.
+4staanw
+staart5j
+4s4t3a2c
+3stad
+2staf
+3staf.
+4stakk
+st3akt
+s4tap
+4stas
+s4tav
+5stave
+2stb
+2std
+4s5tech
+3s4ted
+3steek
+3steem
+3steen
+4steka
+s3teks
+st5elem
+3s4tem
+4stema
+4stemo
+st4en
+s4tene
+s4teni
+4s5tenta
+s4tep
+ster5ijz
+ster5og
+4steva
+s4t3ex
+s4t3ez
+2stf
+2stg
+2st1h
+st2he
+st3hed
+st5heer
+s5them
+5sthenic
+5sthenis
+s3ther
+s4tho
+s4thy
+2stia
+4sticu
+4stie.
+4stief
+5stiefe
+4sties
+4stiev
+5stigm
+4stijd
+5s4tijl
+4st3ijs
+3stils
+s5tis
+4stiv
+4s4t1j
+2stk
+2stl
+2stm
+2stn
+4stoc
+4stoef
+4stoej
+5stoel
+5stoep
+4stoer
+4stoes
+5stoet
+4stoez
+3stof
+st3oge
+3s4tok
+4stone
+4stong
+st3oog
+3stoot
+stoot5j
+4st3ord
+3stot
+s4tov
+2stp
+1str
+st4ra
+straat5j
+5straf
+4strap
+st3rec
+s4tred
+4streg
+4strei
+s5trein
+s4trek
+5stren
+st3rif
+st4rol
+st4rom
+st4roo
+4stroos
+st5roos.
+4strou
+4stroz
+2st1s4
+st5sc
+st5se
+2stt
+1stu
+4stub
+5stuk
+s4tun
+st3uni
+2stv
+2s4t5w
+3s4ty5
+1styl
+2stz
+1su
+3su3a
+sub1
+3suc
+3sue
+5suik
+5suis
+s1uit
+5suk
+3sul
+2s1un
+5surp
+5surv
+s4us
+4s5v
+svaat5
+svoge4
+4s1w
+s4y
+3sy.
+sy4n3e
+sys5
+4s5z
+4t.
+t3aang
+t3aanw
+t3aanz
+4t3aap
+taar5st
+4t3aas
+3tabl
+2tac
+3tace
+t4aci
+t4act
+4tad
+t3ader
+tad4s3
+2taf.
+2tafd
+5tafe
+4t3afs
+ta2g3r
+tai4l
+ta3kl
+ta4kle
+5talent
+talm5a
+4talt
+ta4mak
+4tamb
+t3amba
+3tame
+tament5j
+4tamp
+tan4dol
+tan4d3r
+tan4dw
+tan4gr
+5t4ans
+3tant
+5tapi
+ta3pl
+t4are
+t4ari
+t1arm
+ta2r3o
+3tarw
+3tas
+5tasj
+5tass
+ta5str
+4tata
+2t3atl
+3tatr
+3tau
+4taut
+4t1avo
+2t3az
+4tb
+4t1c
+4t5d
+1te
+te3a.
+te2ad
+te3ak
+tee2
+4teek
+tee4k3l
+teem5a
+4teen
+tee3ro
+tee3t
+tee5tjes
+2t3eff
+te3fl
+t4e3g4
+tege4n5
+3teh
+4t3eier
+4teig
+t3eind
+teit2
+4tek.
+5teka
+5tekeni
+5tekens
+teks2
+4t3ekse
+t4el
+te4lap
+5telef
+5teleg
+5telev
+tel5k
+te3lo
+te4l3og
+4telse
+te4l3uu
+5tema
+te4mor
+5temper
+5tempo
+4temu
+3t2en
+5tenbo
+5tene.
+te4nek
+te4net
+tenier5tj
+5tenij
+ten5k
+te4nol
+ten4su
+t4enta
+t5entac
+ten4tj
+3teo
+t2er
+teraads5
+te4r5aak
+ter3ab
+ter3ag
+te3ral
+te3ran
+te5rat
+ter4du
+te3re
+te4rei
+te4rem
+te4r5env
+ter5ge
+teri4ci
+5terig
+te4r5in.
+3term
+5term.
+ter5oc
+te3rog
+ter5om
+5te3ron
+te4ros
+4terren
+ter5sc
+3t4es
+5tesa
+te3sap
+tes4l
+5tesm
+test5ri
+te3th
+4t3euv
+t4ev
+5tevaa
+t5evan
+2tex
+texi5
+t4ext
+1té
+t1f
+4t3g2
+tgaat5
+tge3la
+2t1ha
+4t3ham
+3thea
+t3heb
+5thee.
+5theen
+4t5hei
+t3hel
+t4hen
+5thene
+5theo
+1ther
+t3here
+5therm
+3thes
+3thet
+this5m
+t3hoe
+t3hok
+t1hoo
+thoof5di
+t1hou
+t3houd
+3thr
+2thu
+t4hur
+3thy
+3ti
+5ti.
+5tia
+5tica
+5ticu
+5tie.
+5tief.
+5tiefs
+5tiek.
+tie5kla
+tie4kon
+5tien
+5ties
+tie5sl
+ti1eu
+5tiev
+ti4è
+ti3fe
+ti3fr
+ti2ga
+4tigm
+ti2gu
+tig3ur
+5tijd
+5tijn
+4t1ijz
+ti5kle
+ti5kr
+ti3kw
+t4il
+ti4laa
+4tils
+ti4m3in
+5timm
+tin5ade
+4t3ind
+4tinf
+tin4g3i
+ting5r
+tini5è
+4t3inl
+t3inq
+4tins
+5tint
+4tinv
+4tinw
+tis4l
+tis5la
+ti3sli
+tis5m
+ti3s4p
+5tite
+ti3th
+ti1tr
+t3ivo
+1tj2
+4tja
+t3jen
+tjes5c
+t3jesd
+tje5spr
+4tjeu
+4tjo
+5tjoe
+5tjok
+2tju
+4t3k2
+4t3l
+t4lem
+4t3m
+tmo4s5
+4t3n
+5t4o.
+3toc
+3tod4
+to3do
+t4oe
+toe5d
+5toej
+toe3k
+4toel
+toe5la
+toel4tj
+toemaat5
+5toen
+5toeri
+5toe1s
+toe3tj
+toe5tr
+5toez
+to2f
+4tof.
+to4f5l
+tof3th
+to3g4n
+3toj
+to4ka
+t4ol
+2t3oli
+5tolo
+to2lu
+3toma
+tomaat5
+tom4p3j
+2t3oms
+t4on
+5ton.
+5tone
+5tong
+5tonn
+to3no
+4tonr
+to3nu
+toom3e
+5toon
+toor5tj
+4topd
+to3pe
+to3phe
+to3p4le
+2topn
+to4por
+4t3o4pr
+t3opsl
+t3opto
+5tor.
+5torens
+4t3org
+tor4ma
+to3ro
+5torr
+3tors
+5to3s4
+to5sa
+to4st
+tos5te
+to3tr
+2t3oud
+tou4re
+tove5na
+4toverg
+tozo5a
+4t5p4
+tpe4t3
+3tra.
+4traf
+5trag
+3trakt
+4trand
+5trap.
+5trapp
+t3rasp
+3tre.
+4trec
+4treda
+t5redes
+t4ref
+2t1reg
+3trein
+4t3reis
+4treiz
+trest5r
+tre2t3
+3t4reu
+t3rib.
+tri3g2
+5tril
+3t4rio
+3t4ris4
+4tro.
+4t3roed
+t3roes
+5trog.
+5trogg
+t4roï
+4trol.
+t2rom
+3tromm
+3tron.
+5trone
+3tronn
+3trons
+t5rood
+5troon
+t4roos
+5troost
+tro5sp
+5t4rou
+4tru
+5truc.
+5truf
+5truie
+trui3t
+t4rum
+4ts
+ts3ad
+ts3af
+ts3ak
+ts3al
+t3sap
+ts3as
+t4scr
+ts4cu
+ts3een
+t4s3ei
+ts5eind
+ts3eko
+t5sel
+ts4en
+t4s3eng
+ts3erg
+ts4hel
+tsi4ga
+t4sij
+t4sink
+t4s3int
+ts2j
+ts3ja
+5tsji
+t5slag.
+ts3lam
+t2sle
+ts3led
+t5s4lep
+ts5ma
+t2s5mu
+ts3neu
+ts5nik
+t3s4no
+t4s3om
+ts3on
+ts1or
+t1sp
+ts3pad
+ts4par
+t5spel
+ts3pet
+ts1pl
+ts4pli
+ts3pol
+t5s4por
+ts4t
+t1sta
+t4staal
+t5stap
+t1ste
+t5stee
+ts5teks
+t5sten
+t4s5term
+ts5th
+t3sti
+t5stil
+t1sto
+ts5toc
+t4s3tol
+t4s5tore
+t4sty
+t4su
+ts3ur
+ts3uu
+t3sy
+4t3t
+t5ta
+t5te
+ttent5j
+tte5ras
+tting5ste
+t5tr
+tt3uu
+tu1a
+5tu5b
+tu5d
+3tue
+5tuig
+5tuin
+4tuip
+t3uitg
+tui3tj
+3t4us
+tu3wa
+4tv
+tvaat5
+4t1wa
+4twe
+5t4wijf
+4t3wil
+t4win
+t5wind
+t1wo
+t1wr
+1ty3
+5typ
+4tz
+4ua
+u3a.
+u3ac
+uae2
+u1al
+u1an
+uar5t
+u1ati
+u4b
+ubal5
+u5be
+ubes5
+u5bi
+4uc
+u3che
+u3cho
+uch5ten
+uch4to
+uc4t3a
+ud3ei
+u5den
+uden4tj
+ud3ess
+u4d3ez
+u4do
+ud3oo
+ud3ov
+u2d3r
+ud5ro
+ud5sla
+ud4sm
+ud5sme
+ud5smi
+ud1w
+4ue
+u1ee
+u1el
+u3er
+ue4s
+uet3j
+uet5sp
+u1eu
+u3ez
+u3ée
+u3è
+u3fa
+u3fl
+u3fr
+uf2s
+u3ga
+u4g3ad
+uge4leg
+ug3ij
+ug3l
+ugmar5c
+u2g1r
+ug1s4
+ug3sl
+u3h
+u4i
+4ui.
+2uid
+ui2d3a
+ui4d5eu
+ui2do
+uid5oo
+ui2dr
+uids5e.
+uids4p
+uid5spr
+uids3t
+ui4du
+ui3e
+uie3s
+ui2fa
+uif1l
+uif5r
+ui2fu
+4uig
+ui4go
+4uik
+uik3l
+uik5r
+2uil
+uil3aa
+ui4l3og
+ui4loo
+2uim
+ui4m3a
+uime3s
+ui4n1a
+uin5g
+ui2no
+uins5lo
+ui2p3l
+4uis
+ui4sa
+ui4sh
+ui4sl
+ui5slu
+uis5m
+ui4so
+ui4st
+ui5stene
+ui2t1a
+uit1h
+uit3j
+uit4je
+3uit1r
+4uï
+u3j
+uk3al
+uk3as
+u3ke
+uke3no
+u2k3l
+u2k3n
+u2k3o
+uko5p
+u4k1r
+uk3sm
+uk3sn
+uks3p
+uk4s3te
+uk1w
+u1la
+ul3ac
+u3l4an
+ul5and
+uld5erk
+u3le
+ul3fl
+ul5fo
+ul3fu
+ul3ij
+ul3k2a
+ul2lo
+u1lo
+u2loe
+ul3op
+ul2p3l
+ul2po
+ul4p3r
+ul3sa
+uls5tel
+u3lu
+ul3ui
+um3ac
+3umc
+umel4
+um5po
+3umz
+u1na
+un3ac
+un3ak
+un2c
+un3che
+unch3r
+une4tj
+un3g4
+u5ni
+unst3r
+4unt
+un4tag
+unt5een
+un2tj
+unt5o
+u3nu
+uo3i
+u3on
+u3oo
+uo3r
+u3os
+u3oz
+u3pa
+u2pek
+u3p2h
+u1pi
+up3j
+u1pl
+u1po
+u3pr
+u1pu
+2ur
+u1ra
+u4r3ar
+urari4
+ura3st
+ur3au
+ur2c
+urd4o
+u1re
+u2r3ec
+uree3s
+ure5lu
+ur3env
+ure4t3
+ur2f
+ur3fl
+urf3s
+u1ri
+ur3ijz
+u4r3ind
+urken5
+urmar4
+ur2no
+ur5open
+ur5pr
+urs5ag
+ur3s4f
+ur2s3l
+ur2s5n
+ur4sti
+urs5tik
+ur3ta
+4urv
+u3ry5
+us3ar
+u4sc
+us3ch
+u5scr
+use3tj
+u4s5l
+us5m
+u2s5n
+us3on
+us3op
+us3os
+us3p
+u2st
+us4ta
+us5tag
+ust3al
+u4s3te
+us4t3ei
+ust5on
+ust3oo
+us3tor
+us5tru
+ust3u
+u1ta
+ut3aan
+utaar5
+ut3ac
+u3tan
+u4t3ees
+u2t3ek
+u2t3em
+ut5ex
+u2tj
+u1to
+ut3oog
+uto5s
+ut3ri
+ut3saa
+ut3sc
+uts5eng
+ut3sku
+ut3so
+ut2s3p
+ut5su
+u1tu
+ut5w
+uu2
+uur3a
+uur5k
+uur1o
+uw1a
+u3wag
+uw3au
+u1we
+uw3een
+u2w3ei
+uw3eko
+u5wen
+uwen5k
+uwe3s4
+u1wi
+uw3ij
+u3win
+uw3n
+uw1o
+u3woe
+uw1r
+u3xi
+u3ya
+uzes4
+uze5t
+3v4
+4v.
+5va
+vaar5tj
+vag4
+va2ko
+va4kon
+va2l3a
+va3laa
+val5m
+val4s3p
+vals5tek
+va2n
+van4ch
+van4g5r
+va3no
+va5p
+vast3r
+va2t3h
+vee4l
+veel5e
+vee3p4
+vee5sta
+vei3s4
+vel4d3o
+vel4du
+vel4s3n
+ve4na
+ve5nare
+ven5dr
+ven5k
+ve2n3o
+ven4se
+ven4sl
+vens5lo
+ven4s3u
+vent4s
+ve2r
+ver1a
+ver5aas
+ve4rad
+ver5do
+ver3ed
+ve3rei
+ver3er
+ver3et
+ver5ijl
+ve5ring
+verk4
+ver1o
+ve3rom
+vers4a
+ver3sp
+ver5sto
+ver3u
+ve2s3
+ve3sa
+ve3s4c
+ve3su
+ve2t3j
+ve2t3o
+ve3tor
+ve4t3r
+ve5t4ro
+vet5sta
+vie4r3a
+vies3n
+vil4t3j
+vi4sa
+vis3an
+vis5m
+vis5ot
+vi3t2r
+4v5j
+4v5lar
+vlei3s4
+vlie4s3
+voe4t3r
+voet5sp
+vo2le
+vol4g3a
+vo2li
+vol3ij
+volk4s3
+voorn4
+voor5na
+vo3ra
+vot5j
+vr2
+vrij3k
+vrijs4
+vuet4
+vui2
+vy5
+2w.
+waar5e
+wa4b3
+w2ad
+w2ag
+wa5ge
+wagen5t
+wal3a
+4wam
+wam5pl
+4wana
+waneëi5
+wan4gl
+wang5sl
+wa2no
+wan3s
+wan5sp
+3wap
+3warm
+wart3j
+war4to
+wa4si
+was5m
+3wat
+2wb
+2wd
+w4doo
+wd3oom
+we2at
+we4ba
+3wed
+wede4
+we2d3i
+we4d3r
+wee5kla
+week3r
+wee4r
+weer3o
+wees4t
+wee5ste
+wee5str
+wee3tj
+we2g3a
+weg1l
+we2go
+we2g3r
+3weid
+wei5s
+we2k3a
+4weko
+we4k3r
+wel3ed
+wel3ee
+wel3sm
+we4mi
+we2n
+we3naa
+wen3ad
+we3ne
+we4nem
+wen4ka
+wen3o
+wer2g
+wer4g3r
+wer4k3l
+werk3u
+wer4s
+2w3erw
+we2s3
+3wet.
+we4t3h
+we2t3j
+wezens5
+wezen5t4
+2w3f
+w1g
+4w1h
+w4hi
+wie4t
+w3igd
+w3igi
+w3igt
+3wijd
+wij4ka
+wij4s
+wijs5m
+wi2k
+wik5l
+3will
+3wim
+w4in
+win4d3r
+wing5st
+2w5inr
+winst5a
+wis5m
+wi4t3h
+wit3j
+w1j
+2w1k
+2w1l
+w1m
+2wn
+wn4i
+w3no
+w2oe
+woei2
+woe3ie
+woel3a
+woe4s
+woest5a
+woes5te
+wo2l
+wol3a
+wolf2
+wolfs5
+woor4d5r
+wor4ge
+worg5eng
+4wot
+w1p
+wper2
+wpers3
+w3ru
+2ws
+ws3a
+ws4k
+ws5ke
+w3s4p
+w4spe
+w5spel
+ws4t
+w1sta
+w3ste
+w3sto
+2wt
+wte5ri
+w3to
+w3tr
+w1w
+2x
+x3ad
+xamen5t
+xan3
+xan5t
+x1c
+xe3a
+xe3ro
+x3f
+x1h
+4xiet.
+x3ing
+xi4s4
+xis5m
+xi3st
+xi5sta
+x3l
+xo3s
+x1p
+x1t
+x2t3ak
+xtie4
+x3w
+xy5
+y1
+y2a.
+y4ah
+y3au
+yber4
+ybert3
+yce3
+yd4r
+ydro3
+y4in
+yis5m
+y4l
+ylar3
+y5lee
+yl3et
+y5li
+y5lo
+y5lu
+y2m
+y3me
+ym2fl
+y3mo
+ym5pa
+y3mu
+y2n
+y3na
+y4n3an
+yn3er
+y3ni
+y3no
+yn3t
+ynx5
+y5oo
+y4pew
+y3ph
+y5r4e
+y5ri
+y5ro
+y4s2
+y5sa
+y5se
+y5sf
+y5sh
+y5si
+ys5m
+y5so
+ys3t
+ys4to
+y5sy
+yto3
+1z
+2z.
+zaar5t
+za2k3a
+zan4d3a
+zan4dr
+zar5t
+za5s4
+2zb
+3ze
+zee5le
+zee3n
+zee3s4
+zee3tj
+zeg4sl
+zel5dr
+ze3mo
+zen4d3a
+zene4
+zen5k
+ze4nol
+zen4t3j
+ze4r3a
+ze3ro
+zer4sl
+zer4sp
+ze4s3e
+ze2s5m
+zes5tal
+ze3ste
+ze4tan
+ze4ti
+ze4tj
+ze2t3r
+ze3tre
+zeun3
+zeve2
+zeven3
+3z2i
+ziek3l
+ziel4s
+zi2ga
+zij5s4
+zin4k3l
+zin4sl
+zin4sm
+zis5m
+zit3j
+zi2t3u
+4zk
+2zm
+zo4a.
+zoet3j
+zo3f2
+zoï4s
+zome4
+zo4nek
+zon3sf
+zo3s
+zo2t
+zot3h
+4z3r
+2zs
+zus3
+2zv
+z4w
+zwe2m
+zwenk5a
+4zz
+}
+% Exception list for GB90
+\hyphenation{
+aan-pers-te
+acht-en-der
+acht-en-ders
+acht-en-der-tig
+acht-en-der-tig-ste
+ant-arc-tis
+be-scherm-en-gel
+be-scherm-en-ge-len
+don-der-aal
+drie-ster
+gast-rol-len
+ge-laats-trek-ken
+han-dels-taal
+ket-ting-ste-ken
+lands-taal
+lui-ste
+mi-nis-ters-por-te-feuil-le
+mi-nis-ters-por-te-feuil-les
+moet-je
+pa-ling-ste-ken
+schel-linkje
+spie-gel-ei
+ti-chel-aar-de
+vier-en-der-tig
+vier-en-der-tig-ste
+}
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex new file mode 100644 index 000000000..c7e8dcc29 --- /dev/null +++ b/tex/context/base/lang-sla.tex @@ -0,0 +1,87 @@ +%D \module
+%D [ file=lang-sla,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Slavic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Belarussian, Russian, Ukrainian, Bulgarian, Macedonian,
+% Serbo-Croatian, Slovenian, Czech, Kushubian,
+% Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian,
+% Illyrian, Armenian
+
+\writestatus{loading}{Slavic Languages}
+
+\unprotect
+
+\installlanguage
+ [\s!pl]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!start]
+
+\setupheadtext [\s!pl] [\v!inhoud=Spis rzeczy]
+\setupheadtext [\s!pl] [\v!tabellen=Tabele]
+\setupheadtext [\s!pl] [\v!figuren=Ilustracje]
+\setupheadtext [\s!pl] [\v!grafieken=Grafika]
+\setupheadtext [\s!pl] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!pl] [\v!index=Indeks]
+\setupheadtext [\s!pl] [\v!afkortingen=Skr\'ocenie]
+\setupheadtext [\s!pl] [\v!logos=Snaki]
+\setupheadtext [\s!pl] [\v!eenheden=Jednostki]
+
+\setuplabeltext [\s!pl] [\v!tabel=Tabela ]
+\setuplabeltext [\s!pl] [\v!figuur=Ilustracja ]
+\setuplabeltext [\s!pl] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!pl] [\v!grafiek=Grafika ]
+\setuplabeltext [\s!pl] [\v!hoofdstuk=]
+\setuplabeltext [\s!pl] [\v!paragraaf=]
+\setuplabeltext [\s!pl] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!pl] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!pl] [\v!bijlage=]
+\setuplabeltext [\s!pl] [\v!deel=Ust\c{e}p] %%% NOTE: Below the e should be something which looks rather like |_ than like _| (\c{c}edile), suggestions?
+\setuplabeltext [\s!pl] [\v!regel=wiersz]
+\setuplabeltext [\s!pl] [\v!regels=wiersze]
+
+\setuplabeltext [\s!pl] [\v!january=stycze\'n]
+\setuplabeltext [\s!pl] [\v!february=luty]
+\setuplabeltext [\s!pl] [\v!march=marzec]
+\setuplabeltext [\s!pl] [\v!april=kwiecie\'n]
+\setuplabeltext [\s!pl] [\v!may=maj]
+\setuplabeltext [\s!pl] [\v!june=czerwcowy]
+\setuplabeltext [\s!pl] [\v!july=lipiec]
+\setuplabeltext [\s!pl] [\v!august=sierpie\'n]
+\setuplabeltext [\s!pl] [\v!september=wrzesie\'n]
+\setuplabeltext [\s!pl] [\v!october=pa\'zdziernik]
+\setuplabeltext [\s!pl] [\v!november=listopad]
+\setuplabeltext [\s!pl] [\v!december=grudzie\'n]
+
+\setuplabeltext [\s!pl] [\v!sunday=niedziela]
+\setuplabeltext [\s!pl] [\v!monday=poniedzia\l ek]
+\setuplabeltext [\s!pl] [\v!tuesday=wtorek]
+\setuplabeltext [\s!pl] [\v!wednesday=\'sroda]
+\setuplabeltext [\s!pl] [\v!thursday=czwartek]
+\setuplabeltext [\s!pl] [\v!friday=pi\c{a}tek] %%% NOTE: Below the a should be something which looks rather like |_ than like _| (\c{c}edile), suggestions?
+\setuplabeltext [\s!pl] [\v!saturday=sobota]
+
+%D \ShowAllLanguageValues [\s!pl] [polish] poolse ...
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-sp.pat b/tex/context/base/lang-sp.pat new file mode 100644 index 000000000..72c2e6095 --- /dev/null +++ b/tex/context/base/lang-sp.pat @@ -0,0 +1,151 @@ +% Hyphenation patterns for Spanish.
+% Compiled by Julio Sanchez (jsanchez@gmv.es) on September 1991.
+%
+% These patterns have been derived from "On Word Division in Spanish",
+% Jos'e A. Ma~nas, Communications of the ACM, and implemented in his
+% package ftc. You can get ftc and a draft of the abovementioned
+% paper from goya.dit.upm.es in src/text.proc/ftc.Z. FTP access may
+% be available. Otherwise, send help to info@goya.dit.upm.es for
+% details on use of the mail server.
+%
+% Rules mentioned below are those described in that paper. After
+% several unsatisfactory attempts to pretend I knew better, these
+% patterns closely follow that paper. Pattern 'tl' is not considered.
+% It is conflictive and ftc does not use it either.
+%
+% These patterns have been generated by shyphen.sh version 1.2,
+% shyphen.sh is a sh script that allows a number of choices.
+% Full benefit from some of these options can only be
+% obtained if appropriate fonts are available.
+%
+% Follows a copyright notice. This is not in the public domain,
+% but the copyright is essentially a hold-harmless clause. That
+% is, use it at will, but don't sue me if you don't like it.
+%
+% COPYRIGHT NOTICE
+%
+% These patterns and the generating sh script are Copyright (c) GMV 1991
+% These patterns were developed for internal GMV use and are made
+% public in the hope that they will benefit others. Also, spreading
+% these patterns throughout the Spanish-language TeX community is
+% expected to provide back-benefits to GMV in that it can help keeping
+% GMV in the mainstream of spanish users. However, this is given
+% for free and WITHOUT ANY WARRANTY. Under no circumstances can Julio
+% Sanchez, GMV, Jos'e A. Ma~nas or any agents or representatives thereof
+% be held responsible for any errors in this software nor for any damages
+% derived from its use, even in case any of the above has been notified
+% of the possibility of such damages. If any such situation arises, you
+% responsible for repair. Use of this software is an explicit
+% acceptance of these conditions.
+%
+% You can use this software for any purpose. You cannot delete this
+% copyright notice. If you change this software, you must include
+% comments explaining who, when and why. You are kindly requested to
+% send any changes to tex@gmv.es. If you change the generating
+% script, you must include code in it such that any output is clearly
+% labeled as generated by a modified script.
+%
+% Despite the lack of warranty, we would like to hear about any
+% problem you find. Please report problems to tex@gmv.es.
+%
+% END OF COPYRIGHT NOTICE
+%
+% Options included in this set: basic isolatin1 ugly
+% Open vowels: a e o ^^e1 ^^e9 ^^ed ^^f3 ^^fa
+% Closed vowels: i u ^^fc
+% Consonants: b c d f g j k l m n p q r s t v w x y z ^^f1
+%
+% Some of the patterns below represent combinations that never
+% happen in Spanish. Would they happen, they would be hyphenated
+% according to the rules.
+
+% This keeps {cat|lc}code changes, if any, local. Nice to users of
+% multilingual versions. These are the minimum changes needed to process
+% the patterns. These and other changes will have to be re-enacted when
+% Spanish be established as the current language. See the babel docs if
+% you don't understand this.
+\begingroup
+\catcode`\^^e1=11 \lccode`\^^e1=`\^^e1 % 'a
+\catcode`\^^e9=11 \lccode`\^^e9=`\^^e9 % 'e
+\catcode`\^^ed=11 \lccode`\^^ed=`\^^ed % 'i
+\catcode`\^^f1=11 \lccode`\^^f1=`\^^f1 % 'o
+\catcode`\^^f3=11 \lccode`\^^f3=`\^^f3 % ~n
+\catcode`\^^fa=11 \lccode`\^^fa=`\^^fa % 'u
+\catcode`\^^fc=11 \lccode`\^^fc=`\^^fc % "u
+\patterns{
+% Rule SR1
+% Vowels are kept together by the defaults
+% Rule SR2
+% Attach vowel groups to left consonant
+1ba 1be 1bo 1b^^e1 1b^^e9 1b^^ed 1b^^f3 1b^^fa 1bi 1bu 1b^^fc
+1ca 1ce 1co 1c^^e1 1c^^e9 1c^^ed 1c^^f3 1c^^fa 1ci 1cu 1c^^fc
+1da 1de 1do 1d^^e1 1d^^e9 1d^^ed 1d^^f3 1d^^fa 1di 1du 1d^^fc
+1fa 1fe 1fo 1f^^e1 1f^^e9 1f^^ed 1f^^f3 1f^^fa 1fi 1fu 1f^^fc
+1ga 1ge 1go 1g^^e1 1g^^e9 1g^^ed 1g^^f3 1g^^fa 1gi 1gu 1g^^fc
+1ja 1je 1jo 1j^^e1 1j^^e9 1j^^ed 1j^^f3 1j^^fa 1ji 1ju 1j^^fc
+1ka 1ke 1ko 1k^^e1 1k^^e9 1k^^ed 1k^^f3 1k^^fa 1ki 1ku 1k^^fc
+1la 1le 1lo 1l^^e1 1l^^e9 1l^^ed 1l^^f3 1l^^fa 1li 1lu 1l^^fc
+1ma 1me 1mo 1m^^e1 1m^^e9 1m^^ed 1m^^f3 1m^^fa 1mi 1mu 1m^^fc
+1na 1ne 1no 1n^^e1 1n^^e9 1n^^ed 1n^^f3 1n^^fa 1ni 1nu 1n^^fc
+1pa 1pe 1po 1p^^e1 1p^^e9 1p^^ed 1p^^f3 1p^^fa 1pi 1pu 1p^^fc
+1qa 1qe 1qo 1q^^e1 1q^^e9 1q^^ed 1q^^f3 1q^^fa 1qi 1qu 1q^^fc
+1ra 1re 1ro 1r^^e1 1r^^e9 1r^^ed 1r^^f3 1r^^fa 1ri 1ru 1r^^fc
+1sa 1se 1so 1s^^e1 1s^^e9 1s^^ed 1s^^f3 1s^^fa 1si 1su 1s^^fc
+1ta 1te 1to 1t^^e1 1t^^e9 1t^^ed 1t^^f3 1t^^fa 1ti 1tu 1t^^fc
+1va 1ve 1vo 1v^^e1 1v^^e9 1v^^ed 1v^^f3 1v^^fa 1vi 1vu 1v^^fc
+1wa 1we 1wo 1w^^e1 1w^^e9 1w^^ed 1w^^f3 1w^^fa 1wi 1wu 1w^^fc
+1xa 1xe 1xo 1x^^e1 1x^^e9 1x^^ed 1x^^f3 1x^^fa 1xi 1xu 1x^^fc
+1ya 1ye 1yo 1y^^e1 1y^^e9 1y^^ed 1y^^f3 1y^^fa 1yi 1yu 1y^^fc
+1za 1ze 1zo 1z^^e1 1z^^e9 1z^^ed 1z^^f3 1z^^fa 1zi 1zu 1z^^fc
+1^^f1a 1^^f1e 1^^f1o 1^^f1^^e1 1^^f1^^e9 1^^f1^^ed 1^^f1^^f3 1^^f1^^fa 1^^f1i 1^^f1u 1^^f1^^fc
+% Rule SR3
+% Build legal consonant groups, leave other consonants bound to
+% the previous group. This overrides part of the SR2 pattern
+% group.
+1c2ha 1c2he 1c2ho 1c2h^^e1 1c2h^^e9 1c2h^^ed 1c2h^^f3 1c2h^^fa 1c2hi 1c2hu 1c2h^^fc
+1l2la 1l2le 1l2lo 1l2l^^e1 1l2l^^e9 1l2l^^ed 1l2l^^f3 1l2l^^fa 1l2li 1l2lu 1l2l^^fc
+1r2ra 1r2re 1r2ro 1r2r^^e1 1r2r^^e9 1r2r^^ed 1r2r^^f3 1r2r^^fa 1r2ri 1r2ru 1r2r^^fc
+1b2la 1b2le 1b2lo 1b2l^^e1 1b2l^^e9 1b2l^^ed 1b2l^^f3 1b2l^^fa 1b2li 1b2lu 1b2l^^fc
+1b2ra 1b2re 1b2ro 1b2r^^e1 1b2r^^e9 1b2r^^ed 1b2r^^f3 1b2r^^fa 1b2ri 1b2ru 1b2r^^fc
+1c2la 1c2le 1c2lo 1c2l^^e1 1c2l^^e9 1c2l^^ed 1c2l^^f3 1c2l^^fa 1c2li 1c2lu 1c2l^^fc
+1c2ra 1c2re 1c2ro 1c2r^^e1 1c2r^^e9 1c2r^^ed 1c2r^^f3 1c2r^^fa 1c2ri 1c2ru 1c2r^^fc
+1d2ra 1d2re 1d2ro 1d2r^^e1 1d2r^^e9 1d2r^^ed 1d2r^^f3 1d2r^^fa 1d2ri 1d2ru 1d2r^^fc
+1f2la 1f2le 1f2lo 1f2l^^e1 1f2l^^e9 1f2l^^ed 1f2l^^f3 1f2l^^fa 1f2li 1f2lu 1f2l^^fc
+1f2ra 1f2re 1f2ro 1f2r^^e1 1f2r^^e9 1f2r^^ed 1f2r^^f3 1f2r^^fa 1f2ri 1f2ru 1f2r^^fc
+1g2la 1g2le 1g2lo 1g2l^^e1 1g2l^^e9 1g2l^^ed 1g2l^^f3 1g2l^^fa 1g2li 1g2lu 1g2l^^fc
+1g2ra 1g2re 1g2ro 1g2r^^e1 1g2r^^e9 1g2r^^ed 1g2r^^f3 1g2r^^fa 1g2ri 1g2ru 1g2r^^fc
+1k2la 1k2le 1k2lo 1k2l^^e1 1k2l^^e9 1k2l^^ed 1k2l^^f3 1k2l^^fa 1k2li 1k2lu 1k2l^^fc
+1k2ra 1k2re 1k2ro 1k2r^^e1 1k2r^^e9 1k2r^^ed 1k2r^^f3 1k2r^^fa 1k2ri 1k2ru 1k2r^^fc
+1p2la 1p2le 1p2lo 1p2l^^e1 1p2l^^e9 1p2l^^ed 1p2l^^f3 1p2l^^fa 1p2li 1p2lu 1p2l^^fc
+1p2ra 1p2re 1p2ro 1p2r^^e1 1p2r^^e9 1p2r^^ed 1p2r^^f3 1p2r^^fa 1p2ri 1p2ru 1p2r^^fc
+1t2ra 1t2re 1t2ro 1t2r^^e1 1t2r^^e9 1t2r^^ed 1t2r^^f3 1t2r^^fa 1t2ri 1t2ru 1t2r^^fc
+% Rule SR4 is implicitly implemented by the default values
+% Rule HE1 is implemented by TeX parameters \lefthyphenmin and
+% \righthyphenmin. Help yourself. The correct values for
+% Spanish are 2 and 2. If you set them below these values,
+% incorrect breaks will happen.
+% Rule HE2
+% Break between a consonant and an h
+b1h d1h f1h g1h j1h k1h l1h m1h n1h p1h q1h r1h s1h t1h v1h w1h x1h y1h z1h ^^f11h
+% We now avoid some problematic breaks.
+su2b2r su2b2l
+% These are included here to avoid ugly, though legal, breaks
+% They were taken from the sphyphen.tex (silaba.tex) produced
+% by Aurion Tecnologia and other sources.
+2caca. 2cacas.
+2caga. 2cagas.
+2cago. 2cerdo
+2cola. 2colas.
+2culo. 2culos.
+2cular.
+2loco. 2locos. 2loca. 2locas.
+2moco. 2mocos.
+2mula. 2mulas.
+2pedo. 2pedos. 2peda. 2pedas.
+2pito. 2pitos.
+2puto. 2putos. 2puta. 2putas.
+.caca2
+}
+\endgroup
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex new file mode 100644 index 000000000..d84a0017d --- /dev/null +++ b/tex/context/base/lang-ura.tex @@ -0,0 +1,85 @@ +%D \module
+%D [ file=lang-sla,
+%D version=1997.09.03,
+%D title=\CONTEXT\ Language Macros,
+%D subtitle=Uralic Languages,
+%D author=Hans Hagen / Tobias Burnus,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian,
+% Permian tongues, Hungarianm Ostyak, Vogul, Samoyed
+
+\writestatus{loading}{Uralic Languages}
+
+\unprotect
+
+\installlanguage
+ [\s!fi]
+ [\c!spatiering=\v!opelkaar,
+ \c!leftsentence=---,
+ \c!rightsentence=---,
+ \c!leftsubsentence=---,
+ \c!rightsubsentence=---,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag},
+ \c!default=\s!en,
+ \c!status=\v!stop]
+
+\setupheadtext [\s!fi] [\v!inhoud=Sis\"allys]
+\setupheadtext [\s!fi] [\v!tabellen=Taulukkoj]
+\setupheadtext [\s!fi] [\v!figuren=Kuvi]
+\setupheadtext [\s!fi] [\v!grafieken=Grafiikkaoi]
+\setupheadtext [\s!fi] [\v!intermezzos=Intermezzos]
+\setupheadtext [\s!fi] [\v!index=Indeksiluku]
+\setupheadtext [\s!fi] [\v!afkortingen=Lyhennyksi]
+\setupheadtext [\s!fi] [\v!logos=Vertauskuva]
+\setupheadtext [\s!fi] [\v!eenheden=Yksik\"ot]
+
+\setuplabeltext [\s!fi] [\v!tabel=Taulukko ]
+\setuplabeltext [\s!fi] [\v!figuur=Kuva ]
+\setuplabeltext [\s!fi] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!fi] [\v!grafiek=Grafiikka ]
+\setuplabeltext [\s!fi] [\v!hoofdstuk=]
+\setuplabeltext [\s!fi] [\v!paragraaf=]
+\setuplabeltext [\s!fi] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!fi] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!fi] [\v!bijlage=]
+\setuplabeltext [\s!fi] [\v!deel=Osa ]
+\setuplabeltext [\s!fi] [\v!regel=rivi]
+\setuplabeltext [\s!fi] [\v!regels=rivie]
+
+\setuplabeltext [\s!fi] [\v!january=tammikuu]
+\setuplabeltext [\s!fi] [\v!february=helmikuu]
+\setuplabeltext [\s!fi] [\v!march=maaliskuu]
+\setuplabeltext [\s!fi] [\v!april=huhtikuu]
+\setuplabeltext [\s!fi] [\v!may=toukokuu]
+\setuplabeltext [\s!fi] [\v!june=kes\"akuu]
+\setuplabeltext [\s!fi] [\v!july=hein\"akuu]
+\setuplabeltext [\s!fi] [\v!august=elokuu]
+\setuplabeltext [\s!fi] [\v!september=syyskuu]
+\setuplabeltext [\s!fi] [\v!october=lokakuu]
+\setuplabeltext [\s!fi] [\v!november=marraskuu]
+\setuplabeltext [\s!fi] [\v!december=joulukuu]
+
+\setuplabeltext [\s!fi] [\v!sunday=sunnuntai]
+\setuplabeltext [\s!fi] [\v!monday=maanantai]
+\setuplabeltext [\s!fi] [\v!tuesday=tiistai]
+\setuplabeltext [\s!fi] [\v!wednesday=keskiviikko]
+\setuplabeltext [\s!fi] [\v!thursday=torstai]
+\setuplabeltext [\s!fi] [\v!friday=perjantai]
+\setuplabeltext [\s!fi] [\v!saturday=lauantai]
+
+%D \ShowAllLanguageValues [\s!fi] [finnish] finse ...
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/list-ini.tex b/tex/context/base/list-ini.tex new file mode 100644 index 000000000..d019d2182 --- /dev/null +++ b/tex/context/base/list-ini.tex @@ -0,0 +1,40 @@ +%D \module
+%D [ file=list-ini,
+%D versie=1995.10.10,
+%D naam=\CONTEXT\ List Macros,
+%D auteur=J. Hagen,
+%D datum=\currentdate,
+%D copyright=J. Hagen]
+
+\writestatus{loading}{Context List Macros}
+
+\unprotect
+
+%I n=Overzichten
+%I c=\startoverzicht
+%I
+%I Ten behoeve van veel voorkomende soorten overzichten
+%I zijn speciale commando's beschikbaar. Bij dergelijke
+%I overzichten worden in plaats van de gebruikelijke
+%I commando's \starttekst..\stoptekst de onderstaande
+%I commando's gebruikt:
+%I
+%I \startoverzicht[soort overzicht]
+%I \stopoverzicht
+%I
+%I Overzichten staan in files met de naam list-xxx, waarbij
+%I xxx de eerste drie letters van het soort overzicht zijn.
+%I
+%I Vooralsnog zijn alleen overzichten van 'figuren' en
+%I 'kontakten' beschikbaar.
+
+\definieerfilegroep
+ [overzicht]
+ [file=list,
+ voor=,
+ na=]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex new file mode 100644 index 000000000..849f8c89f --- /dev/null +++ b/tex/context/base/mult-com.tex @@ -0,0 +1,1184 @@ +%D \module
+%D [ file=mult-com,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Commands,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D In this module we define the commands. A more than quick
+%D glance at this list leans that it's incomplete. This is due
+%D to the fact that the system generated a lot of commands by
+%D means of the elements specified somewhere else.
+%D
+%D {\em Because the original interface to \CONTEXT\ is dutch,
+%D the words left of the \type{:} are in dutch. In the near
+%D future english will be the core language.}
+
+\writestatus{loading}{Context Multilingual Macros / Commands}
+
+%D The commands are grouped according to their functionality.
+%D Although the \type{\stop} counterpart of the
+%D \type{\start}||commands could be generated automatically,
+%D we've chosen do define it explicitly.
+%D
+%D One complication of the english commands, is that we don't
+%D want them to overrule or conflict with Plain \TEX. The
+%D names therefore are not always optimal.
+
+%D \startcompressdefinitions
+
+\startcommands dutch english
+ german
+
+ language: taal language
+ sprache
+ mainlanguage: hoofdtaal mainlanguage
+ hauptsprache
+ translate: vertaal translate
+ uebersetzten
+ installlanguage: installeertaal installlanguage
+ installieresprache
+ setuplanguage: steltaalin setuplanguage
+ stellespracheein
+
+ showmakeup: toonopmaak showmakeup
+ zeigeumbruch
+
+ usespecials: gebruikspecials usespecials
+ benutzespezielles
+
+% system redefineaccent: herdefinieeraccent redefineaccent
+% redefiniereakzent
+% system redefinecharacter: herdefinieerkarakter redefinecharacter
+% redefinierezeichen
+% system redefinecommand: herdefinieercommando redefinecommand
+% redefinierbefehl
+ defineaccent: definieeraccent defineaccent
+ definiereakzent
+ definecharacter: definieerkarakter definecharacter
+ definierezeichen
+ definecommand: definieercommando definecommand
+ definierebefehl
+ startcoding: startcodering startcoding
+ startkodierung
+ stopcoding: stopcodering stopcoding
+ stopkodierung
+ definecorpsenvironment: definieerkorpsomgeving definecorpsenvironment
+ definierefliesstextumgebung
+ definecorps: definieerkorps definecorps
+ definierefliesstext
+
+ setuptype: steltypein setuptype
+ stelletipein
+ type: type type
+ tippen
+ typ: typ typ
+ tip
+ arg: arg arg
+ arg
+ tex: tex tex
+ tex
+ definetyping: definieertypen definetyping
+ definieretippen
+ setuptyping: steltypenin setuptyping
+ stelletippenein
+% generated starttyping: starttypen starttyping
+% starttippen
+% generated stoptyping: stoptypen stoptyping
+% stoptippen
+ typefile: typefile typefile
+ tippedatei
+
+ setupfootnotes: stelvoetnotenin setupfootnotes
+ stellefussnotenein
+ note: noot note
+ notiz
+ footnote: voetnoot footnote
+ fussnote
+ startlocalfootnotes: startlokalevoetnoten startlocalfootnotes
+ startlokalefussnoten
+ stoplocalfootnotes: stoplokalevoetnoten stoplocalfootnotes
+ stoplokalefussnoten
+ placelocalfootnotes: plaatslokalevoetnoten placelocalfootnotes
+ platzierelokalefussnoten
+ placefootnotes: plaatsvoetnoten placefootnotes
+ platzierefussnoten
+
+ currentdate: huidigedatum currentdate
+ heutigesdatum
+ weekday: weekdag weekday
+ wochentag
+ WEEKDAY: WEEKDAG WEEKDAY
+ WOCHENTAG
+ month: maand month
+ monat
+ MONTH: MAAND MONTH
+ MONAT
+
+ Numbers: Cijfers Numbers
+ Ziffern
+ numbers: cijfers numbers
+ ziffern
+ romannumerals: romeins romannummerals
+ roemischezahlen
+ Romannumerals: Romeins Romannummerals
+ Roemischezahlen
+ character: letter character
+ buchstabe
+ Character: Letter Character
+ Buchstabe
+ characters: letters characters
+ buchstaben
+ Characters: Letters Characters
+ Buchstaben
+
+ definesymbol: definieersymbool definesymbol
+ definieresymbol
+ symbol: symbool symbol
+ symbol
+ defineconversion: definieerconversie defineconversion
+ definierekonversion
+ convertnumber: converteernummer convertnumber
+ konvertierezahl
+
+ kap: kap kap
+ kap
+ KAP: KAP KAP
+ KAP
+ nokap: nokap nokap
+ nokap
+ Kap: Kap Kap
+ Kap
+ Kaps: Kaps Kaps
+ Kaps
+ WORD: WOORD WORD
+ WORT
+ WORDS: WOORDEN WORDS
+ WOERTER
+ Word: Woord Word
+ Wort
+ Words: Woorden Words
+ Woerter
+ stretched: opgerekt stretched
+ gestreckt
+ overstrike: doorstreep overstrike
+ durchgestrichen
+ overstrikes: doorstrepen overstrikes
+ durchstreichen
+ underbar: onderstreep underbar
+ unterstrichen
+ underbars: onderstrepen underbars
+ unterstreichen
+ setupunderbar: stelonderstrepenin setupunderbar
+ stelleunterstreichenein
+
+ setupcorps: stelkorpsin setupcorps
+ stellefliesstextein
+ switchtocorps: switchnaarkorps switchtocorps
+ wechselezumfliesstext
+ showcorps: toonkorps showcorps
+ zeigefliesstext
+ showcorpsenvironment: toonkorpsomgeving showcorpsenvironment
+ zeigefliesstextumgebung
+
+ headtext: koptekst headtext
+ ueberschrift
+ labeltext: labeltekst labeltext
+ labeltext
+ LABELTEXT: LABELTEKST LABELTEXT
+ LABELTEXT
+ setupheadtext: stelkoptekstin setupheadtext
+ stelleueberschriftein
+ setuplabeltext: stellabeltekstin setuplabeltext
+ stellelabeltextein
+
+ marginrule: kantlijn marginrule
+ marginallinie
+ startmarginrule: startkantlijn startmarginrule
+ startmarginallinie
+ stopmarginrule: stopkantlijn stopmarginrule
+ stopmarginallinie
+ setupmarginrules: stelkantlijnin setupmarginrules
+ stellemarginallinieein
+
+ blackrule: blokje blackrule
+ rechteck
+ blackrules: blokjes blackrules
+ rechtecke
+ setupblackrules: stelblokjesin setupblackrules
+ stellerechteckein
+
+ setupscreens: stelrastersin setupscreens
+ stellerasterein
+
+ framed: omlijnd framed
+ umrahmt
+ inframed: inlijnd inframed
+ imumriss
+ setupframed: stelomlijndin setupframed
+ stelleumrahmtein
+% setuprules: stellijnenin setuprules
+% stelleumrissein
+ setuplinewidth: stellijndiktein setuplinewidth
+ stellelinienbreiteein
+
+ setupthinrules: steldunnelijnenin setupthinrules
+ stelleduennerumrissein
+ thinrule: dunnelijn thinrule
+ duennelinie
+ thinrules: dunnelijnen thinrules
+ duennerumriss
+ hairline: haarlijn hairline
+ haarlinie
+
+ vl: vl vl
+ vl
+ hl: hl hl
+ hl
+
+ defineframedtext: definieerkadertekst defineframedtext
+ definiereumrahmtertext
+% startframedtext: startkadertekst startframedtext
+% startumrahmtertext
+% stopframedtext: stopkadertekst stopframedtext
+% stopumrahmtertext
+ setupframedtexts: stelkadertekstenin setupframedtexts
+ stelleumrahmtetexteein
+
+ defineoverlay: definieeroverlay defineoverlay
+ definiereoverlay
+
+ background: achtergrond background
+ hintergrund
+ startbackground: startachtergrond startbackground
+ starthintergrund
+ stopbackground: stopachtergrond stopbackground
+ stophintergrund
+ setupbackground: stelachtergrondin setupbackground
+ stellehintergrundein
+
+ fillinrules: invullijnen fillinrules
+ gefuelltesrechteck
+ setupfillinrules: stelinvullijnenin setupfillinrules
+ stellegefuelltesrechteckein
+ fillintext: invulltekst fillintext
+ ausfuelltext
+
+ setupfillinlines: stelinvulregelsin setupfillinlines
+ stellegefuelltezeileein
+ fillinline: invulregel fillinline
+ gefuelltezeile
+
+ setuptextrules: steltekstlijnenin setuptextrules
+ stelletextumrissein
+ textrule: tekstlijn textrule
+ textlinie
+ starttextrule: starttekstlijn starttextrule
+ starttextlinie
+ stoptextrule: stoptekstlijn stoptextrule
+ stoptextlinie
+
+ usemodule: gebruikmodule usemodule
+ verwendemodul
+ usemodules: gebruikmodules usemodules
+ verwendemodule
+
+ starttekst: starttekst starttext
+ starttext
+ stoptekst: stoptekst stoptext
+ stoptext
+
+ margetitel: margetitel margintitle
+ marginaltitel
+ margewoord: margewoord marginword
+ marginalwort
+
+ % dit wordt:
+
+ margetekst: margetekst margintext
+ marginaltext
+
+ inlinker: inlinker inleft
+ imlinken
+ inmarge: inmarge inmargin
+ inmarginalie
+ inanderemarge: inanderemarge inothermargin
+ inanderermarginale
+ inrechter: inrechter inright
+ imrechten
+ startmargeblok: startmargeblok startmarginblock
+ startmarginalblock
+ stopmargeblok: stopmargeblok stopmarginblock
+ stopmarginalblock
+ stelinmargein: stelinmargein setupinmargin
+ stelleinmarginalieein
+ stelmargeblokkenin: stelmargeblokkenin setupmarginblocks
+ stellemarginalblockein
+
+ inleftside: inlinkerrand inleftside
+ imlinkenrand
+ inleftmargin: inlinkermarge inleftmargin
+ inlinkermarginale
+ inrightmargin: inrechtermarge inrightmargin
+ inrechtermarginale
+ inrightside: inrechterrand inrightside
+ imrechtenrand
+
+ woordrechts: woordrechts wordright
+ wortrechts
+
+ blanko: blanko blank
+ blanko
+ stelblankoin: stelblankoin setupblank
+ stelleblankoein
+ corrigeerwitruimte: corrigeerwitruimte correctwhitespace
+ korrigierezwischenraum
+ fixedspaces: vastespaties fixedspaces
+ festesspatium
+ nospace: geenspatie nospace
+ keinspatium
+ space: spatie space
+ spatium
+ geenwitruimte: geenwitruimte nowhitespace
+ keinzwischenraum
+ opelkaar: opelkaar packed
+ kleinerdurchschuss
+ startopelkaar: startopelkaar startpacked
+ startkleinerdurchschuss
+ stopopelkaar: stopopelkaar stoppacked
+ stopkleinerdurchschuss
+ startvanelkaar: startvanelkaar startunpacked
+ startgrosserdurchschuss
+ stopvanelkaar: stopvanelkaar stopunpacked
+ stopkleinerdurchschuss
+ startregelcorrectie: startregelcorrectie startlinecorrection
+ startzeilenkorrektur
+ stopregelcorrectie: stopregelcorrectie stoplinecorrection
+ stopzeilenkorrektur
+ omlaag: omlaag godown
+ nachunten
+ witruimte: witruimte whitespace
+ zwischenraum
+
+ nietinspringen: nietinspringen noindenting
+ nichteinziehen
+ inspringen: inspringen indenting
+ einziehen
+ stelinspringenin: stelinspringenin setupindenting
+ stelleeinziehenein
+
+ startuitlijnen: startuitlijnen startalignment
+ startausrichtung
+ stopuitlijnen: stopuitlijnen stopalignment
+ stopausrichtung
+
+ startregels: startregels startlines
+ startzeilen
+ stopregels: stopregels stoplines
+ stopzeilen
+ stelregelnummerenin: stelregelnummerenin setuplinenumbering
+ stellezeilennummerierungein
+ startregelnummeren: startregelnummeren startlinenumbering
+ startzeilennummerierung
+ stopregelnummeren: stopregelnummeren stoplinenumbering
+ stopzeilennummerierung
+ startregel: startregel startline
+ startzeile
+ stopregel: stopregel stopline
+ stopzeile
+ eenregel: eenregel someline
+ einezeile
+ inregel: inregel inline
+ inzeile
+ crlf: crlf crlf
+ crlf
+ stelregelsin: stelregelsin setuplines
+ stellezeilenein
+
+ startsmaller: startsmaller startnarrower
+ startenger
+ stopsmaller: stopsmaller stopnarrower
+ stopenger
+ stelsmallerin: stelsmallerin setupnarrower
+ stelleengerein
+
+ starttabel: starttabel starttable
+ starttabelle
+ stoptabel: stoptabel stoptable
+ stoptabelle
+ starttabellen: starttabellen starttables
+ starttabellen
+ stoptabellen: stoptabellen stoptables
+ stoptabellen
+ steltabellenin: steltabellenin setuptables
+ stelletabellenein
+
+ pagina: pagina page
+ seite
+ koppelpagina: koppelpagina couplepage
+ doppelseite
+ soortpagina: soortpagina pagetype
+ seitentyp
+ verwerkpagina: verwerkpagina processpage
+ bearbeiteseite
+ koppelpapier: koppelpapier couplepaper
+ doppelseitigespapier
+ selecteerpapier: selecteerpapier selectpaper
+ waehlepapieraus
+ scherm: scherm screen
+ bildschirm
+
+ definieersectie: definieersectie definesection
+ definiereabschnitt
+ definieersectieblok: definieersectieblok definesectionblock
+ definiereabschnittsblock
+ stelsectieblokin: stelsectieblokin setupsectionblock
+ stelleabschnittsblockein
+ stelsectiein: stelsectiein setupsection
+ stelleabschnittein
+
+ geenbovenenonderregels: geenbovenenonderregels notopandbottomlines
+ keinzeilenobenundunten
+ geenhoofdenvoetregels: geenhoofdenvoetregels noheaderandfooterlines
+ keinekopfundfusszeilen
+ stelbovenin: stelbovenin setuptop
+ stellenobenein
+ stelboventekstenin: stelboventekstenin setuptoptexts
+ stelletextobenein
+ stelhoofdin: stelhoofdin setupheader
+ stellekopfzeileein
+ stelhoofdtekstenin: stelhoofdtekstenin setupheadertexts
+ stellekopfzeilentextein
+ stelnummeringin: stelnummeringin setuppagenumbering
+ stelleseitennummeriernungein
+ stelonderin: stelonderin setupbottom
+ stelleuntenein
+ stelondertekstenin: stelondertekstenin setupbottomtexts
+ stelletextuntenein
+ stelvoetin: stelvoetin setupfooter
+ stellefusszeileein
+ stelvoettekstenin: stelvoettekstenin setupfootertexts
+ stellefusszeilentextein
+ stelpaginanummerin: stelpaginanummerin setuppagenumber
+ stelleseitennummerein
+ stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber
+ stelleunterseitennummerein
+ steltekstin: steltekstin setuptext
+ stelletextein
+ stelteksttekstenin: stelteksttekstenin setuptexttexts
+ stelletexttexteein
+
+ items: items items
+ posten
+ stelitemsin: stelitemsin setupitems
+ stellepostenein
+
+ regellinks: regellinks leftlined
+ zeilelinks % better: linksbuendig
+ regelmidden: regelmidden middlelined
+ zeilemitte % better: zentriert
+ regelrechts: regelrechts rightlined
+ zeilerechts % better: rechtsbuendig
+
+ startkolommen: startkolommen startcolumns
+ startspalten
+ stopkolommen: stopkolommen stopcolumns
+ stopspalten
+ stelkolommenin: stelkolommenin setupcolumns
+ stellespaltenein
+ kolom: kolom column
+ spalte
+
+ kop: kop head
+ kopf
+ but: but but
+ but
+ som: som item
+ pos
+ nop: nop nop
+ nop
+ mar: mar mar
+ mar
+ sym: sym sym
+ sym
+ its: its its
+ its
+ startopsomming: startopsomming startitemize
+ startaufzaehlung
+ stelopsommingin: stelopsommingin setupitemize
+ stelleaufzaehlungein
+ stopopsomming: stopopsomming stopitemize
+ stopaufzaehlung
+
+ definieerkop: definieerkop definehead
+ definierekopf
+ stelkopin: stelkopin setuphead
+ stellekopfein
+ stelkoppenin: stelkoppenin setupheads
+ stellekoepfeein
+ stelkopnummerin: stelkopnummerin setupheadnumber
+ stellekopfzahlein
+ kopnummer: kopnummer headnumber
+ kopfnummer
+
+ resetmarkering: resetmarkering resetmarking
+ ruecksetztenbeschriftung
+ stelmarkeringin: stelmarkeringin setupmarking
+ stellebeschriftungein
+ definieermarkering: definieermarkering definemarking
+ definierebeschriftung
+ geenmarkering: geenmarkering nomarking
+ keinebeschriftung
+ markeer: markeer marking
+ beschriftung
+ ontkoppelmarkering: ontkoppelmarkering decouplemarking
+ entknuepfebeschriftung
+ koppelmarkering: koppelmarkering couplemarking
+ verknuepfebeschriftung
+ haalmarkering: haalmarkering getmarking
+ holebeschriftung
+
+ stellayoutin: stellayoutin setuplayout
+ stellelayoutein
+ paslayoutaan: paslayoutaan adaptlayout
+ passelayoutan
+ steloffsetin: steloffsetin setupoffset
+ stelleoffsetein
+ tooninstellingen: tooninstellingen showsetups
+ zeigeeinstellungen
+ toonkader: toonkader showframe
+ zeigerahmen
+ toongrid: toongrid showgrid
+ zeigegrid
+ toonopbouw: toonopbouw showbuildup
+ zeigeaufbau
+ toonlayout: toonlayout showlayout
+ zeigelayout
+ toonstruts: toonstruts showstruts
+ zeigestruts
+ definieerpapierformaat: definieerpapierformaat definepapersize
+ definierepapierformat
+ stelpapierformaatin: stelpapierformaatin setuppapersize
+ stellepapierformatin
+
+ versie: versie version
+ version
+
+ stelachtergrondenin: stelachtergrondenin setupbackgrounds
+ stellehintergruendeein
+
+ steluitlijnenin: steluitlijnenin setupalign
+ stelleausrichtungein
+ stelwitruimtein: stelwitruimtein setupwhitespace
+ stellezwischenraumein
+
+ stelinteractiein: stelinteractiein setupinteraction
+ stelleinteraktionein
+ stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu
+ stelleinteraktionsmenueein
+ definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu
+ definiereinteraktionsmenue
+ startinteractiemenu: startinteractiemenu startinteractionmenu
+ startinteraktionsmenue
+ blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu
+ inaktiviereinteraktionsmenue
+ interactiebuttons: interactiebuttons interactionbuttons
+ interaktionsknopfe
+ interactiebalk: interactiebalk interactionbar
+ interaktionsbalken
+ stelinteractiebalkin: stelinteractiebalkin setupinteractionbar
+ stelleinteraktionsbalkenein
+ stelinteractieschermin: stelinteractieschermin setupinteractionscreen
+ stelleinteraktionsbildschirmein
+
+ placebookmarks: plaatsbookmarks placebookmarks
+ platzierebookmarks
+ bookmark: bookmark bookmark
+ bookmark % -
+
+ definieerbeeldmerk: definieerbeeldmerk definelogo
+ definierelogo
+ plaatsbeeldmerken: plaatsbeeldmerken placelogos
+ platzierelogo
+
+ definecolor: definieerkleur definecolor
+ definierefarbe
+ definecolorgroup: definieerkleurgroep definecolorgroup
+ definierefarbengruppe
+ definepalet: definieerpalet definepalet
+ definierepalette
+ gray: grijs gray
+ grau
+ color: kleur color
+ farbe
+ startcolor: startkleur startcolor
+ startfarbe
+ stopcolor: stopkleur stopcolor
+ stopfarbe
+ setupcolors: stelkleurenin setupcolors
+ stellefarbenein
+ setupcolor: stelkleurin setupcolor
+ stellefarbeein
+ setuppalet: stelpaletin setuppalet
+ stellepaletteein
+ showcolor: toonkleur showcolor
+ zeigefarbe
+ showcolorgroup: toonkleurgroep showcolorgroup
+ zeigefarbengruppe
+ showpalet: toonpalet showpalet
+ zeigepalette
+ comparecolorgroup: vergelijkkleurgroep comparecolorgroup
+ vergleichefarbengruppe
+ comparepalet: vergelijkpalet comparepalet
+ vergleichepalette
+ colorvalue: kleurwaarde colorvalue
+ farbewert
+ grayvalue: grijswaarde grayvalue
+ grauwert
+
+ startraster: startraster startraster
+ startraster
+ stopraster: stopraster stopraster
+ stopraster
+
+ definieerblok: definieerblok defineblock
+ definiereblock
+ gebruikblokken: gebruikblokken useblocks
+ verwendeblock
+ geenblokkenmeer: geenblokkenmeer nomoreblocks
+ keinebloeckemehr
+ handhaafblokken: handhaafblokken keepblocks
+ behaltebloecke
+ selecteerblokken: selecteerblokken selectblocks
+ waehlebloeckeaus
+ stelblokin: stelblokin setupblock
+ stelleblockein
+ verbergblokken: verbergblokken hideblocks
+ verbergebloecke
+
+ definieerlijst: definieerlijst definelist
+ definiereliste
+ definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist
+ definierezusammengestellteliste
+ plaatslijst: plaatslijst placelist
+ platziereliste
+ schrijfnaarlijst: schrijfnaarlijst writetolist
+ schreibezurliste
+ schrijftussenlijst: schrijftussenlijst writebetweenlist
+ schreibezwischenliste
+ stellijstin: stellijstin setuplist
+ stellelisteein
+ stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist
+ stellezusammengestelltelisteein
+
+ definieerreferentielijst: definieerreferentielijst definereferencelist
+ definierereferenzliste
+ plaatsreferentielijst: plaatsreferentielijst placereferencelist
+ platzierereferenzliste
+ schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist
+ schreibezurreferenzliste
+ stelreferentielijstin: stelreferentielijstin setupreferencelist
+ stellereferenzlisteein
+
+ definieerplaatsblok: definieerplaatsblok definefloat
+ definieregleitobjekt
+ stelplaatsblokin: stelplaatsblokin setupfloat
+ stellegleitobjektein
+ stelplaatsblokkenin: stelplaatsblokkenin setupfloats
+ stellegleitobjekteein
+ splitsplaatsblok: splitsplaatsblok splitfloat
+ teilegleitobjekt
+ stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting
+ stelleplatziegeteiltegleitobjekteein
+ startcombinatie: startcombinatie startcombination
+ startkombination
+ stopcombinatie: stopcombinatie stopcombination
+ stopkombination
+ plaatsnaastelkaar: plaatsnaastelkaar placesidebyside
+ platzierenebeneinander
+ plaatsonderelkaar: plaatsonderelkaar placeontopofeachother
+ platziereuntereinander
+
+ stelblokkopjein: stelblokkopjein setupcaption
+ stellebildunterschriftein
+ stelblokkopjesin: stelblokkopjesin setupcaptions
+ stellebilderunterschriftein
+ stelcombinatiesin: stelcombinatiesin setupcombinations
+ stellekombinationein
+
+ startoverlay: startoverlay startoverlay
+ startoverlay
+ stopoverlay: stopoverlay stopoverlay
+ stopoverlay
+
+ definieerregister: definieerregister defineregister
+ definiereregister
+ koppelregister: koppelregister coupleregister
+ verknuepfregister
+ stelregisterin: stelregisterin setupregister
+ stelleregisterein
+ schrijfnaarregister: schrijfnaarregister writetoregister
+ schreibezumregister
+ plaatsregister: plaatsregister placeregister
+ platziereregister
+
+ definieersorteren: definieersorteren definesorting
+ definieresortieren
+ definieersynoniemen: definieersynoniemen definesynonyms
+ definieresynonyme
+ stelsorterenin: stelsorterenin setupsorting
+ stellesortierenein
+ stelsynoniemin: stelsynoniemin setupsynonym
+ stellesynonymein
+
+ startsynchronisatie: startsynchronisatie startsynchronization
+ startsynchronisation
+ stopsynchronisatie: stopsynchronisatie stopsynchronization
+ stopsynchronisation
+ stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar
+ stellesynchronisationsbalkenein
+ stelsynchronisatiein: stelsynchronisatiein setupsynchronization
+ stellesynchronisationein
+ synchronisatiebalk: synchronisatiebalk synchronizationbar
+ synchronisationsbalken
+ synchroniseer: synchroniseer synchronize
+ synchronisieren
+
+ gebruikexterndocument: gebruikexterndocument useexternaldocument
+ verwendeexteresdokument
+ gebruikURL: gebruikURL useURL
+ verwendeURL % -
+
+ stelprogrammasin: stelprogrammasin setupprograms
+ stelleprogrammein
+ definieerprogramma: definieerprogramma defineprogram
+ definiereprogramme
+ programma: programma program
+ programm
+
+ definieerprofiel: definieerprofiel defineprofile
+ definiereprofil
+ definieerversie: definieerversie defineversion
+ definiereversion
+ markeerversie: markeerversie markversion
+ beschrifteversion
+ selecteerversie: selecteerversie selectversion
+ waehleversionaus
+ startprofiel: startprofiel startprofile
+ startprofil
+ startversie: startversie startversion
+ startversion
+ stelprofielenin: stelprofielenin setupprofiles
+ stelleprofilein
+ stelversiesin: stelversiesin setupversions
+ stelleversionein
+ stopprofiel: stopprofiel stopprofile
+ stopprofil
+ stopversie: stopversie stopversion
+ stopversion
+ volgprofiel: volgprofiel followprofile
+ folgeprofil
+ volgprofielversie: volgprofielversie followprofileversion
+ folgeprofilversion
+ volgversie: volgversie followversion
+ folgeversion
+
+ doordefinieren: doordefinieren definedescription
+ definierebeschreibung
+ doorlabelen: doorlabelen definelabel
+ definierelabel
+ doornummeren: doornummeren defineenumeration
+ definierenummerierung
+ doorspringen: doorspringen defineindenting
+ definiereeinzug
+ steldoordefinierenin: steldoordefinierenin setupdescriptions
+ definierebeschreibungen
+ steldoornummerenin: steldoornummerenin setupenumerations
+ stellebeschreibungein
+ steldoorspringenin: steldoorspringenin setupindentations
+ stelleeinzuegein
+
+ steltabin: steltabin setuptab
+ stelletabein
+ tab: tab tab
+ tab
+
+ stelexternefigurenin: stelexternefigurenin setupexternalfigures
+ stelleexterneabbildungenein
+ toonexternefiguren: toonexternefiguren showexternalfigures
+ zeigeexterneabbildungen
+ externalfigure: externfiguur externalfigure
+ externeabbildung
+ toonexternfiguur: toonexternfiguur showexternalfigure
+ zeigeexterneabbildung
+ gebruikexternfiguur: gebruikexternfiguur useexternalfigure
+ verwendeexterneabbildung
+
+ startfiguur: startfiguur startfigure
+ startabbildung
+ stopfiguur: stopfiguur stopfigure
+ stopabbildung
+ refereer: refereer referring
+ referieren
+ markeer: markeer marking
+ beschriftung
+
+ rooster: rooster grid
+ gitter
+
+ button: button button
+ knopf
+ menubutton: menubutton menubutton
+ menueknopf
+ stelbuttonsin: stelbuttonsin setupbuttons
+ stelleknopfein
+
+ gebruikreferenties: gebruikreferenties usereferences
+ verwendereferenzen
+ reflijst: reflijst reflist
+ refliste
+ paginareferentie: paginareferentie pagereference
+ seitenreferenz
+ referentie: referentie reference
+ referenz
+ stelreferentielijstin: stelreferentielijstin setupreferencelist
+ stellereferenzlisteein
+ stelrefererenin: stelrefererenin setupreferencing
+ stellereferenzierenein
+ tekstreferentie: tekstreferentie textreference
+ textreferenz
+ uit: uit from
+ von
+ in: in in
+ in
+ op: op at
+ bei
+ naar: naar goto
+ zu
+ naarbox: naarbox gotobox
+ zurbox
+
+ startformule: startformule startformula
+ startformel
+ stopformule: stopformule stopformula
+ stopformel
+ plaatsformule: plaatsformule placeformula
+ platziereformel
+ plaatssubformule: plaatssubformule placesubformula
+ platziereunterformel
+ stelformulesin: stelformulesin setupformulas
+ stelleformelnein
+ startgegeven: startgegeven startfact
+ startgegeben
+ stopgegeven: stopgegeven stopfact
+ stopgegeben
+ startlegenda: startlegenda startlegend
+ startlegende
+ stoplegenda: stoplegenda stoplegend
+ stoplegende
+leg: leg leg leg
+geg: geg fact geg
+ mathematics: wiskunde mathematics
+ mathematik
+ dimension: dimensie dimension
+ dimension
+ nodimension: geendimensie nodimension
+ keindimension
+
+ startomgeving: startomgeving startenvironment
+ startumgebung
+ stopomgeving: stopomgeving stopenvironment
+ stopumgebung
+ startdeelomgeving: startdeelomgeving startlocalenvironment
+ startlokaleumgebung
+ startonderdeel: startonderdeel startcomponent
+ startkomponente
+ stoponderdeel: stoponderdeel stopcomponent
+ stopkomponente
+ startprodukt: startprodukt startproduct
+ startprodukt
+ stopprodukt: stopprodukt stopproduct
+ stopprodukt
+ startproject: startproject startproject
+ startprojekt
+ stopproject: stopproject stopproject
+ stopprojekt
+
+ project: project project
+ projekt
+ onderdeel: onderdeel component
+ komponente
+ produkt: produkt product
+ produkt
+ omgeving: omgeving environment
+ umgebung
+ geenfilesmeer: geenfilesmeer nomorefiles
+ keinedateienmehr
+
+ haalbuffer: haalbuffer getbuffer
+ holebuffer
+ startbuffer: startbuffer startbuffer
+ startbuffer
+ stopbuffer: stopbuffer stopbuffer
+ stopbuffer
+ stelbufferin: stelbufferin setupbuffer
+ stellebufferein
+ typebuffer: typebuffer typebuffer
+ tippebuffer
+
+ betekenis: betekenis united
+ bedeutung
+ voluit: voluit infull
+ volleswort
+
+ citaat: citaat quotation
+ zitat
+ citeer: citeer quote
+ zitieren
+ startcitaat: startcitaat startquotation
+ startzitat
+ stopcitaat: stopcitaat stopquotation
+ stopzitat
+ stelciterenin: stelciterenin setupquote
+ stellezitierenein
+
+ definieer: definieer define
+ definieren
+ herhaal: herhaal redo
+ wiederholen
+ gebruikcommandos: gebruikcommandos usecommands
+ verwendebefehl
+ definieerstartstop: definieerstartstop definestartstop
+ definierestartstop
+ startlokaal: startlokaal startlocal
+ startlokal
+ stoplokaal: stoplokaal stoplocal
+ stoplokal
+ naam: naam name
+ name
+
+ definieeropmaak: definieeropmaak definemakeup
+ definiereumbruch
+ stelopmaakin: stelopmaakin setupmakeup
+ stelleumbruchein
+ startopmaak: startopmaak startmakeup
+ startumbruch
+ stopopmaak: stopopmaak stopmakeup
+ stopumbruch
+
+ gebruikexternefile: gebruikexternefile useexternalfile
+ verwendeexternedatei
+ gebruikexternefiles: gebruikexternefiles useexternalfiles
+ verwendeexternedateien
+
+ kenmerk: kenmerk referral
+ verweis
+ kenmerkdatum: kenmerkdatum referraldate
+ verweisdatum
+
+ hoog: hoog high
+ hoch
+ laho: laho lohi
+ hoti
+ laag: laag low
+ tief
+
+ startuitstellen: startuitstellen startpostponing
+ startverschieben
+ stopuitstellen: stopuitstellen stoppostponing
+ stopverschieben
+ startverbergen: startverbergen starthiding
+ startverbergen
+ stopverbergen: stopverbergen stophiding
+ stopverbergen
+
+ breuk: breuk fraction
+ bruch
+ chem: chem chem
+ chem
+
+ startnaast: startnaast startopposite
+ startgegenueber
+
+ stopnaast: stopnaast stopopposite
+ stopgegenueber
+ stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing
+ stellegegenueberplatzierenein
+
+ startpositioneren: startpositioneren startpositioning
+ startpositionieren
+ stoppositioneren: stoppositioneren stoppositioning
+ stoppositionieren
+ positioneer: positioneer position
+ position
+ stelpositionerenin: stelpositionerenin setuppositioning
+ stellepositionierenein
+
+ roteer: roteer rotate
+ drehen
+ stelroterenin: stelroterenin setuprotate
+ stelledrehenein
+
+ stelnummerenin: stelnummerenin setupnumbering
+ stellenummerierungein
+ reset: reset reset
+ ruecksetzten
+
+ stelpublicatiesin: stelpublicatiesin setuppublications
+ stellepublikationein
+ publicatie: publicatie publication
+ publikation
+
+ definieerhbox: definieerhbox definehbox
+ definierehbox
+
+ toelichting: toelichting remark
+ bemerkung
+
+ toevoegen: toevoegen adding
+ zusatz
+
+ punten: punten periods
+ punkt
+
+ stelkoppeltekenin: stelkoppeltekenin setuphyphenmark
+ stellebindestrichein
+ stelinterliniein: stelinterliniein setupinterlinespace
+ stellezeilenabstandein
+ stelspatieringin: stelspatieringin setupspacing
+ stellespatiumein
+ steltolerantiein: steltolerantiein setuptolerance
+ stelletoleranzein
+ stelsysteemin: stelsysteemin setupsystem
+ stellesystemein
+
+ definieeralineas: definieeralineas defineparagraphs
+ definiereabsaetz
+ stelalineasin: stelalineasin setupparagraphs
+ stelleabsaetzein
+
+ geentest: geentest donttest
+ keintest
+
+\stopcommands
+
+%D \stopcompressdefinitions
+
+%D There are a lot of variables that users can use in setups
+%D and dedicated macros. ({\em I still have to check the
+%D english names.})
+
+%D \startcompressdefinitions
+
+\startcommands dutch english
+ german
+
+
+ bovenhoogte: bovenhoogte topheight
+ hoeheoben
+ bovenafstand: bovenafstand topdistance
+ abstandoben
+ hoofdhoogte: hoofdhoogte headerheight
+ kopfzeilenhoehe
+ hoofdafstand: hoofdafstand headerdistance
+ kopfzeilenabstand
+ teksthoogte: teksthoogte textheight
+ texthoehe
+ voetafstand: voetafstand footerdistance
+ fusszeileabstand
+ voethoogte: voethoogte footerheight
+ fusszeilenhoehe
+ onderafstand: onderafstand bottomdistance
+ abstandunten
+ onderhoogte: onderhoogte bottomheight
+ hoeheunten
+ margebreedte: margebreedte marginwidth
+ marginalbreite
+ linkermargebreedte: linkermargebreedte leftmarginwidth
+ linkemarginalbreite
+ rechtermargebreedte: rechtermargebreedte rightmarginwidth
+ rechtemarginalbreite
+ margeafstand: margeafstand margindistance
+ marginalafstand
+ randbreedte: randbreedte edgewidth
+ randbreite
+ linkerrandbreedte: linkerrandbreedte leftedgewidth
+ breitelinkerrand
+ rechterrandbreedte: rechterrandbreedte rightedgewidth
+ breiterechterrand
+ randafstand: randafstand edgedistance
+ randabstand
+ tekstbreedte: tekstbreedte textwidth
+ textbreite
+ zetbreedte: zetbreedte makeupwidth
+ satzbreite
+ zethoogte: zethoogte makeupheight
+ satzhoehe
+ kopwit: kopwit topspace
+ kopfweite
+ rugwit: rugwit backspace
+ rumpfweite
+
+ papierbreedte: papierbreedte paperwidth
+ papierbreite
+ papierhoogte: papierhoogte paperheight
+ papierhoehe
+
+ kopniveau: kopniveau headlevel
+ kopfniveau
+
+ linewidth: lijndikte linethickness
+ liniendicke
+
+\stopcommands
+
+%D \stopcompressdefinitions
+
+%D At \PRAGMA\ we use an extended version of \CONTEXT. The
+%D commands below are part of this. Beware of conflicts when
+%D defining your own.
+
+%D \startcompressdefinitions
+
+\startcommands dutch english
+ german
+
+ startdocument: startdocument startdocument
+ startdokument
+ stopdocument: stopdocument stopdocument
+ stopdokument
+ startoverzicht: startoverzicht startoverview
+ startueberblick
+ stopoverzicht: stopoverzicht stopoverview
+ stopueberblick
+ stelbrievenin: stelbrievenin setupcorrespondence
+ stellekorrespondenzein
+ brieven: brieven letters
+ briefe
+ brief: brief letter
+ brief
+ label: label label
+ label
+ sheet: sheet sheet
+ blatt
+ stelstickersin: stelstickersin setupstickers
+ stellestickerein
+ stelsheetsin: stelsheetsin setupsheets
+ stelleblattein
+ labels: labels labels
+ labels
+ woonplaats: woonplaats domicile
+ wohnort
+
+\stopcommands
+
+%D \stopcompressdefinitions
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex new file mode 100644 index 000000000..d9f6cba21 --- /dev/null +++ b/tex/context/base/mult-con.tex @@ -0,0 +1,778 @@ +%D \module
+%D [ file=mult-con,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Constants,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D In this rather large definition file we are going to tell
+%D \CONTEXT\ which constants, variables and elements we use.
+
+\writestatus{loading}{Context Multilingual Macros / Constants}
+
+%D First come some variables. These are used as keywords and
+%D therefore need a different treatment.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ een: een one eins
+ twee: twee two zwei
+ drie: drie three drei
+ vier: vier four vier
+ vijf: vijf five fuenf
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D Of course we need the names of the months.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ sunday: zondag sunday sonntag
+ monday: maandag monday montag
+ tuesday: dinsdag tuesday dienstag
+ wednesday: woensdag wednesday mittwoch
+ thursday: donderdag thursday donnerstag
+ friday: vrijdag friday freitag
+ saturday: zaterdag saturday samstag
+
+\stopvariables
+
+\startvariables dutch english german
+
+ january: januari January Januar
+ february: februari February Februar
+ march: maart March Maerz
+ april: april April April
+ may: mei May Mai
+ june: juni June Juni
+ july: juli July Juli
+ august: augustus August August
+ september: september September September
+ october: oktober October Oktober
+ november: november November November
+ december: december December Dezember
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D User defined commands are language specific, so we have to
+%D use variable when defining them. First we define some
+%D general structuring variables:
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ sectie: sectie section abschnitt
+
+ deel: deel part teil
+ hoofdstuk: hoofdstuk chapter kapitel
+ onderwerp: onderwerp subject thema
+ paragraaf: paragraaf section absatz
+ titel: titel title titel
+
+ inhoud: inhoud content inhalt
+ inhouden: inhouden contents inhalte
+
+ bijlage: bijlage appendix anhang
+ bijlagen: bijlagen appendices anhaenge
+ hoofdtekst: hoofdtekst maintext haupttext
+ hoofdteksten: hoofdteksten maintexts haupttexte
+ inleiding: inleiding introduction einleitung
+ inleidingen: inleidingen introductions einleitungen
+ uitleiding: uitleiding extroduction epilog
+ uitleidingen: uitleidingen extroductions epiloge
+
+ voetnoot: voetnoot footnote fussnote
+
+ systeem: systeem system systeme
+
+\stopvariables
+
+\startvariables dutch english german
+
+ typen: typen typing tippen
+ file: file file datei
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D As we can see below, there are some more variables needed,
+%D for instance for the definition of macro's for handling
+%D floating bodies.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ formule: formule formula formel
+ formules: formules formulas formeln
+
+ figuur: figuur figure abbildung
+ figuren: figuren figures abbildungen
+ tabel: tabel table tabelle
+ tabellen: tabellen tables tabellen
+ grafiek: grafiek graphic grafik
+ grafieken: grafieken graphics grafiken
+ intermezzo: intermezzo intermezzo intermezzo
+ intermezzos: intermezzos intermezzos intermezzi
+
+ index: index index index
+ indices: indices indices indizies
+
+ afkorting: afkorting abbreviation abkuerzung
+ afkortingen: afkortingen abbreviations abkuerzungen
+ logo: logo logo logo
+ logos: logos logos logos
+ eenheid: eenheid unit einheit
+ eenheden: eenheden units einheiten
+
+ regel: regel line zeile
+ regels: regels lines zeilen
+
+ framedtext: kadertekst framedtext umrahmtertext
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D The setup commands can take a lot of different arguments,
+%D often in the form \type{variable=value}. Here we define the
+%D variable part. Keep in mind that for the system, user defined
+%D variables have a constant character.
+
+%D \startcompressdefinitions
+
+\startconstants dutch english german
+
+ leftquotation: linkercitaat leftquotation linkerzitat
+ rightquotation: rechtercitaat rightquotation rechterzitat
+ leftquote: linkerciteer leftquote linkerzitieren
+ rightquote: rechterciteer rightquote rechterzitieren
+ leftsentence: linkerzin leftsentence linkersatz
+ rightsentence: rechterzin rightsentence rechtersatz
+ leftsubsentence: linkersubzin leftsubsentence linkersubsatz
+ rightsubsentence: rechtersubzin rightsubsentence rechtersubsatz
+
+ datum: datum date datum
+
+ aan: aan to zu
+ aanduiding: aanduiding indicator indikator
+ achtergrond: achtergrond background hintergrund
+ achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe
+ achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset
+ achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel
+ achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius
+ achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe
+ achtergrondraster: achtergrondraster backgroundscreen hintergrundraster
+ adres: adres address adresse
+ afmeting: afmeting size abmessung
+ afsluiter: afsluiter stopper abschnitttrenner
+ afstand: afstand distance abstand
+ assenstelsel: assenstelsel axis achsen
+ auteur: auteur author autor
+ balanceren: balanceren balance ausgleichen
+ bfactor: bfactor wfactor bfaktor
+ binnen: binnen inner innen
+ bladzijde: bladzijde page seite
+ blanko: blanko blank blanko
+ blokkade: blokkade obstruction gesperrt
+ blokwijze: blokwijze blockway blockauf
+ boven: boven top oben
+ bovenafstand: bovenafstand topdistance obenabstand
+ bovenkader: bovenkader topframe obenrahmen
+ bovenoffset: bovenoffset topoffset obenoffset
+ bovenstatus: bovenstatus topstatus statusoben
+ breedte: breedte width breite
+ bron: bron source quelle
+ commando: commando command befehl
+ commandos: commandos commands befehle
+ conversie: conversie conversion konversion
+ criterium: criterium criterium kriterium
+ datum: datum date datum
+ default: default default norm
+ diepte: diepte depth tiefe
+ dieptecorrectie: dieptecorrectie depthcorrection tiefekorrektur
+ dikte: dikte thickness dicke
+ doorgaan: doorgaan continue fortsetzen
+ dubbelzijdig: dubbelzijdig doublesided doppelseitig
+ dummy: dummy dummy dummy
+ eenheid: eenheid unit einheit
+ eigennummer: eigennummer ownnumber eigenenummer
+ contrastkleur: contrastkleur contrastcolor kontrastfarbe
+ expansie: expansie expansion expansion
+ factor: factor factor faktor
+ file: file file datei
+ formaat: formaat size groesse
+ gebied: gebied directory verzeichnis
+ groot: groot big gross
+ haal: haal get hole
+ hang: hang hang haengend
+ hfactor: hfactor hfactor hfaktor
+ hoek: hoek corner winkel
+ hoffset: hoffset hoffset hoffset
+ hokjes: hokjes frames umrahmen
+ hoofd: hoofd header kopfzeile
+ hoofdafstand: hoofdafstand headerdistance kopfzeilenabstand
+ hoofdstatus: hoofdstatus headerstatus kopfzeilenstatus
+ hoogte: hoogte height hoehe
+ huidige: huidige current aktuell
+ in: in in in
+ interactie: interactie interaction interaktion
+ inspringen: inspringen indenting einziehen
+ items: items items posten
+ kader: kader frame rahmen
+ kaderkleur: kaderkleur framecolor rahmenfarbe
+ kaderoffset: kaderoffset frameoffset rahmenoffset
+ kaderdiepte: kaderdiepte framedepth rahmentiefe
+ kaderhoek: kaderhoek framecorner rahmenwinkel
+ kaderstraal: kaderstraal frameradius rahmenradius
+ kantlijn: kantlijn marginedge marginal
+ kantlijntekst: kantlijntekst marginedgetext marginaltext
+ klein: klein small klein
+ kleur: kleur color farbe
+ kolom: kolom column spalte
+ kolomafstand: kolom columndistance spaltenabstand
+ kopkleur: kopkleur headcolor kopffarbe
+ kopletter: kopletter headstyle kopfschrift
+ kopna: kopna afterhead nachkopf
+ kopoffset: kopoffset topoffset kopfoffset
+ koppeling: koppeling coupling verknuepfung
+ kopvoor: kopvoor beforehead vorkopf
+ kopwit: kopwit topspace kopfspatium
+ korps: korps corps fliesstext
+ label: label label label
+ letter: letter style schrift
+ lijn: lijn line linie
+ lijndikte: lijndikte linethickness liniendicke
+ lijnkleur: lijnkleur linecolor linienfarbe
+ lijst: lijst list liste
+ linker: linker left linker
+ linkerbreedte: linkerbreedte leftwidth linkerbreite
+ linkerkader: linkerkader leftframe linkerrahmen
+ linkerkleur: linkerkleur leftcolor linkerfarbe
+ linkerletter: linkerletter leftstyle linkerschrift
+ linkermarge: linkermarge leftmargin linkerrand
+ linkermargeafstand: linkermargeafstand leftmargindistance linkerrandabstand
+ linkeroffset: linkeroffset leftoffset linkeroffset
+ linkerrand: linkerrand leftedge linkekante
+ linkerrandafstand: linkerrandafstand leftedgedistance linkerkantenabstand
+ linkertekst: linkertekst lefttext linkertext
+ links: links left links
+ logo: logo logo logo
+ logos: logos logos logos
+ lokaal: lokaal local lokal
+ lokale: lokale local lokal
+ lokatie: lokatie location position
+ marge: marge margin marginalie
+ margeafstand: margeafstand margindistance marginalabstand
+ margetekst: margetekst margintext marginaltext
+ markering: markering mark beschriftung
+ markleur: markleur marcolor beschrfarbe
+ marletter: marletter marstyle beschrschrift
+ menu: menu menu menue
+ methode: methode method methode
+ midden: midden middle mittig
+ middentekst: middentekst middletext mittigertext
+ min: min min min
+ monster: monster sample muster
+ na: na after nach
+ naam: naam name name
+ nacommando: nacommando commandafter zumbefehl
+ nboven: nboven ntop noben
+ niveau: niveau level niveau
+ niveaus: niveaus levels niveaus
+ nonder: nonder nbottom nunten
+ norm: norm norm norm
+ nregels: nregels nlines zzeile
+ nummer: nummer number nummer
+ nummercommando: nummercommando numbercommand nummerbefehl
+ nummeren: nummeren numbering nummerierung
+ nummerkleur: nummerkleur numbercolor nummernfarbe
+ nummerletter: nummerletter numberstyle nummernschrift
+ nummerscheider: nummerscheider numberseparator nummernseperator
+ offset: offset offset offset
+ omvang: omvang size umfang
+onbekendeverwijzing: verwijzing unknownreference unbekantereferenz
+ onder: onder bottom unten
+ onderafstand: onderafstand bottomdistance abstandunten
+ onderkader: onderkader bottomframe untenrahmen
+ onderoffset: onderoffset bottomoffset untenoffset
+ onderstatus: onderstatus bottomstatus untenstatus
+ op: op at bei
+ optie: optie option option
+ pagina: pagina page seite
+ paginacommando: paginacommando pagecommand seitenbefehl
+ paginakleur: paginakleur pagecolor seitenfarbe
+ paginaletter: paginaletter pagestyle seitenschrift
+ paginanummer: paginanummer pagenumber seitennummer
+ paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung
+ papier: papier paper papier
+ plaats: plaats location platz
+ plaatsafsluiter: plaatsafsluiter placestopper setzetrenner
+ plaatsen: plaatsen place platziere
+ plaatskop: plaatskop placehead setzekopf
+ prefix: prefix prefix prefix
+ preset: preset preset voreinstellung
+ preview: preview preview preview
+ punt: punt period punkt
+ rand: rand edge kante
+ randafstand: randafstand edgedistance kantenabstand
+ raster: raster screen raster
+ rechter: rechter right rechter
+ rechterbreedte: rechterbreedte rightwidth rechterbreite
+ rechterkader: rechterkader rightframe rechterrahmen
+ rechterkleur: rechterkleur rightcolor rechterfarbe
+ rechterletter: rechterletter rightstyle rechterschrift
+ rechtermarge: rechtermarge rightmargin rechterrand
+rechtermargeafstand: rechtermargeafstand rightmargindistance rechterrandabstand
+ rechteroffset: rechteroffset rightoffset rechterabstand
+ rechterrand: rechterrand rightedge rechtekante
+ rechterrandafstand: rechterrandafstand rightedgedistance rechterkantenabstand
+ rechtertekst: rechtertekst righttext rechtertext
+ rechts: rechts right rechts
+ refereren: refereren referencing referieren
+ regel: regel line zeile
+ regelcorrectie: regelcorrectie linecorrection zeilekorrektur
+ regels: regels lines zeilen
+ resolutie: resolutie resolution aufloesung
+ rotatie: rotatie rotation rotation
+ rugoffset: rugoffset backoffset rumpfabstand
+ rugwit: rugwit backspace rumpfspatium
+ schaal: schaal scale format
+ scheider: scheider separator seperator
+ scope: scope scope bereich
+ sectie: sectie section abschnitt
+ sectienummer: sectienummer sectionnumber abschnittsnummer
+ soort: soort family familie
+ spatie: spatie space spatium
+ spatiering: spatiering spacing spatiumausgleich
+ stap: stap step schritt
+ start: start start start
+ status: status state status
+ stop: stop stop stop
+ straal: straal radius radius
+ sub: sub sub unter
+ symbool: symbool symbol symbol
+ symkleur: symkleur symcolor symfarbe
+ symletter: symletter symstyle symschrift
+ synoniem: synoniem synonym synonym
+ synoniemkleur: synoniemkleur synonymcolor synonymfarbe
+ synoniemletter: synoniemletter synonymstyle synonymschrift
+ tab: tab tab tab
+ teken: teken sign zeichen
+ tekst: tekst text text
+ tekstcommando: tekstcommando textcommand textbefehl
+ tekstformaat: tekstformaat textsize textgroesse
+ tekstkleur: tekstkleur textcolor textfarbe
+ tekstletter: tekstletter textstyle textschrift
+ tekstscheider: tekstscheider textseparator textseparator
+ tekststatus: tekststatus textstatus textstatus
+ subtitel: subtitel subtitle untertitel
+ titel: titel title titel
+ titeluitlijnen: titeluitlijnen aligntitle titelausrichten
+ tolerantie: tolerantie tolerance toleranz
+ tussen: tussen inbetween zwischen
+ type: type type typ
+ uitlijnen: uitlijnen align ausrichtung
+ van: van from von
+ variant: variant alternative alternative
+ verhoog: verhoog increment erhoehen
+ verhoognummer: verhoognummer incrementnumber nummererhoehen
+ verwijzing: verwijzing reference referenz
+ voet: voet footer fusszeile
+ voetafstand: voetafstand footerdistance fusszeilenabstand
+ voetstatus: voetstatus footerstatus fusszeilenstatus
+ voffset: voffset voffset voffset
+ volgende: volgende next folgende
+ voor: voor before vor
+ voorcommando: voorcommando commandbefore vorigerbefehl
+ vorige: vorige previous vorige
+ vorigenummer: vorigenummer previousnumber vorigenummer
+ wijze: wijze way art
+ wit: wit white weiss
+ xmax: xmax xmax xmax
+ xschaal: xschaal xscale xformat
+ xoffset: xoffset xoffset xoffset
+ xstap: xstap xstep xschritt
+ xfactor: xfactor xfactor xfaktor
+ ymax: ymax ymax ymax
+ yschaal: yschaal yscale yformat
+ yoffset: yoffset yoffset yoffset
+ ystap: ystap ystep yschritt
+ yfactor: yfactor yfactor yfaktor
+ zij: zij side objektabstand
+ zelfdepagina: zelfdepagina samepage selbeseite
+
+\stopconstants
+
+%D \stopcompressdefinitions
+
+%D The keywords of values are very language specific and
+%D therefore variables for the systems. This list shows soem
+%D overlap with the previous one.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ aan: aan on an
+ aanelkaar: aanelkaar serried kleinerabstand
+ aansluitend: aansluitend joinedup keinabstand
+ absoluut: absoluut absolute absolut
+ afsluiter: afsluiter stopper trenner
+ achtergrond: achtergrond background hintergrund
+ alles: alles all alles
+ altijd: altijd always immer
+ beide: beide both beide
+ binnen: binnen inner innen
+ blanko: blanko blank blanko
+ blokkeer: blokkeer disable sperren
+ boven: boven top oben
+ breed: breed wide breit
+ breedte: breedte width breite
+ buiten: buiten outer aussen
+ Cijfers: Cijfers Numbers Ziffern
+ cijfers: cijfers numbers ziffern
+ commandos: commandos commands befehle
+ commando: commando command befehl
+ concept: concept concept konzept
+ dag: dag day tag
+ datum: datum date datum
+ diepte: diepte depth tiefe
+ definitief: definitief final endfassung
+ dubbelzijdig: dubbelzijdig doublesided doppelseitig
+ eerste: eerste first erste
+ elk: elk each jede
+ enkelzijdig: enkelzijdig singlesided einzelseitig
+ even: even even gerade
+ extern: extern external extern
+ flexibel: flexibel flexible flexibel
+ forceer: forceer force zwinge
+ gebruikt: gebruikt used verwende
+ geen: geen none kein
+ geenwit: geenwit nowhite keinweiss
+ globaal: globaal global global
+ groot: groot big gross
+ grotevoorkeur: grotevoorkeur bigpreference grosszuegig
+ handhaaf: handhaaf keep behalte
+ herstel: herstel fix stellewiederher
+ herhaal: herhaal repeat wiederholen
+ hier: hier here hier
+ hoofd: hoofd header kopfzeile
+ hoog: hoog high hoch
+ hoogte: hoogte height hoehe
+ horizontaal: horizontaal horizontal horizontal
+ inlinker: inlinker inleft imlinken
+ inmarge: inmarge inmargin imrand
+ inrechter: inrechter inright imrechten
+ intekst: intekst intext imtext
+ autointro: autointro autointro autointro
+ intro: intro intro intro
+ ja: ja yes ja
+ jaar: jaar year jahr
+ kader: kader frame rahmen
+ kantlijn: kantlijn marginedge marginal
+ kap: kap cap kap
+ kapitaal: kapitaal capital grossbuchstabe
+ kenmerk: kenmerk referral merkmal
+ klein: klein small klein
+ kleinnormaal: kleinnormaal smallnormal kleinnormal
+ kleinschuin: kleinschuin smallslanted kleingeneigt
+ kleinschuinvet: kleinschuinvet smallslantedbold kleingeneigtfett
+ kleintype: kleintype smalltype kleintippen
+ kleinvet: kleinvet smallbold kleinfett
+ kleinvetschuin: kleinvetschuin smallboldslanted kleinfettgeneigt
+ kleur: kleur color farbe
+ kolommen: kolommen columns spalten
+ kop: kop head kopf
+ label: label label label
+ laag: laag low tief
+ laatste: laatste last letzte
+ lang: lang tall lang
+ leeg: leeg empty leer
+ Letter: Letter Character Buchstabe
+ letter: letter character buchstabe
+ Letters: Letters Characters Buchstaben
+ letters: letters characters buchstaben
+ lijn: lijn line linie
+ linker: linker left linker
+ linkermarge: linkermarge leftmargin linkerrand
+ linkerrand: linkerrand leftedge linkekante
+ links: links left links
+ lokaal: lokaal local lokal
+ maand: maand month monat
+ MAAND: MAAND MONTH MONAT
+ mar: mar mar mar
+ marge: marge margin marginalie
+ max: max max max
+ mediaeval: mediaeval mediaeval mittelalterlich
+ middel: middel medium mittel
+ midden: midden middle mittig
+ naam: naam name name
+ naast: naast opposite gegenueber
+ nee: nee no nein
+ niet: niet not nicht
+ nooit: nooit never nie
+ normaal: normaal normal normal
+ nummer: nummer number nummer
+ onbekend: onbekend unknown unbekannt
+ onder: onder bottom unten
+ oneven: oneven odd ungerade
+ opelkaar: opelkaar packed kleinerdurchschuss
+ opmaak: opmaak markup umbruch
+ opmarge: opmarge atmargin amrand
+ overlay: overlay overlay overlay
+ pagina: pagina page seite
+ paginanummer: paginanummer pagenumber seitennummer
+ passend: passend fit passend
+ per: per by pro
+ postscript: postscript postscript postscript
+ punt: punt dot punkt
+ rand: rand edge kante
+ raster: raster screen raster
+ recht: recht right rechts
+ rechter: rechter right rechter
+ rechtermarge: rechtermarge rightmargin rechterrand
+ rechterrand: rechterrand rechterrand rechterkante
+ rechts: rechts right rechts
+ regel: regel line zeile
+ relatief: relatief relative relativ
+ reset: reset reset zuruecksetzten
+ Romeins: Romeins Romannumerals Roemischezahlen
+ romeins: romeins romannumerals roemischezahlen
+ rond: rond round rund
+ ruim: ruim broad breit
+ schuin: schuin slanted geneigt
+ schuinvet: schuinvet slantedbold geneigtfett
+ sectienummer: sectienummer sectionnumber abschnittsnummer
+ smal: smal tall schmall
+ soepel: soepel tolerant tolerant
+ standaard: standaard standard standard
+ start: start start start
+ stop: stop stop stop
+ streng: streng rigged streng
+ sub: sub sub sub
+ sym: sym sym sym
+ its: its its its
+ symbool: symbool symbol symbol
+ tekst: tekst text text
+ terug: terug backward rueckwaerts
+ test: test test test
+ type: type type tippen
+ uit: uit off aus
+ vast: vast fixed fest
+ verder: verder continue fortsetzten
+ vertikaal: vertikaal vertical vertikal
+ vet: vet bold fett
+ vetschuin: vetschuin boldslanted fettgeneigt
+ viertal: viertal quadruple viertel
+ voet: voet footer fusszeile
+ volgende: volgende next folgende
+ voorkeur: voorkeur preference einstellung
+ voorlopig: voorlopig temporary temporaer
+ vorige: vorige previous vorig
+ week: week week woche
+ weekdag: weekdag weekday wochentag
+ WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG
+ waarde: waarde value wert
+ wit: wit white weiss
+ zeer: zeer very sehr
+ zeersoepel: zeersoepel verytolerant sehrtolerant
+ zeerstreng: zeerstreng veryrigged sehrstreng
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D The next setup shows the use of the keyword \type{all}.
+%D These constants are the same for all languages.
+
+%D \startcompressdefinitions
+
+\startconstants all
+
+ dx: dx
+ dy: dy
+ nx: nx
+ ny: ny
+ n: n
+ vfil: vfil
+ hfil: hfil
+ strut: strut
+ reset: reset
+ set: set
+
+ escape: escape
+
+ apa: apa
+
+\stopconstants
+
+%D \stopcompressdefinitions
+
+%D We need some font family switching names both as constant
+%D and as variable.
+
+%D \startcompressdefinitions
+
+\startconstants dutch english german
+
+ calligrafie: calligrafie calligraphy kalligraphie
+ handschrift: handschrift handwritten handschrift
+ schreefloos: schreefloos sansserif grotesk
+ romaan: romaan roman antiqua
+ teletype: teletype teletype fernschreiber
+ type: type type tippen
+
+\stopconstants
+
+\startvariables dutch english german
+
+ calligrafie: calligrafie calligraphy kalligraphie
+ handschrift: handschrift handwritten handschrift
+ schreefloos: schreefloos sansserif grotesk
+ romaan: romaan roman antiqua
+ teletype: teletype teletype fernschreiber
+ type: type type tippen
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D All relevent commands of \CONTEXT\ are specified in a
+%D structured way that enables the generation of reference
+%D cards. This specification is setup in a language independant
+%D way. The next category of variables is only used in this
+%D context.
+
+%D \startcompressdefinitions
+
+\startsetupvariables dutch english german
+
+ doornummering: doornummering enumeration nummerierung
+ doordefinitie: doordefinitie description beschreibung
+ doorsprong: doorsprong indentation einzug
+ doorlabel: doorlabel labeling beschriften
+ samengesteldelijst: samengesteldelijst combinedlist kombiniereliste
+ sectie: sectie section abschnitt
+ register: register register register
+ synoniem: synoniem synonym synonym
+ synoniemen: synoniemen synonyms synonyme
+ sorteer: sorteer sort sortiere
+ sorteren: sorteren sorts sortieren
+ naam: naam name name
+ blok: blok block block
+ blokken: blokken blocks bloecke
+ alinea: alinea paragraphs absaetze
+ framedtext: kadertekst framedtext umrahmtertext
+
+\stopsetupvariables
+
+%D \stopcompressdefinitions
+
+%D The number of elements used for composing user defined
+%D commands is rather small. We use a \type{-} for empty
+%D elements.
+
+%D \startcompressdefinitions
+
+\startelements dutch english german
+
+ beginvan: beginvan beginof anfang
+ eindvan: eindvan endof ende
+
+ gekoppelde: gekoppelde coupled verknuepft
+ in: in - ein
+ leeg: leeg empty leer
+ lege: lege empty leer
+ laad: laad load laden
+ lijst: lijst list auflisten
+ lijstmet: lijstmet listof auflistenvon
+ opmaak: opmaak makeup umbruch
+ plaats: plaats place platziere
+ reserveer: reserveer reserve reservieren
+ start: start start start
+ stel: stel setup stelle
+ stop: stop stop stop
+ tekst: tekst text text
+ verhoog: verhoog increment erhoehen
+ volgende: volgende next folgende
+ volledige: volledige complete vollende
+ vorige: vorige previous vorige
+ zie: zie see sieh
+ tabelkop: tabelkop tablehead tabellenueberschrift
+ tabelstaart: tabelstaart tabletail tabellenende
+ formule: formule formula formel
+
+\stopelements
+
+%D \stopcompressdefinitions
+
+%D The next set of definitions is used when accessing viewer
+%D capabilities. Their foreign nature is reflected by using
+%D Capitals.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+
+ FirstPage: EerstePagina FirstPage ErsteSeite
+ PreviousPage: VorigePagina PreviousPage VorigeSeite
+ NextPage: VolgendePagina NextPage FolgendeSeite
+ LastPage: LaatstePagina LastPage LetzteSeite
+ PreviousJump: VorigeSprong PreviousJump VorigerSprung
+ NextJump: VolgendeSprong NextJump NaechsterSprung
+ SwapViewer: WisselViewer SwapViewer WechseleViewer
+ ExitViewer: VerlaatViewer ExitViewer BeendeViewer
+ CloseDocument: SluitDocument CloseDocument SchliesseDokument
+ ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe
+ PrintDocument: PrintDocument PrintDocument DruckeDokument
+ SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen
+ SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D Last we define some constants and variables that are used
+%D in the \PRAGMA\ extensions of \CONTEXT.
+
+%D \startcompressdefinitions
+
+\startconstants all
+ bet: bet
+ dat: dat
+ ken: ken
+ ref: ref
+\stopconstants
+
+\startvariables all
+ formeel: formeel
+ informeel: informeel
+ rekening: rekening
+ sticker: sticker
+ sheet: sheet
+ brief: brief
+ ls: ls
+ avery: avery
+\stopvariables
+
+%D \stopcompressdefinitions
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex new file mode 100644 index 000000000..4557a15b9 --- /dev/null +++ b/tex/context/base/mult-ini.tex @@ -0,0 +1,1150 @@ +%D \module
+%D [ file=mult-ini,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D This module implements the multi||lingual interface to
+%D \CONTEXT. These capabilities concern messages, commands and
+%D parameters.
+
+\writestatus{loading}{Context Multilingual Macros / Initialization}
+
+\unprotect
+
+%D \macros
+%D [constanten,variabelen,commandos]
+%D {v!,c!,s!,e!,m!,l!,r!,f!,p!,x!,y!}
+%D {}
+%D
+%D In the system modules we introduced some prefixed constants,
+%D variables (both macros) and registers. Apart from a
+%D tremendous saving in terms of memory and a gain in speed we
+%D use from now on prefixes when possible for just another
+%D reason: consistency and multi||linguality. Systematically
+%D using prefixed macros enables us to implement a
+%D multi||lingual user interface. Redefining these next set of
+%D prefixes therefore can have desastrous results.
+%D
+%D \startregelcorrectie
+%D \starttabel[|c|c|c|]
+%D \HL
+%D \NC \bf prefix \NC \bf meaning \NC \bf application \NC\SR
+%D \HL
+%D \NC \type{\v!prefix!} \NC v! \NC variable \NC\FR
+%D \NC \type{\c!prefix!} \NC c! \NC constant \NC\MR
+%D \NC \type{\s!prefix!} \NC s! \NC system \NC\MR
+%D \NC \type{\e!prefix!} \NC e! \NC element \NC\MR
+%D \NC \type{\m!prefix!} \NC m! \NC message \NC\MR
+%D \NC \type{\l!prefix!} \NC l! \NC language \NC\MR
+%D \NC \type{\r!prefix!} \NC r! \NC reference \NC\MR
+%D \NC \type{\f!prefix!} \NC f! \NC file \NC\MR
+%D \NC \type{\p!prefix!} \NC p! \NC procedure \NC\MR
+%D \NC \type{\x!prefix!} \NC x! \NC setup constant \NC\MR
+%D \NC \type{\y!prefix!} \NC y! \NC setup variable \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D In the single||lingual version we used \type{!}, \type{!!},
+%D \type{!!!} and \type{!!!!}.
+
+\def\v!prefix!{v!} \def\c!prefix!{c!} \def\s!prefix!{s!}
+\def\e!prefix!{e!} \def\m!prefix!{m!} \def\r!prefix!{r!}
+\def\f!prefix!{f!} \def\p!prefix!{p!} \def\x!prefix!{x!}
+\def\y!prefix!{y!} \def\l!prefix!{l!}
+
+%D \macros
+%D [constants,variables,commands]
+%D {@@,??}
+%D {}
+%D
+%D Variables generated by the system can be recognized on their
+%D prefix \type{@@}. They are composed of a command (class)
+%D specific tag, which can be recognized on \type{??}, and a
+%D system constant, which has the prefix \type{c!}. We'll se
+%D some more of this.
+
+\def\??prefix {??}
+\def\@@prefix {@@}
+
+%D Just to be complete we repeat some of the already defined
+%D system constants here. Maybe their prefix \type{\s!} now
+%D falls into place.
+
+\def\s!next {next} \def\s!default {default}
+\def\s!dummy {dummy} \def\s!unknown {unknown}
+
+\def\s!do {do} \def\s!dodo {dodo}
+
+\def\s!complex {complex} \def\s!start {start}
+\def\s!simple {simple} \def\s!stop {stop}
+
+\def\!!width {width} \def\!!plus {plus}
+\def\!!height {height} \def\!!minus {minus}
+\def\!!depth {depth}
+
+%D \macros
+%D {defineinterfaceconstant,
+%D defineinterfacevariable,
+%D defineinterfaceelement,
+%D definesystemvariable,
+%D definesystemconstant,
+%D definemessageconstant,
+%D definereferenceconstant,
+%D definefileconstant}
+%D {}
+%D
+%D The first part of this module is dedicated to dealing with
+%D multi||lingual constants and variables. When \CONTEXT\ grew
+%D bigger and bigger in terms of bytes and used string space,
+%D we switched to predefined constants. At the cost of more
+%D hash table entries, the macros not only becase more compact,
+%D they became much faster too. Maybe an even bigger advantage
+%D was that mispelling could no longer lead to problems. Even a
+%D multi||lingual interface became possible.
+%D
+%D Constants --- we'll introduce the concept of variables later
+%D on --- are preceded by a type specific prefix, followed by a
+%D \type{!}. To force consistency, we provide a few commands
+%D for defining such constants.
+%D
+%D \starttypen
+%D \defineinterfaceconstant {name} {meaning}
+%D \defineinterfacevariable {name} {meaning}
+%D \defineinterfaceelement {name} {meaning}
+%D \stoptypen
+%D
+%D Which is the same as:
+%D
+%D \starttypen
+%D \def\c!name{meaning}
+%D \def\v!name{meaning}
+%D \def\e!name{meaning}
+%D \stoptypen
+
+\def\defineinterfaceconstant #1#2{\setvalue{\c!prefix!#1}{#2}}
+\def\defineinterfacevariable #1#2{\setvalue{\v!prefix!#1}{#2}}
+\def\defineinterfaceelement #1#2{\setvalue{\e!prefix!#1}{#2}}
+
+%D Next come some interface independant constants:
+%D
+%D \starttypen
+%D \definereferenceconstant {name} {meaning}
+%D \definefileconstant {name} {meaning}
+%D \stoptypen
+
+\def\definereferenceconstant #1#2{\setvalue{\r!prefix!#1}{#2}}
+\def\definefileconstant #1#2{\setvalue{\f!prefix!#1}{#2}}
+
+%D And finaly we have the one argument, space saving constants
+%D
+%D \starttypen
+%D \definesystemconstant {name}
+%D \definemessageconstant {name}
+%D \stoptypen
+
+\def\definesystemconstant #1{\setvalue{\s!prefix!#1}{#1}}
+\def\definemessageconstant #1{\setvalue{\m!prefix!#1}{#1}}
+
+%D In a parameter driven system, some parameters are shared
+%D by more system components. In \CONTEXT\ we can distinguish
+%D parameters by a unique prefix. Such a prefix is defined
+%D with:
+%D
+%D \starttypen
+%D \definesystemvariable {name}
+%D \stoptypen
+
+\def\definesystemvariable #1{\setvalue{\??prefix#1}{\@@prefix#1}}
+
+%D \macros
+%D {selectinterface,
+%D defaultinterface, currentinterface, currentresponses}
+%D {}
+%D
+%D With \type{\selectinterface} we specify the language we are
+%D going to use. The system asks for the language wanted, and
+%D defaults to \type{\currentinterface} when we just give
+%D \type{enter}. By default the message system uses the
+%D current interface language, but \type{\currentresponses}
+%D can specify another language too.
+%D
+%D Because we want to generate formats directly too, we do
+%D not ask for interface specifications when these are already
+%D defined (like in cont-nl.tex and alike).
+
+\ifx\defaultinterface\undefined
+
+ \def\defaultinterface{dutch}
+
+ \def\selectinterface%
+ {\def\docommando##1##2%
+ {\bgroup
+ \endlinechar=-1
+ \global\read16 to ##1
+ \egroup
+ \doif{\currentinterface}{}{\let##1=##2}%
+ \doifundefined{\s!prefix!##1}{\let##1=##2}}%
+ \docommando\currentinterface\defaultinterface
+ \writestatus{interface}{defining \currentinterface\space interface}%
+ \writeline
+ \docommando\currentresponses\currentinterface
+ \writestatus{interface}{using \currentresponses\space messages}%
+ \writeline}
+
+\else
+
+ \def\selectinterface%
+ {\writestatus{interface}{defining \currentinterface\space interface}%
+ \writeline
+ \writestatus{interface}{using \currentresponses\space messages}%
+ \writeline}
+
+\fi
+
+\ifx\currentinterface\undefined \let\currentinterface=\defaultinterface \fi
+\ifx\currentresponses\undefined \let\currentresponses=\defaultinterface \fi
+
+%D \macros
+%D {startinterface}
+%D {}
+%D
+%D Sometimes we want to define things only for specific
+%D interface languages. This can be done by means of the
+%D selector:
+%D
+%D \starttypen
+%D \startinterface language
+%D
+%D language specific definitions & commands
+%D
+%D \stopinterface
+%D \stoptypen
+
+%\long\def\startinterface #1 #2\stopinterface%
+% {\doifelse{#1}{\currentinterface}
+% {\long\def\next{#2}}
+% {\let\next=\relax}%
+% \next}
+
+\def\startinterface #1
+ {\doifelse{#1}{\currentinterface}
+ {\let\next=\relax}
+ {\long\def\next##1\stopinterface{}}%
+ \next}
+
+\let\stopinterface=\relax
+
+%D \macros
+%D {startmessages,
+%D getmessage,
+%D showmessage,
+%D makemessage}
+%D {}
+%D
+%D A package as large as \CONTEXT\ can hardly function without
+%D a decent message mechanism. Due to its multi||lingual
+%D interface, the message subsystem has to be multi||lingual
+%D too. A major drawback of this feature is that we have to
+%D code messages. As a result, the source becomes less self
+%D documented. On the other hand, consistency will improve.
+%D
+%D Because the overhead in terms of entries in the (already
+%D exhausted) hash table has to be minimal, messages are packed
+%D in libraries. We can extract a message from such a library
+%D in three ways:
+%D
+%D \starttypen
+%D \getmessage {library} {tag}
+%D \showmessage {library} {tag} {data}
+%D \makemessage {library} {tag} {data}
+%D \stoptypen
+%D
+%D The first command gets the message \type{tag} from the
+%D \type{library} specified. The other commands take an extra
+%D argument: a list of items to be inserted in the message
+%D text. While \type{\showmessage} shows the message at the
+%D terminal, the other commands generate the message as text.
+%D Before we explain the \type{data} argument, we give an
+%D example of a library.
+%D
+%D \starttypen
+%D \startmessages english library: alfa
+%D title: something
+%D 1: first message
+%D 2: second (--) message --
+%D \stopmessages
+%D \stoptypen
+%D
+%D The first message is a simple one and can be shown with:
+%D
+%D \starttypen
+%D \showmessage {alfa} {1} {}
+%D \stoptypen
+%D
+%D The second message on the other hand needs some extra data:
+%D
+%D \starttypen
+%D \showmessage {alfa} {2} {and last,to you}
+%D \stoptypen
+%D
+%D This message is shown as:
+%D
+%D \starttypen
+%D something : second (and last) message to you
+%D \stoptypen
+%D
+%D As we can see, the title entry is shown with the message.
+%D The data fields are comma separated and are specified in the
+%D message text by \type{--}.
+%D
+%D It is not required to define all messages in a library at
+%D once. We can add messages to a library in the following way:
+%D
+%D \starttypen
+%D \startmessages english library: alfa
+%D 10: tenth message
+%D \stopmessages
+%D \stoptypen
+%D
+%D Because such definitions can take place in different
+%D modules, the system gives a warning when a tag occurs more
+%D than once. The first occurrence takes preference over later
+%D ones, so we had better use a save offset, as shown in the
+%D example. As we can see, the title field is specified only
+%D the first time!
+%D
+%D Because we want to check for duplicate tags, the macros
+%D are a bit more complicated than neccessary. The \NEWLINE\
+%D token is used as message separator.
+
+\def\findinterfacemessage#1#2%
+ {\def#2{}%
+ \def\dofindinterfacemessage##1 #1: ##2\relax##3\end%
+ {\def#2{##2}}%
+ \edef\!!stringa{\getvalue{@@ms\currentmessagelibrary} #1: \relax}%
+ \expandafter\dofindinterfacemessage\!!stringa\end}
+
+\def\composemessagetext#1--#2--#3--#4--#5--#6\\%
+ {\def\docomposemessagetext##1,##2,##3,##4,##5,##6\\%
+ {\edef\currentmessagetext{#1##1#2##2#3##3#4##4#5##5}}%
+ \docomposemessagetext}
+
+\unexpanded\def\getmessage#1#2%
+ {\def\currentmessagelibrary{#1}%
+ \findinterfacemessage{#2}\currentmessagetext
+ \currentmessagetext}
+
+\unexpanded\def\makemessage#1#2#3%
+ {\def\currentmessagelibrary{#1}%
+ \findinterfacemessage{#2}\currentmessagetext
+ \@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\%
+ \currentmessagetext}
+
+\def\showmessage#1#2#3%
+ {\def\currentmessagelibrary{#1}%
+ \findinterfacemessage{#2}\currentmessagetext
+ \findinterfacemessage{title}\currentmessagetitle
+ \doifelse{\currentmessagetext}{}
+ {\def\currentmessagetext{<unknown message #2>}}
+ {\@EA\composemessagetext\currentmessagetext----------\\#3,,,,,\\}%
+ \@EA\writestatus\@EA{\currentmessagetitle}{\currentmessagetext}}
+
+\def\doaddinterfacemessage#1#2%
+ {\findinterfacemessage{#1}\currentmessagetext
+ \doifelse{\currentmessagetext}{}
+ {\setxvalue{@@ms\currentmessagelibrary}%
+ {\getvalue{@@ms\currentmessagelibrary} #1: #2\relax}}
+ {\debuggerinfotrue % we consider this an important error
+ \debuggerinfo
+ {message}
+ {duplicate tag #1
+ in library \currentmessagelibrary\space
+ of interface \currentresponses}
+ \wait}%
+ \futurelet\next\getinterfacemessage}
+
+\bgroup
+\obeylines
+\gdef\addinterfacemessage#1: #2
+ {\doaddinterfacemessage{#1}{#2}}%
+\egroup
+
+\def\getinterfacemessage%
+ {\ifx\next\stopmessages
+ \def\next##1{\egroup}%
+ \else
+ \let\next=\addinterfacemessage
+ \fi
+ \next}
+
+\gdef\startmessages #1 library: #2
+ {\bgroup
+ \obeylines
+ \doifinsetelse{#1}{\currentresponses,all}
+ {\def\next%
+ {\def\currentmessagelibrary{#2}%
+ \doifundefined{@@ms\currentmessagelibrary}
+ {\setgvalue{@@ms\currentmessagelibrary}{}}%
+ \futurelet\next\getinterfacemessage}}
+ {\long\def\next##1\stopmessages{\egroup}}%
+ \next}
+
+%D \macros
+%D {ifshowwarnings, ifshowmessages}
+%D
+%D Sometimes displaying message can slow down processing
+%D considerably. We therefore introduce warnings. Users can
+%D turn of warnings and messages by saying:
+%D
+%D \starttypen
+%D \showwarningstrue
+%D \showmessagestrue
+%D \stoptypen
+%D
+%D Turning off messages also turns off warnings, which is
+%D quote logical because they are less important.
+
+\newif\ifshowwarnings \showwarningstrue
+\newif\ifshowmessages \showmessagestrue
+
+\let\normalshowmessage=\showmessage
+
+\def\showwarning%
+ {\ifshowwarnings
+ \expandafter\showmessage
+ \else
+ \expandafter\gobblethreearguments
+ \fi}
+
+\def\showmessage%
+ {\ifshowmessages
+ \expandafter\normalshowmessage
+ \else
+ \expandafter\gobblethreearguments
+ \fi}
+
+%D \macros
+%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue,
+%D dogetvalue}
+%D {}
+%D
+%D We already defined these auxiliary macros in the system
+%D modules. Starting with this module however, we have to take
+%D multi||linguality a bit more serious.
+%D
+%D First we show a well||defined alternative:
+%D
+%D \starttypen
+%D \def\dosetvalue#1#2#3%
+%D {\doifdefinedelse{\c!prefix!#2}
+%D {\setvalue{#1\getvalue{\c!prefix!#2}}{#3}}
+%D {\setvalue{#1#2}{#3}}}
+%D
+%D \def\docopyvalue#1#2#3%
+%D {\doifdefinedelse{\c!prefix!#3}
+%D {\setvalue{#1\getvalue{\c!prefix!#3}}%
+%D {\getvalue{#2\getvalue{\c!prefix!#3}}}}
+%D {\setvalue{#1#3}%
+%D {\getvalue{#2#3}}}}
+%D
+%D \def\dogetvalue#1#2%
+%D {\getvalue{#1\getvalue{\c!prefix!#2}}}
+%D \stoptypen
+%D
+%D These macros are called upon quite often and so we optimized
+%D them a bit.
+
+\def\dosetvalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#2}%
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1#2\endcsname{#3}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\dosetevalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#2}%
+ \let\donottest=\doprocesstest
+ \@EA\edef\csname#1#2\endcsname{#3}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\docopyvalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#3}%
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1#3\endcsname%
+ {\csname#2#3\endcsname}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\def\csname#1\csname\c!prefix!#3\endcsname\endcsname%
+ {\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \fi}
+
+\def\doresetvalue#1#2%
+ {\dosetvalue{#1}{#2}{}}
+
+\def\dogetvalue#1#2%
+ {\csname#1\csname\c!prefix!#2\endcsname\endcsname}
+
+%D Although maybe bot clearly visible, there is a
+%D considerable profit in further optimalization. By expanding
+%D the embedded \type{\csname} we can reduce the format file
+%D by about 5\% (60~KB out of 1.9~MB).
+
+\def\docopyvalue#1#2#3%
+ {\p!doifundefined{\c!prefix!#3}%
+ \let\donottest=\doprocesstest
+ \@EA\@EA\@EA\def\@EA\csname\@EA#1\@EA#3\@EA\endcsname
+ \@EA{\csname#2#3\endcsname}%
+ \else
+ \let\donottest=\doprocesstest
+ \@EA\@EA\@EA\def\@EA
+ \csname
+ \@EA#1\@EA\csname\@EA\c!prefix!\@EA#3\@EA\endcsname\@EA
+ \endcsname
+ \@EA{\csname#2\csname\c!prefix!#3\endcsname\endcsname}%
+ \fi}
+
+%D We take this opportunity of redefining to adapt an
+%D assignment macro. The change has to do with the fact that the
+%D generated error message must be multi||lingual. We can not
+%D define the message yet, because we still have to select the
+%D interface language.
+
+%\def\p!doassign#1[#2][#3=#4=#5]%
+% {\let\donottest=\dontprocesstest
+% \edef\!!stringa{#5}%
+% \edef\!!stringb{\relax}%
+% \let\donottest=\doprocesstest
+% \ifx\!!stringa\!!stringb
+% \showmessage{check}{1}{#3,\the\inputlineno}%
+% \else
+% #1{#2}{#3}{#4}%
+% \fi}
+
+\def\p!doassign#1[#2][#3=#4=#5]%
+ {\ifx\empty#3\else % and definitely not \ifx#3\empty
+ \ifx\relax#5%
+ \showmessage{check}{1}{#3,\the\inputlineno}%
+ \else
+ #1{#2}{#3}{#4}%
+ \fi
+ \fi}
+
+\def\dogetargument#1#2#3#4%
+ {\doifnextcharelse{#1}
+ {\let\expectedarguments=\noexpectedarguments
+ #3\dodogetargument}
+ {\ifnum\expectedarguments>\noexpectedarguments
+ \showmessage{check}{2}{\the\expectedarguments,\the\inputlineno}%
+ \fi
+ \let\expectedarguments=\noexpectedarguments
+ #4\dodogetargument#1#2}}
+
+\def\dogetgroupargument#1#2%
+ {\def\nextnextargument%
+ {\ifx\nextargument\bgroup
+ \let\expectedarguments=\noexpectedarguments
+ \def\nextargument{#1\dodogetargument}%
+ %\else\ifx\nextargument\lineending % this can be an option
+ % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}%
+ %\else\ifx\nextargument\blankspace % but may never be default
+ % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}%
+ \else
+ \ifnum\expectedarguments>\noexpectedarguments
+ \showmessage{check}{2}{\the\expectedarguments,\the\inputlineno}%
+ \fi
+ \let\expectedarguments=\noexpectedarguments
+ \def\nextargument{#2\dodogetargument{}}%
+ \fi%\fi\fi % so let's get rid of it
+ \nextargument}%
+ \futurelet\nextargument\nextnextargument}
+
+\def\checkdefined#1#2#3%
+ {\doifdefined{#3}
+ {\showmessage{check}{3}{#2,#3}}}
+
+%D \CONTEXT\ is a parameter driven package. This means that
+%D users instruct the system by means of variables, values and
+%D keywords. These instructions take the form:
+%D
+%D \starttypen
+%D \setupsomething[some variable=some value, another one=a keyword]
+%D \stoptypen
+%D
+%D or by keyword only:
+%D
+%D \starttypen
+%D \dosomething[this way, that way, no way]
+%D \stoptypen
+%D
+%D Because the same variables can occur in more than one setup
+%D command, we have to be able to distinguish them. This is
+%D achieved by assigning them a unique prefix.
+%D
+%D Imagine a setup command for boxed text, that enables us to
+%D specify the height and width of the box. Behide the scenes
+%D the command
+%D
+%D \starttypen
+%D \setupbox [width=12cm, height=3cm]
+%D \stoptypen
+%D
+%D results in something like
+%D
+%D \starttypen
+%D \<box><width> {12cm}
+%D \<box><height> {3cm}
+%D \stoptypen
+%D
+%D while a similar command for specifying the page dimensions
+%D of an \kap{A4} page results in:
+%D
+%D \starttypen
+%D \<page><width> {21.0cm}
+%D \<page><height> {27.9cm}
+%D \stoptypen
+%D
+%D The prefixes \type{<box>} and \type{<page>} are hidden from
+%D users and can therefore be language independant. Variables
+%D on the other hand, differ for each language:
+%D
+%D \starttypen
+%D \<box><color> {<blue>}
+%D \<box><kleur> {<blauw>}
+%D \<box><couleur> {<blue>}
+%D \stoptypen
+%D
+%D In this example we can see that the assigned values or
+%D keywords are language dependant too. This will be a
+%D complication when defining multi||lingual setup files.
+%D
+%D A third phenomena is that variables and values can have a
+%D similar meaning.
+%D
+%D \starttypen
+%D \<pagenumber><location> {<left>}
+%D \<skip><left> {12cm}
+%D \stoptypen
+%D
+%D A (minor) complication is that where in english we use
+%D \type{<left>}, in dutch we find both \type{<links>} and
+%D \type{<linker>}. This means that when we use some sort of
+%D translation table, we have to distinguish between the
+%D variables at the left side and the fixed values at the
+%D right.
+%D
+%D The same goes for commands that are composed of different
+%D user supplied and/or language specific elements. In english
+%D we can use:
+%D
+%D \starttypen
+%D \<empty><figure>
+%D \<empty><intermezzo>
+%D \stoptypen
+%D
+%D But in dutch we have the following:
+%D
+%D \starttypen
+%D \<lege><figuur>
+%D \<leeg><intermezzo>
+%D \stoptypen
+%D
+%D These subtle differences automatically lead to a solution
+%D where variables, values, elements and other components have
+%D a similar logical name (used in macro's) but a different
+%D meaning (supplied by the user).
+%D
+%D Our solution is one in which the whole system is programmed
+%D in terms of identifiers with language specific meanings. In
+%D such an implementation, each fixed variable is available as:
+%D
+%D \starttypen
+%D \<prefix><variable>
+%D \stoptypen
+%D
+%D This means that for instance:
+%D
+%D \starttypen
+%D \setupbox[width=12cm]
+%D \stoptypen
+%D
+%D expands to something like:
+%D
+%D \starttypen
+%D \def\boxwidth{12cm}
+%D \stoptypen
+%D
+%D because we don't want to recode the source, a setup command
+%D in another language has to expand to this variable, so:
+%D
+%D \starttypen
+%D \stelblokin[breedte=12cm]
+%D \stoptypen
+%D
+%D has to result in the definition of \type{\boxwidth} too.
+%D This method enables us to build compact, fast and readable
+%D code.
+%D
+%D An alternative method, which we considered using, uses a
+%D more indirect way. In this case, both calls generate a
+%D different variable:
+%D
+%D \starttypen
+%D \def\boxwidth {12cm}
+%D \def\boxbreedte {12cm}
+%D \stoptypen
+%D
+%D And because we don't want to recode those megabytes of
+%D already developed code, this variable has to be called with
+%D something like:
+%D
+%D \starttypen
+%D \valueof\box\width
+%D \stoptypen
+%D
+%D where \type{\valueof} takes care of the translation of
+%D \type{width} or \type{breedte} to \type{width} and
+%D combining this with \type{box} to \type{\boxwidth}.
+%D
+%D One advantage of this other scheme is that, within certain
+%D limits, we can implement an interface that can be switched
+%D to another language at will, while the current approach
+%D fixes the interface at startup. There are, by the way,
+%D other reasons too for not choosing this scheme. Switching
+%D user generated commands is for instance impossible and a
+%D dual interface would therefore give a strange mix of
+%D languages.
+%D
+%D Now let's work out the first scheme. Although the left hand
+%D of the assignment is a variable from the users point of
+%D view, it is a constant in terms of the system. Both
+%D \type{width} and \type{breedte} expand to \type{width}
+%D because in the source we only encounter \type{width}. Such
+%D system constants are presented as
+%D
+%D \starttypen
+%D \c!width
+%D \stoptypen
+%D
+%D This constant is always equivalent to \type{width}. As we
+%D can see, we use \type{c!} to mark this one as constant. Its
+%D dutch counterpart is:
+%D
+%D \starttypen
+%D \c!breedte
+%D \stoptypen
+%D
+%D When we interpret a setup command each variable is
+%D translated to it's \type{c!} counterpart. This means that
+%D \type{breedte} and \type{width} expand to \type{\c!breedte}
+%D and \type{\c!width} which both expand to \type{width}. That
+%D way user variables become system constants.
+%D
+%D The interpretation is done by means of a general setup
+%D command \type{\getparameters} that we introduced in the
+%D system module. Let us define some simple setup command:
+%D
+%D \starttypen
+%D \def\setupbox[#1]%
+%D {\getparameters[\??bx][#1]}
+%D \stoptypen
+%D
+%D This command can be used as:
+%D
+%D \starttypen
+%D \setupbox [width=3cm, height=1cm]
+%D \stoptypen
+%D
+%D Afterwards we have two variables \type{\@@bxwidth} and
+%D \type{\@@bxheight} which have the values \type{3cm} and
+%D \type{1cm} assigned. These variables are a combinatiom of
+%D the setup prefix \type{\??bx}, which expands to \type{@@bx}
+%D and the translated user supplied variables \type{width} and
+%D \type{height} or \type{breedte} and \type{hoogte},
+%D depending on the actual language. In dutch we just say:
+%D
+%D \starttypen
+%D \stelblokin [breedte=3cm, hoogte=1cm]
+%D \stoptypen
+%D
+%D and get ourselves \type{\@@bxwidth} and \type{\@@bxheight}
+%D too. In the source of \CONTEXT, we can recognize constants
+%D and variables on their leading \type{c!}, \type{v!} etc.,
+%D prefixes on \type{??} and composed variables on \type{@@}.
+%D
+%D We already saw that user supplied keywords need some
+%D special treatment too. This time we don't translate the
+%D keyword, but instead use in the source a variable which
+%D meaning depends on the interface language.
+%D
+%D \starttypen
+%D \v!left
+%D \stoptypen
+%D
+%D Which can be used in macro's like:
+%D
+%D \starttypen
+%D \processaction
+%D [\@@bxlocation]
+%D [ \v!left=>\dosomethingontheleft,
+%D \v!middle=>\dosomthinginthemiddle,
+%D \v!right=>\dosomethingontheright]
+%D \stoptypen
+%D
+%D Because variables like \type{\@@bxlocation} can have a lot
+%D of meanings, including tricky expandable tokens, we cannot
+%D translate this meaning when we compare. This means that
+%D \type{\@@bxlocation} can be \type{left} of \type{links} of
+%D whatever meaning suits the language. But because
+%D \type{\v!left} also has a meaning that suits the language,
+%D we are able to compare.
+%D
+%D Although we know it sounds confusing we want to state two
+%D important characteristics of the interface as described:
+%D
+%D \startsmaller \em
+%D user variables become system constants
+%D \stopsmaller
+%D
+%D and
+%D
+%D \startsmaller \em
+%D user constants (keywords) become system variables
+%D \stopsmaller
+%D
+
+%D \macros
+%D {startconstants,startvariables}
+%D {}
+%D
+%D It's time to introduce the macro's that are responsible for
+%D this translations process, but first we show how constants
+%D and variables are defined. We only show two languages and
+%D a few words.
+%D
+%D \starttypen
+%D \startconstants english dutch
+%D
+%D width: width breedte
+%D height: height hoogte
+%D
+%D \stopconstants
+%D \stoptypen
+%D
+%D Keep in mind that what users see as variables, are constants
+%D for the system.
+%D
+%D \starttypen
+%D \startvariables english dutch
+%D
+%D location: left links
+%D text: text tekst
+%D
+%D \stopvariables
+%D \stoptypen
+%D
+%D The macro's responsible for interpreting these setups are
+%D shared. They take care of empty lines and permit a more or
+%D less free format. All setups accept the keyword \type{all}
+%D which equals every language.
+
+\def\nointerfaceobject{-}
+
+\def\startinterfaceobjects#1#2%
+ {\!!counta=1
+ \let\dogetinterfaceobject=\dogetinterfacetemplate
+ \let\dowithinterfaceelement=#1%
+ \def\dodogetinterfaceobjects%
+ {\ifx\next#2%
+ \def\next####1%
+ {}%
+ \else\ifx\next\par
+ \long\def\next####1%
+ {\dogetinterfaceobjects}%
+ \else\ifx\next\empty
+ \def\next####1%
+ {\dogetinterfaceobjects}%
+ \else
+ \def\next####1 %
+ {\dogetinterfaceobject[####1:\relax]%
+ \dogetinterfaceobjects}%
+ \fi\fi\fi
+ \next}%
+ \def\dogetinterfaceobjects%
+ {\futurelet\next\dodogetinterfaceobjects}%
+ \dogetinterfaceobjects}
+
+\def\dogetinterfacetemplate[#1:#2]%
+ {\doifinsetelse{#1}{\currentinterface,all}
+ {\let\dogetinterfaceobject=\doskipinterfaceobject}
+ {\advance\!!counta by 1\relax}}
+
+\def\doskipinterfaceobject[#1:#2#3]%
+ {\if#2:%
+ \let\dogetinterfaceobject=\dogetinterfaceelement
+ \dogetinterfaceobject[#1:#2#3]%
+ \fi}
+
+\def\dogetinterfaceelement[#1:#2#3]%
+ {\ifx#2:%
+ \!!countb=0
+ \def\!!stringa{#1}%
+ \else
+ \advance\!!countb by 1
+ \ifnum\!!countb=\!!counta
+ \@EA\dowithinterfaceelement\@EA{\!!stringa}{#1}%
+ \let\dogetinterfaceobject=\doskipinterfaceobject
+ \fi
+ \fi}
+
+%D The constants and variables are defined as described. When
+%D \type{\interfacetranslation} is \type{true}, we also
+%D generate a reverse translation. Because we don't want to put
+%D too big a burden on \TEX's hash table, this is no default
+%D behavior. Reverse translation is used in the commands that
+%D generate the quick reference cards. We are going to define
+%D the real \CONTEXT\ commands in an abstract way and generate
+%D those reference cards for each language without further
+%D interference.
+
+\def\setinterfaceconstant#1#2%
+ {\setvalue{\c!prefix!#1}{#1}%
+ \doifelse{#2}{\nointerfaceobject}
+ {\debuggerinfo{constant}{#1 defined as #1 by default}}
+ {\debuggerinfo{constant}{#1 defined as #2}%
+ \ifinterfacetranslation
+ \setvalue{\x!prefix!#1}{#2}%
+ \fi
+ \setvalue{\c!prefix!#2}{#1}}}
+
+\def\setinterfacevariable#1#2%
+ {\doifelse{#2}{\nointerfaceobject}
+ {\debuggerinfo{variable}{#1 defined as #1 by default}%
+ \setvalue{\v!prefix!#1}{#1}}
+ {\debuggerinfo{variable}{#1 defined as #2}%
+ \setvalue{\v!prefix!#1}{#2}}}
+
+\def\startvariables%
+ {\startinterfaceobjects\setinterfacevariable\stopvariables}
+
+\def\startconstants%
+ {\startinterfaceobjects\setinterfaceconstant\stopconstants}
+
+%D \macros
+%D {defineinterfaceconstant}
+%D
+%D Next we redefine a previously defined macro to take care of
+%D interface translation too. It's a bit redundant, because
+%D in thise situations we could use the c||version, but for
+%D documentation purposes the x||alternative comes in handy.
+
+\def\defineinterfaceconstant#1#2%
+ {\setvalue{\c!prefix!#1}{#2}%
+ \ifinterfacetranslation
+ \setvalue{\x!prefix!#1}{#2}%
+ \fi}
+
+%D \macros
+%D {startinterfacesetupconstant}
+%D {}
+%D
+%D The next command, \type{\startinterfacesetupconstant}, which
+%D behavior also depends on the boolean, is used for constants
+%D that are only needed in these quick reference macro's. The
+%D following, more efficient approach does not work here,
+%D because it sometimes generates spaces.
+%D
+%D \starttypen
+%D \def\setinterfacesetupconstant%
+%D {\ifinterfacetranslation
+%D \expandafter\setinterfaceconstant
+%D \fi}
+%D \stoptypen
+%D
+%D We therefore use the more redundant but robust method:
+
+\def\setinterfacesetupvariable#1#2%
+ {\ifinterfacetranslation
+ \doifelse{#2}{\nointerfaceobject}
+ {\setvalue{\y!prefix!#1}{#1}}
+ {\setvalue{\y!prefix!#1}{#2}}%
+ \fi}
+
+\def\startsetupvariables%
+ {\startinterfaceobjects\setinterfacesetupvariable\stopsetupvariables}
+
+%D \macros
+%D {startelements}
+%D {}
+%D
+%D Due to the object oriented nature of \CONTEXT, we also need
+%D to define the elements that are used to build commands:
+%D
+%D \starttypen
+%D \startelements english dutch
+%D
+%D beginof: beginof beginvan
+%D eindof: endof eindvan
+%D start: start start
+%D stop: stop stop
+%D
+%D \stopelements
+%D \stoptypen
+%D
+%D Such elements sometimes are the same in diferent
+%D languages, but mostly they differ. Things can get even
+%D confusing when we look at for instance the setup commands.
+%D In english we say \type{\setup<something>}, but in dutch we
+%D have: \type{\stel<iets>in}. Such split elements are no
+%D problem, because we just define two elements. When no second
+%D part is needed, we use a \type{-}:
+%D
+%D \starttypen
+%D \startelements english dutch
+%D
+%D setupa: setup stel
+%D setupb: - in
+%D
+%D \stopelements
+%D \stoptypen
+%D
+%D Element translation is realized by means of:
+
+\def\setinterfaceelement#1#2%
+ {\doifelse{#2}{\nointerfaceobject}
+ {\debuggerinfo{element}{#1 defined as <empty>}%
+ \setvalue{\e!prefix!#1}{}}
+ {\doifdefinedelse{\e!prefix!#1}
+ {\doifnot{\getvalue{\e!prefix!#1}}{#2}
+ {\debuggerinfo{element}{#1 redefined as #2}%
+ \setvalue{\e!prefix!#1}{#2}}}
+ {\debuggerinfo{element}{#1 defined as #2}%
+ \setvalue{\e!prefix!#1}{#2}}}}
+
+\def\startelements%
+ {\startinterfaceobjects\setinterfaceelement\stopelements}
+
+%D \macros
+%D {startcommands}
+%D {}
+%D
+%D The last setup has to do with the commands themselve.
+%D Commands are defined as:
+%D
+%D \starttypen
+%D \startcommands english dutch
+%D
+%D starttekst: starttext starttekst
+%D stoptekst: stoptext stoptekst
+%D omlijnd: framed omlijnd
+%D margewoord: marginword margewoord
+%D
+%D \stopcommands
+%D \stoptypen
+%D
+%D Here we also have to take care of the optional translation
+%D needed for reference cards.
+
+\def\setinterfacecommand#1#2%
+ {\doifelse{#2}{\nointerfaceobject}
+ {\debuggerinfo{command}{no link to #1}%
+ \setinterfacesetupvariable{#1}{#1}}
+ {\doifelse{#1}{#2}
+ {\debuggerinfo{command}{#1 remains #1}}
+ {\doifdefinedelse{#2}
+ {\debuggerinfo{command}{core command #2 redefined as #1}}%
+ {\debuggerinfo{command}{#2 defined as #1}}%
+ \@EA\@EA\@EA\def\@EA\csname\@EA#2\@EA\endcsname
+ \@EA{\csname#1\endcsname}}%
+ \setinterfacesetupvariable{#1}{#2}}}
+
+\def\startcommands%
+ {\startinterfaceobjects\setinterfacecommand\stopcommands}
+
+%D \macros
+%D {getinterfaceconstant, getinterfacevariable}
+%D {}
+%D
+%D Generating the interface translation macro's that are used
+%D in the reference lists, is enabled by setting the boolean:
+%D
+%D \starttypen
+%D \interfacetranslationtrue
+%D \stoptypen
+%D
+%D Keep in mind that enabling interfacetranslation costs a
+%D bit of hash space.
+
+\newif\ifinterfacetranslation
+
+\def\getinterfaceconstant#1%
+ {\ifinterfacetranslation
+ \doifdefinedelse{\x!prefix!#1}
+ {\getvalue{\x!prefix!#1}}
+ {#1}%
+ \else
+ #1%
+ \fi}
+
+\def\getinterfacevariable#1%
+ {\ifinterfacetranslation
+ \doifdefinedelse{\y!prefix!#1}
+ {\getvalue{\y!prefix!#1}}
+ {#1}%
+ \else
+ #1%
+ \fi}
+
+%D When a reference list is generated, one does not need to
+%D generate a new format. Just reloading the relevant
+%D definition files suits:
+%D
+%D \starttypen
+%D \interfacetranslationtrue
+%D \input mult-con
+%D \input mult-com
+%D \stoptypen
+
+%D \macros
+%D {interfaced}
+%D {}
+%D
+%D The setup commands translate the constants automatically.
+%D When we want to translate 'by hand' we can use the simple
+%D but effective command:
+%D
+%D \starttypen
+%D \interfaced {something}
+%D \stoptypen
+%D
+%D Giving \type{\interfaced{breedte}} results in \type{width}
+%D or, when not defined, in \type{breedte} itself.
+
+\def\interfaced#1%
+ {\expandafter\ifx\csname\c!prefix!#1\endcsname\relax
+ #1%
+ \else
+ \csname\c!prefix!#1\endcsname
+ \fi}
+
+%D So much for the basic multi||lingual interface commands. The
+%D macro's can be enhanced with more testing facilities, but
+%D for the moment they suffice.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex new file mode 100644 index 000000000..c98ec0dd2 --- /dev/null +++ b/tex/context/base/mult-sys.tex @@ -0,0 +1,553 @@ +%D \module
+%D [ file=mult-sys,
+%D version=1996.06.01,
+%D title=\CONTEXT\ Multilingual Macros,
+%D subtitle=System,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D In boring module we define a lot of obscure but useful
+%D system constants. By doing so we save lots of memory while
+%D at the same time we prevent ourself from typing errors.
+
+\writestatus{loading}{Context Multilingual Macros / System}
+
+\unprotect
+
+%D The constants are grouped in such a way that there is a
+%D minimal change of conflicts.
+%D
+%D \starttypen
+%D \definesystemconstants {word}
+%D \definemessageconstant {word}
+%D \stoptypen
+%D
+%D This commands generate \type{\s!word} and \type{\m!word}.
+
+%D First we define some system constants used for both the
+%D multi||lingual interface and multi||linguag typesetting.
+
+\definesystemconstant {dutch} \definesystemconstant {nl}
+\definesystemconstant {english} \definesystemconstant {en}
+\definesystemconstant {french} \definesystemconstant {fr}
+\definesystemconstant {german} \definesystemconstant {de}
+\definesystemconstant {spanish} \definesystemconstant {sp}
+\definesystemconstant {italian} \definesystemconstant {it}
+\definesystemconstant {danish} \definesystemconstant {da}
+\definesystemconstant {portuguese} \definesystemconstant {pt}
+\definesystemconstant {swedish} \definesystemconstant {sv}
+\definesystemconstant {polish} \definesystemconstant {pl}
+\definesystemconstant {finish} \definesystemconstant {fi}
+\definesystemconstant {afrikaans} \definesystemconstant {af}
+\definesystemconstant {norwegian} \definesystemconstant {no}
+\definesystemconstant {turkish} \definesystemconstant {tr}
+
+%D As the name of their define command states, the next set of
+%D constants is used in the message macro's.
+
+\definemessageconstant {colors}
+\definemessageconstant {columns}
+\definemessageconstant {figures}
+\definemessageconstant {floatblocks}
+\definemessageconstant {fonts}
+\definemessageconstant {interactions}
+\definemessageconstant {layouts}
+\definemessageconstant {linguals}
+\definemessageconstant {references}
+\definemessageconstant {specials}
+\definemessageconstant {structures}
+\definemessageconstant {systems}
+\definemessageconstant {textblocks}
+\definemessageconstant {versions}
+
+%D The word \type{height} takes 6~token memory cells. The
+%D control sequence \type{\height} on the other hand uses only
+%D one. Knowing this, we can improve the performance of \TEX,
+%D both is terms of speed and memory usage, by using control
+%D sequences instead of the words written in full.
+%D
+%D Where in the \ASCII\ file the second lines takes nine extra
+%D characters, \TEX\ saves us 13~tokens.
+%D
+%D \starttypen
+%D \hrule width 10pt height 2pt depth 1pt
+%D \hrule \!!width 10pt \!!height 2pt \!!depth 1pt
+%D \stoptypen
+%D
+%D One condition is that we have defined \type{\!!height},
+%D \type{\!!width} and \type{\!!depth} as respectively
+%D \type{height}, \type{width} and \type{depth}. Using this
+%D scheme therefore only makes sense when a token sequence is
+%D used more than once. Savings like this should of course be
+%D implemented in english, just because \TEX\ is english.
+
+\def\!!width {width}
+\def\!!height {height}
+\def\!!depth {depth}
+
+\def\!!plus {plus}
+\def\!!minus {minus}
+
+\def\!!fill {fill}
+
+%D The same goes for some \CONTEXT\ constants, used in the
+%D definition of private commands:
+
+\definesystemconstant {next}
+\definesystemconstant {pickup}
+
+\definesystemconstant {default}
+\definesystemconstant {unknown}
+
+\definesystemconstant {action}
+\definesystemconstant {compare}
+
+\definesystemconstant {do}
+\definesystemconstant {dodo}
+
+\definesystemconstant {complex}
+\definesystemconstant {simple}
+
+\definesystemconstant {start}
+\definesystemconstant {stop}
+
+\definesystemconstant {dummy}
+
+\definesystemconstant {local}
+\definesystemconstant {global}
+
+\definesystemconstant {done}
+
+%D A more experienced \TEX\ user will recognize the next four
+%D constants. We need these because font-definitions are
+%D partially english.
+
+\definesystemconstant {fam}
+\definesystemconstant {text}
+\definesystemconstant {script}
+\definesystemconstant {scriptscript}
+
+\definesystemconstant {lefthyphenmin}
+\definesystemconstant {righthyphenmin}
+
+%D Just to be complete we define the standard \TEX\ units.
+
+\definesystemconstant {cm}
+\definesystemconstant {em}
+\definesystemconstant {ex}
+\definesystemconstant {mm}
+\definesystemconstant {pt}
+\definesystemconstant {sp}
+\definesystemconstant {in}
+
+%D These constants are used for internal and utility
+%D commands.
+
+\definesystemconstant {check}
+\definesystemconstant {reset}
+\definesystemconstant {set}
+
+\definesystemconstant {entrya}
+\definesystemconstant {entryb}
+\definesystemconstant {entryc}
+\definesystemconstant {entry}
+\definesystemconstant {see}
+\definesystemconstant {page}
+\definesystemconstant {line}
+
+\definesystemconstant {synonym}
+
+\definesystemconstant {reference}
+\definesystemconstant {main}
+
+\definesystemconstant {list}
+
+\definesystemconstant {item}
+\definesystemconstant {itemcount}
+
+\definesystemconstant {number}
+\definesystemconstant {references}
+\definesystemconstant {between}
+\definesystemconstant {format}
+\definesystemconstant {old}
+
+\definesystemconstant {thisisblock}
+\definesystemconstant {thiswasblock}
+
+\definesystemconstant {figurepreset}
+
+%D Some \CONTEXT\ commands take a two||pass aproach to
+%D optimize the typesetting. Each two||pass object has its
+%D own tag.
+
+\definesystemconstant {pass}
+
+\definesystemconstant {float}
+\definesystemconstant {list}
+\definesystemconstant {page}
+\definesystemconstant {subpage}
+\definesystemconstant {margin}
+\definesystemconstant {profile}
+\definesystemconstant {versionbegin}
+\definesystemconstant {versionend}
+\definesystemconstant {cross}
+\definesystemconstant {paragraph}
+
+%D A lot of macros use tags to distinguish between different
+%D objects, e.g. lists and registers.
+
+\definesystemconstant {prt} % part (deel)
+\definesystemconstant {chp} % chapter (hoofdstuk)
+\definesystemconstant {sec} % section (paragraaf)
+\definesystemconstant {tit} % title (titel)
+\definesystemconstant {sub} % subject (onderwerp)
+\definesystemconstant {mar} % margin (marge)
+\definesystemconstant {num} % number (doornummeren)
+\definesystemconstant {def} % definition (doordefinieren)
+\definesystemconstant {for} % formula (formule)
+\definesystemconstant {fnt} % footnote (voetnoot)
+\definesystemconstant {ind} % index (register)
+\definesystemconstant {lin} % linked index
+\definesystemconstant {lst} % list (opsomming)
+\definesystemconstant {flt} % float (plaatsblok)
+\definesystemconstant {pag} % page (pagina)
+\definesystemconstant {txt} % text (tekst)
+\definesystemconstant {ref} % reference (verwijzing)
+\definesystemconstant {lab} % label (label)
+\definesystemconstant {aut} % automatic (inhoud, index)
+
+\definesystemconstant {kop} % kop % still dutch
+
+%D Reference labels can be tagged by users, for instance by
+%D means of \type{tag:}. The reference mechanism itself uses
+%D some tags too. These are definitely not to be used by users.
+%D Here they are:
+
+\definereferenceconstant {cross} {:c:} % cross reference
+\definereferenceconstant {view} {:v:} % view reference
+\definereferenceconstant {viewa} {:a:} % view reference test a
+\definereferenceconstant {viewb} {:b:} % view reference test b
+\definereferenceconstant {page} {:p:} % page referece
+\definereferenceconstant {list} {:l:} % list reference
+\definereferenceconstant {exec} {:e:} % execution reference
+
+\definereferenceconstant {from} {:f:} % from list reference
+\definereferenceconstant {to} {:t:} % to list reference
+
+%D When we use numbers and dimensions the same applies as
+%D with the keywords like \type{width} and \type{plus}
+%D mentioned earlier.
+
+\def\!!ten {10}
+\def\!!twelve {12}
+\def\!!hundred {100}
+\def\!!thousand {1000}
+\def\!!tenthousand {10000}
+\def\!!maxcard {65536}
+\def\!!medcard {32768}
+
+\def\!!zeropoint {0pt}
+\def\!!onepoint {1pt}
+\def\!!twopoint {2pt}
+\def\!!threepoint {3pt}
+\def\!!fourpoint {4pt}
+\def\!!fivepoint {5pt}
+\def\!!sixpoint {6pt}
+\def\!!sevenpoint {7pt}
+\def\!!eightpoint {8pt}
+\def\!!ninepoint {9pt}
+\def\!!tenpoint {10pt}
+\def\!!elevenpoint {11pt}
+\def\!!twelvepoint {12pt}
+\def\!!fourteenpointfour {14.4pt}
+
+%D Variables are composed of a command specific tag and a user
+%D supplied variable (system constant). The first tag \type{ag}
+%D for instance is available as \type{\??ag} and expands to
+%D \type{@@ag} in composed variables.
+
+% vervallen : hd hr hm vt vr vm tr tn te br bm bo on om or
+
+\definesystemvariable {ag} % AchterGrond
+\definesystemvariable {al} % ALinea's
+\definesystemvariable {am} % interActieMenu
+\definesystemvariable {ba} % synchronisatieBAlk
+\definesystemvariable {be} % startstop (BeginEnd)
+\definesystemvariable {bj} % BlokJe
+\definesystemvariable {bk} % Blokken (floats)
+\definesystemvariable {bl} % BLanko
+\definesystemvariable {bs} % SelecteerBlokken
+\definesystemvariable {bt} % BuTton
+\definesystemvariable {bu} % BUffer
+\definesystemvariable {bv} % Brieven
+\definesystemvariable {by} % Per
+\definesystemvariable {ci} % CItaat
+\definesystemvariable {cl} % kleur (CoLor setup)
+\definesystemvariable {co} % COmbinaties
+\definesystemvariable {cr} % kleur (ColoR)
+\definesystemvariable {cv} % ConVersie
+\definesystemvariable {dd} % DoorDefinieren
+\definesystemvariable {de} % DEel
+\definesystemvariable {dl} % DunneLijnen
+\definesystemvariable {dn} % DoorNummeren
+\definesystemvariable {do} % DefinieerOpmaak
+\definesystemvariable {ds} % DoorSpringen
+\definesystemvariable {ef} % ExternFiguur
+\definesystemvariable {ep} % ExternfiguurPreset
+\definesystemvariable {ex} % ExterneFiguren
+\definesystemvariable {fg} % FiGuurmaten
+\definesystemvariable {fi} % FIle
+\definesystemvariable {fl} % Floats
+\definesystemvariable {fm} % ForMules
+\definesystemvariable {ft} % FonTs
+\definesystemvariable {fp} % FilegroeP
+\definesystemvariable {ia} % Interactie
+\definesystemvariable {ib} % InteractieBalk
+\definesystemvariable {id} % Index
+\definesystemvariable {ih} % InHoudsopgave
+\definesystemvariable {ii} % stelIndexIn
+\definesystemvariable {il} % stelInvulRegelsin
+\definesystemvariable {im} % InMarge
+\definesystemvariable {in} % INspringen
+\definesystemvariable {is} % Items
+\definesystemvariable {iv} % stelInvulLijnenin
+\definesystemvariable {ka} % KAntlijn
+\definesystemvariable {kd} % KaDerteksten
+\definesystemvariable {kj} % KopJes (floats)
+\definesystemvariable {kl} % KoLommen
+\definesystemvariable {km} % KenMerk
+\definesystemvariable {ko} % KOp(pen)
+\definesystemvariable {kp} % KopPelteken
+\definesystemvariable {kr} % KoRps
+\definesystemvariable {kt} % KonTakten
+\definesystemvariable {kw} % KontaktWaarde
+\definesystemvariable {la} % LAnguage
+\definesystemvariable {lg} % taal (LanGuage)
+\definesystemvariable {li} % LIjst
+\definesystemvariable {ln} % LijNen
+\definesystemvariable {lo} % LOgos
+\definesystemvariable {lt} % LiTeratuur
+\definesystemvariable {ly} % LaYout
+\definesystemvariable {ma} % MargeAchtergrond
+\definesystemvariable {mb} % MargeBlokken
+\definesystemvariable {mk} % MarKering
+\definesystemvariable {nm} % Nummering
+\definesystemvariable {np} % NaastPlaatsen
+\definesystemvariable {nr} % Nummeren
+\definesystemvariable {oi} % OmlijndInstellingen
+\definesystemvariable {ol} % OmLijnd
+\definesystemvariable {on} % ONderstreep
+\definesystemvariable {oo} % OpsOmmingen
+\definesystemvariable {op} % OPsomming
+\definesystemvariable {op} % OPsomming
+\definesystemvariable {os} % OffSet
+\definesystemvariable {pa} % PAlet
+\definesystemvariable {pb} % PuBlicatie
+\definesystemvariable {pf} % ProFiel
+\definesystemvariable {pg} % KoppelPagina
+\definesystemvariable {pl} % PLaats
+\definesystemvariable {pn} % PaginaNummer
+\definesystemvariable {pp} % PaPier
+\definesystemvariable {pr} % PRogrammas
+\definesystemvariable {ps} % PoSitioneren
+\definesystemvariable {rf} % ReFereren
+\definesystemvariable {rg} % ReGel
+\definesystemvariable {rl} % ReferentieLijst
+\definesystemvariable {rn} % RegelNummer
+\definesystemvariable {ro} % ROteren
+\definesystemvariable {rs} % RaSters
+\definesystemvariable {rt} % RoosTers
+\definesystemvariable {rv} % ReserVeerfiguur
+\definesystemvariable {sb} % SectieBlok
+\definesystemvariable {sc} % SCherm
+\definesystemvariable {se} % SEctie
+\definesystemvariable {si} % SplIt
+\definesystemvariable {sk} % SectieKop
+\definesystemvariable {sl} % SmalLer
+\definesystemvariable {sm} % SynonieMen
+\definesystemvariable {sn} % SubNummer
+\definesystemvariable {so} % SOrteren
+\definesystemvariable {sp} % SelecteerPapier
+\definesystemvariable {ss} % Symbool
+\definesystemvariable {st} % STickers
+\definesystemvariable {sv} % SysteemVariabelen
+\definesystemvariable {sy} % SYnchronisatie
+\definesystemvariable {ta} % TAb
+\definesystemvariable {tb} % TekstBlokken
+\definesystemvariable {ti} % TabelInstellingen
+\definesystemvariable {tk} % Teksten
+\definesystemvariable {tl} % TekstLijnen
+\definesystemvariable {tp} % TyPen
+\definesystemvariable {tu} % TabUlatie
+\definesystemvariable {ty} % TYpe
+\definesystemvariable {ve} % VErsie
+\definesystemvariable {vn} % VoetNoten
+\definesystemvariable {wr} % WitRuimte
+\definesystemvariable {za} % ZetspiegelAanpassing
+
+%D Next we define some language independant one letter
+%D variables and keywords.
+
+\defineinterfaceconstant {x} {x} % x offset
+\defineinterfaceconstant {y} {y} % y offset
+\defineinterfaceconstant {w} {w} % width
+\defineinterfaceconstant {h} {h} % height
+\defineinterfaceconstant {s} {s} % size
+\defineinterfaceconstant {t} {t} % title
+\defineinterfaceconstant {c} {c} % creator
+\defineinterfaceconstant {e} {e} % extension
+\defineinterfaceconstant {f} {f} % file
+
+\defineinterfaceconstant {a} {a} % kunnen weg
+\defineinterfaceconstant {b} {b} % kunnen weg
+\defineinterfaceconstant {c} {c} % kunnen weg
+\defineinterfaceconstant {d} {d} % kunnen weg
+\defineinterfaceconstant {e} {e} % kunnen weg
+
+\defineinterfaceconstant {r} {r}
+\defineinterfaceconstant {g} {g}
+\defineinterfaceconstant {b} {b}
+\defineinterfaceconstant {c} {c}
+\defineinterfaceconstant {m} {m}
+\defineinterfaceconstant {y} {y}
+\defineinterfaceconstant {k} {k}
+
+\defineinterfaceconstant {t} {t}
+\defineinterfaceconstant {h} {h}
+\defineinterfaceconstant {b} {b}
+
+\defineinterfaceconstant {rgb} {rgb}
+\defineinterfaceconstant {cmyk} {cmyk}
+
+\defineinterfacevariable {rgb} {rgb}
+\defineinterfacevariable {cmyk} {cmyk}
+\defineinterfacevariable {gray} {k}
+
+%D The names of files and their extensions are fixed.
+%D \CONTEXT\ uses as less files as possible. Utility files can
+%D be recognized by the first two characters of the extension:
+%D \type{tu}.
+
+\definefileconstant {utilityfilename} {texutil}
+
+\definefileconstant {blockextension} {tub}
+\definefileconstant {figureextension} {tuf}
+\definefileconstant {inputextension} {tui}
+\definefileconstant {outputextension} {tuo}
+\definefileconstant {temporaryextension} {tmp}
+\definefileconstant {patternsextension} {pat}
+\definefileconstant {hyphensextension} {hyp}
+
+%D These files are loaded at start||up. They may contain system
+%D specific setups (or calls to other files), old macro's, to
+%D garantee compatibility and new macro's noy yet present in
+%D the format.
+
+\definefileconstant {systemfilename} {cont-sys}
+\definefileconstant {oldfilename} {cont-old}
+\definefileconstant {newfilename} {cont-new}
+
+%D The setup files for the language, font, color and special
+%D subsystems have a common prefix. This means that we have at
+%D most three characters for unique filenames.
+
+\definefileconstant {languageprefix} {lang-}
+\definefileconstant {fontprefix} {font-}
+\definefileconstant {colorprefix} {colo-}
+\definefileconstant {specialprefix} {spec-}
+
+%D \CONTEXT\ follows different strategies for finding files.
+%D The macros that are responsible for this 'clever' searching
+%D make use of two (very important) path specifiers.
+
+\definefileconstant {currentpath} {.}
+\definefileconstant {parentpath} {..}
+
+%D The way fonts are defined and called upon is language
+%D independant. We follow the scheme laid down by Knuth in
+%D Plain \TEX. We'll explain their meaning later.
+
+\defineinterfaceconstant {tf} {tf}
+\defineinterfaceconstant {bf} {bf}
+\defineinterfaceconstant {bs} {bs}
+\defineinterfaceconstant {bi} {bi}
+\defineinterfaceconstant {sl} {sl}
+\defineinterfaceconstant {it} {it}
+\defineinterfaceconstant {sc} {sc}
+\defineinterfaceconstant {rm} {rm}
+\defineinterfaceconstant {ss} {ss}
+\defineinterfaceconstant {tt} {tt}
+\defineinterfaceconstant {hw} {hw}
+\defineinterfaceconstant {cg} {cg}
+\defineinterfaceconstant {os} {os}
+\defineinterfaceconstant {mm} {mm}
+\defineinterfaceconstant {i} {i}
+
+\defineinterfaceconstant {x} {x}
+\defineinterfaceconstant {xx} {xx}
+
+\defineinterfaceconstant {mi} {mi}
+\defineinterfaceconstant {sy} {sy}
+\defineinterfaceconstant {ex} {ex}
+\defineinterfaceconstant {mr} {mr}
+
+\defineinterfaceconstant {ma} {ma}
+\defineinterfaceconstant {mb} {mb}
+\defineinterfaceconstant {mc} {mc}
+
+%D Finally we need:
+
+\defineinterfaceconstant {tif} {tif}
+\defineinterfaceconstant {eps} {eps}
+
+%D A careful reader will have noticed that in the module
+%D \type{mult-ini} we defined \type{\selectinterface}. We were
+%D not yet able to actually select an interface, because we
+%D still had to define the constants and variables. Now we've
+%D done so, selection is permitted.
+
+\selectinterface
+
+%D And only after this selection is done, we can define
+%D messages, otherwise the default language is in use.
+
+\ifinterfacetranslation \else
+
+\startmessages dutch library: check
+ title: controle
+ 1: '=' ontbreekt na '--' in regel --
+ 2: -- argument(en) verwacht in regel --
+ 3: -- -- vervangt een macro, gebruik HOOFDLETTERS!
+\stopmessages
+
+\startmessages english library: check
+ title: check
+ 1: missing '=' after '--' in line --
+ 2: -- argument(s) expected in line --
+ 3: -- -- replaces a macro, use CAPITALS!
+\stopmessages
+
+\startmessages german library: check
+ title: check
+ 1: Fehlendes '=' nach '--' in Zeile --
+ 2: -- Argument(e) in Zeile -- erwartet
+ 3: -- -- ersetzt ein Makro, verwende VERSALIEN!
+\stopmessages
+
+\fi
+
+%D Ok, here are some more, because we've got ouselves some
+%D extensions to \CONTEXT.
+
+\definemessageconstant {addresses}
+\definemessageconstant {documents}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/plain.tex b/tex/context/base/plain.tex new file mode 100644 index 000000000..6a1e5acbc --- /dev/null +++ b/tex/context/base/plain.tex @@ -0,0 +1,1236 @@ +% This is the plain TeX format that's described in The TeXbook.
+% N.B.: A version number is defined at the very end of this file;
+% please change that number whenever the file is modified!
+% And don't modify the file under any circumstances.
+
+\catcode`\{=1 % left brace is begin-group character
+\catcode`\}=2 % right brace is end-group character
+\catcode`\$=3 % dollar sign is math shift
+\catcode`\&=4 % ampersand is alignment tab
+\catcode`\#=6 % hash mark is macro parameter character
+\catcode`\^=7 \catcode`\^^K=7 % circumflex and uparrow are for superscripts
+\catcode`\_=8 \catcode`\^^A=8 % underline and downarrow are for subscripts
+\catcode`\^^I=10 % ascii tab is a blank space
+\chardef\active=13 \catcode`\~=\active % tilde is active
+\catcode`\^^L=\active \outer\def^^L{\par} % ascii form-feed is "\outer\par"
+
+\message{Preloading the plain format: codes,}
+
+% We had to define the \catcodes right away, before the message line,
+% since \message uses the { and } characters.
+% When INITEX (the TeX initializer) starts up,
+% it has defined the following \catcode values:
+% \catcode`\^^@=9 % ascii null is ignored
+% \catcode`\^^M=5 % ascii return is end-line
+% \catcode`\\=0 % backslash is TeX escape character
+% \catcode`\%=14 % percent sign is comment character
+% \catcode`\ =10 % ascii space is blank space
+% \catcode`\^^?=15 % ascii delete is invalid
+% \catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
+% \catcode`\a=11 ... \catcode`\z=11 % lowercase letters
+% all others are type 12 (other)
+
+% Here is a list of the characters that have been specially catcoded:
+\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
+% (not counting ascii null, tab, linefeed, formfeed, return, delete)
+% Each symbol in the list is preceded by \do, which can be defined
+% if you want to do something to every item in the list.
+
+% We make @ signs act like letters, temporarily, to avoid conflict
+% between user names and internal control sequences of plain format.
+\catcode`@=11
+
+% INITEX sets up \mathcode x=x, for x=0..255, except that
+% \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
+% \mathcode x=x+"7000, for x = `0 to `9.
+% The following changes define internal codes as recommended
+% in Appendix C of The TeXbook:
+\mathcode`\^^@="2201 % \cdot
+\mathcode`\^^A="3223 % \downarrow
+\mathcode`\^^B="010B % \alpha
+\mathcode`\^^C="010C % \beta
+\mathcode`\^^D="225E % \land
+\mathcode`\^^E="023A % \lnot
+\mathcode`\^^F="3232 % \in
+\mathcode`\^^G="0119 % \pi
+\mathcode`\^^H="0115 % \lambda
+\mathcode`\^^I="010D % \gamma
+\mathcode`\^^J="010E % \delta
+\mathcode`\^^K="3222 % \uparrow
+\mathcode`\^^L="2206 % \pm
+\mathcode`\^^M="2208 % \oplus
+\mathcode`\^^N="0231 % \infty
+\mathcode`\^^O="0140 % \partial
+\mathcode`\^^P="321A % \subset
+\mathcode`\^^Q="321B % \supset
+\mathcode`\^^R="225C % \cap
+\mathcode`\^^S="225B % \cup
+\mathcode`\^^T="0238 % \forall
+\mathcode`\^^U="0239 % \exists
+\mathcode`\^^V="220A % \otimes
+\mathcode`\^^W="3224 % \leftrightarrow
+\mathcode`\^^X="3220 % \leftarrow
+\mathcode`\^^Y="3221 % \rightarrow
+\mathcode`\^^Z="8000 % \ne
+\mathcode`\^^[="2205 % \diamond
+\mathcode`\^^\="3214 % \le
+\mathcode`\^^]="3215 % \ge
+\mathcode`\^^^="3211 % \equiv
+\mathcode`\^^_="225F % \lor
+\mathcode`\ ="8000 % \space
+\mathcode`\!="5021
+\mathcode`\'="8000 % ^\prime
+\mathcode`\(="4028
+\mathcode`\)="5029
+\mathcode`\*="2203 % \ast
+\mathcode`\+="202B
+\mathcode`\,="613B
+\mathcode`\-="2200
+\mathcode`\.="013A
+\mathcode`\/="013D
+\mathcode`\:="303A
+\mathcode`\;="603B
+\mathcode`\<="313C
+\mathcode`\=="303D
+\mathcode`\>="313E
+\mathcode`\?="503F
+\mathcode`\[="405B
+\mathcode`\\="026E % \backslash
+\mathcode`\]="505D
+\mathcode`\_="8000 % \_
+\mathcode`\{="4266
+\mathcode`\|="026A
+\mathcode`\}="5267
+\mathcode`\^^?="1273 % \smallint
+
+% INITEX sets \uccode`x=`X and \uccode `X=`X for all letters x,
+% and \lccode`x=`x, \lccode`X=`x; all other values are zero.
+% No changes to those tables are needed in plain TeX format.
+
+% INITEX sets \sfcode x=1000 for all x, except that \sfcode`X=999
+% for uppercase letters. The following changes are needed:
+\sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
+% The \nonfrenchspacing macro will make further changes to \sfcode values.
+
+% Finally, INITEX sets all \delcode values to -1, except \delcode`.=0
+\delcode`\(="028300
+\delcode`\)="029301
+\delcode`\[="05B302
+\delcode`\]="05D303
+\delcode`\<="26830A
+\delcode`\>="26930B
+\delcode`\/="02F30E
+\delcode`\|="26A30C
+\delcode`\\="26E30F
+% N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
+
+% To make the plain macros more efficient in time and space,
+% several constant values are declared here as control sequences.
+% If they were changed, anything could happen; so they are private symbols.
+\chardef\@ne=1
+\chardef\tw@=2
+\chardef\thr@@=3
+\chardef\sixt@@n=16
+\chardef\@cclv=255
+\mathchardef\@cclvi=256
+\mathchardef\@m=1000
+\mathchardef\@M=10000
+\mathchardef\@MM=20000
+
+% Allocation of registers
+
+% Here are macros for the automatic allocation of \count, \box, \dimen,
+% \skip, \muskip, and \toks registers, as well as \read and \write
+% stream numbers, \fam codes, \language codes, and \insert numbers.
+
+\message{registers,}
+
+% When a register is used only temporarily, it need not be allocated;
+% grouping can be used, making the value previously in the register return
+% after the close of the group. The main use of these macros is for
+% registers that are defined by one macro and used by others, possibly at
+% different nesting levels. All such registers should be defined through
+% these macros; otherwise conflicts may occur, especially when two or more
+% more macro packages are being used at once.
+
+% The following counters are reserved:
+% 0 to 9 page numbering
+% 10 count allocation
+% 11 dimen allocation
+% 12 skip allocation
+% 13 muskip allocation
+% 14 box allocation
+% 15 toks allocation
+% 16 read file allocation
+% 17 write file allocation
+% 18 math family allocation
+% 19 language allocation
+% 20 insert allocation
+% 21 the most recently allocated number
+% 22 constant -1
+% New counters are allocated starting with 23, 24, etc. Other registers are
+% allocated starting with 10. This leaves 0 through 9 for the user to play
+% with safely, except that counts 0 to 9 are considered to be the page and
+% subpage numbers (since they are displayed during output). In this scheme,
+% \count 10 always contains the number of the highest-numbered counter that
+% has been allocated, \count 14 the highest-numbered box, etc.
+% Inserts are given numbers 254, 253, etc., since they require a \count,
+% \dimen, \skip, and \box all with the same number; \count 20 contains the
+% lowest-numbered insert that has been allocated. Of course, \box255 is
+% reserved for \output; \count255, \dimen255, and \skip255 can be used freely.
+
+% It is recommended that macro designers always use
+% \global assignments with respect to registers numbered 1, 3, 5, 7, 9, and
+% always non-\global assignments with respect to registers 0, 2, 4, 6, 8, 255.
+% This will prevent ``save stack buildup'' that might otherwise occur.
+
+\count10=22 % allocates \count registers 23, 24, ...
+\count11=9 % allocates \dimen registers 10, 11, ...
+\count12=9 % allocates \skip registers 10, 11, ...
+\count13=9 % allocates \muskip registers 10, 11, ...
+\count14=9 % allocates \box registers 10, 11, ...
+\count15=9 % allocates \toks registers 10, 11, ...
+\count16=-1 % allocates input streams 0, 1, ...
+\count17=-1 % allocates output streams 0, 1, ...
+\count18=3 % allocates math families 4, 5, ...
+\count19=0 % allocates \language codes 1, 2, ...
+\count20=255 % allocates insertions 254, 253, ...
+\countdef\insc@unt=20 % the insertion counter
+\countdef\allocationnumber=21 % the most recent allocation
+\countdef\m@ne=22 \m@ne=-1 % a handy constant
+\def\wlog{\immediate\write\m@ne} % write on log file (only)
+
+% Here are abbreviations for the names of scratch registers
+% that don't need to be allocated.
+
+\countdef\count@=255
+\dimendef\dimen@=0
+\dimendef\dimen@i=1 % global only
+\dimendef\dimen@ii=2
+\skipdef\skip@=0
+\toksdef\toks@=0
+
+% Now, we define \newcount, \newbox, etc. so that you can say \newcount\foo
+% and \foo will be defined (with \countdef) to be the next counter.
+% To find out which counter \foo is, you can look at \allocationnumber.
+% Since there's no \boxdef command, \chardef is used to define a \newbox,
+% \newinsert, \newfam, and so on.
+
+\outer\def\newcount{\alloc@0\count\countdef\insc@unt}
+\outer\def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
+\outer\def\newskip{\alloc@2\skip\skipdef\insc@unt}
+\outer\def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi}
+\outer\def\newbox{\alloc@4\box\chardef\insc@unt}
+\let\newtoks=\relax % we do this to allow plain.tex to be read in twice
+\outer\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
+\outer\def\newtoks{\alloc@5\toks\toksdef\@cclvi}
+\outer\def\newread{\alloc@6\read\chardef\sixt@@n}
+\outer\def\newwrite{\alloc@7\write\chardef\sixt@@n}
+\outer\def\newfam{\alloc@8\fam\chardef\sixt@@n}
+\outer\def\newlanguage{\alloc@9\language\chardef\@cclvi}
+\def\alloc@#1#2#3#4#5{\global\advance\count1#1by\@ne
+ \ch@ck#1#4#2% make sure there's still room
+ \allocationnumber=\count1#1%
+ \global#3#5=\allocationnumber
+ \wlog{\string#5=\string#2\the\allocationnumber}}
+\outer\def\newinsert#1{\global\advance\insc@unt by\m@ne
+ \ch@ck0\insc@unt\count
+ \ch@ck1\insc@unt\dimen
+ \ch@ck2\insc@unt\skip
+ \ch@ck4\insc@unt\box
+ \allocationnumber=\insc@unt
+ \global\chardef#1=\allocationnumber
+ \wlog{\string#1=\string\insert\the\allocationnumber}}
+\def\ch@ck#1#2#3{\ifnum\count1#1<#2%
+ \else\errmessage{No room for a new #3}\fi}
+
+% Here are some examples of allocation.
+\newdimen\maxdimen \maxdimen=16383.99999pt % the largest legal <dimen>
+\newskip\hideskip \hideskip=-1000pt plus 1fill % negative but can grow
+\newskip\centering \centering=0pt plus 1000pt minus 1000pt
+\newdimen\p@ \p@=1pt % this saves macro space and time
+\newdimen\z@ \z@=0pt % can be used both for 0pt and 0
+\newskip\z@skip \z@skip=0pt plus0pt minus0pt
+\newbox\voidb@x % permanently void box register
+
+% And here's a different sort of allocation:
+% For example, \newif\iffoo creates \footrue, \foofalse to go with \iffoo.
+\outer\def\newif#1{\count@\escapechar \escapechar\m@ne
+ \expandafter\expandafter\expandafter
+ \edef\@if#1{true}{\let\noexpand#1=\noexpand\iftrue}%
+ \expandafter\expandafter\expandafter
+ \edef\@if#1{false}{\let\noexpand#1=\noexpand\iffalse}%
+ \@if#1{false}\escapechar\count@} % the condition starts out false
+\def\@if#1#2{\csname\expandafter\if@\string#1#2\endcsname}
+{\uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}} % `if' is required
+
+% Assign initial values to TeX's parameters
+
+\message{parameters,}
+
+% All of TeX's numeric parameters are listed here,
+% but the code is commented out if no special value needs to be set.
+% INITEX makes all parameters zero except where noted.
+
+\pretolerance=100
+\tolerance=200 % INITEX sets this to 10000
+\hbadness=1000
+\vbadness=1000
+\linepenalty=10
+\hyphenpenalty=50
+\exhyphenpenalty=50
+\binoppenalty=700
+\relpenalty=500
+\clubpenalty=150
+\widowpenalty=150
+\displaywidowpenalty=50
+\brokenpenalty=100
+\predisplaypenalty=10000
+% \postdisplaypenalty=0
+% \interlinepenalty=0
+% \floatingpenalty=0, set during \insert
+% \outputpenalty=0, set before TeX enters \output
+\doublehyphendemerits=10000
+\finalhyphendemerits=5000
+\adjdemerits=10000
+% \looseness=0, cleared by TeX after each paragraph
+% \pausing=0
+% \holdinginserts=0
+% \tracingonline=0
+% \tracingmacros=0
+% \tracingstats=0
+% \tracingparagraphs=0
+% \tracingpages=0
+% \tracingoutput=0
+\tracinglostchars=1
+% \tracingcommands=0
+% \tracingrestores=0
+% \language=0
+\uchyph=1
+% \lefthyphenmin=2 \righthyphenmin=3 set below
+% \globaldefs=0
+% \maxdeadcycles=25 % INITEX does this
+% \hangafter=1 % INITEX does this, also TeX after each paragraph
+% \fam=0
+% \mag=1000 % INITEX does this
+% \escapechar=`\\ % INITEX does this
+\defaulthyphenchar=`\-
+\defaultskewchar=-1
+% \endlinechar=`\^^M % INITEX does this
+\newlinechar=-1
+\delimiterfactor=901
+% \time=now % TeX does this at beginning of job
+% \day=now % TeX does this at beginning of job
+% \month=now % TeX does this at beginning of job
+% \year=now % TeX does this at beginning of job
+\showboxbreadth=5
+\showboxdepth=3
+\errorcontextlines=5
+
+\hfuzz=0.1pt
+\vfuzz=0.1pt
+\overfullrule=5pt
+\hsize=6.5in
+\vsize=8.9in
+\maxdepth=4pt
+\splitmaxdepth=\maxdimen
+\boxmaxdepth=\maxdimen
+% \lineskiplimit=0pt, changed by \normalbaselines
+\delimitershortfall=5pt
+\nulldelimiterspace=1.2pt
+\scriptspace=0.5pt
+% \mathsurround=0pt
+% \predisplaysize=0pt, set before TeX enters $$
+% \displaywidth=0pt, set before TeX enters $$
+% \displayindent=0pt, set before TeX enters $$
+\parindent=20pt
+% \hangindent=0pt, zeroed by TeX after each paragraph
+% \hoffset=0pt
+% \voffset=0pt
+
+% \baselineskip=0pt, changed by \normalbaselines
+% \lineskip=0pt, changed by \normalbaselines
+\parskip=0pt plus 1pt
+\abovedisplayskip=12pt plus 3pt minus 9pt
+\abovedisplayshortskip=0pt plus 3pt
+\belowdisplayskip=12pt plus 3pt minus 9pt
+\belowdisplayshortskip=7pt plus 3pt minus 4pt
+% \leftskip=0pt
+% \rightskip=0pt
+\topskip=10pt
+\splittopskip=10pt
+% \tabskip=0pt
+% \spaceskip=0pt
+% \xspaceskip=0pt
+\parfillskip=0pt plus 1fil
+
+\thinmuskip=3mu
+\medmuskip=4mu plus 2mu minus 4mu
+\thickmuskip=5mu plus 5mu
+
+% We also define special registers that function like parameters:
+\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
+\newskip\medskipamount \medskipamount=6pt plus 2pt minus 2pt
+\newskip\bigskipamount \bigskipamount=12pt plus 4pt minus 4pt
+\newskip\normalbaselineskip \normalbaselineskip=12pt
+\newskip\normallineskip \normallineskip=1pt
+\newdimen\normallineskiplimit \normallineskiplimit=0pt
+\newdimen\jot \jot=3pt
+\newcount\interdisplaylinepenalty \interdisplaylinepenalty=100
+\newcount\interfootnotelinepenalty \interfootnotelinepenalty=100
+
+% Definitions for preloaded fonts
+
+\def\magstephalf{1095 }
+\def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or 2074\or 2488\fi\relax}
+
+% Fonts assigned to \preloaded are not part of "plain TeX",
+% but they are preloaded so that other format packages can use them.
+% For example, if another set of macros says "\font\ninerm=cmr9",
+% TeX will not have to reload the font metric information for cmr9.
+
+\message{fonts,}
+
+\font\tenrm=cmr10 % roman text
+\font\preloaded=cmr9
+\font\preloaded=cmr8
+\font\sevenrm=cmr7
+\font\preloaded=cmr6
+\font\fiverm=cmr5
+
+\font\teni=cmmi10 % math italic
+\font\preloaded=cmmi9
+\font\preloaded=cmmi8
+\font\seveni=cmmi7
+\font\preloaded=cmmi6
+\font\fivei=cmmi5
+
+\font\tensy=cmsy10 % math symbols
+\font\preloaded=cmsy9
+\font\preloaded=cmsy8
+\font\sevensy=cmsy7
+\font\preloaded=cmsy6
+\font\fivesy=cmsy5
+
+\font\tenex=cmex10 % math extension
+
+\font\preloaded=cmss10 % sans serif
+\font\preloaded=cmssq8
+
+\font\preloaded=cmssi10 % sans serif italic
+\font\preloaded=cmssqi8
+
+\font\tenbf=cmbx10 % boldface extended
+\font\preloaded=cmbx9
+\font\preloaded=cmbx8
+\font\sevenbf=cmbx7
+\font\preloaded=cmbx6
+\font\fivebf=cmbx5
+
+\font\tentt=cmtt10 % typewriter
+\font\preloaded=cmtt9
+\font\preloaded=cmtt8
+
+\font\preloaded=cmsltt10 % slanted typewriter
+
+\font\tensl=cmsl10 % slanted roman
+\font\preloaded=cmsl9
+\font\preloaded=cmsl8
+
+\font\tenit=cmti10 % text italic
+\font\preloaded=cmti9
+\font\preloaded=cmti8
+\font\preloaded=cmti7
+
+\message{more fonts,}
+\font\preloaded=cmu10 % unslanted text italic
+
+\font\preloaded=cmmib10 % bold math italic
+\font\preloaded=cmbsy10 % bold math symbols
+
+\font\preloaded=cmcsc10 % caps and small caps
+
+\font\preloaded=cmssbx10 % sans serif bold extended
+
+\font\preloaded=cmdunh10 % Dunhill style
+
+\font\preloaded=cmr7 scaled \magstep4 % for titles
+\font\preloaded=cmtt10 scaled \magstep2
+\font\preloaded=cmssbx10 scaled \magstep2
+
+\font\preloaded=manfnt % METAFONT logo and dragon curve and special symbols
+
+% Additional \preloaded fonts can be specified here.
+% (And those that were \preloaded above can be eliminated.)
+
+\let\preloaded=\undefined % preloaded fonts must be declared anew later.
+
+\skewchar\teni='177 \skewchar\seveni='177 \skewchar\fivei='177
+\skewchar\tensy='60 \skewchar\sevensy='60 \skewchar\fivesy='60
+
+\textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
+\def\rm{\fam\z@\tenrm}
+\textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
+\def\mit{\fam\@ne} \def\oldstyle{\fam\@ne\teni}
+\textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
+\def\cal{\fam\tw@}
+\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
+\newfam\itfam \def\it{\fam\itfam\tenit} % \it is family 4
+\textfont\itfam=\tenit
+\newfam\slfam \def\sl{\fam\slfam\tensl} % \sl is family 5
+\textfont\slfam=\tensl
+\newfam\bffam \def\bf{\fam\bffam\tenbf} % \bf is family 6
+\textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
+\scriptscriptfont\bffam=\fivebf
+\newfam\ttfam \def\tt{\fam\ttfam\tentt} % \tt is family 7
+\textfont\ttfam=\tentt
+
+% Macros for setting ordinary text
+\message{macros,}
+
+\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
+ \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
+\def\nonfrenchspacing{\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 }
+
+\def\normalbaselines{\lineskip\normallineskip
+ \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}
+
+\def\^^M{\ } % control <return> = control <space>
+\def\^^I{\ } % same for <tab>
+
+\def\lq{`} \def\rq{'}
+\def\lbrack{[} \def\rbrack{]}
+
+\let\endgraf=\par \let\endline=\cr
+
+\def\space{ }
+\def\empty{}
+\def\null{\hbox{}}
+
+\let\bgroup={ \let\egroup=}
+
+% In \obeylines, we say `\let^^M=\par' instead of `\def^^M{\par}'
+% since this allows, for example, `\let\par=\cr \obeylines \halign{...'
+{\catcode`\^^M=\active % these lines must end with %
+ \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
+ \global\let^^M\par} % this is in case ^^M appears in a \write
+\def\obeyspaces{\catcode`\ \active}
+{\obeyspaces\global\let =\space}
+
+\def\loop#1\repeat{\def\body{#1}\iterate}
+\def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
+\let\repeat=\fi % this makes \loop...\if...\repeat skippable
+
+\def\thinspace{\kern .16667em }
+\def\negthinspace{\kern-.16667em }
+\def\enspace{\kern.5em }
+
+\def\enskip{\hskip.5em\relax}
+\def\quad{\hskip1em\relax}
+\def\qquad{\hskip2em\relax}
+
+\def\smallskip{\vskip\smallskipamount}
+\def\medskip{\vskip\medskipamount}
+\def\bigskip{\vskip\bigskipamount}
+
+\def\nointerlineskip{\prevdepth-1000\p@}
+\def\offinterlineskip{\baselineskip-1000\p@
+ \lineskip\z@ \lineskiplimit\maxdimen}
+
+\def\topglue{\nointerlineskip\vglue-\topskip\vglue} % for top of page
+\def\vglue{\afterassignment\vgl@\skip@=}
+\def\vgl@{\par \dimen@\prevdepth \hrule height\z@
+ \nobreak\vskip\skip@ \prevdepth\dimen@}
+\def\hglue{\afterassignment\hgl@\skip@=}
+\def\hgl@{\leavevmode \count@\spacefactor \vrule width\z@
+ \nobreak\hskip\skip@ \spacefactor\count@}
+
+\def~{\penalty\@M \ } % tie
+\def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-'
+
+\def\break{\penalty-\@M}
+\def\nobreak{\penalty \@M}
+\def\allowbreak{\penalty \z@}
+
+\def\filbreak{\par\vfil\penalty-200\vfilneg}
+\def\goodbreak{\par\penalty-500 }
+\def\eject{\par\break}
+\def\supereject{\par\penalty-\@MM}
+
+\def\removelastskip{\ifdim\lastskip=\z@\else\vskip-\lastskip\fi}
+\def\smallbreak{\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi}
+\def\medbreak{\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi}
+\def\bigbreak{\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi}
+
+\def\line{\hbox to\hsize}
+\def\leftline#1{\line{#1\hss}}
+\def\rightline#1{\line{\hss#1}}
+\def\centerline#1{\line{\hss#1\hss}}
+
+\def\rlap#1{\hbox to\z@{#1\hss}}
+\def\llap#1{\hbox to\z@{\hss#1}}
+
+\def\m@th{\mathsurround\z@}
+\def\underbar#1{$\setbox\z@\hbox{#1}\dp\z@\z@
+ \m@th \underline{\box\z@}$}
+
+\newbox\strutbox
+\setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}
+\def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
+
+\def\hidewidth{\hskip\hideskip} % for alignment entries that can stick out
+\def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
+\newcount\mscount
+\def\multispan#1{\omit \mscount#1\relax
+ \loop\ifnum\mscount>\@ne \sp@n\repeat}
+\def\sp@n{\span\omit\advance\mscount\m@ne}
+
+\newif\ifus@ \newif\if@cr
+\newbox\tabs \newbox\tabsyet \newbox\tabsdone
+
+\def\cleartabs{\global\setbox\tabsyet\null \setbox\tabs\null}
+\def\settabs{\setbox\tabs\null \futurelet\next\sett@b}
+\let\+=\relax % in case this file is being read in twice
+\def\sett@b{\ifx\next\+\def\nxt{\afterassignment\s@tt@b\let\nxt}%
+ \else\let\nxt\s@tcols\fi \let\next\relax \nxt}
+\def\s@tt@b{\let\nxt\relax \us@false\m@ketabbox}
+\def\tabalign{\us@true\m@ketabbox} % non-\outer version of \+
+\outer\def\+{\tabalign}
+\def\s@tcols#1\columns{\count@#1\dimen@\hsize
+ \loop\ifnum\count@>\z@ \@nother \repeat}
+\def\@nother{\dimen@ii\dimen@ \divide\dimen@ii\count@
+ \setbox\tabs\hbox{\hbox to\dimen@ii{}\unhbox\tabs}%
+ \advance\dimen@-\dimen@ii \advance\count@\m@ne}
+
+\def\m@ketabbox{\begingroup
+ \global\setbox\tabsyet\copy\tabs
+ \global\setbox\tabsdone\null
+ \def\cr{\@crtrue\crcr\egroup\egroup
+ \ifus@\unvbox\z@\lastbox\fi\endgroup
+ \setbox\tabs\hbox{\unhbox\tabsyet\unhbox\tabsdone}}%
+ \setbox\z@\vbox\bgroup\@crfalse
+ \ialign\bgroup&\t@bbox##\t@bb@x\crcr}
+
+\def\t@bbox{\setbox\z@\hbox\bgroup}
+\def\t@bb@x{\if@cr\egroup % now \box\z@ holds the column
+ \else\hss\egroup \global\setbox\tabsyet\hbox{\unhbox\tabsyet
+ \global\setbox\@ne\lastbox}% now \box\@ne holds its size
+ \ifvoid\@ne\global\setbox\@ne\hbox to\wd\z@{}%
+ \else\setbox\z@\hbox to\wd\@ne{\unhbox\z@}\fi
+ \global\setbox\tabsdone\hbox{\box\@ne\unhbox\tabsdone}\fi
+ \box\z@}
+
+\def\hang{\hangindent\parindent}
+\def\textindent#1{\indent\llap{#1\enspace}\ignorespaces}
+\def\item{\par\hang\textindent}
+\def\itemitem{\par\indent \hangindent2\parindent \textindent}
+\def\narrower{\advance\leftskip\parindent
+ \advance\rightskip\parindent}
+
+\outer\def\beginsection#1\par{\vskip\z@ plus.3\vsize\penalty-250
+ \vskip\z@ plus-.3\vsize\bigskip\vskip\parskip
+ \message{#1}\leftline{\bf#1}\nobreak\smallskip\noindent}
+\outer\def\proclaim #1. #2\par{\medbreak
+ \noindent{\bf#1.\enspace}{\sl#2\par}%
+ \ifdim\lastskip<\medskipamount \removelastskip\penalty55\medskip\fi}
+
+\def\raggedright{\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}
+\def\ttraggedright{\tt\rightskip\z@ plus2em\relax} % for use with \tt only
+
+\chardef\%=`\%
+\chardef\&=`\&
+\chardef\#=`\#
+\chardef\$=`\$
+\chardef\ss="19
+\chardef\ae="1A
+\chardef\oe="1B
+\chardef\o="1C
+\chardef\AE="1D
+\chardef\OE="1E
+\chardef\O="1F
+\chardef\i="10 \chardef\j="11 % dotless letters
+\def\aa{\accent23a}
+\def\l{\char32l}
+\def\L{\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
+
+\def\leavevmode{\unhbox\voidb@x} % begins a paragraph, if necessary
+\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em}}
+\def\AA{\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
+ \rlap{\raise.67\dimen@\hbox{\char'27}}A}
+
+\def\mathhexbox#1#2#3{\leavevmode
+ \hbox{$\m@th \mathchar"#1#2#3$}}
+\def\dag{\mathhexbox279}
+\def\ddag{\mathhexbox27A}
+\def\S{\mathhexbox278}
+\def\P{\mathhexbox27B}
+
+\def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex%
+ \ialign{##\crcr#1\crcr}}} \def\o@lign{\lineskiplimit\z@ \oalign}
+\def\ooalign{\lineskiplimit-\maxdimen \oalign} % chars over each other
+\def\sh@ft#1{\dimen\z@.00#1ex\multiply\dimen\z@\fontdimen1\font
+ \kern-.0156\dimen\z@} % compensate for slant in lowered accents
+\def\d#1{{\o@lign{\relax#1\crcr\hidewidth\sh@ft{10}.\hidewidth}}}
+\def\b#1{{\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}}
+\def\c#1{\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
+ \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
+\def\copyright{{\ooalign{\hfil\raise.07ex\hbox{c}\hfil\crcr\mathhexbox20D}}}
+
+\def\dots{\relax\ifmmode\ldots\else$\m@th\ldots\,$\fi}
+\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX}
+
+\def\`#1{{\accent18 #1}}
+\def\'#1{{\accent19 #1}}
+\def\v#1{{\accent20 #1}} \let\^^_=\v
+\def\u#1{{\accent21 #1}} \let\^^S=\u
+\def\=#1{{\accent22 #1}}
+\def\^#1{{\accent94 #1}} \let\^^D=\^
+\def\.#1{{\accent95 #1}}
+\def\H#1{{\accent"7D #1}}
+\def\~#1{{\accent"7E #1}}
+\def\"#1{{\accent"7F #1}}
+\def\t#1{{\edef\next{\the\font}\the\textfont1\accent"7F\next#1}}
+
+\def\hrulefill{\leaders\hrule\hfill}
+\def\dotfill{\cleaders\hbox{$\m@th \mkern1.5mu.\mkern1.5mu$}\hfill}
+\def\rightarrowfill{$\m@th\smash-\mkern-6mu%
+ \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
+ \mkern-6mu\mathord\rightarrow$}
+\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-6mu%
+ \cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
+ \mkern-6mu\smash-$}
+\mathchardef\braceld="37A \mathchardef\bracerd="37B
+\mathchardef\bracelu="37C \mathchardef\braceru="37D
+\def\downbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+ \braceld\leaders\vrule height\ht\z@ depth\z@\hfill\braceru
+ \bracelu\leaders\vrule height\ht\z@ depth\z@\hfill\bracerd$}
+\def\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+ \bracelu\leaders\vrule height\ht\z@ depth\z@\hfill\bracerd
+ \braceld\leaders\vrule height\ht\z@ depth\z@\hfill\braceru$}
+
+\outer\def\bye{\par\vfill\supereject\end}
+
+% Macros for math setting
+\message{math definitions,}
+
+\let\sp=^ \let\sb=_
+\def\,{\mskip\thinmuskip}
+\def\>{\mskip\medmuskip}
+\def\;{\mskip\thickmuskip}
+\def\!{\mskip-\thinmuskip}
+\def\*{\discretionary{\thinspace\the\textfont2\char2}{}{}}
+{\catcode`\'=\active \gdef'{^\bgroup\prim@s}}
+\def\prim@s{\prime\futurelet\next\pr@m@s}
+\def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\ifx^\next\let\nxt\pr@@@t
+ \else\let\nxt\egroup\fi\fi \nxt}
+\def\pr@@@s#1{\prim@s} \def\pr@@@t#1#2{#2\egroup}
+{\catcode`\^^Z=\active \gdef^^Z{\not=}} % ^^Z is like \ne in math
+
+{\catcode`\_=\active \global\let_=\_} % _ in math is either subscript or \_
+
+\mathchardef\alpha="010B
+\mathchardef\beta="010C
+\mathchardef\gamma="010D
+\mathchardef\delta="010E
+\mathchardef\epsilon="010F
+\mathchardef\zeta="0110
+\mathchardef\eta="0111
+\mathchardef\theta="0112
+\mathchardef\iota="0113
+\mathchardef\kappa="0114
+\mathchardef\lambda="0115
+\mathchardef\mu="0116
+\mathchardef\nu="0117
+\mathchardef\xi="0118
+\mathchardef\pi="0119
+\mathchardef\rho="011A
+\mathchardef\sigma="011B
+\mathchardef\tau="011C
+\mathchardef\upsilon="011D
+\mathchardef\phi="011E
+\mathchardef\chi="011F
+\mathchardef\psi="0120
+\mathchardef\omega="0121
+\mathchardef\varepsilon="0122
+\mathchardef\vartheta="0123
+\mathchardef\varpi="0124
+\mathchardef\varrho="0125
+\mathchardef\varsigma="0126
+\mathchardef\varphi="0127
+\mathchardef\Gamma="7000
+\mathchardef\Delta="7001
+\mathchardef\Theta="7002
+\mathchardef\Lambda="7003
+\mathchardef\Xi="7004
+\mathchardef\Pi="7005
+\mathchardef\Sigma="7006
+\mathchardef\Upsilon="7007
+\mathchardef\Phi="7008
+\mathchardef\Psi="7009
+\mathchardef\Omega="700A
+
+\mathchardef\aleph="0240
+\def\hbar{{\mathchar'26\mkern-9muh}}
+\mathchardef\imath="017B
+\mathchardef\jmath="017C
+\mathchardef\ell="0160
+\mathchardef\wp="017D
+\mathchardef\Re="023C
+\mathchardef\Im="023D
+\mathchardef\partial="0140
+\mathchardef\infty="0231
+\mathchardef\prime="0230
+\mathchardef\emptyset="023B
+\mathchardef\nabla="0272
+\def\surd{{\mathchar"1270}}
+\mathchardef\top="023E
+\mathchardef\bot="023F
+\def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
+ \not\mathrel{\mkern14mu}\crcr
+ \noalign{\nointerlineskip}
+ \mkern2.5mu\leaders\hrule height.34pt\hfill\mkern2.5mu\crcr}}}}
+\mathchardef\triangle="0234
+\mathchardef\forall="0238
+\mathchardef\exists="0239
+\mathchardef\neg="023A \let\lnot=\neg
+\mathchardef\flat="015B
+\mathchardef\natural="015C
+\mathchardef\sharp="015D
+\mathchardef\clubsuit="027C
+\mathchardef\diamondsuit="027D
+\mathchardef\heartsuit="027E
+\mathchardef\spadesuit="027F
+
+\mathchardef\coprod="1360
+\mathchardef\bigvee="1357
+\mathchardef\bigwedge="1356
+\mathchardef\biguplus="1355
+\mathchardef\bigcap="1354
+\mathchardef\bigcup="1353
+\mathchardef\intop="1352 \def\int{\intop\nolimits}
+\mathchardef\prod="1351
+\mathchardef\sum="1350
+\mathchardef\bigotimes="134E
+\mathchardef\bigoplus="134C
+\mathchardef\bigodot="134A
+\mathchardef\ointop="1348 \def\oint{\ointop\nolimits}
+\mathchardef\bigsqcup="1346
+\mathchardef\smallint="1273
+
+\mathchardef\triangleleft="212F
+\mathchardef\triangleright="212E
+\mathchardef\bigtriangleup="2234
+\mathchardef\bigtriangledown="2235
+\mathchardef\wedge="225E \let\land=\wedge
+\mathchardef\vee="225F \let\lor=\vee
+\mathchardef\cap="225C
+\mathchardef\cup="225B
+\mathchardef\ddagger="227A
+\mathchardef\dagger="2279
+\mathchardef\sqcap="2275
+\mathchardef\sqcup="2274
+\mathchardef\uplus="225D
+\mathchardef\amalg="2271
+\mathchardef\diamond="2205
+\mathchardef\bullet="220F
+\mathchardef\wr="226F
+\mathchardef\div="2204
+\mathchardef\odot="220C
+\mathchardef\oslash="220B
+\mathchardef\otimes="220A
+\mathchardef\ominus="2209
+\mathchardef\oplus="2208
+\mathchardef\mp="2207
+\mathchardef\pm="2206
+\mathchardef\circ="220E
+\mathchardef\bigcirc="220D
+\mathchardef\setminus="226E % for set difference A\setminus B
+\mathchardef\cdot="2201
+\mathchardef\ast="2203
+\mathchardef\times="2202
+\mathchardef\star="213F
+
+\mathchardef\propto="322F
+\mathchardef\sqsubseteq="3276
+\mathchardef\sqsupseteq="3277
+\mathchardef\parallel="326B
+\mathchardef\mid="326A
+\mathchardef\dashv="3261
+\mathchardef\vdash="3260
+\mathchardef\nearrow="3225
+\mathchardef\searrow="3226
+\mathchardef\nwarrow="322D
+\mathchardef\swarrow="322E
+\mathchardef\Leftrightarrow="322C
+\mathchardef\Leftarrow="3228
+\mathchardef\Rightarrow="3229
+\def\neq{\not=} \let\ne=\neq
+\mathchardef\leq="3214 \let\le=\leq
+\mathchardef\geq="3215 \let\ge=\geq
+\mathchardef\succ="321F
+\mathchardef\prec="321E
+\mathchardef\approx="3219
+\mathchardef\succeq="3217
+\mathchardef\preceq="3216
+\mathchardef\supset="321B
+\mathchardef\subset="321A
+\mathchardef\supseteq="3213
+\mathchardef\subseteq="3212
+\mathchardef\in="3232
+\mathchardef\ni="3233 \let\owns=\ni
+\mathchardef\gg="321D
+\mathchardef\ll="321C
+\mathchardef\not="3236
+\mathchardef\leftrightarrow="3224
+\mathchardef\leftarrow="3220 \let\gets=\leftarrow
+\mathchardef\rightarrow="3221 \let\to=\rightarrow
+\mathchardef\mapstochar="3237 \def\mapsto{\mapstochar\rightarrow}
+\mathchardef\sim="3218
+\mathchardef\simeq="3227
+\mathchardef\perp="323F
+\mathchardef\equiv="3211
+\mathchardef\asymp="3210
+\mathchardef\smile="315E
+\mathchardef\frown="315F
+\mathchardef\leftharpoonup="3128
+\mathchardef\leftharpoondown="3129
+\mathchardef\rightharpoonup="312A
+\mathchardef\rightharpoondown="312B
+
+\def\joinrel{\mathrel{\mkern-3mu}}
+\def\relbar{\mathrel{\smash-}} % \smash, because - has the same height as +
+\def\Relbar{\mathrel=}
+\mathchardef\lhook="312C \def\hookrightarrow{\lhook\joinrel\rightarrow}
+\mathchardef\rhook="312D \def\hookleftarrow{\leftarrow\joinrel\rhook}
+\def\bowtie{\mathrel\triangleright\joinrel\mathrel\triangleleft}
+\def\models{\mathrel|\joinrel=}
+\def\Longrightarrow{\Relbar\joinrel\Rightarrow}
+\def\longrightarrow{\relbar\joinrel\rightarrow}
+\def\longleftarrow{\leftarrow\joinrel\relbar}
+\def\Longleftarrow{\Leftarrow\joinrel\Relbar}
+\def\longmapsto{\mapstochar\longrightarrow}
+\def\longleftrightarrow{\leftarrow\joinrel\rightarrow}
+\def\Longleftrightarrow{\Leftarrow\joinrel\Rightarrow}
+\def\iff{\;\Longleftrightarrow\;}
+
+\mathchardef\ldotp="613A % ldot as a punctuation mark
+\mathchardef\cdotp="6201 % cdot as a punctuation mark
+\mathchardef\colon="603A % colon as a punctuation mark
+\def\ldots{\mathinner{\ldotp\ldotp\ldotp}}
+\def\cdots{\mathinner{\cdotp\cdotp\cdotp}}
+\def\vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
+ \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
+\def\ddots{\mathinner{\mkern1mu\raise7\p@\vbox{\kern7\p@\hbox{.}}\mkern2mu
+ \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu}}
+
+\def\acute{\mathaccent"7013 }
+\def\grave{\mathaccent"7012 }
+\def\ddot{\mathaccent"707F }
+\def\tilde{\mathaccent"707E }
+\def\bar{\mathaccent"7016 }
+\def\breve{\mathaccent"7015 }
+\def\check{\mathaccent"7014 }
+\def\hat{\mathaccent"705E }
+\def\vec{\mathaccent"017E }
+\def\dot{\mathaccent"705F }
+\def\widetilde{\mathaccent"0365 }
+\def\widehat{\mathaccent"0362 }
+\def\overrightarrow#1{\vbox{\m@th\ialign{##\crcr
+ \rightarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\overleftarrow#1{\vbox{\m@th\ialign{##\crcr
+ \leftarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}
+\def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}
+ \downbracefill\crcr\noalign{\kern3\p@\nointerlineskip}
+ $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
+\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
+ $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3\p@\nointerlineskip}
+ \upbracefill\crcr\noalign{\kern3\p@}}}}\limits}
+\def\skew#1#2#3{{\muskip\z@#1mu\divide\muskip\z@\tw@ \mkern\muskip\z@
+ #2{\mkern-\muskip\z@{#3}\mkern\muskip\z@}\mkern-\muskip\z@}{}}
+
+\def\lmoustache{\delimiter"437A340 } % top from (, bottom from )
+\def\rmoustache{\delimiter"537B341 } % top from ), bottom from (
+\def\lgroup{\delimiter"462833A } % extensible ( with sharper tips
+\def\rgroup{\delimiter"562933B } % extensible ) with sharper tips
+\def\arrowvert{\delimiter"26A33C } % arrow without arrowheads
+\def\Arrowvert{\delimiter"26B33D } % double arrow without arrowheads
+\def\bracevert{\delimiter"77C33E } % the vertical bar that extends braces
+\def\Vert{\delimiter"26B30D } \let\|=\Vert
+\def\vert{\delimiter"26A30C }
+\def\uparrow{\delimiter"3222378 }
+\def\downarrow{\delimiter"3223379 }
+\def\updownarrow{\delimiter"326C33F }
+\def\Uparrow{\delimiter"322A37E }
+\def\Downarrow{\delimiter"322B37F }
+\def\Updownarrow{\delimiter"326D377 }
+\def\backslash{\delimiter"26E30F } % for double coset G\backslash H
+\def\rangle{\delimiter"526930B }
+\def\langle{\delimiter"426830A }
+\def\rbrace{\delimiter"5267309 } \let\}=\rbrace
+\def\lbrace{\delimiter"4266308 } \let\{=\lbrace
+\def\rceil{\delimiter"5265307 }
+\def\lceil{\delimiter"4264306 }
+\def\rfloor{\delimiter"5263305 }
+\def\lfloor{\delimiter"4262304 }
+
+\def\bigl{\mathopen\big}
+\def\bigm{\mathrel\big}
+\def\bigr{\mathclose\big}
+\def\Bigl{\mathopen\Big}
+\def\Bigm{\mathrel\Big}
+\def\Bigr{\mathclose\Big}
+\def\biggl{\mathopen\bigg}
+\def\biggm{\mathrel\bigg}
+\def\biggr{\mathclose\bigg}
+\def\Biggl{\mathopen\Bigg}
+\def\Biggm{\mathrel\Bigg}
+\def\Biggr{\mathclose\Bigg}
+\def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
+\def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
+\def\bigg#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
+\def\Bigg#1{{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}
+\def\n@space{\nulldelimiterspace\z@ \m@th}
+
+\def\choose{\atopwithdelims()}
+\def\brack{\atopwithdelims[]}
+\def\brace{\atopwithdelims\{\}}
+
+\def\sqrt{\radical"270370 }
+
+\def\mathpalette#1#2{\mathchoice{#1\displaystyle{#2}}%
+ {#1\textstyle{#2}}{#1\scriptstyle{#2}}{#1\scriptscriptstyle{#2}}}
+\newbox\rootbox
+\def\root#1\of{\setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#1}$}
+ \mathpalette\r@@t}
+\def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\sqrt{#2}$}
+ \dimen@\ht\z@ \advance\dimen@-\dp\z@
+ \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-10mu \box\z@}
+\newif\ifv@ \newif\ifh@
+\def\vphantom{\v@true\h@false\ph@nt}
+\def\hphantom{\v@false\h@true\ph@nt}
+\def\phantom{\v@true\h@true\ph@nt}
+\def\ph@nt{\ifmmode\def\next{\mathpalette\mathph@nt}%
+ \else\let\next\makeph@nt\fi\next}
+\def\makeph@nt#1{\setbox\z@\hbox{#1}\finph@nt}
+\def\mathph@nt#1#2{\setbox\z@\hbox{$\m@th#1{#2}$}\finph@nt}
+\def\finph@nt{\setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi
+ \ifh@ \wd\tw@\wd\z@\fi \box\tw@}
+\def\mathstrut{\vphantom(}
+\def\smash{\relax % \relax, in case this comes first in \halign
+ \ifmmode\def\next{\mathpalette\mathsm@sh}\else\let\next\makesm@sh
+ \fi\next}
+\def\makesm@sh#1{\setbox\z@\hbox{#1}\finsm@sh}
+\def\mathsm@sh#1#2{\setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
+\def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \box\z@}
+
+\def\cong{\mathrel{\mathpalette\@vereq\sim}} % congruence sign
+\def\@vereq#1#2{\lower.5\p@\vbox{\lineskiplimit\maxdimen\lineskip-.5\p@
+ \ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
+\def\notin{\mathrel{\mathpalette\c@ncel\in}}
+\def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}
+\def\rightleftharpoons{\mathrel{\mathpalette\rlh@{}}}
+\def\rlh@#1{\vcenter{\m@th\hbox{\ooalign{\raise2pt
+ \hbox{$#1\rightharpoonup$}\crcr
+ $#1\leftharpoondown$}}}}
+\def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}}
+\def\doteq{\buildrel\textstyle.\over=}
+
+\def\log{\mathop{\rm log}\nolimits}
+\def\lg{\mathop{\rm lg}\nolimits}
+\def\ln{\mathop{\rm ln}\nolimits}
+\def\lim{\mathop{\rm lim}}
+\def\limsup{\mathop{\rm lim\,sup}}
+\def\liminf{\mathop{\rm lim\,inf}}
+\def\sin{\mathop{\rm sin}\nolimits}
+\def\arcsin{\mathop{\rm arcsin}\nolimits}
+\def\sinh{\mathop{\rm sinh}\nolimits}
+\def\cos{\mathop{\rm cos}\nolimits}
+\def\arccos{\mathop{\rm arccos}\nolimits}
+\def\cosh{\mathop{\rm cosh}\nolimits}
+\def\tan{\mathop{\rm tan}\nolimits}
+\def\arctan{\mathop{\rm arctan}\nolimits}
+\def\tanh{\mathop{\rm tanh}\nolimits}
+\def\cot{\mathop{\rm cot}\nolimits}
+\def\coth{\mathop{\rm coth}\nolimits}
+\def\sec{\mathop{\rm sec}\nolimits}
+\def\csc{\mathop{\rm csc}\nolimits}
+\def\max{\mathop{\rm max}}
+\def\min{\mathop{\rm min}}
+\def\sup{\mathop{\rm sup}}
+\def\inf{\mathop{\rm inf}}
+\def\arg{\mathop{\rm arg}\nolimits}
+\def\ker{\mathop{\rm ker}\nolimits}
+\def\dim{\mathop{\rm dim}\nolimits}
+\def\hom{\mathop{\rm hom}\nolimits}
+\def\det{\mathop{\rm det}}
+\def\exp{\mathop{\rm exp}\nolimits}
+\def\Pr{\mathop{\rm Pr}}
+\def\gcd{\mathop{\rm gcd}}
+\def\deg{\mathop{\rm deg}\nolimits}
+
+\def\bmod{\nonscript\mskip-\medmuskip\mkern5mu
+ \mathbin{\rm mod}\penalty900\mkern5mu\nonscript\mskip-\medmuskip}
+\def\pmod#1{\allowbreak\mkern18mu({\rm mod}\,\,#1)}
+
+\def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th
+ \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right.}
+\def\matrix#1{\null\,\vcenter{\normalbaselines\m@th
+ \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
+ \mathstrut\crcr\noalign{\kern-\baselineskip}
+ #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
+\def\pmatrix#1{\left(\matrix{#1}\right)}
+\newdimen\p@renwd
+\setbox0=\hbox{\tenex B} \p@renwd=\wd0 % width of the big left (
+\def\bordermatrix#1{\begingroup \m@th
+ \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}%
+ \ialign{$##$\hfil\kern2\p@\kern\p@renwd&\thinspace\hfil$##$\hfil
+ &&\quad\hfil$##$\hfil\crcr
+ \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}%
+ #1\crcr\omit\strut\cr}}%
+ \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}%
+ \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}%
+ \setbox\tw@\hbox{$\kern\wd\@ne\kern-\p@renwd\left(\kern-\wd\@ne
+ \global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
+ \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right)$}%
+ \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}
+
+\def\openup{\afterassignment\@penup\dimen@=}
+\def\@penup{\advance\lineskip\dimen@
+ \advance\baselineskip\dimen@
+ \advance\lineskiplimit\dimen@}
+\def\eqalign#1{\null\,\vcenter{\openup\jot\m@th
+ \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
+ \crcr#1\crcr}}\,}
+\newif\ifdt@p
+\def\displ@y{\global\dt@ptrue\openup\jot\m@th
+ \everycr{\noalign{\ifdt@p \global\dt@pfalse \ifdim\prevdepth>-1000\p@
+ \vskip-\lineskiplimit \vskip\normallineskiplimit \fi
+ \else \penalty\interdisplaylinepenalty \fi}}}
+\def\@lign{\tabskip\z@skip\everycr{}} % restore inside \displ@y
+\def\displaylines#1{\displ@y \tabskip\z@skip
+ \halign{\hbox to\displaywidth{$\@lign\hfil\displaystyle##\hfil$}\crcr
+ #1\crcr}}
+\def\eqalignno#1{\displ@y \tabskip\centering
+ \halign to\displaywidth{\hfil$\@lign\displaystyle{##}$\tabskip\z@skip
+ &$\@lign\displaystyle{{}##}$\hfil\tabskip\centering
+ &\llap{$\@lign##$}\tabskip\z@skip\crcr
+ #1\crcr}}
+\def\leqalignno#1{\displ@y \tabskip\centering
+ \halign to\displaywidth{\hfil$\@lign\displaystyle{##}$\tabskip\z@skip
+ &$\@lign\displaystyle{{}##}$\hfil\tabskip\centering
+ &\kern-\displaywidth\rlap{$\@lign##$}\tabskip\displaywidth\crcr
+ #1\crcr}}
+
+% Definitions related to output
+
+\message{output routines,}
+
+\countdef\pageno=0 \pageno=1 % first page is number 1
+\newtoks\headline \headline={\hfil} % headline is normally blank
+\newtoks\footline \footline={\hss\tenrm\folio\hss}
+ % footline is normally a centered page number in font \tenrm
+\newif\ifr@ggedbottom
+\def\raggedbottom{\topskip 10\p@ plus60\p@ \r@ggedbottomtrue}
+\def\normalbottom{\topskip 10\p@ \r@ggedbottomfalse} % undoes \raggedbottom
+\def\folio{\ifnum\pageno<\z@ \romannumeral-\pageno \else\number\pageno \fi}
+\def\nopagenumbers{\footline{\hfil}} % blank out the footline
+\def\advancepageno{\ifnum\pageno<\z@ \global\advance\pageno\m@ne
+ \else\global\advance\pageno\@ne \fi} % increase |pageno|
+
+\newinsert\footins
+\def\footnote#1{\let\@sf\empty % parameter #2 (the text) is read later
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+ #1\@sf\vfootnote{#1}}
+\def\vfootnote#1{\insert\footins\bgroup
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
+ \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
+ \textindent{#1}\footstrut\futurelet\next\fo@t}
+\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
+ \else\let\next\f@t\fi \next}
+\def\f@@t{\bgroup\aftergroup\@foot\let\next}
+\def\f@t#1{#1\@foot}
+\def\@foot{\strut\egroup}
+\def\footstrut{\vbox to\splittopskip{}}
+\skip\footins=\bigskipamount % space added when footnote is present
+\count\footins=1000 % footnote magnification factor (1 to 1)
+\dimen\footins=8in % maximum footnotes per page
+
+\newinsert\topins
+\newif\ifp@ge \newif\if@mid
+\def\topinsert{\@midfalse\p@gefalse\@ins}
+\def\midinsert{\@midtrue\@ins}
+\def\pageinsert{\@midfalse\p@getrue\@ins}
+\skip\topins=\z@skip % no space added when a topinsert is present
+\count\topins=1000 % magnification factor (1 to 1)
+\dimen\topins=\maxdimen % no limit per page
+\def\@ins{\par\begingroup\setbox\z@\vbox\bgroup} % start a \vbox
+\def\endinsert{\egroup % finish the \vbox
+ \if@mid \dimen@\ht\z@ \advance\dimen@\dp\z@ \advance\dimen@12\p@
+ \advance\dimen@\pagetotal \advance\dimen@-\pageshrink
+ \ifdim\dimen@>\pagegoal\@midfalse\p@gefalse\fi\fi
+ \if@mid \bigskip\box\z@\bigbreak
+ \else\insert\topins{\penalty100 % floating insertion
+ \splittopskip\z@skip
+ \splitmaxdepth\maxdimen \floatingpenalty\z@
+ \ifp@ge \dimen@\dp\z@
+ \vbox to\vsize{\unvbox\z@\kern-\dimen@}% depth is zero
+ \else \box\z@\nobreak\bigskip\fi}\fi\endgroup}
+
+\output{\plainoutput}
+\def\plainoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}%
+ \advancepageno
+ \ifnum\outputpenalty>-\@MM \else\dosupereject\fi}
+\def\pagebody{\vbox to\vsize{\boxmaxdepth\maxdepth \pagecontents}}
+\def\makeheadline{\vbox to\z@{\vskip-22.5\p@
+ \line{\vbox to8.5\p@{}\the\headline}\vss}\nointerlineskip}
+\def\makefootline{\baselineskip24\p@\line{\the\footline}}
+\def\dosupereject{\ifnum\insertpenalties>\z@ % something is being held over
+ \line{}\kern-\topskip\nobreak\vfill\supereject\fi}
+
+\def\pagecontents{\ifvoid\topins\else\unvbox\topins\fi
+ \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
+ \ifvoid\footins\else % footnote info is present
+ \vskip\skip\footins
+ \footnoterule
+ \unvbox\footins\fi
+ \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+\def\footnoterule{\kern-3\p@
+ \hrule width 2truein \kern 2.6\p@} % the \hrule is .4pt high
+
+% Hyphenation, miscellaneous macros, and initial values for standard layout
+\message{hyphenation}
+
+\lefthyphenmin=2 \righthyphenmin=3 % disallow x- or -xx breaks
+\input hyphen
+
+\def\magnification{\afterassignment\m@g\count@}
+\def\m@g{\mag\count@
+ \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
+
+\def\tracingall{\tracingonline\@ne\tracingcommands\tw@\tracingstats\tw@
+ \tracingpages\@ne\tracingoutput\@ne\tracinglostchars\@ne
+ \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne
+ \showboxbreadth\maxdimen\showboxdepth\maxdimen\errorstopmode}
+
+\def\showhyphens#1{\setbox0\vbox{\parfillskip\z@skip\hsize\maxdimen\tenrm
+ \pretolerance\m@ne\tolerance\m@ne\hbadness0\showboxdepth0\ #1}}
+
+\normalbaselines\rm % select roman font
+\nonfrenchspacing % punctuation affects the spacing
+\catcode`@=12 % at signs are no longer letters
+
+\def\fmtname{plain}\def\fmtversion{3.14159} % identifies the current format
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex new file mode 100644 index 000000000..87586326e --- /dev/null +++ b/tex/context/base/spec-ini.tex @@ -0,0 +1,869 @@ +%D \module
+%D [ file=spec-ini,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Specials are \TEX's channel to the outside world. They make
+%D \TEX\ even more platform independant and permit easy
+%D adaption to new developments. One major drawback of specials
+%D is that they have to be supported by printer drivers. We've
+%D tried to overcome this problem by implementinmg specials as
+%D a sort of drivers themselves.
+
+\writestatus{loading}{Context Special Macros / Initialization}
+
+\unprotect
+
+\startmessages dutch library: specials
+ title: specials
+ 1: -- geladen
+ 2: verdere nesting is niet toegestaan --
+ 3: -- gereset
+ 4: commando -- bestaat niet
+ 5: definitiefile -- wordt geladen
+ 6: nesting is niet toegestaan
+\stopmessages
+
+\startmessages english library: specials
+ title: specials
+ 1: -- loaded
+ 2: no deeper nesting is permitted --
+ 3: -- is reset
+ 4: command -- does not exist
+ 5: loading definition file --
+ 6: nesting is not permitted
+\stopmessages
+
+\startmessages german library: specials
+ title: spezielles
+ 1: -- geladen
+ 2: Keine tiefere Verschachtelung erlaubt --
+ 3: -- ist zurueckgesetzt
+ 4: Befehl -- existiert nicht
+ 5: Lade Definitionsdatei --
+ 6: Verschachtelung nicht erlaubt
+\stopmessages
+
+\startmessages dutch library: interactions
+ 21: -- code tussengevoegd
+\stopmessages
+
+\startmessages english library: interactions
+ 21: -- code inserted
+\stopmessages
+
+\startmessages german library: interactions
+ 21: -- Code eingefuegt
+\stopmessages
+
+%D Because there is no standardization in the use of specials,
+%D more than one driver or program can be supported. The
+%D specials are grouped in libraries. Some of these are
+%D general, such as the \type{postscript} library, some are
+%D tuned to a special kind of program, like the \type{pdf}
+%D ones, and some support a specific driver, as we can see in
+%D the \type{yandy} library. A library is build with the
+%D commands:
+%D
+%D \starttypen
+%D \startspecials[name][inheritance]
+%D
+%D \definespecial\none{...}
+%D \definespecial\onlyone#1{...}
+%D \definespecial\alot#1#2#3#4{...}
+%D
+%D \stopspecials
+%D \stoptypen
+%D
+%D Because drivers show some overlap in their support of
+%D specials, a mechanism of inheritance is implemented. The
+%D predefined libraries show this feature.
+%D
+%D Every special has to be predefined first. We do this with
+%D the command:
+%D
+%D \starttypen
+%D \installspecial [\none] [and] [0]
+%D \installspecial [\onlyone] [and] [1]
+%D \installspecial [\alot] [or] [4]
+%D \stoptypen
+%D
+%D This means as much as: there is a special names
+%D \type{\none} which has no arguments and has more than one
+%D appearance. The special \type{\alot} on the other hand has
+%D four arguments and is only defined once. Every instance in
+%D the libraries of a special of category \type{and} is
+%D executed when called upon, but only one special of
+%D category \type{or} can be active. Most of the
+%D \type{postscript}||specials are of category \type{or},
+%D because they tend to interfere with driver specific ones.
+%D The interactive specials of \type{dviwindo} and \type{pdf}
+%D are an example of specials that can be called both.
+%D
+%D A library is defined in a file with the name
+%D \type{spec-...}. We load a library with the command:
+%D
+%D \starttypen
+%D \usespecials [list]
+%D \stoptypen
+%D
+%D where the list can contain one or more file tags, the
+%D \type{...} in the filename. The keyword \type{reset}
+%D resets all loaded specials. This is equivalent to
+%D \type{\resetspecials}.
+
+%D Although a mechanism of nesting can be implemented, we
+%D prefer to use a inheritance mechanism as mentioned. Calls
+%D upon \type{\usespecials} within a \type{\startspecials}
+%D would lead to confusion and errors.
+
+\newif\ifinheritspecials
+
+%D We define some local constants and variables. They look a
+%D bit horrible but we don't want conflicts.
+
+\def\@@specfil@@{@@specfil@@}
+\def\@@speclst@@{@@speclst@@}
+\def\@@speccat@@{@@speccat@@}
+\def\@@specarg@@{@@specarg@@}
+\def\@@specexc@@{@@specexc@@}
+
+\def\currentspecial {}
+\def\currentspecialfile {}
+\def\preloadedspecials {}
+
+%D \macros
+%D {preloadspecials}
+%D {}
+%D
+%D The following command can be used to show the loaded list
+%D of specials.
+
+\def\preloadspecials%
+ {\doifsomething{\preloadedspecials}
+ {\showmessage{\m!specials}{1}{\preloadedspecials}}}
+
+%D \macros
+%D {startspecials}
+%D {}
+%D
+%D Every library has a unique name, which is given as the first
+%D argument to \type{\startspecials}. When another library is
+%D defined with the same name, previous specials can be
+%D overruled. The name may differ from the file||tag.
+%D
+%D The optional second argument can consist of a list of
+%D libraries that are to be loaded first. This list can contain
+%D file||tags or names of libraries. Names are often more
+%D meaningful.
+
+\def\dostartspecials[#1][#2]%
+ {\let\mainspecialfile=\currentspecialfile
+ \doifelsenothing{#2}
+ {\inheritspecialsfalse}
+ {\ifinheritspecials
+ \showmessage{\m!specials}{2}{(#2)}%
+ \else
+ \inheritspecialstrue
+ \processcommalist[#2]\dousespecials
+ \inheritspecialsfalse
+ \fi}%
+ \doifelsenothing{#1}
+ {\def\currentspecial{\s!unknown}}
+ {\def\currentspecial{#1}}%
+ \let\currentspecialfile=\mainspecialfile
+ \setevalue{\@@specfil@@\currentspecial}{\currentspecialfile}%
+ \unprotect
+ \addtocommalist{\currentspecial}\preloadedspecials}
+
+\def\startspecials%
+ {\dodoubleempty\dostartspecials}
+
+\def\stopspecials%
+ {\def\currentspecial{}%
+ \protect}
+
+%D \macros
+%D {installspecial,
+%D resetspecials}
+%D {}
+%D
+%D We have to install specials before we can define and use
+%D them. The command itself is defined as a call to another
+%D command that executes one or more user||defined specials,
+%D depending of it's category: \type{or} versus \type{and}.
+%D
+%D The command \type{\installspecial} takes three
+%D (non||optional) arguments: the name of the command, the
+%D category it belongs to and the number of arguments it
+%D takes.
+%D
+%D With \type{\resetspecials} we can unload the predefined
+%D specials.
+
+\def\@@allspecials{}
+
+\def\doinstallspecial[#1][#2][#3]%
+ {\setvalue{\@@speclst@@\string#1}{}%
+ \setvalue{\@@speccat@@\string#1}{#2}%
+ \setvalue{\@@specarg@@\string#1}{#3}%
+ \addtocommalist{\string#1}\@@allspecials
+ \def#1{\executespecial#1}}
+
+\def\installspecial%
+ {\dotripleargument\doinstallspecial}
+
+\def\resetspecials%
+ {\def\docommando##1%
+ {\setvalue{\@@speclst@@##1}{}}%
+ \processcommacommand[\@@allspecials]\docommando
+ \showmessage{\m!specials}{3}{\preloadedspecials}%
+ \def\preloadedspecials{}%
+ \def\@@allspecials{}}
+
+%D \macros
+%D {definespecial}
+%D {}
+%D
+%D The command \type{\definespecial} take the place of
+%D \type{\def} in the definition of a special. Just to be
+%D sure, we first check if the command is permitted, i.e.
+%D installed. If not, we give a warning and gobble the
+%D illegal command in an quite elegant way.
+%D
+%D If the command can be combined (\type{and}) with others,
+%D we append it to a list, otherwise (\type{or}) it becomes
+%D the only item in the list.
+
+\def\definespecial#1%
+ {\ifx#1\undefined
+ \showmessage{\m!specials}{4}{\string#1}%
+ \def\next%
+ {\def\@@illegalspecial@@}%
+ \else
+ \def\next%
+ {\doifelse{\getvalue{\@@speccat@@\string#1}}{or}
+ {\edef\@@newspeclst@@{\currentspecial}}
+ {\edef\@@newspeclst@@{\getvalue{\@@speclst@@\string#1}}%
+ \addtocommalist{\currentspecial}\@@newspeclst@@}%
+ \setevalue{\@@speclst@@\string#1}{\@@newspeclst@@}%
+ \setvalue{\currentspecial\string#1}}%
+ \fi
+ \next}
+
+%D \macros
+%D {usespecials}
+%D {}
+%D
+%D We use \type{\usespecials} to load a specific library.
+%D This command is only permitted outside de definition part.
+
+\def\dousespecials#1%
+ {\doifelse{#1}{\v!reset}
+ {\resetspecials}
+ {\doifdefinedelse{\@@specfil@@#1}
+ {\edef\currentspecialfile{\getvalue{\@@specfil@@#1}}}
+ {\edef\currentspecialfile{#1}}%
+ \showmessage{\m!specials}{5}{\f!specialprefix\currentspecialfile}%
+ \readsysfile{\f!specialprefix\currentspecialfile}{}{}%
+ \showmessage{\m!specials}{1}{\preloadedspecials}}}
+
+\def\usespecials[#1]%
+ {\doifelsenothing{\currentspecial}
+ {\processcommalist[#1]\dousespecials}
+ {\showmessage{\m!specials}{6}{}}}
+
+%D \macros
+%D {executespecials}
+%D {}
+%D
+%D The command \type{\executespecials} is used to execute the
+%D defined specials. Once a special is installed, the special
+%D itself calls for this command, so it's not needed outside
+%D this module. One can use it if wanted.
+%D
+%D A former implementation grouped the execution. Recent
+%D additions however |<|like the specials that implement object
+%D handling|>| asked for non||grouped execution.
+
+\def\executespecials#1#2%
+ {\def\doonespecial##1%
+ {\getvalue{##1\string#1}#2\relax}%
+ \processcommacommand
+ [\getvalue{\@@speclst@@\string#1}]\doonespecial}
+
+\def\executespecial#1%
+ {\expandafter\ifcase\getvalue{\@@specarg@@\string#1}\relax
+ \def\next%
+ {\executespecials#1{}}%
+ \or
+ \def\next##1%
+ {\executespecials#1{{##1}}}%
+ \or
+ \def\next##1##2%
+ {\executespecials#1{{##1}{##2}}}%
+ \or
+ \def\next##1##2##3%
+ {\executespecials#1{{##1}{##2}{##3}}}%
+ \or
+ \def\next##1##2##3##4%
+ {\executespecials#1{{##1}{##2}{##3}{##4}}}%
+ \or
+ \def\next##1##2##3##4##5%
+ {\executespecials#1{{##1}{##2}{##3}{##4}{##5}}}%
+ \or
+ \def\next##1##2##3##4##5##6%
+ {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}}}%
+ \or
+ \def\next##1##2##3##4##5##6##7%
+ {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}}%
+ \or
+ \def\next##1##2##3##4##5##6##7##8%
+ {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}}%
+ \or
+ \def\next##1##2##3##4##5##6##7##8##9%
+ {\executespecials#1{{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}}%
+ \else
+ \def\next%
+ {\message{illegal special: \string#1}}%
+ \fi
+ \next}
+
+%D The \type{{{...}}} are needed because we pass all those
+%D arguments to the specials support macro.
+
+\let\openspecialfile = \relax
+\let\closespecialfile = \relax
+
+% %D This is some new, experimental code, used for testing some
+% %D proposals of Laurent Siebenmann on behalf of the
+% %D \kap{EMJ} discussionlist.
+%
+% \newif\ifexternalspecials \externalspecialsfalse
+% \newif\ifspecialstatus \specialstatustrue
+%
+% \newwrite\specialfile
+%
+% \def\openspecialfile%
+% {\immediate\openout\specialfile=\jobname.etc\relax}
+%
+% \def\closespecialfile%
+% {\immediate\closeout\specialfile}
+%
+% \let\internalspecial=\special
+%
+% \def\externalspecial#1%
+% {\internalspecial{}%
+% \immediate\write\specialfile{\currentspecialdriver\space: #1}}
+%
+% \def\doinstallspecial[#1][#2][#3]%
+% {\setvalue{\@@specexc@@\string#1}{}%
+% \setvalue{\@@speclst@@\string#1}{}%
+% \setvalue{\@@speccat@@\string#1}{#2}%
+% \setvalue{\@@specarg@@\string#1}{#3}%
+% \addtocommalist{\string#1}\@@allspecials
+% \def#1{\executespecial#1}}
+%
+% \def\resetspecials%
+% {\def\docommando##1%
+% {\setvalue{\@@specexc@@##1}{}%
+% \setvalue{\@@speclst@@##1}{}}%
+% \processcommacommand[\@@allspecials]\docommando
+% \showmessage{\m!specials}{3}{\preloadedspecials}}
+%
+% \def\executespecials#1#2%
+% {\edef\supportedspecials{\getvalue{\@@speclst@@\string#1}}%
+% \def\doonespecial##1%
+% {\doifdefined{##1\string#1}
+% {\def\currentspecialdriver{##1}%
+% \getvalue{##1\string#1}#2\relax}}%
+% \ifexternalspecials
+% \let\special=\externalspecial
+% \doifelse{\supportedspecials}{}
+% {\ifspecialstatus
+% \immediate\write\specialfile{}%
+% \immediate\write\specialfile{skipping : \string#1}
+% \immediate\write\specialfile{}%
+% \fi}
+% {\ifspecialstatus
+% \immediate\write\specialfile{}%
+% \immediate\write\specialfile{executing : \string#1}%
+% \immediate\write\specialfile{supported : \supportedspecials}%
+% \fi
+% \immediate\write\specialfile{}%
+% \processcommacommand[\supportedspecials]\doonespecial}%
+% \else
+% \let\special=\internalspecial
+% \doifelse{\getvalue{\@@speccat@@\string#1}}{or}
+% {\doonespecial{\getvalue{\@@specexc@@\string#1}}}
+% {\processcommacommand[\supportedspecials]\doonespecial}%
+% \fi}
+%
+% \def\definespecial#1%
+% {\ifx#1\undefined
+% \showmessage{\m!specials}{4}{\string#1}%
+% \def\next%
+% {\def\@@illegalspecial@@}%
+% \else
+% \def\next%
+% {\edef\@@newspeclst@@{\getvalue{\@@speclst@@\string#1}}%
+% \addtocommalist{\currentspecial}\@@newspeclst@@
+% \setevalue{\@@speclst@@\string#1}{\@@newspeclst@@}%
+% \setevalue{\@@specexc@@\string#1}{\currentspecial}%
+% \setvalue{\currentspecial\string#1}}%
+% \fi
+% \next}
+%
+% %D So far for the experiment.
+
+\protect
+
+% \startspecials
+% \stopspecials
+% \installspecial
+% \definespecial
+
+%D The following libraries are defined. Two postscript
+%D drivers are supported, as well as two mechanisms for
+%D interactive texts.
+%D
+%D \startregelcorrectie
+%D \starttabel[|l|l|l|l|l|]
+%D \HL
+%D \NC \bf file \NC
+%D \bf name \NC
+%D \bf calls \NC
+%D \bf support \NC
+%D \bf program / driver \NC\SR
+%D \HL
+%D \NC \tttf spec-tex \NC
+%D \tttf tex \NC
+%D \NC
+%D Generic \TEX\ (\DVI) \NC
+%D (default) \NC\FR
+%D \NC \tttf spec-ps \NC
+%D \tttf postscript \NC
+%D \NC
+%D Adobe PostScript \NC
+%D (default) \NC\MR
+%D \NC \tttf spec-tr \NC
+%D \tttf rokicky \NC
+%D \tttf postscript \NC
+%D Thomas Rokicky \NC
+%D (dvips) \NC\MR
+%D \NC \tttf spec-yy \NC
+%D \tttf yandy \NC
+%D \tttf postscript \NC
+%D YandY \NC
+%D (dvipsone, dviwindo) \NC\MR
+%D \NC \tttf spec-pdf \NC
+%D \tttf pdf \NC
+%D \NC
+%D Adobe PDF V2.1 \NC
+%D (Acrobat) \NC\MR
+%D \NC \tttf spec-win \NC
+%D \tttf dviwindo \NC
+%D YandY \NC
+%D (dviwindo) \NC\MR
+%D \NC \tttf spec-1p0 \NC
+%D \tttf pdf \NC
+%D \NC
+%D Adobe PDF V 1.0 \NC
+%D (Acrobat) \NC\MR
+%D \NC \tttf spec-2p0 \NC
+%D \tttf pdf \NC
+%D \NC
+%D Adobe PDF V 2.0 \NC
+%D (Acrobat) \NC\MR
+%D \NC \tttf spec-htm \NC
+%D \tttf html \NC
+%D \NC
+%D HTML V 2.0 \NC
+%D (dvips) \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+
+%D \macros
+%D {dostartgraymode,dostopgraymode,
+%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode}
+%D {}
+%D
+%D We start with the installation of color and grayscale
+%D specials. The values are in the range 0..1 (e.g. 0.25).
+%D
+%D \starttypen
+%D \dostartgraymode {gray} ... \dostopgraymode
+%D \dostartrgbcolormode {red} {green} {blue} ... \dostopcolormode
+%D \dostartcmykcolormode {cyan} {magenta} {yellow} {black} ... \dostopcolormode
+%D \dostartgraycolormode {gray} ... \dostopcolormode
+%D \stoptypen
+%D
+%D Because we can expect conflicts between drivers, we
+%D implement them as category \type{or}. In previous versions
+%D of \DVIPSONE\ the use of their color||specials did not
+%D interfere with the PostScript ones, but recent versions do.
+
+\installspecial [\dostartgraymode] [or] [1]
+\installspecial [\dostopgraymode] [or] [0]
+
+\installspecial [\dostartrgbcolormode] [or] [3]
+\installspecial [\dostartcmykcolormode] [or] [4]
+\installspecial [\dostartgraycolormode] [or] [1]
+\installspecial [\dostopcolormode] [or] [0]
+
+%D \macros
+%D {doinsertfile}
+%D {}
+%D
+%D Probably the most problematic special is the following
+%D one. Because we want to be able to support different
+%D schemes, we pass a lot of data to it.
+%D
+%D \starttypen
+%D \doinsertfile {type,method} {file} {xscale} {yscale} {x} {y} {w} {h} {options}
+%D \stoptypen
+%D
+%D The scale is given percents, the other values are base
+%D points.
+%D
+%D The special is implemented as \type{or}. Because
+%D \DVIPSONE\ understands them all, a chain of alternatives
+%D would generate multiple courrences of the same
+%D illustration.
+%D
+%D When option 1 is passed, the viewers is asked to present a
+%D preview, like the first frame of a movie.
+
+\installspecial [\doinsertfile] [or] [9]
+
+%D \macros
+%D {dostartrotation,
+%D dostoprotation}
+%D {}
+%D
+%D We support rotation with the special:
+%D
+%D \starttypen
+%D \dostartrotation {angle} ... \dostoprotation
+%D \stoptypen
+%D
+%D For the moment these specials are installed as
+%D category \type{or}.
+
+\installspecial [\dostartrotation] [or] [1]
+\installspecial [\dostoprotation] [or] [0]
+
+%D \macros
+%D {doselectfirstpaperbin,
+%D doselectsecondpaperbin}
+%D {}
+%D
+%D Here are some very printer||specific ones. No further
+%D comment.
+
+\installspecial [\doselectfirstpaperbin] [or] [0]
+\installspecial [\doselectsecondpaperbin] [or] [0]
+
+%D \macros
+%D {doovalbox}
+%D {}
+%D
+%D When we look at the implementation, this is a complicated
+%D one. There are seven arguments.
+%D
+%D \starttypen
+%D \doovalbox {w} {h} {d} {linewidth} {radius} {stroke} {fill}
+%D \stoptypen
+%D
+%D This command has to return a \type{\vbox} which can be used
+%D to lay over another one (with text). The radius is in
+%D degrees, the stroke and fill are~\type{1} (true) of~\type{0}
+%D (false).
+
+\installspecial [\doovalbox] [or] [7]
+
+%D \macros
+%D {dosetupidentity}
+%D {}
+%D
+%D We can declare some characteristics of the document with
+%D
+%D \starttypen
+%D \dosetupidentity {title} {subject} {author} {creator} {date}
+%D \stoptypen
+%D
+%D All data is in string format.
+
+\installspecial [\dosetupidentity] [and] [5]
+
+%D \macros
+%D {dosetuppaper}
+%D {}
+%D
+%D This special can be used to tell the driver what page size
+%D to use. The special takes three arguments.
+%D
+%D \starttypen
+%D \dosetuppaper {type} {width} {height}
+%D \stoptypen
+%D
+%D The type is one of the common identifiers, like A4, A5 or
+%D B2.
+
+\installspecial [\dosetuppaper] [and] [3]
+
+%D \macros
+%D {dosetupprinter}
+%D {}
+%D
+%D Some drivers enable the user to specify the paper type
+%D used and/or page dimensions to be taken into account.
+%D
+%D \starttypen
+%D \dosetupprinter {type} {hoffset} {voffset} {width} {height}
+%D \stoptypen
+%D
+%D The first argument is one of \type{letter}, \type{legal},
+%D \type{A4}, \type{A5} etc. The dimensions are in
+%D basepoints.
+
+\installspecial [\dosetupprinter] [and] [5]
+
+%D \macros
+%D {dosetuppage,
+%D dosetupinteraction,
+%D dosetupscreen}
+%D {}
+%D
+%D Here come some obscure interactive commands. Probably the
+%D specs will change with the development of the macros that
+%D use them.
+%D
+%D The first ones can be used to set up the interaction.
+%D
+%D \starttypen
+%D \dosetupinteraction
+%D \stoptypen
+%D
+%D Normally this command does nothing but giving a message
+%D that some scheme is supported. Postscript prolog files
+%D can best be loaded by the printer driver program.
+%D
+%D The second one sets up the screen. It takes three
+%D arguments:
+%D
+%D \starttypen
+%D \dosetupscreen {hoffset} {voffset} {width} {height} {options}
+%D \stoptypen
+%D
+%D The first four arguments are in scaled points. Option~1
+%D results in a full screen launch.
+
+\installspecial [\dosetupinteraction] [and] [0]
+\installspecial [\dosetupscreen] [and] [5]
+
+%D \macros
+%D {dostarthide,
+%D dostophide}
+%D {}
+%D
+%D Not every part of the screen is suitable for paper. Menus
+%D for instance have no meaning on an non||interactive medium.
+%D These elements are hidden by means of:
+%D
+%D \starttypen
+%D \dostarthide
+%D \dostophide
+%D \stoptypen
+
+\installspecial [\dostarthide] [or] [0]
+\installspecial [\dostophide] [or] [0]
+
+%D \macros
+%D {dostartgotolocation, dostopgotolocation,
+%D dostartgotorealpage, dostopgotorealpage}
+%D {}
+%D
+%D The interactive real work is done by the following four
+%D specials. The reason for providing the first one with both
+%D a label and a number, is a result of the quite poor
+%D implementation of \type{pdfmarks} in version 1.0 of
+%D Acrobat. Because only pagenumbers were supported as
+%D destination, we had to provide both labels (\DVIWINDO) and
+%D pagenumbers (\PDF). Some drivers use start stop pairs.
+%D
+%D \starttypen
+%D \dostartgotolocation {w} {h} {url} {file} {label} {page}
+%D \dostartgotorealpage {w} {h} {url} {file} {page}
+%D \stoptypen
+%D
+%D Their counterparts are:
+%D
+%D \starttypen
+%D \dostopgotolocation
+%D \dostopgotorealpage
+%D \stoptypen
+%D
+%D The internal alternative is used for system||generated
+%D links, the external one for user||generated links. The
+%D Uniform Resource Locator can be used to let the reader
+%D surf the net.
+
+\installspecial [\dostartgotolocation] [and] [6]
+\installspecial [\dostopgotolocation] [and] [0]
+\installspecial [\dostartgotorealpage] [and] [5]
+\installspecial [\dostopgotorealpage] [and] [0]
+
+%D \macros
+%D {dostartthisislocation, dostopthisislocation,
+%D dostartthisisrealpage, dostopthisisrealpage}
+%D {}
+%D
+%D The opposite commands of \type{\dogotosomething} have only
+%D one argument:
+%D
+%D \starttypen
+%D \dostartthisislocation {label}
+%D \dostartthisisrealpage {page}
+%D \stoptypen
+%D
+%D These commands are accompanied by:
+%D
+%D \starttypen
+%D \dostopthisislocation
+%D \dostopthisisrealpage
+%D \stoptypen
+%D
+%D As with all interactive commands's they are installed as
+%D \type{and} category specials.
+
+\installspecial [\dostartthisislocation] [and] [1]
+\installspecial [\dostopthisislocation] [and] [0]
+\installspecial [\dostartthisisrealpage] [and] [1]
+\installspecial [\dostopthisisrealpage] [and] [0]
+
+%D \macros
+%D {dostartexecutecommand, dostopexecutecommand}
+%D {}
+%D
+%D The actual behavior of the next pair of commands depends
+%D much on the viewing engine. Therefore one cannot depend
+%D too much on their support.
+%D
+%D \starttypen
+%D \dostartexecutecommand {w} {h} {command} {options}
+%D \stoptypen
+%D
+%D
+%D The next commands are supported:
+%D
+%D \startregelcorrectie\steluitlijnenin[midden]\leavevmode
+%D \starttabel[|l|l|]
+%D \HL
+%D \NC \bf command \NC \bf action \NC\SR
+%D \HL
+%D \NC first \NC go to the first page \NC\FR
+%D \NC previous \NC go to the previous page \NC\MR
+%D \NC next \NC go to the next page \NC\MR
+%D \NC last \NC go to the last page \NC\MR
+%D \NC backward \NC go back to the link list \NC\MR
+%D \NC forward \NC go forward in the link list \NC\MR
+%D \NC print \NC enter print mode \NC\MR
+%D \NC exit \NC exit viewer \NC\MR
+%D \NC close \NC close document \NC\MR
+%D \NC enter \NC enter viewer \NC\MR
+%D \NC help \NC show help on the viewer \NC\LR
+%D \HL
+%D \stoptabel
+%D \stopregelcorrectie
+%D
+%D There are no options yet. Options are to be passed as a
+%D comma separated list of assignments.
+
+\installspecial [\dostartexecutecommand] [and] [4]
+\installspecial [\dostopexecutecommand] [and] [0]
+
+%D \macros
+%D {dostartobject,
+%D dostopobject,
+%D doinsertobject}
+%D {}
+%D
+%D Reuse of object can reduce the output filesize
+%D considerably. Reusable objects are implemented with:
+%D
+%D \starttypen
+%D \dostartobject{name}{width}{height}{depth}
+%D some typeset material
+%D \dostopobject
+%D \stoptypen
+%D
+%D \starttypen
+%D \doinsertobject{name}
+%D \stoptypen
+%D
+%D The savings can be huge in interactive texts.
+
+\installspecial [\dostartobject] [or] [4]
+\installspecial [\dostopobject] [or] [0]
+\installspecial [\doinsertobject] [or] [1]
+
+%D \macros
+%D {dostartrunprogram, dostoprunprogram,
+%D dostartgotoprofile, dostopgotoprofile,
+%D dobeginofprofile,
+%D doendofprofile}
+%D {}
+%D
+%D These specials are still experimental. They are not yet
+%D supported by the programs the way they should be.
+%D
+%D {\em --- still undocumented ---}
+
+\installspecial [\dostartrunprogram] [and] [3]
+\installspecial [\dostoprunprogram] [and] [0]
+\installspecial [\dostartgotoprofile] [and] [3]
+\installspecial [\dostopgotoprofile] [and] [0]
+\installspecial [\dobeginofprofile] [and] [3]
+\installspecial [\doendofprofile] [and] [3]
+
+%D \macros
+%D {doinsertbookmark}
+%D
+%D Bookmarks, that is viewer generated tables of contents, are
+%D a strange phenomena, mainly because \TEX\ can provide
+%D whatever kind of table in much better quality.
+
+\installspecial [\doinsertbookmark] [and] [5]
+
+%D This special is called as:
+%D
+%D \starttypen
+%D \doinstallbookmark {level} {nofsubentries} {text} {page} {open}
+%D \stoptypen
+%D
+%D This definition is very \PDF\ oriented, so for more
+%D information we kindly refer to the \PDF\ manuals.
+
+%D So far for the installation. Finally we preload our
+%D favorite set of specials.
+
+\usespecials[ps,yy,win,pdf]
+
+%D One can overrule this by for instance
+%D
+%D \starttypen
+%D \usespecials[reset,ps,tr,pdf]
+%D \stoptypen
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex new file mode 100644 index 000000000..cff2e5774 --- /dev/null +++ b/tex/context/base/spec-mis.tex @@ -0,0 +1,132 @@ +%D \module
+%D [ file=spec-mis,
+%D version=1997.04.01,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Miscellaneous Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Quite some modules in this group are dedicated to supporting
+%D \PDF\ directly by means of \PDFTEX or indirectly by using
+%D Acrobat Distiller. This module implements some common
+%D features.
+
+\writestatus{loading}{Context Special Macros / Miscellaneous Macros}
+
+\unprotect
+
+%D \macros
+%D {setPDFdestination}
+%D
+%D \PDF\ destinations should obey the specifications laid down
+%D in the \PDF\ reference manual. The next macro strips illegal
+%D characters from the destination name.
+
+\def\setPDFdestination#1%
+ {\bgroup
+ \obeylccodes
+ \lccode`\/=`-\lccode`\#=`-\lccode`\<=`-\lccode`\>=`-%
+ \lccode`\[=`-\lccode`\]=`-\lccode`\(=`-\lccode`\)=`-%
+ \stripcharacter{ }\from#1\to\PDFdestination
+ \@EA\lowercase\@EA{\@EA\xdef\@EA\PDFdestination\@EA{\PDFdestination}}%
+ \egroup}
+
+%D \macro
+%D {URLhash}
+%D
+%D A rather trivial macro:
+
+\expandafter\def\expandafter\URLhash\expandafter{\string#}
+
+%D \macros
+%D {ifusepagedestinations}
+%D
+%D In \PDF\ version 1.0 only page references were supported,
+%D while in \DVIWINDO\ 1.N only named references were accepted.
+%D Therefore \CONTEXT\ supports both methods of referencing. In
+%D \PDF\ version 1.1 named destinations arrived. Lack of
+%D continuous support of version 1.1 viewers for \MSDOS\
+%D therefore sometimes forces us to prefer page references. As
+%D a bonus, they are faster too and have no limitations. How
+%D fortunate we were having both mechanisms available when the
+%D version 3.0 (\PDF\ version 1.2) viewers proved to be too
+%D bugged to support named destinations.
+
+\newif\ifusepagedestinations
+
+%D \macro
+%D {sanitizePDFstring}
+%D
+%D This macro at least tries to convert a arbitrary string
+%D into a sequence of characters valid for \PDF\ bookmarks and
+%D alike. It's a slow one, that uses \type{\lccode}'s to
+%D change the glyph as well as converts sensisitve ones into a
+%D \PDF\ command sequence, so \type{(} becomes \type{\(}. In
+%D fact we translate the string to lowercase inactive and non
+%D special characters, limit their number and finaly convert
+%D some of the characters to save ones.
+
+\chardef\maxPDFstringsize=60
+
+\def\sanitizePDFstring#1\to#2%
+ {\bgroup
+ \obeylccodes
+ \lccode`( =1 \lccode`) =1
+ \lccode`< =1 \lccode`> =1
+ \lccode`[ =1 \lccode`] =1
+ \lccode`\\=1 \lccode`/ =1
+ \lowercase{\convertargument#1\to\ascii}%
+ % by integrating the split in the loop below
+ % \splitofftokens\maxPDFstringsize\from\ascii\to\ascii
+ % we diminish the processing time considerably
+ \scratchcounter=\maxPDFstringsize
+ \def\docommando##1%
+ {\ifnum\scratchcounter>0
+ \advance\scratchcounter by -1
+ \ifcase\lccode`##1\relax
+ \xdef#2{#2.}% let's show that something is missing
+ \or
+ \xdef#2{#2\expandafter\string\csname##1\endcsname}%
+ \else
+ \xdef#2{#2##1}%
+ \fi
+ \fi}%
+ %\global\let#2=\empty
+ % or to permit #2 to be \ascii too:
+ \@EA\global\@EA\let\@EA#2\@EA\empty
+ \@EA\handletokens\ascii\with\docommando
+ \egroup}
+
+%D \macros
+%D {dodoinsertfile}
+%D
+%D File insertion depend on the driver or \TEX\ variant used.
+%D All driver modules use the same scheme for file insertion,
+%D and therefore have the next macro in common:
+
+\def\dododoinsertfile[#1][#2,#3][#4]%
+ {\def\fileinsertionclass{do#1insert}%
+ \doifdefinedelse{\fileinsertionclass#3}
+ {\def\next{\getvalue{\fileinsertionclass#3}{#4}}}
+ {\doifdefinedelse{\fileinsertionclass#2}
+ {\def\next{\getvalue{\fileinsertionclass#2}{#4}}}
+ {\def\next{\gobblesevenarguments}}}%
+ \next}
+
+\def\dodoinsertfile#1#2#3%
+ {\dododoinsertfile[#1][#2][#3]}
+
+%D This macro is called with 10 arguments, where the first
+%D one specifies the driver, like \type{yy} or \type{tr}. The
+%D second argument is a \type{{type,method}} pair and the
+%D third the filename.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex new file mode 100644 index 000000000..bf3fec519 --- /dev/null +++ b/tex/context/base/spec-pdf.tex @@ -0,0 +1,456 @@ +%D \module
+%D [ file=spec-pdf,
+%D version=1997.09.20,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Adobe \PDF\ version 1.2,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\unprotect
+
+%D \macros
+%D {dosetupinteraction,
+%D dosetupscreen,
+%D dosetupidentity,
+%D dostartthisislocation,
+%D dostartgotolocation,
+%D dostartgotorealpage,
+%D dostartcommand,
+%D dostartgotoprofile,
+%D dobeginofprofile,
+%D doendofprofile,
+%D dostartrunprogram,
+%D dostartobject,
+%D dostopobject,
+%D doinsertobject,
+%D doinsertbookmark,
+%D usepagedestinations}
+%D {}
+%D
+%D These specials are not as beautiful as they should be. The
+%D main reason for this is that we started with \DVIWINDO,
+%D which lacks support of \EPS||insertions, but offered a
+%D powerfull linking mechanism. The first version
+%D of \PDF\ did not support labels but only pagenumbers.
+%D This dreadfull omission was corrected in version 2.0, but
+%D we continue to support both alternatives. One never knows.
+%D
+%D Although the concepts behind the \type{pdfmark}'s are
+%D still far from perfect, version 2.1 brought another
+%D change. This time the format was changed. So much for
+%D upward compatibility.
+
+\startspecials[pdf]
+
+%D Instead of a prolog, we can put the code in the file
+%D ourselve.
+%D
+%D \starttypen
+%D \definespecial\dosetupinteraction%
+%D {\special
+%D {\@@insertpostscriptretain
+%D /pdfmark where
+%D {pop}
+%D {userdict /pdfmark /cleartomark load put}
+%D ifelse}}
+%D \stoptypen
+%D
+%D We decided to use a prolog file. The following code has to be
+%D put somewhere. To overcome problems, we always embed the
+%D fonts, but copyrights force us always to make subsets.
+%D
+%D \starttypen
+%D /currentdistillerparams where
+%D { pop } { userdict /currentdistillerparams { 1 dict } put } ifelse
+%D
+%D /setdistillerparams where
+%D { pop } { userdict /setdistillerparams { pop } put } ifelse
+%D
+%D << /AntiAliasColorImages true
+%D /AntiAliasGrayImages true
+%D /AntiAliasMonoImages true
+%D /ConvertCMYKImagesToRGB true
+%D /MaxSubsetPct 99
+%D /EmbedAllFonts true
+%D /SubSetFonts true >> setdistillerparams
+%D \stoptypen
+%D
+%D Beware, this is the PostScript Level 2 way of doing things.
+
+\definespecial\dosetupinteraction%
+ {\showmessage{\m!interactions}{21}{acrobat}}
+
+\definespecial\dostartthisislocation#1%
+ {\ifusepagedestinations \else
+ \setPDFdestination{#1}%
+ \doifsomething{\PDFdestination}
+ {\special
+ {\@@insertpostscriptretain
+ [/Dest /\PDFdestination\space
+% [/Dest (\PDFdestination)
+ /View [/Fit]
+ /DEST
+ pdfmark}}%
+ \fi}
+
+\definespecial\dostartgotolocation#1#2#3#4#5#6%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \ifusepagedestinations
+ \doifnot{0#6}{0}
+ {\special
+ {\@@insertpostscriptretain
+ [\if!!donea
+ /Action /GoToR
+ /File (#4.pdf)
+ \else
+ /Action /GoTo
+ \fi
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Page #6
+ /View [/Fit]
+ /Subtype /Link
+ /ANN
+ pdfmark}}%
+ \else
+ \setPDFdestination{#5}%
+ \doifsomething{\PDFdestination}
+ {\special
+ {\@@insertpostscriptretain
+ [\if!!donea
+ /Action /GoToR
+ /File (#4.pdf)
+ \else
+ /Action /GoTo
+ \fi
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Dest /\PDFdestination\space
+% /Dest (\PDFdestination)
+ /Subtype /Link
+ /ANN
+ pdfmark}}%
+ \fi}
+ {\doifelsenothing{#4}
+ {\let\PDFfile=\empty
+ \let\PDFdestination=\empty}
+ {\edef\PDFfile{/#4}%
+ \setPDFdestination{#5}%
+ \doifsomething{\PDFdestination}
+ {\edef\PDFdestination{\URLhash\PDFdestination}}}%
+ \special
+ {\@@insertpostscriptretain
+ [/Action <</Subtype /URI /URI (#3\PDFfile\PDFdestination)>>
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Subtype /Link
+ /ANN
+ pdfmark}}%
+ \egroup}
+
+\definespecial\dostartgotorealpage#1#2#3#4#5%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \doifnot{0#5}{0}
+ {\special
+ {\@@insertpostscriptretain
+ [\if!!donea
+ /Action /GoToR
+ /File (#4.pdf)
+ \else
+ /Action /GoTo
+ \fi
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /View [/Fit]
+ /Page #5
+ /Subtype /Link
+ /ANN
+ pdfmark}}}
+ {\doifelsenothing{#4}
+ {\let\PDFfile=\empty}
+ {\edef\PDFfile{/#4}}%
+ \special
+ {\@@insertpostscriptretain
+ [/Action <</Subtype /URI /URI (#3\PDFfile)>>
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Subtype /Link
+ /ANN
+ pdfmark}}%
+ \egroup}
+
+\definespecial\dostartexecutecommand#1#2#3#4%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \processaction
+ [#3]
+ [ first=>\def\command{First},
+ previous=>\def\command{Prev},
+ next=>\def\command{Next},
+ last=>\def\command{Last},
+ backward=>\def\command{GoBack},
+ forward=>\def\command{GoForward},
+ print=>\def\command{Print},
+ exit=>\def\command{Quit},
+ close=>\def\command{Close},
+ help=>\def\command{HelpUserGuide},
+ swap=>\def\command{FullScreen},
+ search=>\def\command{Find},
+ searchagain=>\def\command{FindAgain},
+ \s!unknown=>\let\command=\s!unknown]%
+ \special
+ {\@@insertpostscriptretain
+ [/Action <</Subtype /Named /N /\command>>
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Subtype /Link
+ /ANN
+ pdfmark}%
+ \egroup}
+
+\definespecial\dostopexecutecommand%
+ {}
+
+% \def\translatepdfcommand#1%
+% {\processaction
+% [#1]
+% [ first=>\def\command{First},
+% previous=>\def\command{Prev},
+% next=>\def\command{Next},
+% last=>\def\command{Last},
+% backward=>\def\command{GoBack},
+% forward=>\def\command{GoForward},
+% print=>\def\command{Print},
+% exit=>\def\command{Quit},
+% help=>\def\command{HelpUserGuide},
+% enter=>\def\command{FitPage},
+% view=>\def\command{FullScreen},
+% \s!unknown=>\let\command=\s!unknown]}
+%
+% \definespecial\dostartexecutecommand#1#2#3#4%
+% {\bgroup
+% \ScaledPointsToBigPoints{#1}\width
+% \ScaledPointsToBigPoints{#2}\height
+% \def\nextcommands{}%
+% \getcommalistsize[#1]%
+% \dostepwiserecurse{2}{\commalistsize}{1}
+% {\getfromcommalist[#1][\recurselevel]%
+% \translatepdfcommand\commalistelement
+% \edef\nextcommands%
+% {\nextcommands /Next << /Type /Action /S /Named /N /\command\space}}%
+% \dostepwiserecurse{2}{\commalistsize}{1}
+% {\edef\nextcommands{\nextcommands >>}}%
+% \getfromcommalist[#1][1]%
+% \translatepdfcommand\commalistelement
+% \special
+% {\@@insertpostscriptretain
+% [/Action << /Subtype /Named /N /\command\space \nextcommands >>
+% /Rect [0 0 100 100 ]
+% /Subtype /Link
+% /ANN
+% pdfmark}%
+% \egroup}
+
+\edef\@@psbgroup{\string{}
+\edef\@@psegroup{\string}}
+
+\definespecial\dostarthide%
+ {\special
+ {\@@insertpostscriptretain
+ [/DataSource (false \@@psbgroup)
+ /PS
+ pdfmark}}
+
+\definespecial\dostophide%
+ {\special
+ {\@@insertpostscriptretain
+ [/DataSource (\@@psegroup if)
+ /PS
+ pdfmark}}
+
+\definespecial\dosetupscreen#1#2#3#4#5%
+ {\bgroup
+ \!!widtha=#3sp
+ \advance\!!widtha by #1sp
+ \!!heighta=-#4sp
+ \!!heightb=\printpapierhoogte
+ \advance\!!heightb by -#2sp
+ \advance\!!heighta by \!!heightb
+ %\ScaledPointsToBigPoints{#1}\left
+ %\ScaledPointsToBigPoints{\number\!!heighta}\bottom
+ %\ScaledPointsToBigPoints{\number\!!widtha}\width
+ %\ScaledPointsToBigPoints{\number\!!heightb}\height
+ \ScaledPointsToWholeBigPoints{#1}\left
+ \ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom
+ \ScaledPointsToWholeBigPoints{\number\!!widtha}\width
+ \ScaledPointsToWholeBigPoints{\number\!!heightb}\height
+ \edef\pdf@@screenmode{\ifcase#5/UseNone\else/FullScreen\fi}%
+ \special
+ {\@@insertpostscriptretain
+ [/CropBox [\left\space\bottom\space\width\space\height]
+ /PAGES
+ pdfmark}%
+ \special
+ {\@@insertpostscriptretain
+ [/PageMode \pdf@@screenmode\space
+ /Page 1
+ /View [/Fit]
+ /ViewerPreferences
+ << /PageLayout /SinglePage
+ /NonFullScreenPageMode /UseNone >>
+ /DOCVIEW
+ pdfmark}%
+ \egroup}
+
+\definespecial\dosetupidentity#1#2#3#4#5%
+ {\special
+ {\@@insertpostscriptretain
+ [/Title (#1)
+ /Subject (#2)
+ /Author (#3)
+ /Creator (#4)
+ /ModificationDate (#5)
+ /DOCINFO
+ pdfmark}}
+
+\definespecial\dostartrunprogram#1#2#3%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \special
+ {\@@insertpostscriptretain
+ [/Action /Launch
+ /File (#3)
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Subtype /Link
+ /ANN
+ pdfmark}%
+ \egroup}
+
+\definespecial\dostartgotoprofile#1#2#3%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \doifsomething{#3}
+ {\special
+ {\@@insertpostscriptretain
+ [/Action /Article
+ /Dest (#3)
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /View [/Fit]
+ /Subtype /Link
+ /ANN
+ pdfmark}}%
+ \egroup}
+
+\definespecial\dobeginofprofile#1#2#3% label width page
+ {\bgroup
+ \doifelsenothing{#1}
+ {\!!doneatrue}
+ {\!!doneafalse}%
+ \doifnot{0#3}{0}
+ {\special
+ {\@@insertpostscriptretain
+ [/Title (#1)
+ /Rect [0 0 0 0]
+ \if!!donea /Page #3 \fi
+ /ARTICLE
+ pdfmark}}%
+ \egroup}
+
+\definespecial\doendofprofile#1#2#3%
+ {}
+
+\def\docommoninsertmov#1#2#3#4#5#6#7#8%
+ {\bgroup
+ \ScaledPointsToBigPoints{#6}\width
+ \ScaledPointsToBigPoints{#7}\height
+ \edef\pdf@@posterize{\ifcase#8 \or/Poster true\fi}%
+ \special
+ {\@@insertpostscriptretain
+ [/Type /Annot
+ /Subtype /Movie
+ /Rect [0 0 \width\space \height]
+ /Movie <</F (#1) /Aspect [\width\space \height] \pdf@@posterize>>
+ /A <</ShowControls false>>
+ /ANN
+ pdfmark}%
+ \egroup}
+
+\let\doyandyinsertmov = \docommoninsertmov
+\let\dotrinsertmov = \docommoninsertmov
+
+\newbox\pdfobjects
+
+\definespecial\dostartobject#1#2#3#4%
+ {\setbox\nextbox=\hbox\bgroup
+ \bgroup
+ \ScaledPointsToBigPoints{#2}\width
+ \ScaledPointsToBigPoints{#3}\height
+ \ScaledPointsToBigPoints{#4}\depth
+ \escapechar=-1
+ \special
+ {\@@insertpostscriptretain
+ [/BBox [0 -\depth\space \width\space \height]
+ /_objdef {object:#1}
+ /BP pdfmark}%
+ \egroup}
+
+\definespecial\dostopobject%
+ {\special
+ {\@@insertpostscriptretain
+ [/EP pdfmark}%
+ \egroup
+ \smashbox\nextbox
+ \global\setbox\pdfobjects=\hbox{\box\pdfobjects\box\nextbox}}
+
+\definespecial\doinsertobject#1%
+ {\hbox\bgroup
+ \box\pdfobjects
+ \escapechar=-1
+ \special
+ {\@@insertpostscriptretain
+ [{object:#1} /SP pdfmark}%
+ \egroup}
+
+\definespecial\doinsertbookmark#1#2#3#4#5% level sublevels text page open (1)
+ {\sanitizePDFstring#3\to\bookmarktext
+ \special
+ {\@@insertpostscriptretain
+ [/Page #4\space
+ \ifnum#2>0 /Count \ifcase#5-\fi#2\space\fi
+ /View [/Fit]
+ /Title (\bookmarktext)
+ /OUT
+ pdfmark}}
+
+\stopspecials
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-ps.tex b/tex/context/base/spec-ps.tex new file mode 100644 index 000000000..4b18199c9 --- /dev/null +++ b/tex/context/base/spec-ps.tex @@ -0,0 +1,160 @@ +%D \module
+%D [ file=spec-ps,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Adobe PostScript,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \macros
+%D {dostartgraymode,dostopgraymode,
+%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode,
+%D dostartrotation,
+%D dostoprotation,
+%D doselectfirstpaperbin,
+%D doselectsecondpaperbin}
+%D {}
+%D
+%D This implementation is straightforward and can be used as
+%D a default with postscript||drivers. We use \type{ps:} as
+%D opening, because most drivers support this.
+
+\startspecials[postscript]
+
+\def\@@insertpostscriptliteral {ps: }
+\def\@@insertpostscriptretain {" }
+
+\definespecial\dostartgraymode#1%
+ {\special
+ {\@@insertpostscriptliteral
+ #1\space setgray}}
+
+\definespecial\dostopgraymode%
+ {\special
+ {\@@insertpostscriptliteral
+ 0 setgray}}
+
+\definespecial\dostartrgbcolormode#1#2#3%
+ {\special
+ {\@@insertpostscriptliteral
+ #1\space #2\space #3\space setrgbcolor}}
+
+\definespecial\dostartcmykcolormode#1#2#3#4%
+ {\special
+ {\@@insertpostscriptliteral
+ #1\space #2\space #3\space #4\space setcmykcolor}}
+
+\definespecial\dostartgraycolormode#1%
+ {\special
+ {\@@insertpostscriptliteral
+ #1\space setgray}}
+
+\definespecial\dostopcolormode
+ {\special
+ {\@@insertpostscriptliteral
+ 0 setgray}}
+
+\definespecial\doselectfirstpaperbin%
+ {\special
+ {\@@insertpostscriptliteral
+ statusdict begin 1 setpapertray end}} % checken
+
+\definespecial\doselectsecondpaperbin%
+ {\special
+ {\@@insertpostscriptliteral
+ statusdict begin 0 setpapertray end}} % checken
+
+\definespecial\dostartrotation#1%
+ {\special
+ {\@@insertpostscriptliteral
+ gsave #1\space rotate}}
+
+\definespecial\dostoprotation%
+ {\special
+ {\@@insertpostscriptliteral
+ currentfont grestore setfont}}
+
+%D \macros
+%D {doovalbox}
+%D {}
+%D
+%D This implementation is a mixture of several possible
+%D implementations. We use some constants that may not be
+%D changed. It took some time to find them, but these values
+%D offer quite accurate results. The macro calls for
+%D \type{\forgetall}, which resets indentation, skips and
+%D \type{\everypar}.
+%D
+%D Because a stroke follows the line, we correct for half of
+%D the linewidth. Furthermore we use scaling to overcome some
+%D limitations in the precision ($<1$~sp) and to prevent
+%D rounding errors. We also do some correction for large
+%D values. We let PostScript compare some arguments with
+%D \type{a b eq {action} fi}.
+%D
+%D The path is based on a macro of J.~Hefferon cs. We also
+%D tried the D.~Salomon implementation, but this did not work
+%D well, just like some other alternatives.
+
+% #1 = width #2 = height #3 = depth
+% #4 = linewidth #5 = radius
+% #5 = stroke (ja,nee) #7 = fill (ja,nee)
+
+\def\@@insertpostscriptliteral {ps: }
+\def\@@insertpostscriptretain {postscript } % unknown
+
+\def\dosomeovalcalc#1#2#3%
+ {\dimen2=#1sp%
+ \advance\dimen2 by #2%
+ \ScaledPointsToBigPoints{\number\dimen2}#3}
+
+\definespecial\doovalbox#1#2#3#4#5#6#7%
+ {\bgroup
+ \dimen0=#4sp\divide\dimen0 by 2
+ \dosomeovalcalc {0}{+\dimen0}\xmin
+ \dosomeovalcalc{#1}{-\dimen0}\xmax
+ \dosomeovalcalc{#2}{-\dimen0}\ymax
+ \dosomeovalcalc{#3}{+\dimen0}\ymin
+ \dosomeovalcalc{#4}{0pt}\stroke
+ \dosomeovalcalc{#5}{0pt}\radius
+ \edef\dostroke{#6}%
+ \edef\dofill{#7}%
+ \vbox
+ \bgroup
+ \offinterlineskip
+ \forgetall
+ \hsize\!!zeropoint
+ \vrule\!!width\!!zeropoint\!!height#2sp\!!depth#3sp\relax
+ \special
+ {\@@insertpostscriptretain
+ gsave
+ newpath
+ \xmin\space \radius\space add \ymin\space moveto
+ \xmax\space \ymin\space \xmax\space \ymax\space \radius\space arcto
+ \xmax\space \ymax\space \xmin\space \ymax\space \radius\space arcto
+ \xmin\space \ymax\space \xmin\space \ymin\space \radius\space arcto
+ \xmin\space \ymin\space \xmax\space \ymin\space \radius\space arcto
+ \xmin\space \radius\space add \ymin\space moveto
+ 16 {pop} repeat
+ closepath
+ (\dostroke) (1) eq
+ {\stroke\space 0 ne
+ {gsave
+ \stroke\space setlinewidth
+ stroke
+ grestore} if} if
+ (\dofill) (1) eq
+ {fill} if
+ grestore}%
+ \egroup
+ \egroup}
+
+\stopspecials
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex new file mode 100644 index 000000000..1573a6790 --- /dev/null +++ b/tex/context/base/spec-tpd.tex @@ -0,0 +1,525 @@ +%D \module
+%D [ file=spec-tpd,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=\PDFTEX,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Being one of the first typographical systems able to support
+%D advances \PDF\ support, \TEX\ is also one of the first
+%D systems to produce high quality \PDF\ code directly. Thanks
+%D to Han The Thanh c.s. the \TEX\ community can leap forward
+%D once again.
+%D
+%D One important characteristic of \PDFTEX\ is that is can
+%D produce standard \DVI\ code as well as \PDF\ code. This
+%D enables us to use one format file to support both output
+%D formats.
+%D
+%D All modules in this group use specials to tell drivers what
+%D non||\TEX\ actions to take. Because from the \TEX\ point of
+%D view, there is no difference between \DVI\ and \PDF, we
+%D therefore only have to bend the \DVI\ driver support into
+%D \PDF\ support. Technically spoken, specials no longer serve
+%D a purpose, except from ending up as comment in the \PDF\
+%D file. The core primitive in this module therefore is the
+%D \PDFTEX\ primitive \type{\pdfliteral}.
+%D
+%D Before we continue we need to make sure if indeed those
+%D \PDFTEX\ primitives are permitted. If no primitives are
+%D available, we just stop reading any further.
+
+\ifx\pdfoutput\undefined \endinput \else \unprotect \fi
+
+%D Once we are sure that we're indeed supporting \PDFTEX, we
+%D force \PDF\ output at the highest compression. For debugging
+%D purposes one can set the compresslevel to~0.
+
+\pdfoutput =1
+\pdfcompresslevel=9
+
+%D Now we have to make sure no other specials are supported,
+%D else \PDFTEX\ will keep on telling us that we're wrong.
+
+\unprotected \usespecials[\v!reset]
+
+%D Just in case we mimmick specials, we have to make sure no
+%D default specials end up in the process.
+
+\let\defaultspecial=\gobbleoneargument
+
+%D Having reset all the special support, we have to define
+%D all needed and possible support in this module.
+
+\startspecials[tpd]
+
+%D This means that by saying
+%D
+%D \starttypen
+%D \usespecials[tpd]
+%D \stoptypen
+%D
+%D we get ourselves \PDF\ output.
+
+%D \macros
+%D {dosetuppaper}
+%D
+%D If we don't set the paper size, \PDFTEX\ will certainly do
+%D it in a way we don't want, therefore we need:
+
+\def\dosetuppdftexpaper#1#2#3%
+ {\global\pdfpagewidth =#2\relax
+ \global\pdfpageheight=#3\relax
+ \global\let\dosetuppdftexpaper=\gobblethreearguments}
+
+\definespecial\dosetuppaper#1#2#3%
+ {\dosetuppdftexpaper{#1}{#2}{#3}}
+
+%D \macros
+%D {doinsertfile}
+%D
+%D Graphics are not part of \TEX\ and therefore not part of the
+%D \DVI\ standard. \PDF\ on the other hand has several graphic
+%D primitives. During the multi||step process \TEX\
+%D $\rightarrow$ \DVI\ $\rightarrow$ \POSTSCRIPT\ $\rightarrow$
+%D \PDF\ one can insert graphics using specials. In \PDFTEX\
+%D however there is only one step! This means that \PDFTEX\
+%D itself has to do the inclusion.
+%D
+%D At the moment \PDFTEX\ supports inclusion of bitmap \PNG\
+%D graphics as well as not too complicated \PDF\ code. Using
+%D this last option, we are able to include both \METAPOST\ and
+%D \PDF\ output produced by \GHOSTSCRIPT.
+%D
+%D We fall back on the generic \CONTEXT\ module supp-pdf to
+%D accomplish \PDF\ inclusion. The methods implemented there
+%D are hooked into both the figure placement mechanisms of
+%D \CONTEXT\ and the specials inclusion mechanism.
+
+\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \dodoinsertfile{tpd}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
+ \egroup}
+
+%D The three methods supported for the moment are \type{mps}
+%D for \METAPOST\ graphics, \type{pdf} for \GHOSTSCRIPT\ \PDF\
+%D code, and \type{png} for bitmap graphics.
+
+\def\dotpdinsertmps#1#2#3#4#5#6#7#8%
+ {\scratchdimen=#2pt \PointsToReal{.01\scratchdimen}\xscale
+ \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\yscale
+ \convertMPtoPDF{#1}\xscale\yscale}
+
+\def\dotpdinsertpdf#1#2#3#4#5#6#7#8%
+ {\beforesplitstring#1\at.\to\filename
+ \scratchdimen=#2pt \PointsToReal{.01\scratchdimen}\xscale
+ \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\yscale
+ \convertPDFtoPDF{\filename.pdf}\xscale\yscale{#4sp}{#5sp}{#6sp}{#7sp}}
+
+\def\dotpdinsertpng#1#2#3#4#5#6#7#8%
+ {\pdfimage width #6sp height #7sp #1\relax}
+
+%D Some surrogate \type{tif} and \type{eps} support is
+%D provided too. These work only when the size compatible
+%D \type{png} and \type{pdf} alternatives are present.
+
+\def\dotpdinserttif#1#2#3#4#5#6#7#8%
+ {\beforesplitstring#1\at.\to\filename
+ \pdfimage width #6sp height #7sp \filename.png\relax}
+
+\def\dotpdinserteps%
+ {\dotpdinsertpdf}
+
+%D \PDF\ supports the inclusion of video movies. In \CONTEXT\
+%D we support these in a way similar to figure inclusion.
+
+\def\dotpdinsertmov#1#2#3#4#5#6#7#8%
+ {\ScaledPointsToBigPoints{#6}\width
+ \ScaledPointsToBigPoints{#7}\height
+ \edef\pdf@@posterize{\ifcase#8 \or/Poster true\fi}%
+ \pdfannotlink
+ width #6sp
+ height #7sp
+ attr {/Border [0 0 0]}
+ user {/Subtype /Movie
+ /Movie <</F (#1) /Aspect [\width\space \height\space] \pdf@@posterize>>
+ /A <</ShowControls false>>}%
+ \pdfendlink}
+
+%D \macros
+%D {doovalbox}
+%D
+%D For drawing ovals we use quite raw \PDF\ code. The next
+%D implementation does not differ that much from the one
+%D implemented in the \POSTSCRIPT\ driver.
+
+\def\dosomeovalcalc#1#2#3%
+ {\dimen2=#1sp
+ \advance\dimen2 by #2\relax
+ \ScaledPointsToBigPoints{\number\dimen2}#3}
+
+\definespecial\doovalbox#1#2#3#4#5#6#7%
+ {\bgroup
+ \dimen0=#4sp\divide\dimen0 by 2
+ \dosomeovalcalc{0} {+\dimen0}\xmin
+ \dosomeovalcalc{#1}{-\dimen0}\xmax
+ \dosomeovalcalc{#2}{-\dimen0}\ymax
+ \dosomeovalcalc{#3}{+\dimen0}\ymin
+ \advance\dimen0 by #5sp
+ \dosomeovalcalc{0} {+\dimen0}\xxmin
+ \dosomeovalcalc{#1}{-\dimen0}\xxmax
+ \dosomeovalcalc{#2}{-\dimen0}\yymax
+ \dosomeovalcalc{#3}{+\dimen0}\yymin
+ \dosomeovalcalc{#4}{0pt}\stroke
+ \dosomeovalcalc{#5}{0pt}\radius
+ \edef\dostroke{#6}%
+ \edef\dofill{#7}%
+ \vbox
+ \bgroup
+ \offinterlineskip
+ \forgetall
+ \hsize\!!zeropoint
+ \vrule\!!width\!!zeropoint\!!height#2sp\!!depth#3sp\relax
+ \pdfliteral
+ {q
+ \stroke\space w
+ \xxmin\space \ymin\space m
+ \xxmax\space \ymin\space l
+ \xmax\space \ymin\space \xmax\space \yymin\space y
+ \xmax\space \yymax\space l
+ \xmax\space \ymax\space \xxmax\space \ymax\space y
+ \xxmin\space \ymax\space l
+ \xmin\space \ymax\space \xmin\space \yymax\space y
+ \xmin\space \yymin\space l
+ \xmin\space \ymin\space \xxmin\space \ymin\space y
+ \ifnum\dostroke=1 S \fi
+ \ifnum\dofill =1 f \fi
+ Q}%
+ \egroup
+ \egroup}
+
+%D \macros
+%D {dostartgraymode,dostopgraymode,
+%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,
+%D dostopcolormode}
+%D
+%D In \PDF\ there are two color states, one for strokes and one
+%D for fills. This means that we have to set the color in a
+%D rather redundant looking way. Unfortunately this makes the
+%D \PDF\ file much larger than needed.
+
+\definespecial\dostartgraymode#1%
+ {\pdfliteral{#1 g #1 G}}
+
+\definespecial\dostopgraymode%
+ {\pdfliteral{0 g 0 G}}
+
+\definespecial\dostartrgbcolormode#1#2#3%
+ {\pdfliteral{#1 #2 #3 rg #1 #2 #3 RG}}
+
+\definespecial\dostartcmykcolormode#1#2#3#4%
+ {\pdfliteral{#1 #2 #3 #4 k #1 #2 #3 #4 K}}
+
+\definespecial\dostartgraycolormode#1%
+ {\pdfliteral{#1 g #1 G}}
+
+\definespecial\dostopcolormode%
+ {\pdfliteral{0 g 0 G}}
+
+%D \macros
+%D {dostartrotation,dostoprotation}
+%D
+%D Rotating some text can be accomplished by setting the first
+%D four elements of the transform matrix. We only support some
+%D fixed angles. The q's take care of grouping.
+
+\definespecial\dostartrotation#1%
+ {\processaction
+ [#1]
+ [ 90=>\pdfliteral{q 0 1 -1 0 0 0 cm},
+ 180=>\pdfliteral{q -1 0 0 -1 0 0 cm},
+ 270=>\pdfliteral{q 0 -1 1 0 0 0 cm},
+ 360=>\pdfliteral{q 1 0 0 1 0 0 cm}]}
+
+\definespecial\dostoprotation%
+ {\pdfliteral{Q}}
+
+%D \macros
+%D {dosetupinteraction}
+%D
+%D Nothing special is needed to enable \PDF\ commands and
+%D interaction. We stick with a message.
+
+\definespecial\dosetupinteraction%
+ {\showmessage{\m!interactions}{21}{pdftex}}
+
+%D \macros
+%D {dostartthisisrealpage,dostartthisislocation
+%D dostartgotorealpage,dostartgotolocation}
+%D
+%D The interactions macros are the core of this module. We
+%D support both page destinations and named ones.
+%D
+%D {\em For the moment we use object number (that is, behind
+%D the screens, the user uses his own numbers) destinations
+%D instead of page ones. The latter works, but not 100\%.}
+
+\definespecial\dostartthisisrealpage#1%
+ {\pdfdest num #1 fit} % will be {} when page is ok
+
+\definespecial\dostartthisislocation#1%
+ {\ifusepagedestinations \else
+ \setPDFdestination{#1}%
+ \doifsomething{\PDFdestination}
+ {\pdfdest name {\PDFdestination} fit}%
+ \fi}
+
+%D When going to a location, we obey the time and space saving
+%D boolean\type{\ifusepagedestination}. Names destinations are
+%D stripped and made robust.
+
+\definespecial\dostartgotolocation#1#2#3#4#5#6% url nog afhandelen
+ {\bgroup
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \ifusepagedestinations
+ \scratchcounter=0#6\relax
+ \edef\PDFdestination{\the\scratchcounter}%
+ \pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ % goto \if!!donea file {#4.pdf} \fi page \PDFdestination\space {/Fit}
+ goto \if!!donea file {#4.pdf} page 1 {/Fit}\else num \PDFdestination\space \fi
+ \pdfendlink
+ \else
+ \setPDFdestination{#5}%
+ \doifsomething{\PDFdestination}
+ {\pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ goto \if!!donea file {#4.pdf} \fi name {\PDFdestination}%
+ \pdfendlink}%
+ \fi}
+ {\doifelsenothing{#4}
+ {\let\PDFfile=\empty
+ \let\PDFdestination=\empty}
+ {\edef\PDFfile{/#4}%
+ \setPDFdestination{#5}%
+ \doifsomething{\PDFdestination}
+ {\edef\PDFdestination{\URLhash\PDFdestination}}}%
+ \pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ user {/S /URI
+ /URI (#3\PDFfile\PDFdestination)}%
+ \pdfendlink}%
+ \egroup}
+
+\definespecial\dostartgotorealpage#1#2#3#4#5%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \scratchcounter=0#5\relax
+ \edef\PDFdestination{\the\scratchcounter}%
+ \pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ % goto \if!!donea file {#4.pdf} \fi page \PDFdestination\space {/Fit}
+ goto \if!!donea file {#4.pdf} page 1 {/Fit} \else num \PDFdestination\space \fi
+ \pdfendlink}
+ {\doifelsenothing{#4}
+ {\let\PDFfile=\empty}
+ {\edef\PDFfile{/#4}}%
+ \pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ user {/S /URI
+ /URI (#3\PDFfile)}%
+ \pdfendlink}%
+ \egroup}
+
+%D \macros
+%D {dostarthide,dostophide}
+%D
+%D Hiding parts of the document for printing is not yet
+%D supported by \PDF\ and therefore \PDFTEX.
+
+\definespecial\dostarthide%
+ {}
+
+\definespecial\dostophide%
+ {}
+
+%D \macros
+%D {dosetupscreen}
+%D
+%D Setting of the screen boundingbox involves some
+%D calculations. Here we also take care of (non) full screen
+%D startup. The dimensions are rounded.
+
+\definespecial\dosetupscreen#1#2#3#4#5%
+ {\bgroup
+ \!!widtha=#3sp
+ \advance\!!widtha by #1sp
+ \!!heighta=-#4sp
+ \!!heightb=\pdfpageheight
+ \advance\!!heightb by -#2sp
+ \advance\!!heighta by \!!heightb
+ \ScaledPointsToWholeBigPoints{#1}\left
+ \ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom
+ \ScaledPointsToWholeBigPoints{\number\!!widtha}\width
+ \ScaledPointsToWholeBigPoints{\number\!!heightb}\height
+ \expanded{\global\noexpand\pdfpagesattr=
+ {/CropBox [\left\space\bottom\space\width\space\height]}}%
+ \ifcase#5\else
+ \pdfcatalog pagemode {/FullScreen}\relax
+ \fi
+ \egroup}
+
+%D \macros
+%D {dostartexecutecommand}
+%D
+%D \PDF\ viewers enable us to navigate using menus and shortcut
+%D keys. These navigational tools can also be accessed by using
+%D annotations. The next special takes care of inserting them.
+
+\definespecial\dostartexecutecommand#1#2#3#4%
+ {\bgroup
+ \processaction
+ [#3]
+ [ first=>\def\command{First},
+ previous=>\def\command{Prev},
+ next=>\def\command{Next},
+ last=>\def\command{Last},
+ backward=>\def\command{GoBack},
+ forward=>\def\command{GoForward},
+ print=>\def\command{Print},
+ exit=>\def\command{Quit},
+ close=>\def\command{Close},
+ help=>\def\command{HelpUserGuide},
+ swap=>\def\command{FullScreen},
+ \s!unknown=>\let\command=\s!unknown]%
+ \pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ user {/S /Named /N /\command}%
+ \pdfendlink
+ \egroup}
+
+%D \macros
+%D {dosetupidentity}
+%D
+%D Documents can be tagged with an application accessible title
+%D and subtitle, the authorname, a date, the creator, keywords
+%D etc. For the moment \PDFTEX\ only supports the first three
+%D of these.
+
+\definespecial\dosetupidentity#1#2#3#4#5%
+ {\pdfinfo title {#1} subject {#2} author {#3}\relax} % creator {#4}
+
+%D \macros
+%D {dostartrunprogam}
+%D
+%D Although possible, running applications is not yet
+%D implemented here.
+
+\definespecial\dostartrunprogram#1#2#3%
+ {}
+
+%D \macros
+%D {dostartgotoprofile, dostopgotoprofile,
+%D dobeginofprofile, doendofprofile}
+%D
+%D \CONTEXT\ user profiles and version control fall back on
+%D \PDF\ article threads. Unfortunately one cannot influence
+%D the view yet in an (for me) acceptable way.
+
+\definespecial\dostartgotoprofile#1#2#3%
+ {\pdfannotlink
+ width #1sp
+ height #2sp
+ depth 0pt
+ attr {/Border [0 0 0]}
+ thread name {#3}%
+ \pdfendlink}
+
+\definespecial\dobeginofprofile#1#2#3%
+ {\doifsomething{#1}
+ {\pdfthread name {#1}}}
+
+\definespecial\doendofprofile#1#2#3%
+ {\pdfendthread}
+
+%D \macros
+%D {doinsertbookmark}
+%D
+%D In \PDF\ bookmarks are the building blocks of a viewer
+%D provided sort of table of contents. \TEX\ has to provide
+%D the entry as well as the number of child entries. Strings
+%D need to be sanatized as good as possible to suit the default
+%D encoding. In \CONTEXT\ users can overrule this string by
+%D supplying an alternative one.
+
+\definespecial\doinsertbookmark#1#2#3#4#5% level sublevels text page open (1)
+ {\sanitizePDFstring#3\to\bookmarktext
+ \pdfoutline
+ goto num #4 % why's page not accepted
+ \ifnum#2>0 count \ifcase#5-\fi#2\fi\space
+ {\bookmarktext}}
+
+%D \macros
+%D {dostartobject,dostopobject,doinsertobject}
+%D
+%D Due to \PDF's object oriented character, we can include and
+%D reuse objects. These can be compared with \TEX's boxes. The
+%D \TEX\ counterpart is defined in the module \type{spec-dvi}.
+%D We don't use the dimensions here.
+
+% Forms can interfere with page dimension settings. Therefore
+% calling macros can best postpone flushing.
+
+\definespecial\dostartobject#1#2#3#4%
+ {\setbox\nextbox=\vbox\bgroup
+ \def\dodostopobject%
+ {\egroup
+ \pdfform\nextbox
+ \scratchcounter=\pdflastform
+ \setxvalue{pdfform:#1}{\the\scratchcounter}}}
+
+\definespecial\dostopobject%
+ {\dodostopobject}
+
+\definespecial\doinsertobject#1%
+ {\expandafter\pdfrefform\csname pdfform:#1\endcsname\relax}
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-tr.tex b/tex/context/base/spec-tr.tex new file mode 100644 index 000000000..f449e1211 --- /dev/null +++ b/tex/context/base/spec-tr.tex @@ -0,0 +1,44 @@ +%D \module
+%D [ file=spec-tr,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Thomas Rokicky's \DVIPS,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \macros
+%D {doinsertfile}
+%D {}
+%D
+%D We overrule the figure||insertion special. Things should
+%D be more accurate, but maybe someday \onbekend
+
+\startspecials[rokicky] % [postscript]
+
+\def\@@insertpostscriptliteral {ps: }
+\def\@@insertpostscriptretain {" }
+
+\def\dotrinserteps#1#2#3#4#5#6#7#8%
+ {\ScaledPointsToBigPoints{#4}\width
+ \ScaledPointsToBigPoints{#5}\height
+ \special
+ {psfile=#1
+ hscale=#2\space
+ vscale=#3\space
+ hoffset=\width \space
+ voffset=\height}}
+
+\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \dodoinsertfile{tr}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
+ \egroup}
+
+\stopspecials
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-win.tex b/tex/context/base/spec-win.tex new file mode 100644 index 000000000..228df9f7c --- /dev/null +++ b/tex/context/base/spec-win.tex @@ -0,0 +1,98 @@ +%D \module
+%D [ file=spec-win,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=\YandY's \DVIWINDO,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\unprotect
+
+%D \macros
+%D {dosetupinteraction,
+%D dostartthisislocation,
+%D dostartthisisrealpage,
+%D dostartgotolocation,
+%D dostartgotorealpage,
+%D dostartrunprogram,
+%D usepagedestinations}
+%D {}
+%D
+%D As told before, these were the first interactive specials.
+%D In those days, these kind of specials were still elegant
+%D and straightforward.
+
+\startspecials[dviwindo]
+
+\definespecial\dosetupinteraction%
+ {\showmessage{\m!interactions}{21}{dviwindo}}
+
+\definespecial\dostartgotolocation#1#2#3#4#5#6%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \special
+ {button:
+ #1 #2
+ \if!!donea
+ file: #4,
+ \fi
+ \ifusepagedestinations
+ page: #6
+ \else
+ "#5"
+ \fi}}
+ {}% nog uri afhandelen
+ \egroup}
+
+\definespecial\dostartgotorealpage#1#2#3#4#5%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \special
+ {button:
+ #1 #2
+ \if!!donea
+ file: #4,
+ \fi
+ page:#5}}
+ {}% nog uri afhandelen
+ \egroup}
+
+\definespecial\dostartthisislocation#1%
+ {\ifusepagedestinations \else
+ \special{mark: "#1"}%
+ \fi}
+
+\definespecial\dostartthisisrealpage#1%
+ {}
+
+\definespecial\dostartrunprogram#1#2#3%
+ {\special{button: #1 #2 launch: #3}}
+
+\let\doyandyinsertmov = \docommoninsertmov
+\let\dotrinsertmov = \docommoninsertmov
+
+%\def\doyandyinsertmov#1#2#3#4#5#6#7#8%
+% {\special
+% {button: 20000000 23000000 launch: w:/play32.exe #1}}
+
+\stopspecials
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/spec-yy.tex b/tex/context/base/spec-yy.tex new file mode 100644 index 000000000..885c6be01 --- /dev/null +++ b/tex/context/base/spec-yy.tex @@ -0,0 +1,73 @@ +%D \module
+%D [ file=spec-yy,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=\YandY's \DVIPSONE\ and \DVIWINDO,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \macros
+%D {dostartgraymode,dostopgraymode,
+%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode,
+%D doinsertfile}
+%D {}
+%D
+%D We implement a nice and simple figure||insertion special
+%D and make use of \YandY's color specials. Otherwise \DVIWINDO\
+%D would not show colors.
+
+\startspecials[yandy] % [postscript]
+
+\def\@@insertpostscriptliteral {ps: }
+\def\@@insertpostscriptretain {" } % this was: {postscript}
+
+\definespecial\dostartgraymode#1%
+ {\special{color gray #1}}
+
+\definespecial\dostopgraymode%
+ {\special{color gray 0}}
+
+\definespecial\dostartrgbcolormode#1#2#3%
+ {\special{color rgb #1 #2 #3}}
+
+\definespecial\dostartcmykcolormode#1#2#3#4%
+ {\special{color cmyk #1 #2 #3 #4}}
+
+\definespecial\dostartgraycolormode#1%
+ {\special{color gray #1}}
+
+\definespecial\dostopcolormode%
+ {\special{color gray 0}}
+
+\def\doyyinserteps#1#2#3#4#5#6#7#8% equals rockiky
+ {\ScaledPointsToBigPoints{#4}\width
+ \ScaledPointsToBigPoints{#5}\height
+ \special
+ {psfile=#1
+ hscale=#2\space
+ vscale=#3\space
+ hoffset=\width \space
+ voffset=\height}}
+
+\def\doyyinsertmps#1#2#3#4#5#6#7#8%
+ {\hbox
+ {\UseMetaPostGraphic{#1}%
+ \doyyinserteps{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}
+
+\def\doyyinserttif#1#2#3#4#5#6#7#8%
+ {\special{insertimage: #1 #6 #7}}
+
+\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \dodoinsertfile{yy}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
+ \egroup}
+
+\stopspecials
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex new file mode 100644 index 000000000..34b0f2215 --- /dev/null +++ b/tex/context/base/supp-box.tex @@ -0,0 +1,1228 @@ +% NEW
+
+\unprotect
+
+% limitatetext -> beter {text} als laatste !!
+
+% \limitvbox
+% \limithbox
+
+\def\limitatelines#1#2% size sentinel
+ {\dowithnextbox
+ {\dimen0=#1\hsize
+ \ifdim\wd\nextbox>\dimen0
+ \setbox\nextbox=\hbox
+ {\advance\dimen0 by -.1\hsize
+ \limitatetext{\unhbox\nextbox}{\dimen0}{\nobreak#2}}%
+ \fi
+ \unhbox\nextbox}
+ \hbox}
+
+\def\fittoptobaselinegrid%
+ {\dowithnextbox
+ {\bgroup
+ \par
+ \dimen0=\ht\nextbox
+ \ht\nextbox=\ht\strutbox
+ \dp\nextbox=\dp\strutbox
+ \hbox{\box\nextbox}
+ \prevdepth\dp\strutbox
+ \doloop
+ {\advance\dimen0 by -\lineheight
+ \ifdim\dimen0<\!!zeropoint
+ \exitloop
+ \else
+ \nobreak
+ \hbox{\strut}
+ \fi}
+ \egroup}
+ \vbox}
+
+\protect
+
+%D \module
+%D [ file=supp-box,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Boxes,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D This module implements some box manipulation macros. Some
+%D are quite simple, some are more advanced and when understood
+%D well, all can be of use.
+
+\writestatus{loading}{Context Support Macros / Boxes}
+
+\unprotect
+
+%D \macros
+%D {nextdepth}
+%D {}
+%D
+%D Let's start with a rather simple declaration. Sometimes we
+%D need to save the \TEX\ \DIMENSION\ \type{\prevdepth} and
+%D append it later on. The name \type{\nextdepth} suits
+%D this purpose well.
+
+\newdimen\nextdepth
+
+%D \macros
+%D {smashbox}
+%D {}
+%D
+%D Smashing is introduced in \PLAIN\ \TEX, and stands for
+%D reducing the dimensions of a box to zero. The most resolute
+%D one is presented first.
+
+\def\smashbox#1%
+ {\wd#1=\!!zeropoint
+ \ht#1=\!!zeropoint
+ \dp#1=\!!zeropoint}
+
+%D \macros
+%D {hsmashbox,vsmashbox}
+%D {}
+%D
+%D Smashing can be used for overlaying boxes. Depending on
+%D the mode, horizontal or vertical, one can use:
+
+\def\hsmashbox#1%
+ {\wd#1=\!!zeropoint}
+
+\def\vsmashbox#1%
+ {\ht#1=\!!zeropoint
+ \dp#1=\!!zeropoint}
+
+%D \macros
+%D {hsmash,vsmash,
+%D hsmashed,vsmashed}
+%D {}
+%D
+%D While the previous macros expected a \BOX, the next act on a
+%D content. They are some subtle differences betreen the smash
+%D and smashed alternatives. The later ones reduce all
+%D dimensions to zero.
+
+\def\hsmash#1%
+ {\bgroup
+ \setbox0=\normalhbox{#1}%
+ \hsmashbox0%
+ \box0
+ \egroup}
+
+\def\vsmash#1%
+ {\bgroup
+ \setbox0=\normalvbox{#1}%
+ \vsmashbox0%
+ \box0
+ \egroup}
+
+\def\hsmashed#1%
+ {\bgroup
+ \setbox0=\normalhbox{#1}%
+ \smashbox0%
+ \box0
+ \egroup}
+
+\def\vsmashed#1%
+ {\bgroup
+ \setbox0=\normalvbox{#1}%
+ \smashbox0%
+ \box0
+ \egroup}
+
+%D \macros
+%D {getboxheight}
+%D {}
+%D
+%D Although often needed, \TEX\ does not support arithmics
+%D like:
+%D
+%D \starttypen
+%D \dimen0 = \ht0 + \dp0
+%D \stoptypen
+%D
+%D so we implemented:
+%D
+%D \starttypen
+%D \getboxheight ... \of \box...
+%D \stoptypen
+%D
+%D For instance,
+%D
+%D \starttypen
+%D \getboxheight \dimen0 \of \box0
+%D \getboxheight \someheight \of \box \tempbox
+%D \stoptypen
+
+\def\getboxheight#1\of#2\box#3%
+ {#1=\ht#3%
+ \advance#1 by \dp#3\relax}
+
+%D \macros
+%D {dowithnextbox,
+%D nextbox}
+%D {}
+%D
+%D Sometimes we want a macro to grab a box and do something
+%D on the content. One could pass an argument to a box, but
+%D this can violate the specific \CATCODES\ of its content and
+%D leads to unexpected results. The next macro treats the
+%D following braced text as the content of a box and
+%D manipulates it afterwards in a predefined way.
+%D
+%D The first argument specifies what to do with the content.
+%D This content is available in \type{\nextbox}. The second
+%D argument is one of \type{\hbox}, \type{\vbox} or
+%D \type{\vtop}. The third argument must be grouped with
+%D \type{\bgroup} and \type{\egroup}, \type{{...}} or can be
+%D a \type{\box} specification.
+%D
+%D In \CONTEXT\ this macro is used for picking up a box and
+%D treating it according to earlier specifications. We use for
+%D instance something like:
+%D
+%D \starttypen
+%D \def\getfloat%
+%D {\def\handlefloat{...\box\nextbox...}
+%D \dowithnextbox\handlefloat\vbox}
+%D \stoptypen
+%D
+%D in stead of:
+%D
+%D \starttypen
+%D \def\getfloat#1%
+%D {...#1...}
+%D \stoptypen
+%D
+%D In this implementation the \type{\aftergroup} construction
+%D is needed because \type{\afterassignment} is executed inside
+%D the box.
+
+\newbox\nextbox
+
+\long\def\dowithnextbox#1%
+ {\long\def\dodowithnextbox{#1}%
+ \afterassignment\dododowithnextbox
+ \setbox\nextbox}
+
+\def\dododowithnextbox%
+ {\aftergroup\dodowithnextbox}
+
+%D So in fact we get:
+%D
+%D \starttypen
+%D \setbox\nextbox { \aftergroup\dodowithnextbox ... }
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D \setbox\nextbox { ... } \dodowithnextbox
+%D \stoptypen
+
+%D \macros
+%D {beginofshapebox,
+%D reshapebox, doreshapebox,
+%D flushshapebox,
+%D shapebox,
+%D ifreshapingbox}
+%D {}
+%D
+%D The next utility macro originates from some linenumbering
+%D mechanism. Due to \TEX's advanced way of typesetting
+%D paragraphs, it's not easy to do things on a line||by||line
+%D basis. This macro is able to reprocess a given box and can
+%D act upon its vertical boxed components, such as lines. The
+%D unwinding sequence in this macro is inspired by a \NTG\
+%D workshop of David Salomon in June 1992.
+%D
+%D First we have to grab the piece of text we want to act
+%D upon. This is done by means of the duo macros:
+%D
+%D \starttypen
+%D \beginofshapebox
+%D a piece of text
+%D \endofshapebox
+%D \stoptypen
+%D
+%D When all texts is collected, we can call \type{\reshapebox}
+%D and do something with it's vertical components. We can make
+%D as much passes as needed. When we're done, the box can be
+%D unloaded with \type{\flushshapebox}. The only condition in
+%D this scheme is that \type{\reshapebox} must somehow unload
+%D the \BOX\ \type{\shapebox}.
+%D
+%D An important aspect is that the content is unrolled
+%D bottom||up. The next example illustrates this maybe
+%D unexpected characteristic.
+%D
+%D \startbuffer
+%D \beginofshapebox
+%D \em \input tufte
+%D \endofshapebox
+%D
+%D \newcounter\LineNumber
+%D
+%D \reshapebox
+%D {\doglobal\increment\LineNumber
+%D \hbox{\llap{\LineNumber\hskip2em}\box\shapebox}}
+%D
+%D \flushshapebox
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D As we can see, when some kind of numbering is done, we have
+%D to add a second pass.
+%D
+%D \startbuffer
+%D \newcounter\LineNumber
+%D \newcounter\NumberOfLines
+%D
+%D \reshapebox
+%D {\doglobal\increment\NumberOfLines
+%D \box\shapebox}
+%D
+%D \reshapebox
+%D {\doglobal\increment\LineNumber
+%D \hbox
+%D {\llap{\LineNumber\ (\NumberOfLines)\hskip2em}%
+%D \box\shapebox}%
+%D \doglobal\decrement\NumberOfLines}
+%D
+%D \flushshapebox
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D This example shows that the content of the box is still
+%D available after flushing. Another feature is that only the
+%D last reshaping counts. Multiple reshaping can be done by:
+%D
+%D \startbuffer
+%D \beginofshapebox
+%D \flushshapebox
+%D \endofshapebox
+%D
+%D \reshapebox
+%D {\doglobal\increment\LineNumber
+%D \hbox{\llap{$\star$\hskip1em}\box\shapebox}%
+%D \doglobal\decrement\NumberOfLines}
+%D
+%D \flushshapebox
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D The macros are surprisingly easy to follow and in fact
+%D introduce no new concepts. Nearly all books on \TEX\ show
+%D similar solutions for unwinding \BOXES.
+%D
+%D Some macros, like footnote ones, can be sensitive for
+%D reshaping, which can result in an endless loop. We
+%D therefore offer:
+%D
+%D \starttypen
+%D \ifreshapingbox
+%D \stoptypen
+%D
+%D Some \CONTEXT\ commands are protected this way. Anyhow,
+%D reshaping is aborted after 100 dead cycles.
+%D
+%D By the way, changing the height and depth of \BOX\
+%D \type{\shapebox} results in bad spacing. This means that
+%D for instance linenumbers etc. should be given zero height
+%D and depth before being lapped into the margin. The
+%D previous examples ignore this side effect, but beware!
+
+\newif\ifsomeshapeleft
+\newif\ifreshapingbox
+
+\def\shapesignal {.12345678pt}
+
+\newbox \shapebox
+\newcount \shapepenalty
+\newdimen \shapekern
+\newskip \shapeskip
+
+\newbox\newshapebox
+\newbox\oldshapebox
+
+\newcount\shapecounter
+
+\def\reshapebox#1%
+ {\doreshapebox
+ {#1}
+ {\penalty\shapepenalty}
+ {\kern\shapekern}
+ {\vskip\shapeskip}}
+
+\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
+ {\setbox\newshapebox=\normalvbox
+ \bgroup
+ \unvcopy\oldshapebox
+ \setbox\newshapebox=\box\voidb@x
+ \shapecounter=0
+ \loop
+ \someshapelefttrue
+ \ifdim\lastskip=\!!zeropoint\relax
+ \ifdim\lastkern=\!!zeropoint\relax
+ \ifnum\lastpenalty=0
+ \setbox\shapebox=\lastbox
+ \ifvoid\shapebox
+ \unskip\unpenalty\unkern
+ \else
+ \ifdim\wd\shapebox=\shapesignal\relax
+ \someshapeleftfalse
+ \else
+ \shapecounter=0
+ \setbox\newshapebox=
+ \normalvbox{#1\unvbox\newshapebox}
+ \fi
+ \fi
+ \else
+ \shapepenalty=\lastpenalty
+ \setbox\newshapebox=
+ \normalvbox{#2\unvbox\newshapebox}
+ \unpenalty
+ \fi
+ \else
+ \shapekern=\lastkern
+ \setbox\newshapebox=
+ \normalvbox{#3\unvbox\newshapebox}
+ \unkern
+ \fi
+ \else
+ \shapeskip=\lastskip
+ \setbox\newshapebox=
+ \normalvbox{#4\unvbox\newshapebox}
+ \unskip
+ \fi
+ \ifnum\shapecounter>100 % can be less
+ \message{<<forced exit from shapebox>>}%
+ \someshapeleftfalse
+ \else
+ \advance\shapecounter by 1
+ \fi
+ \ifsomeshapeleft \repeat
+ \unvbox\newshapebox
+ \egroup}
+
+\def\beginofshapebox%
+ {\setbox\oldshapebox=\normalvbox
+ \bgroup
+ \reshapingboxtrue
+ \hbox to \shapesignal{\hss}}
+
+\def\endofshapebox%
+ {\endgraf
+ \egroup}
+
+\def\flushshapebox%
+ {\ifdim\ht\newshapebox=\!!zeropoint\relax
+ \else
+ % make \prevdepth legal
+ \par
+ % and take a look
+ \ifdim\prevdepth=\hideskip\relax
+ \prevdepth=\!!zeropoint
+ \fi
+ \ifdim\prevdepth<\!!zeropoint
+ % something like a line or a signal or ...
+ \else
+ \ifinner
+ % not watertight and not ok
+ \else\ifdim\pagegoal=\maxdimen\else
+ % give the previous line a normal depth
+ \vbox to \!!zeropoint{}
+ % go back one line
+ \vskip-\lineheight
+ \fi\fi
+ \fi
+ \unvcopy\newshapebox\relax
+ % \prevdepth=0pt and \dp\newshapebox depend on last line
+ \kern-\dp\newshapebox\relax
+ % now \prevdepth=0pt
+ \fi}
+
+%D For absolute control, one can use \type{\doreshapebox}
+%D directly. This macro takes four arguments, that take care
+%D of:
+%D
+%D \startopsomming[n,opelkaar]
+%D \som \type{\shapebox}
+%D \som \type{\shapepenalty}
+%D \som \type{\shapekern}
+%D \som \type{\shapeskip}
+%D \stopopsomming
+
+%D \macros
+%D {hyphenatedword,
+%D dohyphenateword}
+%D {}
+%D
+%D The next one is a tricky one. \PLAIN\ \TEX\ provides
+%D \type{\showhyphens} for showing macros on the terminal. When
+%D preparing a long list of words we decided to show the
+%D hyphens, but had to find out that the \PLAIN\ alternative
+%D can hardly be used and|/|or adapted to typesetting. The next
+%D two macros do the job and a little more.
+%D
+%D The simple command \type{\hyphenatedword} accepts one
+%D argument and gives the hyphenated word. This macro calls for
+%D
+%D \starttypen
+%D \dohyphenateword {n} {pre} {word}
+%D \stoptypen
+%D
+%D The next examples tell more than lots of words:
+%D
+%D \startbuffer
+%D \dohyphenateword{0} {} {dohyphenatedword}
+%D \dohyphenateword{1} {...} {dohyphenatedword}
+%D \dohyphenateword{2} {...} {dohyphenatedword}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here, \type{\hyphenatedword{dohyphenatedword}} is the
+%D shorter alternative for the first line.
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D These macros are slow but effective and not that hard to
+%D program at all.
+
+\def\dohyphenateword#1#2#3%
+ {\bgroup
+ \setbox0=\hbox
+ {\mindermeldingen
+ \widowpenalty=0
+ \clubpenalty=0
+ \setbox0=\vbox
+ {\hsize\!!zeropoint \ #3}%
+ \ifnum#1>0
+ \dorecurse{#1}
+ {\setbox2=\hbox
+ {\vsplit0 to \baselineskip}}%
+ #2%
+ \fi
+ \loop
+ \setbox2=\hbox
+ {\vsplit0 to \baselineskip}%
+ \hbox
+ {\unhbox2
+ \setbox2=\lastbox
+ \vbox
+ {\unvbox2
+ \setbox2=\lastbox
+ \hbox{\unhbox2}}}%
+ \ifdim\ht0>\!!zeropoint
+ \repeat}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \box0
+ \egroup}
+
+\def\hyphenatedword%
+ {\dohyphenateword{0}{}}
+
+%D \macros
+%D {doboundtext}
+%D {}
+%D
+%D Sometimes there is not enough room to show the complete
+%D (line of) text. In such a situation we can strip of some
+%D characters by using \type{\doboundtext}. When the text is
+%D wider than the given width, it's split and the third
+%D argument is appended. When the text to be checked is packed
+%D in a command, we'll have to use \type{\expandafter}.
+%D
+%D \starttypen
+%D \doboundtext{a very, probably to long, text}{3cm}{...}
+%D \stoptypen
+%D
+%D When calculating the room needed, we take the width of the
+%D third argument into account, which leads to a bit more
+%D complex macro than needed at first sight.
+
+\def\dodoboundtext#1%
+ {\setbox0=\hbox{\unhcopy0 #1}%
+ \ifdim\wd0>\dimen0
+ \let\dodoboundtext=\gobbleoneargument
+ \else
+ #1\relax
+ \fi}
+
+\def\doboundtext#1#2#3%
+ {\hbox
+ {\setbox0=\hbox{#1}%
+ \dimen0=#2\relax
+ \ifdim\wd0>\dimen0
+ \setbox2=\hbox{#3}%
+ \advance\dimen0 by -\wd2
+ \setbox0=\hbox{}%
+ \processtokens
+ {\dodoboundtext}
+ {\dodoboundtext}
+ {}
+ {\space}
+ {#1}%
+ \box2
+ \else
+ \box0
+ \fi}}
+
+%D \macros
+%D {limitatetext}
+%D {}
+%D
+%D A bit more beautiful alternative for the previous command is
+%D the next one. This command is more robust because we let
+%D \TEX\ do most of the job. The previous command works better
+%D on text that cannot be hyphenated.
+%D
+%D \starttypen
+%D \limitatetext {text} {width} {sentinel}
+%D \stoptypen
+%D
+%D When no width is given, the whole text comes available. The
+%D sentinel is optional.
+
+\def\limitatetext#1#2#3%
+ {\doifelse{#2}{}
+ {#1}
+ {\bgroup
+ \setbox0=\hbox{#1}%
+ \dimen0=#2\relax
+ \ifdim\wd0>\dimen0
+ \setbox2=\hbox{\ #3}%
+ \advance\dimen0 by -\wd2
+ \setbox0=\vbox
+ {\hsize=\dimen0\relax
+ \hfuzz\maxdimen
+ \raggedright
+ \strut\unhbox0}%
+ \vbox % if omitted: missing brace reported
+ {\setbox0=\vsplit0 to \ht\strutbox
+ \unvbox0
+ \setbox0=\lastbox
+ \unhbox0\kern0pt\box2}%
+ \else
+ \unhbox0
+ \fi
+ \egroup}}
+
+%D \macros
+%D {processisolatedwords}
+%D {}
+%D
+%D References are often made up of one word or a combination
+%D of tightly connected words. The typeset text {\bf
+%D chapter~5} is for instance the results of the character
+%D sequence:
+%D
+%D \starttypen
+%D The typeset text \in{chapter}[texniques] is for instance
+%D \stoptypen
+%D
+%D When such words are made active in interactive texts, the
+%D combination cannot longer be hyphenated. Normally this is no
+%D problem, because \TEX\ tries to prevent hyphenation as best
+%D as can.
+%D
+%D Sometimes however we need a few more words to make things
+%D clear, like when we want to refer to {\bf \TEX\ by Topic}.
+%D The macros that are responsible for typesetting hyperlinks,
+%D take care of such sub||sentences by breaking them up in
+%D words. Long ago we processed words using the space as a
+%D separator, but the more advanced our interactive text became,
+%D the more we needed a robust solution. Well, here it is and
+%D it called as:
+%D
+%D \starttypen
+%D \processisolatedwords{some words}\someaction
+%D \stoptypen
+%D
+%D The second argument \type{someactions} handles the
+%D individual words, like in:
+%D
+%D \startbuffer
+%D \processisolatedwords{some more words} \ruledhbox \par
+%D \processisolatedwords{and some $x + y = z$ math} \ruledhbox \par
+%D \processisolatedwords{and a \hbox{$x + y = z$}} \ruledhbox \par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D which let the words turn up as:
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D The macro has been made a bit more clever than needed at
+%D first sight. This is due to the fact that we don't want to
+%D generate more overhead in terms of interactive commands than
+%D needed.
+%D
+%D \startbuffer
+%D \processisolatedwords{see this \ruledhskip1em} \ruledhbox
+%D \processisolatedwords{and \ruledhskip1em this one} \ruledhbox
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D becomes:
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D Single word arguments are treated without further
+%D processing. This was needed because this command is used in
+%D the \type{\goto} command, to which we sometimes pass very
+%D strange and|/|or complicated arguments or simply boxes
+%D whose dimensions are to be left intact.
+%D
+%D First we build a \type{\hbox}. This enables us to save the
+%D last skip. Next we fill a \type{\vbox} without hyphenating
+%D words. After we've tested if there is more than one word, we
+%D start processing the individual lines (words). We need some
+%D splitting, packing and unpacking to get the spacing and
+%D dimensions right.
+
+\def\processisolatedwords#1#2%
+ {\bgroup
+ \mindermeldingen
+ \forgetall
+ \setbox0=\hbox
+ {#1%
+ \xdef\isolatedlastskip{\the\lastskip}}%
+ \setbox2=\vbox
+ {\hyphenpenalty10000
+ \hsize\!!zeropoint
+ \unhcopy0}% == #1
+ \ifdim\ht0=\ht2
+ #2{\unhcopy0}% == #2{#1}
+ \else
+ \setbox0=\hbox
+ {\ignorespaces
+ \loop
+ \setbox4=\hbox
+ {\vsplit2 to \baselineskip}%
+ \hbox
+ {\unhbox4
+ \setbox4=\lastbox
+ \vbox
+ {\unvbox4
+ \setbox4=\lastbox
+ #2{\hbox{\unhbox4}}}}%
+ \hskip\fontdimen2\font
+ \!!plus \fontdimen3\font
+ \!!minus \fontdimen4\font
+ \ifdim\ht2>\!!zeropoint \repeat
+ \unskip}%
+ \unhbox0\unskip\hskip\isolatedlastskip
+ \fi
+ \egroup}
+
+%D \macros
+%D {sbox}
+%D {}
+%D
+%D This is a rather strange command. It grabs some box content
+%D and and limits the size to the height and depth of a
+%D \type{\strut}. The resulting bottom||alligned box can be used
+%D aside other ones, without disturbing the normal baseline
+%D distance.
+%D
+%D \startbuffer
+%D \ruledhbox to .5\hsize{\sbox{eerste\par tweede \par derde}}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Shows up as:
+%D
+%D \startvoorbeeld
+%D \vskip3\baselineskip
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D Before displaying the result we added some skip, otherwise
+%D the first two lines would have ended up in the text. This
+%D macro can be useful when building complicated menus, headers
+%D and footers and|/|or margin material.
+%D
+%D {\em This macro still needs some improvement.}
+
+\def\sbox% in handleiding, voorbeeld \inlinker{xx} \extern..
+ {\dowithnextbox
+ {\setbox0=\hbox
+ {\strut
+ \dp\nextbox=0pt
+ \lower\strutdepth\box\nextbox}%
+ \dp0=\strutdepth
+ \ht0=\strutheight
+ \box0}%
+ \vbox}
+
+%D \macros
+%D {centeredbox}
+%D {}
+%D
+%D Here is another strange one. This one offers a sort of overlay
+%D with positive or negative offsets. This command can be used
+%D in well defined areas where no offset options are available.
+%D We first used it when building a button inside the margin
+%D footer, where the button should have a horizontal offset and
+%D should be centered with respect to the surrounding box. The
+%D last of the three examples we show below says:
+%D
+%D \starttypen
+%D \vsize=3cm
+%D \hsize=3cm
+%D \ruledvbox to \vsize
+%D {\centeredbox height .5cm width -1cm
+%D {\vrule width \hsize height \vsize}}}
+%D \stoptypen
+%D
+%D Here the \type{\ruledvbox} just shows the surrounding box
+%D and \type{\vrule} is used to show the centered box.
+%D
+%D \def\AnExample#1#2%
+%D {\vsize=3cm
+%D \hsize=3cm
+%D \ruledvbox to \vsize
+%D {\centeredbox height #1 width #2
+%D {\color[groen]{\vrule width \hsize height \vsize}}}}
+%D
+%D \startregelcorrectie
+%D \startcombinatie[3*1]
+%D {\AnExample {-1cm} {.5cm}} {}
+%D {\AnExample {.5cm} {-1cm}} {}
+%D {\AnExample {-1cm} {-.5cm}} {}
+%D \stopcombinatie
+%D \stopregelcorrectie
+%D
+%D This command takes two optional arguments: \type{width} and
+%D \type{height}. Observing readers can see that we use \TEX's
+%D own scanner for grabbing these arguments: \type{#1#} reads
+%D everyting till the next brace and passes it to both rules.
+%D The setting of the box dimensions at the end is needed for
+%D special cases. The dimensions of the surounding box are kept
+%D intact. This commands handles positive and negative
+%D dimensions (which is why we need two boxes with rules).
+
+\def\centeredbox#1#% height +/-dimen width +/-dimen
+ {\bgroup
+ \setbox0=\vbox to \vsize
+ \bgroup
+ \mindermeldingen
+ \forgetall
+ \setbox0=\hbox{\vrule\!!width\!!zeropoint#1}%
+ \setbox2=\vbox{\hrule\!!height\!!zeropoint#1}%
+ \advance\vsize by \ht2
+ \advance\hsize by \wd0
+ \vbox to \vsize
+ \bgroup
+ \vskip-\ht2
+ \vss
+ \hbox to \hsize
+ \bgroup
+ \dowithnextbox
+ {\hskip-\wd0
+ \hss
+ \box\nextbox
+ \hss
+ \egroup
+ \vss
+ \egroup
+ \egroup
+ \wd0=\hsize
+ \ht0=\vsize
+ \box0
+ \egroup}
+ \hbox}
+
+%D \macros
+%D {startbaselinecorrection,baselinecorrection,
+%D showbaselinecorrection,offbaselinecorrection}
+%D
+%D Spacing around ruled boxes can get pretty messed up. The
+%D next macro tries as good as possible to fix this.
+%D
+%D \startbuffer[1]
+%D \startbaselinecorrection
+%D \ruledhbox{Rule Brittanica}
+%D \stopbaselinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer[1]
+%D
+%D The macros put some white space around the box:
+%D
+%D \haalbuffer[1]
+%D
+%D A simple alternative is \type {\baselinecorrection}, which
+%D only looks at the previous line.
+%D
+%D \startbuffer[2]
+%D \baselinecorrection
+%D \ruledhbox{Rule Brittanica}
+%D \baselinecorrection
+%D \stopbuffer
+%D
+%D \typebuffer[2]
+%D
+%D This time the last preceding line gets a correction,%
+%D dependant on the depth.
+%D
+%D \haalbuffer[2]
+%D
+%D One can make the correction visible by saying \type
+%D {\showbaselinecorrection}. Part of the correction is
+%D calculated from the dimensions of a~(. One can disble the
+%D correction by calling \type {\offbaselinecorrection}.
+%D
+%D When visulaize the first example looks like:
+%D
+%D {\showbaselinecorrection\haalbuffer[1]}
+%D
+%D and the second one comes out as:
+%D
+%D {\showbaselinecorrection\haalbuffer[2]}
+
+\def\setbaselinecorrections%
+ {\setbox0=\hbox{\setstrut\strut}%
+ \setbox2=\hbox{(}%
+ \dimen0=\ht0\advance\dimen0 by -\ht2
+ \ifdim\dimen0<\!!zeropoint\dimen0=\!!zeropoint\fi
+ \dimen2=\dp0\advance\dimen2 by -\dp2
+ \ifdim\dimen2<\!!zeropoint\dimen2=\!!zeropoint\fi
+ \edef\thetopbaselinecorrection{\the\dimen0}%
+ \edef\thebotbaselinecorrection{\the\dimen2}}
+
+\def\dotopbaselinecorrection%
+ {\kern\thetopbaselinecorrection}
+
+\def\dobotbaselinecorrection%
+ {\kern\thebotbaselinecorrection}
+
+\def\showbaselinecorrection%
+ {\def\dobaselinecorrection% visualization is not watertight!
+ {\bgroup
+ \kern-\prevdepth
+ \setbox0=\null
+ \wd0=\hsize\dp0=\dp\strutbox
+ \nointerlineskip
+ \ruledvbox{\box0}%
+ \egroup
+ \prevdepth=\dp\strutbox}%
+ \def\dotopbaselinecorrection%
+ {\hrule\!!height\thetopbaselinecorrection}%
+ \def\dobotbaselinecorrection%
+ {\hrule\!!height\thebotbaselinecorrection}}
+
+\def\dobaselinecorrection%
+ {\kern-\prevdepth
+ \kern\dp\strutbox
+ \prevdepth=\dp\strutbox}
+
+\def\baselinecorrection%
+ {\endgraf
+ \ifvmode
+ \ifdim\prevdepth<\maxdimen
+ \ifdim\prevdepth<\!!zeropoint \else
+ \ifdim\prevdepth<\dp\strutbox
+ \dobaselinecorrection
+ \fi
+ \fi
+ \fi
+ \fi}
+
+\def\startbaselinecorrection%
+ {\baselinecorrection
+ \ifvmode
+ \bgroup
+ \setbox\scratchbox=\vbox\bgroup
+ \ignorespaces
+ \let\stopbaselinecorrection=\dostopbaselinecorrection
+ \else
+ \let\stopbaselinecorrection=\relax
+ \fi}
+
+%D We do a bit more checking than needed. The pageborder check
+%D is not needed, but I want to look the visualization as good
+%D as possible too.
+
+\def\dostopbaselinecorrection% I have to check columns yet.
+ {\endgraf
+ \egroup
+ \topbaselinecorrection
+ \box\scratchbox
+ \botbaselinecorrection
+ \egroup}
+
+\def\offbaselinecorrection%
+ {\let\startbaselinecorrection=\relax
+ \let\dostopbaselinecorrection =\relax}
+
+%D \macros
+%D {topbaselinecorrection,botbaselinecorrection}
+%D
+%D The actual top and bottom corrections are implemented as:
+
+\def\topbaselinecorrection%
+ {\ifvmode
+ \bgroup
+ \setbaselinecorrections
+ \ifdim\pagegoal<\maxdimen
+ \dimen2=\ht\scratchbox
+ \advance\dimen2 by \dp\scratchbox
+ \advance\dimen2 by \parskip
+ \advance\dimen2 by \thetopbaselinecorrection
+ \advance\dimen2 by \thebotbaselinecorrection
+ \dimen0=\pagetotal
+ \advance\dimen0 by \dimen2
+ \ifdim\dimen0<\pagegoal
+ \witruimte
+ \nointerlineskip
+ \dotopbaselinecorrection
+ \else
+ \ifbinnenkolommen % should be supp-status
+ \vskip\dimen2 % this could
+ \penalty\outputpenalty % be improved
+ \else
+ \vfill\eject % should be supp-control
+ \fi
+ \fi
+ \fi
+ \egroup
+ \fi}
+
+\def\botbaselinecorrection%
+ {\ifvmode
+ \bgroup
+ \setbaselinecorrections
+ \dobotbaselinecorrection
+ \prevdepth\dp\strutbox
+ \egroup
+ \fi}
+
+%D \macros
+%D {setrigidcolumnhsize,rigidcolumnbalance}
+%D
+%D These macros are copied from the \TEX book, page~397, and
+%D extended by a macro that sets the \type{\hsize}.
+%D
+%D \starttypen
+%D \setrigidcolumnhsize {total width} {distance} {n}
+%D \rigidcolumnbalance {box} {n}
+%D \stoptypen
+%D
+%D Both these macros are for instance used in typesetting
+%D footnotes.
+
+\def\setrigidcolumnhsize#1#2#3%
+ {\hsize=#1\relax
+ \dimen0=-#2\relax
+ \multiply\dimen0 by #3\relax
+ \advance\dimen0 by #2\relax
+ \advance\hsize by \dimen0
+ \divide\hsize by #3\relax}
+
+\def\rigidcolumnbalance#1#2%
+ {\global\chardef\rigidcolumnbox=#1\relax
+ \global\chardef\rigidcolumns=#2\relax
+ \ifnum\rigidcolumns=1
+ \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox
+ \else
+ \line
+ {\vbadness=10000
+ \hfilneg
+ \valign{##\vfill\cr\dorigidcolumnsplits}}%
+ \fi}
+
+\def\dorigidcolumnsplits%
+ {\ifnum\rigidcolumns>0
+ \noalign{\hfil}\dorigidcolumnsplitoff
+ \doglobal\decrement\rigidcolumns
+ \cr
+ \dorigidcolumnsplits
+ \fi}
+
+\def\dorigidcolumnsplitoff%
+ {\splittopskip=\ht\strutbox
+ \dimen0=\ht\rigidcolumnbox
+ \divide\dimen0 by \rigidcolumns
+ \advance\dimen0 by \ht\strutbox
+ \vsplit\rigidcolumnbox to \dimen0 }
+
+%D \macros
+%D {startvboxtohbox,stopvboxtohbox,convertvboxtohbox}
+%D
+%D Here is another of Knuth's dirty tricks, as presented on
+%D pages 398 and 399 of the \TEX book. These macros can be used
+%D like:
+%D
+%D \starttypen
+%D \vbox
+%D \bgroup
+%D \startvboxtohbox ... \stopvboxtohbox
+%D \startvboxtohbox ... \stopvboxtohbox
+%D \startvboxtohbox ... \stopvboxtohbox
+%D \egroup
+%D
+%D \vbox
+%D \bgroup
+%D \converthboxtovbox
+%D \egroup
+%D \stoptypen
+%D
+%D These macros are used in reformatting footnotes, so they do
+%D what they're meant for.
+
+\def\setvboxtohbox%
+ {\bgroup
+ \ifdim\baselineskip<16pt \relax
+ \dimen0=\baselineskip
+ \multiply\dimen0 by 1024
+ \else
+ \message{cropping \baselineskip to 16pt}%
+ \baselineskip=\maxdimen
+ \fi
+ \divide\dimen0 by \hsize
+ \multiply\dimen0 by 64
+ \xdef\vboxtohboxfactor{\expandafter\withoutpt\the\dimen0}%
+ \egroup}
+
+\def\startvboxtohbox%
+ {\bgroup
+ \setvboxtohbox
+ \setbox0=\hbox\bgroup}
+
+\def\stopvboxtohbox%
+ {\egroup
+ \dp0=\!!zeropoint
+ \ht0=\vboxtohboxfactor\wd0
+ \box0
+ \egroup}
+
+\def\convertvboxtohbox%
+ {\setvboxtohbox
+ \makehboxofhboxes
+ \setbox0=\hbox{\unhbox0 \removehboxes}%
+ \noindent\unhbox0\par}
+
+\def\makehboxofhboxes%
+ {\setbox0=\hbox{}%
+ \loop
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}%
+ \repeat}
+
+\def\removehboxes%
+ {\setbox0=\lastbox
+ \ifhbox0
+ {\removehboxes}%
+ \unhbox0
+ \fi}
+
+%D \macros
+%D {doifcontent}
+%D
+%D When processing depends on the availability of content, one
+%D can gove the next macro a try.
+%D
+%D \starttypen
+%D \doifcontent{pre content}{post content}{no content}\somebox
+%D \stoptypen
+%D
+%D Where \type{\somebox} is either a \type{\hbox} or
+%D \type{\vbox}. If the dimension of this box suggest some
+%D content, the resulting box is unboxed and surrounded by the
+%D first two arguments, else the third arguments is executed.
+
+\def\doifcontent#1#2#3%
+ {\dowithnextbox
+ {\ifhbox\nextbox
+ \ifdim\wd\nextbox>\!!zeropoint
+ #1\unhbox\nextbox#2\relax
+ \else
+ #3\relax
+ \fi
+ \else
+ \ifdim\ht\nextbox>\!!zeropoint
+ #1\unvbox\nextbox#2\relax
+ \else
+ #3\relax
+ \fi
+ \fi}}
+
+%D So when we say:
+%D
+%D \startbuffer
+%D \doifcontent{[}{]}{}\hbox{content sensitive typesetting}
+%D
+%D \doifcontent{}{\pagina}{}\vbox{content sensitive typesetting}
+%D
+%D \doifcontent{}{}{\message{Didn't you forget something?}}\hbox{}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D We get:
+%D
+%D \haalbuffer
+%D
+%D Where the last call of course does not show up in this
+%D document, but definitely generates a confusing message.
+
+% maybe some day we need this
+%
+% \def\appendvbox#1% % uses \box8
+% {\bgroup
+% \ifdim\prevdepth<\!!zeropoint
+% \ifdim\pagetotal=\!!zeropoint
+% \setbox8=\vtop{\unvcopy#1}%
+% \hrule\c!!height\!!zeropoint
+% \kern-\ht8
+% \box#1\relax
+% \else
+% \box#1\relax
+% \fi
+% \else
+% \dimen0=\prevdepth
+% \hrule\c!!height\!!zeropoint
+% \setbox8=\vtop{\unvcopy#1}%
+% \dimen2=\baselineskip
+% \advance\dimen2 by -\dimen0
+% \advance\dimen2 by -\ht8
+% \kern\dimen2
+% \box#1\relax
+% \fi
+% \egroup}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex new file mode 100644 index 000000000..4a9d3fb74 --- /dev/null +++ b/tex/context/base/supp-fil.tex @@ -0,0 +1,351 @@ +%D \module
+%D [ file=supp-fil,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \TEX\ operates on files, so one wouldn't wonder that there
+%D is a separate module for file support. In \CONTEXT\ files
+%D are used for several purposes:
+%D
+%D \startopsomming[opelkaar]
+%D \som general textual input
+%D \som logging status information
+%D \som saving registers, lists and references
+%D \som buffering defered textual input
+%D \stopopsomming
+%D
+%D When dealing with files we can load them as a whole, using
+%D the \type{\input} primitive or load them on a line||by||line
+%D basis, using \type{\read}. Writing is always done line by
+%D line, using \type{\write}.
+
+\writestatus{loading}{Context Support Macros / Files}
+
+\unprotect
+
+%D \macros
+%D {pushendofline,popendofline}
+%D {}
+%D
+%D When we are loading files in the middle of the typesetting
+%D process, for instance when we load references, we have to be
+%D sure that the reading process does not generate so called
+%D 'spurious spaces'. This can be prevented by assigning the
+%D line ending character the \CATCODE\ comment. This is
+%D accomplished by
+%D
+%D \starttypen
+%D \pushendofline
+%D ... reading ...
+%D \popendofline
+%D \stoptypen
+%D
+%D Just to be sure, we save the current meaning of \type{^^M}
+%D in \type{\poppedendofline}.
+
+\def\pushendofline
+ {\chardef\poppedendofline=\the\catcode`\^^M\relax
+ \catcode`\^^M=\@@comment\relax}
+
+\def\popendofline
+ {\catcode`\^^M=\poppedendofline}
+
+%D \macros
+%D {scratchread, scratchwrite}
+%D {}
+%D
+%D We define a scratch file for reading. Keep in mind that
+%D the number of files is limited to~16, so use this one when
+%D possible. We also define a scratch output file.
+
+\newread \scratchread
+\newwrite \scratchwrite
+
+%D \macros
+%D {processfile,fileline}
+%D
+%D The next macro offers a framework for processing files on a
+%D line by line basis.
+%D
+%D \starttypen
+%D \processfile \identifier {name} \action
+%D \stoptypen
+%D
+%D The first argument can for instance be \type{\scratchread}.
+%D The action must do something with \type{\fileline}, which
+%D holds the current line.
+
+\def\doprocessfile#1#2#3%
+ {\openin#1=#2\relax
+ \gdef\doprocessline%
+ {\ifeof#1%
+ \gdef\doprocessline{\closein#1}%
+ \else
+ \global\read#1 to \fileline
+ #3\relax
+ \fi
+ \doprocessline}%
+ \doprocessline}
+
+%D \macros
+%D {readfile,ReadFile,maxreadlevel,
+%D normalinput}
+%D {}
+%D
+%D One cannot be sure if a file exists. When no file can be
+%D found, the \type{\input} primitive gives an error message
+%D and switches to interactive mode. The macro \type{\readfile}
+%D takes care of non||existing files. This macro has two faces.
+%D
+%D \starttypen
+%D \ReadFile {filename}
+%D \readfile {filename} {before loading} {not found}
+%D \stoptypen
+%D
+%D Many \TEX\ implementations have laid out some strategy for
+%D locating files. This can lead to unexpected results,
+%D especially when one loads files that are not found in the
+%D current directory. Let's give an example of this. In
+%D \CONTEXT\ illustrations can be defined in an external file.
+%D The resizing macro first looks if an illustration is defined
+%D in the local definitions file. When no such file is found,
+%D it searches for a global file and when this file is not
+%D found either, the illustration itself is scanned for
+%D dimensions. One can imagine what happens if an adapted,
+%D localy stored illustration, is scaled according to
+%D dimensions stored somewhere else.
+%D
+%D When some \TEX\ implementation starts looking for a file, it
+%D normally first looks in the current directory. When no file
+%D is found, \TEX\ starts searching on the path where format
+%D and/or style files are stored. Depending on the implementation
+%D this can considerably slow down processing speed.
+%D
+%D In \CONTEXT, we support a project||wise ordening of files.
+%D In such an approach it seems feasible to store common files
+%D in a lower directory. When for instance searching for a
+%D general layout file, we therefore have to backtrack.
+%D
+%D These three considerations have lead to a more advanced
+%D approach for loading files.
+%D
+%D We first present an earlier implementation of
+%D \type{\readfile}. This command backtracks parent
+%D directories, upto a predefined level. Users can change this
+%D level, but we default to~3.
+%D
+%D \starttypen
+%D \def\maxreadlevel {3}
+%D \stoptypen
+%D
+%D This is a pseudo \COUNTER.
+%D
+%D We use \type{\normalinput} instead of \type{\input}
+%D because we want to be able to redefine the original
+%D \type{\input} when needed, for instance when loading third
+%D party libraries.
+
+\let\normalinput=\input
+
+\def\maxreadlevel {3}
+
+\def\doreadfile#1#2#3%
+ {\immediate\openin\scratchread=#1\relax
+ \ifeof\scratchread
+ \immediate\closein\scratchread
+ \decrement\readlevel
+ \ifnum\readlevel>0\relax
+ \doreadfile{\f!parentpath/#1}{#2}{#3}%
+ \else
+ #3%
+ \fi
+ \else
+ \immediate\closein\scratchread
+ #2%
+ \normalinput #1\relax
+ \fi}
+
+\def\readfile#1%
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{#1}}
+
+\def\ReadFile#1%
+ {\readfile{#1}{}{}}
+
+%D \macros
+%D {readjobfile,readlocfile,readsysfile,readfixfile}
+%D {}
+%D
+%D This implementation honnors the third situation, but we
+%D still can get unwanted files loaded and/or can get involved
+%D in extensive searching.
+%D
+%D Due to different needs, we decided to offer four alternative
+%D loading commands. With \type{\readjobfile} we load a local
+%D file and do no backtracking, while \type{\readlocfile}
+%D backtracks~\readlevel\ directories, including the current
+%D one.
+
+\def\readjobfile#1%
+ {\newcounter\readlevel
+ \doreadfile{\f!currentpath/#1}}
+
+\def\readlocfile#1%
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{\f!currentpath/#1}}
+
+%D System files can be anywhere and therefore
+%D \type{\readsysfile} is not bound to the current directory
+%D and obeys the \TEX\ implementation.
+
+\def\readsysfile#1%
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{#1}}
+
+%D The last one, \type{\readfixfile} searches on the directory
+%D specified and backtracks too.
+
+\def\readfixfile#1#2%
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{#1/#2}}
+
+%D After having defined this commands, we reconsidered the
+%D previously defined \type{\readfile}. This time we more or
+%D less impose the search order.
+
+\def\readfile#1#2#3%
+ {\readlocfile{#1}{#2}
+ {\readjobfile{#1}{#2}
+ {\readsysfile{#1}{#2}{#3}}}}
+
+%D So now we've got ourselves five file loading commands:
+%D
+%D \starttypen
+%D \readfile {filename} {before loading} {not found}
+%D
+%D \readjobfile {filename} {before loading} {not found}
+%D \readlocfile {filename} {before loading} {not found}
+%D \readfixfile {filename} {before loading} {not found}
+%D \readsysfile {directory} {filename} {before loading} {not found}
+%D \stoptypen
+
+%D \macros
+%D {readjobfile,readlocfile,readsysfile,readfixfile}
+%D {}
+%D
+%D The next four alternatives can be used for opening files
+%D for reading on a line||by||line basis. These commands get
+%D an extra argument, the filetag. Explicit closing is done
+%D in the normal way by \type{\closein}.
+
+\def\doopenin#1#2%
+ {\increment\readlevel
+ \immediate\openin#1=#2\relax
+ \ifeof#1\relax
+ \ifnum\readlevel>\maxreadlevel\relax
+ \else
+ \immediate\closein#1\relax
+ \doopenin{#1}{\f!parentpath/#2}%
+ \fi
+ \fi}
+
+\def\openjobin#1#2%
+ {\newcounter\readlevel
+ \doopenin{#1}{\f!currentpath/#2}}
+
+\def\opensysin#1#2%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{#2}}
+
+\def\openlocin#1#2%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{\f!currentpath/#2}}
+
+\def\openfixin#1#2#3%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{#2/#3}}
+
+%D \macros
+%D {doiffileelse,doiflocfileelse}
+%D {}
+%D
+%D The next alternative only looks if a file is present. No
+%D loading is done. This one obeys the standard \TEX\
+%D implementation method.
+%D
+%D \starttypen
+%D \doiffileelse {filename} {before loading} {not found}
+%D \stoptypen
+%D
+%D We use \type{\next} here, because we want to close the
+%D file first. We also provide the local alternative:
+%D
+%D \starttypen
+%D \doiflocfileelse {filename} {before loading} {not found}
+%D \stoptypen
+
+\def\doiffileelse#1#2#3%
+ {\immediate\openin\scratchread=#1\relax
+ \ifeof\scratchread
+ \def\next{#3}%
+ \else
+ \def\next{#2}%
+ \fi
+ \immediate\closein\scratchread
+ \next}
+
+\def\doiflocfileelse#1%
+ {\doiffileelse{\f!currentpath/#1}}
+
+%D \macros
+%D {doinputonce}
+%D {}
+%D
+%D Especially macropackages need only be loaded once.
+%D Repetitive loading not only costs time, relocating registers
+%D often leads to abortion of the processing because \TEX's
+%D capacity is limited. One can prevent multiple loading by
+%D using:
+%D
+%D \starttypen
+%D \doloadonce{filename}
+%D \stoptypen
+%D
+%D This command obeys the standard method for locating files.
+
+\def\doinputonce#1%
+ {\doifundefined{@@@#1@@@}%
+ {\setgvalue{@@@#1@@@}{}%
+ \doiffileelse{#1}{\normalinput #1}{}}}
+
+%D \macros
+%D {doifparentfileelse}
+%D {}
+%D
+%D The test \type{\doifelse{\jobname}{filename}} does not give
+%D the desired result, simply because \type{\jobname} expands
+%D to characters with \CATCODE~12, while the characters in
+%D \type{filename} have \CATCODE~11. So we can better use:
+%D
+%D \starttypen
+%D \doifparentfileelse{filename}{yes}{no}
+%D \stoptypen
+
+\def\doifparentfileelse#1#2#3%
+ {\edef\!!stringa{#1}%
+ \@EA\convertargument\!!stringa\to\!!stringa
+ \@EA\def\@EA\!!stringb\@EA{\jobname}%
+ \ifx\!!stringa\!!stringb#2\else#3\fi}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex new file mode 100644 index 000000000..f747bed2c --- /dev/null +++ b/tex/context/base/supp-fun.tex @@ -0,0 +1,171 @@ +%D \module
+%D [ file=supp-fun,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Fun Stuff,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\unprotect
+
+%\dorecurse{10}
+% {\horizontalpositionbar\pos\recurselevel\min1\max10\token\blokje\\}
+%
+%\hbox to 15em
+% {\hss
+% \dorecurse{10}
+% {\verticalpositionbar\pos\recurselevel\min1\max10\token\blokje\\
+% \hss}}
+
+\def\horizontalpositionbar\pos#1\min#2\max#3\token#4\\%
+ {\hbox to \hsize
+ {\hskip\!!zeropoint\!!plus #1\!!fill
+ \hskip\!!zeropoint\!!plus-#2\!!fill
+ #4\relax
+ \hskip\!!zeropoint\!!plus #3\!!fill
+ \hskip\!!zeropoint\!!plus-#1\!!fill}}
+
+\def\verticalpositionbar\pos#1\min#2\max#3\token#4\\%
+ {\vbox to \vsize
+ {\vskip\!!zeropoint\!!plus #1\!!fill
+ \vskip\!!zeropoint\!!plus-#2\!!fill
+ \hbox{#4}\relax
+ \vskip\!!zeropoint\!!plus #3\!!fill
+ \vskip\!!zeropoint\!!plus-#1\!!fill}}
+
+\def\horizontalgrowingbar\pos#1\min#2\max#3\height#4\depth#5\\%
+ {\hbox to \hsize
+ {\scratchcounter=#1\relax
+ \advance\scratchcounter by -#2\relax
+ \advance\scratchcounter by 1\relax
+ \leaders\vrule\hskip\!!zeropoint\!!plus \scratchcounter\!!fill
+ \vrule\!!width\!!zeropoint\!!height#4\!!depth#5\relax
+ \hskip\!!zeropoint\!!plus #3\!!fill
+ \hskip\!!zeropoint\!!plus-#1\!!fill}}
+
+\def\verticalgrowingbar\pos#1\min#2\max#3\width#4\\%
+ {\vbox to \vsize
+ {\scratchcounter=#1\relax
+ \advance\scratchcounter by -#2\relax
+ \advance\scratchcounter by 1\relax
+ \leaders\hrule\vskip\!!zeropoint\!!plus\scratchcounter\!!fill
+ \hrule\!!width#4\!!height\!!zeropoint\!!depth\!!zeropoint
+ \vskip\!!zeropoint\!!plus #3\!!fill
+ \vskip\!!zeropoint\!!plus-#1\!!fill}}
+
+% \font\GROOT=cminch \GROOT
+%
+% \showmakeup
+%
+% \def\dodoprocesstokens%
+% {\ifx\next\lastcharacter
+% \after
+% \let\next=\relax
+% \else
+% \expandafter\if\normalspace\next
+% \before{\white}%
+% \else
+% \before{\next}%
+% \fi
+% \let\before=\between
+% \let\next=\doprocesstokens
+% \fi
+% \next}
+%
+% \def\stapel#1%
+% {\setbox0=\vbox
+% {\processtokens
+% {\leavevmode\hbox}
+% {\endgraf\leavevmode\hbox}
+% {\endgraf}
+% {\relax}
+% {#1}}%
+% \vbox
+% {\raggedcenter
+% \hsize\wd0
+% \lineskip=5pt
+% \processtokens
+% {\leavevmode\hbox}
+% {\endgraf\leavevmode\hbox}
+% {\endgraf}
+% {\relax}
+% {#1}}}
+%
+% \stapel{NEWMAN 1}
+%
+% \stelkleurenin[status=start]
+%
+% \def\TreatFirstLine#1#2#3#4% before, after, first, next
+% {\bgroup
+% #1%
+% \setbox0=\box\voidb@x
+% \setbox2=\box\voidb@x
+% \def\grabfirstline##1 %
+% {\setbox2=\hbox{\ifvoid0 #3{##1}\else\unhcopy0\ #4{##1}\fi}%
+% \ifdim\wd2>\hsize
+% \hbox to \hsize{\unhbox0}#2##1\
+% \egroup
+% \else
+% \setbox0=\box2
+% \expandafter\grabfirstline
+% \fi}%
+% \grabfirstline}
+%
+% \TreatFirstLine {\bgroup\startkleur[rood]\sc}
+% {\stopkleur\egroup} {} {}Hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more
+%
+% \def\DroppedCaps#1#2#3#4#5#6#7% command font height hoffset voffset lines
+% {\setbox0=\hbox
+% {\font\temp=#2 at #3%
+% \temp#1{#7}\hskip#4}%
+% \setbox0=\hbox
+% {\lower#5\box0}%
+% \ht0=\ht\strutbox
+% \dp0=\dp\strutbox
+% \hangindent\wd0
+% \hangafter-#6\noindent\hskip-\wd0\vbox{\box0\nobreak}}
+%
+% \DroppedCaps {\kleur[groen]} {cmbx12} {2.2\baselineskip}
+% {2pt} {\baselineskip} {2} Hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more hello there are we once more hello
+% there are we once more
+%
+% \def\MyDroppedCaps%
+% {\DroppedCaps
+% {\kleur[groen]}
+% {cmbx12}
+% {2.2\baselineskip}
+% {2pt}
+% {\baselineskip}
+% {2}}
+%
+% \MyDroppedCaps Hello there etc etc etc etc etc etc etc etc
+% etc etc etc etc etc etc etc etc etc etc etc etc
+% etc etc etc etc etc etc etc etc etc etc etc etc
+% etc etc etc etc etc etc etc etc etc etc etc etc
+%
+%
+% \def\TreatFirstCharacter#1#2% command, char
+% {#1{#2}}
+%
+% \TreatFirstCharacter {\kleur[groen]} Hello there are we once
+% more hello there are we once more hello there are we once
+% more hello there are we once more hello there are we once
+% more hello there are we once more hello there are we once
+% more hello there are we once more
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-ini.tex b/tex/context/base/supp-ini.tex new file mode 100644 index 000000000..d409365a1 --- /dev/null +++ b/tex/context/base/supp-ini.tex @@ -0,0 +1,19 @@ +%D \module
+%D [ file=supp-ini,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Support ystem Macros,
+%D subtitle=Initializations,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Support Macros / Initializations}
+
+\newif\ifeightbitcharacters \eightbitcharactersfalse
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex new file mode 100644 index 000000000..2d92f1029 --- /dev/null +++ b/tex/context/base/supp-lan.tex @@ -0,0 +1,687 @@ +%D \module
+%D [ file=supp-lan,
+%D version=1997.03.20,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Language Options,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \gdef\starttest%
+%D {\blanko
+%D \noindent
+%D \halign\bgroup\tt##\hskip2em&##\hskip2em&##\cr}
+%D
+%D \gdef\stoptest%
+%D {\egroup
+%D \blanko}
+%D
+%D \gdef\test#1%
+%D {\convertargument#1\to\ascii\ascii&\hyphenatedword{#1}\cr}
+
+%D One of \TEX's strong points in building paragraphs is the way
+%D hyphenations are handled. Although for real good hyphenation
+%D of non||english languages some extensions to the program are
+%D needed, fairly good results can be reached with the standard
+%D mechanisms and an additional macro, at least in Dutch.
+
+\unprotect
+
+%D \CONTEXT\ originates in the wish to typeset educational
+%D materials, especially in a technical environment. In
+%D production oriented environments, a lot of compound words
+%D are used. Because the Dutch language poses no limits on
+%D combining words, we often favor putting dashes between those
+%D words, because it facilitates reading, at least for those
+%D who are not that accustomed to it.
+%D
+%D In \TEX\ compound words, separated by a hyphen, are not
+%D hyphenated at all. In spite of the multiple pass paragraph
+%D typesetting this can lead to parts of words sticking into
+%D the margin. The solution lays in saying
+%D \type{spoelwater||terugwinunit} instead of
+%D \type{spoelwater-terugwinunit}. By using a one character
+%D command like \type{|}, delimited by the same character
+%D \type{|}, we get ourselves both a decent visualization (in
+%D \TEXEDIT\ and colored verbatim we color these commands
+%D yellow) and an efficient way of combining words.
+%D
+%D The sequence \type{||} simply leads to two words connected by
+%D a hyphen. Because we want to distinguish such a hyphen from
+%D the one inserted when \TEX\ hyphenates a word, we use a bit
+%D longer one.
+%D
+%D \hyphenation {spoel-wa-ter te-rug-win-unit}
+%D
+%D \starttest
+%D \test {spoelwater||terugwinunit}
+%D \stoptest
+%D
+%D As we already said, the \type{|} is a command. This commands
+%D accepts an optional argument before it's delimiter, which is
+%D also a \type{|}.
+%D
+%D \hyphenation {po-ly-meer che-mie}
+%D
+%D \starttest
+%D \test {polymeer|*|chemie}
+%D \stoptest
+%D
+%D Arguments like \type{*} are not interpreted and inserted
+%D directly, in contrary to arguments like:
+%D
+%D \starttest
+%D \test {polymeer|~|chemie}
+%D \test {|(|polymeer|)|chemie}
+%D \test {polymeer|(|chemie|)| }
+%D \stoptest
+%D
+%D Although such situations seldom occur |<|we typeset thousands
+%D of pages before we encountered one that forced us to enhance
+%D this mechanism|>| we also have to take care of comma's.
+%D
+%D \hyphenation {uit-stel-len}
+%D
+%D \starttest
+%D \test {op||, in|| en uitstellen}
+%D \stoptest
+%D
+%D The next special case (concerning quotes) was brought to my
+%D attention by Piet Tutelaers, one of the driving forces
+%D behind rebuilding hyphenation patterns for the dutch
+%D language.\voetnoot{In 1996 the spelling of the dutch
+%D language has been slightly reformed which made this topic
+%D actual again.} We'll also take care of this case.
+%D
+%D \starttest
+%D \test {AOW|'|er}
+%D \test {cd|'|tje}
+%D \test {ex|-|PTT|'|er}
+%D \test {rock|-|'n|-|roller}
+%D \stoptest
+%D
+%D Tobias Burnus pointed out that I should also support
+%D something like
+%D
+%D \starttest
+%D \test {well|_|known}
+%D \stoptest
+%D
+%D to strees the compoundness of hyphenated words.
+%D
+%D Of course we also have to take care of the special case:
+%D
+%D \starttest
+%D \test {text||color and ||font}
+%D \stoptest
+
+%D \macros
+%D {installdiscretionaries}
+%D {}
+%D
+%D The mechanism described here is one of the older inner parts
+%D of \CONTEXT. The most recent extensions concerns some
+%D special cases as well as the possibility to install other
+%D characters as delimiters. The prefered way of specifying
+%D compound words is using \type{||}, which is installed by:
+%D
+%D \starttypen
+%D \installdiscretionaries || -
+%D \stoptypen
+%D
+%D Some alternative definitions are:
+%D
+%D \startbuffer
+%D \installdiscretionaries ** -
+%D \installdiscretionaries ++ -
+%D \installdiscretionaries // -
+%D \installdiscretionaries ~~ -
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D after which we can say:
+%D
+%D \bgroup
+%D \haalbuffer
+%D \starttest
+%D \test {test**test**test}
+%D \test {test++test++test}
+%D \test {test//test//test}
+%D \test {test~~test~~test}
+%D \stoptest
+%D \egroup
+
+%D \macros
+%D {compoundhyphen,
+%D beginofsubsentence,endofsubsentence}
+%D {}
+%D
+%D Now let's go to the macros. First we define some variables.
+%D In the main \CONTEXT\ modules these can be tuned by a setup
+%D command. Watch the (maybe) better looking compound hyphen.
+
+\def\compoundhyphen {{-}\kern-.25ex{-}}
+\def\beginofsubsentence {---}
+\def\endofsubsentence {---}
+
+%D The last two variables are needed for subsentences
+%D |<|like this one|>| which we did not yet mention.
+%D
+%D We want to enable breaking but at the same time don't want
+%D compound characters like |-| or || to be separated from the
+%D words. \TEX\ hackers will recognise the next two macro's:
+
+\def\prewordbreak {\penalty10000\hskip0pt\relax}
+\def\postwordbreak {\penalty0\prewordbreak}
+
+%D We first show the original implementation, which only
+%D supports \type{|} as command and delimiter. Before
+%D activating \type{|} we save it's value:
+%D
+%D \starttypen
+%D \edef\domathmodediscretionary{\string|}
+%D \stoptypen
+%D
+%D after which we're ready to define it's meaning to:
+%D
+%D \starttypen
+%D \catcode`\|=\@@active
+%D
+%D \unexpanded\def|%
+%D {\ifmmode
+%D \expandafter\domathmodediscretionary
+%D \else
+%D \expandafter\dotextmodediscretionary
+%D \fi}
+%D \stoptypen
+%D
+%D We need a two stage \type{\futurelet} because we want to
+%D look ahead for both the compound character definition and
+%D the (optional) comma that follows it, and because we want to
+%D prevent that \TEX\ puts this comma on the next line. We use
+%D \type{\next} for easy and fast checking of the argument, we
+%D save this argument (which can consist of more tokens) and
+%D also save the character following the \type{|#1|} in
+%D \type{\nextnext}.
+%D
+%D \starttypen
+%D \def\dotextmodediscretionary%
+%D {\bgroup
+%D \futurelet\next\dodotextmodediscretionary}
+%D
+%D \def\dodotextmodediscretionary#1|%
+%D {\def\betweendiscretionaries{#1}%
+%D \futurelet\nextnext\dododotextmodediscretionary}
+%D \stoptypen
+%D
+%D The main macro consists of quite some \type{\ifx} tests
+%D while \type{\checkafterdiscretionary} handles the commas.
+%D We show the simplified version here:
+%D
+%D \starttypen
+%D \def\dododotextmodediscretionary%
+%D {\let\nextnextnext=\egroup
+%D \ifx |\next
+%D \checkafterdiscretionary
+%D \prewordbreak\hbox{\compoundhyphen\nextnext}\allowbreak
+%D \else\ifx=\next
+%D \prewordbreak\compoundhyphen
+%D \else\ifx~\next
+%D \discretionary{-}{}{\thinspace}\postwordbreak
+%D \else\ifx(\next
+%D \prewordbreak\discretionary{}{(-}{(}\prewordbreak
+%D \else\ifx)\next
+%D \prewordbreak\discretionary{-)}{}{)}\prewordbreak
+%D \else\ifx'\next
+%D \prewordbreak\discretionary{-}{}{'}\postwordbreak
+%D \else
+%D \checkafterdiscretionary
+%D \prewordbreak\hbox{\betweendiscretionaries\nextnext}\allowbreak
+%D \fi\fi\fi\fi\fi\fi
+%D \nextnextnext}
+%D
+%D \def\checkafterdiscretionary%
+%D {\ifx,\nextnext
+%D \def\nextnextnext{\afterassignment\egroup\let\next=}%
+%D \else
+%D \let\nextnext=\relax
+%D \fi}
+%D \stoptypen
+%D
+%D Handling \type{(} and \type{)} is a a bit special, because
+%D \TEX\ sees them as decent hyphenation points, according to
+%D their \type{\lccode} being non||zero. For the same reason,
+%D later on in this module we cannot manipulate the
+%D \type{\lccode} but take the \type{\uccode}.
+
+%D The most recent implementation is more advanced. As
+%D demonstrated we can install delimiters, like:
+%D
+%D \starttypen
+%D \installdiscretionaries || \compoundhyphen
+%D \stoptypen
+%D
+%D This time we have to use a bit more clever way of saving the
+%D math mode specification of the character we're going to
+%D make active. We also save the user supplied compound hyphen.
+%D We show the a bit more traditional implementation first.
+%D
+%D \starttypen
+%D \def\installdiscretionaries#1%
+%D {\catcode`#1\@@other
+%D \expandafter\doinstalldiscretionaries\string#1}
+%D
+%D \def\doinstalldiscretionaries#1%
+%D {\setvalue{mathmodediscretionary#1}{#1}%
+%D \catcode`#1\@@active
+%D \dodoinstalldiscretionaries}
+%D
+%D \def\dodoinstalldiscretionaries#1#2%
+%D {\setvalue{textmodediscretionary\string#1}{#2}%
+%D \unexpanded\def#1{\discretionarycommand#1}}
+%D \stoptypen
+%D
+%D A bit more \CATCODE\ and character trickery enables us to
+%D discard the two intermediate steps. This trick originates
+%D on page~394 of the \TEX book, in the appendix full of
+%D dirty tricks. The second argument has now become redundant,
+%D but I decided to reserve it for future use. At least it
+%D remembers us of the symmetry.
+
+\def\installdiscretionaries#1#2#3%
+ {\setvalue{mathmodediscretionary\string#1}{\char`#1}%
+ \setvalue{textmodediscretionary\string#1}{#3}%
+ \catcode`#1=\@@active
+ \scratchcounter=\the\uccode`~
+ \uccode`~=`#1
+ \uppercase{\unexpanded\def~{\discretionarycommand~}}%
+ \uccode`~=\scratchcounter}
+
+\def\dohandlemathmodebar#1%
+ {\getvalue{mathmodediscretionary\string#1}}
+
+\def\discretionarycommand%
+ {\ifmmode
+ \expandafter\dohandlemathmodebar
+ \else
+ \expandafter\dotextmodediscretionary
+ \fi}
+
+%D Although adapting character codes and making characters
+%D active can interfere with other features of macropackages,
+%D normally there should be no problems with things like:
+%D
+%D \starttypen
+%D \installdiscretionary || +
+%D \installdiscretionary ++ =
+%D \stoptypen
+%D
+%D The real work is done by the next set of macros. We have
+%D to use a double \type{\futurelet} because we have to take
+%D following characters into account.
+
+\def\dotextmodediscretionary#1%
+ {\bgroup
+ \def\dodotextmodediscretionary##1#1%
+ {\def\betweendiscretionary{##1}%
+ \futurelet\nextnext\dododotextmodediscretionary}%
+ \let\discretionarycommand=#1%
+ \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}%
+ \futurelet\next\dodotextmodediscretionary}
+
+\def\dododotextmodediscretionary%
+ {\let\nextnextnext=\egroup
+ \ifx\discretionarycommand\next
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak
+ \egroup
+ \else\ifx=\next
+ \prewordbreak\textmodediscretionary
+ \else\ifx~\next
+ \prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak
+ \else\ifx_\next
+ \prewordbreak\discretionary{\textmodediscretionary}
+ {\textmodediscretionary}{\textmodediscretionary}\prewordbreak
+ \else\ifx(\next
+ \ifdim\lastskip>\!!zeropoint\relax
+ (\prewordbreak
+ \else
+ \prewordbreak\discretionary{}{(-}{(}\prewordbreak
+ \fi
+ \else\ifx)\next
+ \ifx\nextnext\blankspace
+ \prewordbreak)\relax
+ \else
+ \prewordbreak\discretionary{-)}{}{)}\prewordbreak
+ \fi
+ \else\ifx'\next
+ \prewordbreak\discretionary{-}{}{'}\postwordbreak
+ \else\ifx<\next
+ \beginofsubsentence\prewordbreak\beginofsubsentencespacing
+ \else\ifnum\uccode`>=\nextuccode
+ \endofsubsentencespacing\prewordbreak\endofsubsentence
+ \else
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\betweendiscretionary\nextnext}\allowbreak
+ \egroup
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \nextnextnext}
+
+\def\checkbeforediscretionary%
+ {\setbox0=\lastbox
+ \ifdim\wd0=\!!zeropoint
+ \let\postwordbreak=\prewordbreak
+ \fi
+ \box0\relax}
+
+\def\checkafterdiscretionary%
+ {\ifx,\nextnext
+ \def\nextnextnext{\afterassignment\egroup\let\next=}%
+ \else
+ \let\nextnext=\relax
+ \fi}
+
+%D The macro \type{\checkbeforediscretionary} takes care of
+%D loners like \type{||word}, while it counterpart
+%D \type{\checkafterdiscretionary} is responsible for handling
+%D the comma.
+
+%D \macros
+%D {beginofsubsentencespacing,endofsubsentencespacing}
+%D {}
+%D
+%D In the previous macros we provided two hooks which can be
+%D used to support nested sub||sentences. In \CONTEXT\ these
+%D hooks are used to insert a small space when needed.
+
+\let\beginofsubsentencespacing=\relax
+\let\endofsubsentencespacing =\relax
+
+%D Before we show some more tricky alternative, we first install
+%D the mechanism:
+
+\installdiscretionaries || \compoundhyphen
+
+%D One of the drawbacks of this mechanism is that characters can
+%D be made active afterwards. The next alternative can be used
+%D in such situations. This time we don't compare the arguments
+%D directly but use the \type{\uccode}'s instead. \TEX\
+%D initializes these codes of the alphabetics glyphs to their
+%D uppercase counterparts. Normally the other characters remain
+%D zero. If so, we can use the \type{\uccode} as a signal.
+
+%D \macros
+%D {enableactivediscretionaries}
+%D {}
+%D
+%D The more advanced mechanism is activated by calling:
+%D
+%D \starttypen
+%D \enableactivediscretionaries
+%D \stoptypen
+%D
+%D which is defined as:
+
+\def\enableactivediscretionaries%
+ {\uccode`'=`'\relax \uccode`~=`~\relax \uccode`_=`_\relax
+ \uccode`(=`(\relax \uccode`)=`)\relax \uccode`==`=\relax
+ \uccode`<=`<\relax \uccode`>=`>\relax
+ \let\dotextmodediscretionary = \activedotextmodediscretionary
+ \let\dododotextmodediscretionary = \activedododotextmodediscretionary}
+
+%D We only have to redefine two macros. While saving the
+%D \type{\uccode} in a macro we have to take care of empty
+%D arguments, like in \type{||}.
+
+\def\activedotextmodediscretionary#1%
+ {\bgroup
+ \def\dodotextmodediscretionary##1#1%
+ {\def\betweendiscretionary{##1}%
+ \def\nextuccode####1####2\relax%
+ {\ifcat\noexpand####1\noexpand\relax
+ \edef\nextuccode{0}%
+ \else
+ \edef\nextuccode{\the\uccode`####1}%
+ \fi}%
+ \nextuccode##1@\relax
+ \futurelet\nextnext\dododotextmodediscretionary}%
+ \let\discretionarycommand=#1%
+ \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}%
+ \futurelet\next\dodotextmodediscretionary}
+
+%D This time we use \type{\ifnum}:
+
+\def\activedododotextmodediscretionary%
+ {\let\nextnextnext=\egroup
+ \ifx\discretionarycommand\next
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak
+ \egroup
+ \else\ifnum\uccode`==\nextuccode
+ \prewordbreak\textmodediscretionary
+ \else\ifnum\uccode`~=\nextuccode
+ \prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak
+ \else\ifnum\uccode`_=\nextuccode
+ \prewordbreak\discretionary{\textmodediscretionary}
+ {\textmodediscretionary}{\textmodediscretionary}\prewordbreak
+ \else\ifnum\uccode`(=\nextuccode
+ \ifdim\lastskip>\!!zeropoint\relax
+ (\prewordbreak
+ \else
+ \prewordbreak\discretionary{}{(-}{(}\prewordbreak
+ \fi
+ \else\ifnum\uccode`)=\nextuccode
+ \ifx\nextnext\blankspace
+ \prewordbreak)\relax
+ \else
+ \prewordbreak\discretionary{-)}{}{)}\prewordbreak
+ \fi
+ \else\ifnum\uccode`'=\nextuccode
+ \prewordbreak\discretionary{-}{}{'}\postwordbreak
+ \else\ifnum\uccode`<=\nextuccode
+ \beginofsubsentence\prewordbreak\beginofsubsentencespacing
+ \else\ifnum\uccode`>=\nextuccode
+ \endofsubsentencespacing\prewordbreak\endofsubsentence
+ \else
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\betweendiscretionary\nextnext}\allowbreak
+ \egroup
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \nextnextnext}
+
+%D Now we can safely do things like: \enableactivediscretionaries
+%D
+%D \starttypen
+%D \catcode`<=\@@active \def<{hello there}
+%D \catcode`>=\@@active \def>{hello there}
+%D \catcode`(=\@@active \def({hello there}
+%D \catcode`)=\@@active \def){hello there}
+%D \stoptypen
+%D
+%D In normal day||to||day production of texts this kind of
+%D activation is seldom used.\voetnoot{In the \CONTEXT\ manual
+%D the \type{<} and \type{>} are made active and used for some
+%D cross||reference trickery.} If so, we have to take care of
+%D the math mode explicitly, just like we did when making
+%D \type{|} active. It can be confusing too, especially when we
+%D load macropackages afterwards that make use of \type{<} in
+%D \type{\ifnum} or \type{\ifdim} statements.
+
+%D \macros
+%D {installcompoundcharacter}
+%D {}
+%D
+%D When Tobias Burnus started translating the dutch manual of
+%D \PPCHTEX\ into german, he suggested to let \CONTEXT\ support
+%D the \type{german.sty} method of handling compound
+%D characters, especially the umlaut. This package is meant for
+%D use with \PLAIN\ \TEX\ as well as \LATEX.
+%D
+%D I decided to implement compound character support as
+%D versatile as possible. As a result one can define his own
+%D compound character support, like:
+%D
+%D \starttypen
+%D \installcompoundcharacter "a {\"a}
+%D \installcompoundcharacter "e {\"e}
+%D \installcompoundcharacter "i {\"i}
+%D \installcompoundcharacter "u {\"u}
+%D \installcompoundcharacter "o {\"o}
+%D \installcompoundcharacter "s {\SS}
+%D \stoptypen
+%D
+%D or even
+%D
+%D \starttypen
+%D \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}}
+%D \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}}
+%D \stoptypen
+%D
+%D The support is not limited to alphabetic characters, so the
+%D next definition is also valid.
+%D
+%D \starttypen
+%D \installcompoundcharacter ". {.\doifnextcharelse{\spacetoken}{}{\kern.125em}}
+%D \stoptypen
+%D
+%D The implementation looks familiar and uses the same tricks as
+%D mentioned earlier in this module. We take care of two
+%D arguments, which complicates things a bit.
+
+\def\@nc@{@nc@} % normal character
+\def\@cc@{@cc@} % compound character
+\def\@cs@{@cs@} % compound characters
+
+\def\installcompoundcharacter #1#2#3 #4%
+ {\setvalue{\@nc@\string#1}{\char`#1}%
+ \def\!!stringa{#3}%
+ \ifx\!!stringa\empty
+ \setvalue{\@cc@\string#1\string#2}{#4}%
+ \else
+ \setvalue{\@cs@\string#1\string#2\string#3}{#4}%
+ \fi
+ \catcode`#1=\@@active
+ \scratchcounter=\the\uccode`~
+ \uccode`~=`#1
+ \uppercase{\unexpanded\def~{\handlecompoundcharacter~}}%
+ \uccode`~=\scratchcounter}
+
+%D In handling the compound characters we have to take care of
+%D \type{\bgroup} and \type{\egroup} tokens, so we end up with
+%D a multi||step interpretation macro. We look ahead for a
+%D \type{\bgroup}, \type{\egroup} or \type{\blankspace}. Being
+%D no user of this mechanism, the credits for testing them goes
+%D to Tobias Burnus, the first german user of \CONTEXT.
+%D
+%D We define these macros as \type{\long} because we can
+%D expect \type{\par} tokens. We need to look into the future
+%D with \type{\futurelet} to prevent spaces from
+%D disappearing.
+
+\def\handlecompoundcharacter#1%
+ {\def\dohandlecompoundcharacter%
+ {\ifx\next\bgroup
+ %\def\next{\dodohandlecompoundcharacter#1}% % handle "{ee} -> \"ee
+ %\let\next=\relax % forget "{ee} -> ee
+ \def\next{\handlecompoundcharacterone#1}% % ignore "{ee} -> "ee
+ \else\ifx\next\egroup
+ \let\next=\relax
+ \else\ifx\next\blankspace
+ \let\next=\relax
+ \else
+ \def\next{\dodohandlecompoundcharacter#1}%
+ \fi\fi\fi
+ \next}%
+ \futurelet\next\dohandlecompoundcharacter}
+
+\def\dodohandlecompoundcharacter#1#2%
+ {\def\dododohandlecompoundcharacter%
+ {\ifx\next\bgroup
+ \def\next{\handlecompoundcharacterone#1#2}%
+ \else\ifx\next\egroup
+ \def\next{\handlecompoundcharacterone#1#2}%
+ \else\ifx\next\blankspace
+ \def\next{\handlecompoundcharacterone#1#2}%
+ \else
+ \def\next{\handlecompoundcharactertwo#1#2}%
+ \fi\fi\fi
+ \next}%
+ \futurelet\next\dododohandlecompoundcharacter}
+
+%D Besides taken care of the grouping and space tokens, we have
+%D to deal with three situations. First we look if the next
+%D character equals the first one, if so, then we just insert
+%D the original. Next we look if indeed a compound character is
+%D defined. We either execute the compound character or just
+%D insert the first. So we have
+%D
+%D \starttypen
+%D <key><key> <key><known> <key><unknown>
+%D \stoptypen
+%D
+%D In later modules we will see how these commands are used.
+
+\long\def\handlecompoundcharacterone#1#2%
+ {\ifx#1#2%
+ \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ \else
+ \expandafter\ifx\csname\@cc@\string#1\string#2\endcsname\relax
+ \def\next{\getvalue{\@nc@\string#1}#2}%
+ \else
+ \def\next{\getvalue{\@cc@\string#1\string#2}}%
+ \fi
+ \fi
+ \next}
+
+\long\def\handlecompoundcharactertwo#1#2#3%
+ {\ifx#1#2%
+ \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}#3}%
+ \else
+ \@EA\ifx\csname\@cs@\string#1\string#2\string#3\endcsname\relax
+ \expandafter\ifx\csname\@cc@\string#1\string#2\endcsname\relax
+ \def\next{\getvalue{\@nc@\string#1}#2#3}%
+ \else
+ \def\next{\getvalue{\@cc@\string#1\string#2}#3}%
+ \fi
+ \else
+ \def\next{\getvalue{\@cs@\string#1\string#2\string#3}}%
+ \fi
+ \fi
+ \next}
+
+%D \macros
+%D {midworddiscretionary}
+%D
+%D If needed, one can add a discretionary hyphen using \type
+%D {\midworddiscretionary}. This macro does the same as
+%D \PLAIN\ \TEX's \type {\-}, but, like the ones implemented
+%D earlier, this one also looks ahead for spaces and grouping
+%D tokens.
+
+\def\domidworddiscretionary%
+ {\ifx\next\blankspace\else
+ \ifx\next\bgroup \else
+ \ifx\next\egroup \else
+ \discretionary{-}{}{}%
+ \fi\fi\fi}
+
+\def\midworddiscretionary%
+ {\futurelet\next\domidworddiscretionary}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex new file mode 100644 index 000000000..8fe6c292f --- /dev/null +++ b/tex/context/base/supp-mps.tex @@ -0,0 +1,484 @@ +%D \module
+%D [ file=supp-mps,
+%D version=1997.07.05,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\METAPOST\ Inclusion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+% E-tex : a primitive that tells us that \write18 works
+% E-tex : \executeMetaPost filename
+% ConTeXt : automatic flush at end of job
+
+%D \METAPOST\ is John Hobbys alternative for \METAFONT\ and
+%D produces superior \POSTSCRIPT\ code. In this module we
+%D integrate \METAPOST\ support int \CONTEXT. We offer two
+%D tracks:
+%D
+%D \startopsomming
+%D \som generating \METAPOST\ code, running this program from
+%D within \TEX\ using \type{\write18}, and importing the
+%D result
+%D \som generating \METAPOST\ code, processing the code
+%D afterward, and importing the result in a second pass
+%D \stopopsomming
+%D
+%D The first approach uses a non standard \TEX\ feature,
+%D implemented in Web2c. I'm not going to discuss the pros and
+%D cons of running programs from within others, but all
+%D arguments against this can be overcome by implementing a
+%D \TEX\ worthy primitive:
+%D
+%D \starttypen
+%D \excuteMetaPost filename
+%D \stoptypen
+%D
+%D Ok then, let's start:
+
+\writestatus{loading}{Context Support Macros / MetaPost Inclusion}
+
+\unprotect
+
+%D \macros
+%D {startMPgraphic}
+%D
+%D From within \TEX\ one can execute \METAPOST\ code by putting
+%D it between the two commands
+%D
+%D \starttypen
+%D \startMPgraphic
+%D \stopMPgraphic
+%D \stoptypen
+%D
+%D This is implemented as:
+
+\def\startMPgraphic#1\stopMPgraphic%
+ {\startwritingMPgraphic
+ \writeMPgraphic{#1}%
+ \stopwritingMPgraphic}
+
+%D \macros
+%D {startwritingMPgraphic,
+%D writeMPgraphic,
+%D stopwritingMPgraphic}
+%D
+%D If the writing process is divided into more steps, one can
+%D use the components of this macro directly.
+%D
+%D \starttypen
+%D \startwritingMPgraphic
+%D ...
+%D \writeMPgraphic{...}
+%D ...
+%D \writeMPgraphic{...}
+%D ...
+%D \stopwritingMPgraphic
+%D \stoptypen
+
+%D \macros
+%D {ifrunMPgraphics}
+%D
+%D These macros look a bit more complicated that one would
+%D expect at first sight. This is due to the two ways of
+%D processing these graphics, mentioned in a previous
+%D paragraph. Which method is used, the direct or indirect
+%D one, depends on a boolean.
+
+\newif\ifrunMPgraphics
+
+%D If set to true, one can do with a single pass, else one must
+%D process the \METAPOST\ file \type{mpgraph} between two
+%D succesive \TEX\ runs.
+
+\def\MPgraphicfile{mpgraph}
+
+%D When we run \METAPOST\ from within \TEX, each graphic is
+%D processed at once, which means that we reuse this file many
+%D times. When however the execution is delayed, all graphics
+%D are saved in a separate figure. The current graphic is
+%D characterized bij a number:
+
+\newcounter\currentMPgraphic
+
+%D \macros
+%D {ifreuseMPgraphics}
+%D
+%D If one want to reuse grapics, one can save much redundant
+%D run time by setting the next switch to true.
+
+\newif\ifreuseMPgraphics
+
+%D The three macros responsible for writing the graphic
+%D implement both schemes.
+
+%D \macro
+%D {MPinclusions}
+%D
+%D One can include for instance common input commands by
+%D assigning those to the token register:
+
+\newtoks\MPinclusions
+
+\def\writeMPgraphic%
+ {\immediate\write\scratchwrite}
+
+\def\startwritingMPgraphic%
+ {\ifrunMPgraphics
+ \ifreuseMPgraphics \else
+ \doglobal\newcounter\currentMPgraphic
+ \fi
+ \doglobal\increment\currentMPgraphic
+ \immediate\openout\scratchwrite=\MPgraphicfile.mp
+ \immediate\write\scratchwrite{\the\MPinclusions}%
+ \else
+ \doglobal\increment\currentMPgraphic
+ \ifnum\currentMPgraphic=1
+ \immediate\openout\scratchwrite=\MPgraphicfile.mp
+ \immediate\write\scratchwrite{\the\MPinclusions}%
+ \fi
+ \fi
+ \immediate\write\scratchwrite{beginfig(\currentMPgraphic);}%
+ \global\let\flushMPgraphics\dodostopwritingMPgraphic
+ \global\let\stopwritingMPgraphic=\dostopwritingMPgraphic}
+
+\def\dostopwritingMPgraphic%
+ {\immediate\write\scratchwrite{endfig;}%
+ \ifrunMPgraphics
+ \dodostopwritingMPgraphic
+ \fi}
+
+\def\dodostopwritingMPgraphic%
+ {\ifnum\currentMPgraphic>0
+ \immediate\write\scratchwrite{end.}%
+ \immediate\closeout\scratchwrite
+ \runMPgraphic{\MPgraphicfile}%
+ \fi
+ \global\let\flushMPgraphics=\relax}
+
+\let\stopwritingMPgraphic=\relax
+\let\flushMPgraphics =\relax
+
+%D \macros
+%D {flushMPgraphics}
+%D
+%D When we use the indirect method, all graphics are saved in
+%D one file. This means that we cannot close this file after
+%D every \type{\stopMPgraphic}. Therefore we need to say:
+%D
+%D \starttypen
+%D \flushMPgraphic
+%D \stoptypen
+%D
+%D else the file is closed without writing the \METAPOST\ end
+%D command. One will notice this fast enough when in indirect
+%D mode. When using the direct mode this command is not
+%D implicitly needed, but ommiting it makes files less
+%D portable.
+
+%D \macros
+%D {loadcurrentMPgraphic,
+%D placeMPgraphic}
+%D
+%D Once defined, we can call for this graphic by saying:
+%D
+%D \starttypen
+%D \loadcurrentMPgraphic{setups}
+%D \placeMPgraphic
+%D \stoptypen
+%D
+%D This two stage insert permits some intermediate manipulations
+%D of the graphic, which temporary saved in:
+
+\newbox\MPgraphic
+
+\def\loadcurrentMPgraphic#1%
+ {\loadMPgraphic{\MPgraphicfile.\currentMPgraphic}{#1}}
+
+\def\loadMPgraphic#1#2%
+ {\setbox\MPgraphic=\hbox{\insertMPfile{#1}{#2}}}
+
+\def\placeMPgraphic%
+ {\box\MPgraphic}
+
+%D \macros
+%D {startreusableMPgraphic, reuseMPgraphic, useMPbox}
+%D
+%D One can use the next macro for defining graphics that are
+%D to be reused. When the next switch is set, graphics are
+%D cached.
+
+\newif\ifuseMPbox % nog eens cyclische buffer
+
+\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
+ {\reuseMPgraphicstrue
+ \doifundefined{MP:#1}
+ {\startMPgraphic#2\stopMPgraphic
+ \ifuseMPbox
+ \ifx\setobject\undefined
+ \newbox\somebox
+ \global\setbox\somebox=\vbox
+ {\loadMPgraphic{\MPgraphicfile.\currentMPgraphic}{}%
+ \placeMPgraphic}%
+ \global\setevalue{MP:#1}%
+ {\copy\the\somebox\relax}%
+ \else
+ \setobject{MP:#1}
+ \vbox
+ {\loadMPgraphic{\MPgraphicfile.\currentMPgraphic}{}%
+ \placeMPgraphic}%
+ \global\setvalue{MP:#1}%
+ {\getobject{MP:#1}}%
+ \fi
+ \else
+ \global\setevalue{MP:#1}%
+ {\noexpand\loadMPgraphic{\MPgraphicfile.\currentMPgraphic}{}%
+ \noexpand\placeMPgraphic}%
+ \fi}}
+
+\def\reuseMPgraphic#1%
+ {\getvalue{MP:#1}}
+
+%D \macro
+%D {startuseMPgraphic,useMPgraphic}
+%D
+%D The every||time||it's||used original one is defined below.
+%D This one makes sense when the graphic uses random numbers.
+
+\def\startuseMPgraphic#1#2\stopuseMPgraphic%
+ {\reuseMPgraphicstrue
+ \long\setvalue{MP:#1}%
+ {\startMPgraphic#2\stopMPgraphic
+ \loadcurrentMPgraphic{}%
+ \placeMPgraphic}}
+
+\let\useMPgraphic=\reuseMPgraphic
+
+%D We didn't yet define the macro responsible for processing
+%D the graphic from within \TEX.
+
+\def\runMPgraphic#1%
+ {\ifrunMPgraphics
+ \executeMETAPOST{#1}%
+ \else
+ \message{[flush and process \MPgraphicfile.mp afterwards]}%
+ \fi}
+
+%D \macros
+%D {executeMetaPost, executeMETAPOST, executesystemcommand}
+%D
+%D With \type{\executeMETAPOST} being defined as:
+
+\ifx\undefined\executeMetaPost
+ \def\executeMETAPOST#1{\executesystemcommand{\executeMetaPost{#1}}}
+\fi
+
+%D There are two system dependant definitions:
+
+\ifx\undefined\executesystemcommand
+ \def\executesystemcommand#1{\immediate\write18{#1}}
+\fi
+
+\ifx\undefined\executeMetaPost
+ \def\executeMetaPost#1{mpost #1}
+\fi
+
+%D \macros
+%D {insertMPfile}
+%D
+%D One can define this command in advance or redefine it after
+%D loading this module. The same goes for the forward
+%D reference to the figure loading macro:
+
+\ifx\undefined\insertMPfile
+
+ \def\insertMPfile#1#2%
+ {\ifx\undefined\externalfigure
+ \message{[insert file #1 here]}%
+ \else
+ \externalfigure[#1][\c!type=eps,\c!methode=mps,#2]%
+ \fi}
+
+\fi
+
+%D This macro takes {\em two} arguments, the second one can be
+%D used to pass info to the inclusion macro. Some examples
+%D of its use can be found in the modules \type{supp-tpi} and
+%D \type{prag-log}.
+
+%D For some reason, \METAPOST\ needs the public domain \DVI\ to
+%D \POSTSCRIPT\ converter \DVIPS. This symbiosis originates in
+%D the need to include the fonts (glyphs) that \METAPOST\ uses
+%D in the \POSTSCRIPT\ file. Driver independancy was one of my
+%D prerequisites for using \METAPOST, so I decided to build
+%D this kind of support myself. Personally I consider driver
+%D dependancy a drawback for the dissemination of such a
+%D package. The second part of this module more or less
+%D decouples \METAPOST\ and \DVIPS.
+%D
+%D The macros hereafter are copied from the module
+%D \type{m-metapost}. After writing module \type{supp-pdf} I
+%D added this method to the module named and after a while
+%D decided to hook it into module \type{spec-yy}. Therefore
+%D they made it into a support module, but in a slightly
+%D different way.
+
+%D \macros
+%D {UseMetaPostGraphic, DontUseMetaPostGraphics}
+%D {}
+%D
+%D The method we use is both robust and simple: one can do
+%D with calling the next macro with the filename as argument:
+%D
+%D \starttypen
+%D \UseMetaPostGraphic{filename}
+%D \stoptypen
+%D
+%D We can turn of this mechanism with:
+%D
+%D \starttypen
+%D \DontUseMetaPostGraphics
+%D \stoptypen
+
+\def\UseMetaPostGraphic#1%
+ {\bgroup
+ \message{[MP fonts #1]}%
+ %\uncatcodespecials
+ \endlinechar=-1
+ \setMPspecials
+ \obeyMPspecials
+ \setbox0=\hbox
+ {\hskip-\maxdimen
+ \doprocessfile\scratchread{#1}\handleMPSline}%
+ \smashbox0
+ \box0
+ \egroup}
+
+\def\DontUseMetaPostGraphics%
+ {\let\UseMetaPostGraphic=\gobbleoneargument}
+
+%D The characters are collected in a box and moved as far as
+%D possible into the left margin. The resulting box has no
+%D dimensions and can be prepended (appended) to the special
+%D that handles the inclusion. The characters are in the file
+%D but made invisible.
+
+%D We scan the graphics file for the \type{fshow} operator,
+%D that is, lines that start with \type{(}. If found it
+%D interprets the line, which looks like:
+%D
+%D \starttypen
+%D (string ... string) font size fshow
+%D \stoptypen
+%D
+%D Font definitions specified in the preamble are simply
+%D ignored. Only lines starting with \type{(} are interpreted.
+
+\def\dohandleMPSline#1#2\relax%
+ {\if#1(%
+ \expandafter\includeMPcharacters\fileline\relax
+ \fi}
+
+\def\handleMPSline%
+ {\expandafter\dohandleMPSline\fileline\relax}
+
+%D Before we start scanning for data, we first change some
+%D \CATCODES. The first set of macro's is copied from module
+%D \type{supp-pdf}. This scheme is a bit overdone for this
+%D module, but using the same macros saves us some memory.
+
+\def\octalMPcharacter#1#2#3%
+ {\char'#1#2#3\relax}
+
+\bgroup
+\catcode`\|=\@@comment
+\catcode`\%=\@@active
+\catcode`\[=\@@active
+\catcode`\]=\@@active
+\catcode`\{=\@@active
+\catcode`\}=\@@active
+\catcode`B=\@@begingroup
+\catcode`E=\@@endgroup
+\gdef\ignoreMPspecials|
+ B\def%BE|
+ \def[BE|
+ \def]BE|
+ \def{BE|
+ \def}BEE
+\gdef\obeyMPspecials|
+ B\def%B\char 37\relax E|
+ \def[B\char 91\relax E|
+ \def]B\char 93\relax E|
+ \def{B\char123\relax E|
+ \def}B\char125\relax EE
+\gdef\setMPspecials|
+ B\catcode`\%=\@@active
+ \catcode`\[=\@@active
+ \catcode`\]=\@@active
+ \catcode`\{=\@@active
+ \catcode`\}=\@@active
+ \catcode`\$=\@@letter
+ \catcode`\_=\@@letter
+ \catcode`\#=\@@letter
+ \catcode`\^=\@@letter
+ \catcode`\&=\@@letter
+ \catcode`\|=\@@letter
+ \catcode`\~=\@@letter
+ \def\(B\char40\relax E|
+ \def\)B\char41\relax E|
+ \def\\B\char92\relax E|
+ \def\0B\octalMPcharacter0E|
+ \def\1B\octalMPcharacter1E|
+ \def\2B\octalMPcharacter2E|
+ \def\3B\octalMPcharacter3E|
+ \def\4B\octalMPcharacter4E|
+ \def\5B\octalMPcharacter5E|
+ \def\6B\octalMPcharacter6E|
+ \def\7B\octalMPcharacter7E|
+ \def\8B\octalMPcharacter8E|
+ \def\9B\octalMPcharacter9EE
+\egroup
+
+%D The lines starting with \type{(} are interpreted and
+%D handled by
+
+\def\includeMPcharacters(#1) #2 #3 #4\relax%
+ {\font\temp=#2 at #3bp\temp#1}
+
+%D This method is both robust and reasonable fast. The only
+%D disadvantage is that when not embedded properly in the
+%D graphics inclusion macros, one has to load all graphics by
+%D hand.
+
+%D Now let's see if things work all right and show the example
+%D files that are part of the \METAPOST\ distribution:
+%D
+%D \startregelcorrectie
+%D \steluitlijnenin[midden]
+%D \leavevmode
+%D \startcombinatie[3*3]
+%D {\externfiguur[mp-exa-1][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-2][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-3][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-4][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-5][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-6][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-7][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-8][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-9][methode=mps,kader=aan,breedte=.2\hsize]} {}
+%D \stopcombinatie
+%D \stopregelcorrectie
+%D
+%D Here we used calls like:
+%D
+%D \starttypen
+%D \externfiguur[mp-exa-1][methode-mps,kader=aan,breedte=.2\hsize]
+%D \stoptypen
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex new file mode 100644 index 000000000..287d4bbec --- /dev/null +++ b/tex/context/base/supp-mrk.tex @@ -0,0 +1,299 @@ +%D \module
+%D [ file=supp-mrk,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Marks,
+%D author=Jim Fox / Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D There are 256 \COUNTERS, \DIMENSIONS, \SKIPS, \MUSKIPS\ and
+%D \BOXES, 16~in- and output buffers, but there is only one
+%D \MARK. In TugBoat~8 (1987, no~1) Jim Fox presents a set of
+%D macros that can be used to mimmick multiple marks. We
+%D gladly adopt them here.
+
+\writestatus{loading}{Context Support Macros / Marks}
+
+\unprotect
+
+%D This implementation is more or less compatible with the
+%D other register macros in \PLAIN\ \TEX. A mark is defined by:
+%D
+%D \starttypen
+%D \newmark\name
+%D \stoptypen
+%D
+%D and can be called upon with:
+%D
+%D \starttypen
+%D \topname
+%D \botname
+%D \firstname
+%D \stoptypen
+%D
+%D The only drawback of his approach is that the marks must be
+%D preloaded in the output routine. This is accomplished by
+%D means of:
+%D
+%D \starttypen
+%D \getmarks\name
+%D \stoptypen
+%D
+%D The macros presented here are in most aspects copies of
+%D those presented by Jim Fox. We've taken the freedom to
+%D change a few things for more or less obvious reasons:
+%D
+%D \startopsomming
+%D \som Because the original macros look quite complicated,
+%D which is mainly due to extensive use of
+%D \type{\expandafter}'s and \type{\csname}'s, we changed
+%D those in favor of \type{\getvalue}.
+%D \som To be more in line with the rest of \CONTEXT, we've
+%D changed some of the names of macros.
+%D \som Because we are already short on \COUNTERS\ we use
+%D macros when possible.
+%D \som We maintain a list of defined marks and use one
+%D call for getting them all at once.
+%D \som We have extended the mechanism to splitmarks (not
+%D perfected yet).
+%D \som We've introduced optional expansion of the contents
+%D of marks.
+%D \stopopsomming
+%D
+%D Whatever changes we've made, the credits still go to Jim,
+%D whatever goes wrong is due to me. The method is described
+%D in the TugBoat mentioned before, so we won't go into
+%D details. All marks belonging to a group are packed in a
+%D list. In this list they are preceded by a macro that can
+%D be defined at will and a number concerning the position at
+%D which it was defined.
+%D
+%D \starttypen
+%D \def\somelist{... \domark5{this} ... \domark31{that} ...}
+%D \stoptypen
+%D
+%D The original \type{\mark} keeps track of the number and
+%D \type{\topmark} and \type{\botmark} are used to extract the
+%D actual marks from the list. The counting is done by
+%D
+%D \starttypen
+%D \currentmarker
+%D \stoptypen
+%D
+%D In \CONTEXT\ we use the mark mechanism to keep track of
+%D colors. In a complicated documents with many colors per
+%D page, \type{\currentmarker} can therefore get pretty high.
+%D (Well, this is not completely true, because we don't
+%D always have to use marks.)
+
+\newcount\currentmarker
+
+%D The original implementation used a few more \COUNTERS. Two
+%D have been substituted by macros, one has been replaced by
+%D our scratch counter.
+%D
+%D \starttypen
+%D % \newcount\topmarker
+%D % \newcount\botmarker
+%D % \newcount\foundmarker
+%D \stoptypen
+%D
+%D We've also introduced some constants, one for the lists and
+%D three for composing the mark commands.
+
+\def\@@marklist@@ {marklist}
+\def\@@marktop@@ {top}
+\def\@@markbot@@ {bot}
+\def\@@markfirst@@ {first}
+
+%D The next one is new too. All defined marks are packed in a
+%D comma seperated list. This could of course have been a token
+%D list but \CONTEXT\ has some preference for comma lists.
+
+\def\markers {}
+
+%D \macros
+%D {expandmarks}
+%D {}
+%D
+%D There are two booleans. The first one handles the first
+%D marks, the second concerns expansion. This second one is
+%D new.
+
+\newif\ifnofirstmarker
+\newif\ifexpandmarks \expandmarkstrue
+
+%D We use an indirect call to the mack mechanism.
+
+\let\normalmark = \mark
+\let\normaltopmark = \topmark
+\let\normalbotmark = \botmark
+\let\normalfirstmark = \firstmark
+\let\normalsplitbotmark = \splitbotmark
+\let\normalsplitfirstmark = \splitfirstmark
+
+%D The next macro replaces the multiple step expansion and
+%D command name constructors of Jim. This alternative leads to
+%D a more readable source (we hope).
+
+\def\makemarknames#1%
+ {\bgroup
+ \escapechar=-1
+ \xdef\markname{\string#1}%
+ \xdef\marklist{\@@marklist@@\string#1}%
+ \egroup}
+
+%D \macros
+%D {newmark}
+%D {}
+%D
+%D A mark is defined by \type{\newmark}. At the same time,
+%D the name of the mark is added to a commalist. The
+%D three initializations were not in the original design, but
+%D make calls from outside the output routine a bit more
+%D robust.
+
+\def\newmark#1%
+ {\bgroup
+ \makemarknames{#1}%
+ \doglobal\addtocommalist{\markname}\markers%
+ \long\setgvalue{\@@marktop@@\markname}{}%
+ \long\setgvalue{\@@markfirst@@\markname}{}%
+ \long\setgvalue{\@@markbot@@\markname}{}%
+ \setgvalue{\marklist}{\domark0{}}%
+ \long\gdef#1{\addmarker#1}%
+ \egroup}
+
+%D Setting a new mark and adding a mark to the designated
+%D list is done by \type{\addmarker}. This is an internal
+%D command, the user set a marks bij calling it's name:
+%D
+%D \starttypen
+%D \mymark{some text}
+%D \stoptypen
+%D
+%D Where \type{\mymark} is previously defined by
+%D \type{\newmark}.
+
+\long\def\addmarker#1#2%
+ {\bgroup
+ \makemarknames{#1}%
+ \global\advance\currentmarker by 1\relax
+ \normalmark{\the\currentmarker}%
+ \@EA\!!toksa\@EA=\@EA\@EA\@EA{\csname\marklist\endcsname}%
+ \ifexpandmarks
+ \setxvalue{\marklist}%
+ {\the\!!toksa
+ \noexpand\domark
+ \the\currentmarker{#2}}%
+ \else
+ \!!toksb=\@EA{#2}%
+ \setxvalue{\marklist}%
+ {\the\!!toksa
+ \noexpand\domark
+ \the\currentmarker{\the\!!toksb}}%
+ \fi
+ \egroup}
+
+%D \macros
+%D {getmarks,getallmarks,
+%D getsplitmarks,getallsplitmarks}
+%D {}
+%D
+%D In fact, marks make only sense in the output routine. Marks
+%D are derived from their list by means of \type{\getmarks}.
+%D Only one call per mark is permitted in the output routine.
+%D Therefore, it's far more easy to get them all at once, by
+%D means of \type{\getallmarks}, which is not part of the
+%D original design.
+%D
+%D This grabbing is done by processing the list using the
+%D embedded \type{\domark} macros. When a relevant mark is
+%D found, this macro is reassigned and from then on serves
+%D in building the new list.
+
+\def\getmarks#1%
+ {\bgroup
+ \makemarknames{#1}%
+ \edef\topmarker{0\normaltopmark}%
+ \edef\botmarker{0\normalbotmark}%
+ \!!toksb={}%
+ \nofirstmarkertrue
+ \let\@fi=\fi \let\fi=\relax
+ \let\@or=\or \let\or=\relax
+ \let\@else=\else \let\else=\relax
+ \let\domark=\doscanmarks
+ \getvalue{\marklist}\lastmark
+ %\message{markstatus : [\the\!!toksa\the\!!toksb\the\!!toksc]}%
+ \long\setxvalue{\marklist}{\the\!!toksa\the\!!toksb\the\!!toksc}%
+ \egroup}
+
+\def\getallmarks%
+ {\processcommacommand[\markers]\getmarks}
+
+\def\getsplitmarks#1%
+ {\bgroup
+ \makemarknames{#1}%
+ \@EA\let\@EA\savedmarklist\@EA=\csname\marklist\endcsname
+ \edef\topmarker{0\normalsplitfirstmark}%
+ \edef\botmarker{0\normalsplitbotmark}%
+ \!!toksb={}%
+ \nofirstmarkertrue
+ \let\@fi=\fi \let\fi=\relax
+ \let\@or=\or \let\or=\relax
+ \let\@else=\else \let\else=\relax
+ \let\domark=\doscanmarks
+ \getvalue{\marklist}\lastmark
+ \@EA\global\@EA\let\csname\marklist\endcsname=\savedmarklist
+ \egroup}
+
+\def\getallsplitmarks%
+ {\processcommacommand[\markers]\getsplitmarks}
+
+\long\def\dodoscanmarks#1%
+ {\ifnum\scratchcounter>\topmarker\relax
+ \@else
+ \long\setgvalue{\@@marktop@@\markname}{#1}%
+ \@fi
+ \ifnum\scratchcounter>\botmarker\relax
+ \let\domark=\dorecovermarks
+ \!!toksb=\@EA{\@EA\domark\the\scratchcounter{#1}}%
+ \@else
+ \ifnofirstmarker
+ \long\setgvalue{\@@markfirst@@\markname}{#1}%
+ \ifnum\scratchcounter>\topmarker\relax
+ \nofirstmarkerfalse
+ \@fi
+ \@fi
+ \long\setgvalue{\@@markbot@@\markname}{#1}%
+ \!!toksa=\@EA{\@EA\domark\the\scratchcounter{#1}}%
+ \@fi}
+
+\def\doscanmarks%
+ {\afterassignment\dodoscanmarks\scratchcounter=}
+
+\long\def\dorecovermarks#1\lastmark%
+ {\!!toksc={\domark#1}}
+
+\def\lastmark%
+ {\!!toksc={}}
+
+%D No watch what happens next. Because we used an indirect
+%D call to the mark mechanism we can redefine the original
+%D \type{\mark} command.
+
+\newmark\mark
+
+%D One final advice. Use marks with care. When used in globally
+%D assigned boxes, the list can grow quite big, and processing
+%D can slow down considerably.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-mul.tex b/tex/context/base/supp-mul.tex new file mode 100644 index 000000000..12987ff61 --- /dev/null +++ b/tex/context/base/supp-mul.tex @@ -0,0 +1,1162 @@ +%D \module
+%D [ file=supp-mul,
+%D version=1995.03.01,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Multi Column Output,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context Support Macros / Multi Column Output}
+
+\unprotect
+
+%D Multi||column output: the main routines
+%D
+%D The following macro's implement a multi||column output
+%D routine. The original implementation was based on Donald
+%D Knuth's implementation, which was adapted by Craig Platt to
+%D support balancing of the last page. I gradually adapted
+%D Platt's version to our needs but under certain
+%D circumstances things still went wrong. I considered all
+%D calls to Platt's \type{\balancingerror} as undesirable.
+
+\startmessages dutch library: columns
+ title: kolommen
+ 1: maximaal -- kolommen
+ 2: gebruik eventueel \string\filbreak
+ 3: probleempje, probeer [balanceren=nee]
+ 4: plaatsblok boven nog niet mogelijk
+ 5: plaatsblok onder nog niet mogelijk
+ 6: -- plaatsblok(en) opgeschort
+ 7: balanceren afgebroken na 100 stappen
+ 8: gebalanceerd in -- stap(pen)
+ 9: uitlijnen controleren!
+ 10: (minder dan) 1 regel over
+ 11: plaatsblok te breed voor kolom
+ 12: plaatsblok verplaatst naar volgende kolom
+ 13: breed figuur geplaatst boven kolommen
+\stopmessages
+
+\startmessages english library: columns
+ title: columns
+ 1: only -- columns possible
+ 2: use \string\filbreak\space as alternative
+ 3: problems, disable balancing
+ 4: top float not yet supported
+ 5: bottom float not yet supported
+ 6: -- float(s) postponed
+ 7: balancing aborted after 100 steps
+ 8: balanced in -- step(s)
+ 9: check raggedness
+ 10: (less than) 1 line left
+ 11: float to wide for column
+ 12: float moved to next column
+ 13: wide float moved to top of columns
+\stopmessages
+
+\startmessages german library: columns
+ title: Spalten
+ 1: nur -- Spalten moeglich
+ 2: benutzte \string\filbreak\space als Alternative
+ 3: Problem, verwende [ausgleich=nein]
+ 4: Gleitobjekt oben ncoh nicht unterstuetzt
+ 5: Gleitobjekt unten ncoh nicht unterstuetzt
+ 6: -- Gleitobjekt(e) verschoben
+ 7: ausgleich nach 100 Schritten abgebrocheb
+ 8: ausgeglichen nach -- Schritt(en)
+ 9: Ausrichtung ueberpruefen
+ 10: (weniger als) 1 Zeile uebrig
+ 11: Gleitobjekt zu breit fuer Spalte
+ 12: Gleitobjekt in naechste Zeile verschoben
+ 13: breites Gleitobjekt an den Anfang der Spalten verschoben
+\stopmessages
+
+%D This completely new implementation can handle enough
+%D situations for everyday documents, but is still far from
+%D perfect. While at the moment the routine doesn't support
+%D all kind of floats, it does support:
+%D
+%D \startopsomming
+%D \som an unlimitted number of columns
+%D \som ragged or not ragged bottoms
+%D \som optional balancing without \type{\balancingerrors}
+%D \som different \type{\baselineskips}, \type{\spacing},
+%D \type{\topskip} and \type{\maxdepth}
+%D \som left- and right indentation, e.g. within lists
+%D \som moving columns floats to the next column or page
+%D \som handling of floats that are to wide for a columns
+%D \stopopsomming
+%D
+%D One could wonder why single and multi||columns modes are
+%D still separated. One reason for this is that \TeX\ is not
+%D suited well for handling multi||columns. As a result, the
+%D single columns routines are more robust. Handling one
+%D column as a special case of multi||columns is posible but at
+%D the cost of worse float handling, worse page breaking,
+%D worse etc. Complicated multi||column page handling should
+%D be done in \kap{DTP}||systems anyway.
+%D
+%D There are three commands provided for entering and leaving
+%D multi||column mode and for going to the next column:
+%D
+%D \interface \type{\beginmulticolumns} \\ \\
+%D \interface \type{\endmulticolumns} \\ \\
+%D \interface \type{\ejectcolumn} \\ \\
+%D
+%D This routines are sort of stand||alone. They communicate
+%D with the rest of \CONTEXT\ by means of some interface
+%D macro's, which we only mention.
+%D
+%D \interface \type{\nofcolumns} \\
+%D the number of columns \\
+%D \interface \type{\betweencolumns} \\
+%D the stuff between columns \\
+%D \interface \type{\finaloutput{material}} \\
+%D some kind of \type{\pagebody} and \type{\shipout} \\
+%D
+%D \interface \type{\ifbalancecolumns} \\
+%D balancing the colums or not \\
+%D \interface \type{\ifstretchcolumns} \\
+%D ragging the bottom or not \\
+%D
+%D \interface \type{\ifheightencolumns} \\
+%D fix the heigh tor not \\
+%D \interface \type{\fixedcolumnheight} \\
+%D the optional fixed height \\
+%D
+%D \interface \type{\ifinheritcolumns} \\
+%D handle ragging or not \\
+%D \interface \type{\ifr@ggedbottom} \\
+%D use ragged bottoms \\
+%D \interface \type{\ifb@selinebottom} \\
+%D put the bottom line on the \\
+%D \interface \type{\ifnormalbottom} \\
+%D put the bottom line at the \\
+%D
+%D \interface \type{\usercolumnwidth} \\
+%D the calculated width of a column \\
+%D \interface \type{\columntextwidth} \\
+%D the maximum width of a column \\
+%D \interface \type{\columntextheight} \\
+%D the minimum width of a column \\
+%D
+%D \interface \type{\spacingfactor} \\
+%D the spacing factor \\
+%D \interface \type{\corpssize} \\
+%D the (local) corpssize \\
+%D \interface \type{\openlineheight} \\
+%D the lineheight (including \type{\spacing}) \\
+%D
+%D \interface \type{\EveryCorps} \\
+%D communication channel to font switching routines \\
+%D
+%D \interface \type{\global\settopskip} \\
+%D set \type{\topskip} \\
+%D \interface \type{\setcolumnwarnings} \\
+%D set \type{\badness} and \type{\fuzz} \\
+%D \interface \type{\setcolumninserts} \\
+%D set \type{\insert}'s \\
+%D \interface \type{\setvsize} \\
+%D set \type{\vsize} and \type{\pagegoal} \\
+%D \interface \type{\sethsize} \\
+%D set \type{\hsize} \\
+%D
+%D \interface \type{\flushcolumnfloats} \\
+%D push saved column floats (next page) \\
+%D \interface \type{\flushcolumnfloat} \\
+%D push saved column floats (next column) \\
+%D \interface \type{\setcolumnfloats} \\
+%D initialize column floats \\
+%D
+%D \interface \type{\finishcolumnbox} \\
+%D do something special (a hook) \\
+%D \interface \type{\postprocesscolumnline} \\
+%D do something with each columnline (also a hook) \\
+%D \interface \type{\currentcolumn} \\
+%D the current column \\
+%D
+%D These interface macro's are called upon or initialized
+%D by the multi||column macro's.
+
+\def\columntextwidth {\zetbreedte}
+\def\columntextheight {\teksthoogte}
+\def\usercolumnwidth {\tekstbreedte}
+
+\def\fixedcolumnheight {\teksthoogte}
+\def\betweencolumns {\hskip\corpssize}
+
+\def\setcolumnwarnings {\dontcomplaincolumnboxes}
+\def\setcolumninserts {\dontpermitcolumninserts}
+
+\def\setcolumnfloats {} % in CONTEXT used for floats
+\def\flushcolumnfloats {} % in CONTEXT used for floats
+\def\flushcolumnfloat {} % in CONTEXT used for floats
+
+\def\finishcolumnbox {} % in CONTEXT used for backgrounds
+
+%D In fact, the column height and width are set by mens of
+%D two macro's. One can change their meaning if needed:
+
+\def\setcolumntextheight%
+ {\def\columntextheight{\teksthoogte}}
+
+\def\setcolumntextwidth%
+ {\def\columntextwidth{\tekstbreedte}}
+
+%D Both macros are redefined in \CONTEXT\ when backgrounds
+%D are applied to columns.
+
+\newcount\nofcolumns \nofcolumns=2
+
+\def\maxnofcolumns {16}
+\def\allocatednofcolumns {0}
+
+\newif\ifbalancecolumns \balancecolumnsfalse
+\newif\ifstretchcolumns \stretchcolumnsfalse
+\newif\ifinheritcolumns \inheritcolumnsfalse
+\newif\ifheightencolumns \heightencolumnsfalse
+
+\newbox\partialpage
+\newskip\partialpageskip
+
+\newbox\restofpage
+\newbox\savedfloatlist
+
+\newdimen\intercolumnwidth
+\newdimen\localcolumnwidth
+\newdimen\partialpageheight
+
+\newtoks\singlecolumnout
+
+%D During initialization the temporary boxes are allocated.
+%D This enables us to use as much columns as we want, without
+%D exhausting the pool of boxes too fast. We could have packed
+%D them in one box, but we've got enough boxes.
+%D
+%D Two sets of boxes are declared, the txtboxes are used for
+%D the text, the topboxes are for moved column floats.
+
+\def\@@txtcol{@@txtcol}
+\def\@@topcol{@@topcol}
+
+\def\initializemulticolumns#1%
+ {\ifnum#1>\maxnofcolumns\relax
+ \showmessage{\m!columns}{1}{\maxnofcolumns}%
+ \nofcolumns=\maxnofcolumns
+ \else
+ \nofcolumns=#1\relax
+ \fi
+ \ifnum\nofcolumns>\allocatednofcolumns\relax
+ \dorecurse
+ {#1}
+ {\ifnum\recurselevel>\allocatednofcolumns\relax
+ \newbox\next
+ \global\letvalue{\@@txtcol\recurselevel}=\next
+ \newbox\next
+ \global\letvalue{\@@topcol\recurselevel}=\next
+ \fi}%
+ \xdef\allocatednofcolumns{\the\nofcolumns}%
+ \fi
+ \edef\firstcolumnbox{\getvalue{\@@txtcol1}}%
+ \edef\firsttopcolumnbox{\getvalue{\@@topcol1}}%
+ \edef\lastcolumnbox{\getvalue{\@@txtcol\the\nofcolumns}}%
+ \edef\lasttopcolumnbox{\getvalue{\@@topcol\the\nofcolumns}}}
+
+%D Without going in details we present two macro's which
+%D handle the columns. The action which is transfered by the
+%D the first and only parameter can do something with
+%D \type{\currentcolumnbox}. In case of the mid columns,
+%D \type{\firstcolumnbox} and \type{\lastcolumnbox} are handled
+%D outside these macro's.
+
+\def\dohandlemidcolumns#1%
+ {\dorecurse
+ {\nofcolumns}
+ {\ifnum\recurselevel>1
+ \ifnum\recurselevel<\nofcolumns\relax
+ \edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
+ \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
+ \let\currentcolumn=\recurselevel
+ #1\relax
+ \fi
+ \fi}}
+
+\def\dohandleallcolumns#1%
+ {\dorecurse
+ {\nofcolumns}
+ {\edef\currentcolumnbox{\getvalue{\@@txtcol\recurselevel}}%
+ \edef\currenttopcolumnbox{\getvalue{\@@topcol\recurselevel}}%
+ \let\currentcolumn=\recurselevel
+ #1\relax}}
+
+%D Going to a new columns is done by means of a
+%D \type{\ejectcolumn}. The following definition does not
+%D always work.
+
+\def\ejectcolumn%
+ {\goodbreak
+ \showmessage{\m!columns}{2}{}}
+
+%D The next macro should never be called so let's deal with it.
+%D There were several solutions to these kind of errors. First
+%D we check for a good breakpoint before firing up the
+%D multi||column routine (\type{\break} or \type{\allowbreak}).
+%D We do the same at the end of the routine
+%D (\type{\allowbreak}). These allowances are definitely
+%D needed!
+%D
+%D Some on first sight redundant calls to for instance
+%D \type{\setvsize} in the flushing, splitting and balancing
+%D macro's can definitely not be omitted! Some are just there
+%D to handle situations that only few times arise. One of
+%D those can be that the output routine is invoked before
+%D everything is taken care of. This happens when we
+%D flush (part of) the current page with an \type{\unvbox}
+%D with a \type{\pagetotal}~$\approx$ \type{\pagegoal}. One
+%D simply cannot balance columns that are just balanced.
+%D
+%D I hope one never sees the following message. Because it
+%D took me a lot of time to develop the multi||columns
+%D routines, every (although seldom) warning gives me the
+%D creeps!
+
+\def\balancingerror%
+ {\showmessage{\m!columns}{3}{}%
+ \finaloutput{\unvbox255}}
+
+%D Here we present the two \type{\dont...} macro's, which are
+%D of course \CONTEXT||specific ones.
+
+\def\dontcomplaincolumnboxes%
+ {\mindermeldingen}
+
+\def\dontpermitcolumninserts%
+ {\def\dotopfloat%
+ {\showmessage{\m!columns}{4}{}%
+ \doexecfloat}%
+ \def\dobotfloat%
+ {\showmessage{\m!columns}{5}{}%
+ \doexecfloat}}
+
+\def\getinsertionheights\to#1\\% \relax'm
+ {#1=\!!zeropoint
+ \def\doaddinsertionheight##1%
+ {\ifvoid##1\else
+ \advance#1 by \skip##1
+ \advance#1 by \ht##1
+ \fi}%
+ \doaddinsertionheight\topins
+ \doaddinsertionheight\botins
+ \doaddinsertionheight\footins}
+
+%D The local column width is available in the dimension
+%D register \type{\localcolumnwidth}, which is calculated as:
+
+\def\setcolumnhsize%
+ {\setbox0=\hbox{\parindent\!!zeropoint\betweencolumns}%
+ \intercolumnwidth=\wd0
+ \localcolumnwidth=\columntextwidth
+ \edef\globalcolumnwidth{\the\localcolumnwidth}%
+ \advance\localcolumnwidth by -\leftskip
+ \advance\localcolumnwidth by -\rightskip
+ \advance\localcolumnwidth by -\nofcolumns\intercolumnwidth
+ \advance\localcolumnwidth by \intercolumnwidth
+ \divide\localcolumnwidth by \nofcolumns
+ \usercolumnwidth=\localcolumnwidth
+ \hsize=\localcolumnwidth} % we don't do it \global
+
+%D One should be aware that when font related dimensions are
+%D used in typesetting the in||between material, these
+%D dimensions are influenced by corps switches inside
+%D multi||column mode.
+
+%D The global width is saved in \type {\globalcolumnwidth}.
+%D This value is used when we pack the columns in a \type
+%D {\hbox}.
+
+\def\setcolumnvsize%
+ {\global\vsize=\columntextheight
+ \ifdim\partialpageheight>\!!zeropoint
+ \global\advance\vsize by -\partialpageheight
+ \fi
+ \getinsertionheights\to\dimen0\\%
+ \global\advance\vsize by -\dimen0
+ \global\vsize=\nofcolumns\vsize
+ \global\pagegoal=\vsize} % let's do it only here
+
+%D It really starts here. After some checks and initializations
+%D we change the output routine to continous multi||column
+%D mode. This mode handles columns that fill the current and
+%D next full pages. The method used is (more or less)
+%D multiplying \type{\vsize} and dividing \type{\hsize} by
+%D \type{\nofcolumns}. More on this can be found in the
+%D \TeX book. We save the top of the current page in box
+%D \type{\partialpage}.
+%D
+%D We manipulate \type{\topskip} a bit, just to be shure that
+%D is has no flexibility. This has te be done every time a
+%D font switch takles place, because \type{\topskip} can depend
+%D on this.
+%D
+%D Watch the trick with the \type{\vbox}. This way we get the
+%D right interlining and white space.
+
+\def\beginmulticolumns%
+ {\par
+ \begingroup
+ \dontshowcomposition
+ \setcolumntextwidth\relax
+ \setcolumntextheight\relax
+ \ifsomefloatwaiting
+ \showmessage{\m!columns}{6}{\the\savednoffloats}%
+ \global\setbox\savedfloatlist=\box\floatlist
+ \edef\restoresavedfloats%
+ {\global\savednoffloats=\the\savednoffloats
+ \global\setbox\floatlist=\box\savedfloatlist
+ \global\noexpand\somefloatwaitingtrue}%
+ \global\savednoffloats=0
+ \global\somefloatwaitingfalse
+ \else
+ \let\restoresavedfloats=\relax
+ \fi
+ %\global\partialpageskip=\lastskip % vervallen
+ \dimen0=\pagetotal
+ \advance\dimen0 by \parskip
+ \advance\dimen0 by \openlineheight
+ \ifdim\dimen0<\pagegoal
+ \allowbreak
+ \else
+ \break
+ \fi
+ \EveryCorps{\topskip=1\topskip}% % nog nodig ?
+ \the\everycorps % nog nodig ?
+ \initializemulticolumns\nofcolumns
+ \setcolumninserts
+ \hangafter=0\relax
+ \hangindent=\!!zeropoint\relax
+ \everypar{}% \everypar={\flushcolumnfloat}%
+ \ifdim\pagetotal=\!!zeropoint\relax % later toegevoegd
+ \else % later toegevoegd
+ \vbox{\strut}% % toegevoegd
+ \vskip-\lineskip % toegevoegd
+ \vskip-\openlineheight % toegevoegd
+ \fi % later toegevoegd
+ %\global\partialpageheight=\pagetotal % vervangen door \ht\partialpage
+ \global\singlecolumnout=\output
+ \global\output={\global\setbox\partialpage=\vbox{\unvbox255}}%
+ \eject
+ \global\partialpageheight=\ht\partialpage
+ \global\output={\continuousmulticolumnsout}%
+ \setcolumnfloats
+ \dohandleallcolumns
+ {\global\setbox\currenttopcolumnbox=\box\voidb@x}%
+ \let\sethsize=\setcolumnhsize
+ \let\setvsize=\setcolumnvsize
+ \sethsize
+ \setvsize
+ \showcomposition}
+
+%D When we leave the multi||column mode, we have to process the
+%D not yet shipped out part of the columns. When we don't
+%D balance, we simply force a continuous output, but a balanced
+%D output is more tricky.
+%D
+%D First we try to fill up the page and when all or something
+%D is left we try to balance things. This is another useful
+%D adaption of the ancesters of these macro's. It takes some
+%D reasoning to find out what happens and maybe I'm making
+%D some mistake, but it works.
+%D
+%D Unvoiding box \type{\partialpage} is sometimes necessary,
+%D e.g. when there is no text given between \type{\begin..}
+%D and \type{\end..}. The \type{\par} is needed!
+
+\def\endmulticolumns%
+ {\dontshowcomposition
+ \doflushcolumnfloats % added recently
+ \par
+ \ifbalancecolumns
+ \global\output={\continuousmulticolumnsout}%
+ \goodbreak
+ \global\output={\balancedmulticolumnsout}%
+ \else
+ \goodbreak
+ \fi
+ \eject % the prevdepth is important, try e.g. toclist in
+ \prevdepth\!!zeropoint % columns before some noncolumned text text
+ \global\output=\singlecolumnout
+ \ifvoid\partialpage\else
+ \unvbox\partialpage
+ \fi
+ \global\partialpageheight=\!!zeropoint
+ \nofcolumns=1
+ \setvsize
+ \dosomebreak\allowbreak
+ \restoresavedfloats
+ \endgroup}
+
+%D Because some initializations happen three times, we
+%D defined a macro for them. The \type{\everypar{}} is
+%D needed because we don't want anything to interfere.
+
+\def\setmulticolumnsout%
+ {\everypar{}%
+ \setcolumnwarnings
+ \settopskip
+ \setmaxdepth
+ \topskip=1\topskip
+ \splittopskip=\topskip
+ \splitmaxdepth=\maxdepth
+ \boxmaxdepth=\maxdepth
+ \emergencystretch=\!!zeropoint\relax} % sometimes needed !
+
+%D Flushing the page comes to pasting the columns together and
+%D appending the result to box \type{\partialpage}, if not
+%D void. I've seen a lot of implementations in which some skip
+%D was put between normal text and multi||column text. When we
+%D don't want this, the baselines can be messed up. I hope the
+%D seemingly complicated calculation of a correction
+%D \type{\kern} is adequate to overcome this. Although not
+%D watertight, spacing is taken into account and even multiple
+%D mode changes on one page go well. But cross your fingers and
+%D don't blame me.
+%D
+%D One of the complications of flushing out the boxes is that
+%D \type{\partialpage} needs to be \type{\unvbox}'ed, otherwise
+%D there is too less flexibility in the page when using
+%D \type{\r@ggedbottom}. It took a lot of time before these
+%D kind of problems were overcome. Using \type{\unvbox} at the
+%D wrong moment can generate \type{\balancingerror}'s.
+%D
+%D One can use the macros \type {\maxcolumnheight} and \type
+%D {\maxcolumndepth} when generating material between columns
+%D as well as postprocessing column lines.
+
+\let\maxcolumnheight=\!!zeropoint
+\let\maxcolumndepth =\!!zeropoint
+
+\def\setmaxcolumndimensions%
+ {\let\maxcolumnheight=\!!zeropoint
+ \let\maxcolumndepth =\!!zeropoint
+ \dohandleallcolumns
+ {\ifdim\ht\currentcolumnbox>\maxcolumnheight
+ \edef\maxcolumnheight{\the\ht\currentcolumnbox}%
+ \fi
+ \ifdim\dp\currentcolumnbox>\maxcolumndepth
+ \edef\maxcolumndepth{\the\dp\currentcolumnbox}%
+ \fi}}
+
+\def\flushcolumnedpage%
+ {\bgroup
+ \setmulticolumnsout
+ \showcomposition
+ \setmaxcolumndimensions
+ \postprocesscolumns
+ \dohandleallcolumns % \hbox i.v.m. \showcomposition
+ {\global\setbox\currentcolumnbox=\hbox to \localcolumnwidth
+ {\box\currentcolumnbox
+ \global\wd\currentcolumnbox=\localcolumnwidth
+ \ifheightencolumns
+ \global\ht\currentcolumnbox=\fixedcolumnheight
+ \fi}}%
+ \setmaxcolumndimensions
+ \setbox0=\vbox
+ {\hbox to \globalcolumnwidth
+ {\dohandleallcolumns
+ {\finishcolumnbox{\box\currentcolumnbox}%
+ \ifnum\currentcolumn<\nofcolumns
+ \hfil\betweencolumns\hfil
+ \fi}}}%
+ \dohandleallcolumns
+ {\global\setbox\currenttopcolumnbox=\box\voidb@x}%
+ \ifvoid\partialpage
+ \else
+ \unvbox\partialpage
+ \fi
+ \global\partialpageheight=\!!zeropoint
+ \setvsize
+ \dosomebreak\nobreak
+ \dp0=\!!zeropoint
+ \box0
+ \allowbreak % nieuw / test
+ \egroup}
+
+%D In case one didn't notice, finaly \type{\finishcolumnbox} is
+%D applied to all boxes. One can use this hook for special
+%D purposes. But there is more:
+%D
+%D Once upon a time I wanted to manipulate the individual lines
+%D in a column. This feature is demonstrated in the two examples
+%D below.
+%D
+%D \startbuffer
+%D \def\postprocesscolumnline#1%
+%D {\ruledhbox{#1}\hss}
+%D
+%D \startkolommen[n=4]
+%D \dorecurse{25}{line: \recurselevel\par}
+%D \stopkolommen
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here we show the natural width of the lines:
+%D
+%D {\haalbuffer}
+%D
+%D The next example does a bit more advanced manipulation:
+%D
+%D \startbuffer
+%D \def\postprocesscolumnline#1%
+%D {\ifodd\currentcolumn
+%D \hfill#1\relax
+%D \else
+%D \relax#1\hfill
+%D \fi}
+%D
+%D \startkolommen[n=4]
+%D \dorecurse{25}{line \recurselevel\par}
+%D \stopkolommen
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here we also see an application of \type{\currentcolumn}:
+%D
+%D {\haalbuffer}
+%D
+%D This feature is implemented using the reshape macros
+%D presented in \type{supp-box}.
+
+\def\postprocesscolumns% recent extension
+ {\ifx\postprocesscolumnline\undefined \else
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vtop
+ {\beginofshapebox
+ \unvbox\currentcolumnbox
+ \unskip\unskip
+ \endofshapebox
+ \reshapebox
+ {\dimen0=\ht\shapebox
+ \dimen2=\dp\shapebox
+ \setbox\shapebox=\hbox to \hsize
+ {\postprocesscolumnline{\unhbox\shapebox}}%
+ \ht\shapebox=\dimen0
+ \dp\shapebox=\dimen2
+ \box\shapebox}%
+ \flushshapebox
+ \everypar{}\parskip\!!zeropoint % = \forgetall
+ \strut\endgraf
+ \vskip-\lineheight
+ \vfil}}%
+ \fi}
+
+%D We default to doing nothing!
+
+\let\postprocesscolumnline=\undefined
+
+%D Here comes the simple splitting routine. It's a bit
+%D longer than expected because of ragging bottoms or not.
+%D This part can be a bit shorter but I suppose that I will
+%D forget what happens. The splitting takes some already
+%D present material (think of floats) into account!
+%D
+%D First we present some auxiliary routines. Any material,
+%D like for instance floats, that is already present in the
+%D boxes is preserved.
+
+\def\splitcolumn#1from \box#2to \dimen#3 top \box#4%
+ {\bgroup
+ \ifdim\ht#4>\!!zeropoint
+ \dimen0=\dimen#3\relax
+ \dimen2=\dimen#3\relax
+ \advance\dimen0 by -\ht#4
+ \setbox0=\vsplit#2 to \dimen0
+ \global\setbox#1=\vbox to \dimen2{\unvcopy#4\unvbox0}%
+ \else
+ \global\setbox#1=\vsplit#2 to \dimen#3
+ \fi
+ \egroup}
+
+\def\splitcurrentcolumn from \box#1to \dimen#2%
+ {\splitcolumn\currentcolumnbox from \box#1 to \dimen#2 top \box\currenttopcolumnbox}
+
+\def\splitfirstcolumn from \box#1to \dimen#2%
+ {\splitcolumn\firstcolumnbox from \box#1 to \dimen#2 top \box\firsttopcolumnbox}
+
+\def\splitlastcolumn from \box#1to \dimen#2%
+ {\global\setbox\lastcolumnbox=\vbox
+ {\unvcopy\lasttopcolumnbox
+ \unvbox#1}}
+
+%D Here comes the routine that splits the long box in columns.
+%D The macro \type{\flushcolumnfloats} can be used to flush
+%D either floats that were present before the multi||column
+%D mode was entered, or floats that migrate to next columns.
+%D Flushing floats is a delicate process.
+
+\def\continuousmulticolumnsout%
+ {\bgroup
+ \setmulticolumnsout
+ \dontshowcomposition
+ \dimen0=\columntextheight
+ %\advance\dimen0 by -\maxdepth % wel of niet (niet dus)
+ \advance\dimen0 by -\partialpageheight
+ \getinsertionheights\to\dimen2\\% toegevoegd ivm voetnoten
+ \advance\dimen0 by -\dimen2 % idem
+ \dohandleallcolumns
+ {\splitcurrentcolumn from \box255 to \dimen0}%
+ \setbox\restofpage=\vbox{\unvbox255}%
+ \ifinheritcolumns
+ \ifr@ggedbottom
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\unvbox\currentcolumnbox
+ \vfill}}%
+ \fi
+ \ifn@rmalbottom
+ \advance\dimen0 by \maxdepth
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\unvbox\currentcolumnbox}}%
+ \fi
+ \ifb@selinebottom
+ % the columns are on top of the baseline
+ \fi
+ \else
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\ifstretchcolumns
+ \unvbox\currentcolumnbox
+ \else
+ \unvbox\currentcolumnbox % wel of niet \unvbox ?
+ \vfill
+ \fi}}%
+ \dohandleallcolumns
+ {\global\ht\currentcolumnbox=\dimen0}%
+ \fi
+ \finaloutput{\flushcolumnedpage}%
+ \sethsize
+ \setvsize
+ \flushcolumnfloats
+ \unvbox\restofpage
+ % \penalty\outputpenalty % gaat gruwelijk mis in opsommingen
+ \egroup}
+
+%D And this is the balancing stuff. Again, part of the routine
+%D is dedicated to handling ragged bottoms, but here we also
+%D see some handling concerning the stretching of columns.
+%D We set \type{\widowpenalty} at~0, which enables us to
+%D balance columns with few lines. The use of \type{\box2} and
+%D \type{\box4} garantees a more robust check when skips are
+%D used.
+
+\def\balancedmulticolumnsout%
+ {\bgroup
+ \setmulticolumnsout
+ \dontshowcomposition
+ \widowpenalty=0
+ \setbox0=\vbox{\unvbox255}%
+ \ifdim\ht0>\openlineheight
+ \dimen0=\ht0
+ \advance\dimen0 by \topskip
+ \advance\dimen0 by -\baselineskip
+ \divide\dimen0 by \nofcolumns
+ \vbadness=\!!tenthousand\relax
+ \count255=0
+ \bgroup
+ \dimen2=\!!onepoint
+ \dimen2=\spacingfactor\dimen2
+ \loop
+ \advance\count255 by 1
+ \global\setbox\restofpage=\copy0\relax
+ \splitfirstcolumn from \box\restofpage to \dimen0
+ \dohandlemidcolumns
+ {\splitcurrentcolumn from \box\restofpage to \dimen0}%
+ \splitlastcolumn from \box\restofpage to \dimen0
+ \setbox2=\vbox{\unvcopy\firstcolumnbox}%
+ \dimen4=\!!zeropoint
+ \dohandleallcolumns
+ {\setbox4=\vbox{\unvcopy\currentcolumnbox}%
+ \dimen6=\ht4
+ \ifdim\dimen6>\dimen4 \dimen4=\dimen6\fi}%
+ \donefalse
+ \ifnum\count255>100\relax
+ \donefalse
+ \fi
+ \ifdim\dimen4>\ht2
+ \donetrue
+ \fi
+ \ifdone
+ \advance\dimen0 by \dimen2\relax
+ \repeat
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox{\unvcopy\currentcolumnbox}}% NIEUW
+ \ifnum\count255>100\relax
+ \showmessage{\m!columns}{7}{}%
+ \else
+ \showmessage{\m!columns}{8}{\the\count255\space}%
+ \fi
+ \egroup
+ \ifinheritcolumns
+ \dimen0=\ht\firstcolumnbox
+ \dimen2=\ht\firstcolumnbox
+ \advance\dimen2 by -\openlineheight
+ \dohandleallcolumns
+ {\dimen4=\ht\currentcolumnbox
+ \dimen6=10\openlineheight
+ \global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\unvbox\currentcolumnbox
+ \ifdim\dimen4>\dimen6
+ \ifdim\dimen4<\dimen0
+ \ifdim\dimen4>\dimen2
+ \vskip\!!zeropoint % !!
+ \else
+ \vskip\openlineheight
+ \vfill
+ \fi
+ \else
+ \vskip\!!zeropoint
+ \fi
+ \else
+ \vskip\openlineheight
+ \vfill
+ \fi}}%
+ \else
+ \bgroup
+ \ifstretchcolumns
+ \dimen0=\ht\firstcolumnbox
+ \dimen2=\bottomtolerance\ht\firstcolumnbox
+ \setbox0=\vbox{\unvcopy\lastcolumnbox}%
+ \advance\dimen0 by -\ht0\relax
+ \advance\dimen0 by -\dp0\relax
+ \ifdim\dimen0>\openlineheight\relax
+ \ifdim\dimen0>\dimen2\relax
+ % \stretchcolumnsfalse % beter goed slecht dan slecht goed
+ \showmessage{\m!columns}{9}{}%
+ \fi
+ \fi
+ \fi
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox to \ht\firstcolumnbox
+ {\ifstretchcolumns
+ \unvbox\currentcolumnbox
+ \else
+ \box\currentcolumnbox
+ \vfill
+ \fi}}%
+ \egroup
+ \fi
+ \else
+ \showmessage{\m!columns}{10}{}%
+ \global\setbox\firstcolumnbox=\vbox{\unvbox0}%
+ \fi
+ \global\output={\balancingerror}%
+ \b@selinebottomtrue % forces depth in separation rule
+ \flushcolumnedpage
+ \egroup}
+
+%D The multicolumn mechanism is incorporated in a \CONTEXT\
+%D interface, which acts like:
+%D
+%D \starttypen
+%D \startcolumns[n=4,balance=no,stretch=no,line=on]
+%D some text
+%D \stopcolumns
+%D \stoptypen
+%D
+%D The setup is optional. The default behaviour of columns
+%D can be set up with:
+%D
+%D \starttypen
+%D \setupcolumns
+%D [n=2,
+%D balance=yes,
+%D stretch=text,
+%D line=off]
+%D \stoptypen
+%D
+%D In this case, stretching is according to the way it's
+%D done outside columns (\type{\inheritcolumnstrue}). Also
+%D we can setup the \type{tolerance} within a column, the
+%D \type{distance} between columns and the fixed
+%D \type{height} of a column.
+
+%D Multi||column output: the float routines
+%D
+%D Here come the routines that handle the placement of column
+%D floats. Floats that are to big migrate to the next
+%D column. Floats that are too wide, migrate to the top of the
+%D next page, where they span as much columns as needed.
+%D Floats that are left over from outside the multi||column
+%D mode are flushed first. In macro \type{\finaloutput} the
+%D topfloats that are left from previous text should be set.
+%D
+%D When there are some floats in the queue, we inhibit the
+%D flushing of floats on top of columns. The number of
+%D waiting floats is preswent in \type{\savednoftopfloats} and
+%D is saved. As long as there are floats waiting, the topfloats
+%D are places as if we are outside multi||column mode. This is
+%D neccessary for e.g. multicolumn lists.
+%D
+%D When all those floats are flushed, we switch to the local
+%D flushing routine.
+
+\def\setcolumnfloats%
+ {\xdef\globalsavednoffloats{\the\savednoffloats}%
+ \ifnum\globalsavednoffloats>0
+ \setglobalcolumnfloats
+ \else
+ \setlocalcolumnfloats
+ \fi}
+
+\def\setglobalcolumnfloats%
+ {\everypar={}%
+ \let\flushcolumnfloat=\relax
+ \let\doroomfloat=\relax
+ \let\flushcolumnfloats=\noflushcolumnfloats}
+
+\def\setlocalcolumnfloats%
+ {\everypar={\flushcolumnfloat\checkindentation}% nog documenteren
+ \let\flushcolumnfloat=\doflushcolumnfloat
+ \let\doroomfloat=\docolumnroomfloat
+ \let\flushcolumnfloats=\doflushcolumnfloats
+ \let\dosetbothinserts=\relax
+ \let\dotopinsertions=\relax}
+
+\def\noflushcolumnfloats%
+ {\bgroup
+ \xdef\localsavednoffloats{\the\savednoffloats}%
+ \global\savednoffloats=\globalsavednoffloats
+ \dotopinsertions
+ \xdef\globalsavenoffloats{\the\savednoffloats}%
+ \ifnum\globalsavednoffloats=0
+ \setlocalcolumnfloats
+ \fi
+ \global\savednoffloats=\localsavednoffloats
+ \egroup}
+
+%D We need to calculate the amount of free space in a columns.
+%D When there is not enough room, we migrate the float to the
+%D next column. These macro's are alternatives (and
+%D look||alikes) of \type{\doroomfloat}. When a float is to
+%D wide, for one column, it is moved to the top of the next
+%D page. Of course such moved floats have to be taken into
+%D account when we calculate the available space. It's a pitty
+%D that such things are no integral part of \TEX.
+
+% \def\getcolumnstatus\column#1\total#2\goal#3\\%
+% {\ifdim\pagegoal<\maxdimen
+% \dimen0=\pagegoal
+% \divide\dimen0 by \nofcolumns
+% \dimen2=\!!zeropoint
+% \count255=0\relax
+% \dimen8=\columntextheight
+% \advance\dimen8 by -\partialpageheight
+% %\advance\dimen8 by -\maxdepth % recently deleted
+% \def\dogetcolumnstatus%
+% {\advance\count255 by 1\relax
+% \advance\dimen2 by \ht\currenttopcolumnbox
+% \advance\dimen2 by \dp\currenttopcolumnbox
+% \dimen4=\dimen2\relax
+% \advance\dimen4 by \pagetotal
+% \dimen6=\count255\dimen8
+% \ifdim\dimen4>\dimen6
+% \else
+% \let\dogetcolumnstatus=\relax
+% \fi}%
+% \dohandleallcolumns{\dogetcolumnstatus}%
+% \ifdim\dimen4=\dimen6
+% \dimen4=\!!zeropoint
+% \advance\count255 by 1
+% \fi
+% #1=\count255
+% #2=\dimen4
+% #3=\dimen6
+% \else
+% #1=1
+% #2=\!!zeropoint
+% #3=\teksthoogte
+% \advance#3 by -\partialpageheight
+% \fi}
+
+\def\getcolumnstatus\column#1\total#2\goal#3\\%
+ {\ifdim\pagegoal<\maxdimen
+ \dimen0=\pagegoal
+ \dimen10=\pagetotal
+ \else
+ \dimen0=\nofcolumns\teksthoogte
+ \dimen10=\!!zeropoint
+ \fi
+ \divide\dimen0 by \nofcolumns
+ \dimen2=\!!zeropoint
+ \count255=0
+ \dimen8=\columntextheight
+ \advance\dimen8 by -\partialpageheight
+ %\advance\dimen8 by -\maxdepth % recently deleted
+ \def\dogetcolumnstatus%
+ {\advance\count255 by 1
+ \advance\dimen2 by \ht\currenttopcolumnbox
+ \advance\dimen2 by \dp\currenttopcolumnbox
+ \dimen4=\dimen2
+ \advance\dimen4 by \dimen10 % pagetotal
+ \dimen6=\count255\dimen8
+ \ifdim\dimen4>\dimen6
+ \else
+ \let\dogetcolumnstatus=\relax
+ \fi}%
+ \dohandleallcolumns{\dogetcolumnstatus}%
+ \ifnum\count255=0 \count255=1 \fi
+ #1=\count255
+ #2=\dimen4
+ #3=\dimen6 }
+
+\def\docolumnroomfloat%
+ {\ifnofloatpermitted
+ \global\roomforfloatfalse
+ \else
+ \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+ \advance\dimen0 by \ht\floatbox
+ \advance\dimen0 by \dp\floatbox
+ \advance\dimen0 by \floattopskip
+ % \advance\dimen0 by -\pageshrink nog eens testen
+ \ifdim\dimen0>\dimen2
+ \global\roomforfloatfalse
+ \else
+ \global\roomforfloattrue
+ \fi
+ \ifdim\wd\floatbox>\hsize
+ \showmessage{\m!columns}{11}{}%
+ \global\roomforfloatfalse
+ \fi
+ \fi}
+
+%D Flushing one float is done as soon as possible, i.e.
+%D \type{\everypar}. This means that (at the moment)
+%D sidefloats are not supported (overulled)!
+
+\def\doflushcolumnfloat%
+ {\bgroup
+ \ifsomefloatwaiting
+ \let\doflushcolumnfloat=\relax
+ \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+ \ifdim\dimen0>\!!zeropoint
+ \dogetfloat
+ \ifdim\wd\floatbox>\hsize
+ \doresavefloat
+ \else
+ \setbox2=\vbox
+ {\blanko[\@@bkvoorwit]
+ \copy\floatbox
+ \blanko[\@@bknawit]}%
+ \advance\dimen0 by \ht2
+ \advance\dimen0 by 2\openlineheight % still neccessary ?
+ \ifdim\dimen0>\dimen2
+ \showmessage{\m!columns}{12}{}%
+ \doresavefloat
+ \else
+ \ifhmode{\setbox0=\lastbox}\fi% waar is die er in geslopen
+ \par
+ \ifdim\prevdepth<\!!zeropoint\relax % anders bovenaan kolom witruimte
+ \else
+ \blanko[\@@bkvoorwit]
+ \fi
+ \copy\floatbox
+ \blanko[\@@bknawit]
+ \fi
+ \fi
+ \fi
+ \fi
+ \egroup}
+
+%D This one looks complicated. Upto \type{\nofcolumns} floats
+%D are placed, taking the width of a float into account. This
+%D routine can be improved on different ways:
+%D
+%D \startopsomming[intro,opelkaar]
+%D \som taking into account some imaginary baseline, just to
+%D get the captions in line
+%D \som multipass flushing until as many floats are displaced
+%D as possible
+%D \stopopsomming
+%D
+%D When handling lots of (small) floats spacing can get worse
+%D because of lining out the columns.
+
+\def\doflushcolumnfloats%
+ {\bgroup
+ \ifnum\savednoffloats>1\relax % no \ifsomefloatwaiting
+ \dimen8=\!!zeropoint
+ \dimen4=\!!zeropoint
+ \count0=0 % count0 can be used local
+ \count2=\nofcolumns % count2 can be used local
+ \dohandleallcolumns
+ {\ifnum\count0>0\relax % the wide one's reserved space
+ \global\setbox\currenttopcolumnbox=
+ \vbox{\vphantom{\copy\floatbox}\witruimte\blanko[\@@bknawit]}%
+ \else
+ \dogetfloat
+ \ifdim\wd\floatbox>\hsize
+ \dimen0=\wd\floatbox
+ \advance\dimen0 by \intercolumnwidth
+ \dimen2=\hsize
+ \advance\dimen2 by \intercolumnwidth
+ \divide\dimen0 by \dimen2
+ \count0=\dimen0
+ \advance\count0 by 1
+ \ifnum\count0>\count2
+ \doresavefloat
+ \else
+ \dimen0=\count0\hsize
+ \advance\dimen0 by \count0\intercolumnwidth
+ \advance\dimen0 by -\intercolumnwidth
+ \wd\floatbox=.5\wd\floatbox
+ \setbox\floatbox=\hbox to \dimen0{\hss\box\floatbox\hss}%
+ \fi
+ \showmessage{\m!columns}{13}{}%
+ \else
+ \showmessage{\m!columns}{13}{}%
+ \fi
+ \ifdim\ht\floatbox>\!!zeropoint\relax
+ \global\setbox\currenttopcolumnbox=
+ \vbox
+ {\copy\floatbox
+ \witruimte % nodig ?
+ \blanko[\@@bknawit]}%
+ \fi
+ \dimen6=\ht\currenttopcolumnbox
+ \advance\dimen6 by \dp\currenttopcolumnbox
+ \fi
+ \ifdim\dimen4<\ht\currenttopcolumnbox
+ \dimen4=\ht\currenttopcolumnbox
+ \fi
+ \advance\dimen8 by \dimen6
+ \advance\count2 by -1
+ \advance\count0 by -1\relax}%
+ \setvsize
+ \global\advance\vsize by -\dimen8
+ \global\pagegoal=\vsize
+ \else
+ \doflushfloats
+ \fi
+ \egroup}
+
+%D This were the multi||column routines. They can and need to
+%D be improved but at the moment their behaviour is acceptable.
+%D
+%D One inprovement can be to normalize the height of floats
+%D to $n\times \type{\lineheight}$ with a macro like:
+%D
+%D \starttypen
+%D \normalizevbox{...}
+%D \stoptypen
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex new file mode 100644 index 000000000..273c6b93f --- /dev/null +++ b/tex/context/base/supp-pdf.tex @@ -0,0 +1,1164 @@ +%D \module
+%D [ file=supp-pdf,
+%D version=1997.05.21,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\METAPOST\ to \PDF\ conversion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D These macros are written as generic as possible. Some
+%D general support macro's are loaded from a small module
+%D especially made for non \CONTEXT\ use. In this module I
+%D use a matrix transformation macro written by Tanmoy
+%D Bhattacharya. Thanks to extensive testing of Sebastian
+%D Ratz I was able to complete this module within reasonable
+%D time. First we take care of non||\CONTEXT\ use:
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+
+%D This module handles some \PDF\ conversion and insertions
+%D topics. The macros use the \PDFTEX\ primitive
+%D \type{\pdfliteral}.
+
+\writestatus{loading}{Context Support Macros / PDF}
+
+\unprotect
+
+\ifx\pdfliteral\undefined
+ \def\pdfliteral#1{\message{[ignored pdfliteral: #1]}}
+\fi
+
+%D \macros
+%D {convertPDFtoPDF}
+%D {}
+%D
+%D \PDFTEX\ supports verbatim inclusion of \PDF\ code. The
+%D following macro takes care of inserting externally defined
+%D illustrations in \PDF\ format. According to a suggestion
+%D Tanmoy Bhattacharya posted to the \PDFTEX\ mailing list, we
+%D first skip lines until \type{stream} is reached and then
+%D copy lines until \type{endstream} is encountered. This
+%D scheme only works with vectorized graphics in which no
+%D indirect references to objects are used. Bitmaps also don't
+%D work. Interpreting their specifications is beyond the
+%D current implementation.
+%D
+%D \starttypen
+%D \convertPDFtoPDF
+%D {filename}
+%D {x scale} {y scale}
+%D {x offset } {y offset}
+%D {width} {height}
+%D \stoptypen
+%D
+%D When the scales are set to~1, the last last four values
+%D are the same as the bounding box, e.g.
+%D
+%D \starttypen
+%D \convertPDFtoPDF{mp-pra-1.pdf} {1} {1}{-1bp}{-1bp}{398bp}{398bp}
+%D \convertPDFtoPDF{mp-pra-1.pdf}{.5}{.5} {0bp} {0bp}{199bp}{199bp}
+%D \stoptypen
+%D
+%D Keep in mind, that this kind of copying only works for
+%D pure and valid pdf code (without fonts).
+
+%D The scanning and copying is straightforward and quite fast.
+%D To speed up things we use two constants.
+
+\def\@@PDFstream@@ {stream}
+\def\@@PDFendstream@@ {endstream}
+
+%D \macros
+%D {PDFmediaboxprefered}
+%D {}
+%D
+%D If needed, the macros can scan for the mediabox that
+%D specifies the dimensions and offsets of the graphic. When
+%D we say:
+%D
+%D \starttypen
+%D \PDFmediaboxpreferedtrue
+%D \stoptypen
+%D
+%D the mediabox present in the file superseded the user
+%D specified, already scaled and calculated offset and
+%D dimensions. Beware: the user supplied values are not the
+%D bounding box ones!
+
+\newif\ifPDFmediaboxprefered
+
+\def\setPDFboundingbox#1#2#3#4#5#6%
+ {\dimen0=#1\dimen0=#5\dimen0
+ \ScaledPointsToBigPoints{\number\dimen0}\PDFxoffset
+ \dimen0=#3\dimen0=#5\dimen0
+ \xdef\PDFwidth{\the\dimen0}%
+ \dimen0=#2\dimen0=#6\dimen0
+ \ScaledPointsToBigPoints{\number\dimen0}\PDFyoffset
+ \dimen0=#4\dimen0=#6\dimen0
+ \xdef\PDFheight{\the\dimen0}%
+ \global\let\PDFxoffset=\PDFxoffset
+ \global\let\PDFyoffset=\PDFyoffset}
+
+\def\setPDFmediabox#1[#2 #3 #4 #5]#6\done%
+ {\dimen2=#2bp\dimen2=-\dimen2
+ \dimen4=#3bp\dimen4=-\dimen4
+ \dimen6=#4bp\advance\dimen6 by \dimen2
+ \dimen8=#5bp\advance\dimen8 by \dimen4
+ \setPDFboundingbox{\dimen2}{\dimen4}{\dimen6}{\dimen8}\PDFxscale\PDFyscale}
+
+\def\checkPDFmediabox#1/MediaBox#2#3\done%
+ {\ifx#2\relax \else
+ \message{mediabox}%
+ \setPDFmediabox#2#3\done
+ \fi}
+
+%D We use the general macro \type{\doprocessfile} and feed this
+%D with a line handling macro that changed it's behavior when
+%D the stream operators are encountered.
+
+\def\handlePDFline%
+ {\ifx\@@PDFstream@@\fileline
+ \let\doprocessPDFline=\copyPDFobject
+ \startPDFtoPDF
+ \else\ifPDFmediaboxprefered
+ \expandafter\checkPDFmediabox\fileline/MediaBox\relax\done
+ \fi\fi}
+
+\def\copyPDFobject%
+ {\ifx\@@PDFendstream@@\fileline
+ \ifPDFmediaboxprefered
+ \let\doprocessPDFline=\findPDFmediabox
+ \else
+ \let\doprocessPDFline=\relax
+ \fi
+ \else
+ \advance\scratchcounter by 1
+ \pdfliteral{\fileline}%
+ \fi}
+
+\def\findPDFmediabox%
+ {\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done}
+
+%D The main conversion macro wraps the \PDF\ codes in a box
+%D that is output as an object. The graphics are embedded
+%D in~\type{q} and~\type{Q} and are scaled and positioned using
+%D one transform call (\type{cm}). This saves some additional
+%D scaling.
+
+\def\startPDFtoPDF%
+ {\setbox0=\vbox\bgroup
+ \message{[PDF to PDF \PDFfilename}%
+ \forgetall
+ \scratchcounter=0
+ \let\stopPDFtoPDF=\dostopPDFtoPDF}
+
+\def\dostopPDFtoPDF%
+ {\ifnum\scratchcounter<0 \scratchcounter=1 \fi
+ \message{(\the\scratchcounter\space lines)]}%
+ \egroup
+ \wd0=\PDFwidth
+ \vbox to \PDFheight
+ {\forgetall
+ \vfill
+ \pdfliteral{q}%
+ \pdfliteral{1 0 0 1 \PDFxoffset\space \PDFyoffset\space cm}%
+ \pdfliteral{\PDFxscale\space 0 0 \PDFyscale\space 0 0 cm}%
+ \box0
+ \pdfliteral{Q}}}
+
+\def\stopPDFtoPDF%
+ {\message{[PDF to PDF \PDFfilename\space not found]}}
+
+\def\convertPDFtoPDF#1#2#3#4#5#6#7%
+ {\bgroup
+ \def\PDFfilename{#1}%
+ \def\PDFxscale {#2}%
+ \def\PDFyscale {#3}%
+ \setPDFboundingbox{#4}{#5}{#6}{#7}{1}{1}%
+ \uncatcodespecials
+ \endlinechar=-1
+ \let\doprocessPDFline=\handlePDFline
+ \doprocessfile\scratchread\PDFfilename\doprocessPDFline
+ \stopPDFtoPDF
+ \egroup}
+
+%D \macros
+%D {convertMPtoPDF}
+%D {}
+%D
+%D The next set of macros implements \METAPOST\ to \PDF\
+%D conversion. Because we want to test as fast as possible, we
+%D first define the \POSTSCRIPT\ operators that \METAPOST\
+%D uses. We don't define irrelevant ones, because these are
+%D skipped anyway.
+
+\def \PScurveto {curveto}
+\def \PSlineto {lineto}
+\def \PSmoveto {moveto}
+\def \PSshowpage {showpage}
+\def \PSnewpath {newpath}
+\def \PSfshow {fshow}
+\def \PSclosepath {closepath}
+\def \PSfill {fill}
+\def \PSstroke {stroke}
+\def \PSclip {clip}
+\def \PSrlineto {rlineto}
+\def \PSsetlinejoin {setlinejoin}
+\def \PSsetlinecap {setlinecap}
+\def \PSsetmiterlimit {setmiterlimit}
+\def \PSsetgray {setgray}
+\def \PSsetrgbcolor {setrgbcolor}
+\def \PSsetdash {setdash}
+\def \PSgsave {gsave}
+\def \PSgrestore {grestore}
+\def \PStranslate {translate}
+\def \PSscale {scale}
+\def \PSconcat {concat}
+\def \PSdtransform {dtransform}
+
+\def \PSBoundingBox {BoundingBox:}
+\def \PSHiResBoundingBox {HiResBoundingBox:}
+\def \PSExactBoundingBox {ExactBoundingBox:}
+\def \PSPage {Page:}
+
+%D In \POSTSCRIPT\ arguments precede the operators. Due to the
+%D fact that in some translations we need access to those
+%D arguments, as well as that sometimes we have to skip them,
+%D we stack them up. The stack is one||dimensional for non path
+%D operators and two||dimensional for operators inside a path.
+%D This is because we have to save the whole path for
+%D (optional) postprocessing. Values are pushed onto the stack
+%D by:
+%D
+%D \starttypen
+%D \setMPargument {value}
+%D \stoptypen
+%D
+%D They can be retrieved by the short named macros:
+%D
+%D \starttypen
+%D \gMPa {number}
+%D \sMPa {number}
+%D \stoptypen
+%D
+%D When scanning a path specification, we also save the
+%D operator, using
+%D
+%D \starttypen
+%D \setMPkeyword {n}
+%D \stoptypen
+%D
+%D The path drawing operators are coded for speed: \type{clip},
+%D \type{stroke}, \type{fill} and \type{fillstroke} become
+%D 1, 2, 3 and~4.
+%D
+%D When processing the path this code can be retrieved
+%D using
+%D
+%D \starttypen
+%D \getMPkeyword{n}
+%D \stoptypen
+%D
+%D When setting an argument, the exact position on the stack
+%D depend on the current value of the \COUNTERS\
+%D \type{\nofMPsegments} and \type{\nofMParguments}.
+
+\newcount\nofMPsegments
+\newcount\nofMParguments
+
+%D These variables hold the coordinates. The argument part of
+%D the stack is reset by:
+%D
+%D \starttypen
+%D \resetMPstack
+%D \stoptypen
+%D
+%D We use the prefix \type{@@MP} to keep the stack from
+%D conflicting with existing macros. To speed up things bit
+%D more, we use the constant \type{\@@MP}.
+
+\def\@@MP{@@MP}
+
+\def\setMPargument#1%
+ {\advance\nofMParguments by 1
+ \expandafter\def
+ \csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname%
+ {\do#1}}
+
+\def\gMPa#1%
+ {\csname\@@MP0#1\endcsname}
+
+\def\gMPs#1%
+ {\csname\@@MP\the\nofMPsegments#1\endcsname}
+
+\def\setMPkeyword#1
+ {\expandafter\def\csname\@@MP\the\nofMPsegments0\endcsname{#1}%
+ \advance\nofMPsegments by 1
+ \nofMParguments=0\relax}
+
+\def\getMPkeyword#1%
+ {\csname\@@MP#10\endcsname}
+
+%D When we reset the stack, we can assume that all further
+%D comment is to be ignored as well as handled in strings.
+%D By redefining the reset macro after the first call, we
+%D save some run time.
+
+\def\resetMPstack%
+ {\catcode`\%=\@@active
+ \let\handleMPgraphic=\handleMPendgraphic
+ \def\resetMPstack{\nofMParguments=0\relax}%
+ \resetMPstack}
+
+%D The arguments are saved with the preceding command
+%D \type{\do}. By default this command expands to nothing, but
+%D when we deal with strings it's used to strip off the
+%D \type{(} and \type{)}.
+%D
+%D Strings are kind of tricky, because characters can be
+%D passed verbatim \type{(hello)}, by octal number
+%D \type{(\005)} or as command \type{(\()}. We therefore
+%D cannot simply ignore \type{(} and \type{)}, the way we do
+%D with \type{[} and \type{]}. Another complication is that
+%D strings may contain characters that normally have a
+%D special meaning in \TEX, like \type{$} and \type{{}}.
+%D
+%D A previous solution made \type{\} an active character and
+%D let it look ahead for a number or character. W ehad to
+%D abandon this scheme because of the need for verbatim
+%D support. The next solution involved some \CATCODE\
+%D trickery but works well.
+
+\def\octalMPcharacter#1#2#3%
+ {\char'#1#2#3\relax}
+
+\bgroup
+\catcode`\|=\@@comment
+\catcode`\%=\@@active
+\catcode`\[=\@@active
+\catcode`\]=\@@active
+\catcode`\{=\@@active
+\catcode`\}=\@@active
+\catcode`B=\@@begingroup
+\catcode`E=\@@endgroup
+\gdef\ignoreMPspecials|
+ B\def%BE|
+ \def[BE|
+ \def]BE|
+ \def{BE|
+ \def}BEE
+\gdef\obeyMPspecials|
+ B\def%B\char 37\relax E|
+ \def[B\char 91\relax E|
+ \def]B\char 93\relax E|
+ \def{B\char123\relax E|
+ \def}B\char125\relax EE
+\gdef\setMPspecials|
+ B\catcode`\%=\@@active
+ \catcode`\[=\@@active
+ \catcode`\]=\@@active
+ \catcode`\{=\@@active
+ \catcode`\}=\@@active
+ \catcode`\$=\@@letter
+ \catcode`\_=\@@letter
+ \catcode`\#=\@@letter
+ \catcode`\^=\@@letter
+ \catcode`\&=\@@letter
+ \catcode`\|=\@@letter
+ \catcode`\~=\@@letter
+ \def\(B\char40\relax E|
+ \def\)B\char41\relax E|
+ \def\\B\char92\relax E|
+ \def\0B\octalMPcharacter0E|
+ \def\1B\octalMPcharacter1E|
+ \def\2B\octalMPcharacter2E|
+ \def\3B\octalMPcharacter3E|
+ \def\4B\octalMPcharacter4E|
+ \def\5B\octalMPcharacter5E|
+ \def\6B\octalMPcharacter6E|
+ \def\7B\octalMPcharacter7E|
+ \def\8B\octalMPcharacter8E|
+ \def\9B\octalMPcharacter9EE
+\egroup
+
+%D We use the comment symbol as a sort of trigger:
+
+\bgroup
+\catcode`\%=\@@active
+\gdef\startMPscanning{\let%=\startMPconversion}
+\egroup
+
+%D In earlier versions we used the sequence
+%D
+%D \starttypen
+%D \expandafter\handleMPsequence\input filename\relax
+%D \stoptypen
+%D
+%D Persistent problems in \LATEX\ however forced us to use a
+%D different scheme. Every \POSTSCRIPT\ file starts with a
+%D \type{%}, so we temporary make this an active character
+%D that starts the scanning and redefines itself. (The problem
+%D originates in the redefinition by \LATEX\ of the
+%D \type{\input} primitive.)
+
+\def\startMPconversion%
+ {\catcode`\%=\@@ignore
+ \ignoreMPspecials
+ \handleMPsequence}
+
+%D Here comes the main loop. Most arguments are numbers. This
+%D means that they can be recognized by their \type{\lccode}.
+%D This method saves a lot of processing time. We could
+%D speed up the conversion by handling the \type{path}
+%D seperately.
+
+\def\dohandleMPsequence#1#2 %
+ {\ifnum\lccode`#1=0
+ \setMPargument{#1#2}%
+ \else
+ \edef\somestring{#1#2}%
+ \ifx\somestring\PSmoveto
+ \edef\lastMPmoveX{\gMPa1}%
+ \edef\lastMPmoveY{\gMPa2}%
+ \pdfliteral{\gMPa1 \gMPa2 m}%
+ \resetMPstack
+ \else\ifx\somestring\PSnewpath
+ \let\handleMPsequence=\handleMPpath
+ \else\ifx\somestring\PSgsave
+ \pdfliteral{q}%
+ \resetMPstack
+ \else\ifx\somestring\PSgrestore
+ \pdfliteral{Q}%
+ \resetMPstack
+ \else\ifx\somestring\PSdtransform % == setlinewidth
+ \let\handleMPsequence=\handleMPdtransform
+ \else\ifx\somestring\PSconcat
+ \pdfliteral{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetrgbcolor
+ \pdfliteral{\gMPa1 \gMPa2 \gMPa3 rg \gMPa1 \gMPa2 \gMPa3 RG}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetgray
+ \pdfliteral{\gMPa1 g \gMPa1 G}%
+ \resetMPstack
+ \else\ifx\somestring\PStranslate
+ \pdfliteral{1 0 0 1 \gMPa1 \gMPa2 cm}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetdash
+ \handleMPsetdash
+ \resetMPstack
+ \else\ifx\somestring\PSsetlinejoin
+ \pdfliteral{\gMPa1 j}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetmiterlimit
+ \pdfliteral{\gMPa1 M}%
+ \resetMPstack
+ \else\ifx\somestring\PSfshow
+ \handleMPfshow
+ \resetMPstack
+ \else\ifx\somestring\PSsetlinecap
+ \pdfliteral{\gMPa1 J}%
+ \resetMPstack
+ \else\ifx\somestring\PSrlineto
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space l S}%
+ \resetMPstack
+ \else\ifx\somestring\PSscale
+ \pdfliteral{\gMPa1 0 0 \gMPa2 0 0 cm}%
+ \resetMPstack
+ \else
+ \handleMPgraphic{#1#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \handleMPsequence}
+
+%D Beginning and ending the graphics is taken care of by the
+%D macro \type{\handleMPgraphic}, which is redefined when
+%D the first graphics operator is met.
+
+\def\handleMPendgraphic#1%
+ {\ifx\somestring\PSshowpage
+ \let\handleMPsequence=\finishMPgraphic
+ \else
+ \setMPargument{#1}%
+ \fi}
+
+\def\handleMPbegingraphic#1%
+ {\ifx\somestring\PSBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSHiResBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSExactBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSPage
+ \let\handleMPsequence=\handleMPpage
+ \else
+ \setMPargument{#1}%
+ \fi\fi\fi\fi}
+
+\let\handleMPgraphic=\handleMPbegingraphic
+
+%D We check for three kind of bounding boxes: the normal one
+%D and two high precission ones:
+%D
+%D \starttypen
+%D BoundingBox: llx lly ucx ucy
+%D HiResBoundingBox: llx lly ucx ucy
+%D ExactBoundingBox: llx lly ucx ucy
+%D \stoptypen
+%D
+%D The dimensions are saved for later use.
+
+\def\handleMPboundingbox #1 #2 #3 #4
+ {\dimen0=#1pt\dimen0=-\MPxscale\dimen0
+ \dimen2=#2pt\dimen2=-\MPyscale\dimen2
+ \xdef\MPxoffset{\withoutpt{\the\dimen0}}%
+ \xdef\MPyoffset{\withoutpt{\the\dimen2}}%
+ \dimen0=#1bp\dimen0=-\dimen0
+ \dimen2=#2bp\dimen2=-\dimen2
+ \advance\dimen0 by #3bp
+ \dimen0=\MPxscale\dimen0
+ \xdef\MPwidth{\the\dimen0}%
+ \advance\dimen2 by #4bp
+ \dimen2=\MPyscale\dimen2
+ \xdef\MPheight{\the\dimen2}%
+ \nofMParguments=0
+ \let\handleMPsequence=\dohandleMPsequence
+ \handleMPsequence}
+
+%D We use the \type{page} comment as a signal that
+%D stackbuilding can be started.
+
+\def\handleMPpage #1 #2
+ {\nofMParguments=0
+ \let\handleMPsequence=\dohandleMPsequence
+ \handleMPsequence}
+
+%D \METAPOST\ draws it dots by moving to a location and
+%D invoking \type{0 0 rlineto}. This operator is not
+%D available in \PDF. Our solution is straightforward: we draw
+%D a line from $(current\_x, current\_y)$ to itself. This
+%D means that the arguments of the preceding \type{moveto} have
+%D to be saved.
+
+\def\lastMPmoveX{0}
+\def\lastMPmoveY{0}
+
+%D These saved coordinates are also used when we handle the
+%D texts. Text handling proved to be a bit of a nuisance, but
+%D finaly I saw the light. It proved that we also had to
+%D take care of \type{(split arguments)}.
+
+\def\handleMPfshow%
+ {\setbox0=\hbox
+ {\obeyMPspecials
+ \edef\size{\gMPa{\the\nofMParguments} }%
+ \advance\nofMParguments by -1
+ \font\temp=\gMPa{\the\nofMParguments} at \size bp
+ \advance\nofMParguments by -1
+ \temp
+ \ifnum\nofMParguments=1
+ \def\do(##1){##1}%
+ \gMPa1%
+ \else
+ \scratchcounter=1
+ \def\do(##1{##1}%
+ \gMPa{\the\scratchcounter}\space
+ \def\do{}%
+ \loop
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\nofMParguments
+ \gMPa{\the\scratchcounter}\space
+ \repeat
+ \def\do##1){##1}%
+ \gMPa{\the\scratchcounter}%
+ \fi
+ \unskip}%
+ \dimen0=\lastMPmoveY bp
+ \advance\dimen0 by \ht0
+ \ScaledPointsToBigPoints{\number\dimen0}\lastMPmoveY
+ \pdfliteral{n q 1 0 0 1 \lastMPmoveX\space\lastMPmoveY\space cm}%
+ \dimen0=\ht0
+ \advance\dimen0 by \dp0
+ \box0
+ \vskip-\dimen0
+ \pdfliteral{Q}}
+
+%D Most operators are just converted and keep their
+%D arguments. Dashes however need a bit different treatment,
+%D otherwise \PDF\ viewers complain loudly. Another
+%D complication is that one argument comes after the \type{]}.
+%D When reading the data, we simple ignore the array boundary
+%D characters. We save ourselves some redundant newlines and
+%D at the same time keep the output readable by packing the
+%D literals.
+
+\def\handleMPsetdash%
+ {\bgroup
+ \def\somestring{[}%
+ \scratchcounter=1
+ \loop
+ \ifnum\scratchcounter<\nofMParguments
+ \edef\somestring{\somestring\space\gMPa{\the\scratchcounter}}%
+ \advance\scratchcounter by 1
+ \repeat
+ \edef\somestring{\somestring]\gMPa{\the\scratchcounter} d}%
+ \pdfliteral{\somestring}%
+ \egroup}
+
+%D The \type{setlinewidth} commands look a bit complicated. There are
+%D two alternatives, that alsways look the same. As John Hobby
+%D says:
+%D
+%D \startsmaller
+%D \starttypen
+%D x 0 dtransform exch truncate exch idtransform pop setlinewidth
+%D 0 y dtransform truncate idtransform setlinewidth pop
+%D \stoptypen
+%D
+%D These are just fancy versions of \type{x setlinewidth} and
+%D \type{y setlinewidth}. The \type{x 0 ...} form is used if
+%D the path is {\em primarily vertical}. It rounds the width
+%D so that vertical lines come out an integer number of pixels
+%D wide in device space. The \type{0 y ...} form does the same
+%D for paths that are {\em primarily horizontal}. The reason
+%D why I did this is Knuth insists on getting exactly the
+%D widths \TEX\ intends for the horizontal and vertical rules
+%D in \type{btex...etex} output. (Note that PostScript scan
+%D conversion rules cause a horizontal or vertical line of
+%D integer width $n$ in device space to come out $n+1$ pixels
+%D wide, regardless of the phase relative to the pixel grid.)
+%D \stopsmaller
+%D
+%D The common operator in these sequences is \type{dtransform},
+%D so we can use this one to trigger setting the linewidth.
+
+\def\handleMPdtransform%
+ {\ifdim\gMPa1pt>\!!zeropoint
+ \pdfliteral{\gMPa1 w}%
+ \def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}%
+ \else
+ \pdfliteral{\gMPa2 w}%
+ \def\next##1 ##2 ##3 ##4 {\handleMPsequence}%
+ \fi
+ \let\handleMPsequence=\dohandleMPsequence
+ \resetMPstack
+ \next}
+
+%D The most complicated command is \type{concat}. \METAPOST\
+%D applies this operator to \type{stoke}. At that moment the
+%D points set by \type{curveto} and \type{moveto}, are already
+%D fixed. In \PDF\ however the \type{cm} operator affects the
+%D points as well as the pen (stroke). Like more \PDF\
+%D operators, \type{cm} is a defined in a bit ambiguous way.
+%D The only save route for non||circular penshapes, is saving
+%D teh path, recalculating the points and applying the
+%D transformation matrix in such a way that we can be sure
+%D that its behavior is well defined. This comes down to
+%D inverting the path and applying \type{cm} to that path as
+%D well as the pen. This all means that we have to save the
+%D path.
+
+%D In \METAPOST\ there are three ways to handle a path $p$:
+%D
+%D \starttypen
+%D draw p; fill p; filldraw p;
+%D \stoptypen
+%D
+%D The last case outputs a \type{gsave fill grestore} before
+%D \type{stroke}. Handling the path outside the main loops
+%D saves about 40\% run time.\voetnoot{We can save some more by
+%D following the \METAPOST\ output routine, but for the moment
+%D we keep things simple.} Switching between the main loop and
+%D the path loop is done by means of the recursely called
+%D macro \type{\handleMPsequence}.
+
+\def\handleMPpath%
+ {\chardef\finiMPpath=0
+ \let\closeMPpath=\relax
+ \let\flushMPpath=\flushnormalMPpath
+ \resetMPstack
+ \nofMPsegments=1
+ \let\handleMPsequence=\dohandleMPpath
+ \dohandleMPpath}
+
+%D Most paths are drawn with simple round pens. Therefore we've
+%D split up the routinein two.
+
+\def\flushnormalMPpath%
+ {\scratchcounter=\nofMPsegments
+ \nofMPsegments=1
+ \loop
+ \expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
+ \pdfliteral{\gMPs1 \gMPs2 l}%
+ \or
+ \pdfliteral{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 c}%
+ \or
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space l S}%
+ \or
+ \edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space m}%
+ \fi
+ \advance\nofMPsegments by 1\relax
+ \ifnum\nofMPsegments<\scratchcounter
+ \repeat}
+
+\def\flushconcatMPpath%
+ {\scratchcounter=\nofMPsegments
+ \nofMPsegments=1
+ \loop
+ \expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b
+ \pdfliteral{\a\space \b\space l}%
+ \or
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b
+ \doMPconcat{\gMPs3}\c{\gMPs4}\d
+ \doMPconcat{\gMPs5}\e{\gMPs6}\f
+ \pdfliteral{\a\space \b\space \c\space \d\space \e\space \f\space c}%
+ \or
+ \bgroup
+ \noMPtranslate
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b
+ \pdfliteral{\a\space \b\space l S}%
+ \egroup
+ \or
+ \edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b
+ \pdfliteral{\a\space \b\space m}%
+ \fi
+ \advance\nofMPsegments by 1\relax
+ \ifnum\nofMPsegments<\scratchcounter
+ \repeat}
+
+%D The transformation of the coordinates is handled by one of
+%D the macros Tanmoy posted to the \PDFTEX\ mailing list.
+%D I rewrote and optimized the original macro to suit the other
+%D macros in this module.
+%D
+%D \starttypen
+%D \doMPconcat {x position} \xresult {y position} \yresult
+%D \stoptypen
+%D
+%D
+%D By setting the auxiliary \DIMENSIONS\ \type{\dimen0} upto
+%D \type{\dimen10} only once per path, we save over 20\% run
+%D time. Some more speed was gained by removing some parameter
+%D passing. These macros can be optimized a bit more by using
+%D more constants. There is however not much need for further
+%D optimization because penshapes usually are round and
+%D therefore need no transformation. Nevertheless we move the
+%D factor to the outer level and use bit different \type{pt}
+%D removal macro. Although the values represent base points,
+%D we converted them to pure points, simply because those can
+%D be converted back.
+
+\def\MPconcatfactor{256}
+
+\def\doMPreducedimen#1
+ {\count0=\MPconcatfactor
+ \advance\dimen#1 \ifdim\dimen#1>\!!zeropoint .5\else -.5\fi\count0
+ \divide\dimen#1 \count0\relax}
+
+\def\doMPexpanddimen#1
+ {\multiply\dimen#1 \MPconcatfactor\relax}
+
+\def\presetMPconcat%
+ {\dimen 0=\gMPs1 pt \doMPreducedimen 0 % r_x
+ \dimen 2=\gMPs2 pt \doMPreducedimen 2 % s_x
+ \dimen 4=\gMPs3 pt \doMPreducedimen 4 % s_y
+ \dimen 6=\gMPs4 pt \doMPreducedimen 6 % r_y
+ \dimen 8=\gMPs5 pt \doMPreducedimen 8 % t_x
+ \dimen10=\gMPs6 pt \doMPreducedimen10 } % t_y
+
+\def\noMPtranslate% use this one grouped
+ {\dimen 8=\!!zeropoint % t_x
+ \dimen10=\!!zeropoint} % t_y
+
+\def\doMPconcat#1#2#3#4%
+ {\dimen12=#1 pt \doMPreducedimen12 % p_x
+ \dimen14=#3 pt \doMPreducedimen14 % p_y
+ %
+ \dimen16 \dimen 0
+ \multiply \dimen16 \dimen 6
+ \dimen20 \dimen 2
+ \multiply \dimen20 \dimen 4
+ \advance \dimen16 -\dimen20
+ %
+ \dimen18 \dimen12
+ \multiply \dimen18 \dimen 6
+ \dimen20 \dimen14
+ \multiply \dimen20 \dimen 4
+ \advance \dimen18 -\dimen20
+ \dimen20 \dimen 4
+ \multiply \dimen20 \dimen10
+ \advance \dimen18 \dimen20
+ \dimen20 \dimen 6
+ \multiply \dimen20 \dimen 8
+ \advance \dimen18 -\dimen20
+ %
+ \multiply \dimen12 -\dimen 2
+ \multiply \dimen14 \dimen 0
+ \advance \dimen12 \dimen14
+ \dimen20 \dimen 2
+ \multiply \dimen20 \dimen 8
+ \advance \dimen12 \dimen20
+ \dimen20 \dimen 0
+ \multiply \dimen20 \dimen10
+ \advance \dimen12 -\dimen20
+ %
+ \doMPreducedimen16
+ \divide \dimen18 \dimen16 \doMPexpanddimen18
+ \divide \dimen12 \dimen16 \doMPexpanddimen12
+ %
+ \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
+ \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+
+%D The following explanation of the conversion process was
+%D posted to the \PDFTEX\ mailing list by Tanmoy. The original
+%D macro was part of a set of macro's that included sinus and
+%D cosinus calculation as well as scaling and translating. The
+%D \METAPOST\ to \PDF\ conversion however only needs
+%D transformation.
+
+%D \start \switchnaarkorps [ss]
+%D
+%D Given a point $(U_x, U_y)$ in user coordinates, the business
+%D of \POSTSCRIPT\ is to convert it to device space. Let us say
+%D that the device space coordinates are $(D_x, D_y)$. Then, in
+%D \POSTSCRIPT\ $(D_x, D_y)$ can be written in terms of
+%D $(U_x, U_y)$ in matrix notation, either as
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{D_x&D_y&1\cr} = \pmatrix{U_x&U_y&1\cr}
+%D \pmatrix{s_x&r_x&0\cr
+%D r_y&s_y&0\cr
+%D t_x&t_y&1\cr}
+%D \stopformule
+%D
+%D or
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{D_x\cr D_y\cr 1} = \pmatrix{s_x&r_y&t_x\cr
+%D r_x&s_y&t_y\cr
+%D 0 &0 &1 \cr}
+%D \pmatrix{U_x\cr
+%D U_y\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D both of which is a shorthand for the same set of equations:
+%D
+%D \plaatsformule
+%D \startformule
+%D D_x = s_x U_x + r_y U_y + t_x
+%D \stopformule
+%D
+%D \plaatsformule
+%D \startformule
+%D D_y = r_x U_x + s_y U_y + t_y
+%D \stopformule
+%D
+%D which define what is called an `affine transformation'.
+%D
+%D \POSTSCRIPT\ represents the `transformation matrix' as a
+%D six element matrix instead of a $3\times 3$ array because
+%D three of the elements are always~0, 0 and~1. Thus the above
+%D transformation is written in postscript as $[s_x\, r_x\,
+%D r_y\, s_y\, t_x\, t_y]$. However, when doing any
+%D calculations, it is useful to go back to the original
+%D matrix notation (whichever: I will use the second) and
+%D continue from there.
+%D
+%D As an example, if the current transformation matrix is
+%D $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$ and you say \typ{[a b
+%D c d e f] concat}, this means:
+%D
+%D \startsmaller
+%D Take the user space coordinates and transform them to an
+%D intermediate set of coordinates using array $[a\, b\, c\, d\,
+%D e\, f]$ as the transformation matrix.
+%D
+%D Take the intermediate set of coordinates and change them to
+%D device coordinates using array $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$
+%D as the transformation matrix.
+%D \stopsmaller
+%D
+%D Well, what is the net effect? In matrix notation, it is
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{I_x\cr I_y\cr 1\cr} = \pmatrix{a&c&e\cr
+%D b&d&f\cr
+%D 0&0&1\cr}
+%D \pmatrix{U_x\cr
+%D U_y\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{D_y\cr D_y\cr 1\cr} = \pmatrix{s_x&r_y&t_x\cr
+%D r_x&s_y&t_y\cr
+%D 0 &0 &1 \cr}
+%D \pmatrix{I_x\cr
+%D I_y\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D where $(I_x, I_y)$ is the intermediate coordinate.
+%D
+%D Now, the beauty of the matrix notation is that when there is
+%D a chain of such matrix equations, one can always compose
+%D them into one matrix equation using the standard matrix
+%D composition law. The composite matrix from two matrices can
+%D be derived very easily: the element in the $i$\hoog{th}
+%D horizontal row and $j$\hoog{th} vertical column is
+%D calculated by`multiplying' the $i$\hoog{th} row of the first
+%D matrix and the $j$\hoog{th} column of the second matrix (and
+%D summing over the elements). Thus, in the above:
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{D_x\cr D_y\cr 1} = \pmatrix{s_x^\prime&r_y^\prime&t_x^\prime\cr
+%D r_x^\prime&s_y^\prime&t_y^\prime\cr
+%D 0 &0 &0 \cr}
+%D \pmatrix{U_x\cr
+%D U_y\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D with
+%D
+%D \plaatsformule
+%D \startformule
+%D \eqalign
+%D {s_x^\prime & = s_x a + r_y b \cr
+%D r_x^\prime & = r_x a + s_y b \cr
+%D r_y^\prime & = s_x c + r_y d \cr
+%D s_y^\prime & = r_x c + s_y d \cr
+%D t_x^\prime & = s_x e + r_y f + t_x \cr
+%D t_y^\prime & = r_x e + s_y f + t_y \cr}
+%D \stopformule
+
+%D In fact, the same rule is true not only when one is going
+%D from user coordinates to device coordinates, but whenever
+%D one is composing two `transformations' together
+%D (transformations are `associative'). Note that the formula
+%D is not symmetric: you have to keep track of which
+%D transformation existed before (i.e.\ the equivalent of
+%D $[s_x\, r_x\, r_y\, s_y\, t_x\, t_y]$) and which was
+%D specified later (i.e.\ the equivalent of $[a\, b\, c\, d\,
+%D e\, f]$). Note also that the language can be rather
+%D confusing: the one specified later `acts earlier',
+%D converting the user space coordinates to intermediate
+%D coordinates, which are then acted upon by the pre||existing
+%D transformation. The important point is that order of
+%D transformation matrices cannot be flipped (transformations
+%D are not `commutative').
+%D
+%D Now what does it mean to move a transformation matrix
+%D before a drawing? What it means is that given a point
+%D $(P_x, P_y)$ we need a different set of coordinates
+%D $(P_x^\prime, P_y^\prime)$ such that if the transformation
+%D acts on $(P_x^\prime, P_y^\prime)$, they produce $(P_x,
+%D P_y)$. That is we need to solve the set of equations:
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{P_x\cr P_y\cr 1\cr} = \pmatrix{s_x&r_y&t_x\cr
+%D r_x&s_y&t_y\cr
+%D 0 &0 &1 \cr}
+%D \pmatrix{P_x^\prime\cr
+%D P_y^\prime\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D Again matrix notation comes in handy (i.e. someone has
+%D already solved the problem for us): we need the inverse
+%D transformation matrix. The inverse transformation matrix can
+%D be calculated very easily: it is
+%D
+%D \plaatsformule
+%D \startformule
+%D \pmatrix{P_x^\prime\cr P_y^\prime\cr 1\cr} =
+%D \pmatrix{s_x^\prime&r_y^\prime&t_x^\prime\cr
+%D r_x^\prime&s_y^\prime&t_y^\prime\cr
+%D 0 &0 &1 \cr}
+%D \pmatrix{P_x\cr
+%D P_y\cr
+%D 1 \cr}
+%D \stopformule
+%D
+%D where, the inverse transformation matrix is given by
+%D
+%D \plaatsformule
+%D \startformule
+%D \eqalign
+%D {D & = s_x s_y - r_x r_y \cr
+%D s_x^\prime & = s_y / D \cr
+%D s_y^\prime & = s_x / D \cr
+%D r_x^\prime & = - r_x / D \cr
+%D r_y^\prime & = - r_y / D \cr
+%D t_x^\prime & = ( - s_y t_x + r_y t_y ) / D \cr
+%D t_y^\prime & = ( r_x t_x - s_x t_y ) / D \cr}
+%D \stopformule
+%D
+%D And you can see that when expanded out, this does
+%D give the formulas:
+%D
+%D \plaatsformule
+%D \startformule
+%D P_x^\prime = { { s_y(p_x-t_x) + r_y(t_y-p_y) } \over
+%D { s_x*s_y-r_x*r_y } }
+%D \stopformule
+%D
+%D \plaatsformule
+%D \startformule
+%D P_y^\prime = { { s_x(p_y-t_y) + r_x(t_x-p_x) } \over
+%D { s_x*s_y-r_x*r_y } }
+%D \stopformule
+%D
+%D The code works by representing a real number by converting
+%D it to a dimension to be put into a \DIMENSION\ register: 2.3 would
+%D be represented as 2.3pt for example. In this scheme,
+%D multiplying two numbers involves multiplying the \DIMENSION\
+%D registers and dividing by 65536. Accuracy demands that the
+%D division be done as late as possible, but overflow
+%D considerations need early division.
+%D
+%D Division involves dividing the two \DIMENSION\ registers and
+%D multiplying the result by 65536. Again, accuracy would
+%D demand that the numerator be multiplied (and|/|or the
+%D denominator divided) early: but that can lead to overflow
+%D which needs to be avoided.
+%D
+%D If nothing is known about the numbers to start with (in
+%D concat), I have chosen to divide the 65536 as a 256 in each
+%D operand. However, in the series calculating the sine and
+%D cosine, I know that the terms are small (because I never
+%D have an angle greater than 45 degrees), so I chose to
+%D apportion the factor in a different way.
+%D
+%D \stop
+%D
+%D The path is output using the values saved on the stack. If
+%D needed, all coordinates are recalculated.
+
+\def\processMPpath%
+ {\flushMPpath
+ \closeMPpath
+ \pdfliteral{\ifcase\finiMPpath W n\or S\or f\or B\fi}%
+ \let\handleMPsequence=\dohandleMPsequence
+ \resetMPstack
+ \nofMPsegments=0
+ \handleMPsequence}
+
+%D In \PDF\ the \type{cm} operator must precede the path
+%D specification. We therefore can output the \type{cm} at
+%D the moment we encounter it.
+
+\def\handleMPpathconcat%
+ {\presetMPconcat
+ \pdfliteral{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 cm}%
+ \resetMPstack}
+
+%D This macro interprets the path and saves it as compact as
+%D possible.
+
+\def\dohandleMPpath#1#2 %
+ {\ifnum\lccode`#1=0
+ \setMPargument{#1#2}%
+ \else
+ \def\somestring{#1#2}%
+ \ifx\somestring\PSlineto
+ \setMPkeyword0
+ \else\ifx\somestring\PScurveto
+ \setMPkeyword1
+ \else\ifx\somestring\PSrlineto
+ \setMPkeyword2
+ \else\ifx\somestring\PSmoveto
+ \setMPkeyword3
+ \else\ifx\somestring\PSclip
+ \let\handleMPsequence=\processMPpath
+ \else\ifx\somestring\PSgsave
+ \chardef\finiMPpath=3
+ \else\ifx\somestring\PSgrestore
+ \else\ifx\somestring\PSfill
+ \ifnum\finiMPpath=0
+ \chardef\finiMPpath=2
+ \let\handleMPsequence=\processMPpath
+ \fi
+ \else\ifx\somestring\PSstroke
+ \ifnum\finiMPpath=0
+ \chardef\finiMPpath=1
+ \fi
+ \let\handleMPsequence=\processMPpath
+ \else\ifx\somestring\PSclosepath
+ \def\closeMPpath{\pdfliteral{h}}%
+ \else\ifx\somestring\PSconcat
+ \let\flushMPpath=\flushconcatMPpath
+ \handleMPpathconcat
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \handleMPsequence}
+
+%D The main conversion command is
+%D
+%D \starttypen
+%D \convertMPtoPDF {filename} {x scale} {y scale}
+%D \stoptypen
+%D
+%D The dimensions are derived from the bounding box. So we
+%D only have to say:
+%D
+%D \starttypen
+%D \convertMPtoPDF{mp-pra-1.eps}{1}{1}
+%D \convertMPtoPDF{mp-pra-1.eps}{.5}{.5}
+%D \stoptypen
+
+\def\convertMPtoPDF#1#2#3%
+ {\bgroup
+ \message{[MP to PDF #1]}%
+ \setMPspecials
+ \startMPscanning
+ \def\do{}%
+ \edef\MPxscale{#2}%
+ \edef\MPyscale{#3}%
+ \setbox0=\vbox\bgroup
+ \forgetall
+ \offinterlineskip
+ \pdfliteral{q}%
+ \let\handleMPsequence=\dohandleMPsequence
+ \catcode`\^^M=\@@endofline
+ \input #1\relax}
+
+\def\finishMPgraphic%
+ {\pdfliteral{Q}%
+ \egroup
+ \wd0=\MPwidth
+ \vbox to \MPheight
+ {\forgetall
+ \vfill
+ \pdfliteral{q \MPxscale\space 0 0 \MPyscale\space
+ \MPxoffset\space \MPyoffset\space cm}%
+ \box0
+ \pdfliteral{Q}}%
+ \egroup}
+
+%D This kind of conversion is possible because \METAPOST\
+%D does all the calculations. Converting other \POSTSCRIPT\
+%D files would drive both me and \TEX\ crazy.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-spe.tex b/tex/context/base/supp-spe.tex new file mode 100644 index 000000000..568a9e5e2 --- /dev/null +++ b/tex/context/base/supp-spe.tex @@ -0,0 +1,166 @@ +%D \module
+%D [ file=supp-spe,
+%D version=1997.07.05,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Specials,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\unprotect
+
+%D This module implements some \type{\special} manipulation
+%D macros. I needed these when I implemented the code that
+%D handles the conversion of \TPIC\ specials to \PDF\ code.
+
+\writestatus{loading}{Context Support Macros / Specials}
+
+%D When interpreting specials we need to do some basic scanning.
+%D For the moment we distinguish between three cases. We need
+%D
+%D \starttypen
+%D \special{tag: arguments}
+%D \special{tag arguments}
+%D \special{tag}
+%D \stoptypen
+%D
+%D We cannot be sure that the first case isn't
+%D
+%D \starttypen
+%D \special{tag:arguments}
+%D \stoptypen
+%D
+%D So we have to take care of that one too.
+
+%D \macros
+%D {redefinespecial}
+%D
+%D Specials that are to be interpreted are defined with
+%D commands like:
+%D
+%D \startbuffer[tmp-1]
+%D \redefinespecial a: \using#1\endspecial%
+%D {let's execute special 'a:' using '#1'}
+%D
+%D \redefinespecial a \using#1\endspecial%
+%D {let's execute special 'a' using '#1'}
+%D
+%D \redefinespecial a \using#1\endspecial%
+%D {let's execute special 'a' using nothing}
+%D \stopbuffer
+%D
+%D \typebuffer[tmp-1]
+%D
+%D The first two always take an argument, the last one not.
+%D The definition of this redefinition macro is not that
+%D complex. The names are internally tagged with \type{\@rds@}
+%D which saves both time and space.
+
+\def\@rds@{@rds@}
+
+\def\redefinespecial #1 %
+ {\setvalue{\@rds@#1}}
+
+%D \macros
+%D {mimmickspecials}
+%D
+%D Mimmicking specials is activated by saying:
+%D
+%D \starttypen
+%D \mimmickspecials
+%D \stoptypen
+%D
+%D This commands redefines the \PLAIN\ \TEX\ primitive
+%D \type{\special}.
+
+\def\mimmickspecials%
+ {\let\special=\domimmickspecial}
+
+%D The special mimmicking macro first looks if it can find an
+%D colon terminated tag, next it searches for a tag that end
+%D with a space. If both cannot find, the tag itself is treated
+%D without argument.
+
+\def\domimmickspecial#1%
+ {\domimmickcolonspecial#1:\relax/:\relax/\end}
+
+\def\domimmickcolonspecial#1:#2#3:\relax/#4\end%
+ {\ifx#2\relax
+ \domimmickspacespecial#1 \relax/ \relax/\end
+ \else
+ \dodomimmickspecial#1:\using#2#3\endspecial
+ \fi}
+
+\def\domimmickspacespecial#1 #2#3 \relax/#4\end%
+ {\ifx#2\relax
+ \dodomimmickspecial#1\using\endspecial
+ \else
+ \dodomimmickspecial#1\using#2#3\endspecial
+ \fi}
+
+\def\dodomimmickspecial#1\using#2\endspecial%
+ {\expandafter\ifx\csname\@rds@#1\endcsname\relax % \doifdefinedelse
+ \defaultspecial{#2}%
+ \else
+ %\message{[mimmick special #1 with #2#3]}%
+ \getvalue{\@rds@#1}\using#2\endspecial
+ \fi}
+
+%D Now let's show that things work the way we want, using the
+%D previous definitions of tag~a.
+%D
+%D \startbuffer[tmp-2]
+%D \mimmickspecials
+%D \special{a: 1 2 3 4 5}
+%D \special{a: 1 2 3 4 5}
+%D \special{a}
+%D \stopbuffer
+%D
+%D \typebuffer[tmp-2]
+%D
+%D Which results in:
+%D
+%D \startregels
+%D \haalbuffer[tmp-1]
+%D \haalbuffer[tmp-2]
+%D \stopregels
+
+%D \macros
+%D {mimmickspecial}
+%D
+%D When needed, one can call a mimmicked special directly by
+%D saying for instance:
+%D
+%D \starttypen
+%D \mimmickspecial a: \using...\endspecial
+%D \stoptypen
+%D
+%D This can be handy when specials have much in common.
+
+\def\mimmickspecial #1 %
+ {\getvalue{\@rds@#1}}
+
+%D \macros
+%D {normalspecial,defaultspecial}
+%D
+%D Unknown specials are passed to the default special handler.
+%D One can for instance ignore all further specials by saying
+%D \type{\normalspecial}:
+%D
+%D \starttypen
+%D \def\defaultspecial#1{\normalspecial}
+%D \stoptypen
+%D
+%D But here we default to idle.
+
+\let\normalspecial =\special
+\let\defaultspecial=\special
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-tpi.tex b/tex/context/base/supp-tpi.tex new file mode 100644 index 000000000..134139e6c --- /dev/null +++ b/tex/context/base/supp-tpi.tex @@ -0,0 +1,339 @@ +%D \module
+%D [ file=supp-tpi,
+%D version=1997.07.05,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\TPIC\ Conversion,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D This modules implements the conversion of graphic \TPIC\
+%D specials using \METAPOST.
+%D
+%D We reimplement the \TPIC\ specials using the special
+%D mimmicking mechanism implemented in the support module
+%D \type{supp-spe} as well as the \METAPOST\ run||time support
+%D implemented in \type{supp-mps}.
+
+\ifx\undefined\writestatus \input supp-mis \relax \fi
+\ifx\undefined\mimmickspecials \input supp-spe \relax \fi
+\ifx\undefined\MPgraphic \input supp-mps \relax \fi
+
+\writestatus{loading}{Context Support Macros / TPIC Conversion}
+
+%D Beware: we haven't activated both mechanism yet. This is
+%D to be done in the calling module.
+
+\unprotect
+
+%D When we want to mimmick \TPIC\ specials in \PDFTEX, we need
+%D to map its graphic primitives into \PDF\ ones. The main
+%D problem in doing so is that \PDF\ does not support b-splines
+%D directly and also does not offer us something to draw arcs.
+%D Of course all this scan be implemented in \TEX, and the
+%D first implementation of this module did so, but the results
+%D were not that satisfying. Not having used these specials
+%D before, I had for instance to find out that the \TPIC\
+%D specials were not that unambiguesly defined.
+%D
+%D Then, while discussing something else, Sebastian Ratz told
+%D me that the Web2c implementation that \PDFTEX\ is base upon,
+%D offers some rather discutable, but nevertheless handy
+%D feature:
+%D
+%D \starttypen
+%D \write18{execute program with arguments}
+%D \stoptypen
+%D
+%D Knowing this, I immediatelly decided to throw away the old
+%D conversion macros and use the marvelous \METAPOST, \TEX\
+%D related, drawing program to do the conversion in as high a
+%D quality as possible.
+%D
+%D implementation we're going to present here, not only uses
+%D for drawing purposes, but also uses the more efficient
+%D \METAPOST\ features to store the path.
+%D
+%D \in{Table}[tab:TPIC specials] lists the \TPIC\ specials as
+%D mentioned in the \LATEX\ Graphics Companion and the
+%D relevant part of the \DVIPS\ source. This list shows us
+%D that we have to store the path before we can use it, simply
+%D because we don't know in advance what actions to apply on
+%D it.
+%D
+%D \plaatstabel[hier][tab:TPIC specials]{The \TPIC\ special syntax.}
+%D \starttabel[|||l|]
+%D \HL
+%D \NC \bf tag \NC \bf arguments \NC \bf meaning \NC\SR
+%D \HL
+%D \NC pn \NC $w$ \NC set linewidth \NC\FR
+%D \NC pa \NC $x$ $y$ \NC add point to path \NC\MR
+%D \NC fp \NC \NC draw/fill path \NC\MR
+%D \NC ip \NC \NC fill path \NC\MR
+%D \NC da \NC $l$ \NC draw dashed path \NC\MR
+%D \NC dt \NC $l$ \NC draw doted path \NC\MR
+%D \NC sp \NC $d$ \NC draw spline \NC\MR
+%D \NC ar \NC $x$ $y$ $r_x$ $r_y$ $b$ $e$ \NC draw (partial) arc \NC\MR
+%D \NC ia \NC $x$ $y$ $r_x$ $r_y$ $b$ $e$ \NC fill (partial) arc \NC\MR
+%D \NC sh \NC $s$ \NC fill next path \NC\LR
+%D \HL
+%D \stoptabel
+
+%D The first problem we have to take care of is the fact that
+%D there is no decent begin or end of the drawing process
+%D defined. We can however be quite sure that writers of
+%D packages using these specials will put them into a box,
+%D simply because else this is the most common used way to
+%D treat something \TEX\ as as a whole, like:
+%D
+%D \starttypen
+%D \hbox{\special{}\special{}...}
+%D \stoptypen
+%D
+%D We just start a picture as soon as the first special is
+%D encountered, so this becomes:
+%D
+%D \starttypen
+%D \hbox{\openpicture\newspecial{}\newspecial{}...
+%D \stoptypen
+
+%D The first step in opening the picture is to start a group.
+%D Now we can savely use the egroup that closes the box to also
+%D end the picture.
+
+\def\startTPICspecials%
+ {\bgroup
+ \let\startTPICspecials=\relax
+ \aftergroup\stopTPICspecials
+ \startwritingMPgraphic
+ \writeMPgraphic{pair p[];}}
+
+%D As soon as we begin a picture, we inhibit nesting by
+%D relaxing the start macro. The first \METAPOST\ action we
+%D take is declaring an array of pairs named $p$.
+
+%D Ending the picture is invoked by closing the current group.
+%D Because the \TPIC\ picture comes out mirrored, we have to
+%D reflect the current \METAPOST\ picture, stored in the system
+%D variable {\it currentpicture}, around the $x$-axis.
+
+\def\stopTPICspecials%
+ {\writeMPgraphic
+ {currentpicture:=currentpicture reflectedabout ((0,0),(4095,0));}%
+ \stopwritingMPgraphic
+ \flushMPgraphics
+ \loadcurrentMPgraphic{}%
+ \setbox\MPgraphic=\hbox to \!!zeropoint
+ {\kern-\wd\MPgraphic
+ \vbox to \!!zeropoint{\box\MPgraphic\vss}\hss}%
+ \ht\MPgraphic=\!!zeropoint
+ \wd\MPgraphic=\!!zeropoint
+ \dp\MPgraphic=\!!zeropoint
+ \box\MPgraphic
+ \egroup}
+
+%D Here the macro \type{\stopwritingMPgraphic} has to take care
+%D of executing and including the \METAPOST\ code.
+
+%D We need to keep track of the number of elements that form
+%D the path. This is needed because we don't know in advance
+%D how the points are to be connected.
+
+\newcount\TPICcounter
+
+%D When a path is draw, we can connect the points using a
+%D smooth curve of drawing straight lines. A closed path can be
+%D drawn or filled.
+
+\newif\ifTPICdraw
+\newif\ifTPICfill
+\newif\ifTPICcurve
+
+%D The \TPIC\ specials permit specifying the line and fill
+%D color as well as the linetype, which can be solid, dashed or
+%D dotted. We'll save those specifications as a \METAPOST\
+%D string, using:
+
+\let\TPIClinetype =\empty
+\let\TPICgrayscale=\empty
+
+%D The magic reduction factor $.07227$ is needed to map the
+%D \TPIC\ $1/1000$ of an inch to \POSTSCRIPT\ points. We cannot
+%D delegate this task to \METAPOST\ because this program does
+%D not accept values greater than 4095.
+
+%D I won't discuss all the specifics used in implementing
+%D the specials. The \METAPOST\ part is rather trivial. Many
+%D specials have much in common, so the amout of code is not
+%D that large.
+
+\redefinespecial pa \using#1 #2\endspecial
+ {\startTPICspecials
+ \bgroup
+ \global\advance\TPICcounter by 1
+ \dimen0=#1pt \dimen0=.07227\dimen0
+ \dimen2=#2pt \dimen2=.07227\dimen2
+ \writeMPgraphic{p[\the\TPICcounter]:=(\the\dimen0,\the\dimen2);}%
+ \egroup}
+
+\redefinespecial pn \using#1\endspecial
+ {\startTPICspecials
+ \bgroup
+ \dimen0=#1pt \dimen0=.07227\dimen0
+ \writeMPgraphic{pickup pencircle scaled \the\dimen0;}%
+ \egroup}
+
+\redefinespecial sh \using#1\endspecial
+ {\startTPICspecials
+ \bgroup
+ \edef\g{#1}%
+ \edef\g{\ifx\g\empty.5\else#1\fi}%
+ \xdef\TPICgrayscale{withcolor (\g,\g,\g)}%
+ \egroup}
+
+\redefinespecial wh \using#1\endspecial
+ {\mimmickspecial sh \using0\endspecial}
+
+\redefinespecial bk \using#1\endspecial
+ {\mimmickspecial sh \using1\endspecial}
+
+\redefinespecial da \using#1\endspecial
+ {\startTPICspecials
+ \bgroup
+ \edef\l{#1}%
+ \ifx\l\empty
+ \gdef\TPIClinetype{dashed evenly}%
+ \else
+ \dimen0=#1in
+ \ifdim\dimen0<\!!zeropoint \dimen0=-\dimen0\fi
+ \edef\f{\the\dimen0 \space}%
+ \dimen0=.5\dimen0
+ \edef\h{\the\dimen0 \space}%
+ \xdef\TPIClinetype{dashed dashpattern (on \h off \f on \h)}%
+ \fi
+ \egroup
+ \TPICcurvefalse\TPICdrawtrue
+ \drawTPICpath\using#1\endspecial}
+
+\redefinespecial dt \using#1\endspecial
+ {\startTPICspecials
+ \bgroup
+ \edef\l{#1}%
+ \xdef\TPIClinetype{dashed withdots \ifx\l\empty\else scaled #1in\fi}%
+ \egroup
+ \TPICcurvefalse\TPICdrawtrue
+ \drawTPICpath\using#1\endspecial}
+
+\redefinespecial fp \using#1\endspecial
+ {\startTPICspecials
+ \TPICcurvefalse\TPICdrawtrue
+ \ifdim0#1pt=\!!zeropoint
+ \drawTPICpath\using#1\endspecial
+ \else\ifdim0#1pt<\!!zeropoint
+ \mimmickspecial dt\using#1\endspecial
+ \else
+ \mimmickspecial da\using#1\endspecial
+ \fi\fi}
+
+\redefinespecial sp
+ {\startTPICspecials\TPICdrawtrue\TPICcurvetrue\drawTPICpath}
+
+\redefinespecial ip
+ {\startTPICspecials\TPICfilltrue\drawTPICpath}
+
+\redefinespecial ar
+ {\startTPICspecials\TPICdrawtrue\drawTPICarc}
+
+\redefinespecial ia
+ {\startTPICspecials\TPICfilltrue\drawTPICarc}
+
+%D These substitutes use two auxiliary macros that take care of
+%D actually drawing the shape or arc. Here we use the stored
+%D linetype (solid, dashed, dotted) and color (grayscale).
+
+\def\drawTPICpath\using#1\endspecial
+ {\bgroup
+ \ifTPICdraw
+ \def\TPICgrayscale{}%
+ \fi
+ \writeMPgraphic
+ {\ifTPICfill fill\fi\ifTPICdraw draw\fi\space
+ for i:=1 upto \the\TPICcounter-1:
+ p[i]\ifTPICcurve..\else--\fi
+ endfor
+ p[\the\TPICcounter]
+ \ifTPICfill\ifTPICcurve..\else--\fi cycle \fi
+ \TPIClinetype\space\TPICgrayscale;}%
+ \resetTPICvariables
+ \egroup}
+
+%D I have to admit that at the moment I wrote this macro, I
+%D could not write this piece of \METAPOST. Fortunately
+%D Thortsen Ohl promptly answered the question I posted to the
+%D \METAFONT\ discussion list.
+
+\def\drawTPICarc\using#1 #2 #3 #4 #5 #6\endspecial
+ {\bgroup
+ \ifTPICdraw
+ \def\TPICgrayscale{}%
+ \fi
+ \dimen 0=#1pt\dimen 0=.07227\dimen 0
+ \dimen 2=#2pt\dimen 2=.07227\dimen 2
+ \dimen10=#3pt\dimen10=.14454\dimen10
+ \dimen12=#4pt\dimen12=.14454\dimen12
+ \dimen20=#5pt
+ \dimen22=#6pt
+ \writeMPgraphic
+ {\ifTPICfill fill\fi\ifTPICdraw draw\fi \space
+ \ifTPICfill\else subpath 4/3.14159*(\the\dimen20,\the\dimen22) of \fi
+ fullcircle xscaled \the\dimen10 \space yscaled \the\dimen12 \space
+ shifted (\the\dimen0,\the\dimen2)
+ \TPIClinetype \space \TPICgrayscale;}%
+ \resetTPICvariables
+ \egroup}
+
+%D Resetting the variables need to be done globally because we
+%D cannot be sure if any further grouping is used by the
+%D envelopping macros.
+
+\def\resetTPICvariables%
+ {\global\TPICcounter=0
+ \global\TPICfillfalse
+ \global\TPICdrawfalse
+ \global\let\TPIClinetype=\empty
+ \global\let\TPICgrayscale=\empty}
+
+%D I have to admit that by using the \METAPOST\ B‚zier cubics
+%D routines these implementation does produce better curves
+%D then most \DVI\ drivers do using the \TPIC\ prescribed
+%D b-splines. Take for instance the sequence:
+%D
+%D \starttypen
+%D \special{pa 2000 1000}
+%D \special{pa 1000 2000}
+%D \special{pa 0000 1000}
+%D \special{pa 1000 0000}
+%D \special{pa 2000 1000}
+%D \special{sp}
+%D \stoptypen
+%D
+%D One would expect that this code produced a closed circle,
+%D but the curve that comes out using b-splines is far from
+%D round. We can however savely asume that the arc producing
+%D specials will be used for drawing circle fragments, while
+%D the path specials will be used for arbitraty curves. And for
+%D b-splines to produce nice curves, one will often use many
+%D points to get the desired results. Therefore, using the
+%D \METAPOST\ B‚zier curves will certainly produce similar and
+%D even better graphics, except in those rare cases where one
+%D uses delinberately the not that accurate features of
+%D b-splines. Hereby the user is warned.
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/supp-ver.tex b/tex/context/base/supp-ver.tex new file mode 100644 index 000000000..8bf9663e4 --- /dev/null +++ b/tex/context/base/supp-ver.tex @@ -0,0 +1,1406 @@ +%D \module
+%D [ file=supp-ver,
+%D version=1997.01.04,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Verbatim,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D Because this module is quite independant of system macros,
+%D it can be used as a stand||alone verbatim environment.
+
+\ifx \undefined \writestatus \input supp-mis.tex \fi
+
+%D Verbatim typesetting, especially of \TEX\ sources, is a
+%D non||trivial task. This is a direct results of the fact that
+%D characters can have \CATCODES\ other than~11 and such
+%D characters needs a special treatment. What for instance is
+%D \TEX\ supposed to do when it encounters a \type{$} or an
+%D \type{#}? This module deals with these matters.
+
+\writestatus{loading}{Context Support Macros / Verbatim}
+
+%D The verbatim environment has some features, like coloring
+%D \TEX\ text, seldom found in other environments. Especially
+%D when the output of \TEX\ is viewed on an electronic medium,
+%D coloring has a positive influence on the readability of
+%D \TEX\ sources, so we found it very acceptable to dedicate
+%D half of this module to typesetting \TEX\ specific character
+%D sequences in color. In this module we'll also present some
+%D macro's for typesetting inline, display and file verbatim.
+%D The macro's are capable of handling \TAB\ too.
+%D
+%D This module shows a few tricks that are often overseen by
+%D novice, like the use of the \TEX\ primitive \type{\meaning}.
+%D First I'll show in what way the users are confronted with
+%D verbatim typesetting. Because we want to be able to test for
+%D symmetry and because we hate the method of closing down the
+%D verbatim mode with some strange active character, we will
+%D use the following construction for display verbatim:
+%D
+%D \starttypen
+%D \starttyping
+%D The Dutch word 'typen' stands for 'typing', therefore in the Dutch version
+%D one will not find the word 'verbatim'.
+%D \stoptyping
+%D \stoptypen
+%D
+%D In \CONTEXT\ files can be typed with \type{\typefile} and
+%D inline verbatim can be accomplished with \type{\type}. This
+%D last command comes in many flavors:
+%D
+%D \starttypen
+%D We can say \type<<something>> or \type{something}. The first one is a bit
+%D longer but also supports slanted typing, which accomplished by typing
+%D \type<<a <<slanted>> word>>. We can also use commands to enhance the text
+%D \type<<with <</bf boldfaced>> text>>. Just to be complete, we decided
+%D to accept also \LaTeX\ alike verbatim, which means that \type+something+
+%D and \type|something| are valid commands too. Of course we want the grouped
+%D alternatives to process \type{hello {\bf big} world}} with braces.
+%D \stoptypen
+%D
+%D In the core modules, we will build this support on top of
+%D this module. There these commands can be tuned with
+%D accompanying setup commands. There we can enable commands,
+%D slanted typing, control spaces, \TAB||handling and (here we
+%D are:) coloring. We can also setup surrounding white space
+%D and indenting. Here we'll only show some examples.
+
+\unprotect
+
+%D \macros
+%D {verbatimfont}
+%D {}
+%D
+%D When we are typesetting verbatim we use a non||proportional
+%D (mono spaced) font. Normally this font is available by
+%D calling \type{\tt}. In \CONTEXT\ this command does a
+%D complete font||style switch. There we could have stuck with
+%D \type{\tttf}.
+
+\ifx \undefined \verbatimfont \def\verbatimfont {\tt} \fi
+
+%D \macros
+%D {obeyedspace, obeyedtab, obeyedline, obeyedpage}
+%D {}
+%D
+%D We have followed Knuth in naming macros that make \SPACE,
+%D \NEWLINE\ and \NEWPAGE\ active and assigning them
+%D \type{\obeysomething}, but first we set some default values.
+
+\def\obeyedspace {\hbox{ }}
+\def\obeyedtab {\obeyedspace}
+\def\obeyedline {\par}
+\def\obeyedpage {\vfill\eject}
+
+%D \macros
+%D {controlspace,setcontrolspaces}
+%D {}
+%D
+%D First we define \type{\obeyspaces}. When we want visible
+%D spaces (control spaces) we only have to adapt the definition
+%D of \type{\obeyedspace} to:
+
+\def\controlspace {\hbox{\char32}}
+
+\bgroup
+\catcode`\ =\@@active
+\gdef\obeyspaces{\catcode`\ =\@@active\def {\obeyedspace}}
+\gdef\setcontrolspaces{\catcode`\ =\@@active\def {\controlspace}}
+\egroup
+
+%D \macros
+%D {obeytabs, obeylines, obeypages,
+%D ignoretabs, ignorelines, ignorepages}
+%D {}
+%D
+%D Next we take care of \NEWLINE\ and \NEWPAGE\ and because we
+%D want to be able to typeset listings that contain \TAB, we
+%D have to handle those too. Because we have to redefine the
+%D \NEWPAGE\ character locally, we redefine the meaning of
+%D this (often already) active character.
+
+\catcode`\^^L=\@@active \def^^L{\par}
+
+\bgroup
+
+\catcode`\^^I=\@@active
+\catcode`\^^M=\@@active
+\catcode`\^^L=\@@active
+
+\gdef\obeytabs {\catcode`\^^I=\@@active\def^^I{\obeyedtab}}
+\gdef\obeylines {\catcode`\^^M=\@@active\def^^M{\obeyedline}}
+\gdef\obeypages {\catcode`\^^L=\@@active\def^^L{\obeyedpage}}
+
+\gdef\ignoretabs {\catcode`\^^I=\@@active\def^^I{\obeyedspace}}
+\gdef\ignorelines {\catcode`\^^M=\@@active\def^^M{\obeyedspace}}
+\gdef\ignorepages {\catcode`\^^L=\@@active\def^^L{\obeyedline}}
+
+\egroup
+
+%D \macros
+%D {obeycharacters}
+%D {}
+%D
+%D We also predefine \type{\obeycharacters}, which will
+%D enable us to implement character||specific behavior, like
+%D colored verbatim.
+
+\let\obeycharacters=\relax
+
+%D \macros
+%D {settabskips}
+%D {}
+%D
+%D The macro \type{\settabskip} can be used to enable tab
+%D handling. Processing tabs is sometimes needed when one
+%D processes a plain \ASCII\ listing. Tab handling slows down
+%D verbatim typesetting considerably.
+
+\bgroup
+
+\catcode`\^^I=\@@active
+
+\gdef\settabskips%
+ {\let\processverbatimline=\doprocesstabskipline
+ \catcode`\^^I=\@@active
+ \let^^I=\doprocesstabskip}
+
+\egroup
+
+%D \macros
+%D {processinlineverbatim}
+%D {}
+%D
+%D Although the inline verbatim commands presented here will be
+%D extended and embedded in the core modules of \CONTEXT,
+%D they can be used separately. Both grouped and character
+%D alternatives are provided but \type{<<} and nested
+%D braces are implemented in the core module. This commands
+%D takes one argument: the closing command.
+%D
+%D \starttypen
+%D \processinlineverbatim{\closingcommand}
+%D \stoptypen
+%D
+%D One can define his own verbatim commands, which can be very
+%D simple:
+%D
+%D \starttypen
+%D \def\Verbatim {\processinlineverbatim\relax}
+%D \stoptypen
+%D
+%D or a bit more more complex:
+%D
+%D \starttypen
+%D \def\GroupedVerbatim%
+%D {\bgroup
+%D \dosomeusefullthings
+%D \processinlineverbatim\egroup}
+%D \stoptypen
+%D
+%D Before entering inline verbatim mode, we take care of the
+%D unwanted \TAB, \NEWLINE\ and \NEWPAGE\ characters and
+%D turn them into \SPACE. We need the double \type{\bgroup}
+%D construction to keep the closing command local.
+
+\def\setupinlineverbatim%
+ {\verbatimfont
+ \let\obeytabs=\ignoretabs
+ \let\obeylines=\ignorelines
+ \let\obeypages=\ignorepages
+ \setupcopyverbatim}
+
+\def\doprocessinlineverbatim%
+ {\ifx\next\bgroup
+ \setupinlineverbatim
+ \catcode`\{=\@@begingroup
+ \catcode`\}=\@@endgroup
+ \def\next{\let\next=}%
+ \else
+ \setupinlineverbatim
+ \def\next##1{\catcode`##1=\@@endgroup}%
+ \fi
+ \next}
+
+\def\processinlineverbatim#1%
+ {\bgroup
+ \localcatcodestrue % TeX processes paragraph's
+ \def\endofverbatimcommand{#1\egroup}%
+ \bgroup
+ \aftergroup\endofverbatimcommand
+ \futurelet\next\doprocessinlineverbatim}
+
+%D \macros
+%D {processdisplayverbatim}
+%D {}
+%D
+%D The closing command is executed afterwards as an internal
+%D command and therefore should not be given explicitly when
+%D typesetting inline verbatim.
+%D
+%D We can define a display verbatim environment with the
+%D command \type{\processdisplayverbatim} in the following way:
+%D
+%D \starttypen
+%D \processdisplayverbatim{\closingcommand}
+%D \stoptypen
+%D
+%D \noindent For instance, we can define a simple command like:
+%D
+%D \starttypen
+%D \def\BeginVerbatim {\processdisplayverbatim{EndVerbatim}}
+%D \stoptypen
+%D
+%D \noindent But we can also do more advance things like:
+%D
+%D \starttypen
+%D \def\BeginVerbatim {\bigskip \processdisplayverbatim{\EndVerbatim}}
+%D \def\EndVerbatim {\bigskip}
+%D \stoptypen
+%D
+%D When we compare these examples, we see that the backslash in
+%D the closing command is optional. One is free in actually
+%D defining a closing command. If one is defined, the command
+%D is executed after ending verbatim mode.
+
+\def\processdisplayverbatim#1%
+ {\par
+ \bgroup
+ \escapechar=-1
+ \xdef\verbatimname{\string#1}%
+ \egroup
+ \def\endofdisplayverbatim{\csname\verbatimname\endcsname}%
+ \bgroup
+ \parindent\!!zeropoint
+ \ifdim\lastskip<\parskip
+ \removelastskip
+ \vskip\parskip
+ \fi
+ \parskip\!!zeropoint
+ \processingverbatimtrue
+ \linepartrue
+ \expandafter\let\csname\verbatimname\endcsname=\relax
+ \edef\endofverbatimcommand{\csname\verbatimname\endcsname}%
+ \edef\endofverbatimcommand{\meaning\endofverbatimcommand}%
+ \verbatimfont
+ \setupcopyverbatim
+ \ifskipfirstverbatimline
+ \let\doverbatimline=\relax
+ \else
+ \let\doverbatimline=\dodoverbatimline
+ \fi
+ \copyverbatimline}
+
+%D \macros
+%D {ifskipfirstverbatimline}
+%D
+%D By default the rest of the first line is ignored. We can
+%D turn this feature off by saying:
+%D
+%D \starttypen
+%D \skipfirstverbatimlinefalse
+%D \stoptypen
+
+\newif\ifskipfirstverbatimline \skipfirstverbatimlinetrue
+
+%D We save the closing sequence in \type{\endofverbatimcommand}
+%D in such a way that it can be compared on a line by line
+%D basis. For the conversion we use \type{\meaning}, which
+%D converts the line to non||expandable tokens. We reset
+%D \type{\parskip}, because we don't want inter||paragraph
+%D skips to creep into the verbatim source. Furthermore we
+%D \type{\relax} the line||processing macro while getting the
+%D rest of the first line. The initialization command
+%D \type{\setupcopyverbatim} does just what we expect it to do:
+%D it assigns all characters \CATCODE~11. Next we switch to
+%D french spacing and call for obeyance.
+
+\def\setupcopyverbatim%
+ {\uncatcodecharacters
+ \frenchspacing
+ \obeyspaces
+ \obeytabs
+ \obeylines
+ \obeycharacters}
+
+%D \macros
+%D {ifeightbitcharacters,
+%D setcatcodes,uncatcodespecials,
+%D uncatcodecharacters}
+%D {}
+%D
+%D As its name says, \type{\uncatcodecharacters} resets the
+%D \CATCODE\ of characters. When we use an upper bound of
+%D 127 or 255, depending in \type{\ifeightbitcharacters}. By
+%D counting down, we only have to use one counter. The
+%D macro \type{\setcatcodes} can be uses to set alternative
+%D values. The macro \type{\resetspecialcharacters} resets
+%D characters with special meanings. This macro is not used
+%D in the verbatim macros, but is best defined in this module.
+
+\def\doprocesscatcodes#1%
+ {\ifeightbitcharacters
+ \scratchcounter=255
+ \else
+ \scratchcounter=127
+ \fi
+ \loop
+ \savecatcode
+ #1\relax
+ \advance\scratchcounter by -1
+ \ifnum\scratchcounter>-1
+ \repeat
+ \let\savecatcode=\relax
+ \let\restorecatcodes=\dorestorecatcodes}
+
+\def\uncatcodespecials%
+ {\doprocesscatcodes
+ {\ifnum\catcode\scratchcounter=\@@letter\relax\else
+ \catcode\scratchcounter=\@@other
+ \fi}%
+ \catcode`\ =\@@space
+ \catcode`\^^L=\@@ignore
+ \catcode`\^^M=\@@endofline
+ \catcode`\^^?=\@@ignore}
+
+\def\setcatcodes#1%
+ {\doprocesscatcodes
+ {\catcode\scratchcounter=#1}}
+
+\def\uncatcodecharacters%
+ {\setcatcodes\@@letter}
+
+%D \macros
+%D {iflocalcatcodes,
+%D restorecatcodes,
+%D beginrestorecatcodes,endrestorecatcodes}
+%D {}
+%D
+%D We're not finished dealing \CATCODES\ yet. In \CONTEXT\ we
+%D use only one auxiliary file, which deals with tables of
+%D contents, registers, two pass tracking, references etc. This
+%D file, as well as files concerning graphics, is processed when
+%D needed, which can be in the mid of typesetting verbatim.
+%D However, when reading in data in verbatim mode, we should
+%D temporary restore the normal \CATCODES, and that's exactly
+%D what the next macros do. Saving the catcodes can be
+%D disabled by saying \type{\localcatcodestrue}.
+
+%D The previous macros call for \type{\savecatcode}, which is
+%D implemented as:
+
+\newif\iflocalcatcodes
+
+\def\savecatcode%
+ {\iflocalcatcodes \else
+ \expandafter\edef\csname @@cc@@\the\scratchcounter\endcsname%
+ {\the\catcode\scratchcounter}%
+ \fi}
+
+%D It's counterpart is:
+
+\def\restorecatcode%
+ {\expandafter\catcode\expandafter\scratchcounter\expandafter=
+ \csname @@cc@@\the\scratchcounter\endcsname}
+
+%D When we want to restore \CATCODES\ we call for
+%D \type{\restorecatcodes}, which default to \type{\relax}
+
+\let\restorecatcodes=\relax
+
+%D or when we've saves things calls for:
+
+\def\dorestorecatcodes%
+ {\iflocalcatcodes \else
+ \doprocesscatcodes\restorecatcode
+ \fi}
+
+%D We also provide an alternative, that forces grouping
+%D when needed. An application of this macros can be found in
+%D buffering data.
+
+\def\beginrestorecatcodes%
+ {\ifx\restorecatcodes\relax
+ \let\endrestorecatcodes=\relax
+ \else
+ \bgroup
+ \let\beginrestorecatcodes=\bgroup
+ \let\endrestorecatcodes=\egroup
+ \fi}
+
+%D The main copying routine of display verbatim does an
+%D ordinary string||compare on the saved closing command and
+%D the current line. The space after \type{#1} in the
+%D definition of \type{\next} is essential! As a result of
+%D using \type{\obeylines}, we have to use \type{%}'s after
+%D each line but none after the first \type{#1}.
+
+{\obeylines%
+ \long\gdef\copyverbatimline#1
+ {\ifx\doverbatimline\relax% gobble rest of the first line
+ \let\doverbatimline=\dodoverbatimline%
+ \def\next{\copyverbatimline}%
+ \else%
+ \def\next{#1 }%
+ \ifx\next\emptyspace%
+ \def\next%
+ {\doemptyverbatimline{#1}%
+ \copyverbatimline}%
+ \else%
+ \edef\next{\meaning\next}%
+ \ifx\next\endofverbatimcommand%
+ \def\next%
+ {\egroup\endofdisplayverbatim}%
+ \else%
+ \def\next%
+ {\doverbatimline{#1}%
+ \copyverbatimline}%
+ \fi%
+ \fi%
+ \fi%
+ \next}}
+
+%D The actual typesetting of a line is done by a separate
+%D macro, which enables us to implement \TAB\ handling. The
+%D \type{\do} and \type{\dodo} macros take care of the
+%D preceding \type{\parskip}, while skipping the rest of the
+%D first line. The \type{\relax} is used as an signal.
+
+%D \macros
+%D {iflinepar}
+%D {}
+%D
+%D A careful reader will see that \type{\linepar} is reset.
+%D This boolean can be used to determine if the current line is
+%D the first line in a pseudo paragraph and this boolean is set
+%D after each empty line.
+
+\newif\iflinepar
+
+\long\def\dodoverbatimline#1%
+ {\leavevmode\the\everyline\strut\processverbatimline{#1}%
+ \EveryPar{}%
+ \lineparfalse
+ \obeyedline\par}
+
+%D \macros
+%D {obeyemptylines,verbatimbaselineskip}
+%D {}
+%D
+%D Empty lines in verbatim can lead to white space on top of
+%D a new page. Because this is not what we want, we turn
+%D them into vertical skips. This default behavior can be
+%D overruled by:
+%D
+%D \starttypen
+%D \obeyemptylines
+%D \stoptypen
+%D
+%D Although it would cost us only a few lines of code, we
+%D decided not to take care of multiple empty lines. When a
+%D (display) verbatim text contains more successive empty
+%D lines, this probably suits some purpose. When applicable,
+%D one can set the verbatim baselineskip.
+
+\bgroup
+\catcode`\^^L=\@@active \gdef\emptypage {^^L}
+\catcode`\^^M=\@@active \gdef\emptyline {^^M}
+ \gdef\emptyspace { }
+\egroup
+
+\def\verbatimbaselineskip{\baselineskip}
+
+\def\doemptyverbatimline%
+ {\vskip\verbatimbaselineskip
+ {\setbox0=\hbox{\the\everyline}}%
+ \linepartrue}
+
+\def\obeyemptylines%
+ {\def\doemptyverbatimline{\doverbatimline}}
+
+%D \TEX\ does not offer \type{\everyline}, which is a direct
+%D result of its advanced multi||pass paragraph typesetting
+%D mechanism. Because in verbatim mode paragraphs and lines are
+%D more or less equal, we can easily implement our own simple
+%D \type{\everyline} support.
+
+%D \macros
+%D {EveryPar, EveryLine}
+%D {}
+%D
+%D In this module we've reserved \type{\everypar} for the
+%D things to be done with paragraphs and \type{\everyline} for
+%D line specific actions. In \CONTEXT\ however, we use
+%D \type{\everypar} for placing side- and columnfloats,
+%D inhibiting indentation and some other purposes. In verbatim
+%D mode, every line becomes a paragraph, which means that
+%D \type{\everypar} is executed frequently. To be sure, the
+%D user specific use of both \type{\everyline} and
+%D \type{\everypar} is implemented by means of
+%D \type{\EveryLine} and \type{\EveryPar}.
+%D
+%D We still have to take care of the \TAB. A \TAB\ takes eight
+%D spaces and a \SPACE\ normally has a width of 0.5~em. Because
+%D we can be halfway a tabulation, we must keep track of the
+%D position. This takes time, especially when we print complete
+%D files, therefore we \type{\relax} this mechanism by default.
+
+\def\doprocesstabskip%
+ {\obeyedspace % \hskip.5em or \hbox to .5em{}
+ \ifdone
+ \advance\scratchcounter by 1
+ \let\next=\doprocesstabskip
+ \donefalse
+ \else\ifnum\scratchcounter>7
+ \let\next=\relax
+ \else
+ \advance\scratchcounter 1
+ \let\next=\doprocesstabskip
+ \fi\fi
+ \next}
+
+\def\dodoprocesstabskipline#1#2\endoftabskipping%
+ {\ifnum\scratchcounter>7
+ \scratchcounter=1
+ \donetrue
+ \else
+ \advance\scratchcounter 1
+ \donefalse
+ \fi
+ \ifx#1\relax
+ \let\next=\relax
+ \else
+ \def\next{#1\dodoprocesstabskipline#2\endoftabskipping}%
+ \fi
+ \next}
+
+\let\endoftabskipping = \relax
+\let\processverbatimline = \relax
+
+\def\doprocesstabskipline#1%
+ {\bgroup
+ \scratchcounter=1
+ \dodoprocesstabskipline#1\relax\endoftabskipping
+ \egroup}
+
+%D \macros
+%D {processfileverbatim}
+%D {}
+%D
+%D The verbatim typesetting of files is done on a bit different
+%D basis. This time we don't check for a closing command, but
+%D look for \EOF\ and when we've met, we make sure it does not
+%D turn into an empty line.
+%D
+%D \starttypen
+%D \processfileverbatim{filename}
+%D \stoptypen
+%D
+%D Typesetting a file in most cases results in more than one
+%D page. Because we don't want problems with files that are
+%D read in during the construction of the page, we set
+%D \type{\ifprocessingverbatim}, so the output routine can
+%D adapt its behavior. Originally we used
+%D \type{\scratchread}, but because we want to support nesting,
+%D we decided to use a separate input file.
+
+\newif\ifprocessingverbatim
+
+\newread\verbatiminput
+
+\def\processfileverbatim#1%
+ {\par
+ \bgroup
+ \parindent\!!zeropoint
+ \ifdim\lastskip<\parskip
+ \removelastskip
+ \vskip\parskip
+ \fi
+ \parskip\!!zeropoint
+ \processingverbatimtrue
+ \linepartrue
+ \uncatcodecharacters
+ \verbatimfont
+ \frenchspacing
+ \obeyspaces
+ \obeytabs
+ \obeylines
+ \obeypages
+ \obeycharacters
+ \openin\verbatiminput=#1%
+ \def\doreadline%
+ {\read\verbatiminput to \next
+ \ifeof\verbatiminput
+ % we don't want <eof> to be treated as <crlf>
+ \else\ifx\next\emptyline
+ \expandafter\doemptyverbatimline\expandafter{\next}%
+ \else\ifx\next\emptypage
+ \expandafter\doemptyverbatimline\expandafter{\next}%
+ \else
+ \expandafter\dodoverbatimline\expandafter{\next}%
+ \fi\fi\fi
+ \readline}%
+ \def\readline%
+ {\ifeof\verbatiminput
+ \let\next=\relax
+ \else
+ \let\next=\doreadline
+ \fi
+ \next}%
+ \readline
+ \closein\verbatiminput
+ \egroup
+ \ignorespaces}
+
+%D These macro's can be used to construct the commands we
+%D mentioned in the beginning of this documentation. We leave
+%D this to the fantasy of the reader and only show some \PLAIN\
+%D \TEX\ alternatives for display verbatim and listings. We
+%D define three commands for typesetting inline text, display
+%D text and files verbatim. The inline alternative also accepts
+%D user supplied delimiters.
+%D
+%D \starttypen
+%D \type{text}
+%D
+%D \starttyping
+%D ... verbatim text ...
+%D \stoptyping
+%D
+%D \typefile{filename}
+%D \stoptypen
+%D
+%D We can turn on the options by:
+%D
+%D \starttypen
+%D \controlspacetrue
+%D \verbatimtabstrue
+%D \prettyverbatimtrue
+%D \stoptypen
+%D
+%D Here is the implementation:
+
+\newif\ifcontrolspace
+\newif\ifverbatimtabs
+\newif\ifprettyverbatim
+
+\def\presettyping%
+ {\ifcontrolspace
+ \let\obeyspace=\setcontrolspace
+ \fi
+ \ifverbatimtabs
+ \let\obeytabs=\settabskips
+ \fi
+ \ifprettyverbatim
+ \let\obeycharacters=\setupprettytextype
+ \fi}
+
+\def\type%
+ {\bgroup
+ \presettyping
+ \processinlineverbatim{\egroup}}
+
+\def\starttyping%
+ {\bgroup
+ \presettyping
+ \processdisplayverbatim{\stoptyping}}
+
+\def\stoptyping%
+ {\egroup}
+
+\def\typefile#1%
+ {\bgroup
+ \presettyping
+ \processfileverbatim{#1}%
+ \egroup}
+
+%D One can use the different \type{\obeysomething} commands to
+%D influence the behavior of these macro's. We use for instance
+%D \type{\obeycharacters} for making \type{/} an active
+%D character when we want to include typesetting commands.
+%D
+%D We'll spend the remainder of this article on coloring the
+%D verbatim text. At \PRAGMA\ we use the integrated environment
+%D \TEXEDIT\ for editing and processing \TEX\
+%D documents.\voetnoot{\TEXEDIT\ has been operative since
+%D 1991.} This program also supports real time spell checking
+%D and \TEX\ based file management. Although definitely not
+%D exclusive, the programs cooperate nicely with \CONTEXT.
+%D Because \TEX\ can be considered a tool for experts, we've
+%D tried to put as less a burden on non||technical users as
+%D possible. This is accomplished in the following ways:
+%D
+%D \startopsomming
+%D
+%D \som We've added some trivial symmetry checking to
+%D \TEXEDIT. Sources are checked for the use of brackets,
+%D braces, begin||end and start||stop like constructions,
+%D with or without arguments.
+%D
+%D \som Although \TEX\ is very tolerant to unformatted input,
+%D we stimulate users to make the \ASCII\ source as clean
+%D as possible. Many sources I've seen in distribution
+%D sets look so awful, that I sometimes wonder how people
+%D get them working. In our opinion, a good||looking
+%D source leads to less errors.
+%D
+%D \som We use parameter driven setups and make the commands
+%D as tolerant as possible. We don't accept commands that
+%D don't look nice in \ASCII.
+%D
+%D \som Finally ---I could have added some more--- we use
+%D color.
+%D
+%D \stopopsomming
+%D
+%D When in spell||checking||mode, the words spelled correctly
+%D are shown in {\em green}, the unknown or wrongly spelled
+%D words are in {\em red} and upto four categories of words,
+%D for instance passive verbs and nouns, become {\em blue}
+%D (or cyan) or {\em yellow}. Short and nearly always correct
+%D words are in white (on a black screen). This makes
+%D checking||on||the||fly very easy and convenient, especially
+%D because we place the accents automatically.
+%D
+%D In \TEX||mode we show \TEX||specific tokens and sequences of
+%D tokens in appropriate colors and again we use four colors.
+%D We use those colors in a way that supports parameter driven
+%D setups, table typesetting and easy visual checking of
+%D symmetry. Furthermore the text becomes more readable.
+%D
+%D \bgroup
+%D \chardef\ampersand =`\&
+%D \chardef\comment =`\%
+%D \chardef\leftbrace =`\{
+%D \chardef\rightbrace=`\}
+%D
+%D \plaatstabel{geen}
+%D \starttabel[|l|l|]
+%D \HL
+%D \FC\bf color \MC\bf characters that are influenced \LC\SR
+%D \HL
+%D \FC red \MC\tt \leftbrace\ \rightbrace\
+%D \string$ \LC\FR
+%D \FC green \MC\tt \string\this\ \string\!!that\
+%D \string\??these\ \string\@@those\ \LC\MR
+%D \FC yellow \MC\tt \string` \string' \string~
+%D \string^ \string_ \ampersand\
+%D \string/ \string+ \string-
+%D \string| \comment\ \LC\MR
+%D \FC blue \MC\tt \string( \string) \string#
+%D \string[ \string] \string"
+%D \string< \string> \string= \LC\LR
+%D \HL
+%D \stoptabel
+%D \egroup
+%D
+%D Macro||definition and style files often look quite green,
+%D because they contain many calls to macros. Pure text files
+%D on the other hand are mostly white (on the screen) and color
+%D clearly shows their structure.
+%D
+%D When I prepared the interactive \PDF\ manuals of \CONTEXT,
+%D \TEXEDIT\ and \PPCHTEX\ (1995), I decided to include the
+%D original source text of the manuals as an appendix. At every
+%D chapter or (sub)section the reader can go to the
+%D corresponding line in the source, just to see how things
+%D were done in \TEX. Of course, the reader can jump from the
+%D to corresponding typeset text too.
+%D
+%D Confronted with those long (boring) sources, I decided that
+%D a colored output, in accordance with \TEXEDIT\ would be
+%D nice. It would not only visually add some quality to the
+%D manual, but also make the sources more readable.
+%D
+%D Apart from a lot of \CATCODE||magic, programming the color
+%D macros was surprisingly easy. Although the macro's are
+%D hooked into the standard \CONTEXT\ verbatim mechanism, they
+%D are set up in a way that embedding them in another verbatim
+%D environment is possible.
+%D
+%D We can turn on coloring by reassigning
+%D \type{\obeycharacters}:
+%D
+%D \starttypen
+%D \let\obeycharacters=\setupprettytextype
+%D \stoptypen
+%D
+%D During pretty typesetting we can be in two states: {\em
+%D command} and {\em parameter}. The first condition becomes
+%D true if we encounter a backslash, the second state is
+%D entered when we meet a~\type{#}.
+
+\newif\ifintexcommand
+\newif\ifintexparameter
+
+%D \macros
+%D {splittexparameters}
+%D {}
+%D
+%D The mechanism described here, is meant to be used with
+%D color. It is nevertheless possible to use different fonts
+%D instead of distinctive colors. When using color, it's better
+%D to end parameter mode after the \type{#}. When on the
+%D other hand we use a slanted typeface for the hashmark, then
+%D a slanted number looks better.
+
+\newif\ifsplittexparameters \splittexparameterstrue
+
+%D \macros
+%D {splittexcontrols}
+%D {}
+%D
+%D With \type{\splittexcontrols} we can influence the way
+%D control characters are processed in macro names. By default,
+%D the \type{^^} part is uncolored. When this boolean is set to
+%D false, they get the same color as the other characters.
+
+\newif\ifsplittexcontrols \splittexcontrolstrue
+
+%D The next boolean is used for internal purposes only and
+%D keeps track of the length of the name. Because two||character
+%D sequences starting with a backslash are always seen as a
+%D command.
+
+\newif\iffirstintexcommand
+
+%D We use a maximum of four colors because more colors will
+%D distract too much. In the following table we show the
+%D logical names of the colors, their color and $rgb$ values.
+%D
+%D \plaatstabel{geen}
+%D \starttabel[|l|l|c|c|c|c|]
+%D \HL
+%D \FC\bf identifier \MC\bf color \MC\bf r \MC\bf g \MC\bf b \MC\bf bw \LC\SR
+%D \HL
+%D \FC texprettyone \MC red \MC 0.9 \MC 0.0 \MC 0.0 \MC 0.30 \LC\FR
+%D \FC texprettytwo \MC green \MC 0.0 \MC 0.8 \MC 0.0 \MC 0.45 \LC\MR
+%D \FC texprettythree \MC yellow \MC 0.0 \MC 0.0 \MC 0.9 \MC 0.60 \LC\MR
+%D \FC texprettyfour \MC blue \MC 0.8 \MC 0.8 \MC 0.6 \MC 0.75 \LC\LR
+%D \HL
+%D \stoptabel
+
+%D This following poor mans implementation of color is based on
+%D PostScript. One can of course use grayscales too. In the
+%D core modules these macros are redefined to using the color
+%D mechanism present in \CONTEXT.
+
+\def\setcolorverbatim%
+ {\splittexparameterstrue
+ \def\texprettyone {.9 .0 .0 } % red
+ \def\texprettytwo {.0 .8 .0 } % green
+ \def\texprettythree {.0 .0 .9 } % blue
+ \def\texprettyfour {.8 .8 .6 } % yellow
+ \def\texbeginofpretty[##1]%
+ {\special{ps:: \csname##1\endcsname setrgbcolor}}
+ \def\texendofpretty%
+ {\special{ps:: 0 0 0 setrgbcolor}}} % black
+
+\def\setgrayverbatim%
+ {\splittexparameterstrue
+ \def\texprettyone {.30 } % gray
+ \def\texprettytwo {.45 } % gray
+ \def\texprettythree {.60 } % gray
+ \def\texprettyfour {.75 } % gray
+ \def\texbeginofpretty[##1]%
+ {\special{ps:: \csname##1\endcsname setgray}}
+ \def\texendofpretty%
+ {\special{ps:: 0 setgray}}} % black
+
+%D One can redefine these two commands after loading this
+%D module. When available, one can also use appropriate
+%D font||switch macro's. We default to color.
+
+\setcolorverbatim
+
+%D Here come the commands that are responsible for entering and
+%D leaving the two states. As we can see, they've got much in
+%D common.
+
+\def\texbeginofcommand%
+ {\texendofparameter
+ \ifintexcommand
+ \else
+ \global\intexcommandtrue
+ \global\firstintexcommandtrue
+ \texbeginofpretty[texprettytwo]%
+ \fi}
+
+\def\texendofcommand%
+ {\ifintexcommand
+ \texendofpretty
+ \global\intexcommandfalse
+ \global\firstintexcommandfalse
+ \fi}
+
+\def\texbeginofparameter%
+ {\texendofcommand
+ \ifintexparameter
+ \else
+ \global\intexparametertrue
+ \texbeginofpretty[texprettythree]%
+ \fi}
+
+\def\texendofparameter%
+ {\ifintexparameter
+ \texendofpretty
+ \global\intexparameterfalse
+ \fi}
+
+%D We've got nine types of characters. The first type concerns
+%D the grouping characters that become red and type seven takes
+%D care of the backslash. Type eight is the most recently added
+%D one and handles the control characters starting with
+%D \type{^^}. In the definition part at the end of this module
+%D we can see how characters are organized by type.
+
+\def\ifnotfirstintexcommand#1%
+ {\iffirstintexcommand
+ \string#1%
+ \texendofcommand
+ \else}
+
+\def\textypeone#1%
+ {\ifnotfirstintexcommand#1%
+ \texendofcommand
+ \texendofparameter
+ \texbeginofpretty[texprettyone]\string#1\texendofpretty
+ \fi}
+
+\def\textypetwo#1%
+ {\ifnotfirstintexcommand#1%
+ \texendofcommand
+ \texendofparameter
+ \texbeginofpretty[texprettythree]\string#1\texendofpretty
+ \fi}
+
+\def\textypethree#1%
+ {\ifnotfirstintexcommand#1%
+ \texendofcommand
+ \texendofparameter
+ \texbeginofpretty[texprettyfour]\string#1\texendofpretty
+ \fi}
+
+\def\textypefour#1%
+ {\ifnotfirstintexcommand#1%
+ \texendofcommand
+ \texendofparameter
+ \string#1%
+ \fi}
+
+\def\textypefive#1%
+ {\ifnotfirstintexcommand#1%
+ \texbeginofparameter
+ \string#1%
+ \fi}
+
+\def\textypesix#1%
+ {\ifnotfirstintexcommand#1%
+ \ifintexparameter
+ \ifsplittexparameters
+ \texendofparameter
+ \string#1%
+ \else
+ \string#1%
+ \texendofparameter
+ \fi
+ \else
+ \texendofcommand
+ \string#1%
+ \fi
+ \fi}
+
+\def\textypeseven#1%
+ {\ifnotfirstintexcommand#1%
+ \texbeginofcommand
+ \string#1%
+ \fi}
+
+\def\textypeeight#1#2%
+ {\texendofparameter
+ \ifx#1#2%
+ \ifsplittexcontrols
+ \ifintexcommand
+ \texendofcommand
+ \string#1\string#1%
+ \texbeginofcommand
+ \else
+ \string#1\string#2%
+ \fi
+ \else
+ \string#1\string#1%
+ \fi
+ \else
+ \ifintexcommand
+ \firstintexcommandfalse
+ \string#1#2%
+ \else
+ \textypethree#1#2%
+ \fi
+ \fi}
+
+\def\textypenine#1%
+ {\texendofparameter
+ \global\firstintexcommandfalse
+ \string#1}
+
+%D We have to take care of the control characters we mentioned
+%D before. We obey their old values but only after ending our
+%D two states.
+
+\def\texsetcontrols%
+ {\global\let\oldobeyedspace = \obeyedspace
+ \global\let\oldobeyedline = \obeyedline
+ \global\let\oldobeyedpage = \obeyedpage
+ \def\obeyedspace%
+ {\texendofcommand
+ \texendofparameter
+ \oldobeyedspace}%
+ \def\obeyedline%
+ {\texendofcommand
+ \texendofparameter
+ \oldobeyedline}%
+ \def\obeyedpage%
+ {\texendofcommand
+ \texendofparameter
+ \oldobeyedpage}%
+ \let\obeytabs=\ignoretabs}
+
+%D Next comes the tough part. We have to change the \CATCODE\
+%D of each character. These macro's are tuned for speed and
+%D simplicity. When viewed in color they look quite simple.
+
+\def\setupprettytextype%
+ {\texsetcontrols
+ \texsetspecialpretty
+ \texsetalphabetpretty
+ \texsetextrapretty}
+
+%D When handling the lowercase characters, we cannot use
+%D lowercased macro names. This means that we have to redefine
+%D some well known macros, like \type{\bgroup}.
+
+\def\texpresetcatcode%
+ {\def\\##1%
+ {\expandafter\catcode\expandafter`\csname##1\endcsname\@@active}}
+
+\def\texsettypenine%
+ {\def\\##1%
+ {\def##1{\textypenine##1}}}
+
+\bgroup
+ \bgroup
+ \gdef\texpresetalphapretty%
+ {\texpresetcatcode
+ \\A\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M%
+ \\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}
+ \texpresetalphapretty
+ \gdef\texsetalphapretty%
+ {\texpresetalphapretty
+ \texsettypenine
+ \\A\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M%
+ \\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}
+ \egroup
+ \global\let\TEXPRESETCATCODE = \texpresetcatcode
+ \global\let\TEXSETTYPENINE = \texsettypenine
+ \global\let\BGROUP = \bgroup
+ \global\let\EGROUP = \egroup
+ \global\let\GDEF = \gdef
+ \BGROUP
+ \GDEF\TEXPRESETALPHAPRETTY%
+ {\TEXPRESETCATCODE
+ \\a\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m%
+ \\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}
+ \TEXPRESETALPHAPRETTY
+ \GDEF\TEXSETALPHAPRETTY%
+ {\TEXPRESETALPHAPRETTY
+ \TEXSETTYPENINE
+ \\a\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m%
+ \\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}
+ \EGROUP
+ \gdef\texsetalphabetpretty%
+ {\texsetalphapretty
+ \TEXSETALPHAPRETTY}
+\egroup
+
+%D Macro names normally only may contain characters, but in
+%D unprotected state we can also use the characters~\type{@},
+%D \type{!} and~\type{?}. Of course they are only colored
+%D (green) when they are part of a name.
+
+\bgroup
+ \gdef\texpresetextrapretty%
+ {\texpresetcatcode
+ \\?\\!\\@}
+ \texpresetextrapretty
+ \gdef\texsetextrapretty%
+ {\texpresetextrapretty
+ \texsettypenine
+ \\?\\!\\@}
+\egroup
+
+%D Here comes the main specification routine. In this macro we
+%D also have to change the escape character to \type{!} and use
+%D \type{X}, \type{Y} and \type{Z} for grouping and ignoring,
+%D which makes the result a bit less readable. Plain \TEX\
+%D defines \type{\+} as an outer macro, so we have to redefine
+%D this one too.
+
+\def\+{\tabalign}
+
+\bgroup
+ \gdef\texpresetspecialpretty%
+ {\def\\##1{\catcode`##1\@@active}%
+ \\\[\\\]\\\=\\\<\\\>\\\#\\\(\\\)\\\"%
+ \\\$\\\{\\\}%
+ \\\-\\\+\\\|\\\%\\\/\\\_\\\^\\\&\\\~\\\'\\\`%
+ \\\.\\\,\\\:\\\;%
+ \\\*%
+ \\\1\\\2\\\3\\\4\\\5\\\6\\\7\\\8\\\9%
+ \\\\}
+ \catcode`\X=\the\catcode`\{
+ \catcode`\Y=\the\catcode`\}
+ \catcode`\Z=\the\catcode`\%
+ \gdef\texsetsometypes%
+ {\def\!##1##2{\def##1{##2{##1}}}}%
+ XZ
+ \catcode`\!=\@@escape
+ !texpresetspecialpretty
+ !gdef!texsetspecialpretty
+ XZ
+ !texpresetspecialpretty
+ !texsetsometypes
+ !! $ !textypeone !! { !textypeone !! } !textypeone
+ !! [ !textypetwo !! ] !textypetwo !! ( !textypetwo !! ) !textypetwo
+ !! = !textypetwo !! < !textypetwo !! > !textypetwo !! " !textypetwo
+ !! - !textypethree !! + !textypethree !! / !textypethree
+ !! | !textypethree !! % !textypethree !! ' !textypethree !! ` !textypethree
+ !! _ !textypethree !! ^ !textypethree !! & !textypethree !! ~ !textypethree
+ !! . !textypefour !! , !textypefour !! : !textypefour !! ; !textypefour
+ !! * !textypefour
+ !! # !textypefive
+ !! 1 !textypesix !! 2 !textypesix !! 3 !textypesix
+ !! 4 !textypesix !! 5 !textypesix !! 6 !textypesix
+ !! 7 !textypesix !! 8 !textypesix !! 9 !textypesix
+ !! \ !textypeseven
+ !! ^ !textypeeight
+ YZ
+ YZ
+\egroup
+
+%D This text was published in the \MAPS\ of the dutch \TEX\
+%D users group \NTG. In that article, the verbatim part of the
+%D text was set with the following commands for the examples:
+%D
+%D \starttypen
+%D \def\starttypen% We simplify the \ConTeXt\ macro.
+%D {\bgroup
+%D \everypar{} % We disable some troublesome mechanisms.
+%D \advance\leftskip by 1em
+%D \processdisplayverbatim{\stoptypen}}
+%D
+%D \def\stoptypen%
+%D {\egroup}
+%D \stoptypen
+%D
+%D The implementation itself was typeset with:
+%D
+%D \starttypen
+%D \def\startdefinition%
+%D {\bgroup
+%D \everypar{} % Again we disable some troublesome mechanisms.
+%D \let\obeycharacters=\setupprettytextype
+%D \EveryPar{\showparagraphcounter}%
+%D \EveryLine{\showlinecounter}%
+%D \verbatimcorps
+%D \processdisplayverbatim{\stopdefinition}}
+%D
+%D \def\stopdefinition%
+%D {\egroup}
+%D \stoptypen
+%D
+%D And because we have both \type{\EveryPar} and
+%D \type{\EveryLine} available, we can implement a dual
+%D numbering mechanism:
+%D
+%D \starttypen
+%D \newcount\paragraphcounter
+%D \newcount\linecounter
+%D
+%D \def\showparagraphcounter%
+%D {\llap
+%D {\bgroup
+%D \counterfont
+%D \hbox to 4em
+%D {\global\advance\paragraphcounter by 1
+%D \hss \the\paragraphcounter \hskip2em}%
+%D \egroup
+%D \hskip1em}}
+%D
+%D \def\showlinecounter%
+%D {\llap
+%D {\bgroup
+%D \counterfont
+%D \hbox to 2em
+%D {\global\advance\linecounter by 1
+%D \hss \the\linecounter}%
+%D \egroup
+%D \hskip1em}}
+%D \stoptypen
+%D
+%D One may have noticed that the \type{\EveryPar} is only
+%D executed once, because we consider each piece of verbatim
+%D as one paragraph. When one wants to take the empty lines
+%D into account, the following assignments are appropriate:
+%D
+%D \starttypen
+%D \EveryLine
+%D {\iflinepar
+%D \showparagraphcounter
+%D \fi
+%D \showlinecounter}
+%D \stoptypen
+%D
+%D In this case, nothing has to be assigned to \type{\EveryPar},
+%D maybe except of just another extra numbering scheme. The
+%D macros used to typeset this documentation are a bit more
+%D complicated, because we have to take take 'long' margin
+%D lists into account. When such a list exceeds the previous
+%D pargraph we postpone placement of the paragraph number till
+%D there's room. This way so it does not clash with the margin
+%D words.
+
+%D Normally such commands have to be embedded in a decent setup
+%D structure, where options can be set at will.
+%D
+%D Now let's summarize the most important commands.
+%D
+%D \starttypen
+%D \processinlineverbatim{\closingcommand}
+%D \processdisplayverbatim{\closingcommand}
+%D \processfileverbatim{filename}
+%D \stoptypen
+%D
+%D We can satisfy our own specific needs with the following
+%D interfacing macro's:
+%D
+%D \starttypen
+%D \obeyspaces \obeytabs \obeylines \obeypages \obeycharacters
+%D \stoptypen
+%D
+%D Some needs are fulfilled already with:
+%D
+%D \starttypen
+%D \setcontrolspace \settabskips \setupprettytextype
+%D \stoptypen
+%D
+%D lines can be enhanced with ornaments using:
+%D
+%D \starttypen
+%D \everypar \everyline \iflinepar
+%D \stoptypen
+%D
+%D and color support is implemented by:
+%D
+%D \starttypen
+%D \texbeginofpretty[#1] ... \texendofpretty
+%D \stoptypen
+%D
+%D We can influence the verbatim environment with the following
+%D macro and booleans:
+%D
+%D \starttypen
+%D \obeyemptylines \splittexparameters... \splittexcontrols...
+%D \stoptypen
+%D
+%D The color support macro can be redefined by the user. The
+%D parameter \type{#1} can be one of the four 'fixed'
+%D identifiers {\em texprettyone}, {\em texprettytwo}, {\em
+%D texprettythree} and {\em texprettyfour}. We have implemented a
+%D more or less general PostScript color support mechanism,
+%D using \type{specials}. One can toggle between color and
+%D grayscale with:
+%D
+%D \starttypen
+%D \setgrayverbatim \setcolorverbatim
+%D \stoptypen
+
+%D \macros
+%D {permitshiftedendofverbatim}
+%D {}
+%D
+%D We did not mention one drawback of the mechanism described
+%D here. The closing command must start at the first position
+%D of the line. In \CONTEXT\ we will not have this drawback,
+%D because we can test if the end command is a substring of the
+%D current line. The testing is done by two of the support
+%D macros, which of course are not available in a stand alone
+%D application of this module.
+
+\ifx \undefined \doifinstringelse \else
+
+\def\processdisplayverbatim#1%
+ {\par
+ \bgroup
+ \escapechar=-1
+ \xdef\verbatimname{\string#1}%
+ \egroup
+ \def\endofdisplayverbatim{\csname\verbatimname\endcsname}%
+ \bgroup
+ \parindent\!!zeropoint
+ \ifdim\lastskip<\parskip
+ \removelastskip
+ \vskip\parskip
+ \fi
+ \parskip\!!zeropoint
+ \processingverbatimtrue
+ \expandafter\let\csname\verbatimname\endcsname=\relax
+ \expandafter\convertargument\csname\verbatimname\endcsname
+ \to\endofverbatimcommand
+ \verbatimfont
+ \setupcopyverbatim
+ \ifskipfirstverbatimline
+ \let\doverbatimline=\relax
+ \else
+ \let\doverbatimline=\dodoverbatimline
+ \fi
+ \copyverbatimline}
+
+\let\doifendofverbatim=\doifelse
+
+\def\permitshiftedendofverbatim%
+ {\let\doifendofverbatim=\doifinstringelse}
+
+{\obeylines%
+ \long\gdef\copyverbatimline#1
+ {\ifx\doverbatimline\relax% gobble rest of the first line
+ \let\doverbatimline=\dodoverbatimline%
+ \def\next{\copyverbatimline}%
+ \else%
+ \convertargument#1 \to\next%
+ \ifx\next\emptyspace%
+ \def\next%
+ {\doemptyverbatimline{#1}%
+ \copyverbatimline}%
+ \else%
+ \doifendofverbatim{\endofverbatimcommand}{\next}%
+ {\def\next%
+ {\egroup\endofdisplayverbatim}}%
+ {\def\next%
+ {\doverbatimline{#1}%
+ \copyverbatimline}}%
+ \fi%
+ \fi%
+ \next}}
+
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-vis.tex b/tex/context/base/supp-vis.tex new file mode 100644 index 000000000..ee3cd280f --- /dev/null +++ b/tex/context/base/supp-vis.tex @@ -0,0 +1,1900 @@ +%D \module
+%D [ file=supp-vis,
+%D version=1996.10.21,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Visualization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D \gdef\ShowBufferedExample% private typeseting macro
+%D {\startregelcorrectie
+%D \bgroup
+%D \steltypenin[marge=0pt,optie=kleur]
+%D \showmakeup
+%D \centeredvcuetrue
+%D \dontinterfere
+%D \baselinerulefalse
+%D \normalvbox
+%D {\normalhbox to \hsize
+%D {$\hsize=.5\hsize
+%D \advance\hsize by -.5em
+%D \normalvcenter{\vbox{\haalbuffer}}\normalhss
+%D \normalvcenter{\vbox{\dontshowcomposition\typebuffer}}$}}
+%D \egroup
+%D \stopregelcorrectie}
+%D
+%D \gdef\ShowBufferedExampleBox% private typeseting macro
+%D {\startregelcorrectie
+%D \bgroup
+%D \steltypenin[marge=0pt,optie=kleur]
+%D \showmakeup
+%D \centeredvcuetrue
+%D \dontinterfere
+%D \baselinerulefalse
+%D \normalvbox
+%D {\normalhbox to \hsize
+%D {$\hsize=.5\hsize
+%D \advance\hsize by -.5em
+%D \normalvcenter{\baselineruletrue\vbox{\haalbuffer}}\normalhss
+%D \normalvcenter{\vbox{\dontshowcomposition\typebuffer}}$}}
+%D \egroup
+%D \stopregelcorrectie}
+
+%D Although an integral part of \CONTEXT, this module is one
+%D of the support modules. Its stand alone character permits
+%D use in \PLAIN\ \TEX\ or \TEX\ based macropackages.
+%D \ifCONTEXT \else If in some examples the verbatim listings
+%D don't show up nice, this is due to processing by a system
+%D that does not support buffering. In \CONTEXT\ we show the
+%D commands in the margin, use bit more advanced way of
+%D numbering, and typeset the source in \TEX nicolored
+%D verbatim. Sorry for this inconvenience.\fi
+
+%D This module is still in development. Depending on my
+%D personal need and those of whoever uses it, the macros will
+%D be improved in terms of visualization, efficiency and
+%D compatibility.
+
+\ifx \undefined \writestatus \input supp-mis.tex \fi
+
+%D One of the strong points of \TEX\ is abstraction of textual
+%D input. When macros are defined well and do what we
+%D want them to do, we will seldom need the tools present in
+%D What You See Is What You Get systems. For instance, when
+%D entering text we don't need rulers, because no manual
+%D shifting and/or alignment of text is needed. On the other
+%D hand, when we are designing macros or specifying layout
+%D elements, some insight in \TEX's advanced spacing, kerning,
+%D filling, boxing and punishment abilities will be handy.
+%D That's why we've implemented a mechanism that shows some of
+%D the inner secrets of \TEX.
+
+\writestatus{loading}{Context Support Macros / Visualization}
+
+%D In this module we are going to redefine some \TEX\
+%D primitives and \PLAIN\ macro's. Their original meaning is
+%D saved in macros with corresponding names, preceded by
+%D \type{normal}. These original macros are (1)~used to
+%D temporary restore the old values when needed and
+%D (2)~used to prevent recursive calls in the macros that
+%D replace them.
+
+\unprotect
+
+%D \macros
+%D {normalhbox,
+%D normalvbox,normalvtop}
+%D {}
+%D
+%D There are three types of boxes, one horizontal and two
+%D vertical in nature. As we will see later on, all three types
+%D are to be handled according to their orientation and
+%D baseline behavior. Especially \type{\vtop}'s need our
+%D special attention.
+
+\let\normalhbox = \hbox
+\let\normalvbox = \vbox
+\let\normalvtop = \vtop
+\let\normalvcenter = \vcenter
+
+%D \macros
+%D {normalhskip,
+%D normalvskip}
+%D {}
+%D
+%D Next come the flexible skips, which come in two flavors
+%D too. Like boxes these are handled with \TEX\ primitives.
+
+\let\normalhskip = \hskip
+\let\normalvskip = \vskip
+
+%D \macros
+%D {normalpenalty,
+%D normalkern}
+%D {}
+%D
+%D Both penalties and kerns are taken care of by mode sensitive
+%D primitives. This means that when making them visible, we
+%D have to take the current mode into account.
+
+\let\normalpenalty = \penalty
+\let\normalkern = \kern
+
+%D \macros
+%D {normalhglue,
+%D normalvglue}
+%D {}
+%D
+%D Glues on the other hand are macro's defined in \PLAIN\ \TEX.
+%D As we will see, their definitions make the implementation of
+%D their visible counterparts a bit more \TeX{}nical.
+
+\let\normalhglue = \hglue
+\let\normalvglue = \vglue
+
+%D \macros
+%D {normalmkern,
+%D normalmskip}
+%D {}
+%D
+%D Math mode has its own spacing primitives, preceded by
+%D \type{m}. Due to the relation with the current font and the
+%D way math is typeset, their unit \type{mu} is not compatible
+%D with other dimensions. As a result, the visual appearance
+%D of these primitives is kept primitive too.
+
+\let\normalmkern = \mkern
+\let\normalmskip = \mskip
+
+%D \macros
+%D {hfilneg,
+%D vfilneg}
+%D {}
+%D
+%D Fills can be made visible quite easy. We only need some
+%D additional negation macros. Because \PLAIN\ \TEX\ only
+%D offers \type{\hfilneg} and \type{\vfilneg}, we define our
+%D own alternative double \type{ll}'ed ones.
+
+\def\hfillneg%
+ {\normalhskip\!!zeropoint \!!plus-1fill\relax}
+
+\def\vfillneg%
+ {\normalvskip\!!zeropoint \!!plus-1fill\relax}
+
+%D \macros
+%D {normalhss,normalhfil,normalhfill,
+%D normalvss,normalvfil,normalvfill}
+%D {}
+%D
+%D The positive stretch primitives are used independant and in
+%D combination with \type{\leaders}.
+
+\let\normalhss = \hss
+\let\normalhfil = \hfil
+\let\normalhfill = \hfill
+\let\normalvss = \vss
+\let\normalvfil = \vfil
+\let\normalvfill = \vfill
+
+%D \macros
+%D {normalhfilneg,normalhfillneg,
+%D normalvfilneg,normalvfillneg}
+%D {}
+%D
+%D Keep in mind that both \type{\hfillneg} and \type{\vfillneg}
+%D are not part of \PLAIN\ \TEX\ and therefore not documented
+%D in standard \TEX\ documentation. They can nevertheless be
+%D used at will.
+
+\let\normalhfilneg = \hfilneg
+\let\normalhfillneg = \hfillneg
+\let\normalvfilneg = \vfilneg
+\let\normalvfillneg = \vfillneg
+
+%D Visualization is not always wanted. Instead of turning this
+%D option off in those (unpredictable) situations, we just
+%D redefine a few \PLAIN\ macros.
+
+\def\rlap#1{\normalhbox to \!!zeropoint{#1\normalhss}}
+\def\llap#1{\normalhbox to \!!zeropoint{\normalhss#1}}
+
+\def~{\normalpenalty\!!tenthousand\ }
+
+%D \macros
+%D {makeruledbox}
+%D {}
+%D
+%D Ruled boxes can be typeset is many ways. Here we present
+%D just one alternative. This implementation may be a little
+%D complicated, but it supports all three kind of boxes. The
+%D next command expects a \BOX\ specification, like:
+%D
+%D \starttypen
+%D \makeruledbox0
+%D \stoptypen
+
+%D \macros
+%D {baselinerule,baselinefill}
+%D {}
+%D
+%D We can make the baseline of a box visible, both dashed and
+%D as a rule. The line is drawn on top of the baseline. All
+%D we have to say is:
+%D
+%D \starttypen
+%D \baselineruletrue
+%D \baselinefilltrue
+%D \stoptypen
+%D
+%D At the cost of some overhead these alternatives are
+%D implemented using \type{\if}'s:
+
+\newif\ifbaselinerule \baselineruletrue
+\newif\ifbaselinefill \baselinefillfalse
+
+%D \macros
+%D {iftoprule,ifbottomrule,ifleftrule,ifrightrule}
+%D {}
+%D
+%D Rules can be turned on and off, but by default we have:
+%D
+%D \starttypen
+%D \topruletrue
+%D \bottomruletrue
+%D \leftruletrue
+%D \rightruletrue
+%D \stoptypen
+%D
+%D As we see below:
+
+\newif\iftoprule \topruletrue
+\newif\ifbottomrule \bottomruletrue
+\newif\ifleftrule \leftruletrue
+\newif\ifrightrule \rightruletrue
+
+%D \macros
+%D {boxrulewidth}
+%D {}
+%D
+%D The width in the surrounding rules can be specified by
+%D assigning an apropriate value to the dimension used. This
+%D module defaults the width to:
+%D
+%D \starttypen
+%D \boxrulewidth=.2pt
+%D \stoptypen
+%D
+%D Although we are already low on \DIMENSIONS\ it's best to
+%D spend one here, mainly because it enables easy manipulation,
+%D like multiplication by a given factor.
+
+\newdimen\boxrulewidth \boxrulewidth=.2pt
+
+%D The core macro \type{\makeruledbox} looks a bit hefty. The
+%D manipulation at the end is needed because we want to
+%D preserve both the mode and the baseline. This means that
+%D \type{\vtop}'s and \type{\vbox}'es behave the way we expect
+%D them to do.
+%D
+%D \startregelcorrectie
+%D \hbox
+%D {\ruledhbox to 5em{\strut test\normalhss}\hskip1em
+%D \ruledvbox{\hsize 5em\strut test \par test\strut}\hskip1em
+%D \ruledvtop{\hsize 5em\strut test \par test\strut}}
+%D \stopregelcorrectie
+%D
+%D The \type{\cleaders} part of the macro is responsible for
+%D the visual baseline. The \type{\normalhfill} belongs to this
+%D primitive too. By storing and restoring the height and depth
+%D of box \type{#1}, we preserve the mode.
+
+\def\makeruledbox#1%
+ {\edef\ruledheight {\the\ht#1}%
+ \edef\ruleddepth {\the\dp#1}%
+ \edef\ruledwidth {\the\wd#1}%
+ \setbox\scratchbox=\normalvbox
+ {\dontcomplain
+ \offinterlineskip
+ \hrule
+ \!!height\boxrulewidth
+ \iftoprule\else\!!width\!!zeropoint\fi
+ \normalvskip-\boxrulewidth
+ \normalhbox to \ruledwidth
+ {\vrule
+ \!!height\ruledheight
+ \!!depth\ruleddepth
+ \!!width\ifleftrule\else0\fi\boxrulewidth
+ \ifdim\ruledheight>\!!zeropoint \else \baselinerulefalse \fi
+ \ifdim\ruleddepth>\!!zeropoint \else \baselinerulefalse \fi
+ \ifbaselinerule
+ \ifdim\ruledwidth<20\boxrulewidth
+ \baselinefilltrue
+ \fi
+ \cleaders
+ \ifbaselinefill
+ \hrule
+ \!!height\boxrulewidth
+ \else
+ \normalhbox
+ {\normalhskip2.5\boxrulewidth
+ \vrule
+ \!!height\boxrulewidth
+ \!!width5\boxrulewidth
+ \normalhskip2.5\boxrulewidth}%
+ \fi
+ \fi
+ \normalhfill
+ \vrule
+ \!!width\ifrightrule\else0\fi\boxrulewidth}%
+ \normalvskip-\boxrulewidth
+ \hrule
+ \!!height\boxrulewidth
+ \ifbottomrule\else\!!width\!!zeropoint\fi}%
+ \wd#1=\!!zeropoint
+ \setbox#1=\ifhbox#1\normalhbox\else\normalvbox\fi
+ {\normalhbox{\box#1\lower\ruleddepth\box\scratchbox}}%
+ \ht#1=\ruledheight
+ \wd#1=\ruledwidth
+ \dp#1=\ruleddepth}
+
+%D Just in case one didn't notice: the rules are in fact layed
+%D over the box. This way the contents of a box cannot
+%D visually interfere with the rules around (upon) it. A more
+%D advanced version of ruled boxes can be found in one of the
+%D core modules of \CONTEXT. There we take offsets, color,
+%D rounded corners, backgrounds and alignment into account too.
+
+%D \macros
+%D {ruledhbox,
+%D ruledvbox,ruledvtop,
+%D ruledvcenter}
+%D {}
+%D
+%D These macro's can be used instead of \type{\hbox},
+%D \type{\vbox}, \type{\vtop} and, when in math mode,
+%D \type{\vcenter}. They just do what their names state. Using
+%D an auxiliary macro would save us a few words of memory, but
+%D it would make their appearance even more obscure.
+%D
+%D \startbuffer
+%D \hbox
+%D {\strut
+%D one
+%D two
+%D \hbox{three}
+%D four
+%D five}
+%D \stopbuffer
+%D
+%D \ShowBufferedExampleBox
+
+\def\ruledhbox%
+ {\normalhbox\bgroup
+ \dowithnextbox{\makeruledbox\nextbox\box\nextbox\egroup}%
+ \normalhbox}
+
+%D \startbuffer
+%D \vbox
+%D {\strut
+%D first line \par
+%D second line \par
+%D third line \par
+%D fourth line \par
+%D fifth line
+%D \strut }
+%D \stopbuffer
+%D
+%D \ShowBufferedExampleBox
+
+\def\ruledvbox%
+ {\normalvbox\bgroup
+ \dowithnextbox{\makeruledbox\nextbox\box\nextbox\egroup}%
+ \normalvbox}
+
+%D \startbuffer
+%D \vtop
+%D {\strut
+%D first line \par
+%D second line \par
+%D third line \par
+%D fourth line \par
+%D fifth line
+%D \strut }
+%D \stopbuffer
+%D
+%D \ShowBufferedExampleBox
+
+\def\ruledvtop%
+ {\normalvtop\bgroup
+ \dowithnextbox{\makeruledbox\nextbox\box\nextbox\egroup}%
+ \normalvtop}
+
+%D \startbuffer
+%D \hbox
+%D {$\vcenter{\hsize.2\hsize
+%D alfa \par beta}$
+%D $\vcenter to 3cm{\hsize.2\hsize
+%D alfa \par beta \par gamma}$
+%D $\vcenter{\hsize.2\hsize
+%D alfa \par beta}$}
+%D \stopbuffer
+%D
+%D \ShowBufferedExampleBox
+
+\def\ruledvcenter%
+ {\normalvbox\bgroup
+ \dontinterfere
+ \dowithnextbox
+ {\scratchdimen=.5\ht\nextbox
+ \advance\scratchdimen by .5\dp\nextbox
+ \ht\nextbox=\scratchdimen
+ \dp\nextbox=\scratchdimen
+ \ruledhbox{\box\nextbox}%
+ \egroup}%
+ \normalvbox}
+
+%D \macros
+%D {ruledbox,
+%D setruledbox}
+%D {}
+%D
+%D Of the next two macros the first can be used to precede a
+%D box of ones own choice. One can for instance prefix boxes
+%D with \type{\ruledbox} and afterwards --- when the macro
+%D satisfy the needs --- let it to \type{\relax}.
+%D
+%D \starttypen
+%D \ruledbox\hbox{What rules do you mean?}
+%D \stoptypen
+%D
+%D The macro \type{\setruledbox} can be used to directly
+%D rule a box.
+%D
+%D \starttypen
+%D \setruledbox12=\hbox{Who's talking about rules here?}
+%D \stoptypen
+%D
+%D At the cost of some extra macros we can implement a
+%D variant that does not need the~\type{=}, but we stick to:
+
+\def\ruledbox%
+ {\dowithnextbox{\makeruledbox\nextbox\box\nextbox}}
+
+\def\setruledbox#1=%
+ {\dowithnextbox{\makeruledbox\nextbox\setbox#1=\nextbox}}
+
+%D \macros
+%D {investigateskip,
+%D investigatecount,
+%D investigatemuskip}
+%D {}
+%D
+%D Before we meet the visualizing macro's, we first implement
+%D ourselves some handy utility ones. Just for the sake of
+%D efficiency and readability, we introduce some status
+%D variables, that tell us a bit more about the registers we
+%D use:
+%D
+%D \starttypen
+%D \ifflexible
+%D \ifzero
+%D \ifnegative
+%D \ifpositive
+%D \stoptypen
+%D
+%D These status variables are set when we call for one of the
+%D investigation macros, e.g.
+%D
+%D \starttypen
+%D \investigateskip\scratchskip
+%D \stoptypen
+%D
+%D We use some dirty trick to check stretchability of \SKIPS.
+%D Users of these macros are invited to study their exact
+%D behavior first. The positive and negative states both
+%D include zero and are in fact non-negative ($\geq0$) and
+%D non-positive ($\leq0$) .
+
+\newif\ifflexible
+\newif\ifzero
+\newif\ifnegative
+\newif\ifpositive
+
+\def\investigateskip#1%
+ {\relax
+ \scratchdimen=#1\relax
+ \edef\!!stringa{\the\scratchdimen}%
+ \edef\!!stringb{\the#1}%
+ \ifx\!!stringa\!!stringb \flexiblefalse \else \flexibletrue \fi
+ \ifdim#1=\!!zeropoint\relax
+ \zerotrue \else
+ \zerofalse \fi
+ \ifdim#1<\!!zeropoint\relax
+ \positivefalse \else
+ \positivetrue \fi
+ \ifdim#1>\!!zeropoint\relax
+ \negativefalse \else
+ \negativetrue \fi}
+
+\def\investigatecount#1%
+ {\relax
+ \flexiblefalse
+ \ifnum#1=0
+ \zerotrue \else
+ \zerofalse \fi
+ \ifnum#1<0
+ \positivefalse \else
+ \positivetrue \fi
+ \ifnum#1>0
+ \negativefalse \else
+ \negativetrue \fi}
+
+\def\investigatemuskip#1%
+ {\relax
+ \edef\!!stringa{\the\scratchmuskip}%
+ \edef\!!stringb{0mu}%
+ \def\!!stringc##1##2\\{##1}%
+ \expandafter\edef\expandafter\!!stringc\expandafter
+ {\expandafter\!!stringc\!!stringa\\}%
+ \edef\!!stringd{-}%
+ \flexiblefalse
+ \ifx\!!stringa\!!stringb
+ \zerotrue
+ \negativefalse
+ \positivefalse
+ \else
+ \zerofalse
+ \ifx\!!stringc\!!stringd
+ \positivefalse
+ \negativetrue
+ \else
+ \positivetrue
+ \negativefalse
+ \fi
+ \fi}
+
+%D \macros
+%D {dontinterfere}
+%D {}
+%D
+%D Indentation, left and/or right skips, redefinition of
+%D \type{\par} and assignments to \type{\everypar} can lead to
+%D unwanted results. We can therefore turn all those things
+%D off with \type{\dontinterfere}.
+
+\def\dontinterfere%
+ {\everypar = {}%
+ \let\par = \endgraf
+ \parindent = \!!zeropoint
+ \parskip = \!!zeropoint
+ \leftskip = \!!zeropoint
+ \rightskip = \!!zeropoint
+ \relax}
+
+%D \macros
+%D {dontcomplain}
+%D {}
+%D
+%D In this module we do a lot of box manipulations. Because we
+%D don't want to be confronted with to many over- and underfull
+%D messages we introduce \type{\dontcomplain}.
+
+\def\dontcomplain%
+ {\hbadness = \!!tenthousand
+ \hfuzz = \maxdimen
+ \vbadness = \!!tenthousand
+ \vfuzz = \maxdimen}
+
+%D Now the neccessary utility macros are defined, we can make a
+%D start with the visualizing ones. The implementation of these
+%D macros is a compromise between readability, efficiency of
+%D coding and processing speed. Sometimes we do in steps what
+%D could have been done in combination, sometimes we use a few
+%D boxes more or less then actually needed, and more than once
+%D one can find the same piece of rule drawing code twice.
+
+%D \macros
+%D {ifcenteredvcue,normalvcue}
+%D {}
+%D
+%D Depending on the context, one can force visual vertical cues
+%D being centered along \type{\hsize} or being put at the
+%D current position. Although centering often looks better,
+%D we've chosen the second alternative as default. The main
+%D reason for doing so is that often when we don't set the
+%D \type{\hsize} ourselves, \TEX\ takes the value of the
+%D surrounding box. As a result the visual cues can migrate
+%D outside the current context.
+%D
+%D This behavior is accomplished by a small but effective
+%D auxiliary macro, which behavior can be influenced by the
+%D boolean \type{\centeredvcue}. By saying
+%D
+%D \starttypen
+%D \centeredvcuetrue
+%D \stoptypen
+%D
+%D one turns centering on. As said, we turn it off.
+
+\newif\ifcenteredvcue \centeredvcuefalse
+
+\def\normalvcue#1%
+ {\normalhbox \ifcenteredvcue to \hsize \fi {\normalhss#1\normalhss}}
+
+%D We could have used the more robust version
+%D
+%D \starttypen
+%D \def\normalvcue%
+%D {\normalhbox \ifcenteredvcue to \hsize \fi
+%D \bgroup\bgroup\normalhss
+%D \aftergroup\normalhss\aftergroup\egroup
+%D \let\next=}
+%D \stoptypen
+%D
+%D or the probably best one:
+%D
+%D \starttypen
+%D \def\normalvcue%
+%D {\hbox \ifcenteredvcue to \hsize
+%D \bgroup\bgroup\normalhss
+%D \aftergroup\normalhss\aftergroup\egroup
+%D \else
+%D \bgroup
+%D \fi
+%D \let\next=}
+%D \stoptypen
+%D
+%D Because we don't have to preserve \CATCODES\ and only use
+%D small arguments, we stick to the first alternative.
+
+%D \macros
+%D {testrulewidth}
+%D {}
+%D
+%D We build our visual cues out of rules. At the cost of a much
+%D bigger \DVI\ file, this is to be prefered over using
+%D characters (1)~because we cannot be sure of their
+%D availability and (2)~because their dimensions are fixed.
+%D
+%D As with ruled boxes, we use a \DIMENSION\ to specify the
+%D width of the ruled elements. This dimension defaults to:
+%D
+%D \starttypen
+%D \testrulewidth=\boxrulewidth
+%D \stoptypen
+%D
+%D Because we prefer whole numbers for specifying the
+%D dimensions, we often use even multiples of
+%D \type{\testrulewidth}.
+
+%D \macros
+%D {visiblestretch}
+%D {}
+%D
+%D A second variable is introduced because of the stretch
+%D components of \SKIPS. At the cost of some accuracy we can
+%D make this stretch visible.
+%D
+%D \starttypen
+%D \visiblestretchtrue
+%D \stoptypen
+
+\newdimen\testrulewidth \testrulewidth=\boxrulewidth
+\newif\ifvisiblestretch \visiblestretchfalse
+
+%D \macros
+%D {ruledhss,
+%D ruledhfil,ruledhfilneg,
+%D ruledhfill,ruledhfillneg}
+%D {}
+%D
+%D We start with the easiest part, the fills. The scheme we
+%D follow is {\em visual filling -- going back -- normal
+%D filling}. Visualizing is implemented using \type{\cleaders}.
+%D Because the \BOX\ that follows this command is constructed
+%D only once, the \type{\copy} is not really a prerequisite. We
+%D prefer using a \type{\normalhbox} here instead of a
+%D \type{\hbox}.
+
+\def\setvisiblehfilbox#1\to#2#3#4%
+ {\setbox#1=\normalhbox
+ {\vrule
+ \!!width#2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth}%
+ \smashbox#1}
+
+\def\doruledhfiller#1#2#3#4%
+ {#1#2%
+ \bgroup
+ \dontinterfere
+ \dontcomplain
+ \setvisiblehfilbox0\to{4}{#3}{#4}%
+ \setvisiblehfilbox2\to422%
+ \copy0\copy2
+ \bgroup
+ \setvisiblehfilbox0\to422%
+ \cleaders
+ \normalhbox to 12\testrulewidth
+ {\normalhss\copy0\normalhss}%
+ #1%
+ \egroup
+ \setbox0=\normalhbox
+ {\normalhskip-4\testrulewidth\copy0\copy2}%
+ \smashbox0
+ \box0
+ \egroup}
+
+%D The horizontal fillers differ in their boundary
+%D visualization. Watch the small dots. Fillers can be
+%D combined within reasonable margins.
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\type{\hss}\ruledhss test}
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\type{\hfil}\ruledhfil test}
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\type{\hfill}\ruledhfill test}
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut
+%D \type{\hfil}\type{\hfil}\ruledhfil\ruledhfil
+%D test%
+%D \ruledhfil\type{\hfil}}
+%D \stopregelcorrectie
+%D
+%D The negative counterparts are visualizes, but seldom
+%D become visible, apart from their boundaries.
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\type{\hfilneg}\ruledhfilneg test}
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\type{\hfillneg}\ruledhfillneg test}
+%D \stopregelcorrectie
+%D
+%D Although leaders are used for visualizing, they are
+%D visualized themselves correctly as the next example shows.
+%D
+%D \startregelcorrectie
+%D \baselinerulefalse
+%D \ruledhbox to \hsize
+%D {\strut\cleaders\normalhbox to 2em{\normalhss$\circ$\normalhss}\ruledhfill}
+%D \stopregelcorrectie
+%D
+%D All five substitutions use the same auxiliary macro. Watch
+%D the positive first -- negative next approach.
+
+\def\ruledhss%
+ {\doruledhfiller\normalhss\normalhfilneg{0}{0}}
+
+\def\ruledhfil%
+ {\doruledhfiller\normalhfil\normalhfilneg{10}{-6}}
+
+\def\ruledhfill%
+ {\doruledhfiller\normalhfill\normalhfillneg{18}{-14}}
+
+\def\ruledhfilneg%
+ {\doruledhfiller\normalhfilneg\normalhfil{-6}{10}}
+
+\def\ruledhfillneg%
+ {\doruledhfiller\normalhfillneg\normalhfill{-14}{18}}
+
+%D \macros
+%D {ruledvss,
+%D ruledvfil,ruledvfilneg,
+%D ruledvfill,ruledvfillneg}
+%D {}
+%D
+%D The vertical mode commands adopt the same visualization
+%D scheme, but are implemented in a slightly different way.
+
+\def\setvisiblevfilbox#1\to#2#3#4%
+ {\setbox#1=\normalhbox
+ {\vrule
+ \!!width#2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth}%
+ \smashbox#1}%
+
+\def\doruledvfiller#1#2#3%
+ {#1#2%
+ \bgroup
+ \dontinterfere
+ \dontcomplain
+ \offinterlineskip
+ \setvisiblevfilbox0\to422%
+ \setbox2=\normalvcue
+ {\normalhskip -#3\testrulewidth\copy0}%
+ \smashbox2
+ \copy2
+ \bgroup
+ \setbox2=\normalvcue
+ {\normalhskip -2\testrulewidth\copy0}%
+ \smashbox2
+ \copy2
+ \cleaders
+ \normalvbox to 12\testrulewidth
+ {\normalvss\copy2\normalvss}%
+ #1%
+ \setbox2=\normalvbox
+ {\normalvskip-2\testrulewidth\copy2}%
+ \smashbox2
+ \box2
+ \egroup
+ \box2
+ \egroup}
+
+%D Because they act the same as their horizontal counterparts
+%D we only show a few examples.
+%D
+%D \startregelcorrectie
+%D \hbox to \hsize
+%D {\dontinterfere
+%D \baselinerulefalse
+%D \centeredvcuetrue
+%D \ruledvbox to 10ex
+%D {\hsize.18\hsize
+%D \type{\vss}\ruledvss last line}\normalhss
+%D \ruledvbox to 10ex
+%D {\hsize.18\hsize
+%D \type{\vfil}\ruledvfil last line}\normalhss
+%D \ruledvbox to 10ex
+%D {\hsize.18\hsize
+%D \type{\vfill}\ruledvfill last line}\normalhss
+%D \ruledvbox to 10ex
+%D {\hsize.18\hsize
+%D \type{\vfilneg}\ruledvfilneg last line}\normalhss
+%D \ruledvbox to 10ex
+%D {\hsize.18\hsize
+%D \type{\vfillneg}\ruledvfillneg last line}}
+%D \stopregelcorrectie
+%D
+%D Keep in mind that \type{\vfillneg} is not part of \PLAIN\
+%D \TEX, but are mimmicked by a macro.
+
+\def\ruledvss%
+ {\doruledvfiller\normalvss\normalvfilneg{2}}
+
+\def\ruledvfil%
+ {\doruledvfiller\normalvfil\normalvfilneg{-4}}
+
+\def\ruledvfill%
+ {\doruledvfiller\normalvfill\normalvfillneg{-12}}
+
+\def\ruledvfilneg%
+ {\doruledvfiller\normalvfilneg\normalvfil{8}}
+
+\def\ruledvfillneg%
+ {\doruledvfiller\normalvfillneg\normalvfill{16}}
+
+%D \macros
+%D {ruledhskip}
+%D {}
+%D
+%D Skips differ from kerns in two important aspects:
+%D
+%D \startopsomming[opelkaar]
+%D \som line and pagebreaks are allowed at a skip
+%D \som skips can have a positive and/or negative
+%D stretchcomponent
+%D \stopopsomming
+%D
+%D Stated a bit different: kerns are fixed skips at which no
+%D line or pagebreak can occur. Because skips have a more open
+%D character, they are visualized in a open way.
+%D
+%D \startbuffer
+%D one
+%D \hskip +30pt plus 5pt
+%D two
+%D \hskip +30pt
+%D \hskip -10pt plus 5pt
+%D three
+%D \hskip 0pt
+%D four
+%D \hskip +30pt
+%D five
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+%D
+%D When skips have a stretch component, this is visualized by
+%D means of a dashed line. Positive skips are on top of the
+%D baseline, negative ones are below it. This way we can show
+%D the combined results. An alternative visualization of
+%D stretch could be drawing the mid line over a length of the
+%D stretch, in positive or negative direction.
+
+\def\doruledhskip%
+ {\relax
+ \dontinterfere
+ \dontcomplain
+ \investigateskip\scratchskip
+ \ifzero
+ \setbox0=\normalhbox
+ {\normalhskip-\testrulewidth
+ \vrule
+ \!!width4\testrulewidth
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth}%
+ \else
+ \setbox0=\normalhbox to \ifnegative-\fi\scratchskip
+ {\vrule
+ \!!width2\testrulewidth
+ \ifnegative\!!depth\else\!!height\fi16\testrulewidth
+ \cleaders
+ \hrule
+ \ifnegative
+ \!!depth2\testrulewidth
+ \!!height\!!zeropoint
+ \else
+ \!!height2\testrulewidth
+ \!!depth\!!zeropoint
+ \fi
+ \normalhfill
+ \ifflexible
+ \normalhskip\ifnegative\else-\fi\scratchskip
+ \normalhskip2\testrulewidth
+ \cleaders
+ \normalhbox
+ {\normalhskip 2\testrulewidth
+ \vrule
+ \!!width2\testrulewidth
+ \!!height\ifnegative-7\else9\fi\testrulewidth
+ \!!depth\ifnegative9\else-7\fi\testrulewidth
+ \normalhskip 2\testrulewidth}%
+ \normalhfill
+ \fi
+ \vrule
+ \!!width2\testrulewidth
+ \ifnegative\!!depth\else\!!height\fi16\testrulewidth}%
+ \setbox0=\normalhbox
+ {\ifnegative\else\normalhskip-\scratchskip\fi
+ \box0}%
+ \fi
+ \smashbox0%
+ \ifvisiblestretch \else
+ \flexiblefalse
+ \fi
+ \ifflexible
+ % breaks ok but small displacements can occur
+ \skip2=\scratchskip
+ \advance\skip2 by -1\scratchskip
+ \divide\skip2 by 2
+ \advance\scratchskip by -\skip2
+ \normalhskip\scratchskip
+ \normalpenalty\!!tenthousand
+ \box0
+ \normalhskip\skip2
+ \else
+ \normalhskip\scratchskip
+ \box0
+ \fi
+ \egroup}
+
+\def\ruledhskip%
+ {\bgroup
+ \afterassignment\doruledhskip
+ \scratchskip=}
+
+%D The visual skip is located at a feasible point. Normally
+%D this does not interfere with the normaltypesetting process.
+%D The next examples show (1)~the default behavior, (2)~the
+%D (not entirely correct) distributed stretch and (3)~the way
+%D the text is typeset without cues.
+%D
+%D \startbuffer
+%D \dorecurse
+%D {15}
+%D {test\hskip1em plus .5em minus .5em
+%D test\hskip2em
+%D test}
+%D \stopbuffer
+%D
+%D \startregelcorrectie
+%D \showmakeup
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \showmakeup
+%D \visiblestretchtrue
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+
+%D \macros
+%D {ruledvskip}
+%D {}
+%D
+%D We are less fortunate when implementing the vertical skips.
+%D This is a direct result of interference between the boxes that
+%D visualize the skip and skip removal at a pagebreak. Normally
+%D skips disappear at the top of a page, but not of course when
+%D visualized in a \type{\vbox}. A quite perfect simulation
+%D could have been built if we would have had available two
+%D more primitives: \type{\hnop} and \type{\vnop}. These new
+%D primitives could stand for boxes that are visible but are
+%D not taken into account in any way. They are there for us,
+%D but not for \TEX.
+%D
+%D \startbuffer
+%D first line
+%D \vskip +30pt plus 5pt
+%D second line
+%D \vskip +30pt
+%D \vskip -10pt plus 5pt
+%D third line
+%D \par
+%D fourth line
+%D \vskip +30pt
+%D fifth line
+%D \vskip 0pt
+%D sixth line
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+%D
+%D We have to postpone \type{\prevdepth}. Although this
+%D precaution probably is not completely waterproof, it works
+%D quite well.
+
+\def\dodoruledvskip%
+ {\nextdepth=\prevdepth
+ \dontinterfere
+ \dontcomplain
+ \offinterlineskip
+ \investigateskip\scratchskip
+ \ifzero
+ \setbox0=\normalvcue
+ {\vrule
+ \!!width32\testrulewidth
+ \!!height2\testrulewidth
+ \!!depth2\testrulewidth}%
+ \else
+ \setbox0=\normalvbox to \ifnegative-\fi\scratchskip
+ {\hrule
+ \!!width16\testrulewidth
+ \!!height2\testrulewidth
+ \ifflexible
+ \cleaders
+ \normalhbox to 16\testrulewidth
+ {\normalhss
+ \normalvbox
+ {\normalvskip 2\testrulewidth
+ \hrule
+ \!!width2\testrulewidth
+ \!!height2\testrulewidth
+ \normalvskip 2\testrulewidth}%
+ \normalhss}%
+ \normalvfill
+ \else
+ \normalvfill
+ \fi
+ \hrule
+ \!!width16\testrulewidth
+ \!!height2\testrulewidth}%
+ \setbox2=\normalvbox to \ht0
+ {\hrule
+ \!!width2\testrulewidth
+ \!!height\ht0}%
+ \ifnegative
+ \ht0=\!!zeropoint
+ \setbox0=\normalhbox
+ {\normalhskip2\testrulewidth % will be improved
+ \normalhskip-\wd0\box0}%
+ \fi
+ \smashbox0%
+ \smashbox2%
+ \setbox0=\normalvcue
+ {\box2\box0}%
+ \setbox0=\normalvbox
+ {\ifnegative\normalvskip\scratchskip\fi\box0}%
+ \smashbox0%
+ \fi
+ \ifvisiblestretch
+ \ifflexible
+ \skip2=\scratchskip
+ \advance\skip2 by -1\scratchskip
+ \divide\skip2 by 2
+ \advance\scratchskip by -\skip2
+ \normalvskip\skip2
+ \fi
+ \fi
+ \normalpenalty\!!tenthousand
+ \box0
+ \prevdepth=\nextdepth % not \dp0=\nextdepth
+ \normalvskip\scratchskip}
+
+%D We try to avoid interfering at the top of a page. Of course
+%D we only do so when we are in the main vertical list.
+
+\def\doruledvskip%
+ {\endgraf % \par
+ \ifdim\pagegoal=\maxdimen
+ \ifinner
+ \dodoruledvskip
+ \fi
+ \else
+ \dodoruledvskip
+ \fi
+ \egroup}
+
+\def\ruledvskip%
+ {\bgroup
+ \afterassignment\doruledvskip
+ \scratchskip=}
+
+%D \macros
+%D {ruledkern}
+%D {}
+%D
+%D The macros that implement the kerns are a bit more
+%D complicated than needed, because they also serve the
+%D visualization of glue, our \PLAIN\ defined kerns with
+%D stretch or shrink. We've implemented both horizontal and
+%D vertical kerns as ruled boxes.
+%D
+%D \startbuffer
+%D one
+%D \kern +30pt
+%D two
+%D \kern +30pt
+%D \kern -10pt
+%D three
+%D \kern 0pt
+%D four
+%D \kern +30pt
+%D five
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+%D
+%D Positive and negative kerns are placed on top or below the
+%D baseline, so we are able to track their added result. We
+%D didn't mention spacings of 0~pt yet. Zero values are
+%D visualized a bit different, because we want to see them
+%D anyhow.
+
+\def\doruledhkern%
+ {\dontinterfere
+ \dontcomplain
+ \baselinerulefalse
+ \investigateskip\scratchskip
+ \boxrulewidth=2\testrulewidth
+ \ifzero
+ \setbox0=\ruledhbox to 8\testrulewidth
+ {\vrule
+ \!!width\!!zeropoint
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth}%
+ \setbox0=\normalhbox
+ {\normalhskip-4\testrulewidth\box0}%
+ \else
+ \setbox0=\ruledhbox to \ifnegative-\fi\scratchskip
+ {\vrule
+ \!!width\!!zeropoint
+ \ifnegative\!!depth\else\!!height\fi16\testrulewidth
+ \ifflexible
+ \normalhskip2\testrulewidth
+ \cleaders
+ \normalhbox
+ {\normalhskip 2\testrulewidth
+ \vrule
+ \!!width2\testrulewidth
+ \!!height\ifnegative-7\else9\fi\testrulewidth
+ \!!depth\ifnegative9\else-7\fi\testrulewidth
+ \normalhskip 2\testrulewidth}%
+ \normalhfill
+ \else
+ \normalhfill
+ \fi}%
+ \testrulewidth=2\testrulewidth
+ \setbox0=\ruledhbox{\box0}% \make...
+ \fi
+ \smashbox0%
+ \normalpenalty\!!tenthousand
+ \normalhbox to \!!zeropoint
+ {\ifnegative\normalhskip1\scratchskip\fi
+ \box0}%
+ \afterwards\scratchskip
+ \egroup}
+
+\def\ruledhkern#1%
+ {\bgroup
+ \let\afterwards=#1\relax
+ \afterassignment\doruledhkern
+ \scratchskip=}
+
+%D After having seen the horizontal ones, the vertical kerns
+%D will not surprise us. In this example we use \type{\par} to
+%D switch to vertical mode.
+%D
+%D \startbuffer
+%D first line
+%D \par \kern +30pt
+%D second line
+%D \par \kern +30pt
+%D \par \kern -10pt
+%D third line
+%D \par
+%D fourth line
+%D \par \kern +30pt
+%D fifth line
+%D \par \kern 0pt
+%D sixth line
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+%D
+%D Like before, we have to postpone \type{\prevdepth}. If we
+%D leave out this trick, we got ourselves some wrong spacing.
+
+\def\dodoruledvkern%
+ {\nextdepth=\prevdepth
+ \dontinterfere
+ \dontcomplain
+ \baselinerulefalse
+ \offinterlineskip
+ \investigateskip\scratchskip
+ \boxrulewidth=2\testrulewidth
+ \ifzero
+ \setbox0=\ruledhbox to 32\testrulewidth
+ {\vrule
+ \!!width\!!zeropoint
+ \!!height4\testrulewidth
+ \!!depth4\testrulewidth}%
+ \else
+ \setbox0=\ruledvbox to \ifnegative-\fi\scratchskip
+ {\hsize16\testrulewidth
+ \ifflexible
+ \cleaders
+ \normalhbox to 16\testrulewidth
+ {\normalhss
+ \normalvbox
+ {\normalvskip 2\testrulewidth
+ \hrule
+ \!!width2\testrulewidth
+ \!!height2\testrulewidth
+ \normalvskip 2\testrulewidth}%
+ \normalhss}%
+ \normalvfill
+ \else
+ \vrule
+ \!!width\!!zeropoint
+ \!!height\ifnegative-\fi\scratchskip
+ \normalhfill
+ \fi}
+ \fi
+ \testrulewidth=2\testrulewidth
+ \setbox0=\ruledvbox{\box0}% \make...
+ \smashbox0%
+ \setbox0=\normalvbox
+ {\ifnegative\normalvskip\scratchskip\fi
+ \normalvcue
+ {\ifnegative\normalhskip-16\testrulewidth\fi\box0}}%
+ \smashbox0%
+ \normalpenalty\!!tenthousand
+ \box0
+ \prevdepth=\nextdepth} % not \dp0=\nextdepth
+
+\def\doruledvkern%
+ {\ifdim\pagegoal=\maxdimen
+ \ifinner
+ \dodoruledvkern
+ \fi
+ \else
+ \dodoruledvkern
+ \fi
+ \afterwards\scratchskip
+ \egroup}
+
+\def\ruledvkern#1%
+ {\bgroup
+ \let\afterwards=#1\relax
+ \afterassignment\doruledvkern
+ \scratchskip=}
+
+\def\ruledkern%
+ {\ifvmode
+ \let\next=\ruledvkern
+ \else
+ \let\next=\ruledhkern
+ \fi
+ \next\normalkern}
+
+%D A a bit more \TEX nice solution is:
+%D
+%D \starttypen
+%D \def\ruledkern%
+%D {\csname ruled\ifvmode v\else h\fi kern\endcsname\normalkern}
+%D \stoptypen
+
+%D \macros
+%D {ruledhglue,ruledvglue}
+%D {}
+%D
+%D The non-primitive glue commands are treated as kerns with
+%D stretch. This stretch is presented as a dashed line. I
+%D have to admit that until now, I've never used these glue
+%D commands.
+%D
+%D \startbuffer
+%D one
+%D \hglue +30pt plus 5pt
+%D two
+%D \hglue +30pt
+%D \hglue -10pt plus 5pt
+%D three
+%D \hglue 0pt
+%D four
+%D \hglue +30pt
+%D five
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+
+\def\doruledhglue%
+ {\leavevmode
+ \scratchcounter=\spacefactor
+ \vrule\!!width\!!zeropoint
+ \normalpenalty\!!tenthousand
+ \ruledhkern\normalhskip\scratchskip
+ \spacefactor=\scratchcounter
+ \egroup}
+
+\def\ruledhglue%
+ {\bgroup
+ \afterassignment\doruledhglue\scratchskip=}
+
+%D \startbuffer
+%D first line
+%D \vglue +30pt plus 5pt
+%D second line
+%D \vglue +30pt
+%D \vglue -10pt plus 5pt
+%D third line
+%D \par
+%D fourth line
+%D \vglue +30pt
+%D fifth line
+%D \vglue 0pt
+%D sixth line
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+
+\def\doruledvglue%
+ {\endgraf % \par
+ \nextdepth=\prevdepth
+ \hrule\!!height\!!zeropoint
+ \normalpenalty\!!tenthousand
+ \ruledvkern\normalvskip\scratchskip
+ \prevdepth=\nextdepth
+ \egroup}
+
+\def\ruledvglue%
+ {\bgroup
+ \afterassignment\doruledvglue\scratchskip=}
+
+%D \macros
+%D {ruledmkern,ruledmskip}
+%D {}
+%D
+%D Mathematical kerns and skips are specified in mu. This
+%D font related unit is incompatible with those of \DIMENSIONS\
+%D and \SKIPS. Because in math mode spacing is often a very
+%D subtle matter, we've used a very simple, not overloaded way
+%D to show them.
+
+\def\dodoruledmkern#1%
+ {\dontinterfere
+ \dontcomplain
+ \setbox0=\normalhbox
+ {$\normalmkern\ifnegative-\fi\scratchmuskip$}%
+ \setbox0=\normalhbox to \wd0
+ {\vrule
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth
+ \!!width\testrulewidth
+ \leaders
+ \hrule
+ \!!height\ifpositive16\else-14\fi\testrulewidth
+ \!!depth\ifpositive-14\else16\fi\testrulewidth
+ \normalhfill
+ \ifflexible
+ \normalhskip-\wd0
+ \leaders
+ \hrule
+ \!!height\testrulewidth
+ \!!depth\testrulewidth
+ \normalhfill
+ \fi
+ \vrule
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth
+ \!!width\testrulewidth}%
+ \smashbox0%
+ \ifnegative
+ #1\scratchmuskip
+ \box0
+ \else
+ \box0
+ #1\scratchmuskip
+ \fi
+ \egroup}
+
+%D \startbuffer
+%D $a \mkern3mu = \mkern3mu
+%D b \quad
+%D \mkern-2mu + \mkern-2mu
+%D \quad c$
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+
+\def\doruledmkern%
+ {\investigatemuskip\scratchmuskip
+ \flexiblefalse
+ \dodoruledmkern\normalmkern}
+
+\def\ruledmkern%
+ {\bgroup
+ \afterassignment\doruledmkern\scratchmuskip=}
+
+%D \startbuffer
+%D $a \mskip3mu = \mskip3mu
+%D b \quad
+%D \mskip-2mu + \mskip-2mu
+%D \quad c$
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+
+\def\doruledmskip%
+ {\investigatemuskip\scratchmuskip
+ \flexibletrue
+ \dodoruledmkern\normalmskip}
+
+\def\ruledmskip%
+ {\bgroup
+ \afterassignment\doruledmskip\scratchmuskip=}
+
+%D \macros
+%D {penalty}
+%D {}
+%D
+%D After presenting fills, skip, kerns and glue we've come to
+%D see penalties. In the first implementation --- most of the
+%D time needed to develop this set of macros went into testing
+%D different types of visualization --- penalties were mere
+%D small blocks with one black half, depending on the sign.
+%D This most recent version also gives an indication of the
+%D amount of penalty. Penalties can go from less than $-10000$
+%D to over $+10000$, and their behavior is somewhat
+%D non-lineair, with some values having special meanings. We
+%D therefore decided not to use its value for a lineair
+%D indicator.
+%D
+%D \startbuffer
+%D one
+%D \penalty +100
+%D two
+%D \penalty +100
+%D \penalty -100
+%D three
+%D \penalty 0
+%D four
+%D \penalty +100
+%D five
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+%D
+%D The small sticks at the side of the penalty indicate it
+%D size. The next example shows the positive and negative
+%D penalties of 0, 1, 10, 100, 1000 and 10000.
+%D
+%D \startregelcorrectie
+%D \hbox
+%D {test \ruledhpenalty0
+%D test \ruledhpenalty1
+%D test \ruledhpenalty10
+%D test \ruledhpenalty100
+%D test \ruledhpenalty1000
+%D test \ruledhpenalty10000
+%D test}
+%D \stopregelcorrectie
+%D
+%D \blanko
+%D
+%D \startregelcorrectie
+%D \hbox
+%D {test \ruledhpenalty0
+%D test \ruledhpenalty-1
+%D test \ruledhpenalty-10
+%D test \ruledhpenalty-100
+%D test \ruledhpenalty-1000
+%D test \ruledhpenalty-10000
+%D test}
+%D \stopregelcorrectie
+%D
+%D \blanko
+%D
+%D This way stacked penalties of different severance can be
+%D shown in combination.
+%D
+%D test \ruledhpenalty10 \ruledhpenalty100
+%D test
+%D test \ruledhpenalty1000 \ruledhpenalty-1000
+%D test
+
+\def\setruledpenaltybox#1#2#3#4#5#6%
+ {\setbox#1=\normalhbox
+ {\ifnum#2=0 \else
+ \ifnum#2>0
+ \def\sign{+}%
+ \else
+ \def\sign{-}%
+ \fi
+ \dimen0=\ifnum\sign#2>9999
+ 28\else
+ \ifnum\sign#2>999
+ 22\else
+ \ifnum\sign#2>99
+ 16\else
+ \ifnum\sign#2>9
+ 10\else
+ 4
+ \fi\fi\fi\fi \testrulewidth
+ \ifnum#2<0
+ \normalhskip-\dimen0
+ \normalhskip-2\testrulewidth
+ \vrule
+ \!!width2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth
+ \fi
+ \vrule
+ \!!width\dimen0
+ \!!height#5\testrulewidth
+ \!!depth#6\testrulewidth
+ \ifnum#2>0
+ \vrule
+ \!!width2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth
+ \fi
+ \fi}%
+ \smashbox#1}
+
+\def\doruledhpenalty%
+ {\dontinterfere
+ \dontcomplain
+ \investigatecount\scratchcounter
+ \testrulewidth=2\testrulewidth
+ \boxrulewidth=\testrulewidth
+ \setbox0=\ruledhbox to 8\testrulewidth
+ {\ifnegative\else\normalhss\fi
+ \vrule
+ \!!depth8\testrulewidth
+ \!!width\ifzero0\else4\fi\testrulewidth
+ \ifpositive\else\normalhss\fi}%
+ \setruledpenaltybox{2}{\scratchcounter}{0}{8}{-3.5}{4.5}%
+ \normalpenalty\!!tenthousand
+ \setbox0=\normalhbox
+ {\normalhskip-4\testrulewidth
+ \ifnegative
+ \box2\box0
+ \else
+ \box0\box2
+ \fi}%
+ \smashbox0%
+ \box0
+ \normalpenalty\scratchcounter
+ \egroup}
+
+\def\ruledhpenalty%
+ {\bgroup
+ \afterassignment\doruledhpenalty
+ \scratchcounter=}
+
+%D The size of a vertical penalty is also shown on the
+%D horizontal axis. This way there is less interference with
+%D the often preceding or following skips and kerns.
+%D
+%D \startbuffer
+%D first line
+%D \par \penalty +100
+%D second line
+%D \par \penalty +100
+%D \par \penalty -100
+%D third line
+%D \par \penalty 0
+%D fourth line
+%D \par \penalty +100
+%D fifth line
+%D \stopbuffer
+%D
+%D \ShowBufferedExample
+
+\def\doruledvpenalty%
+ {\ifdim\pagegoal=\maxdimen
+ \else
+ \nextdepth=\prevdepth
+ \dontinterfere
+ \dontcomplain
+ \investigatecount\scratchcounter
+ \testrulewidth=2\testrulewidth
+ \boxrulewidth=\testrulewidth
+ \setbox0=\ruledhbox
+ {\vrule
+ \!!height4\testrulewidth
+ \!!depth4\testrulewidth
+ \!!width\!!zeropoint
+ \vrule
+ \!!height\ifnegative.5\else4\fi\testrulewidth
+ \!!depth\ifpositive.5\else4\fi\testrulewidth
+ \!!width8\testrulewidth}%
+ \setruledpenaltybox{2}{\scratchcounter}{4}{4}{.5}{.5}%
+ \setbox0=\normalhbox
+ {\normalhskip-4\testrulewidth
+ \ifnegative
+ \box2\box0
+ \else
+ \box0\box2
+ \fi
+ \normalhss}%
+ \smashbox0%
+ \normalpenalty\!!tenthousand
+ \nointerlineskip
+ \dp0=\nextdepth % not \prevdepth=\nextdepth
+ \normalvbox
+ {\normalvcue{\box0}}%
+ \fi
+ \normalpenalty\scratchcounter
+ \egroup}
+
+\def\ruledvpenalty%
+ {\bgroup
+ \afterassignment\doruledvpenalty
+ \scratchcounter=}
+
+\def\ruledpenalty%
+ {\ifvmode
+ \let\next=\ruledvpenalty
+ \else
+ \let\next=\ruledhpenalty
+ \fi
+ \next}
+
+%D At the cost of some more tokens, a bit more clever
+%D implementation would be:
+%D
+%D \starttypen
+%D \def\ruledpenalty%
+%D {\csname ruled\ifvmode v\else h\fi penalty\endcsname}
+%D \stoptypen
+
+%D \macros
+%D {showfils,dontshowfils,
+%D showboxes,dontshowboxes,
+%D showskips,dontshowskips,
+%D showpenalties,dontshowpenalties}
+%D {}
+%D
+%D For those who want to manipulate the visual cues in detail,
+%D we have grouped them.
+
+\def\showfils%
+ {\let\hss = \ruledhss
+ \let\hfil = \ruledhfil
+ \let\hfill = \ruledhfill
+ \let\hfilneg = \ruledhfilneg
+ \let\hfillneg = \ruledhfillneg
+ \let\vss = \ruledvss
+ \let\vfil = \ruledvfil
+ \let\vfill = \ruledvfill
+ \let\vfilneg = \ruledvfilneg
+ \let\vfillneg = \ruledvfillneg}
+
+\def\dontshowfils%
+ {\let\hss = \normalhss
+ \let\hfil = \normalhfil
+ \let\hfill = \normalhfill
+ \let\hfilneg = \normalhfilneg
+ \let\hfillneg = \normalhfillneg
+ \let\vss = \normalvss
+ \let\vfil = \normalvfil
+ \let\vfill = \normalvfill
+ \let\vfilneg = \normalvfilneg
+ \let\vfillneg = \normalvfillneg}
+
+\def\showboxes%
+ {\baselineruletrue
+ \let\hbox = \ruledhbox
+ \let\vbox = \ruledvbox
+ \let\vtop = \ruledvtop
+ \let\vcenter = \ruledvcenter}
+
+\def\dontshowboxes%
+ {\let\hbox = \normalhbox
+ \let\vbox = \normalvbox
+ \let\vtop = \normalvtop
+ \let\vcenter = \normalvcenter}
+
+\def\showskips%
+ {\let\hskip = \ruledhskip
+ \let\vskip = \ruledvskip
+ \let\kern = \ruledkern
+ \let\mskip = \ruledmskip
+ \let\mkern = \ruledmkern
+ \let\hglue = \ruledhglue
+ \let\vglue = \ruledvglue}
+
+\def\dontshowskips%
+ {\let\hskip = \normalhskip
+ \let\vskip = \normalvskip
+ \let\kern = \normalkern
+ \let\mskip = \normalmskip
+ \let\mkern = \normalmkern
+ \let\hglue = \normalhglue
+ \let\vglue = \normalvglue}
+
+\def\showpenalties%
+ {\let\penalty = \ruledpenalty}
+
+\def\dontshowpenalties%
+ {\let\penalty = \normalpenalty}
+
+%D \macros
+%D {showingcomposition,
+%D showcomposition,dontshowcomposition,}
+%D {}
+%D
+%D All these nice options come together in two macros. The
+%D first one turns the options on, the second turnes them off.
+%D Both macros only do their job when we are actually showing
+%D the composition.
+%D
+%D \starttypen
+%D \showingcompositiontrue
+%D \showcomposition
+%D \stoptypen
+%D
+%D Because the output routine can do tricky things, like
+%D multiple column typesetting and manipulation of the
+%D pagebody, shifting things around and so on, the macro
+%D \type{\dontshowcomposition} best can be called when we enter
+%D this routine. Too much visual cues just don't make sense. In
+%D \CONTEXT\ this has been taken care of.
+
+\newif\ifshowingcomposition
+
+\def\showcomposition%
+ {\ifshowingcomposition
+ \showfils
+ \showboxes
+ \showskips
+ \showpenalties
+ \fi}
+
+\def\dontshowcomposition%
+ {\ifshowingcomposition
+ \dontshowfils
+ \dontshowboxes
+ \dontshowskips
+ \dontshowpenalties
+ \fi}
+
+%D \macros
+%D {showmakeup,
+%D defaulttestrulewidth}
+%D {}
+%D
+%D Just to make things even more easy, we have defined:
+%D
+%D \starttypen
+%D \showmakeup
+%D \stoptypen
+%D
+%D For the sake of those who don't (yet) use \CONTEXT\ we
+%D preset \type{\defaulttestrulewidth} to the already set
+%D value. Otherwise we default to a corps related value.
+%D
+%D \starttypen
+%D \def\defaulttestrulewidth{.2pt}
+%D \stoptypen
+%D
+%D Beware, it's a macro not a \DIMENSION.
+
+\ifx\korpsgrootte\undefined
+ \edef\defaulttestrulewidth{\the\testrulewidth}
+\else
+ \def\defaulttestrulewidth{.02\korpsgrootte} % still dutch
+\fi
+
+\def\showmakeup%
+ {\testrulewidth=\defaulttestrulewidth
+ \showingcompositiontrue
+ \showcomposition}
+
+\protect
+
+%D \ifCONTEXT \let\next=\relax \else \let\next=\endinput
+%D The documented source you have been reading was processed
+%D using some surrogate makeup. When this file is processed
+%D in \CONTEXT, a few more examples show up here, like a local
+%D table of contents and a local register.
+%D \fi \next
+
+% %D Lets end with some more advanced examples. When visualized,
+% %D the table of contents of the outer level is typeset as:
+% %D
+% %D {\showmakeup\plaatsinhoud[criterium=vorige]}
+% %D
+%D Lets end with some more advanced examples.
+%D Definitions and enumerations come in many flavors. The
+%D next one for instance is defined as:
+%D
+%D \starttypen
+%D \definedescription[test][place=left,hang=3,width=6em]
+%D \stoptypen
+%D
+%D When applied to some text, this would look like:
+%D
+%D \bgroup
+%D \showmakeup
+%D \doordefinieren[test][plaats=links,hang=3,breedte=6em]
+%D
+%D \test{visual\\debugger} I would be very pleased if \TEX\
+%D had two more primitives: \type{\vnop} and \type{\hnop}. Both
+%D should act and show up as normal boxes, but stay invisible
+%D for \TEX\ when it's doing calculations. The \type{\vnop}
+%D for instance should not interact with the internal mechanism
+%D responsible for the disappearing skips, kerns and penalties
+%D at a pagebreak. As long as we don't have these two boxtypes,
+%D visual debugging will never be perfect.
+%D
+%D \egroup
+%D
+%D The index to this section looks like:
+%D
+%D {\stelrefererenin[prefix=dummy]\showmakeup\plaatsindex[criterium=lokaal]}
+%D
+%D Although not impressive examples or typesetting, both
+%D show us how and where things happen. When somehow the last
+%D lines in this two column index don't allign, then this is
+%D due to some still unknown interference.
+
+\endinput
+
+
\ No newline at end of file diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex new file mode 100644 index 000000000..c83e4526e --- /dev/null +++ b/tex/context/base/syst-ext.tex @@ -0,0 +1,2345 @@ +%D \module
+%D [ file=syst-ext,
+%D version=1995.10.10,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Extras,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\writestatus{loading}{Context System Macro's / Extras}
+
+%D In this second system module, we continue the definition of
+%D some handy commands.
+
+\unprotect
+
+%D \macros
+%D {doglobal,
+%D redoglobal,dodoglobal,resetglobal}
+%D
+%D The two macros \type{\redoglobal} and \type{\dodoglobal} are
+%D used in this and some other modules to enforce a user
+%D specified \type{\doglobal} action. The last and often only
+%D global assignment in a macro is done with
+%D \type{\dodoglobal}, but all preceding ones with
+%D \type{\redoglobal}. When using only alternatives, one can
+%D reset this mechanism with \type{\resetglobal}.
+
+\def\doglobal%
+ {\let\redoglobal=\global
+ \def\dodoglobal%
+ {\resetglobal\global}}
+
+\def\resetglobal%
+ {\let\redoglobal=\relax
+ \let\dodoglobal=\relax}
+
+\resetglobal
+
+%D \macros
+%D {newcounter,
+%D increment,decrement}
+%D {}
+%D
+%D Unfortunately the number of \COUNTERS\ in \TEX\ is limited,
+%D but fortunately we can store numbers in a macro. We can
+%D increment such pseudo \COUNTERS\ with \type{\increment}.
+%D
+%D \starttypen
+%D \increment(\counter,20)
+%D \increment(\counter,-4)
+%D \increment(\counter)
+%D \increment\counter
+%D \stoptypen
+%D
+%D After this sequence of commands, the value of
+%D \type{\counter} is 20, 16, 17 and~18. Of course there is
+%D also the complementary command \type{\decrement}.
+%D
+%D Global assignments are possible too, using \type{\doglobal}:
+%D
+%D \starttypen
+%D \doglobal\increment\counter
+%D \stoptypen
+%D
+%D When \type{\counter} is undefined, it's value is initialized
+%D at~0. It is nevertheless better to define a \COUNTER\
+%D explicitly. One reason could be that the \COUNTER\ can be
+%D part of a test with \type{\ifnum} and this conditional does
+%D not accept undefined macro's. The \COUNTER\ in our example
+%D can for instance be defined with:
+%D
+%D \starttypen
+%D \newcounter\counter
+%D \stoptypen
+%D
+%D The command \type{\newcounter} must not be confused with
+%D \type{\newcount}! Of course this mechanism is much slower
+%D than using \TEX's \COUNTERS\ directly. In practice
+%D \COUNTERS\ (and therefore our pseudo counters too) are
+%D seldom the bottleneck in the processing of a text. Apart
+%D from some other incompatilities we want to mention a pitfal
+%D when using \type{\ifnum}.
+%D
+%D \starttypen
+%D \ifnum\normalcounter=\pseudocounter \doif \else \doelse \fi
+%D \ifnum\pseudocounter=\normalcounter \doif \else \doelse \fi
+%D \stoptypen
+%D
+%D In the first test, \TEX\ continues it's search for the
+%D second number after reading \type{\pseudocounter}, while
+%D in the second test, it stops reading after having
+%D encountered a real one. Tests like the first one therefore
+%D can give unexpected results, for instance execution
+%D of \type{\doif} even if both numbers are unequal.
+
+\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-}
+
+%D \macros
+%D {newsignal}
+%D
+%D When writing advanced macros, we cannot do without
+%D signaling. A signal is a small (invisible) kern or penalty
+%D that signals the next macro that something just happened.
+%D This macro can take any action depending onthe previous
+%D signal. Signals must be unique and the next macro takes care
+%D of that.
+%D
+%D \starttypen
+%D \newsignal\somesignal
+%D \stoptypen
+%D
+%D Signals old dimensions and can be used in skips, kerns and
+%D tests like \type{\ifdim}.
+
+\newdimen\currentsignal
+
+\def\newsignal#1%
+ {\advance\currentsignal by 0.00025pt
+ \edef#1{\the\currentsignal}}
+
+%D \macros
+%D {newskimen}
+%D
+%D \TEX\ offers 256 \DIMENSIONS\ and \SKIPS. Unfortunately this
+%D amount is too small to suit certain packages. Therfore when
+%D possible one should use
+%D
+%D \starttypen
+%D \newskimen\tempskimen
+%D \stoptypen
+%D
+%D This commands allocates a \DIMENSION\ or a \SKIP, depending
+%D on the availability. One should be aware of the difference
+%D between both. When searching for some glue \TEX\ goes on
+%D searching till it's sure that no other glue component if
+%D found. This search can be canceled by using \type{\relax}
+%D when possible and needed.
+
+\def\newskimen#1%
+ {\ifx#1\undefined
+ \ifnum\count11>\count12
+ \newskip#1\relax
+ \else
+ \newdimen#1\relax
+ \fi
+ \fi}
+
+%D \macros
+%D {strippedcsname}
+%D {}
+%D
+%D The next macro can be very useful when using \type{\csname}
+%D like in:
+%D
+%D \starttypen
+%D \csname if\strippedcsname\something\endcsname
+%D \stoptypen
+%D
+%D This expands to \type{\ifsomething}.
+
+\def\strippedcsname%
+ {\expandafter\gobbleoneargument\string}
+
+%D \macros
+%D {newconditional,
+%D settrue, setfalse,
+%D ifconditional}
+%D {}
+%D
+%D \TEX's lacks boolean variables, although the \PLAIN\ format
+%D implements \type{\newif}. The main disadvantage of this
+%D scheme is that it takes three hash table entries. A more
+%D memory saving alternative is presented here. A conditional
+%D is defined by:
+%D
+%D \starttypen
+%D \newconditional\doublesided
+%D \setfalse
+%D
+%D Setting a conditional is done by \type{\settrue} and
+%D \type{\setfalse}:
+%D
+%D \starttypen
+%D \settrue\doublesided
+%D \setfalse
+%D
+%D while testing is accomplished by:
+%D
+%D \starttypen
+%D \ifconditional\doublesided ... \else ... \fi
+%D \setfalse
+%D
+%D We cannot use the simple scheme:
+%D
+%D \starttypen
+%D \def\settrue#1{\let#1=\iftrue}
+%D \def\settrue#1{\let#1=\iffalse}
+%D \stoptypen
+%D
+%D Such an implementation gives problems with nested
+%D conditionals. The next implementation is abaou as fast
+%D and just as straightforward:
+
+\def\settrue#1%
+ {\chardef#1=0 }
+
+\def\setfalse#1%
+ {\chardef#1=1 }
+
+\let\newconditional = \setfalse
+\let\ifconditional = \ifcase
+
+%D \macros
+%D {dorecurse,recurselevel,recursedepth
+%D dostepwiserecurse,
+%D for}
+%D {}
+%D
+%D \TEX\ does not offer us powerfull for||loop mechanisms. On
+%D the other hand its recursion engine is quite unique. We
+%D therefore identify the for||looping macros by this method.
+%D The most simple alternative is the one that only needs a
+%D number.
+%D
+%D \starttypen
+%D \dorecurse {n} {whatever we want}
+%D \stoptypen
+%D
+%D This macro can be nested without problems and therefore be
+%D used in situations where \PLAIN\ \TEX's \type{\loop} macro
+%D ungracefully fails. The current value of the counter is
+%D available in \type{\recurselevel}, before as well as after
+%D the \typ{whatever we wat} stuff.
+%D
+%D \starttypen
+%D \dorecurse % inner loop
+%D {10}
+%D {\recurselevel: % outer value
+%D \dorecurse % inner loop
+%D {\recurselevel} % outer value
+%D {\recurselevel} % inner value
+%D \dorecurse % inner loop
+%D {\recurselevel} % outer value
+%D {\recurselevel} % inner value
+%D \endgraf}
+%D \stoptypen
+%D
+%D In this example the first, second and fourth
+%D \type{\recurselevel} concern the outer loop, while the third
+%D and fifth one concern the inner loop. The depth of the
+%D nesting is available for inspection in \type{\recursedepth}.
+%D
+%D Both \type{\recurselevel} and \type{\recursedepth} are
+%D macros. The real \COUNTERS\ are hidden from the user because
+%D we don't want any interference.
+
+\def\@@irecurse{@@irecurse} % stepper
+\def\@@nrecurse{@@nrecurse} % number of steps
+\def\@@srecurse{@@srecurse} % step
+\def\@@drecurse{@@drecurse} % direction, < or >
+\def\@@arecurse{@@arecurse} % action
+
+\newcount\outerrecurse
+\newcount\innerrecurse
+
+\def\recursedepth%
+ {\the\outerrecurse}
+
+\long\def\dostepwiserecurse#1#2#3#4%
+ {\ifnum#2=0
+ \def\recurselevel{0}%
+ \let\next=\relax
+ \else
+ \global\advance\outerrecurse by 1
+ \innerrecurse=#1\setevalue{\@@irecurse\recursedepth}{\the\innerrecurse}%
+ \innerrecurse=#2\setevalue{\@@nrecurse\recursedepth}{\the\innerrecurse}%
+ \innerrecurse=#3\setevalue{\@@srecurse\recursedepth}{\the\innerrecurse}%
+ \ifnum#3>0\relax\ifnum#2<#1\relax
+ \else
+ \setevalue{\@@drecurse\recursedepth}{>}%
+ \long\setvalue{\@@arecurse\recursedepth}{#4}%
+ \let\next=\dodorecurse
+ \fi\fi
+ \ifnum#3<0\relax\ifnum#1<#2\relax
+ \else
+ \setevalue{\@@drecurse\recursedepth}{<}%
+ \long\setvalue{\@@arecurse\recursedepth}{#4}%
+ \let\next=\dodorecurse
+ \fi\fi
+ \fi
+ \next}
+
+\def\donorecurse%
+ {}
+
+\def\dodonorecurse%
+ {\global\advance\outerrecurse by -1\relax}
+
+\def\dododorecurse%
+ {\edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
+ \getvalue{\@@arecurse\recursedepth}%
+ \edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
+ \innerrecurse=\recurselevel
+ \advance\innerrecurse by \getvalue{\@@srecurse\recursedepth}\relax
+ \setevalue{\@@irecurse\recursedepth}{\the\innerrecurse}%
+ \dodorecurse}
+
+\def\dodorecurse%
+ {\ifnum\getvalue{\@@irecurse\recursedepth}
+ \getvalue{\@@drecurse\recursedepth}
+ \getvalue{\@@nrecurse\recursedepth}\relax
+ \expandafter\dodonorecurse
+ \else
+ \expandafter\dododorecurse
+ \fi}
+
+\def\dorecurse#1%
+ {\dostepwiserecurse{1}{#1}{1}}
+
+%D For those we like to offer visual beauty for efficiency we
+%D say however:\voetnoot{In this kind of macro's we tend to
+%D minimalize the overhead.}
+
+\def\dodorecurse%
+ {\ifnum\getvalue{\@@irecurse\recursedepth}
+ \getvalue{\@@drecurse\recursedepth}
+ \getvalue{\@@nrecurse\recursedepth}\relax
+ \global\advance\outerrecurse by -1
+ \else
+ \expandafter\dododorecurse
+ \fi}
+
+%D As we can see here, the simple command \type{\dorecurse} is
+%D a special case of the more general:
+%D
+%D \starttypen
+%D \dostepwiserecurse {from} {to} {step} {action}
+%D \stoptypen
+%D
+%D This commands accepts positive and negative steps. Illegal
+%D values are handles as good as possible and the macro accepts
+%D numbers and \COUNTERS.
+%D
+%D \starttypen
+%D \dostepwiserecurse {1} {10} {2} {...}
+%D \dostepwiserecurse {10} {1} {-2} {...}
+%D \stoptypen
+%D
+%D The third alternative looks a bit different and uses a
+%D pseudo counter. When this macro is nested, we have to use
+%D different counters. This time we use keywords.
+%D
+%D \starttypen
+%D \def\alfa{2} \def\beta{100} \def\gamma{3}
+%D
+%D \for \n=55 \to 100 \step 1 \do {... \n ...}
+%D \for \n=\alfa \to \beta \step \gamma \do {... \n ...}
+%D \for \n=\n \to 120 \step 1 \do {... \n ...}
+%D \for \n=120 \to 100 \step -3 \do {... \n ...}
+%D \for \n=55 \to 100 \step 2 \do {... \n ...}
+%D \stoptypen
+%D
+%D Only in the third example we need to predefine \type{\n}.
+%D The use of \type{\od} as a dilimiter would have made nested
+%D use more problematic.
+
+\def\for#1=#2\to#3\step#4\do#5%
+ {\dostepwiserecurse{#2}{#3}{#4}
+ {\edef#1{\recurselevel}%
+ #5%
+ \edef#1{\recurselevel}}}
+
+%D \macros
+%D {doloop,exitloop}
+%D {}
+%D
+%D Sometimes loops are not determined by counters, but by
+%D (a combinations of) conditions. We therefore implement a
+%D straightforward loop, which can only be left when we
+%D explictly exit it. Nesting is supported. First we present
+%D a more extensive alternative.
+%D
+%D \starttypen
+%D \doloop
+%D {Some kind of typesetting punishment \par
+%D \ifnum\pageno>100 \exitloop \fi}
+%D \stoptypen
+%D
+%D When needed, one can call for \type{\looplevel} and
+%D \type{\loopdepth}.
+%D
+%D If we write this macros from scratch, we end up with
+%D something like the ones described above:
+%D
+%D \starttypen
+%D \def\@@eloop{@@eloop} % exit
+%D \def\@@iloop{@@iloop} % stepper
+%D \def\@@aloop{@@aloop} % action
+%D
+%D \newcount\outerloop
+%D
+%D \def\loopdepth%
+%D {\the\outerloop}
+%D
+%D \def\exitloop%
+%D {\setevalue{\@@eloop\loopdepth}{0}}
+%D
+%D \long\def\doloop#1%
+%D {\global\advance\outerloop by 1
+%D \setevalue{\@@iloop\loopdepth}{1}%
+%D \setevalue{\@@eloop\loopdepth}{1}%
+%D \long\setvalue{\@@aloop\loopdepth}{#1}%
+%D \dodoloop}
+%D
+%D \def\dodonoloop%
+%D {\global\advance\outerloop by -1\relax}
+%D
+%D \def\dododoloop%
+%D {\edef\looplevel{\getvalue{\@@iloop\loopdepth}}%
+%D \innerrecurse=\looplevel
+%D \advance\innerrecurse by 1
+%D \setevalue{\@@iloop\loopdepth}{\the\innerrecurse}%
+%D \getvalue{\@@aloop\loopdepth}%
+%D \edef\looplevel{\getvalue{\@@iloop\loopdepth}}%
+%D \dodoloop}
+%D
+%D \def\dodoloop%
+%D {\ifnum\getvalue{\@@eloop\loopdepth}=0
+%D \expandafter\dodonoloop
+%D \else
+%D \expandafter\dododoloop
+%D \fi}
+%D
+%D \def\doloop%
+%D {\dostepwiserecurse{1}{\maxdimen}{1}}
+%D
+%D \def\exitloop
+%D {\setvalue{\@@irecurse\recursedepth}{\maxdimen}}
+%D
+%D \def\looplevel{\recurselevel}
+%D \def\loopdepth{\recursedepth}
+%D \stoptypen
+%D
+%D We prefer however a more byte saving implementation, that
+%D executes of course a bit slower.
+
+\def\doloop%
+ {\dostepwiserecurse{1}{\maxdimen}{1}}
+
+\def\exitloop
+ {\setvalue{\@@irecurse\recursedepth}{\maxdimen}}
+
+%D We don't declare new counters for \type{\looplevel} and
+%D \type{\loopdepth} because one can use \type{\recurselevel}
+%D and \type{\recursedepth}.
+%D
+%D The loop is executed at least once, so beware of situations
+%D like:
+%D
+%D \starttypen
+%D \doloop {\exitloop some commands}
+%D \stoptypen
+%D
+%D It's just a matter of putting the text into the \type{\if}
+%D statement that should be there anyway, like in:
+%D
+%D \starttypen
+%D \doloop {\ifwhatever \exitloop \else some commands\fi}
+%D \stoptypen
+
+%D \macros
+%D {newevery,everyline,EveryLine,EveryPar}
+%D {}
+%D
+%D Lets skip to something quite different. It's common use
+%D to use \type{\everypar} for special purposes. In \CONTEXT\
+%D we use this primitive for locating sidefloats. This means
+%D that when user assignments to \type{\everypar} can interfere
+%D with those of the package. We therefore introduce
+%D \type{\EveryPar}.
+%D
+%D The same goes for \type{\EveryLine}. Because \TEX\ offers
+%D no \type{\everyline} primitive, we have to call for
+%D \type{\everyline} when we are working on a line by line
+%D basis. Just by calling \type{\EveryPar{}} and
+%D \type{\EveryLine{}} we restore the old situation.
+%D
+%D The definition command \type{\DoWithEvery} will be quite
+%D unreadable, so let's first show an implementation that
+%D shows how things are done:
+%D
+%D \starttypen
+%D \newtoks \everyline
+%D \newtoks \oldeveryline
+%D \newif \ifeveryline
+%D
+%D \def\DoWithEvery#1#2#3#4%
+%D {#3\else\edef\next{\noexpand#2={\the#1}}\next\fi
+%D \edef\next{\noexpand#1={\the#2\the\scratchtoks}}\next
+%D #4}
+%D
+%D \def\doEveryLine%
+%D {\DoWithEvery\everyline\oldeveryline\ifeveryline\everylinetrue}
+%D
+%D \def\EveryLine%
+%D {\afterassignment\doEveryLine\scratchtoks}
+%D
+%D The real implementation is a bit more complicated but we
+%D prefer something more versatile.
+
+\def\DoWithEvery#1%
+ {\csname if\strippedcsname#1\endcsname \else
+ \edef\next%
+ {\@EA\noexpand\csname old\strippedcsname#1\endcsname=
+ {\the#1}}%
+ \next
+ \fi
+ \edef\next%
+ {\noexpand#1=
+ {\@EA\the\csname old\strippedcsname#1\endcsname\the\scratchtoks}}%
+ \next
+ \csname\strippedcsname#1true\endcsname}
+
+\def\dowithevery#1%
+ {\@EA\afterassignment\csname do\strippedcsname#1\endcsname\scratchtoks}
+
+\def\newevery#1#2%
+ {\ifx#2\undefined
+ \ifx#1\undefined\newtoks#1\fi
+ \@EA\newtoks\csname old\strippedcsname#1\endcsname
+ \@EA\newif \csname if\strippedcsname#1\endcsname
+ \@EA\def \csname do\strippedcsname#2\endcsname{\DoWithEvery#1}%
+ \def#2{\dowithevery#2}%
+ \fi}
+
+%D This one permits definitions like:
+
+\newevery \everypar \EveryPar
+\newevery \everyline \EveryLine
+
+%D and how about:
+
+\newevery \neverypar \NeveryPar
+
+%D Which indeed we're going to use indeed!
+
+%D Technically spoken we could have used the method we are
+%D going to present in the visual debugger. First we save
+%D the primitive \type{\everypar}:
+%D
+%D \starttypen
+%D \let\normaleverypar=\everypar
+%D \stoptypen
+%D
+%D Next we allocate a \TOKENLIST\ named \type{\everypar},
+%D which means that \type{\everypar} is no longer a primitive
+%D but something like \type{\toks44}.
+%D
+%D \starttypen
+%D \newtoks\everypar
+%D \stoptypen
+%D
+%D Because \TEX\ now executes \type{\normaleverypar} instead
+%D of \type{\everypar}, we are ready to assign some tokens to
+%D this internally known and used \TOKENLIST.
+%D
+%D \starttypen
+%D \normaleverypar={all the things the system wants to do \the\everypar}
+%D \stoptypen
+%D
+%D Where the user can provide his own tokens to be expanded
+%D every time he expects them to expand.
+%D
+%D \starttypen
+%D \everypar={something the user wants to do}
+%D \stoptypen
+%D
+%D We don't use this method because it undoubtly leads to
+%D confusing situations, especially when other packages are
+%D used, but it's this kind of tricks that make \TEX\ so
+%D powerful.
+
+%D \macros
+%D {convertargument,convertcommand}
+%D {}
+%D
+%D Some persistent experimenting led us to the next macro. This
+%D macro converts a parameter or an expanded macro to it's
+%D textual meaning.
+%D
+%D \starttypen
+%D \convertargument ... \to \command
+%D \stoptypen
+%D
+%D For example,
+%D
+%D \starttypen
+%D \convertargument{one \two \three{four}}\to\ascii
+%D \stoptypen
+%D
+%D The resulting macro \type{\ascii} can be written to a file
+%D or the terminal without problems. In \CONTEXT\ we use this
+%D macro for generating registers and tables of contents.
+%D
+%D The second conversion alternative accepts a command:
+%D
+%D \starttypen
+%D \convertcommand\command\to\ascii
+%D \stoptypen
+%D
+%D Both commands accept the prefix \type{\doglobal} for global
+%D assignments.
+
+\def\doconvertargument#1>{}
+
+\def\convertedcommand%
+ {\expandafter\doconvertargument\meaning}
+
+\long\def\convertargument#1\to#2%
+ {\long\def\convertedargument{#1}%
+ \dodoglobal\edef#2%
+ {\convertedcommand\convertedargument}}
+
+\long\def\convertcommand#1\to#2%
+ {\dodoglobal\edef#2%
+ {\convertedcommand#1}}
+
+%D This is typically a macro that one comes to after reading
+%D the \TEX book carefully. Even then, the definite solution
+%D was found after rereading the \TEX book. The first
+%D implementation was:
+%D
+%D \starttypen
+%D \def\doconvertargument#1->#2\\\\{#2}
+%D \stoptypen
+%D
+%D The \type{-}, the delimiter \type{\\\\} and the the second
+%D argument are completely redundant.
+
+%D \macros
+%D {ExpandFirstAfter,ExpandSecondAfter,ExpandBothAfter}
+%D {}
+%D
+%D These three commands support expansion of arguments before
+%D executing the commands that uses them. We can best
+%D illustrate this with an example.
+%D
+%D \starttypen
+%D \def\first {alfa,beta,gamma}
+%D \def\second {alfa,epsilon,zeta}
+%D
+%D \ExpandFirstAfter \doifcommon {\first} {alfa} {\message{OK}}
+%D \ExpandSecondAfter \doifcommon {alfa} {\second} {\message{OK}}
+%D \ExpandBothAfter \doifcommon {\first} {\second} {\message{OK}}
+%D
+%D \ExpandFirstAfter\processcommalist[\first]\message
+%D
+%D \ExpandAfter \doifcommon {\first} {alfa} {\message{OK}}
+%D \stoptypen
+%D
+%D The first three calls result in the threefold message
+%D \type{OK}, the fourth one shows the three elements of
+%D \type{\first}. The command \type{\ExpandFirstAfter} takes
+%D care of (first) arguments that are delimited by \type{[ ]},
+%D but the faster \type{\ExpandAfter} does not.
+
+%D RECONSIDER
+
+\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\ExpandSecondAfter#1#2#3%
+% {\toks0={#2}%
+% \edef\!!stringa{#3}%
+% \@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA\the\@EA\toks0\@EA}\@EA{\!!stringa}}
+
+\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}}
+
+%D Now we can for instance redefine \type{\ifinstringelse} as:
+
+\def\ifinstringelse%
+ {\ExpandBothAfter\v!ifinstringelse}
+
+%D \macros
+%D {ConvertToConstant,ConvertConstantAfter}
+%D {}
+%D
+%D When comparing arguments with a constant, we can get into
+%D trouble when this argument consists of tricky expandable
+%D commands. One solution for this is converting the
+%D argument to a string of unexpandable characters. To make
+%D comparison possible, we have to convert the constant too
+%D
+%D \starttypen
+%D \ConvertToConstant\doifelse {...} {...} {then ...} {else ...}
+%D \stoptypen
+%D
+%D This construction is only needed when the first argument
+%D can give troubles. Misuse can slow down processing.
+%D
+%D \starttypen
+%D \ConvertToConstant\doifelse{\c!alfa} {\c!alfa}{...}{...}
+%D \ConvertToConstant\doifelse{alfa} {\c!alfa}{...}{...}
+%D \ConvertToConstant\doifelse{alfa} {alfa} {...}{...}
+%D \ConvertToConstant\doifelse{alfa \alfa test}{\c!alfa}{...}{...}
+%D \stoptypen
+%D
+%D In examples~2 and~3 both arguments equal, in~1 and~4
+%D they differ.
+
+\def\ConvertToConstant#1#2#3%
+ {\expandafter\convertargument\expandafter{#2}\to\!!stringa
+ \expandafter\convertargument\expandafter{#3}\to\!!stringb
+ #1{\!!stringa}{\!!stringb}}
+
+%D When the argument \type{#1} consists of commands, we had
+%D better use
+%D
+%D \starttypen
+%D \ConvertConstantAfter\processaction[#1][...]
+%D \ConvertConstantAfter\doifelse{#1}{\v!iets}{}{}
+%D \stoptypen
+%D
+%D This commands accepts things like:
+%D
+%D \starttypen
+%D \v!constant
+%D constant
+%D \hbox to \hsize{\rubish}
+%D \stoptypen
+%D
+%D As we will see in the core moudles, this macro permits
+%D constructions like:
+%D
+%D \starttypen
+%D \setupfoottexts[...][...]
+%D \setupfoottexts[margin][...][...]
+%D \setupfoottexts[\v!margin][...][...]
+%D \stoptypen
+%D
+%D where \type{...} can be anything legally \TEX.
+
+\def\CheckConstantAfter#1#2%
+ {\@EA\convertargument\v!prefix!\to\ascii
+ \convertargument#1\to#2\relax
+ \doifinstringelse{\ascii}{#2}
+ {\expandafter\convertargument#1\to#2}
+ {}}
+
+\def\simpleConvertConstantAfter#1#2%
+ {\CheckConstantAfter{#1}\asciiA
+ \CheckConstantAfter{#2}\asciiB
+ \ConvertCommand{\asciiA}{\asciiB}}
+
+\def\complexConvertConstantAfter[#1]%
+ {\doConvertConstantAfter{#1}%
+ \@EA\ConvertCommand\@EA[\!!stringa]}
+
+\def\ConvertConstantAfter#1%
+ {\def\ConvertCommand{#1}%
+ \complexorsimple{ConvertConstantAfter}}
+
+%D \macros
+%D {assignifempty}
+%D {}
+%D
+%D We can assign a default value to an empty macro using:
+%D
+%D \starttypen
+%D \assignifempty \macro {default value}
+%D \stoptypen
+%D
+%D We don't explicitly test if the macro is defined.
+
+\def\assignifempty#1#2%
+ {\doifnot{#1}{}
+ {\def#1{#2}}}
+
+%D \macros
+%D {gobbleuntil,grabuntil,processbetween}
+%D {}
+%D
+%D In \TEX\ gobbling usually stand for skipping arguments, so
+%D here are our gobbling macros.
+%D
+%D In \CONTEXT\ we use a lot of \type{\start}||\type{\stop}
+%D like constructions. Sometimes, the \type{\stop} is used as a
+%D hard coded delimiter like in:
+%D
+%D \starttypen
+%D \def\startcommand#1\stopcommand%
+%D {... #1 ...}
+%D \stoptypen
+%D
+%D In many cases the \type{\start}||\type{\stop} pair is
+%D defined at format generation time or during a job. This
+%D means that we cannot hardcode the \type{\stop} criterium.
+%D Only after completely understanding \type{\csname} and
+%D \type{\expandafter} I was able to to implement a solution,
+%D starting with:
+%D
+%D \starttypen
+%D \grabuntil{stop}\command
+%D \stoptypen
+%D
+%D This commands executed, after having encountered
+%D \type{\stop} the command \type{\command}. This command
+%D receives as argument the text preceding the \type{\stop}.
+%D This means that:
+%D
+%D \starttypen
+%D \def\starthello%
+%D {\grabuntil{stophello}\message}
+%D
+%D \starthello Hello world!\stophello
+%D \stoptypen
+%D
+%D results in: \type{\message{Hello world!}}.
+
+\def\dograbuntil#1#2%
+ {\long\def\next##1#1{#2{##1}}\next}
+
+\def\grabuntil#1%
+ {\expandafter\dograbuntil\expandafter{\csname#1\endcsname}}
+
+%D The next command build on this mechanism:
+%D
+%D \starttypen
+%D \processbetween{string}\command
+%D \stoptypen
+%D
+%D Here:
+%D
+%D \starttypen
+%D \processbetween{hello}\message
+%D \starthello Hello again!\stophello
+%D \stoptypen
+%D
+%D leads to: \type{\message{Hello again!}}. The command
+%D
+%D \starttypen
+%D \gobbleuntil\command
+%D \stoptypen
+%D
+%D is related to these commands. This one simply throws away
+%D everything preceding \type{\command}.
+
+\long\def\processbetween#1#2%
+ {\setvalue{\s!start#1}%
+ {\grabuntil{\s!stop#1}{#2}}}
+
+\def\gobbleuntil#1%
+ {\long\def\next##1#1{}\next}
+
+%D \macros
+%D {groupedcommand}
+%D {}
+%D
+%D Commands often manipulate argument as in:
+%D
+%D \starttypen
+%D \def\doezomaarwat#1{....#1....}
+%D \stoptypen
+%D
+%D A disadvantage of this approach is that the tokens that
+%D form \type{#1} are fixed the the moment the argument is read
+%D in. Normally this is no problem, but for instance verbatim
+%D environments adapt the \CATCODES\ of characters and therefore
+%D are not always happy with already fixed tokens.
+%D
+%D Another problem arises when the argument is grouped not by
+%D \type{{}} but by \type{\bgroup} and \type{\egroup}. Such an
+%D argument fails, because the \type{\bgroup} is een as the
+%D argument (which is quite normal).
+%D
+%D The next macro offers a solution for both unwanted
+%D situations:
+%D
+%D \starttypen
+%D \groupedcommand {before} {after}
+%D \stoptypen
+%D
+%D Which can be used like:
+%D
+%D \starttypen
+%D \def\cite%
+%D {\groupedcommand{\rightquote\rightquote}{\leftquote\leftquote}}
+%D \stoptypen
+%D
+%D This command is equivalent to, but more 'robust' than:
+%D
+%D \starttypen
+%D \def\cite#1%
+%D {\rightquote\rightquote#1\leftquote\leftquote}
+%D \stoptypen
+%D
+%D One should say that the next implementation would suffice:
+%D
+%D \starttypen
+%D \def\groupedcommand#1#2%
+%D {\def\BeforeGroup{#1\ignorespaces}%
+%D \def\AfterGroup{\unskip#2\egroup}%
+%D \bgroup\bgroup
+%D \aftergroup\AfterGroup
+%D \afterassignment\BeforeGroup
+%D \let\next=}
+%D \stoptypen
+%D
+%D It did indeed, but one day we decided to support the
+%D processing of boxes too:
+%D
+%D \starttypen
+%D \def\rightword%
+%D {\groupedcommand{\hfill\hbox}{\parfillskip\!!zeropoint}}
+%D
+%D .......... \rightword{the right way}
+%D \stoptypen
+%D
+%D Here \TEX\ typesets \type{\bf the right way} unbreakable
+%D at the end of the line. The solution mentioned before does
+%D not work here.
+%D
+%D \starttypen
+%D \long\unexpanded\def\groupedcommand#1#2%
+%D {\bgroup
+%D \long\def\BeforeGroup%
+%D {\bgroup#1\bgroup\aftergroup\AfterGroup}%
+%D \long\def\AfterGroup%
+%D {#2\egroup\egroup}%
+%D \afterassignment\BeforeGroup
+%D \let\next=}
+%D \stoptypen
+%D
+%D We used this method some time until the next alternative
+%D was needed. From now on we support both
+%D
+%D \starttypen
+%D to be \bold{bold} or not, that's the question
+%D \stoptypen
+%D
+%D and
+%D
+%D \starttypen
+%D to be {\bold bold} or not, that's the question
+%D \stoptypen
+%D
+%D This alternative checks for a \type{\bgroup} token first.
+%D The internal alternative does not accept the box handling
+%D mentioned before, but further nesting works all right. The
+%D extra \type{\bgroup}||\type{\egroup} is needed to keep
+%D \type{\AfterGroup} both into sight and local.
+
+\long\def\HandleGroup#1#2%
+ {\bgroup
+ \long\def\BeforeGroup%
+ {\bgroup#1\bgroup\aftergroup\AfterGroup}%
+ \long\def\AfterGroup%
+ {#2\egroup\egroup}%
+ \afterassignment\BeforeGroup
+ \let\next=}
+
+\long\def\HandleNoGroup#1#2%
+ {\long\def\AfterGroup{#2\egroup}%
+ \bgroup\aftergroup\AfterGroup#1}
+
+%D These macros come together in:
+%D
+%D \starttypen
+%D \long\unexpanded\def\groupedcommand#1#2%
+%D {\def\dogroupedcommand%
+%D {\ifx\next\bgroup
+%D \let\next=\HandleGroup
+%D \else
+%D \let\next=\HandleNoGroup
+%D \fi
+%D \next{#1}{#2}}%
+%D \futurelet\next\dogroupedcommand}
+%D \stoptypen
+%D
+%D From the missing paragraph number one can deduce that the
+%D last macro is not the real one yet. I considered it a
+%D nuisance that
+%D
+%D \starttypen
+%D \kleur[groen]
+%D {as gras}
+%D \stoptypen
+%D
+%D was not interpreted as one would expect. This is due to the
+%D fact that \type{\futurelet} obeys blank spaces, and a
+%D line||ending token is treated as a blank space. So the final
+%D implementation became:
+
+\long\unexpanded\def\groupedcommand#1#2%
+ {\bgroup
+ \def\dogroupedcommand%
+ {\ifx\next\bgroup
+ \def\\{\egroup\HandleGroup{#1}{#2}}%
+ \else\ifx\next\blankspace
+ \def\\ {\egroup\groupedcommand{#1}{#2}}%
+ \else
+ \def\\{\egroup\HandleNoGroup{#1}{#2}}%
+ \fi\fi
+ \\}%
+ \futurelet\next\dogroupedcommand}
+
+%D Users should be aware of the fact that grouping can
+%D interfere with ones paragraph settings that are executed
+%D after the paragraph is closed. One should therefore
+%D explictly close the paragraph with \type{\par}, else the
+%D settings will be forgotten and not applied. So it's:
+%D
+%D \starttypen
+%D \def\BoldRaggedCenter%
+%D {\groupedcommand{\raggedcenter\bf}{\par}}
+%D \stoptypen
+
+%D \macros
+%D {checkdefined}
+%D {}
+%D
+%D The bigger the system, the greater the change that
+%D user defined commands collide with those that are part of
+%D the system. The next macro gives a warning when a command is
+%D already defined. We considered blocking the definition, but
+%D this is not always what we want.
+%D
+%D \starttypen
+%D \checkdefined {category} {class} {command}
+%D \stoptypen
+%D
+%D The user is warned with the suggestion to use
+%D \type{CAPITALS}. This suggestion is feasible, because
+%D \CONTEXT only defines lowcased macros.
+
+\def\checkdefined#1#2#3% redefined in mult-ini
+ {\doifdefined{#3}
+ {\writestatus{#1}{#2 #3 replaces a macro, use CAPITALS!}}}
+
+%D \macros
+%D {GotoPar,GetPar}
+%D {}
+%D
+%D Typesetting a paragraph in a special way can be done by
+%D first grabbing the contents of the paragraph and processing
+%D this contents grouped. The next macro for instance typesets
+%D a paragraph in boldface.
+%D
+%D \starttypen
+%D \def\remark#1\par%
+%D {\bgroup\bf#1\egroup}
+%D \stoptypen
+%D
+%D This macro has to be called like
+%D
+%D \starttypen
+%D \remark some text ... ending with \par
+%D \stoptypen
+%D
+%D Instead of \type{\par} we can of course use an empty line.
+%D When we started typesetting with \TEX, we already had
+%D produced lots of text in plain \ASCII. In producing such
+%D simple formatted texts, we adopted an open layout, and when
+%D switching to \TEX, we continued this open habit. Although
+%D \TEX\ permits a cramped and badly formatted source, it adds
+%D to confusion and sometimes introduces errors. So we prefer:
+%D
+%D \starttypen
+%D \remark
+%D
+%D some text ... ending with an empty line
+%D \stoptypen
+%D
+%D We are going to implement a mechanism that allows such open
+%D specifications. The definition of the macro handling
+%D \type{\remark} becomes:
+%D
+%D \starttypen
+%D \def\remark%
+%D {\BeforePar{\bgroup\bf}%
+%D \AfterPar{\egroup}%
+%D \GetPar}
+%D \stoptypen
+%D
+%D A macro like \type{\GetPar} can be defined in several
+%D ways. The recent version, the fourth one in a row,
+%D originally was far more complicated, but some functionality
+%D has been moved to other macros.
+%D
+%D We start with the more simple but in some cases more
+%D appropriate alternative is \type{\GotoPar}. This one leaves
+%D \type{\par} unchanged and is therefore more robust. On the
+%D other hand, \type{\AfterPar} is not supported.
+
+\newtoks\BeforePar
+\newtoks\AfterPar
+
+\def\doGotoPar%
+ {\ifx\nextchar\blankspace
+ \let\donext=\GotoPar
+ \else\ifx\nextchar\endoflinetoken
+ \let\donext=\GotoPar
+ \else
+ \def\donext%
+ {\the\BeforePar
+ \BeforePar{}%
+ \nextchar}%
+ \fi\fi
+ \donext}
+
+\def\GotoPar%
+ {\afterassignment\doGotoPar\let\nextchar=}
+
+%D Its big brother \type{\GetPar} redefines the \type{\par}
+%D primitive, which can lead to unexpected results, depending
+%D in the context.
+
+\def\GetPar%
+ {\edef\next%
+ {\BeforePar
+ {\the\BeforePar
+ \BeforePar{}%
+ \bgroup
+ \def\par%
+ {\egroup
+ \par
+ \the\AfterPar
+ \BeforePar{}%
+ \AfterPar{}}}}%
+ \next
+ \GotoPar}
+
+%D \macros
+%D {dowithpargument,dowithwargument}
+%D {}
+%D
+%D The next macros are a variation on \type{\GetPar}. When
+%D macros expect an argument, it interprets a grouped sequence
+%D of characters a one token. While this adds to robustness and
+%D less ambiguous situations, we sometimes want to be a bit
+%D more flexible, or at least want to be a bit more tolerant
+%D to user input.
+%D
+%D We start with a commands that acts on paragraphs. This
+%D command is called as:
+%D
+%D \starttypen
+%D \dowithpargument\command
+%D \dowithpargument{\command ... }
+%D \stoptypen
+%D
+%D In \CONTEXT\ we use this one to read in the titles of
+%D chapters, sections etc. The commands responsible for these
+%D activities accept several alternative ways of argument
+%D passing. In these examples, the \type{\par} can be omitted
+%D when an empty line is present.
+%D
+%D \starttypen
+%D \command{...}
+%D \command ... \par
+%D \command
+%D {...}
+%D \command
+%D ... \par
+%D \stoptypen
+%D
+%D We show two implementations, of which for the moment the
+%D we prefier to use the second one:
+%D
+%D \starttypen
+%D \def\dowithpargument#1%
+%D {\def\dodowithpargument%
+%D {\ifx\next\bgroup
+%D \def\next{#1}%
+%D \else
+%D \def\next####1 \par{#1{####1}}%
+%D \fi
+%D \next}%
+%D \futurelet\next\dodowithpargument}
+%D \stoptypen
+%D
+%D A second and better implementation was:
+%D
+%D \starttypen
+%D \def\dowithpargument#1%
+%D {\def\nextpar##1 \par{#1{##1}}%
+%D \def\nextarg##1{#1{##1}}%
+%D \doifnextcharelse{\bgroup}
+%D {\nextarg}
+%D {\nextpar}}
+%D \stoptypen
+%D
+%D We ended up with an alternative that also accepts en empty
+%D argument. This command permits for instance chapters to
+%D have no title.
+
+\def\dowithpargument#1%
+ {\def\nextpar##1 \par{#1{##1}}%
+ \def\nextarg##1{#1{##1}}%
+ \doifnextcharelse{\bgroup}
+ {\nextarg}
+ {\doifnextcharelse{\par}
+ {#1{}}
+ {\nextpar}}}
+
+%D The \type{p} in the previous command stands for paragraph.
+%D When we want to act upon words we can use the \type{w}
+%D alternative.
+%D
+%D \starttypen
+%D \dowithwargument\command
+%D \dowithwargument{... \command ...}
+%D \stoptypen
+%D
+%D The main difference bwteen two alternatives is in the
+%D handling of \type{\par}'s. This time the space token acts
+%D as a delimiter.
+%D
+%D \starttypen
+%D \command{...}
+%D \command ...
+%D \command
+%D {...}
+%D \command
+%D ...
+%D \stoptypen
+%D
+%D Again there are two implementations possible:
+%D
+%D \starttypen
+%D \def\dowithwargument#1%
+%D {\def\dodowithwargument%
+%D {\ifx\next\bgroup
+%D \def\next{#1}%
+%D \else
+%D \def\next####1 {#1{####1}}%
+%D \fi
+%D \next}%
+%D \futurelet\next\dodowithwargument}
+%D \stoptypen
+%D
+%D We've chosen:
+
+\def\dowithwargument#1%
+ {\def\nextwar##1 {#1{##1}}%
+ \def\nextarg##1{#1{##1}}%
+ \doifnextcharelse{\bgroup}
+ {\nextarg}
+ {\nextwar}}
+
+%D \macros
+%D {dorepeat,dorepeatwithcommand}
+%D {}
+%D
+%D When doing repetitive tasks, we stromgly advice to use
+%D \type{\dorecurse}. The next alternative however, suits
+%D better some of the \CONTEXT\ interface commands.
+%D
+%D \starttypen
+%D \dorepeat[n*\command]
+%D \stoptypen
+%D
+%D The value of the used \COUNTER\ can be called within
+%D \type{\command} by \type{\repeater}.
+%D
+%D A slightly different alternative is:
+%D
+%D \starttypen
+%D \dorepeatwithcommand[n*{...}]\command
+%D \stoptypen
+%D
+%D When we call for something like:
+%D
+%D \starttypen
+%D \dorepeatwithcommand[3*{Hello}]\message
+%D \stoptypen
+%D
+%D we get ourselves three \type{\message{Hello}} messages in
+%D a row. In both commands, the \type{n*} is optional. When this
+%D specification is missing, the command executes once.
+
+\long\def\dodorepeat[#1*#2*#3*]%
+ {\doifelse{#3}{}
+ {#1}
+ {\dorecurse{#1}{#2}}}
+
+\long\def\dorepeat[#1]%
+ {\dodorepeat[#1***]}
+
+\def\repeater%
+ {\recurselevel}
+
+\def\dorepeatwithcommand[#1]#2%
+ {\def\p!dorepeatnot%
+ {#2{#1}}%
+ \def\p!dorepeatyes[##1*##2]%
+ {\dorecurse{##1}{#2{##2}}}%
+ \doifinstringelse{*}{#1}
+ {\doifnumberelse{#1}{\p!dorepeatyes[#1]}{\p!dorepeatnot}}%
+ {\p!dorepeatnot}}
+
+%D \macros
+%D {appendtoks,prependtoks,flushtoks,dotoks}
+%D {}
+%D
+%D We use \TOKENLISTS\ sparsely within \CONTEXT, because the
+%D comma separated lists are more suitable for the user
+%D interface. Nevertheless we have:
+%D
+%D \starttypen
+%D (\doglobal) \appendtoks ... \to\tokenlist
+%D (\doglobal) \prependtoks ... \to\tokenlist
+%D (\doglobal) \flushtoks\tokenlist
+%D \dotoks\tokenlist
+%D \stoptypen
+%D
+%D Er worden eerst enkele klad||registers gedefinieerd. These
+%D macros are clones of the ones implemented in page~378 of
+%D Knuth's \TeX book.
+
+\def\appendtoks#1\to#2%
+ {\scratchtoks={#1}%
+ \edef\next{\noexpand#2={\the#2\the\scratchtoks}}%
+ \next
+ \doglobal#2=#2}
+
+\def\prependtoks#1\to#2%
+ {\scratchtoks={#1}%
+ \edef\next{\noexpand#2={\the\scratchtoks\the#2}}%
+ \next
+ \doglobal#2=#2}
+
+\def\flushtoks#1%
+ {\scratchtoks=#1\relax
+ \doglobal#1={}%
+ \the\scratchtoks\relax}
+
+\let\dotoks=\the
+
+%D \macros
+%D {makecounter,pluscounter,minuscounter,
+%D resetcounter,setcounter,countervalue}
+%D {}
+%D
+%D Declaring, setting and resetting \COUNTERS\ can be doen
+%D with the next set of commands.
+%D
+%D \starttypen
+%D \makecounter {name}
+%D \pluscounter {name}
+%D \minuscounter {name}
+%D \resetcounter {name}
+%D \setcounter {name} {value}
+%D \countervalue {name}
+%D \stoptypen
+%D
+%D We prefer the use of global counters. This means that we
+%D have to load \PLAIN\ \TEX\ in a bit different way:
+%D
+%D \starttypen
+%D \let\oldouter=\outer
+%D \let\outer=\relax
+%D \input plain.tex
+%D \let\outer=\oldouter
+%D
+%D \def\newcount%
+%D {\alloc@0\count\countdef\insc@unt}
+%D \stoptypen
+%D
+%D First we show a solution in which we use real \COUNTERS.
+%D Apart from some expansion, nothing special is done.
+%D
+%D \starttypen
+%D \def\makecounter#1%
+%D {\expandafter\newcount\csname#1\endcsname}
+%D
+%D \def\pluscounter#1%
+%D {\expandafter\global\expandafter\advance\csname#1\endcsname by 1 }
+%D
+%D \def\minuscounter#1%
+%D {\expandafter\global\expandafter\advance\csname#1\endcsname by -1 }
+%D
+%D \def\resetcounter#1%
+%D {\expandafter\global\csname#1\endcsname=0 }
+%D
+%D \def\setcounter#1#2%
+%D {\expandafter\global\csname#1\endcsname=#2 }
+%D
+%D \def\countervalue#1%
+%D {\the\getvalue{#1}}
+%D \stoptypen
+%D
+%D Because these macros are already an indirect way of working
+%D with counters, there is no harm in using pseudo \COUNTERS\
+%D here:
+
+\def\makecounter#1%
+ {\setxvalue{#1}{0}}
+
+\def\pluscounter#1%
+ {\scratchcounter=\getvalue{#1}\relax
+ \advance\scratchcounter by 1\relax
+ \setxvalue{#1}{\the\scratchcounter}}
+
+\def\minuscounter#1%
+ {\scratchcounter=\getvalue{#1}\relax
+ \advance\scratchcounter by -1\relax
+ \setxvalue{#1}{\the\scratchcounter}}
+
+\def\resetcounter#1%
+ {\setxvalue{#1}{0}}
+
+\def\setcounter#1#2%
+ {\scratchcounter=#2\relax
+ \setxvalue{#1}{\the\scratchcounter}}
+
+\def\countervalue#1%
+ {\getvalue{#1}}
+
+%D \macros
+%D {savecounter,restorecounter}
+%D
+%D These two commands can be used to save and restore counter
+%D values. Only one level is saved.
+
+\def\savecounter#1%
+ {\expanded{\setgvalue{!#1}{\getvalue{#1}}}}
+
+\def\restorecounter#1%
+ {\expanded{\setgvalue{#1}{\getvalue{!#1}}}}
+
+%D \macros
+%D {beforesplitstring,aftersplitstring}
+%D {}
+%D
+%D These both commands split a string at a given point in two
+%D parts, so \type{x.y} becomes \type{x} or \type{y}.
+%D
+%D \starttypen
+%D \beforesplitstring test.tex\at.\to\filename
+%D \aftersplitstring test.tex\at.\to\extension
+%D \stoptypen
+%D
+%D The first routine looks (and is indeed) a bit simpler than
+%D the second one. The alternative looking more or less like
+%D the first one did not always give the results we needed.
+%D Both implementations show some insight in the manipulation
+%D of arguments.
+
+\def\beforesplitstring#1\at#2\to#3%
+ {\def\dosplitstring##1#2##2#2##3\\%
+ {\def#3{##1}}%
+ \@EA\dosplitstring#1#2#2\\}
+
+\def\aftersplitstring#1\at#2\to#3%
+ {\def\dosplitstring##1#2##2@@@##3\\%
+ {\def#3{##2}}%
+ \@EA\dosplitstring#1@@@#2@@@\\}
+
+%D \macros
+%D {removesubstring}
+%D {}
+%D
+%D A first application of the two routines defined above is:
+%D
+%D \starttypen
+%D \removesubstringtest-\from first-last\to\nothyphenated
+%D \stoptypen
+%D
+%D Which in terms of \TEX\ looks like:
+
+\def\removesubstring#1\from#2\to#3%
+ {\doifinstringelse{#1}{#2}
+ {\beforesplitstring#2\at#1\to\!!stringa
+ \aftersplitstring #2\at#1\to\!!stringb
+ \edef#3{\!!stringa\!!stringb}%
+ \def\next{\removesubstring#1\from#3\to#3}}
+ {\let\next=\relax}%
+ \next}
+
+%D \macros
+%D {addtocommalist,removefromcommalist}
+%D {}
+%D
+%D When working with comma separated lists, oen sooner or
+%D later want the tools to append or remove items from such a
+%D list. When we add an item, we first check if it's already
+%D there. This means that every item in the list is unique.
+%D
+%D \starttypen
+%D \addtocommalist {alfa} \naam
+%D \addtocommalist {beta} \naam
+%D \addtocommalist {gamma} \naam
+%D \removefromcommalist {beta} \naam
+%D \stoptypen
+%D
+%D These commands can be prefixed with \type{\doglobal}. The
+%D implementation of the second command is more complecated,
+%D because we have to take leading spaces into account. Keep in
+%D mind that useres may provide lists with spaces after the
+%D commas. When one item is left, we also have to get rid of
+%D trailing spaces.
+%D
+%D \starttypen
+%D \def\words{alfa, beta, gamma, delta}
+%D \def\words{alfa,beta,gamma,delta}
+%D \stoptypen
+%D
+%D Removing an item takes more time than adding one.
+
+\def\addtocommalist#1#2%
+ {\doifelse{#2}{}
+ {\dodoglobal\edef#2{#1}}
+ {\edef\!!stringa{#2,,}%
+ \beforesplitstring#2\at,,\to#2\relax
+ \ExpandBothAfter\doifnotinset{#1}{#2}
+ {\dodoglobal\edef#2{#2,#1}}}}
+
+\def\doremovefromcommalist#1#2#3%
+ {\edef\!!stringa{,,#3,,}%
+ \beforesplitstring\!!stringa\at,#1#2,\to\!!stringb
+ \aftersplitstring\!!stringa\at,#1#2,\to\!!stringc
+ \edef#3{\!!stringb,\!!stringc}%
+ \aftersplitstring#3\at,,\to#3\relax
+ \beforesplitstring#3\at,,\to#3}
+
+\def\dodofrontstrip[#1#2]#3%
+ {\ifx#1\space
+ \def#3{#2}%
+ \else
+ \def#3{#1#2}%
+ \fi}%
+
+\def\dofrontstrip#1%
+ {\edef\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \else
+ \@EA\dodofrontstrip\@EA[#1]#1%
+ \fi}
+
+\def\removefromcommalist#1#2%
+ {\doremovefromcommalist{ }{#1}{#2}%
+ \doremovefromcommalist{}{#1}{#2}%
+ \dofrontstrip#2%
+ \dodoglobal\edef#2{#2}}
+
+%D \macros
+%D {withoutunit,withoutpt,
+%D PtToCm,
+%D numberofpoints,dimensiontocount}
+%D {}
+%D
+%D We can convert point into centimeters with:
+%D
+%D \starttypen
+%D \PtToCm{dimension}
+%D \stoptypen
+%D
+%D Splitting the value and the unit is done by:
+
+\def\withoutunit#1#2%
+ {\bgroup
+ \dimen0=#1\relax
+ \@EA\convertargument\the\dimen0\to\asciiA
+ \@EA\convertargument#2\to\asciiB
+ \@EA\@EA\@EA\beforesplitstring\@EA\asciiA\@EA\at\asciiB\to\!!stringa%
+ \!!stringa
+ \egroup}
+
+\def\withoutpt#1%
+ {\withoutunit{#1}{pt}}
+
+\def\withoutcm#1%
+ {\withoutunit{#1}{cm}}
+
+%D A bit faster alternative is one that manipulates the
+%D \CATCODES.
+
+{\catcode`\.=\@@other
+ \catcode`\p=\@@other
+ \catcode`\t=\@@other
+ \gdef\WITHOUTPT#1pt{#1}}
+
+\def\withoutpt#1%
+ {\expandafter\WITHOUTPT#1}
+
+%D The capitals are needed because \type{p} and \type{t} have
+%D \CATCODE~12, while macronames only permit tokens with the
+%D \CATCODE~11. As a result we cannot use the \type{.group}
+%D primitives. Those who want to know more about this kind of
+%D manipulations, we advice to study the \TEX book in detail.
+%D Because this macro does not do any assignment, we can use it
+%D in the following way too.
+
+\def\PtToCm#1%
+ {\bgroup
+ \scratchdimen=#1\relax
+ \scratchdimen=0.0351459804\scratchdimen % 2.54/72.27
+ \withoutpt{\the\scratchdimen}cm%
+ \egroup}
+
+%D We also support:
+%D
+%D \starttypen
+%D \numberofpoints {dimension}
+%D \dimensiontocount {dimension} {\count}
+%D \stoptypen
+%D
+%D Both macros return a rounded number.
+
+\def\numberofpoints#1%
+ {\scratchdimen=#1\relax
+ \advance\scratchdimen by .5pt\relax
+ \withoutpt{\the\scratchdimen}}
+
+\def\dimensiontocount#1#2%
+ {\scratchdimen=#1\relax
+ \advance\scratchdimen by .5pt\relax
+ #2=\scratchdimen
+ \divide#2 by \!!maxcard\relax}
+
+%D \macros
+%D {swapdimens,swapmacros}
+%D {}
+%D
+%D Simple but effective are the next two macros. There name
+%D exactly states their purpose. The \type{\scratchdimen} and
+%D \type{\!!stringa} can only be swapped when being the first
+%D argument.
+
+\def\swapdimens#1#2%
+ {\scratchdimen=#1\relax
+ #1=#2\relax
+ #2=\scratchdimen}
+
+\def\swapmacros#1#2%
+ {\let\!!stringa=#1\relax
+ \let#1=#2\relax
+ \let#2=\!!stringa\relax}
+
+%D \macros
+%D {setlocalhsize}
+%D {}
+%D
+%D Sometimes we need to work with the \type{\hsize} that is
+%D corrected for indentation and left and right skips. The
+%D corrected value is available in \type{\localhsize}, which
+%D needs to be calculated with \type{\setlocalhsize} first.
+%D
+%D \starttypen
+%D \setlocalhsize \hbox to \localhsize{...}
+%D \setlocalhsize[-1em] \hbox to \localhsize{...}
+%D \setlocalhsize[.5ex] \hbox to \localhsize{...}
+%D \stoptypen
+%D
+%D These examples show us that an optional can be used. The
+%D value provided is added to \type{\localhsize}.
+
+\newdimen\localhsize
+
+\def\complexsetlocalhsize[#1]%
+ {\localhsize=\hsize
+ \advance\localhsize by -\parindent
+ \advance\localhsize by -\leftskip
+ \advance\localhsize by -\rightskip
+ \advance\localhsize by #1\relax}
+
+\def\simplesetlocalhsize%
+ {\complexsetlocalhsize[\!!zeropoint]}
+
+\definecomplexorsimple\setlocalhsize
+
+%D \macros
+%D {processtokens}
+%D {}
+%D
+%D We fully agree with (most) typogaphers that inter||letter
+%D spacing is only permitted in fancy titles, we provide a
+%D macro that can be used to do so. Because this is
+%D (definitely and fortunately) no feature of \TEX, we have to
+%D step through the token list ourselves.
+%D
+%D \starttypen
+%D \processtokens {before} {between} {after} {space} {tokens}
+%D \stoptypen
+%D
+%D An example of a call is:
+%D
+%D \startbuffer
+%D \processtokens {[} {+} {]} {\space} {hello world}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This results in:
+%D
+%D \haalbuffer
+%D
+%D The list of tokens may contain spaces, while \type{\\},
+%D \type{{}} and \type{\ } are handled as space too.
+
+\def\dodoprocesstokens%
+ {\ifx\next\lastcharacter
+ \after
+ \let\next=\relax
+ \else\ifx\next\bgroup
+ \def\next%
+ {\dowithnextbox
+ {\before\box\nextbox
+ \let\before=\between
+ \doprocesstokens}
+ \hbox\bgroup}%
+ \else
+ \expandafter\if\space\next
+ \before\white
+ \else
+ \before\next
+ \fi
+ \let\before=\between
+ \let\next=\doprocesstokens
+ \fi\fi
+ \next}
+
+\def\doprocesstokens% the space after = is essential
+ {\afterassignment\dodoprocesstokens\let\next= }
+
+\def\processtokens#1#2#3#4#5%
+ {\bgroup
+ \def\lastcharacter{\lastcharacter}%
+ \def\space{ }%
+ \let\\=\space
+ \def\before{#1}%
+ \def\between{#2}%
+ \def\after{#3}%
+ \def\white{#4}%
+ \doprocesstokens#5\lastcharacter
+ \egroup}
+
+%D \macros
+%D {doifvalue,doifnotvalue,doifelsevalue,
+%D doifnothing,doifsomething,doifelsenothing,
+%D doifvaluenothing,doifvaluesomething,doifelsevaluenothing}
+%D {}
+%D
+%D These long named \type{\if} commands can be used to access
+%D macros (or variables) that are normally accessed by using
+%D \type{\getvalue}. Using these alternatives safes us three
+%D tokens per call. Anyone familiar with the not||values
+%D ones, can derive their meaning from the definitions.
+
+ \def\doifvalue#1{\doif{\getvalue{#1}}}
+ \def\doifnotvalue#1{\doifnot{\getvalue{#1}}}
+ \def\doifelsevalue#1{\doifelse{\getvalue{#1}}}
+
+ \def\doifnothing#1{\doif{#1}{}}
+ \def\doifsomething#1{\doifnot{#1}{}}
+ \def\doifelsenothing#1{\doifelse{#1}{}}
+
+ \def\doifvaluenothing#1{\doif{\getvalue{#1}}{}}
+ \def\doifvaluesomething#1{\doifnot{\getvalue{#1}}{}}
+\def\doifelsevaluenothing#1{\doifelse{\getvalue{#1}}{}}
+
+%D \macros
+%D {DOIF,DOIFELSE,DOIFNOT}
+%D {}
+%D
+%D \TEX\ is case sensitive. When comparing arguments, this
+%D feature sometimes is less desirable, for instance when we
+%D compare filenames. The next three alternatives upcase their
+%D arguments before comparing them.
+%D
+%D \starttypen
+%D \DOIF {string1} {string2} {...}
+%D \DOIFNOT {string1} {string2} {...}
+%D \DOIFELSE {string1} {string2} {then ...}{else ...}
+%D \stoptypen
+%D
+%D We have to use a two||step implementation, because the
+%D expansion has to take place outside \type{\uppercase}.
+
+\def\p!DOIF#1#2#3%
+ {\uppercase{\ifinstringelse{$#1$}{$#2$}}%
+ #3%
+ \fi}
+
+\def\p!DOIFNOT#1#2#3%
+ {\uppercase{\ifinstringelse{$#1$}{$#2$}}%
+ \else
+ #3%
+ \fi}
+
+\def\p!DOIFELSE#1#2#3#4%
+ {\uppercase{\ifinstringelse{$#1$}{$#2$}}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+\def\DOIF {\ExpandBothAfter\p!DOIF}
+\def\DOIFNOT {\ExpandBothAfter\p!DOIFNOT}
+\def\DOIFELSE {\ExpandBothAfter\p!DOIFELSE}
+
+%D \macros
+%D {stripcharacters,stripspaces}
+%D {}
+%D
+%D The next command was needed first when we implemented
+%D the \CONTEXT\ interactivity macros. When we use labeled
+%D destinations, we often cannot use all the characters we
+%D want. We therefore strip some of the troublemakers, like
+%D spaces, from the labels before we write them to the
+%D \DVI||file, which passes them to for instance a PostScript
+%D file.
+%D
+%D \starttypen
+%D \stripspaces\from\one\to\two
+%D \stoptypen
+%D
+%D Both the old string \type{\one} and the new one \type{\two}
+%D are expanded. This command is a special case of:
+%D
+%D \starttypen
+%D \stripcharacter\char\from\one\to\two
+%D \stoptypen
+%D
+%D As we can see below, spaces following a control sequence are
+%D to enclosed in \type{{}}.
+
+\def\stripcharacter#1\from#2\to#3%
+ {\def\dostripcharacter##1#1##2\end%
+ {\edef\p!strippedstring{\p!strippedstring##1}%
+ \doifemptyelse{##2}
+ {\let\next=\relax}
+ {\def\next{\dostripcharacter##2\end}}%
+ \next}%
+ \let\p!strippedstring=\empty
+ \edef\!!stringa{#2}%
+ \@EA\dostripcharacter\!!stringa#1\end
+ \let#3=\p!strippedstring}
+
+\def\stripspaces\from#1\to#2%
+ {\stripcharacter{ }\from#1\to#2}
+
+%D \macros
+%D {executeifdefined}
+%D {}
+%D
+%D \CONTEXT\ uses one auxiliary file for all data concerning
+%D tables of contents, references, two||pass optimizations,
+%D sorted lists etc. This file is loaded as many times as
+%D needed. During such a pass we skip the commands thate are of
+%D no use at that moment. Because we don't want to come into
+%D trouble with undefined auxiliary commands, we call the
+%D macros in a way similar to \type{\getvalue}. The next macro
+%D take care of such executions and when not defined, gobbles
+%D the unwanted arguments.
+%D
+%D \starttypen
+%D \executeifdefined{name}\gobbleoneargument
+%D \stoptypen
+%D
+%D We can of course globble more arguments using the
+%D appropriate globbling command.
+
+\def\executeifdefined#1#2%
+ {\ifundefined{#1}%
+ \def\next{#2}%
+ \else
+ \def\next{\getvalue{#1}}%
+ \fi
+ \next}
+
+%D We considered an alternative imlementation accepting
+%D commands directly, like:
+%D
+%D \starttypen
+%D \executeifdefined\naam\gobblefivearguments
+%D \stoptypen
+%D
+%D For the moment we don't need this one, so we stick to the
+%D faster one. The more versatile alternative is:
+%D
+%D \starttypen
+%D \def\executeifdefined#1#2%
+%D {\setnameofcommand{#1}%
+%D \@EA\ifundefined\@EA{\nameofcommand}
+%D \def\next{#2}%
+%D \else
+%D \def\next{\getvalue{\nameofcommand}}%
+%D \fi
+%D \next}
+%D \stoptypen
+
+%D \macros
+%D {doifsomespaceelse}
+%D {}
+%D
+%D The next command checks a string on the presence of a space
+%D and executed a command accordingly.
+%D
+%D \starttypen
+%D \doifsomespaceelse {tekst} {then ...} {else ...}
+%D \stoptypen
+%D
+%D We use this command in \CONTEXT\ for determing if an
+%D argument must be broken into words when made interactive.
+%D Watch the use of \type{\noexpand}.
+
+\long\def\doifsomespaceelse#1#2#3%
+ {\def\c!doifsomespaceelse##1 ##2##3\war%
+ {\if\noexpand##2@%
+ #3%
+ \else
+ #2%
+ \fi}%
+ \c!doifsomespaceelse#1 @ @\war}
+
+%D \macros
+%D {adaptdimension,balancedimensions}
+%D {}
+%D
+%D Again we introduce some macros that are closely related to
+%D an interface aspect of \CONTEXT. The first command can be
+%D used to adapt a \DIMENSION.
+%D
+%D \starttypen
+%D \adaptdimension {dimension} {value}
+%D \stoptypen
+%D
+%D When the value is preceed by a \type{+} or minus, the
+%D dimension is advanced accordingly, otherwise it gets the
+%D value.
+
+\def\doadaptdimension#1#2\\#3\\%
+ {\if#1+%
+ \dodoglobal\advance#3 by #1#2\relax
+ \else\if##1-%
+ \dodoglobal\advance#3 by #1#2\relax
+ \else
+ \dodoglobal#3=#1#2\relax
+ \fi\fi}
+
+\def\adaptdimension#1#2%
+ {\expandafter\doadaptdimension#2\\#1\\}
+
+%D A second command takes two \DIMENSIONS. Both are adapted,
+%D depending on the sign of the given value.
+%D maat. This time we take the value as it is, and don't look
+%D explicitly at the preceding sign.
+%D
+%D \starttypen
+%D \balancedimensions {dimension 1} {dimension 2} {value}
+%D \stoptypen
+%D
+%D When a positive value is given, the first dimension is
+%D incremented, the second ond is decremented. A negative value
+%D has the opposite result.
+
+\def\balancedimensions#1#2#3%
+ {\scratchdimen=#3\relax
+ \redoglobal\advance#1 by \scratchdimen\relax
+ \dodoglobal\advance#2 by -\scratchdimen\relax}
+
+%D Both commands can be preceded by \type{\doglobal}. Here we
+%D use \type{\redo} first, because \type{\dodo} resets the
+%D global character.
+
+%D \macros
+%D {processconcanatedlist}
+%D {}
+%D
+%D Maybe a bit late, but here is a more general version of the
+%D \type{\processcommalist} command. This time we don't handle
+%D nesting but accept arbitrary seperators.
+%D
+%D \starttypen
+%D \processconcanatedlist[list][separator]\command
+%D \stoptypen
+%D
+%D One can think of things like:
+%D
+%D \starttypen
+%D \processconcanatedlist[alfa+beta+gamma][+]\message
+%D \stoptypen
+
+\def\processconcanatedlist[#1][#2]#3%
+ {\def\doprocessconcanatedlist##1##2#2%
+ {\if]##1%
+ \let\next=\relax
+ \else\if]##2%
+ \let\next=\relax
+ \else\ifx\blankspace##2%
+ #3{##1}%
+ \let\next=\doprocessconcanatedlist
+ \else
+ #3{##1##2}%
+ \let\next=\doprocessconcanatedlist
+ \fi\fi\fi
+ \next}%
+ \doprocessconcanatedlist#1#2]#2}
+
+%D \macros
+%D {processassignlist}
+%D {}
+%D
+%D Is possible to combine an assignment list with one
+%D containing keywords. Assignments are treated accordingly,
+%D keywords are treated by \type{\command}.
+%D
+%D \starttypen
+%D \processassignlist[...=...,...=...,...]\commando
+%D \stoptypen
+%D
+%D This command can be integrated in \type{\getparameters}, but
+%D we decided best not to do so.
+
+\def\processassignlist#1[#2]#3%
+ {\def\p!dodogetparameter[##1=##2=##3]%
+ {\doifnot{##3}{\relax}{#3{##1}}}%
+ \def\p!dogetparameter##1%
+ {\p!dodogetparameter[##1==\relax]}%
+ \processcommalist[#2]\p!dogetparameter}
+
+%D \macros
+%D {DoAfterFi,DoAfterFiFi}
+%D {}
+%D
+%D Sometimes \type{\fi}'s can get into the way. We can reach
+%D over such a troublemaker with:
+%D
+%D \starttypen
+%D \DoAfterFi{some commands}
+%D \DoAfterFiFi{some commands}
+%D \stoptypen
+%D
+%D It saves us a \type{\next} construction. Skipping
+%D \type{\else...\fi} is more tricky, so this one is not
+%D provided.
+
+\def\DoAfterFi#1\fi{\fi#1}
+\def\DoAfterFiFi#1\fi#2\fi{\fi\fi#1}
+
+%D \macros
+%D {untextargument
+%D untexcommand}
+%D
+%D When manipulating data(bases) and for instance generating
+%D index entries, the next three macros can be of help:
+%D
+%D \starttypen
+%D \untextargument{...}\to\name
+%D \untexcommand {...}\to\name
+%D \stoptypen
+%D
+%D They remove braces and backslashes and give us something to
+%D sort.
+
+\def\untexsomething%
+ {\bgroup
+ \catcode`\{=\@@ignore
+ \catcode`\}=\@@ignore
+ \escapechar=-1
+ \dountexsomething}
+
+\long\def\dountexsomething#1#2\to#3%
+ {\doglobal#1#2\to\untexedargument
+ \egroup
+ \let#3=\untexedargument}
+
+\def\untexargument%
+ {\untexsomething\convertargument}
+
+\def\untexcommand%
+ {\untexsomething\convertcommand}
+
+%D \macros
+%D {ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints}
+%D
+%D One characteristic of \POSTSCRIPT\ and \PDF\ is that both
+%D used big points (\TEX's bp). The next macros convert points
+%D and scaled points into big points.
+%D
+%D \starttypen
+%D \ScaledPointsToBigPoints {number} \target
+%D \ScaledPointsToWholeBigPoints {number} \target
+%D \stoptypen
+%D
+%D The magic factor $72/72.27$ can be found in most \TEX\
+%D related books.
+
+\def\ScaledPointsToBigPoints#1#2%
+ {\scratchdimen=#1sp\relax
+ \scratchdimen=.996264\scratchdimen
+ \edef#2{\withoutpt{\the\scratchdimen}}}
+
+\def\ScaledPointsToWholeBigPoints#1#2%
+ {\scratchdimen=#1sp\relax
+ \scratchdimen=.996264\scratchdimen
+ \scratchcounter=\scratchdimen
+ \advance\scratchcounter by \!!medcard
+ \divide\scratchcounter by \!!maxcard
+ \edef#2{\the\scratchcounter}}
+
+%D \macros
+%D {PointsToReal}
+%D
+%D Points can be stripped from their suffix by using
+%D \type{\withoutpt}. The next macro enveloppes this macro.
+%D
+%D \starttypen
+%D \PointsToReal {dimension} \target
+%D \stoptypen
+
+\def\PointsToReal#1#2%
+ {\scratchdimen=#1%
+ \edef#2{\withoutpt{\the\scratchdimen}}}
+
+%D \macros
+%D {dontleavehmode}
+%D
+%D Sometimes when we enter a paragraph with some command, the
+%D first token gets the whole first line. We can prevent this
+%D by saying:
+%D
+%D \starttypen
+%D \dontleavehmode
+%D \stoptypen
+%D
+%D This command is used in for instance the language module
+%D \type{lang-ini}.
+
+\def\dontleavehmode{\ifmmode\else$ $\fi}
+
+%D \macro
+%D {handletokens}
+%D
+%D With the next macro we enter a critical area of macro
+%D expansion. What we want is a macro that looks like:
+%D
+%D \handletokens some tokens\with \somemacro
+%D
+%D At first sight the next implementation will suffice, but
+%D running this one shows that we loose the spaces. This is no
+%D surprise because we grab arguments and spaces preceding those
+%D are just ignored.
+%D
+%D \starttypen
+%D \def\nohandletokens#1\end%
+%D {}
+%D
+%D \def\dohandletokens#1#2\end%
+%D {\ifx#1\endoftoken
+%D \expandafter\nohandletokens
+%D \else
+%D \docommando{#1}%
+%D \expandafter\dohandletokens
+%D \fi
+%D #2\end}
+%D
+%D \long\def\handletokens#1\with#2%
+%D {\let\docommando=#2\relax
+%D \dohandletokens#1\endoftoken\end}
+%D \stoptypen
+%D
+%D A second approach therefore grabs the indicidual characters
+%D by using \type{\afterassignment}, in which case the space is
+%D read in as space.
+%D
+%D \starttypen
+%D \def\dodohandletokens%
+%D {\ifx\next\end \else
+%D \docommando\next
+%D \expandafter\dohandletokens
+%D \fi}
+%D
+%D \def\dohandletokens%
+%D {\afterassignment\dodohandletokens\let\next= }
+%D
+%D \long\def\handletokens#1\with#2%
+%D {\let\docommando=#2%
+%D \dohandletokens#1\end}
+%D \stoptypen
+
+%D \macro
+%D {counttoken}
+%D
+%D For the few occasion sthat we want to know the number of
+%D specific tokens in a string, we can use:
+%D
+%D \starttypen
+%D \counttoken token\in string\to \count
+%D \stoptypen
+%D
+%D This macro, that for instance is used in \type{cont-tab},
+%D takes a real counter. The macro can be preceded by \type
+%D {\doglobal}.
+
+\def\counttoken#1\in#2\to#3%
+ {\redoglobal#3=0
+ \def\!!stringa{#1}%
+ \def\!!stringb{\end}%
+ \def\docounttoken##1% obeys {}
+ {\def\!!stringc{##1}%
+ \ifx\!!stringb\!!stringc \else
+ \ifx\!!stringa\!!stringc
+ \dodoglobal\advance#3 by 1
+ \fi
+ \expandafter\docounttoken
+ \fi}%
+ \docounttoken#2\end
+ \resetglobal}
+
+%D \macros
+%D {splitofftokens}
+%D
+%D Running this one not always gives the expected results.
+%D Consider for instance the macro for which I originally
+%D wrote this token handler.
+
+\long\def\splitofftokens#1\from#2\to#3%
+ {\ifnum#1>0
+ \scratchcounter=#1\relax
+ \def\dosplitofftokens##1%
+ {\ifnum\scratchcounter>0
+ \advance\scratchcounter by -1
+ \edef#3{#3##1}%
+ \fi}%
+ % \let#3=\empty % #3 can be #2, so:
+ \@EA\let\@EA#3\@EA\empty
+ \@EA\handletokens#2\with\dosplitofftokens
+ \else
+ \edef#3{#2}%
+ \fi}
+
+%D This macro can be called like:
+%D
+%D \startbuffer[example]
+%D \splitofftokens10\from01234567 890123456789\to\test [\test]
+%D \stopbuffer
+%D
+%D However, the characters that we expect to find in
+%D \type{\test} just don;t show up there. The reason for this
+%D is not that logical but follows from \TEX's sometimes
+%D mysterious way of expanding. Look at this:
+%D
+%D \startbuffer[next]
+%D \def\next{a} \edef\test{\next} [\test]
+%D \let\next=b \edef\test{\test\next} [\test]
+%D \let\next=c \edef\test{\next} [\test]
+%D \let\next=d \edef\test{\test\next} [\test]
+%D \let\next=e \@EA\edef\@EA\test\@EA{\test\next} [\test]
+%D \stopbuffer
+%D
+%D \typebuffer[next]
+%D
+%D Careful reading shows that inside an \type{\edef} macro's
+%D that are \type{\let} are not expanded!
+%D
+%D \haalbuffer[next]
+%D
+%D That's why we finally end up with a macro that looks ahead
+%D by using an assignment, this time by using
+%D \type{\futurelet}, and grabbing an argument as well. That
+%D way we can handle both the sentinal and the blank space.
+
+\def\dodohandletokens#1%
+ {\ifx\next\blankspace
+ \docommando{ }%
+ \fi
+ \ifx#1\end \else
+ \docommando{#1}%
+ \expandafter\dohandletokens
+ \fi}
+
+\def\dohandletokens%
+ {\futurelet\next\dodohandletokens}
+
+\long\def\handletokens#1\with#2%
+ {\let\docommando=#2% #2 can be \docommando itself
+ \dohandletokens#1\end}
+
+%D So our example finaly shows up as:
+%D
+%D \haalbuffer[example]
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex new file mode 100644 index 000000000..b9b3da9d9 --- /dev/null +++ b/tex/context/base/syst-gen.tex @@ -0,0 +1,2682 @@ +%D \module
+%D [ file=syst-gen,
+%D version=1996.3.20,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=General,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D The following macros are responsible for the interaction
+%D with \CONTEXT. These macros have proven their use. These
+%D macros are optimized as far as possible within of course,
+%D the know how of the author.
+%D
+%D In this module we also show some of the optimizations,
+%D mainly because we don't want to forget them and start doing
+%D things over and over again. If showing them has a learing
+%D effect for others too, we've surved another purpose too.
+
+%D \macros
+%D {abortinputifdefined}
+%D {}
+%D
+%D Because this module can be used in a different context, we
+%D want to prevent it being loaded more than once. This can be
+%D done using:
+%D
+%D \starttypen
+%D \abortinputifdefined\command
+%D \stoptypen
+%D
+%D where \type{\command} is a command defined in the module
+%D to be loaded only once.
+%D
+%D \starttypen
+%D \def\abortinputifdefined#1%
+%D {\ifx#1\undefined
+%D \let\next=\relax
+%D \else
+%D \let\next=\endinput
+%D \fi
+%D \next}
+%D \stoptypen
+%D
+%D This macro can be speed up in terms of speed as well as
+%D memory. Because this is a nice example of a bit strange
+%D command (\type{\endinput}), we spend some more lines on this.
+%D
+%D If we perform such actions directly, we can say:
+%D
+%D \starttypen
+%D \ifx\somecommand\undefined
+%D \let\next=\relax
+%D \else
+%D \let\next=\endinput
+%D \fi
+%D \next
+%D \stoptypen
+%D
+%D We need the \type{\next} because we need to end the
+%D \type{\fi}. The efficient one is:
+%D
+%D \starttypen
+%D \ifx\somecommand\undefined
+%D \else
+%D \expandafter\endinput
+%D \fi
+%D \stoptypen
+%D
+%D Because \type{\endinput} comes into action after the current
+%D line, we can also say:
+%D
+%D \starttypen
+%D \ifx\somecommand\undefined \else \endinput \fi
+%D \stoptypen
+%D
+%D When we define a macro, we tend to use a format which
+%D shows as besat as can how things are done. \TEX\ however
+%D stores the definitions as a sequence of tokens, so in fact
+%D we can use a formatted definition:
+
+\def\abortinputifdefined#1%
+ {\ifx#1\undefined \else
+ \endinput
+ \fi}
+
+%D which also works. Keep in mind that this is entirely due to
+%D the fact that \type{\endinput} after the line, i.e. at the
+%D end of the macro. We therefore can burry this primitive quite
+%D deep in code.
+
+%D And because this module implements \type{\writestatus}, we
+%D just say:
+
+\abortinputifdefined\writestatus
+
+%D Normally we tell the users what module is being loaded.
+%D However, the command that is needed for this is not yet
+%D defined.
+%D
+%D \starttypen
+%D \writestatus{laden}{Context Systeem Macro's (a)}
+%D \stoptypen
+
+%D \macros
+%D [beschermen]
+%D {protect,unprotect}
+%D {}
+%D
+%D We can shield macros from users by using some special
+%D characters in their names. Some characters that are normally
+%D no letters and therefore often used are: \type{@}, \type{!}
+%D and \type{?}. Before and after the definition of protected
+%D macros, we have to change the \CATCODE\ of these characters.
+%D This is done by \type{\unprotect} and \type{\protect}, for
+%D instance:
+%D
+%D \starttypen
+%D \unprotect
+%D \def\!test{test}
+%D \protect
+%D \stoptypen
+%D
+%D The defined command \type{\!test} can of course only be
+%D called upon when we are in the \type{\unprotect}'ed state,
+%D otherwise \TEX\ reads \type{\!} and probably complains
+%D loudly about not being in math mode.
+%D
+%D Both commands can be used nested, but only the \CATCODE\
+%D of the outermost level is saved. We make use of
+%D an auxilary macro \type{\doprotect} to prevent us from
+%D conflicts with existing macro's \type{\protect}. When
+%D nesting deeper than one level, the system shows the
+%D protection level.
+
+\newcount\protectionlevel
+
+\ifx\protect\undefined
+ \def\protect{\message{<too much protection>}}
+\fi
+
+\let\normalprotect=\protect
+
+%D Although we don't need the \type{%} after commands that
+%D don't take arguments, unless lines are obeyed, I decided
+%D to put it there as a reminder. I only mention this once.
+
+\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
+ \ifnum\protectionlevel>1
+ \message{<unprotect \the\protectionlevel>}%
+ \fi}
+
+\def\doprotect%
+ {\ifnum\protectionlevel=1
+ \doprotectcharacters
+ \let\protect=\normalprotect
+ \fi
+ \ifnum\protectionlevel>1
+ \message{<protect \the\protectionlevel>}%
+ \fi
+ \advance\protectionlevel by -1\relax}
+
+%D Now it is defined, we can make use of this very useful
+%D macro.
+
+\unprotect
+
+%D \macros
+%D {@@escape,@@begingroup,@@endgroup,@@mathshift,@@alignment,
+%D @@endofline,@@parameter,@@superscript,@@subscript,
+%D @@ignore,@@space,@@letter,@@other,@@active,@@comment}
+%D {}
+%D
+%D In \CONTEXT\ we sometimes manipulate the \CATCODES\ of
+%D certain characters. Because we are not that good at numbers,
+%D we introduce some symbolic names.
+
+\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
+
+%D \macros
+%D {normalspace}
+%D {}
+%D
+%D We often need a space as defined in \PLAIN\ \TEX. Because
+%D we cannot be sure of \type{\space} is redefined, we define:
+
+\def\normalspace{ }
+
+%D \macros
+%D {scratchcounter,
+%D scratchdimen,scratchskip,scratchmuskip,
+%D scratchbox,
+%D scratchtoks
+%D ifdone}
+%D {}
+%D
+%D Because we often need counters on a temporary basis, we
+%D define the \COUNTER\ \type{\scratchcounter}. This is a
+%D real \COUNTER, and not a pseudo one, as we will meet
+%D further on. We also define some other scratch registers.
+
+\newcount \scratchcounter
+\newdimen \scratchdimen
+\newskip \scratchskip
+\newmuskip \scratchmuskip
+\newbox \scratchbox
+\newtoks \scratchtoks
+\newif \ifdone
+
+%D \macros
+%D {ifCONTEXT}
+%D {}
+%D
+%D In the system and support modules we sometimes show examples
+%D that make use of core commands. We can skip those parts of
+%D the documentation when we use another macropackage. Of
+%D course we default to false.
+
+\newif \ifCONTEXT
+
+%D \macros
+%D {!!count, !!toks, !!dimen, !!box,
+%D !!width, !!height, !!depth, !!string, !!done}
+%D {}
+%D
+%D We define some more \COUNTERS\ and \DIMENSIONS. We also
+%D define some shortcuts to the local scatchregisters~0, 2, 4,
+%D 6 and~8.
+
+\newcount\!!counta \toksdef\!!toksa=0 \dimendef\!!dimena=0 \chardef\!!boxa=0
+\newcount\!!countb \toksdef\!!toksb=2 \dimendef\!!dimenb=2 \chardef\!!boxb=2
+\newcount\!!countc \toksdef\!!toksc=4 \dimendef\!!dimenc=4 \chardef\!!boxc=4
+\newcount\!!countd \toksdef\!!toksd=6 \dimendef\!!dimend=6 \chardef\!!boxd=6
+\newcount\!!counte \toksdef\!!tokse=8 \dimendef\!!dimene=8 \chardef\!!boxe=8
+\newcount\!!countf
+
+\def\!!stringa{} \def\!!stringb{} \def\!!stringc{}
+\def\!!stringd{} \def\!!stringe{} \def\!!stringf{}
+
+\newdimen\!!widtha \newdimen\!!heighta \newdimen\!!deptha \newif\if!!donea
+\newdimen\!!widthb \newdimen\!!heightb \newdimen\!!depthb \newif\if!!doneb
+
+%D \macros
+%D {s!,c!,e!,p!,v!,@@,??}
+%D {}
+%D
+%D To save memory, we use constants (sometimes called
+%D variables). Redefining these constants can have desastrous
+%D results.
+
+\def\v!prefix! {v!} \def\c!prefix! {c!}
+\def\s!prefix! {s!} \def\p!prefix! {p!}
+
+\def\s!next {next} \def\s!default {default}
+\def\s!dummy {dummy} \def\s!unknown {unknown}
+
+\def\s!do {do} \def\s!dodo {dodo}
+
+\def\s!complex {complex} \def\s!start {start}
+\def\s!simple {simple} \def\s!stop {stop}
+
+%D \macros
+%D {@EA,expanded}
+%D {}
+%D
+%D When in unprotected mode, to be entered with
+%D \type{\unprotect}, one can use \type{\@EA} as equivalent
+%D of \type{\expandafter}.
+
+\let\@EA=\expandafter
+
+%D Sometimes we pass macros as arguments to commands that
+%D don't expand them before interpretation. Such commands can
+%D be enclosed with \type{\expanded}, like:
+%D
+%D \starttypen
+%D \expanded{\setupsomething[\alfa]}
+%D \stoptypen
+%D
+%D Such situations occur for instance when \type{\alfa} is a
+%D commalist or when data stored in macros is fed to index of
+%D list commands. If needed, one should use \type{\noexpand}
+%D inside the argument. Later on we will meet some more clever
+%D alternatives to this command.
+
+\def\expanded#1%
+ {\edef\@@expanded{\noexpand#1}\@@expanded}
+
+%D \macros
+%D {gobbleoneargument,gobble...arguments}
+%D {}
+%D
+%D The next set of macros just do nothing, except that they
+%D get rid of a number of arguments.
+
+\long\def\gobbleoneargument #1{}
+\long\def\gobbletwoarguments #1#2{}
+\long\def\gobblethreearguments #1#2#3{}
+\long\def\gobblefourarguments #1#2#3#4{}
+\long\def\gobblefivearguments #1#2#3#4#5{}
+\long\def\gobblesixarguments #1#2#3#4#5#6{}
+\long\def\gobblesevenarguments #1#2#3#4#5#6#7{}
+\long\def\gobbleeightarguments #1#2#3#4#5#6#7#8{}
+\long\def\gobbleninearguments #1#2#3#4#5#6#7#8#9{}
+
+%D \macros
+%D {doifnextcharelse}
+%D {}
+%D
+%D When we started using \TEX\ in the late eighties, our
+%D first experiences with programming concerned a simple shell
+%D around \LATEX. The commands probably use most at \PRAGMA,
+%D are the itemizing ones. One of those few shell commands took
+%D care of an optional argument, that enabled us to specify
+%D what kind of item symbol we wanted. Without understanding
+%D anything we were able to locate a \LATEX\ macro that could
+%D be used to inspect the next character.
+%D
+%D It's this macro that the ancester of the next one presented
+%D here. It executes one of two actions, dependant of the next
+%D character. Disturbing spaces and line endings, which are
+%D normally interpreted as spaces too, are skipped.
+%D
+%D \starttypen
+%D \doifnextcharelse {karakter} {then ...} {else ...}
+%D \stoptypen
+%D
+%D This macro differs from the original in testing on
+%D \type{\endoflinetoken}, which of course we have to define
+%D first. We also use \type{\localnext} because we don't want
+%D clashes with \type{\next}.
+
+\let\endoflinetoken=^^M
+
+\long\def\doifnextcharelse#1#2#3%
+ {\let\charactertoken=#1%
+ \def\!!stringa{#2}%
+ \def\!!stringb{#3}%
+ \futurelet\nexttoken\inspectnextcharacter}
+
+\def\inspectnextcharacter%
+ {\ifx\nexttoken\blankspace
+ \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}
+
+%D This macro uses some auxiliary macros. Although we were able
+%D to program quite complicated things, I only understood these
+%D after rereading the \TEX book. The trick is in using a
+%D command with a one character name. Such commands differ from
+%D the longer ones in the fact that trailing spaces are {\em
+%D not} skipped. This enables us to indirectly define a long
+%D named macro that gobbles a space.
+%D
+%D In the first line we define \type{\blankspace}. Next we
+%D make \type{\:} equivalent to \type{\reinspect...}. This
+%D one||character command is expanded before the next
+%D \type{\def} comes into action. This way the space after
+%D \type{\:} becomes a delimiter of the longer named
+%D \type{\reinspectnextcharacter}. The chain reaction is
+%D visually compatible with the next sequence:
+%D
+%D \starttypen
+%D \expandafter\def\reinspectnextcharacter %
+%D {\futurelet\nexttoken\inspectnextcharacter}
+%D \stoptypen
+%D
+%D However complicated it may look, I'm still glad I stumbled
+%D into this construction.
+
+\def\:{\let\blankspace= } \:
+
+\def\:{\reinspectnextcharacter}
+
+\expandafter\def\: {\futurelet\nexttoken\inspectnextcharacter}
+
+%D \macros
+%D {setvalue,setgvalue,setevalue,setxvalue,
+%D letvalue,
+%D getvalue,
+%D resetvalue}
+%D {}
+%D
+%D \TEX's primitive \type{\csname} can be used to construct
+%D all kind of commands that cannot be defined with
+%D \type{\def} and \type{\let}. Every macro programmer sooner
+%D or later wants macros like these.
+%D
+%D \starttypen
+%D \setvalue {naam}{...} = \def\naam{...}
+%D \setgvalue {naam}{...} = \gdef\naam{...}
+%D \setevalue {naam}{...} = \edef\naam{...}
+%D \setxvalue {naam}{...} = \xdef\naam{...}
+%D \letvalue {naam}=\... = \let\naam=\...
+%D \getvalue {naam} = \naam
+%D \resetvalue {naam} = \def\naam{}
+%D \stoptypen
+%D
+%D As we will see, \CONTEXT\ uses these commands many times,
+%D which is mainly due to its object oriented and parameter
+%D driven character.
+
+\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}{}}
+
+%D \macros
+%D {donottest,unexpanded}
+%D {}
+%D
+%D When expansion of a macro gives problems, we can precede it
+%D by \type{\donottest}. It seems that protection is one of the
+%D burdens of developers of packages, so maybe that's why in
+%D e-\TeX\ protection will be solved in a more robust way.
+%D
+%D Sometimes prefixing the macro with \type{\donottest} leads
+%D to defining an auxiliary macro, like
+%D
+%D \starttypen
+%D \def\dosomecommand {... ... ...}
+%D \def\somecommand {\donottest\dosomecommand}
+%D \stoptypen
+%D
+%D This double definition can be made transparant by using
+%D \type{\protecte}, as in:
+%D
+%D \starttypen
+%D \unexpanded\def\somecommand{... ... ...}
+%D \stoptypen
+%D
+%D The protection mechanism uses:
+
+\def\dontprocesstest#1%
+ {==}
+
+\def\doprocesstest#1%
+ {#1}
+
+\let\donottest=\doprocesstest
+
+%D By the way, we use a placeholder because we don't want
+%D interference when testing on empty strings. Using a
+%D placeholder of 8~characters increases the processing time
+%D of simple \type{\doifelse} tests by about 10 \%. When we
+%D process the test, we have to remove the braces and
+%D therefore explictly gobble \type{#1}.
+
+%D The fact that many macros have the same prefix, could have
+%D a negative impact on searching in the hash table. Because
+%D some simple testing does not show differences, we just use:
+%D
+%D \starttypen
+%D \def\unexpanded#1#2%
+%D {\@EA#1\@EA#2\@EA{\@EA\donottest\csname\s!do\string#2\endcsname}%
+%D \@EA#1\csname\s!do\string#2\endcsname}
+%D \stoptypen
+%D
+%D Well, in fact we use the bit more versaatile alternative:
+
+\def\dosetunexpanded#1#2%
+ {\@EA#1\@EA{\@EA#2\@EA}%
+ \@EA{\@EA\donottest\csname\s!do\@EA\string\csname#2\endcsname\endcsname}%
+ \@EA#1{\s!do\@EA\string\csname#2\endcsname}}
+
+\def\docomunexpanded#1#2%
+ {\@EA#1\@EA#2\@EA{\@EA\donottest\csname\s!do\string#2\endcsname}%
+ \@EA#1\csname\s!do\string#2\endcsname}
+
+\def\unexpanded#1%
+ {\def\dounexpanded%
+ {\ifx\next\bgroup
+ \@EA\dosetunexpanded
+ \else
+ \@EA\docomunexpanded
+ \fi#1}%
+ \futurelet\next\dounexpanded}
+
+%D This one accepts the more direct \type{\def} and cousins
+%D as well as the \CONTEXT\ specific \type{\setvalue} ones.
+%D
+%D And so the definition in our example turns out to be:
+%D
+%D \starttypen
+%D \def\csname do\somecommand\endcsname{... ... ...}
+%D \def\somecommand{\donottest\csname do\somecommand\endcsname}
+%D \stoptypen
+%D
+%D In which \type{do\somecommand} is hidden from the user and
+%D cannot lead to confusion. It's still permitted to define
+%D auxiliary macros like \type{\dosomecommand}.
+%D
+%D When we are going to use e-\TEX, we'll probably end up
+%D redefining some commands, but we can probably keep the
+%D \type{\unexpanded} ones unchanged.
+
+%D \macros
+%D {doifundefined,doifdefined,
+%D doifundefinedelse,doifdefinedelse,
+%D doifalldefinedelse}
+%D {}
+%D
+%D The standard way of testing if a macro is defined is
+%D comparing its meaning with another undefined one, usually
+%D \type{\undefined}. To garantee correct working of the next
+%D set of macros, \type{\undefined} may never be defined!
+%D
+%D \starttypen
+%D \doifundefined {string} {...}
+%D \doifdefined {string} {...}
+%D \doifundefinedelse {string} {then ...} {else ...}
+%D \doifdefinedelse {string} {then ...} {else ...}
+%D \doifalldefinedelse {commalist} {then ...} {else ...}
+%D \stoptypen
+%D
+%D Every macroname that \TEX\ builds gets an entry in the hash
+%D table, which is of limited size. It is expected that e-\TeX\
+%D will offer a less memory||consuming alternative.
+
+%D Although it will probably never be a big problem, it is good
+%D to be aware of the difference between testing on a macro
+%D name to be build by using \type{\csname} and
+%D \type{\endcsname} and testing the \type{\name} directly.
+%D
+%D \starttypen
+%D \expandafter\ifx\csname NameA\endcsname\relax ... \else ... \fi
+%D
+%D \ifx\NameB\undefined ... \else ... \fi
+%D \stoptypen
+%D
+%D I became aware of this when I mistakenly testen the first
+%D one against \type{\undefined}. When \TEX\ build a name using
+%D \type{\csname} it automatically sets it to \type{\relax},
+%D which is definitely not the same as \type{\undefined}. The
+%D quickest way to check these things is asking \TEX\ to show
+%D the meaning of the names:
+%D
+%D \starttypen
+%D \expandafter\show\csname NameA\endcsname
+%D
+%D \show\NameB
+%D \stoptypen
+%D
+%D The main reason why this never will be a big problem is that
+%D when one uses the \type{\csname} way, one probably has to do
+%D with some macroname that always is dealt with that way.
+%D Confusion can however arise when one applies both testing
+%D methods to the same macroname. By the way, the assignment
+%D of \type{\relax} obeys grouping.
+
+%D The first one gets rid of \type{#1}, but still expands to
+%D something and the second one expands to \type{#1}. Because
+%D we accept arguments between \type{{}}, we have to get rid
+%D of one level of braces.
+%D
+%D Our first implementation of \type{\ifundefined} was
+%D straightforward and readable:
+%D
+%D \starttypen
+%D \def\ifundefined#1%
+%D {\expandafter\ifx\csname#1\endcsname\relax}%
+%D
+%D \def\doifundefinedelse#1#2#3%
+%D {\let\donottest=\dontprocesstest
+%D \ifundefined{#1}%
+%D \let\donottest=\doprocesstest#2%
+%D \else
+%D \let\donottest=\doprocesstest#3%
+%D \fi}
+%D
+%D \def\doifdefinedelse#1#2#3%
+%D {\doifundefinedelse{#1}{#3}{#2}}
+%D
+%D \def\doifundefined#1#2%
+%D {\doifundefinedelse{#1}{#2}{}}
+%D
+%D \def\doifdefined#1#2%
+%D {\doifundefinedelse{#1}{}{#2}}
+%D
+%D \def\doifalldefinedelse#1#2#3%
+%D {\bgroup
+%D \donetrue
+%D \def\checkcommand##1%
+%D {\doifundefined{##1}{\donefalse}}%
+%D \processcommalist[#1]\checkcommand
+%D \ifdone
+%D \egroup#2%
+%D \else
+%D \egroup#3%
+%D \fi}
+%D \stoptypen
+%D
+%D When this module was optimized, timing showed that the
+%D next alternative can be upto twice as fast, especially when
+%D longer arguments are used.
+
+\def\ifundefined#1%
+ {\expandafter\ifx\csname#1\endcsname\relax}
+
+\def\p!doifundefined#1%
+ {\let\donottest=\dontprocesstest
+ \expandafter\ifx\csname#1\endcsname\relax}
+
+\def\doifundefinedelse#1#2#3%
+ {\p!doifundefined{#1}%
+ \let\donottest=\doprocesstest#2%
+ \else
+ \let\donottest=\doprocesstest#3%
+ \fi}
+
+\def\doifdefinedelse#1#2#3%
+ {\p!doifundefined{#1}%
+ \let\donottest=\doprocesstest#3%
+ \else
+ \let\donottest=\doprocesstest#2%
+ \fi}
+
+\def\doifundefined#1#2%
+ {\p!doifundefined{#1}%
+ \let\donottest=\doprocesstest#2%
+ \else
+ \let\donottest=\doprocesstest
+ \fi}
+
+\def\doifdefined#1#2%
+ {\p!doifundefined{#1}%
+ \let\donottest=\doprocesstest
+ \else
+ \let\donottest=\doprocesstest#2%
+ \fi}
+
+%D Before we start using this variant, we used another one,
+%D which is even a bit faster. This one looked like:
+%D
+%D \starttypen
+%D \def\p!doifundefined%
+%D {\begingroup
+%D \let\donottest=\dontprocesstest
+%D \ifundefined}
+%D
+%D \def\doifundefinedelse#1#2#3%
+%D {\p!doifundefined{#1}%
+%D \endgroup#2%
+%D \else
+%D \endgroup#3%
+%D \fi}
+%D \stoptypen
+%D
+%D A even more previous version used \type{\bgroup} and
+%D \type{\egroup}. In math mode however, \type{$1{x}2$} differs
+%D from \type{$1x2$}. This can been seen when one compares the
+%D output of:
+%D
+%D \starttypen
+%D $\kern10pt\showthe\lastkern$
+%D $\kern10pt{\showthe\lastkern}$
+%D $\kern10pt\begingroup\showthe\lastkern\endgroup$
+%D \stoptypen
+%D
+%D When we were developing the scientific units module, we
+%D encountered different behavior in text and math mode, which
+%D was due to this grouping subtilities. We therefore decided
+%D to use \type{\begingroup} instead of \type{\bgroup}.
+%D Later, when we had optimized some macro's the grouped
+%D solution turned out to be unsafe when typesetting this
+%D documentation, especially when using \type{\globaldefs}.
+%D
+%D We still have to define \type{\doifalldefinedelse}. Watch
+%D the use of grouping, which garantees local use of the
+%D boolean \type{\ifdone}.
+
+\def\docheckonedefined#1%
+ {\ifundefined{#1}%
+ \donefalse
+ \fi}
+
+\def\doifalldefinedelse#1#2#3%
+ {\begingroup
+ \let\donottest=\dontprocesstest
+ \donetrue
+ \processcommalist[#1]\docheckonedefined
+ \ifdone
+ \endgroup\let\donottest=\doprocesstest#2%
+ \else
+ \endgroup\let\donottest=\doprocesstest#3%
+ \fi}
+
+%D \macros
+%D {doif,doifelse,doifnot,
+%D donottest}
+%D {}
+%D
+%D Programming in \TEX\ differs from programming in procedural
+%D languages like \MODULA. This means that one --- well, let me
+%D speek for myself --- tries to do the things in the well
+%D known way. Therefore the next set of \type{\ifthenelse}
+%D commands were between the first ones we needed. A few years
+%D later, the opposite became true: when programming in
+%D \MODULA, I sometimes miss handy things like grouping,
+%D runtime redefinition, expansion etc. While \MODULA\ taught
+%D me to structure, \TEX\ taught me to think recursive.
+%D
+%D \starttypen
+%D \doif {string1} {string2} {...}
+%D \doifnot {string1} {string2} {...}
+%D \doifelse {string1} {string2} {then ...}{else ...}
+%D \stoptypen
+%D
+%D When expansion gives problems, we can precede the
+%D troublemaker with \type{\donottest}.
+%D
+%D This implementatie does not use the construction which is
+%D more robust for nested conditionals.
+%D
+%D \starttypen
+%D \ifx\!!stringa\!!stringb
+%D \def\next{#3}%
+%D \else
+%D \def\next{#4}%
+%D \fi
+%D \next
+%D \stoptypen
+%D
+%D In practice, this alternative is at least 20\% slower than
+%D the alternative used here. The few cases in which we
+%D really need the \type{\next} construction, often need some
+%D other precautions and or adaptions too.
+
+\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}
+
+%D One could wonder why we don't follow the the same approach
+%D as in \type{\doifdefined} c.s.\ and use \type{\begingroup}
+%D and \type{\endgroup}. In this case, this alternative is
+%D slower, which is probably due to the fact that more meanings
+%D need to be restored.
+%D
+%D The in terms of memory more efficient alternative using a
+%D auxiliary macro also proved to be slower, so we definitely
+%D did not choose for:
+%D
+%D \starttypen
+%D \def\p!doifelse#1#2%
+%D {\let\donottest=\dontprocesstest
+%D \edef\!!stringa{#1}%
+%D \edef\!!stringb{#2}%
+%D \let\donottest=\doprocesstest
+%D \ifx\!!stringa\!!stringb}
+%D
+%D \long\def\doif#1#2#3%
+%D {\p!doifelse{#1}{#2}#3\fi}
+%D
+%D \long\def\doifnot#1#2#3%
+%D {\p!doifelse{#1}{#2}\else#3\fi}
+%D
+%D \long\def\doifelse#1#2#3#4%
+%D {\p!doifelse{#1}{#2}#3\else#4\fi}
+%D \stoptypen
+%D
+%D Optimizations like this are related of course to the
+%D bottlenecks in \TEX. It seems that restoring saved meanings
+%D and passing arguments takes some time.
+
+%D \macros
+%D {doifempty,doifemptyelse,doifnotempty}
+%D {}
+%D
+%D We complete our set of conditionals with:
+%D
+%D \starttypen
+%D \doifempty {string} {...}
+%D \doifnot {string} {...}
+%D \doifemptyelse {string} {then ...} {else ...}
+%D \stoptypen
+%D
+%D This time, the string is not expanded.
+
+\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}
+
+%D \macros
+%D {doifinset,doifnotinset,doifinsetelse}
+%D {}
+%D
+%D We can check if a string is present in a comma separated
+%D set of strings. Depending on the result, some action is
+%D taken.
+%D
+%D \starttypen
+%D \doifinset {string} {string,...} {...}
+%D \doifnotinset {string} {string,...} {...}
+%D \doifinsetelse {string} {string,...} {then ...} {else ...}
+%D \stoptypen
+%D
+%D The second argument is the comma separated set of strings.
+%D
+%D \starttypen
+%D \long\def\doifinsetelse#1#2#3#4%
+%D {\doifelse{#1}{}
+%D {#4}
+%D {\donefalse
+%D \def\v!checkiteminset##1%
+%D {\doif{#1}{##1}
+%D {\donetrue
+%D \let\v!checkiteminset=\gobbleoneargument}}%
+%D \processcommalist[#2]\v!checkiteminset
+%D \ifdone
+%D #3%
+%D \else
+%D #4%
+%D \fi}}
+%D
+%D \long\def\doifinset#1#2#3%
+%D {\doifinsetelse{#1}{#2}{#3}{}}
+%D
+%D \long\def\doifnotinset#1#2#3%
+%D {\doifinsetelse{#1}{#2}{}{#3}}
+%D \stoptypen
+%D
+%D Because this macro is called quite often we've spent some
+%D time optimizing it. This time, the gain in speed is due to
+%D (1)~defining an external auxiliary macro, (2)~not calling
+%D any other macros and (3)~minimizing the passing of
+%D arguments. The gain in speed is impressive.
+
+\def\p!dodocheckiteminset#1%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \donetrue
+ \let\p!docheckiteminset=\gobbleoneargument
+ \fi}
+
+\def\p!doifinsetelse#1#2%
+ {\let\donottest=\dontprocesstest
+ \donefalse
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \else
+ \let\p!docheckiteminset=\p!dodocheckiteminset
+ \processcommalist[#2]\p!docheckiteminset
+ \fi
+ \let\donottest=\doprocesstest
+ \ifdone}
+
+\long\def\doifinsetelse#1#2#3#4%
+ {\p!doifinsetelse{#1}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+\long\def\doifinset#1#2#3%
+ {\p!doifinsetelse{#1}{#2}%
+ #3%
+ \fi}
+
+\long\def\doifnotinset#1#2#3%
+ {\p!doifinsetelse{#1}{#2}%
+ \else
+ #3%
+ \fi}
+
+%D \macros
+%D {doifcommon,doifnotcommon,doifcommonelse}
+%D {}
+%D
+%D Probably the most time consuming tests are those that test
+%D for overlap in sets of strings.
+%D
+%D \starttypen
+%D \doifcommon {string,...} {string,...} {...}
+%D \doifnotcommon {string,...} {string,...} {...}
+%D \doifcommonelse {string,...} {string,...} {then ...} {else ...}
+%D \stoptypen
+%D
+%D We show the slower alternative first, because it shows us
+%D how things are done.
+%D
+%D \starttypen
+%D \long\def\doifcommonelse#1#2#3#4%
+%D {\donefalse
+%D \def\p!docommoncheck##1%
+%D {\def\p!dodocommoncheck####1%
+%D {\doif{####1}{##1}
+%D {\donetrue
+%D \def\commalistelement{##1}%
+%D \let\p!docommoncheck=\gobbleoneargument
+%D \let\p!dodocommoncheck=\gobbleoneargument}}%
+%D \processcommalist[#2]\p!dodocommoncheck}%
+%D \processcommalist[#1]\p!docommoncheck
+%D \ifdone
+%D #3%
+%D \else
+%D #4%
+%D \fi}
+%D
+%D \long\def\doifcommon#1#2#3%
+%D {\doifcommonelse{#1}{#2}{#3}{}}
+%D
+%D \long\def\doifnotcommon#1#2#3%
+%D {\doifcommonelse{#1}{#2}{}{#3}}
+%D \stoptypen
+%D
+%D The processing time is shortened by getting the auxiliary
+%D macro to the outermost level and using less \type{\edef}'s.
+%D Sometimes it makes more sence to define local macro's not
+%D only because this way we can be sure that they are not
+%D redefined, but also because it shows the dependance. In
+%D compiled languages, this is no problem at all. It can even
+%D save us bytes and processing time. In interpreted languages
+%D like \TEX\ it nearly always slows down processing.
+
+\def\p!dododocommoncheck#1%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \donetrue
+ \let\p!docommoncheck\gobbleoneargument
+ \let\p!dodocommoncheck\gobbleoneargument
+ \fi}
+
+\def\p!doifcommonelse#1#2%
+ {\donefalse
+ \let\donottest\dontprocesstest
+ \let\p!dodocommoncheck\p!dododocommoncheck
+ \def\p!docommoncheck##1%
+ {\edef\!!stringa{##1}%
+ \def\commalistelement{##1}%
+ \processcommalist[#2]\p!dodocommoncheck}%
+ \processcommalist[#1]\p!docommoncheck
+ \let\donottest\doprocesstest
+ \ifdone}
+
+\long\def\doifcommonelse#1#2#3#4%
+ {\p!doifcommonelse{#1}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+\long\def\doifcommon#1#2#3%
+ {\p!doifcommonelse{#1}{#2}%
+ #3%
+ \fi}
+
+\long\def\doifnotcommon#1#2#3%
+ {\p!doifcommonelse{#1}{#2}%
+ \else
+ #3%
+ \fi}
+
+%D \macros
+%D {processcommalist,processcommacommand,
+%D processcommalistwithparameters}
+%D {}
+%D
+%D We've already seen some macros that take care of comma
+%D separated lists. Such list can be processed with
+%D
+%D \starttypen
+%D \processcommalist[string,string,...]\commando
+%D \stoptypen
+%D
+%D The user supplied command \type{\commando} receives one
+%D argument: the string. This command permits nesting and
+%D spaces after commas are skipped. Empty sets are no problem.
+%D
+%D \startbuffer
+%D \def\dosomething#1{(#1)}
+%D
+%D \processcommalist [\hbox{$a,b,c,d,e,f$}] \dosomething \par
+%D \processcommalist [{a,b,c,d,e,f}] \dosomething \par
+%D \processcommalist [{a,b,c},d,e,f] \dosomething \par
+%D \processcommalist [a,b,{c,d,e},f] \dosomething \par
+%D \processcommalist [a{b,c},d,e,f] \dosomething \par
+%D \processcommalist [{a,b}c,d,e,f] \dosomething \par
+%D \processcommalist [] \dosomething \par
+%D \processcommalist [{[}] \dosomething \par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Before we show the result, we present the macro's:
+
+\newcount\commalevel
+
+\def\dododoprocesscommaitem%
+ {\csname\s!next\the\commalevel\endcsname}
+
+\def\dodoprocesscommaitem%
+ {\ifx\nexttoken\blankspace
+ \let\nextcommaitem\redoprocesscommaitem
+ %\else\ifx\nexttoken\endoflinetoken
+ %\let\nextcommaitem\redoprocesscommaitem
+ \else\ifx\nexttoken]%
+ \let\nextcommaitem=\gobbleoneargument
+ \else
+ \let\nextcommaitem=\dododoprocesscommaitem
+ \fi\fi%\fi
+ \nextcommaitem}
+
+\def\doprocesscommaitem%
+ {\futurelet\nexttoken\dodoprocesscommaitem}
+
+\def\doprocesscommalist#1]#2%
+ {\advance\commalevel by 1\relax
+ \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+ {#2{##1}\doprocesscommaitem}%
+ \doprocesscommaitem#1,]\relax
+ \advance\commalevel by -1\relax}
+
+%D Empty arguments are not processed. Empty items (\type{,,})
+%D however are treated.
+
+\def\docheckcommaitem%
+ {\ifx\nexttoken]%
+ \let\nextcommaitem=\gobbletwoarguments
+ \else
+ \let\nextcommaitem=\doprocesscommalist
+ \fi
+ \nextcommaitem}
+
+\def\processcommalist[%
+ {\futurelet\nexttoken\docheckcommaitem}
+
+%D We use the same hack for checking the next character, that
+%D we use in \type{\doifnextcharelse}.
+
+\def\:{\redoprocesscommaitem}
+
+\expandafter\def\: {\futurelet\nexttoken\dodoprocesscommaitem}
+
+%D The previous examples lead to:
+%D
+%D \haalbuffer
+
+%D When a list is saved in a macro, we can use a construction
+%D like:
+%D
+%D \starttypen
+%D \expandafter\processcommalist\expandafter[\list]\command
+%D \stoptypen
+%D
+%D Such solutions suit most situations, but we wanted a bit
+%D more.
+%D
+%D \starttypen
+%D \processcommacommand[string,\stringset,string]\commando
+%D \stoptypen
+%D
+%D where \type{\stringset} is a predefined set, like:
+%D
+%D \starttypen
+%D \def\first{aap,noot,mies}
+%D \def\second{laatste}
+%D
+%D \processcommacommand[\first]\message
+%D \processcommacommand[\first,second,third]\message
+%D \processcommacommand[\first,between,\second]\message
+%D \stoptypen
+%D
+%D Commands that are part of the list are expanded, so the
+%D use of this macro has it slimits.
+
+\def\processcommacommand[#1]%
+ {\edef\commacommand{#1}%
+ \toks0=\expandafter{\expandafter[\commacommand]}%
+ \expandafter\processcommalist\the\toks0 }
+
+%D The argument to \type{\command} is not delimited. Because
+%D we often use \type{[]} as delimiters, we also have:
+%D
+%D \starttypen
+%D \processcommalistwithparameters[string,string,...]\command
+%D \stoptypen
+%D
+%D where \type{\command} looks like:
+%D
+%D \starttypen
+%D \def\command[#1]{... #1 ...}
+%D \stoptypen
+
+\def\processcommalistwithparameters[#1]#2%
+ {\def\docommand##1{#2[##1]}%
+ \processcommalist[#1]\docommand}
+
+%D \macros
+%D {processaction,
+%D processfirstactioninset,
+%D processallactionsinset}
+%D {}
+%D
+%D \CONTEXT\ makes extensive use of a sort of case or switch
+%D command. Depending of the presence of one or more provided
+%D items, some actions is taken. These macros can be nested
+%D without problems.
+%D
+%D \starttypen
+%D \processaction [x] [a=>\a,b=>\b,c=>\c]
+%D \processfirstactioninset [x,y,z] [a=>\a,b=>\b,c=>\c]
+%D \processallactionsinset [x,y,z] [a=>\a,b=>\b,c=>\c]
+%D \stoptypen
+%D
+%D We can supply both a \type{default} action and an action
+%D to be undertaken when an \type{unknown} value is met:
+%D
+%D \starttypen
+%D \processallactionsinset
+%D [x,y,z]
+%D [ a=>\a,
+%D b=>\b,
+%D c=>\c,
+%D default=>\default,
+%D unknown=>\unknown{... \commalistelement ...}]
+%D \stoptypen
+%D
+%D When \type{#1} is empty, this macro scans list \type{#2} for
+%D the keyword \type{default} and executed the related action
+%D if present. When \type{#1} is non empty and not in the list,
+%D the action related to \type{unknown} is executed. Both
+%D keywords must be at the end of list \type{#2}. Afterwards,
+%D the actually found keyword is available in
+%D \type{\commalistelement}. An advanced example of the use of
+%D this macro can be found in \PPCHTEX, where we completely
+%D rely on \TEX\ for interpreting user supplied keywords like
+%D \type{SB}, \type{SB1..6}, \type{SB125} etc.
+%D
+%D Even a quick glance at the macros below show some overlap,
+%D which means that more efficient alternatives are possible.
+%D Because these macro's are very sensitive to subtle changes,
+%D we've decided to present the readable originals first
+%D Maybe these these macros look complicated, but this is a
+%D direct result of the support of nesting. Protection is only
+%D applied in \type{\processaction}.
+%D
+%D \starttypen
+%D \newcount\processlevel
+%D
+%D \def\processaction[#1]#2[#3]%
+%D {\doifelse{#1}{}
+%D {\def\c!compareprocessaction[##1=>##2]%
+%D {\edef\!!stringa{##1}%
+%D \ifx\!!stringa\s!default
+%D \def\commalistelement{#1}%
+%D ##2%
+%D \fi}}
+%D {\let\donottest=\dontprocesstest
+%D \edef\!!stringb{#1}%
+%D \let\donottest=\doprocesstest
+%D \def\c!compareprocessaction[##1=>##2]%
+%D {\edef\!!stringa{##1}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{#1}%
+%D ##2%
+%D \let\c!doprocessaction=\gobbleoneargument
+%D \else\ifx\!!stringa\s!unknown
+%D \def\commalistelement{#1}%
+%D ##2%
+%D \fi\fi}}%
+%D \def\c!doprocessaction##1%
+%D {\c!compareprocessaction[##1]}%
+%D \processcommalist[#3]\c!doprocessaction}
+%D
+%D \def\processfirstactioninset[#1]#2[#3]%
+%D {\doifelse{#1}{}
+%D {\processaction[][#3]}
+%D {\def\c!compareprocessaction[##1=>##2][##3]%
+%D {\edef\!!stringa{##1}%
+%D \edef\!!stringb{##3}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \let\c!doprocessaction=\gobbleoneargument
+%D \let\c!dodoprocessaction=\gobbleoneargument
+%D \else\ifx\!!stringa\s!unknown
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \fi\fi}%
+%D \def\c!doprocessaction##1%
+%D {\def\c!dodoprocessaction####1%
+%D {\c!compareprocessaction[####1][##1]}%
+%D \processcommalist[#3]\c!dodoprocessaction}%
+%D \processcommalist[#1]\c!doprocessaction}}
+%D
+%D \def\processallactionsinset[#1]#2[#3]%
+%D {\doifelse{#1}{}
+%D {\processaction[][#3]}
+%D {\advance\processlevel by 1\relax
+%D \def\c!compareprocessaction[##1=>##2][##3]%
+%D {\edef\!!stringa{##1}%
+%D \edef\!!stringb{##3}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \let\c!dodoprocessaction=\gobbleoneargument
+%D \else\ifx\!!stringa\s!unknown
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \fi\fi}%
+%D \setvalue{\s!do\the\processlevel}##1%
+%D {\def\c!dodoprocessaction####1%
+%D {\c!compareprocessaction[####1][##1]}%
+%D \processcommalist[#3]\c!dodoprocessaction}%
+%D \processcommalist[#1]{\getvalue{\s!do\the\processlevel}}%
+%D \advance\processlevel by -1\relax}}
+%D \stoptypen
+%D
+%D The gain of speed in the final implementation is around
+%D 20\%, depending on the application.
+
+\newcount\processlevel
+
+\def\v!compareprocessactionA[#1=>#2]%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringb\s!default
+ #2%
+ \fi}
+
+\def\v!compareprocessactionB[#1=>#2]%
+ {\expandedaction\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#1}%
+ #2%
+ \let\p!doprocessaction=\gobbleoneargument
+ \else
+ \edef\!!stringb{#1}%
+ \ifx\!!stringb\s!unknown
+ \def\commalistelement{#1}%
+ #2%
+ \fi
+ \fi}
+
+\def\processaction[#1]#2[#3]%
+ {\let\donottest=\dontprocesstest
+ \expandedaction\!!stringa{#1}%
+ \let\donottest=\doprocesstest
+ \ifx\!!stringa\empty
+ \let\v!compareprocessaction=\v!compareprocessactionA
+ \else
+ \let\v!compareprocessaction=\v!compareprocessactionB
+ \fi
+ \def\p!doprocessaction##1%
+ {\v!compareprocessaction[##1]}%
+ \processcommalist[#3]\p!doprocessaction
+ \expandactions}
+
+\def\v!compareprocessactionC[#1=>#2][#3]%
+ {\expandedaction\!!stringa{#1}%
+ \expandedaction\!!stringb{#3}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#3}%
+ #2%
+ \let\p!doprocessaction=\gobbleoneargument
+ \let\p!dodoprocessaction=\gobbleoneargument
+ \else
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\s!unknown
+ \def\commalistelement{#3}%
+ #2%
+ \fi
+ \fi}
+
+\def\processfirstactioninset[#1]#2[#3]%
+ {\expandedaction\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \processaction[][#3]%
+ \else
+ \def\p!doprocessaction##1%
+ {\def\p!dodoprocessaction####1%
+ {\v!compareprocessactionC[####1][##1]}%
+ \processcommalist[#3]\p!dodoprocessaction}%
+ \processcommalist[#1]\p!doprocessaction
+ \fi
+ \expandactions}
+
+\def\v!compareprocessactionD[#1=>#2][#3]%
+ {\expandedaction\!!stringa{#1}%
+ \expandedaction\!!stringb{#3}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#3}%
+ #2%
+ \let\p!dodoprocessaction=\gobbleoneargument
+ \else
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\s!unknown
+ \def\commalistelement{#3}%
+ #2%
+ \fi
+ \fi}
+
+\def\processallactionsinset[#1]#2[#3]%
+ {\expandedaction\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \processaction[][#3]%
+ \else
+ \advance\processlevel by 1\relax
+ \setvalue{\s!do\the\processlevel}##1%
+ {\def\p!dodoprocessaction####1%
+ {\v!compareprocessactionD[####1][##1]}%
+ \processcommalist[#3]\p!dodoprocessaction}%
+ \processcommalist[#1]{\getvalue{\s!do\the\processlevel}}%
+ \advance\processlevel by -1\relax
+ \fi
+ \expandactions}
+
+%D \macros
+%D {unexpandedprocessaction,
+%D unexpandedprocessfirstactioninset,
+%D unexpandedprocessallactionsinset}
+%D {}
+%D
+%D Now what are those expansion commands doing there. Well,
+%D sometimes we want to compare actions that may consist off
+%D commands (i.e. are no constants). In such occasions we can
+%D use the a bit slower alternatives:
+
+\def\unexpandedprocessfirstactioninset{\dontexpandactions\processfirstactioninset}
+\def\unexpandedprocessaction {\dontexpandactions\processaction}
+\def\unexpandedprocessallactionsinset {\dontexpandactions\processallactionsinset}
+
+%D By default we expand actions:
+
+\def\expandactions%
+ {\let\expandedaction=\edef}
+
+\expandactions
+
+%D But when needed we convert the strings to meaningful
+%D sequences of characters.
+
+\def\unexpandedaction#1>{}
+
+\def\noexpandedaction#1#2%
+ {\def\convertedargument{#2}%
+ \@EA\edef\@EA#1\@EA{\@EA\unexpandedaction\meaning\convertedargument}}
+
+\def\dontexpandactions%
+ {\let\expandedaction=\noexpandedaction}
+
+%D \macros
+%D {getfirstcharacter,firstcharacter}
+%D {}
+%D
+%D Sometimes the action to be undertaken depends on the
+%D next character. This macro get this character and puts it in
+%D \type{\firstcharacter}.
+%D
+%D \starttypen
+%D \getfirstcharacter {string}
+%D \stoptypen
+%D
+%D A two step expansion is used to prevent problems with
+%D complicated arguments, for instance arguments that
+%D consist of two or more expandable tokens.
+
+\def\dogetfirstcharacter#1#2\\%
+ {\def\firstcharacter{#1}}
+
+\def\getfirstcharacter#1%
+ {\edef\!!stringa{#1}%
+ \expandafter\dogetfirstcharacter\!!stringa\\}
+
+%D \macros
+%D {doifinstringelse}
+%D {}
+%D
+%D We can check for the presence of a substring in a given
+%D sequence of characters.
+%D
+%D \starttypen
+%D \doifinsetelse {substring} {string} {then ...} {else ...}
+%D \stoptypen
+%D
+%D An application of this command can be found further on.
+%D Like before, we first show some alternatives, like the one
+%D we started with:
+%D
+%D \starttypen
+%D \long\def\p!doifinstringelse#1#2#3#4%
+%D {\def\c!doifinstringelse##1#1##2##3\war%
+%D {\if##2@%
+%D #4%
+%D \else
+%D #3%
+%D \fi}%
+%D \c!doifinstringelse#2#1@@\war}
+%D
+%D \def\doifinstringelse%
+%D {\ExpandBothAfter\p!doifinstringelse}
+%D \stoptypen
+%D
+%D After this we came to:
+%D
+%D \starttypen
+%D \def\p!doifinstringelse#1#2%
+%D {\def\c!doifinstringelse##1#1##2##3\war%
+%D {\if##2@}%
+%D \c!doifinstringelse#2#1@@\war}
+%D
+%D \def\doifinstringelse#1#2#3#4%
+%D {\ExpandBothAfter\p!doifinstringelse{#1}{#2}%
+%D #4%
+%D \else
+%D #3%
+%D \fi}
+%D \stoptypen
+%D
+%D And finaly it became:
+
+\def\v!ifinstringelse#1#2%
+ {\def\c!ifinstringelse##1#1##2##3\war%
+ {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
+ \c!ifinstringelse#2#1@@\war}
+
+\def\ifinstringelse#1#2%
+ {\expanded{\v!ifinstringelse{#1}{#2}}}
+
+\long\def\doifinstringelse#1#2#3#4%
+ {\ifinstringelse{#1}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+%D \macros
+%D {doifnumberelse}
+%D {}
+%D
+%D The next macro executes a command depending of the outcome
+%D of a test on numerals. This is probably one of the fastest
+%D test possible, exept from a less robust 10||step
+%D \type{\if}||ladder or some tricky \type{\lcode} checking.
+%D
+%D \starttypen
+%D \doifnumberelse {string} {then ...} {else ...}
+%D \stoptypen
+%D
+%D The macro accepts \type{123}, \type{abc}, \type{{}},
+%D \type{\getal} and \type{\the\count...}.
+
+\long\def\doifnumberelse#1#2#3%
+ {\getfirstcharacter{#1}%
+ \@EA\ifinstringelse\firstcharacter{1234567890}%
+ #2%
+ \else
+ #3%
+ \fi}
+
+%D Before we had \type{\ifinstringelse} available, we used:
+%D
+%D \starttypen
+%D \def\doifnumberelse#1%
+%D {\getfirstcharacter{#1}%
+%D \rawdoifinsetelse{\firstcharacter}{1,2,3,4,5,6,7,8,9,0}}
+%D \stoptypen
+
+%D A faster but less fail safe alternative is:
+%D
+%D \starttypen
+%D \dostepwiserecurse{0}{9}{1}
+%D {\@EA\uccode\@EA`\recurselevel=1}
+%D
+%D \long\def\doifnumberelse#1#2#3%
+%D {\getfirstcharacter{#1}%
+%D \@EA\ifnum\@EA\uccode\@EA`\firstcharacter=1
+%D #2%
+%D \else
+%D #3%
+%D \fi}
+%D \stoptypen
+%D
+%D This one only works when the \type{\firstcharacter} is
+%D indeed a character. Numbers and strings of characters go
+%D all right, but arguments like \type{\relax} let things
+%D go wrong.
+
+%D \macros
+%D {makerawcommalist,
+%D rawdoinsetelse,
+%D rawprocesscommalist,
+%D rawprocessaction}
+%D {}
+%D
+%D Some of the commands mentioned earlier are effective but
+%D slow. When one is desperately in need of faster alternatives
+%D and when the conditions are predictable safe, the \type{\raw}
+%D alternatives come into focus. A major drawback is that
+%D they do not take \type{\c!constants} into account, simply
+%D because no expansion is done. This is no problem with
+%D \type{\rawprocesscommalist}, because this macro does not
+%D compare anything. Expandable macros are permitted as search
+%D string.
+%D
+%D \starttypen
+%D \makerawcommalist[string,string,...]\stringlist
+%D \rawdoifinsetelse{string}{string,...}{...}{...}
+%D \rawprocesscommalist[string,string,...]\commando
+%D \rawprocessaction[x][a=>\a,b=>\b,c=>\c]
+%D \stoptypen
+%D
+%D Spaces embedded in the list, for instance after commas,
+%D spoil the search process. The gain in speed depends on the
+%D length of the argument (the longer the argument, the less
+%D we gain).
+
+\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\else
+ \csname\s!next\the\commalevel\endcsname{#1}%
+ \expandafter\rawprocesscommaitem
+ \fi}
+
+\def\rawprocesscommalist[#1]#2%
+ {\advance\commalevel by 1\relax
+ \expandafter\let\csname\s!next\the\commalevel\endcsname=#2%
+ \expandafter\rawprocesscommaitem#1,],\relax
+ \advance\commalevel by -1\relax}
+
+\def\rawdoifinsetelse#1#2%
+ {\doifinstringelse{,#1,}{,#2,}}
+
+\def\v!rawprocessaction[#1][#2]%
+ {\def\c!rawprocessaction##1,#1=>##2,##3\war%
+ {\if##3@\else
+ \def\v!processaction{##2}%
+ \fi}%
+ \c!rawprocessaction,#2,#1=>,@\war}
+
+\def\rawprocessaction[#1]#2[#3]%
+ {\edef\!!stringa{#1}%
+ \edef\!!stringb{undefined}%
+ \let\v!processaction=\!!stringb
+ \ifx\!!stringa\empty
+ \@EA\v!rawprocessaction\@EA[\s!default][#3]%
+ \else
+ \expandafter\v!rawprocessaction\expandafter[\!!stringa][#3]%
+ \ifx\v!processaction\!!stringb
+ \@EA\v!rawprocessaction\@EA[\s!unknown][#3]%
+ \fi
+ \fi
+ \ifx\v!processaction\!!stringb
+ \else
+ \v!processaction
+ \fi}
+
+%D When we process the list \type{a,b,c,d,e}, the raw routine
+%D takes over 30\% less time, when we feed $20+$ character
+%D strings we gain about 20\%. Alternatives which use
+%D \type{\futurelet} perform worse. Part of the speedup is
+%D due to the \type{\let} and \type{\expandafter} in the test.
+
+%D \macros
+%D {processunexpandedcommalist}
+%D {}
+%D
+%D When processing commalists, the arguments are expanded. The
+%D main reason for doing so lays in the fact that these
+%D macros are used for interfacing. The next alternative can be used
+%D for
+%D
+%D \starttypen
+%D \processunexpandedcommalist
+%D [\alfa\beta,\gamma,\delta\epsilon]
+%D \handleitem
+%D \stoptypen
+%D
+%D This time nesting is not supported.
+
+\def\processunexpandedcommaitem#1,%
+ {\if]\noexpand#1%
+ \let\nextcommaitem=\relax
+ \else
+ \handleunexpandedcommaitem{#1}%
+ \let\nextcommaitem=\processunexpandedcommaitem
+ \fi
+ \nextcommaitem}
+
+\def\processunexpandedcommalist[#1]#2%
+ {\def\handleunexpandedcommaitem{#2}%
+ \processunexpandedcommaitem#1,],\relax}
+
+%D Or faster:
+
+\def\processunexpandedcommaitem#1,%
+ {\if]\noexpand#1\else
+ \handleunexpandedcommaitem{#1}%
+ \expandafter\processunexpandedcommaitem
+ \fi}
+
+%D \macros
+%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue,
+%D dogetvalue}
+%D {}
+%D
+%D When we are going to do assignments, we have to take
+%D multi||linguality into account. For the moment we keep
+%D things simple and single||lingual.
+%D
+%D \starttypen
+%D \dosetvalue {label} {variable} {value}
+%D \dosetevalue {label} {variable} {value}
+%D \docopyvalue {to label} {from label} {variable}
+%D \doresetvalue {label} {variable}
+%D \stoptypen
+%D
+%D These macros are in fact auxiliary ones and are not meant
+%D for use outside the assignment macros.
+
+\def\dosetvalue#1#2% #3
+ {\@EA\def\csname#1#2\endcsname} % {#3}}
+
+\def\dosetevalue#1#2% #3
+ {\@EA\edef\csname#1#2\endcsname} % {#3}}
+
+\def\doresetvalue#1#2%
+ {\@EA\def\csname#1#2\endcsname{}}
+
+\def\docopyvalue#1#2#3%
+ {\@EA\def\csname#1#3\endcsname{\csname#2#3\endcsname}}
+
+%D \macros
+%D {doassign,undoassign,doassignempty}
+%D {}
+%D
+%D Assignments are the backbone of \CONTEXT. Abhorred by the
+%D concept of style file hacking, we took a considerable effort
+%D in building a parameterized system. Unfortunately there is a
+%D price to pay in terms of speed. Compared to other packages
+%D and taking the functionality of \CONTEXT\ into account, the
+%D total size of the format file is still very acceptable. Now
+%D how are these assignments done.
+%D
+%D Assignments can be realized with:
+%D
+%D \starttypen
+%D \doassign[label][variable=value]
+%D \undoassign[label][variable=value]
+%D \stoptypen
+%D
+%D and:
+%D
+%D \starttypen
+%D \doassignempty[label][variable=value]
+%D \stoptypen
+%D
+%D Assignments like \type{\doassign} are compatible with:
+%D
+%D \starttypen
+%D \def\labelvariable{value}
+%D \stoptypen
+%D
+%D We do check for the presence of an \type{=} and loudly
+%D complain of it's missed. We will redefine this macro later
+%D on, when a more advanced message mechanism is implemented.
+
+%\def\p!doassign#1[#2][#3=#4=#5]%
+% {\let\donottest=\dontprocesstest
+% \edef\!!stringa{#5}%
+% \let\!!stringb=\relax
+% \let\donottest=\doprocesstest
+% \ifx\!!stringa\!!stringb
+% \writestatus
+% {setup}
+% {missing '=' after '#3' in line \the\inputlineno}%
+% \else
+% #1{#2}{#3}{#4}%
+% \fi}
+
+\def\p!doassign#1[#2][#3=#4=#5]% redefined in mult-ini
+ {\ifx\empty#3\else % and definitely not \ifx#3\empty
+ \ifx\relax#5%
+ \writestatus
+ {setup}
+ {missing '=' after '#3' in line \the\inputlineno}%
+ \else
+ #1{#2}{#3}{#4}%
+ \fi
+ \fi}
+
+\def\doassign[#1][#2]%
+ {\p!doassign\dosetvalue[#1][#2==\relax]}
+
+\def\doeassign[#1][#2]%
+ {\p!doassign\dosetevalue[#1][#2==\relax]}
+
+\def\undoassign[#1][#2]%
+ {\p!doassign\doresetvalue[#1][#2==\relax]}
+
+\def\doassignempty[#1][#2=#3]%
+ {\doifundefined{#1#2}
+ {\dosetvalue{#1}{#2}{#3}}}
+
+%D \macros
+%D {getparameters,geteparameters,forgetparameters}
+%D {}
+%D
+%D Using the assignment commands directly is not our
+%D ideal of user friendly interfacing, so we take some further
+%D steps.
+%D
+%D \starttypen
+%D \getparameters [label] [...=...,...=...]
+%D \forgetparameters [label] [...=...,...=...]
+%D \stoptypen
+%D
+%D Again, the label identifies the category a variable
+%D belongs to. The second argument can be a comma separated
+%D list of assignments.
+%D
+%D \starttypen
+%D \getparameters
+%D [demo]
+%D [alfa=1,
+%D beta=2]
+%D \stoptypen
+%D
+%D is equivalent to
+%D
+%D \starttypen
+%D \def\demoalfa{1}
+%D \def\demobeta{2}
+%D \stoptypen
+%D
+%D
+%D In the pre||multi||lingual stadium \CONTEXT\ took the next
+%D approach. With
+%D
+%D \starttypen
+%D \def\??demo {@@demo}
+%D \def\!!alfa {alfa}
+%D \def\!!beta {beta}
+%D \stoptypen
+%D
+%D calling
+%D
+%D \starttypen
+%D \getparameters
+%D [\??demo]
+%D [\!!alfa=1,
+%D \!!beta=2]
+%D \stoptypen
+%D
+%D lead to:
+%D
+%D \starttypen
+%D \def\@@demoalfa{1}
+%D \def\@@demobeta{2}
+%D \stoptypen
+%D
+%D Because we want to be able to distinguish the \type{!!}
+%D pre||tagged user supplied variables from internal
+%D counterparts, we will introduce a slightly different tag in
+%D the multi||lingual modules. There we will use \type{c!} or
+%D \type{v!}, depending on the context.
+%D
+%D By calling \type{\p!doassign} directly, we save ourselves
+%D some argument passing and gain some speed. Whatever
+%D optimizations we do, this command will always be one of the
+%D bigger bottlenecks.
+%D
+%D The alternative \type{\geteparameters} --- it's funny to
+%D see that this alternative saw the light so lately --- can be
+%D used to do expanded assigments.
+
+\def\dogetparameters#1[#2]#3[#4]%
+ {\def\p!dogetparameter##1%
+ {\p!doassign#1[#2][##1==\relax]}%
+ \processcommalist[#4]\p!dogetparameter}
+
+\def\getparameters%
+ {\dogetparameters\dosetvalue}
+
+\def\geteparameters%
+ {\dogetparameters\dosetevalue}
+
+\def\forgetparameters%
+ {\dogetparameters\doresetvalue}
+
+\let\getexpandedparameters=\geteparameters
+
+%D \macros
+%D {getemptyparameters}
+%D {}
+%D
+%D Sometimes we explicitly want variables to default to an
+%D empty string, so we welcome:
+%D
+%D \starttypen
+%D \getemptyparameters [label] [...=...,...=...]
+%D \stoptypen
+
+\def\getemptyparameters[#1]#2[#3]%
+ {\def\p!dogetemptyparameter##1%
+ {\doassignempty[#1][##1]}%
+ \processcommalist[#3]\p!dogetemptyparameter}
+
+%D \macros
+%D {copyparameters}
+%D {}
+%D
+%D Some \CONTEXT\ commands take their default setups from
+%D others. All commands that are able to provide backgounds
+%D or rules around some content, for instance default to the
+%D standard command for ruled boxes. Is situations like this
+%D we can use:
+%D
+%D \starttypen
+%D \copyparameters [to-label] [from-label] [name1,name2,...]
+%D \stoptypen
+%D
+%D For instance
+%D
+%D \starttypen
+%D \copyparameters
+%D [internal][external]
+%D [alfa,beta]
+%D \stoptypen
+%D
+%D Leads to:
+%D
+%D \starttypen
+%D \def\internalalfa {\externalalfa}
+%D \def\internalbeta {\externalbeta}
+%D \stoptypen
+%D
+%D By using \type{\docopyvalue} we've prepared this command
+%D for use in a multi||lingual environment.
+
+\def\copyparameters[#1]#2[#3]#4[#5]%
+ {\doifnot{#1}{#3}
+ {\def\docopyparameter##1%
+ {\docopyvalue{#1}{#3}{##1}}%
+ \processcommalist[#5]\docopyparameter}}
+
+%D \macros
+%D {doifassignmentelse}
+%D {}
+%D
+%D A lot of \CONTEXT\ commands take optional arguments, for
+%D instance:
+%D
+%D \starttypen
+%D \dothisorthat[alfa,beta]
+%D \dothisorthat[first=foo,second=bar]
+%D \dothisorthat[alfa,beta][first=foo,second=bar]
+%D \stoptypen
+%D
+%D Although a combined solution is possible, we prefer a
+%D seperation. The next command takes care of propper
+%D handling of such multi||faced commands.
+%D
+%D \starttypen
+%D \doifassignmentelse {...} {then ...} {else ...}
+%D \stoptypen
+
+\def\doifassignmentelse%
+ {\doifinstringelse{=}}
+
+%D \macros
+%D {ifparameters,checkparameters}
+%D {}
+%D
+%D A slightly different one is \type{\checkparameters}, which
+%D also checks on the presence of a~\type{=}.
+%D
+%D The boolean \type{\ifparameters} can be used afterwards.
+%D Combining both in one \type{\if}||macro would lead to
+%D problems with nested \type{\if}'s.
+%D
+%D \starttypen
+%D \checkparameters[argument]
+%D \stoptypen
+
+\newif\ifparameters
+
+\def\c!checkparameters#1=#2#3\war%
+ {\if#2@\parametersfalse\else\parameterstrue\fi}
+
+\def\checkparameters[#1]%
+ {\c!checkparameters#1=@@\war}
+
+%D \macros
+%D {getfromcommalist,getfromcommacommand,
+%D commalistelement,
+%D getcommalistsize,getcommacommandsize}
+%D {}
+%D
+%D It's possible to get an element from a commalist or a
+%D command representing a commalist.
+%D
+%D \starttypen
+%D \getfromcommalist [string] [n]
+%D \getfromcommacommand [string,\strings,string,...] [n]
+%D \stoptypen
+%D
+%D The difference betwee the two of them is the same as the
+%D difference between \type{\processcomma...}. The found string
+%D is stored in \type{\commalistelement}.
+%D
+%D We can calculate the size of a comma separated list by
+%D using:
+%D
+%D \starttypen
+%D \getcommalistsize [string,string,...]
+%D \getcommacommandsize [string,\strings,string,...]
+%D \stoptypen
+%D
+%D Afterwards, the length is available in the macro
+%D \type{\commalistsize} (not a \COUNTER).
+
+\def\commalistsize{0}
+
+\def\p!dogetcommalistsize#1[#2]%
+ {\scratchcounter=0\relax
+ \def\p!dodogetcommalistsize##1%
+ {\advance\scratchcounter by 1\relax}%
+ #1[#2]\p!dodogetcommalistsize % was [{#2}]
+ \edef\commalistsize{\the\scratchcounter}}
+
+\def\getcommalistsize%
+ {\p!dogetcommalistsize\processcommalist}
+
+\def\getcommacommandsize%
+ {\p!dogetcommalistsize\processcommacommand}
+
+\def\p!dodogetfromcommalist#1%
+ {\advance\scratchcounter by -1\relax
+ \ifnum\scratchcounter=0\relax
+ \gdef\globalcommalistelement{#1}%
+ \def\doprocesscommaitem##1]{}%
+ \fi}
+
+\def\p!dogetfromcommalist#1[#2]#3[#4]%
+ {\global\let\globalcommalistelement=\empty
+ \bgroup
+ \scratchcounter=#4\relax
+ #1[#2]\p!dodogetfromcommalist
+ \egroup
+ \let\commalistelement=\globalcommalistelement}
+
+\def\getfromcommalist%
+ {\p!dogetfromcommalist\processcommalist}
+
+\def\getfromcommacommand%
+ {\p!dogetfromcommalist\processcommacommand}
+
+%D Watertight (and efficient) solutions are hard to find, due
+%D to the handling of braces during parameters passing and
+%D scanning. Nevertheless:
+%D
+%D \startbuffer
+%D \def\dosomething#1{(#1=\commalistsize) }
+%D
+%D \getcommalistsize [\hbox{$a,b,c,d,e,f$}] \dosomething 1
+%D \getcommalistsize [{a,b,c,d,e,f}] \dosomething 1
+%D \getcommalistsize [{a,b,c},d,e,f] \dosomething 4
+%D \getcommalistsize [a,b,{c,d,e},f] \dosomething 4
+%D \getcommalistsize [a{b,c},d,e,f] \dosomething 4
+%D \getcommalistsize [{a,b}c,d,e,f] \dosomething 4
+%D \getcommalistsize [] \dosomething 0
+%D \getcommalistsize [{[}] \dosomething 1
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D reports:
+%D
+%D \haalbuffer
+
+%D \macros
+%D {dosingleargument,dodoubleargument,dotripleargument,
+%D doquadrupleargument,doquintupleargument,dosixtupleargument}
+%D {}
+%D
+%D When working with delimited arguments, spaces and
+%D lineendings can interfere. The next set of macros uses
+%D \TEX' internal scanner for grabbing everything between
+%D arguments.
+%D
+%D \starttypen
+%D \dosingleargument\commando = \commando[#1]
+%D \dodoubleargument\commando = \commando[#1][#2]
+%D \dotripleargument\commando = \commando[#1][#2][#3]
+%D \doquadrupleargument\commando = \commando[#1][#2][#3][#4]
+%D \doquintupleargument\commando = \commando[#1][#2][#3][#4][#5]
+%D \dosixtupleargument\commando = \commando[#1][#2][#3][#4][#5][#6]
+%D \stoptypen
+%D
+%D These macros are used in the following way:
+%D
+%D \starttypen
+%D \def\dosetupsomething[#1][#2]%
+%D {... #1 ... #2 ...}
+%D
+%D \def\setupsomething%
+%D {\dodoubleargument\dosetupsomething}
+%D \stoptypen
+%D
+%D The implementation can be surprisingly simple and needs no
+%D further explanation, like:
+%D
+%D \starttypen
+%D \def\dosingleargument#1[#2]%
+%D {#1[#2]}
+%D \def\dotripleargument#1[#2]#3[#4]#5[#6]%
+%D {#1[#2][#4][#6]}
+%D \def\doquintupleargument#1%
+%D {\def\dodoquintupleargument[##1]##2[##3]##4[##5]##6[##7]##8[##9]%
+%D {#1[##1][##3][##5][##7][##9]}%
+%D \dodoquintupleargument}
+%D \stoptypen
+%D
+%D Because \TEX\ accepts 9~arguments at most, we have to use
+%D two||step solution when getting five or more arguments.
+%D
+%D When developing more and more of the real \CONTEXT, we
+%D started using some alternatives that provided empty
+%D arguments (in fact optional ones) whenever the user failed
+%D to supply them. Because this more complicated macros enable
+%D us to do some checking, we reimplemented the non||empty
+%D ones.
+
+\def\dosingleargument%
+ {\chardef\expectedarguments=1
+ \dosingleempty}
+
+\def\dodoubleargument%
+ {\chardef\expectedarguments=2
+ \dodoubleempty}
+
+\def\dotripleargument%
+ {\chardef\expectedarguments=3
+ \dotripleempty}
+
+\def\doquadrupleargument%
+ {\chardef\expectedarguments=4
+ \doquadrupleempty}
+
+\def\doquintupleargument%
+ {\chardef\expectedarguments=5
+ \doquintupleempty}
+
+\def\doquintupleargument%
+ {\chardef\expectedarguments=6
+ \dosixtupleempty}
+
+%D \macros
+%D {iffirstagument,ifsecondargument,ifthirdargument,
+%D iffourthargument,iffifthargument,ifsixthargument}
+%D {}
+%D
+%D We use some signals for telling the calling macros if all
+%D wanted arguments are indeed supplied by the user.
+
+\newif\iffirstargument
+\newif\ifsecondargument
+\newif\ifthirdargument
+\newif\iffourthargument
+\newif\iffifthargument
+\newif\ifsixthargument
+
+%D \macros
+%D {dosingleempty,dodoubleempty,dotripleempty,
+%D doquadrupleempty,doquintupleempty}
+%D {}
+%D
+%D The empty argument supplying macros mentioned before, look
+%D like:
+%D
+%D \starttypen
+%D \dosingleempty \command
+%D \dodoubleempty \command
+%D \dotripleempty \command
+%D \doquadrupleempty \command
+%D \doquintupleempty \command
+%D \dosixtupleempty \command
+%D \stoptypen
+%D
+%D So \type{\dodoubleempty} leades to:
+%D
+%D \starttypen
+%D \command[#1][#2]
+%D \command[#1][]
+%D \command[][]
+%D \stoptypen
+%D
+%D Depending of the generousity of the user. Afterwards one can
+%D use the \type{\if...argument} boolean. For novice: watch
+%D the stepwise doubling of \type{#}'s
+
+\chardef\noexpectedarguments=0
+\chardef\expectedarguments =0
+
+\def\dogetargument#1#2#3#4% redefined in mult-ini
+ {\doifnextcharelse{#1}
+ {\let\expectedarguments=\noexpectedarguments
+ #3\dodogetargument}
+ {\ifnum\expectedarguments>\noexpectedarguments
+ \writestatus
+ {setup}
+ {\expectedarguments\space argument(s) expected
+ in line \the\inputlineno\space}%
+ \fi
+ \let\expectedarguments=\noexpectedarguments
+ #4\dodogetargument#1#2}}
+
+\def\getsingleempty#1#2#3%
+ {\def\dodogetargument%
+ {#3}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\getdoubleempty#1#2#3%
+ {\def\dodogetargument#1##1#2%
+ {\def\dodogetargument%
+ {#3#1##1#2}%
+ \dogetargument#1#2\secondargumenttrue\secondargumentfalse}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\gettripleempty#1#2#3%
+ {\def\dodogetargument#1##1#2%
+ {\def\dodogetargument#1####1#2%
+ {\def\dodogetargument%
+ {#3#1##1#2#1####1#2}%
+ \dogetargument#1#2\thirdargumenttrue\thirdargumentfalse}%
+ \dogetargument#1#2\secondargumenttrue\secondargumentfalse}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\getquadrupleempty#1#2#3%
+ {\def\dodogetargument#1##1#2%
+ {\def\dodogetargument#1####1#2%
+ {\def\dodogetargument#1########1#2%
+ {\def\dodogetargument%
+ {#3#1##1#2#1####1#2#1########1#2}%
+ \dogetargument#1#2\fourthargumenttrue\fourthargumentfalse}%
+ \dogetargument#1#2\thirdargumenttrue\thirdargumentfalse}%
+ \dogetargument#1#2\secondargumenttrue\secondargumentfalse}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\getquintupleempty#1#2#3%
+ {\def\dodogetargument#1##1#2%
+ {\def\dodogetargument#1####1#2%
+ {\def\dodogetargument#1########1#2%
+ {\def\dodogetargument#1################1#2%
+ {\def\dodogetargument%
+ {#3#1##1#2#1####1#2#1########1#2#1################1#2}%
+ \dogetargument#1#2\fifthargumenttrue\fifthargumentfalse}%
+ \dogetargument#1#2\fourthargumenttrue\fourthargumentfalse}%
+ \dogetargument#1#2\thirdargumenttrue\thirdargumentfalse}%
+ \dogetargument#1#2\secondargumenttrue\secondargumentfalse}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\getsixtupleempty#1#2#3%
+ {\def\dodogetargument#1##1#2%
+ {\def\dodogetargument#1####1#2%
+ {\def\dodogetargument#1########1#2%
+ {\def\dodogetargument#1################1#2%
+ {\def\dodogetargument#1################################1#2%
+ {\def\dodogetargument%
+ {#3#1##1#2#1####1#2#1########1#2#1################1%
+ #2#1################################1#2}%
+ \dogetargument#1#2\sixthargumenttrue\sixthargumentfalse}%
+ \dogetargument#1#2\fifthargumenttrue\fifthargumentfalse}%
+ \dogetargument#1#2\fourthargumenttrue\fourthargumentfalse}%
+ \dogetargument#1#2\thirdargumenttrue\thirdargumentfalse}%
+ \dogetargument#1#2\secondargumenttrue\secondargumentfalse}%
+ \dogetargument#1#2\firstargumenttrue\firstargumentfalse}
+
+\def\dosingleempty {\getsingleempty []}
+\def\dodoubleempty {\getdoubleempty []}
+\def\dotripleempty {\gettripleempty []}
+\def\doquadrupleempty {\getquadrupleempty []}
+\def\doquintupleempty {\getquintupleempty []}
+\def\dosixtupleempty {\getsixtupleempty []}
+
+%D \macros
+%D {dosingleargumentwithset,
+%D dodoubleargumentwithset,dodoubleemptywithset,
+%D dotripleargumentwithset,dotripleemptywithset}
+%D {}
+%D
+%D These maybe too mysterious macros enable us to handle more
+%D than one setup at once.
+%D
+%D \starttypen
+%D \dosingleargumentwithset \command[#1]
+%D \dodoubleargumentwithset \command[#1][#2]
+%D \dotripleargumentwithset \command[#1][#2][#3]
+%D \dodoubleemptywithset \command[#1][#2]
+%D \dotripleemptywithset \command[#1][#2][#3]
+%D \stoptypen
+%D
+%D The first macro calls \type{\command[##1]} for each string
+%D in the set~\type{#1}. The second one calls for
+%D \type{\commando[##1][#2]} and the third, well one may guess.
+%D These commands support constructions like:
+%D
+%D \starttypen
+%D \def\dodefinesomething[#1][#2]%
+%D {\getparameters[\??xx#1][#2]}
+%D
+%D \def\definesomething%
+%D {\dodoubleargumentwithset\dodefinesomething}
+%D \stoptypen
+%D
+%D Which accepts calls like:
+%D
+%D \starttypen
+%D \definesomething[alfa,beta,...][variable=...,...]
+%D \stoptypen
+%D
+%D Now a whole bunch of variables like \type{\@@xxalfavariable}
+%D and \type{\@@xxbetavariable} is defined.
+
+\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}
+
+%D \macros
+%D {complexorsimple,complexorsimpleempty}
+%D {}
+%D
+%D Setups can be optional. A command expecting a setup is
+%D prefixed by \type{\complex}, a command without one gets the
+%D prefix \type{\simple}. Commands like this can be defined by:
+%D
+%D \starttypen
+%D \complexorsimple {command}
+%D \stoptypen
+%D
+%D When \type{\command} is followed by a \type{[setup]}, then
+%D
+%D \starttypen
+%D \complexcommand [setup]
+%D \stoptypen
+%D
+%D executes, else we get
+%D
+%D \starttypen
+%D \simplecommand
+%D \stoptypen
+%D
+%D An alternative for \type{\complexorsimple} is:
+%D
+%D \starttypen
+%D \complexorsimpleempty {command}
+%D \stoptypen
+%D
+%D Depending on the presence of \type{[setup]}, this one
+%D leads to one of:
+%D
+%D \starttypen
+%D \complexcommando [setup]
+%D \complexcommando []
+%D \stoptypen
+%D
+%D Many \CONTEXT\ commands started as complex or simple ones,
+%D but changed into more versatile (more object oriented) ones
+%D using the \type{\get..argument} commands.
+
+\def\complexorsimple#1%
+ {\doifnextcharelse{[}
+ {\firstargumenttrue\getvalue{\s!complex#1}}
+ {\firstargumentfalse\getvalue{\s!simple#1}}}
+
+\def\complexorsimpleempty#1%
+ {\doifnextcharelse{[}
+ {\firstargumenttrue\getvalue{\s!complex#1}}
+ {\firstargumentfalse\getvalue{\s!complex#1}[]}}
+
+%D \macros
+%D {definecomplexorsimple,definecomplexorsimpleempty}
+%D {}
+%D
+%D The previous commands are used that often that we found it
+%D worthwile to offer two more alternatives.
+
+\def\setnameofcommand#1%
+ {\bgroup
+ \escapechar=-1\relax
+ \xdef\nameofcommand{\string#1}%
+ \egroup}
+
+\def\definewithnameofcommand#1#2% watch the \donottest
+ {\setnameofcommand{#2}%
+ \@EA\def\@EA#2\@EA{\@EA\donottest\@EA#1\@EA{\nameofcommand}}}
+
+\def\definecomplexorsimple%
+ {\definewithnameofcommand\complexorsimple}
+
+\def\definecomplexorsimpleempty%
+ {\definewithnameofcommand\complexorsimpleempty}
+
+%D These commands are called as:
+%D
+%D \starttypen
+%D \definecomplexorsimple\command
+%D \stoptypen
+%D
+%D Of course, we must have available
+%D
+%D \starttypen
+%D \def\complexcommand[#1]{...}
+%D \def\simplecommand {...}
+%D \stoptypen
+%D
+%D Using this construction saves a few string now and then.
+
+%D \macros
+%D {definestartstopcommand}
+%D {}
+%D
+%D Those who get the creeps of expansion may skip the next
+%D one. It's one of the most recent additions and concerns
+%D \type{\start}||\type{\stop} pairs with complicated
+%D arguments.
+%D
+%D We won't go into details here, but the general form of
+%D this using this command is:
+%D
+%D \starttypen
+%D \definestartstopcommand\somecommand\v!specifier{arg}{arg}%
+%D {do something with arg}
+%D \stoptypen
+%D
+%D This expands to something like:
+%D
+%D \starttypen
+%D \def\somecommand arg \startspecifier arg \stopspecifier%
+%D {do something with arg}
+%D \stoptypen
+%D
+%D The argumentss can be anything reasonable, but double
+%D \type{#}'s are needed in the specification part, like:
+%D
+%D \starttypen
+%D \definestartstopcommand\somecommand\v!specifier{[##1][##2]}{##3}%
+%D {do #1 something #2 with #3 arg}
+%D \stoptypen
+%D
+%D which becomes:
+%D
+%D \starttypen
+%D \def\somecommand[#1][#2]\startspecifier#3\stopspecifier%
+%D {do #1 something #2 with #3 arg}
+%D \stoptypen
+%D
+%D We will see some real applications of this command in the
+%D core modules.
+
+\def\definestartstopcommand#1#2#3#4%
+ {\def\!stringa{#3}%
+ \def\!stringb{\e!start#2}%
+ \def\!stringc{#4}%
+ \def\!stringd{\e!stop#2}%
+ \@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA
+ \def\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA\@EA
+ #1\@EA\@EA\@EA\@EA\@EA\@EA\@EA
+ \!stringa\@EA\@EA\@EA
+ \csname\@EA\@EA\@EA\!stringb\@EA\@EA\@EA\endcsname\@EA
+ \!stringc
+ \csname\!stringd\endcsname}
+
+%D \macros
+%D {dosinglegroupempty,dodoublegroupempty,dotriplegroupempty,
+%D doquadruplegroupempty}
+%D {}
+%D
+%D We've already seen some commands that take care of
+%D optional arguments between \type{[]}. The next two commands
+%D handle the ones with \type{{}}. They are called as:
+%D
+%D \starttypen
+%D \dosinglegroupempty \IneedONEargument
+%D \dodoublegroupempty \IneedTWOarguments
+%D \dotriplegroupempty \IneedTHREEarguments
+%D \dotriplegroupempty \IneedFOURarguments
+%D \stoptypen
+%D
+%D where \type{\IneedONEargument} takes one and the others
+%D two and three arguments. These macro's were first needed in
+%D \PPCHTEX.
+
+\def\dogetgroupargument#1#2% redefined in mult-ini
+ {\def\nextnextargument%
+ {\ifx\nextargument\bgroup
+ \let\expectedarguments=\noexpectedarguments
+ \def\nextargument{#1\dodogetargument}%
+ %\else\ifx\nextargument\lineending % this can be an option
+ % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}%
+ %\else\ifx\nextargument\blankspace % but it may never be default
+ % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}%
+ \else
+ \ifnum\expectedarguments>\noexpectedarguments
+ \writestatus
+ {setup}
+ {\the\expectedarguments\space argument(s) expected
+ in line \the\inputlineno\space}%
+ \fi
+ \let\expectedarguments=\noexpectedarguments
+ \def\nextargument{#2\dodogetargument{}}%
+ \fi%\fi\fi % so let's get rid of it
+ \nextargument}%
+ \futurelet\nextargument\nextnextargument}
+
+\def\dosinglegroupempty#1%
+ {\def\dodogetargument%
+ {#1}%
+ \dogetgroupargument\firstargumenttrue\firstargumentfalse}
+
+\def\dodoublegroupempty#1%
+ {\def\dodogetargument##1%
+ {\def\dodogetargument%
+ {#1{##1}}%
+ \dogetgroupargument\secondargumenttrue\secondargumentfalse}%
+ \dogetgroupargument\firstargumenttrue\firstargumentfalse}
+
+\def\dotriplegroupempty#1%
+ {\def\dodogetargument##1%
+ {\def\dodogetargument####1%
+ {\def\dodogetargument%
+ {#1{##1}{####1}}%
+ \dogetgroupargument\thirdargumenttrue\thirdargumentfalse}%
+ \dogetgroupargument\secondargumenttrue\secondargumentfalse}%
+ \dogetgroupargument\firstargumenttrue\firstargumentfalse}
+
+\def\doquadruplegroupempty#1%
+ {\def\dodogetargument##1%
+ {\def\dodogetargument####1%
+ {\def\dodogetargument########1%
+ {\def\dodogetargument%
+ {#1{##1}{####1}{########1}}%
+ \dogetgroupargument\fourthargumenttrue\fourthargumentfalse}%
+ \dogetgroupargument\thirdargumenttrue\thirdargumentfalse}%
+ \dogetgroupargument\secondargumenttrue\secondargumentfalse}%
+ \dogetgroupargument\firstargumenttrue\firstargumentfalse}
+
+
+%D These macros explictly take care of spaces, which means
+%D that the next definition and calls are valid:
+%D
+%D \starttypen
+%D \def\test#1#2#3{[#1#2#3]}
+%D
+%D \dotriplegroupempty\test {a}{b}{c}
+%D \dotriplegroupempty\test {a}{b}
+%D \dotriplegroupempty\test {a}
+%D \dotriplegroupempty\test
+%D \dotriplegroupempty\test {a} {b} {c}
+%D \dotriplegroupempty\test {a} {b}
+%D \dotriplegroupempty\test
+%D {a}
+%D {b}
+%D \stoptypen
+%D
+%D And alike.
+
+%D \macros
+%D {wait}
+%D {}
+%D
+%D The next macro hardly needs explanation. Because no
+%D nesting is to be expected, we can reuse \type{\wait} within
+%D \type{\wait} itself.
+
+\def\wait%
+ {\bgroup
+ \read16 to \wait
+ \egroup}
+
+%D \macros
+%D {writestring,writeline,
+%D writestatus,statuswidth}
+%D {}
+%D
+%D Maybe one didn't notice, but we've already introduced a
+%D macro for showing messages. In the multi||lingual modules,
+%D we will also introduce a mechanism for message passing. For
+%D the moment we stick to the core macros:
+%D
+%D \starttypen
+%D \writestring {string}
+%D \writeline
+%D \writestatus {category} {message}
+%D \stoptypen
+%D
+%D Messages are formatted. One can provide the maximum with
+%D of the identification string with the macro
+%D \type{\statuswidth}.
+
+\def\statuswidth {15}
+
+\def\writestring%
+ {\immediate\write16}
+
+\def\writeline%
+ {\writestring{}}
+
+\def\dosplitstatus#1#2\end%
+ {\ifx#1?%
+ \loop
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\statuswidth\relax
+ \edef\messagecontentA{\messagecontentA\space}%
+ \repeat
+ \else
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\statuswidth\relax
+ \edef\messagecontentA{\messagecontentA#1}%
+ \fi
+ \dosplitstatus#2\end
+ \fi}
+
+\def\writestatus#1#2%
+ {\bgroup
+ \edef\messagecontentA{}%
+ \edef\messagecontentB{#2}% maybe it's \the\scratchcounter
+ \scratchcounter=0
+ \expandafter\dosplitstatus#1?\end
+ \writestring{\messagecontentA\space:\space\messagecontentB}%
+ \egroup}
+
+%D \macros
+%D {debuggerinfo}
+%D {}
+%D
+%D For debugging purposes we can enhance macros with the
+%D next alternative. Here \type{debuggerinfo} stands for both
+%D a macro accepting two arguments and a boolean (in fact a
+%D few macro's too).
+
+\newif\ifdebuggerinfo
+
+\def\debuggerinfo#1#2%
+ {\ifdebuggerinfo
+ \writestatus{debugger}{#1:: #2}%
+ \fi}
+
+%D Finally we do what from now on will be done at the top of
+%D the files: we tell the user what we are loading.
+
+\writestatus{loading}{Context System Macros / General}
+
+%D Well, the real final command is the one that resets the
+%D unprotected characters \type{@}, \type{?} and \type{!}.
+
+\protect
+
+\endinput
+
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex new file mode 100644 index 000000000..e9e8bb373 --- /dev/null +++ b/tex/context/base/syst-new.tex @@ -0,0 +1,95 @@ +%D \module
+%D [ file=supp-new,
+%D version=1997.01.03,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=New Ones,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+\unprotect
+
+\def\DoMod #1by#2to#3%
+ {\scratchcounter=#1\relax
+ \divide\scratchcounter by #2\relax
+ \multiply\scratchcounter by #2\relax
+ #3=#1\relax
+ \advance#3 by -\scratchcounter}
+
+\def\DoDiv #1by#2to#3%
+ {#3=#1\relax
+ \divide#3 by #2\relax}
+
+\def\dounprotected#1\par%
+ {#1\protect}
+
+\def\unprotected%
+ {\unprotect\dounprotected}
+
+%D \pagina
+%D \starttypen
+%D \def\obeyhyphens% % after fontswitch
+%D {\def\obeyedspace%
+%D {\hyphenchar\font=45
+%D \spaceskip.5em\!!plus.25em\!!minus.25em\relax%
+%D \def\obeyedspace{ }}}
+%D \stoptypen
+
+%D Standaard kan een spatie (zoals ~) uitrekken. Dit is in
+%D overzichten niet altijd de bedoeling, vandaar:
+
+\def\fixedspace%
+ {\hskip\fontdimen2\font\relax}
+
+%\def\ExpandSecondAfter#1#2#3%
+% {\!!toksa={#2}%
+% \edef\!!stringa{#3}%
+% \edef\expanded%
+% {\noexpand#1{\the\!!toksa}{\!!stringa}}%
+% \expanded}
+%
+%\def\ExpandThirdAfter#1#2#3#4%
+% {\!!toksa={#2}%
+% \!!toksb={#3}%
+% \edef\!!stringa{#4}%
+% \edef\expanded%
+% {\noexpand#1{\the\!!toksa}{\the\!!toksb}{\!!stringa}}%
+% \expanded}
+
+%\def\indirect#1#2#3%
+% {\@EA#1\@EA#2\@EA{\@EA#3\csname\s!do\string#2\endcsname}%
+% \@EA#1\csname\s!do\string#2\endcsname}
+%
+%\def\doubleemptied#1#2#3%
+% {\indirect#1#2\dodoublempty}
+%
+%\indirect\def\stelietsin\dodoubleempty[#1][#2]%
+% {...}
+%
+%\doubleemptied\def\stelietsin[#1][#2]%
+% {...}
+
+% in mult-set
+%
+%\def\defaultsetup{def}
+%
+%\def\selectdefaultsetup#1#2%
+% {\writestatus{setup}{choose #1 setupfile}%
+% \bgroup
+% \endlinechar=-1
+% \global\read16 to \usersetup
+% \egroup
+% \ifx\usersetup\empty
+% \let\usersetup=\defaultsetup
+% \fi
+% \readfile{#2\usersetup}{}{}%
+% \writestatus{setup}{loading #1 setupfile #2\usersetup}}
+
+\protect
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex new file mode 100644 index 000000000..0d85e2050 --- /dev/null +++ b/tex/context/base/syst-tex.tex @@ -0,0 +1,149 @@ +%D \module
+%D [ file=syst-tex,
+%D version=1995.10.10,
+%D title=\CONTEXT\ System Macros,
+%D subtitle=Efficient \PLAIN\ \TEX\ loading,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. Non||commercial use is
+%C granted.
+
+%D We've build \CONTEXT\ on top of \PLAIN\ \TEX. Because we
+%D want to make the format file as independant as possible of
+%D machine dependant font encodings, we have to bypass the
+%D loading of fonts.
+%D
+%D Let's start at the beginning. Because \PLAIN\ is not yet
+%D loaded we have to define some \CATCODES\ ourselves.
+
+\catcode`\{=1 % left brace is begin-group character
+\catcode`\}=2 % right brace is end-group character
+\catcode`\#=6 % hash mark is macro parameter character
+
+%D We are going to report to the user what we are skipping.
+
+\def\skipmessage#1{\immediate\write16{skipping #1 in plain}}
+
+%D We want to be able to use the \type{\newsomething}
+%D declarations not only on the \type{\outer} level. This can
+%D be done by redefining \type{\outer} so we have to save its
+%D original meaning.
+
+\let\normalouter = \outer
+\let\outer = \relax
+
+%D We also want to postpone the loading of hyphenation patters,
+%D so we redefine and therefore save \type{\input}.
+
+\let\normalinput = \input
+\def\input #1 {\skipmessage{\string\input}}
+
+%D Finaly are going to we redefine some font specification
+%D commands and that's why we save them too. The redefinitions
+%D are straightforward because the macros have to do nothing
+%D but skipping.
+
+\let\normalskewchar = \skewchar
+\def\skewchar #1=#2 {\skipmessage{\string\skewchar}}
+
+\let\normaltextfont = \textfont
+\let\normalscriptfont = \scriptfont
+\let\normalscriptscriptfont = \scriptscriptfont
+
+\def\textfont #1=#2{\skipmessage{\string\textfont}}
+\def\scriptfont #1=#2{\skipmessage{\string\scriptfont}}
+\def\scriptscriptfont #1=#2{\skipmessage{\string\scriptscriptfont}}
+
+%D The redefinition of \type{\font} is a bit more complicated,
+%D because in version 3.14159 a scaled specification was
+%D introduced.
+
+\let\normalfont = \font
+
+\def\skipscaled scaled #1 {}
+
+\long\def\font#1=#2 #3%
+ {\ifx#3s%
+ \skipmessage{scaled \string\font}%
+ \let\next=\skipscaled
+ \else
+ \skipmessage{\string\font}%
+ \let\next=\relax
+ \fi
+ \next#3}
+
+%D Relaxing some font switching macros is needed because we
+%D don't want any error messages during loading. These
+%D unharmfull messages could be ingored.
+%D
+%D The next substitution is needed for determining
+%D \type{\p@renwd} in the macro \type{\bordermatrix}.
+
+\def\tenex#1%
+ {\skipmessage{used \string\tenex}\hskip8.75002pt}
+
+%D We need to define \type{\tenrm} for switching to
+%D \type{\rm}.
+
+\def\tenrm%
+ {\skipmessage{\string\tenrm}}
+
+%D In \CONTEXT\ all \PLAIN\ \TEX\ fonts are available, just
+%D like \type{\p@renwd}. We only postpone loading them until
+%D they are actually needed.
+
+%D By bypassing fonts, some definitions become less valid so
+%D we have to redefine them afterwards.
+%D
+%D \starttypen
+%D \let\normalbordermatrix=\bordermatrix
+%D
+%D \def\bordermatrix%
+%D {\bgroup
+%D \setbox0=\hbox{\getvalue{\textface\c!mm\c!ex}B}%
+%D \global\p@renwd=\wd0\relax
+%D \egroup
+%D \normalbordermatrix}
+%D \stoptypen
+
+%D Now we are ready for loading \PLAIN\ \TEX. Of couse we use
+%D \type{\normalinput} and not \type{\input}.
+
+\normalinput plain.tex
+
+%D We restore some redefined primitives to their old meaning.
+
+\let\font = \normalfont
+\let\skewchar = \normalskewchar
+\let\textfont = \normaltextfont
+\let\scriptfont = \normalscriptfont
+\let\scriptscriptfont = \normalscriptscriptfont
+\let\input = \normalinput
+\let\outer = \normalouter
+
+%D We reset some of the used auxiliary macro's to
+%D \type{\undefined}. One never knows what testing on them is
+%D done elsewhere.
+
+\let\skipmessage = \undefined
+\let\skipscaled = \undefined
+\let\normalfont = \undefined
+\let\normalskewchar = \undefined
+\let\normaltextfont = \undefined
+\let\normalscriptfont = \undefined
+\let\normalscriptscriptfont = \undefined
+\let\normalinput = \undefined
+\let\normalouter = \undefined
+
+%D We want a bit more statistics and some less logging info
+%D in the \type{log} file.
+
+\def\wlog#1{}
+
+\tracingstats=1
+
+\endinput
+
\ No newline at end of file diff --git a/tex/context/base/table.tex b/tex/context/base/table.tex new file mode 100644 index 000000000..764ffaa42 --- /dev/null +++ b/tex/context/base/table.tex @@ -0,0 +1,1960 @@ +% TABLE 1.0
+% Copyright Michael J. Wichura August 1988
+
+%% The following three lines were inserted by C.E.K. of Personal TeX on 9-6-89
+%% \input nine
+%% \input eight
+%% \font\csc=cmcsc10
+
+
+
+% The TABLE macros are divided into sections, roughly according to
+% function:
+
+% Section Name Function
+% a Allocation Allocates storage registers for parameters.
+% f Format Reads format section; builds preamble for \halign;
+% processes \ReFormat command.
+% g Get Value Converts "spec"'s (as in spec_{LT}) to
+% corresponding "values"'s (as in value_{LT}).
+% h Hacks Utility macros; error messages; miscellaneous commands.
+% k Keys Definition and scanning of format keys.
+% n Numeric Macros for TABLE's numeric format.
+% s Struts Macros for struts.
+% t Tables Sets up \halign for table; end-of-row processing;
+% alternate vertical rules; spanning; horizontal
+% lines; stretching and shrinking; repositioning
+% commands.
+
+% The name of each internal macro begins with the prefix "\!t", the
+% "!" having category code 11, followed by the letter of the section
+% in which the macro is defined. For example, a macro beginning "\!th"
+% is defined in Section h (Hacks). There a few exceptions:
+% the general purpose macros "\!ttemp", "\!ttempa", "\!ttempb", and
+% "\!tnext" are repeatedly defined on the spot as the need arises.
+
+% External macros (and active characters) are defined in the following
+% sections:
+% Macro Section
+% " t
+% \- t
+% \= t
+% \ActivateBarAndQuote h
+% \AugmentedTableStrut s
+% \BackSpace h
+% \BeginFormat f
+% \BeginTable t
+% \BeginTableParBox a
+% \Center t
+% \ColumnWidthFactor a
+% \ColumnWidthUnit a
+% \DQuote h
+% \EndFormat k (\EndFormat is actually a key)
+% \EndTable t
+% \EndTableParBox a
+% \Enlarge s
+% \enlarge s
+% \EveryTable a
+% \EveryTableParBox a
+% \Expand t
+% \InterColumnSpaceFactor a
+% \InterColumnSpaceUnit a
+% \JustCenter t
+% \JustLeft t
+% \JustRight t
+% \KernFactor a
+% \KernUnit a
+% \Left t
+% \LeftTabskip a
+% \LineThicknessFactor a
+% \LineThicknessUnit a
+% \LongLines t
+% \Lower h
+% \MakeStrut s
+% \NewFormatKey k
+% \NormalCWU a
+% \NormalICSU a
+% \NormalKU a
+% \NormalLTU a
+% \NormalSU a
+% \NormalTableUnits a
+% \OpenUp s
+% \PseudoVrule t
+% \Raise h
+% \ReadFormatKeys k
+% \ReFormat f
+% \Right t
+% \RightTabskip a
+% \SetTableToWidth t
+% \Smash h
+% \StandardTableStrut s
+% \StrutDepthFactor a
+% \StrutHeightFactor a
+% \StrutUnit a
+% \TaBlE h
+% \TracingFormats a
+% \TracingKeys a
+% \Use t
+% \use t
+% \VBar h
+% \Vspace h
+% \VspaceFactor a
+% \WidenTableBy t
+% \\ t
+% \_ t
+% \| t
+% | t
+% ~ t
+%
+\catcode `\!=11
+\catcode `\@=11
+
+% Don't try to read the TABLE macros until after you've read the
+% TABLE manual. The internal documentation of the macros is
+% sketchy; you need the manual to understand what's going on.
+% You should also review the material on \halign s in the TeXbook,
+% since TABLE uses an \halign to perform its alignments.
+
+% In studying the TABLE macros, you should start by skimming the
+% macros in the "miscellaneous hacks", "error messages", and "loops"
+% subsections of Section h, as well as the "\GetValue" macro in
+% Section g; these macros are called many times by the other macros.
+% To continue with a "bottom-up" approach, read next Sections k,
+% f, and t. (Top-downers should reverse the order.) The other
+% Sections can be looked at as the need arises.
+
+
+
+% *********************************************************************
+% SECTION A: ALLOCATION
+% *********************************************************************
+
+\let\!tacr=\\ % Save meaning of \\ (Needed if TABLE is used with LaTeX
+
+% *********************************************************************
+% TABLE PARAMETERS: Units
+% *********************************************************************
+
+\newdimen\LineThicknessUnit
+\newdimen\StrutUnit
+\newskip \InterColumnSpaceUnit
+\newdimen\ColumnWidthUnit
+\newdimen\KernUnit
+
+\let\!taLTU=\LineThicknessUnit % Used in preamble
+\let\!taCWU=\ColumnWidthUnit % Used in preamble
+\let\!taKU =\KernUnit % Used in preamble
+
+\newtoks\NormalTLTU
+\newtoks\NormalTSU
+\newtoks\NormalTICSU
+\newtoks\NormalTCWU
+\newtoks\NormalTKU
+
+% NOTE: The user should modify the following DEFAULTS to suit his/her
+% taste, and output device:
+%\def\PixelsPerInch{300}
+\NormalTLTU={1in \divide \LineThicknessUnit by 300 }
+\NormalTSU ={\normalbaselineskip
+ \divide \StrutUnit by 11 } % 11 = 8+3 = NormalT Height+Depth Factors
+\NormalTICSU={.5em plus 1fil minus .25em} % .5em = width of a digit
+\NormalTCWU ={.5em}
+\NormalTKU ={.5em}
+
+\def\NormalTableUnits{%
+ \LineThicknessUnit =\the\NormalTLTU
+ \StrutUnit =\the\NormalTSU
+ \InterColumnSpaceUnit=\the\NormalTICSU
+ \ColumnWidthUnit =\the\NormalTCWU
+ \KernUnit =\the\NormalTKU}
+
+\NormalTableUnits
+
+% The user should issue \NormalTableUnits when setting a table
+% in a different point size, since the Table...Units themselves
+% are static while the Normal...Units vary with the point size.
+
+
+% *********************************************************************
+% TABLE PARAMETERS: Factors
+% *********************************************************************
+
+\newcount\LineThicknessFactor
+\newcount\StrutHeightFactor
+\newcount\StrutDepthFactor
+\newcount\InterColumnSpaceFactor
+\newcount\ColumnWidthFactor
+\newcount\KernFactor
+\newcount\VspaceFactor
+
+% DEFAULTS:
+\LineThicknessFactor =2
+\StrutHeightFactor =8
+\StrutDepthFactor =3
+\InterColumnSpaceFactor =3
+\ColumnWidthFactor =10
+\KernFactor =1
+\VspaceFactor =2
+
+
+% *********************************************************************
+% DIAGNOSTIC PARAMETERS
+% *********************************************************************
+
+\newcount\TracingKeys % >=1 reports new keys, >=2 reports key usage
+\newcount\TracingFormats % >=1 reports templates for columns
+ % >=2 reports \halign preamble
+
+
+% *********************************************************************
+% PARBLOCK PARAMETERS
+% *********************************************************************
+
+\def\BeginTableParBox#1{%
+ \vtop\bgroup
+ \hsize=#1
+ \normalbaselines
+ \let~=\!ttTie
+ \let\-=\!ttDH
+ \the\EveryTableParBox}
+
+\def\EndTableParBox{%
+ \MakeStrut{0pt}{\StrutDepthFactor\StrutUnit}
+ \egroup} % finishes the \vtop begun by \BeginTableParbox
+
+\newtoks\EveryTableParBox
+\EveryTableParBox={%
+ \parindent=0pt
+ \raggedright
+ \rightskip=0pt plus 4em % Provide more stretch
+ \relax}
+
+
+% *********************************************************************
+% EVERY TABLE TOKENS
+% *********************************************************************
+
+\newtoks\EveryTable
+\newtoks\!taTableSpread
+
+
+% *********************************************************************
+% Extreme left- and right- tabskips
+% *********************************************************************
+
+\newskip\LeftTabskip
+\newskip\RightTabskip
+
+
+% *********************************************************************
+% INTERNAL VARIABLES
+% *********************************************************************
+
+\newcount\!taCountA
+\newcount\!taColumnNumber
+\newcount\!taRecursionLevel % (Initially 0)
+
+\newdimen\!taDimenA % used by \Enlarge
+\newdimen\!taDimenB % used by \Enlarge
+\newdimen\!taDimenC % used by numeric.tex
+\newdimen\!taMinimumColumnWidth
+
+\newtoks\!taToksA
+
+\newtoks\!taPreamble
+\newtoks\!taDataColumnTemplate
+\newtoks\!taRuleColumnTemplate
+\newtoks\!taOldRuleColumnTemplate
+\newtoks\!taLeftGlue
+\newtoks\!taRightGlue
+
+\newskip\!taLastRegularTabskip
+
+\newif\if!taDigit
+\newif\if!taBeginFormat
+\newif\if!taOnceOnlyTabskip
+
+
+
+% *********************************************************************
+% SECTION H: HACKS
+% *********************************************************************
+
+% ****************************************************************
+% TABLE LOGO
+% ****************************************************************
+\def\TaBlE{%
+ T\kern-.27em\lower.5ex\hbox{A}\kern-.18em B\kern-.1em
+ \lower.5ex\hbox{L}\kern-.075em E}
+
+
+% ****************************************************************
+% ACTIVE CHARACTERS
+% ****************************************************************
+
+% ACTIVATE BAR AND QUOTE: Makes | and " active if they aren't
+% already active (in which case the user will probably have given
+% them special meanings); definitions are provided which effectively
+% undoes the activeness outside a Table.
+
+{\catcode`\|=13 \catcode`\"=13
+ \gdef\ActivateBarAndQuote{%
+ \ifnum \catcode`\|=13
+ \else
+ \catcode`\|=13
+ \def|{%
+ \ifmmode
+ \vert
+ \else
+ \char`\|
+ \fi}%
+ \fi
+ \ifnum \catcode`\"=13
+ \else
+ \catcode`\"=13
+ \def"{\char`\"}%
+ \fi}}
+
+% ****************************************************************
+% Macros for | and " having category code 12.
+% ****************************************************************
+{\catcode `\|=12 \catcode `\"=12
+\gdef\VBar{|}
+\gdef\DQuote{"}}
+
+
+% ****************************************************************
+% MISCELANEOUS HACKS
+% ****************************************************************
+
+% MESSAGE <Message>: Writes out <Message> to terminal and log file.
+\def\!thMessage#1{\immediate\write16{#1}\ignorespaces}
+
+% X: Abbreviation for expandafter
+\let\!thx=\expandafter
+
+% GOBBLE: Eats next token
+\def\!thGobble#1{}
+
+% SPACE TOKEN
+\def\\{\let\!thSpaceToken= }\\
+
+% HEIGHT, DEPTH, AND WIDTH
+\def\!thHeight{height}
+\def\!thDepth{depth}
+\def\!thWidth{width}
+
+% TOKSEDEF <token register>=<replacement text>: Places <replacement
+% text>, fully expanded a la \edef, in the specified <token register>.
+\def\!thToksEdef#1=#2{%
+ \edef\!ttemp{#2}%
+ #1\!thx{\!ttemp}%
+ \ignorespaces}
+
+
+% ****************************************************************
+% ERROR MESSAGES
+% ****************************************************************
+
+% STORE ERROR MSG <Control Sequence> <Message>
+% Replacement text of <Control Sequence> is a macro with Message
+% as its name. E.g., after \StoreErrorMsg\Help{Type <CR>},
+% \Help expands to "\Type <CR>"
+\def\!thStoreErrorMsg#1#2{%
+ \toks0 =\!thx{\csname #2\endcsname}%
+ \edef#1{\the\toks0 }}
+
+% READ ERROR MSG <Control sequence>
+% Continuing the above example, \ReadErrorMsg\Help produces "Type <CR>"
+\def\!thReadErrorMsg#1{%
+ \!thx\!thx\!thx\!thGobble\!thx\string #1}
+
+% ERROR <Error Message> <Error Help>
+\def\!thError#1#2{%
+ \begingroup
+ \newlinechar=`\^^J%
+ \edef\!ttemp{#2}%
+ \errhelp=\!thx{\!ttemp}%
+ \!thMessage{%
+ ^^J\!thReadErrorMsg\!thErrorMsgA
+ ^^J\!thReadErrorMsg\!thErrorMsgB}%
+ \errmessage{#1}%
+ \endgroup}
+
+% TEXT FOR ERROR MESSAGE
+\!thStoreErrorMsg\!thErrorMsgA{%
+ TABLE error; see manual for explanation.}
+\!thStoreErrorMsg\!thErrorMsgB{%
+ Type \space H <return> \space for immediate help.}
+
+% GET REPLACEMENT <Prompt Message> <Replacement Value>
+% <Replacement Vale> must be a control sequence
+\def\!thGetReplacement#1#2{%
+ \begingroup
+ \!thMessage{#1}
+ \endlinechar=-1
+ \global\read16 to#2%
+ \endgroup}
+
+
+% ****************************************************************
+% LOOP MACRO
+% ****************************************************************
+
+% LOOP ... REPEAT macro from TUGboat Vol 8 #2: 1987
+% Syntax is like that of plain TeX's \loop ... \repeat macro
+\def\!thLoop#1\repeat{%
+ \def\!thIterate{%
+ #1%
+ \!thx \!thIterate
+ \fi}%
+ \!thIterate
+ \let\!thIterate\relax}
+
+
+% ***************************************************************
+% VERTICALLY-CENTERED SMASH
+% ***************************************************************
+
+% SMASH: Like TeX's \smash, only the argument
+% is centered vertically before its height and depth are smashed to 0pt.
+\def\Smash{%
+ \relax
+ \ifmmode
+ \expandafter\mathpalette
+ \expandafter\!thDoMathVCS
+ \else
+ \expandafter\!thDoVCS
+ \fi}
+
+% DO VCS
+\def\!thDoVCS#1{%
+ \setbox\z@\hbox{#1}%
+ \!thFinishVCS}
+
+% DO MATH VCS
+\def\!thDoMathVCS#1#2{%
+ \setbox\z@\hbox{$\m@th#1{#2}$}%
+ \!thFinishVCS}
+
+% FINISH VCS
+\def\!thFinishVCS{%
+ \vbox to\z@{\vss\box\z@\vss}}
+
+
+% ***************************************************************
+% RAISE AND LOWER
+% ***************************************************************
+
+% Like TeX's \raise and \lower, except: (1) The first argument
+% to these commands is a dimension expressed in TABLE's usual conventions;
+% the default is (StrutHeightFactor+StrutDepthFactor)*StrutUnit/2
+% (2) like \smash, these commands function in math mode as well
+% as horizontal mode; (3) again like \smash, the result is declared
+% to have height and depth 0pt
+
+% Examples \Raise2{Stuff}: "Stuff" is raised 2*StrutUnit
+% \Raise {Stuff}: "Stuff" is raised a half-line
+% $\Lower(10pt){\alpha}$: "$\alpha$" is lowered 10 points
+
+% RAISE
+\def\Raise{%
+ \def\!thSign{+}%
+ \!tgGetValue\!thSetDimen}
+
+% LOWER
+\def\Lower{%
+ \def\!thSign{-}%
+ \!tgGetValue\!thSetDimen}
+
+% SET DIMEN
+\def\!thSetDimen{%
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \!taDimenA \StrutHeightFactor\StrutUnit
+ \advance \!taDimenA \StrutDepthFactor\StrutUnit
+ \divide \!taDimenA 2
+ \else
+ \!taDimenA \!tgValue\StrutUnit
+ \fi
+ \else
+ \!taDimenA \!tgValue
+ \fi
+ \!taDimenA=\!thSign\!taDimenA\relax
+ %
+ % BRANCH ON MODE
+ \ifmmode
+ \expandafter\mathpalette
+ \expandafter\!thDoMathRaise
+ \else
+ \expandafter\!thDoSimpleRaise
+ \fi}
+
+% DO SIMPLE RAISE
+\def\!thDoSimpleRaise#1{%
+ \setbox\z@\hbox{\raise \!taDimenA\hbox{#1}}%
+ \!thFinishRaise} % From Plain TeX: \ht0=0pt \dp0=0pt \box0
+
+% DO MATH RAISE
+\def\!thDoMathRaise#1#2{%
+ \setbox\z@\hbox{\raise \!taDimenA\hbox{$\m@th#1{#2}$}}%
+ \!thFinishRaise}
+
+% FINISH RAISE. This is the same as Plain's \finsm@sh; some macro
+% packages redefine \finsm@sh.
+\def\!thFinishRaise{%
+ \ht\z@\z@
+ \dp\z@\z@
+ \box\z@}
+
+
+% ***************************************************************
+% BACK SPACE
+% ***************************************************************
+\def\BackSpace{%
+ \!tgGetValue\!thKernBack}
+
+\def\!thKernBack{%
+ \kern -
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \the\KernFactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \KernUnit
+ \else
+ \!tgValue % user-specified dimension
+ \fi
+ \ignorespaces}%
+
+
+% ***************************************************************
+% Vspace
+% ***************************************************************
+\def\Vspace{%
+ \noalign
+ \bgroup
+ \!tgGetValue\!thVspace}
+
+\def\!thVspace{%
+ \vskip
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \the\VspaceFactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \StrutUnit
+ \else
+ \!tgValue % user-specified skip
+ \fi
+ \egroup} % Ends the \noalign
+
+% *********************************************************************
+% SECTION F: FORMAT
+% *********************************************************************
+
+% As explained in Section 3.3 of the manual, TABLE alternates each
+% of the user's "data" columns with a "rule" column; moreover, TABLE
+% places a "dummy data" column at the left and right of a table.
+% A table with n nominal data columns therefore actually has a
+% total of
+% n (nominal data columns)
+% +(n+1) (rule columns)
+% + 2 (dummy data columns)
+% ____
+% 2n+3
+% columns.
+
+% FORMATs job is to create an \halign preamble for the alignment
+% of these (2n+3) columns. The preamble consists of templates
+% for the various columns, strung together with &'s and interlaced
+% with \tabskip glue specifications.
+
+% FORMAT constructs the template for a nomimal data column according
+% to the user-specified format keys. As the keys are read from left
+% to right, the template is built up "from the inside out" (as
+% illustrated in Section 3.1.9 of the manual), the inner-most part
+% being the "#" sign. A "|" in the format terminates template
+% building; the completed template is adjoined to preamble along
+% with the template for the following rule column.
+
+% Minimum column widths, if specified, are implemented by creating
+% an "artificial row" with data entries of the form
+% \hskip <minimum column width>.
+% This row has zero height and depth and is completely invisible.
+
+
+% BEGIN FORMAT
+\def\BeginFormat{%
+ \catcode`\|=12 % Inhibit expansion if | immediately follows a <number>
+ \catcode`\"=12 % read by \getvalue.
+ \!taPreamble={}%
+ \!taColumnNumber=0
+ \skip0 =\InterColumnSpaceUnit
+ \multiply\skip0 \InterColumnSpaceFactor
+ \divide\skip0 2
+ \!taRuleColumnTemplate=\!thx{%
+ \!thx\tabskip\the\skip0 }%
+ \!taLastRegularTabskip=\skip0
+ \!taOnceOnlyTabskipfalse
+ \!taBeginFormattrue % Used to intercept key "]"
+ \def\!tfRowOfWidths{}% Artificial Table Row with horizontal struts
+ % to enforce specified minimum column widths
+ \ReadFormatKeys}
+
+% SET (MINIMUM COLUMN) WIDTH: Invoked by the key "w".
+\def\!tfSetWidth{%
+ \ifx \!tfRowOfWidths \empty % true if no prior "w" keys
+ \ifnum \!taColumnNumber>0 % true if "w" key is to right of first "|"
+ \begingroup % RowOfWidths={&\omit || n copies of
+ % &\omit&\omit}, where n = number of columns
+ \!taCountA=1 % to the left of this one
+ \aftergroup \edef \aftergroup \!tfRowOfWidths \aftergroup {%
+ \aftergroup &\aftergroup \omit
+ \!thLoop
+ \ifnum \!taCountA<\!taColumnNumber
+ \advance\!taCountA 1
+ \aftergroup \!tfAOAO
+ \repeat
+ \aftergroup }%
+ \endgroup
+ \fi
+ \fi
+ \ifx [\!ttemp % \!tgGetValue sets \!ttemp = token after w
+ \!thx\!tfSetWidthText
+ \else
+ \!thx\!tfSetWidthValue
+ \fi}
+
+% AOAO = (Apersand Omit Ampersand Omit)
+\def\!tfAOAO{%
+ &\omit&\omit}
+
+% SET WIDTH TEXT
+\def\!tfSetWidthText [#1]{% #1 = specified text
+ \def\!tfWidthText{#1}%
+ \ReadFormatKeys}
+
+% SET WIDTH VALUE
+\def\!tfSetWidthValue{%
+ \!taMinimumColumnWidth =
+ \ifnum \!tgCode=1
+ \ifx\!tgValue\empty % Use default multiplier if user didn't specify one
+ \ColumnWidthFactor
+ \else
+ \!tgValue
+ \fi
+ \ColumnWidthUnit
+ \else
+ \!tgValue
+ \fi
+ \def\!tfWidthText{}% Override possible prior `w[sample entry]'
+ \ReadFormatKeys}
+
+
+% SET TABSKIP: Invoked by the tabskip keys "t" and "o"
+\def\!tfSetTabskip{%
+ \ifnum \!tgCode=1
+ \skip0 =\InterColumnSpaceUnit
+ \multiply\skip0
+ \ifx \!tgValue\empty
+ \InterColumnSpaceFactor % Default integer
+ \else
+ \!tgValue % User-specified integer
+ \fi
+ \else
+ \skip0 =\!tgValue % User-specified <skip>
+ \fi
+ \divide\skip0 by 2
+ \ifnum\!taColumnNumber=0
+ \!thToksEdef\!taRuleColumnTemplate={%
+ \the\!taRuleColumnTemplate
+ \tabskip \the\skip0 }
+ \else
+ \!thToksEdef\!taDataColumnTemplate={%
+ \the\!taDataColumnTemplate
+ \tabskip \the\skip0 }
+ \fi
+ \if!taOnceOnlyTabskip
+ % % Tabskip used at right of this col only
+ \else
+ \!taLastRegularTabskip=\skip0 % Remember this Tabskip, for possible
+ \fi % restoration after a subsequent"OnceOnly"
+ \ReadFormatKeys}
+
+
+% SET VRULE: Invoked by the key "|"
+\def\!tfSetVrule{%
+ \!thToksEdef\!taRuleColumnTemplate={%
+ \noexpand\hfil
+ \noexpand\vrule
+ \noexpand\!thWidth
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \the\LineThicknessFactor % Default integer
+ \else
+ \!tgValue % User-specified integer
+ \fi
+ \!taLTU % \LineThicknessUnit
+ \else
+ \!tgValue % User-specified dimension
+ \fi
+ ####%
+ \noexpand\hfil
+ \the\!taRuleColumnTemplate} % has \tabskips, when column number=0
+ \!tfAdjoinPriorColumn}
+
+% SET ALTERNATE VRULE: Invoked by the key "\|", in the form
+% \|{<template for (rule) column>}. The "{" and "}" are mandatory,
+% and the <template for column> must contain a "#". The key system
+% CAN'T be used to set up this template. The <template> can have the
+% form "\span\macro".
+\def\!tfSetAlternateVrule{%
+ \afterassignment\!tfSetAlternateA
+ \toks0 =} % Put template into \toks0
+
+\def\!tfSetAlternateA{%
+ \!thToksEdef\!taRuleColumnTemplate={%
+ \the\toks0 \the\!taRuleColumnTemplate} % RCT may have \tabskips
+ \!tfAdjoinPriorColumn}
+
+% ADJOIN PRIOR COLUMN
+\def\!tfAdjoinPriorColumn{%
+ \ifnum \!taColumnNumber=0
+ \!taPreamble=\!taRuleColumnTemplate % New \tabskip may have been added
+ \ifnum \TracingFormats>0
+ \!tfShowRuleTemplate
+ \fi
+ \else
+ \ifx\!tfRowOfWidths\empty % no "w" keys specified yet, not even this col
+ \else
+ \!tfUpdateRowOfWidths
+ \fi
+ % Adjoin positioning glues to left and right of template
+ \!thToksEdef\!taDataColumnTemplate={%
+ \the \!taLeftGlue
+ \the \!taDataColumnTemplate
+ \the \!taRightGlue}
+ \ifnum \TracingFormats>0
+ \!tfShowTemplates
+ \fi
+ % Adjoin data- and rule-column templates to preamble
+ \!thToksEdef\!taPreamble={%
+ \the\!taPreamble
+ &
+ \the\!taDataColumnTemplate
+ &
+ \the\!taRuleColumnTemplate}
+ \fi
+%
+% START NEW COLUMN
+ \advance \!taColumnNumber 1
+ % Initialize data-column template, restoring last "regular" tabskip
+ % after a "once only" tabskip
+ \if!taOnceOnlyTabskip
+ \!thToksEdef\!taDataColumnTemplate={%
+ ####\tabskip \the\!taLastRegularTabskip}
+ \else
+ \!taDataColumnTemplate{##}%
+ \fi
+ % Remaining initializations
+ \!taRuleColumnTemplate{}% # is inserted by \SetVrule, or \SetAlternateVrule
+ \!taLeftGlue{\hfil}% % Default positioning is "center"
+ \!taRightGlue{\hfil}%
+ \!taMinimumColumnWidth=0pt
+ \def\!tfWidthText{}%
+ \!taOnceOnlyTabskipfalse % Set true by key "o"
+ \ReadFormatKeys}
+
+% UPDATE ROW OF WIDTHS
+\def\!tfUpdateRowOfWidths{%
+ % If user had a "w[<Text>]" key, set <Text> according to the
+ % template for this column, and find the width of the result
+ \ifx \!tfWidthText\empty
+ \else % set specified text according to current template & find width
+ \!tfComputeMinColWidth
+ \fi
+ \edef\!tfRowOfWidths{%
+ \!tfRowOfWidths
+ &%
+ \omit % Data Column
+ \ifdim \!taMinimumColumnWidth>0pt
+ \hskip \the\!taMinimumColumnWidth
+ \fi
+ &
+ \omit}} % Rule Column
+
+% COMPUTE MINIMUM COLUMN WIDTH (from specified WidthText)
+\def\!tfComputeMinColWidth{%
+ \setbox0 =\vbox{%
+ \ialign{% Plain's initialized \halign; \tabskip=0pt \everycr={}
+ \span\the\!taDataColumnTemplate\cr
+ \!tfWidthText\cr}}%
+ \!taMinimumColumnWidth=\wd0 }
+
+% SHOW (INITIAL) RULE TEMPLATE
+\def\!tfShowRuleTemplate{%
+ \!thMessage{}
+ \!thMessage{TABLE FORMAT}
+ \!thMessage{Column: Template}
+ \!thMessage{%
+ \space *c: ##\tabskip \the\LeftTabskip}
+ \!taOldRuleColumnTemplate=\!taRuleColumnTemplate}
+
+% SHOW TEMPLATES
+\def\!tfShowTemplates{%
+ \!thMessage{%
+ \space \space r: \the\!taOldRuleColumnTemplate}
+ \!taOldRuleColumnTemplate=\!taRuleColumnTemplate
+ \!thMessage{%
+ \ifnum \!taColumnNumber<10
+ \space
+ \fi
+ \the\!taColumnNumber c: \the\!taDataColumnTemplate}
+ \ifdim\!taMinimumColumnWidth>0pt
+ \!thMessage{%
+ \space \space w: \the\!taMinimumColumnWidth}
+ \fi}
+
+
+% FINISH UP: Invoked by the keys "." and \EndFormat
+\def\!tfFinishFormat{%
+ \ifnum \TracingFormats>0
+ \!thMessage{%
+ \space \space r: \the\!taOldRuleColumnTemplate
+ \tabskip \the\RightTabskip}%
+ \!thMessage{%
+ \space *c: ##\tabskip 0pt}
+ \fi
+ \ifnum \!taColumnNumber<2
+ \!thError{%
+ \ifnum \!taColumnNumber=0
+ No
+ \else
+ Only 1
+ \fi
+ "|"}%
+ {\!thReadErrorMsg\!tfTooFewBarsA
+ ^^J\!thReadErrorMsg\!tfTooFewBarsB
+ ^^J\!thReadErrorMsg\!tkFixIt}%
+ \fi
+ \!thToksEdef\!taPreamble={%
+ ####\tabskip\LeftTabskip
+ &
+ \the\!taPreamble \tabskip\RightTabskip
+ &
+ ####\tabskip 0pt \cr}
+ \ifnum \TracingFormats>1
+ \!thMessage{Preamble=\the\!taPreamble}
+ \fi
+ \ifnum \TracingFormats>2
+ \!thMessage{Row Of Widths="\!tfRowOfWidths"}
+ \fi
+ \!taBeginFormatfalse % Intercepts "|", tabskips, and "."
+ \catcode`\|=13
+ \catcode`\"=13
+ \!ttDoHalign}
+
+% ERROR MESSAGE FOR NOT ENOUGH "|"'s
+\!thStoreErrorMsg\!tfTooFewBarsA{%
+ There must be at least 2 "|"'s (and/or "\string \|"'s)}
+\!thStoreErrorMsg\!tfTooFewBarsB{%
+ between \string\BeginFormat\space and \string\EndFormat\space (or ".").}
+
+
+% REFORMAT [<key letters>]{<text>}: Formats <text> according to
+% <key letters>. Used to override the template for a column,
+% or columns when used after \use.
+\def\ReFormat[{%
+ \omit
+ \!taDataColumnTemplate{##}%
+ \!taLeftGlue{}%
+ \!taRightGlue{}%
+ \catcode`\|=12 % Inhibit expansion if | immediately follows a <number>
+ \catcode`\"=12 % read by \getvalue. Actually, '|' and '"' shouldn't
+ \ReadFormatKeys}% appear in a \ReFormat cmd; this is here as a safeguard.
+
+% END REFORMAT: Invoked by the key "]"
+\def\!tfEndReFormat{%
+ \ifnum \TracingFormats>0
+ \!thMessage{ReF:
+ \the\!taLeftGlue
+ \hbox{\the\!taDataColumnTemplate}% White lie
+ \the\!taRightGlue}
+ \fi
+ \catcode`\|=13
+ \catcode`\"=13
+ \!tfReFormat}
+
+\def\!tfReFormat#1{%
+ \the \!taLeftGlue
+ \vbox{%
+ \ialign{%
+ \span\the\!taDataColumnTemplate\cr
+ #1\cr}}%
+ \the \!taRightGlue}
+
+
+
+% *********************************************************************
+% SECTION G: GET VALUE
+% *********************************************************************
+
+% GET_VALUE{<return macro>}<tokens> functions as follows:
+
+% If <tokens> has the form <(stuff)>, then
+% code=2 and value=<stuff>
+
+% Otherwise <tokens> has the form <DDDXYZ> where <DDD> denotes (a possibly
+% empty) string of consecutive digits (0,1,2,...,9) terminated by the first
+% character <X> (possibly a blank) that is not a digit. In this case
+% code=1 and value=<DDD> (= <null>, if <DDD> is non-empty).
+
+% Examples: Code Value
+% "\GetValue{\macro} 3" 1 null
+% "\GetValue{\macro}A " 1 null
+% "\GetValue{\macro}1 " 1 1
+% "\GetValue{\macro}25A" 1 25
+% "\GetValue{\macro}25012 " 1 25012
+% "\GetValue{\macro}(10pt)" 2 10pt
+% "\GetValue{\macro}(1in)" 2 1in
+% "\GetValue{\macro} (1in)" 1 null
+
+
+% GET_VALUE{<macro to execute after value is found>}
+\def\!tgGetValue#1{%
+ \def\!tgReturn{#1}% Set return
+ \futurelet\!ttemp\!tgCheckForParen}% Now \!ttemp is the token
+ % immediately after {}
+
+% CHECK_PAREN: See if \!ttemp is a (
+\def\!tgCheckForParen{%
+ \ifx\!ttemp (%
+ \!thx \!tgDoParen
+ \else
+ \!thx \!tgCheckForSpace
+ \fi}
+
+% DO_PAREN: Set code to 2, value to stuff inside ( )'s
+\def\!tgDoParen(#1){%
+ \def\!tgCode{2}%
+ \def\!tgValue{#1}% NOTE #1 MUST BE A LEGITIMATE VALUE
+ \!tgReturn}
+
+% CHECK_SPACE: See if \!ttemp is a <blank space>
+\def\!tgCheckForSpace{%
+ \def\!tgCode{1}%
+ \def\!tgValue{}% Initialize value to <null>
+ \ifx\!ttemp\!thSpaceToken
+ \!thx \!tgReturn % <blank space> means no value was specified
+ \else
+ \!thx \!tgCheckForDigit
+ \fi}
+
+% CHECK_DIGIT: \!ttemp is not a <blank space>; if its a digit (0,1,...,9)
+% get the <number> starting with that digit.
+\def\!tgCheckForDigit{%
+ \!taDigitfalse
+ \ifx 0\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 1\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 2\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 3\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 4\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 5\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 6\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 7\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 8\!ttemp
+ \!taDigittrue
+ \else
+ \ifx 9\!ttemp
+ \!taDigittrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if!taDigit
+ \!thx \!tgGetNumber
+ \else
+ \!thx \!tgReturn
+ \fi}
+
+% GET_NUMBER
+\def\!tgGetNumber{%
+ \afterassignment\!tgGetNumberA
+ \!taCountA=}
+\def\!tgGetNumberA{%
+ \edef\!tgValue{\the\!taCountA}%
+ \!tgReturn}
+
+
+% ********************************************************************
+% MISCELANEOUS "RETURNS" FROM \getvalue
+% ********************************************************************
+
+% SET UP PAR BOX: Puts \BeginTableParBox{<user-specified \hsize>}
+% to the left of "#" and \EndTableParBox to the right of "#".
+\def\!tgSetUpParBox{%
+ \edef\!ttemp{%
+ \noexpand \ReadFormatKeys
+ b{\noexpand \BeginTableParBox{%
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \the\ColumnWidthFactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \!taCWU % \ColumnWidthUnit
+ \else
+ \!tgValue % user-specified dimension
+ \fi}}}%
+ \!ttemp
+ a{\EndTableParBox}}
+
+% SET KERNS
+\def\!tgInsertKern{%
+ \edef\!ttemp{%
+ \kern
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \the\KernFactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \!taKU % \KernUnit
+ \else
+ \!tgValue % user-specified dimension
+ \fi}%
+ \edef\!ttemp{%
+ \noexpand\ReadFormatKeys
+ \ifh@ % true if kern goes to left of "#"
+ b{\!ttemp}
+ \fi
+ \ifv@ % true if kern goes to right of "#"
+ a{\!ttemp}
+ \fi}%
+ \!ttemp}
+
+% *********************************************************************
+% SECTION K: KEYS
+% *********************************************************************
+
+% ****************************************************************
+% DEFINING NEW KEYS
+% ****************************************************************
+
+% NEW FORMAT KEY <Key Letter>: Must be followed by
+% <Parameter Text> <Replacement Text>
+% Sets up a new key letter command by expanding (essentially) to
+% \expandafter \def \csname !tk<Key Letter>\endcsname
+% <Parameter Text>{<Replacement Text>}
+% A warning message is issued if <Key Letter> is already in use.
+\def\NewFormatKey#1{%
+ \!thx\def\!thx\!ttempa\!thx{\string #1}%
+ \!thx\def\!thx\!ttempb\!thx{\csname !tk<\!ttempa>\endcsname}%
+ \ifnum \TracingKeys>0
+ \!tkReportNewKey
+ \fi
+ \!thx\ifx \!ttempb \relax
+ \!thx\!tkDefineKey
+ \else
+ \!thx\!tkRejectKey
+ \fi}
+
+% REPORT NEW KEY
+\def\!tkReportNewKey{%
+ \!taToksA\!thx{\!ttempa}%
+ \!thMessage{NEW KEY: "\the\!taToksA"}}
+
+% DEFINE KEY
+\def\!tkDefineKey{%
+ \!thx\def\!ttempb}%
+
+% DUPLICATE KEY
+\def\!tkRejectKey{%
+ \!taToksA\!thx{\!ttempa}%
+ \!thError{Key letter "\the\!taToksA" already used}
+ {\!thReadErrorMsg\!tkFixIt}
+ \def\!tkGarbage}%
+
+% ERROR MESSAGE FOR DUPLICATE KEY
+\!thStoreErrorMsg\!tkFixIt{%
+ You'd better type \space 'E' \space and fix your file.}
+
+
+% ****************************************************************
+% READING FORMAT KEYS
+% ****************************************************************
+
+% READ FORMAT KEYS
+\def\ReadFormatKeys#1{%
+ \!thx\def\!thx\!ttempa\!thx{\string #1}%
+ \!thx\def\!thx\!ttempb\!thx{\csname !tk<\!ttempa>\endcsname}%
+ \ifnum \TracingKeys>1
+ \!tkReportKey
+ \fi
+ \!thx\ifx \!ttempb\relax
+ \!thx\!tkReplaceKey
+ \else
+ \!thx\!ttempb
+ \fi}
+
+% REPORT KEY
+\def\!tkReportKey{%
+ \!taToksA\!thx{\!ttempa}%
+ \!thMessage{KEY: "\the\!taToksA"}}
+
+% REPLACE KEY
+\def\!tkReplaceKey{%
+ \!taToksA\!thx{\!ttempa}%
+ \!thError {Undefined format key "\the\!taToksA"}
+ {\!thReadErrorMsg\!tkUndefined ^^J\!thReadErrorMsg\!tkBadKey}
+ \!tkReplaceKeyA}
+
+\def\!tkReplaceKeyA{%
+ \!thGetReplacement{\!thReadErrorMsg\!tkReplace}\!tkReplacement
+ \!thx\ReadFormatKeys\!tkReplacement}
+
+% ERROR MESSAGES FOR KEY RELACEMENT
+\!thStoreErrorMsg\!tkUndefined{%
+ The format key in " "'s on the next to top line is undefined.}
+\!thStoreErrorMsg\!tkBadKey{%
+ Type \space E \space to quit now, or
+ \space<CR> \space and respond to next prompt.}
+\!thStoreErrorMsg\!tkReplace{%
+ Type \space<replacement key><CR> \space,
+ or simply \space<CR> \space to skip offending key:}
+
+
+% ****************************************************************
+% PRIMITIVE KEYS
+% ****************************************************************
+
+% Key "b": b{TOKENS} adds TOKENS to the left of (before) the template
+\NewFormatKey b#1{%
+ \!thx\!tkJoin\!thx{\the\!taDataColumnTemplate}{#1}%
+ \ReadFormatKeys}
+
+\def\!tkJoin#1#2{%
+ \!taDataColumnTemplate{#2#1}}%
+
+% Key "a": a{TOKENS} adds TOKENS to the right of (after) the template
+\NewFormatKey a#1{%
+ \!taDataColumnTemplate\!thx{\the\!taDataColumnTemplate #1}%
+ \ReadFormatKeys}
+
+% Key "\{": Enclose template in braces.
+\NewFormatKey \{{%
+ \!taDataColumnTemplate=\!thx{\!thx{\the\!taDataColumnTemplate}}%
+ \ReadFormatKeys}
+
+% Key "*": "*{N}{KEY LETTERS}" is equivalent to specifying
+% <KEY LETTERS> N times.
+% KEY LETTERS may contain further * specifications
+\NewFormatKey *#1#2{%
+ \!taCountA=#1\relax
+ \!taToksA={}%
+ \!thLoop
+ \ifnum \!taCountA > 0
+ \!taToksA\!thx{\the\!taToksA #2}%
+ \advance\!taCountA -1
+ \repeat
+ \!thx\ReadFormatKeys\the\!taToksA}
+
+
+% ****************************************************************
+% POSITIONING KEYS
+% ****************************************************************
+
+% Key "\LeftGlue": Specifies the glue (usually \hfil, or nothing) to be
+% added to extreme left of the template to position a column
+\NewFormatKey \LeftGlue#1{%
+ \!taLeftGlue{#1}%
+ \ReadFormatKeys}
+
+% Key "\RightGlue": Specifies the glue (usually \hfil, or nothing) to be
+% added to the extreme right of the template to position a column
+\NewFormatKey \RightGlue#1{%
+ \!taRightGlue{#1}%
+ \ReadFormatKeys}
+
+% Key "c": Centered column.
+\NewFormatKey c{%
+ \ReadFormatKeys
+ \LeftGlue\hfil
+ \RightGlue\hfil}
+
+% Key "l": Left-adjusted column.
+\NewFormatKey l{%
+ \ReadFormatKeys
+ \LeftGlue{} % In case more than one positioning key is specified.
+ \RightGlue\hfil}
+
+% Key "r": Right-adjusted column.
+\NewFormatKey r{%
+ \ReadFormatKeys
+ \LeftGlue\hfil
+ \RightGlue{}}
+
+% Key "k": Adds kerns to left and right of "#"
+% This key and the two below use Plain TeX's \if@h as if it were \if@left,
+% and \if@v as if it were \if@right. Table making goes on in a group,
+% so even in the unlikely circumstance that a \phantom is currently under
+% construction, there's no problem.
+\NewFormatKey k{%
+ \h@true
+ \v@true
+ \!tgGetValue{\!tgInsertKern}}
+
+% Key "i": Adds a kern to the left of "#"
+\NewFormatKey i{%
+ \h@true
+ \v@false
+ \!tgGetValue{\!tgInsertKern}}
+
+% Key "j": Adds a kern to the right of "#"
+\NewFormatKey j{%
+ \h@false
+ \v@true
+ \!tgGetValue{\!tgInsertKern}}
+
+
+% ****************************************************************
+% NUMERIC ITEM KEYS
+% ****************************************************************
+
+% Key "n": numeric item , non-math mode.
+\NewFormatKey n{%
+ \def\!tnStyle{}%
+ \futurelet\!tnext\!tnTestForBracket}
+
+% Key "N": numeric item, math mode.
+\NewFormatKey N{%
+ \def\!tnStyle{$}%
+ \futurelet\!tnext\!tnTestForBracket}
+
+
+% ****************************************************************
+% ATTRIBUTE KEYS
+% ****************************************************************
+
+% Key "m": Math mode.
+\NewFormatKey m{%
+ \ReadFormatKeys b$ a$}
+
+% Key "M": Displaymath mode.
+\NewFormatKey M{%
+ \ReadFormatKeys \{ b{$\displaystyle} a$}
+
+% Key "\m": Template ${}#\hfil$
+\NewFormatKey \m{%
+ \ReadFormatKeys l b{{}} m}
+
+% Key "\M": Template $\displaystyle{{}#\hfil}$
+\NewFormatKey \M{%
+ \ReadFormatKeys l b{{}} M}
+
+% Key "f": Set font (E.g., f\it sets up italic font (assuming \it
+% has its usual meaning)
+\NewFormatKey f#1{%
+ \ReadFormatKeys b{#1}}
+
+% Key "B": abbreviation for f\bf
+\NewFormatKey B{%
+ \ReadFormatKeys f\bf}
+
+% Key "I": abbreviation for f\it
+\NewFormatKey I{%
+ \ReadFormatKeys f\it}
+
+% Key "S": abbreviation for f\sl
+\NewFormatKey S{%
+ \ReadFormatKeys f\sl}
+
+% Key "R": abbreviation for f\rm
+\NewFormatKey R{%
+ \ReadFormatKeys f\rm}
+
+% Key "T": abbreviation for f\tt
+\NewFormatKey T{%
+ \ReadFormatKeys f\tt}
+
+% Key "p": ParBox
+\NewFormatKey p{%
+ \!tgGetValue{\!tgSetUpParBox}}
+
+
+% ****************************************************************
+% MINIMUM COLUMN WIDTH KEY
+% ****************************************************************
+
+% Key "w": minimum column width
+\NewFormatKey w{%
+ \!tkTestForBeginFormat w{\!tgGetValue{\!tfSetWidth}}}
+
+
+% ****************************************************************
+% TABSKIP KEYS
+% ****************************************************************
+
+% Key "s": Set tabskip for the inter-column space to the right
+% of the current column, and all subsequent spaces, until overriden
+% by a new "s" or "o" key.
+\NewFormatKey s{%
+ \!taOnceOnlyTabskipfalse % in case same column has a prior "o" key
+ \!tkTestForBeginFormat t{\!tgGetValue{\!tfSetTabskip}}}
+
+% Key "o": Apply the \tabskip stated for this column ONLY to the
+% inter-column space just to the right of this column; restore the
+% the previous \tabskip for subsequent columns.
+\NewFormatKey o{%
+ \!taOnceOnlyTabskiptrue
+ \!tkTestForBeginFormat o{\!tgGetValue{\!tfSetTabskip}}}
+
+
+% ****************************************************************
+% RULE KEYS
+% ****************************************************************
+
+% Key "|": Standard rule column designator
+\NewFormatKey |{%
+ \!tkTestForBeginFormat |{\!tgGetValue{\!tfSetVrule}}}
+
+% Key "\|": Non-standard rule column designator
+\NewFormatKey \|{%
+ \!tkTestForBeginFormat \|{\!tfSetAlternateVrule}}
+
+
+% ****************************************************************
+% END-OF-FORMAT KEYS
+% ****************************************************************
+
+% Key ".": PERIOD -- end of \BeginFormat section.
+\NewFormatKey .{%
+ \!tkTestForBeginFormat.{\!tfFinishFormat}}
+
+% Key "\EndFormat": Equivalent to "."
+\NewFormatKey \EndFormat{%
+ \!tkTestForBeginFormat\EndFormat{\!tfFinishFormat}}
+
+% Key "]": End of \ReFormat section
+\NewFormatKey ]{%
+ \!tkTestForReFormat ] \!tfEndReFormat}
+
+
+% ****************************************************************
+% VALIDITY CHECKS
+% ****************************************************************
+
+% TEST FOR BEGIN FORMAT{<Key>}{Intended Action}: This test is run
+% on keys that can only be used by \BeginFormat --- "s", "o",
+% "|", "\|", "w", ".", and "\EndFormat".
+\def\!tkTestForBeginFormat#1#2{%
+ \if!taBeginFormat
+ \def\!ttemp{#2}%
+ \!thx \!ttemp
+ \else
+ \toks0={#1}%
+ \toks2=\!thx{\string\ReFormat}%
+ \!thx \!tkImproperUse
+ \fi}
+
+% TEST FOR RE FORMAT{<Key>}{Intended Action}: This test is run
+% on the key "]", which can only be used by \ReFormat.
+\def\!tkTestForReFormat#1#2{%
+ \if!taBeginFormat
+ \toks0={#1}%
+ \toks2=\!thx{\string\BeginFormat}%
+ \!thx \!tkImproperUse
+ \else
+ \def\!ttemp{#2}%
+ \!thx \!ttemp
+ \fi}
+
+% IMPROPER USE OF KEY
+\def\!tkImproperUse{%
+ \!thError{\!thReadErrorMsg\!tkBadUseA "\the\toks0 "}%
+ {\!thReadErrorMsg\!tkBadUseB \the\toks2 \space command.
+ ^^J\!thReadErrorMsg\!tkBadKey}%
+ \!tkReplaceKeyA}
+
+% ERROR MESSAGES FOR IMPROPER USE OF KEY
+\!thStoreErrorMsg\!tkBadUseA{Improper use of key }
+\!thStoreErrorMsg\!tkBadUseB{%
+ The key mentioned above can't be used in a }
+
+
+
+% *********************************************************************
+% SECTION n: NUMERIC
+% *********************************************************************
+
+% NOTE: THE SPACE BETWEEN A NUMERIC ENTRY AND THE FOLLOWING '|', '"',
+% OR '\|' IS MANDATORY.
+% EMPTY NUMERIC ENTRIES ARE NOT ALLOWED: USE '{}' OR '\omit' INSTEAD.
+
+% TEST FOR BRACKET: Invoked by the keys "n" and "N".
+\def\!tnTestForBracket{%
+ \ifx [\!tnext
+ \!thx\!tnGetArgument
+ \else
+ \!thx\!tnGetCode
+ \fi}
+
+% GET CODE: E.g. "4", or "4.0", "0.4", or "10.2"
+\def\!tnGetCode#1 {% NOTE THE BLANK
+ \!tnConvertCode #1..!}
+
+% CONVERT CODE: E.g. converts above to [0000], [0000.], [.0000],
+% [0000000000.00]
+\def\!tnConvertCode #1.#2.#3!{%
+ \begingroup
+ \aftergroup\edef \aftergroup\!ttemp \aftergroup{%
+ \aftergroup[%
+ \!taCountA #1
+ \!thLoop
+ \ifnum \!taCountA>0
+ \advance\!taCountA -1
+ \aftergroup0
+ \repeat
+ \def\!ttemp{#3}%
+ \ifx\!ttemp \empty
+ \else
+ \aftergroup.
+ \!taCountA #2
+ \!thLoop
+ \ifnum \!taCountA>0
+ \advance\!taCountA -1
+ \aftergroup0
+ \repeat
+ \fi
+ \aftergroup]\aftergroup}%
+ \endgroup\relax
+ \!thx\!tnGetArgument\!ttemp}
+
+% GET ARGUMENT: [<sample left field> <optional .<sample right field>>
+\def\!tnGetArgument[#1]{%
+ \!tnMakeNumericTemplate\!tnStyle#1..!}
+
+% MAKE NUMERIC TEMPLATE
+\def\!tnMakeNumericTemplate#1#2.#3.#4!{% #1=<empty> or $
+ \def\!ttemp{#4}%
+ \ifx\!ttemp\empty
+ \!taDimenC=0pt
+ \else
+ \setbox0=\hbox{\m@th #1.#3#1}%
+ \!taDimenC=\wd0
+ \fi
+ \setbox0 =\hbox{\m@th #1#2#1}%
+ \!thToksEdef\!taDataColumnTemplate={%
+ \noexpand\!tnSetNumericItem
+ {\the\wd0 }%
+ {\the\!taDimenC}%
+ {#1}%
+ \the\!taDataColumnTemplate} % Might have tabskip glue in here
+ \ReadFormatKeys}
+
+% SET NUMERIC ITEM
+\def\!tnSetNumericItem #1#2#3#4 {% NOTE THE BLANK
+ \!tnSetNumericItemA {#1}{#2}{#3}#4..!}
+
+\def\!tnSetNumericItemA #1#2#3#4.#5.#6!{%
+ \def\!ttemp{#6}%
+ \hbox to #1{\hss \m@th #3#4#3}%
+ \hbox to #2{%
+ \ifx\!ttemp\empty
+ \else
+ \m@th #3.#5#3%
+ \fi
+ \hss}}
+
+
+
+% *********************************************************************
+% SECTION S: STRUTS
+% *********************************************************************
+
+% The following are in ALLOCATIONS
+ %\newdimen\StrutUnit (normal value \normalbaselineskip / 11)
+ %\newcount\StrutHeightFactor (normal value 8)
+ %\newcount\StrutDepthFactor (normal value 3)
+
+% MAKE STRUT OF SPECIFIED HEIGHT AND DIMENSION
+% \MakeStrut <height><depth>; height and depth are <dimen>'s
+\def\MakeStrut#1#2{%
+ \vrule width0pt height #1 depth #2}
+
+% STANDARD VERTICAL STRUT
+% Makes a strut of height=StrutHeightFactor*StrutUnit
+% depth =StrutDepthFactor *StrutUnit
+\def\StandardTableStrut{%
+ \MakeStrut{\StrutHeightFactor\StrutUnit}
+ {\StrutDepthFactor\StrutUnit}}
+
+
+% STANDARD VERTICAL STRUT, WITH EXTRA HEIGHT/DEPTH
+% \AugmentedTableStrut<multiple for extra height><multiple for extra depth>
+% makes a strut of height=(StrutHeightFactor+#1)*StrutUnit
+% depth =(StrutDepthFactor+#2)*StrutUnit
+\def\AugmentedTableStrut#1#2{%
+ \dimen@=\StrutHeightFactor\StrutUnit
+ \advance\dimen@ #1\StrutUnit
+ \dimen@ii=\StrutDepthFactor\StrutUnit
+ \advance\dimen@ii #2\StrutUnit
+ \MakeStrut{\dimen@}{\dimen@ii}}
+
+
+% ENLARGE<extra height><extra depth><original>
+% Enlarges "original" by extra height and extra depth.
+% Extra height and extra depth are <dimen>'s.
+% Works for various math styles, and takes into account
+% \spacefactor in horizontal mode
+\def\Enlarge#1#2{% 3rd argument is picked up later
+ % #1=extra height
+ % #2=extra depth
+ \!taDimenA=#1\relax
+ \!taDimenB=#2\relax
+ \let\!TsSpaceFactor=\empty
+ \ifmmode
+ \!thx \mathpalette
+ \!thx \!TsEnlargeMath
+ \else
+ \!thx \!TsEnlargeOther
+ \fi}
+
+\def\!TsEnlargeOther#1{%
+ \ifhmode
+ \setbox\z@=\hbox{#1%
+ \xdef\!TsSpaceFactor{\spacefactor=\the\spacefactor}}%
+ \else
+ \setbox\z@=\hbox{#1}%
+ \fi
+ \!TsFinishEnlarge}
+
+\def\!TsEnlargeMath#1#2{%
+ \setbox\z@=\hbox{$\m@th#1{#2}$}%
+ \!TsFinishEnlarge}
+
+\def\!TsFinishEnlarge{%
+ \dimen@=\ht\z@
+ \advance \dimen@ \!taDimenA
+ \ht\z@=\dimen@
+ \dimen@=\dp\z@
+ \advance \dimen@ \!taDimenB
+ \dp\z@=\dimen@
+ \box\z@ \!TsSpaceFactor{}}
+
+
+% ENLARGE BY MULTIPLES OF StrutUnit
+% \enlarge<multiple for extra height><multiple for extra depth><original>
+% Enlarges by (multiple for extra heigth)*StrutUnit
+% and (multiple for extra depth) *StrutUnit
+\def\enlarge#1#2{% 3rd argument is picked up later
+ \Enlarge{#1\StrutUnit}{#2\StrutUnit}}
+
+
+% OPENUP#1#2: increases strut height and depth factors by #1 and #2.
+\def\OpenUp#1#2{%
+ \advance \StrutHeightFactor #1\relax
+ \advance \StrutDepthFactor #2\relax}
+
+
+
+% *********************************************************************
+% SECTION T: TABLES
+% *********************************************************************
+
+% Table-making is initiated by \BeginTable. After processing that
+% command, TeX absorbs the instructions in the prologue to the table
+% until it gets to \BeginFormat. \BeginFormat sets up the preamble
+% for the \halign that will be used to create the table. \EndFormat
+% initiates the \halign-ment, which is terminated by \EndTable.
+
+
+% *********************************************************************
+% BEGIN TABLE, (DO HALIGN), END TABLE
+% *********************************************************************
+% BEGIN TABLE
+\def\BeginTable{%
+ \futurelet\!tnext\!ttBeginTable}
+
+\def\!ttBeginTable{%
+ \ifx [\!tnext
+ \def\!tnext{\!ttBeginTableA}%
+ \else
+ \def\!tnext{\!ttBeginTableA[c]}%
+ \fi
+ \!tnext}
+
+\def\!ttBeginTableA[#1]{%
+ \if #1u% % "unboxed" table
+ \ifmmode
+ \def\!ttEndTable{% % user had better be in display math mode
+ \relax}% % and have only one table at the outer level
+ \else % user had better be in vertical mode
+ \bgroup
+ \def\!ttEndTable{%
+ \egroup}%
+ \fi
+ \else
+ \hbox\bgroup $
+ \def\!ttEndTable{%
+ \egroup % for the \vtop, \vbox, or \vcenter, yet to come
+ $% for math mode
+ \egroup}% for the \hbox
+ \if #1t%
+ \vtop
+ \else
+ \if #1b%
+ \vbox
+ \else
+ \vcenter % math mode was essential for this
+ \fi
+ \fi
+ \bgroup % for the \vtop, \vbox, or \vcenter
+ \fi
+ \advance\!taRecursionLevel 1 % RecursionLevel governs initialization
+ \let\!ttRightGlue=\relax % This may be changed by \JustCenter, etc
+ \everycr={}
+ \ifnum \!taRecursionLevel=1
+ \!ttInitializeTable
+ \fi}
+
+% INITIALIZE TABLE
+\bgroup
+ \catcode`\|=13
+ \catcode`\"=13
+ \catcode`\~=13
+ \gdef\!ttInitializeTable{%
+ \let\!ttTie=~ % Meanings of ~ and \- are
+ \let\!ttDH=\- % restored by \BeginTableParBox
+ \catcode`\|=\active
+ \catcode`\"=\active
+ \catcode`\~=\active
+ \def |{\unskip\!ttRightGlue&&}% Use rule-column template
+ \def\|{\unskip\!ttRightGlue&\omit\!ttAlternateVrule}%
+ % Override rule-column template
+ \def"{\unskip\!ttRightGlue&\omit&}% Omit rule-column template
+ \def~{\kern .5em}% ~ now has the width of a digit
+ \def\\{\!ttEndOfRow}%
+ \def\-{\!ttShortHrule}%
+ \def\={\!ttLongHrule}%
+ \def\_{\!ttFullHrule}%
+ \def\Left##1{##1\hfill\null}% \null prevents \unskip from
+ \def\Center##1{\hfill##1\hfill\null}% killing the \hfill
+ \def\Right##1{\hfill##1}%
+ \def\use{\!ttuse}%
+ \def\Use{\!ttUse}%
+ \the\EveryTable}
+\egroup
+
+\let\!ttRightGlue=\relax % This may be changed, in a group, by
+ % \JustCenter, etc
+
+% DO HALIGN: Invoked by END FORMAT (or the key ".")
+\def\!ttDoHalign{%
+ \baselineskip=0pt \lineskiplimit=0pt \lineskip=0pt %
+ \tabskip=0pt
+ \halign \the\!taTableSpread \bgroup
+ \span\the\!taPreamble
+ \ifx \!tfRowOfWidths \empty
+ \else
+ \!tfRowOfWidths \cr %
+ \fi}
+
+% END TABLE
+\def\EndTable{%
+ \egroup % finishes the \halign
+ \!ttEndTable}% closes off the table envirnoment set up by \BeginTable
+
+
+% *********************************************************************
+% END OF ROW PROCESSING
+% *********************************************************************
+
+% END OF ROW: When followed by
+% 0, inserts no strut
+% +, inserts an AugmentedTableStrut (with <x-height> and <x-depth>
+% as arguments
+% anything else, inserts a StandardTableStrut,
+% and finished off the row with a \cr.
+\def\!ttEndOfRow{%
+ \futurelet\!tnext\!ttTestForBlank}
+
+% TEST FOR BLANK
+\def\!ttTestForBlank{%
+% \!thMessage{At Test For Blank: \meaning\!tnext}
+ \ifx \!tnext\!thSpaceToken % the "usual" case
+ \!thx\!ttDoStandard
+ \else
+ \!thx\!ttTestForZero
+ \fi}
+
+% TEST FOR ZERO
+\def\!ttTestForZero{%
+ \ifx 0\!tnext
+ \!thx \!ttDoZero
+ \else
+ \!thx \!ttTestForPlus
+ \fi}
+
+% TEST FOR PLUS
+\def\!ttTestForPlus{%
+ \ifx +\!tnext
+ \!thx \!ttDoPlus
+ \else
+ \!thx \!ttDoStandard
+ \fi}
+
+% DO ZERO: No strut
+\def\!ttDoZero#1{% #1 eats the 0
+ \cr}
+
+% DO PLUS: Insert "Extra" strut; #2=extra height, #3=extra depth, both
+% as integers (units of \StrutUnit)
+\def\!ttDoPlus#1#2#3{% #1 eats the +
+ \AugmentedTableStrut{#2}{#3}%
+ \cr}
+
+% DO STANDARD: Insert standard table strut
+\def\!ttDoStandard{%
+ \StandardTableStrut
+ \cr}
+
+
+% *********************************************************************
+% ALTERNATE VRULES
+% *********************************************************************
+
+% A '\|' can appear in a rule-column in place of a '|', '"', or '&'.
+
+% If '\|' is immediately followed by a blank, a string of digits, or
+% (...) [... had better be a <dimen>], a \vrule is placed in the
+% rule column; the thickness of the \vrule follows TABLE's usual
+% conventions. Be sure to put a blank after a string of digits.
+
+% If '\|' is immediately followed by a '*', a user-specified default
+% "pseudo"-rule is placed in the rule column. This P.R. is specified
+% by the parameterless macro \PseudoVrule. For example,
+% to place a "double rule" into a rule column, you could make the definition
+% \def\PseudoVrule{\hfil\vrule \hskip1pt \vrule\hfil}
+
+% If none of the above cases applies, a non-space token follows '\|':
+% that token is placed in the rule-column. To put a '*' in a
+% rule-column, enter '\|{*}'. '\|\PseudoVrule' has the same effect
+% as '\|*'.
+
+% ALTERNATE VRULE
+\def\!ttAlternateVrule{%
+ \!tgGetValue{\!ttAVTestForCode}} % AV == Alternate Vrule
+
+% TEST FOR CODE (2)
+\def\!ttAVTestForCode{%
+ \ifnum \!tgCode=2 % (...) follows "\|"
+ \!thx\!ttInsertVrule % \InsertVrule ends with "&"
+ \else
+ \!thx\!ttAVTestForEmpty
+ \fi}
+
+% TEST FOR EMPTY (VALUE)
+\def\!ttAVTestForEmpty{%
+ \ifx \!tgValue\empty % non-digit after "\|"
+ \!thx\!ttAVTestForBlank
+ \else
+ \!thx\!ttInsertVrule % integer after "\|"
+ \fi}
+
+% TEST FOR BLANK
+\def\!ttAVTestForBlank{%
+ \ifx \!ttemp\!thSpaceToken % blank after "\|"
+ \!thx\!ttInsertVrule
+ \else
+ \!thx\!ttAVTestForStar
+ \fi}
+
+% TEST FOR STAR
+\def\!ttAVTestForStar{%
+ \ifx *\!ttemp % "*" after "\|"
+ \!thx\!ttInsertDefaultPR % PR == pseudo-rule
+ \else
+ \!thx\!ttGetPseudoVrule % "Anything else" after "\|"
+ \fi}
+
+% INSERT VRULE
+\def\!ttInsertVrule{%
+ \hfil
+ \vrule \!thWidth
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \LineThicknessFactor
+ \else
+ \!tgValue
+ \fi
+ \LineThicknessUnit
+ \else
+ \!tgValue
+ \fi
+ \hfil
+ &}
+
+% INSERT DEFAULT PSEUDO-RULE
+\def\!ttInsertDefaultPR*{%
+ \PseudoVrule % User-specified default pseudo-rule
+ &}
+
+% GET PSEUDO-RULE
+\def\!ttGetPseudoVrule#1{%
+ \toks0={#1}%
+ #1&}
+
+% DEFAULT PSEUDO-RULE
+\def\PseudoVrule{}
+
+
+% *********************************************************************
+% USE: Version of \multispan for rule-&-column tables
+% *********************************************************************
+
+% USE
+% \use <number> spans the next <number> data columns.
+\def\!ttuse#1{%
+ \ifnum #1>\@ne
+ \omit
+ \mscount=#1 % \mscount is in Plain
+ \advance\mscount by \m@ne
+ \advance\mscount by \mscount
+ \!thLoop
+ \ifnum\mscount>\@ne
+ \sp@n % from Plain (\span\omit \advance\mscount\m@ne)
+ \repeat
+ \span
+ \fi}
+
+\def\!ttUse#1[{%
+ \!ttuse{#1}%
+ \ReFormat[}
+
+
+% *********************************************************************
+% HRULES
+% *********************************************************************
+
+% FULL HORIZONTAL RULE: Draws a rule across the table,
+% using \noalign{\hrule}
+\def\!ttFullHrule{%
+ \noalign
+ \bgroup
+ \!tgGetValue{\!ttFullHruleA}}
+
+\def\!ttFullHruleA{%
+ \!ttGetHalfRuleThickness % Sets \dimen0 to half of specified thickness
+ \hrule \!thHeight \dimen0 \!thDepth \dimen0
+ \penalty0 % so can break an ``unboxed'' table after a horizontal rule.
+ \egroup} % ends the \noalign
+
+% SHORT HORIZONTAL RULE: Draws a rule across 1 (or more) columns,
+% using \leaders; this rule doesn't extend across the neighboring
+% tabskip glues to join up with adjacent rule columns. By contrast
+% the LONG HORIZONTAL RULE below does just that.
+\def\!ttShortHrule{%
+ \omit
+ \!tgGetValue{\!ttShortHruleA}}
+
+\def\!ttShortHruleA{%
+ \!ttGetHalfRuleThickness % Sets \dimen0 to half of specified thickness
+ \leaders \hrule \!thHeight \dimen0 \!thDepth \dimen0 \hfill
+ \null % prevents an \unskip from annihilating the \leaders
+ \ignorespaces}
+
+% LONG HORIZONTAL RULE: This rule requires special coding.
+% It must be preceded and followed by '&', instead of the usual
+% '|' or '"'. However, '\_' can follow '\use' in the usual manner.
+% And in fact, to insert long-rules in two or more contiguous columns,
+% '\use' MUST be used with an argument = total number of columns involved.
+\def\!ttLongHrule{%
+ \omit\span\omit\span \!ttShortHrule}
+
+% GET RULE THICKNESS
+\def\!ttGetHalfRuleThickness{%
+ \dimen0 =
+ \ifnum \!tgCode=1
+ \ifx \!tgValue\empty
+ \LineThicknessFactor
+ \else
+ \!tgValue % user-specified integer
+ \fi
+ \LineThicknessUnit
+ \else
+ \!tgValue % user-specified dimension
+ \fi
+ \divide\dimen0 2 }
+
+
+% *********************************************************************
+% STRETCHING AND SHRINKING A TABLE
+% *********************************************************************
+
+% SET TABLE TO WIDTH <dimen>
+\def\SetTableToWidth#1{%
+ \!taTableSpread={to #1}}
+
+% WIDEN TABLE BY <dimen>
+\def\WidenTableBy#1{%
+ \ifdim #1=0pt
+ \!taTableSpread={}%
+ \else
+ \!taTableSpread={spread #1}%
+ \fi}
+
+\def\Expand{%
+ \SetTableToWidth{\hsize}}%
+
+\def\LongLines{%
+ \LeftTabskip =0pt plus 1fill
+ \RightTabskip=\LeftTabskip
+ \Expand}
+
+
+% *********************************************************************
+% REPOSITIONING COMMANDS (\JUSTLEFT, etc.)
+% *********************************************************************
+
+\def\JustLeft{%
+ \omit \let\!ttRightGlue=\hfill}
+\def\JustCenter{%
+ \omit \hfill\null \let\!ttRightGlue=\hfill}
+\def\JustRight{%
+ \omit \hfill\null}
+
+
+% *********************************************************************
+% Restore meaning of \\, and reset category codes
+% *********************************************************************
+\let\\=\!tacr
+\catcode`\!=12
+\catcode`\@=12
+
+
diff --git a/tex/context/base/texutil.exe b/tex/context/base/texutil.exe Binary files differnew file mode 100644 index 000000000..45ca0cf2d --- /dev/null +++ b/tex/context/base/texutil.exe |