summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/texexec.ini11
-rw-r--r--doc/context/base/readme.pdfbin0 -> 125050 bytes
-rw-r--r--tex/context/base/colo-ini.tex3029
-rw-r--r--tex/context/base/colo-pra.tex67
-rw-r--r--tex/context/base/colo-rgb.tex732
-rw-r--r--tex/context/base/cont-cz.tex35
-rw-r--r--tex/context/base/cont-de.tex59
-rw-r--r--tex/context/base/cont-en.tex58
-rw-r--r--tex/context/base/cont-fil.tex46
-rw-r--r--tex/context/base/cont-log.tex284
-rw-r--r--tex/context/base/cont-new.tex47
-rw-r--r--tex/context/base/cont-nl.tex57
-rw-r--r--tex/context/base/cont-old.tex98
-rw-r--r--tex/context/base/cont-uk.tex36
-rw-r--r--tex/context/base/cont-usr.tex115
-rw-r--r--tex/context/base/context.rme96
-rw-r--r--tex/context/base/context.tex483
-rw-r--r--tex/context/base/core-01a.tex33770
-rw-r--r--tex/context/base/core-01b.tex2838
-rw-r--r--tex/context/base/core-01c.tex1869
-rw-r--r--tex/context/base/core-01d.tex4546
-rw-r--r--tex/context/base/core-01e.tex845
-rw-r--r--tex/context/base/core-02a.tex382
-rw-r--r--tex/context/base/core-02b.tex343
-rw-r--r--tex/context/base/core-02d.tex99
-rw-r--r--tex/context/base/core-con.tex1147
-rw-r--r--tex/context/base/core-fig.tex1295
-rw-r--r--tex/context/base/core-fil.tex277
-rw-r--r--tex/context/base/core-fld.tex857
-rw-r--r--tex/context/base/core-fnt.tex765
-rw-r--r--tex/context/base/core-gen.tex354
-rw-r--r--tex/context/base/core-grd.tex1200
-rw-r--r--tex/context/base/core-int.tex426
-rw-r--r--tex/context/base/core-mak.tex123
-rw-r--r--tex/context/base/core-mat.tex147
-rw-r--r--tex/context/base/core-mis.tex40
-rw-r--r--tex/context/base/core-mul.tex2844
-rw-r--r--tex/context/base/core-nav.tex678
-rw-r--r--tex/context/base/core-new.tex122
-rw-r--r--tex/context/base/core-not.tex1276
-rw-r--r--tex/context/base/core-obj.tex339
-rw-r--r--tex/context/base/core-pag.tex568
-rw-r--r--tex/context/base/core-ref.tex4554
-rw-r--r--tex/context/base/core-rul.tex4832
-rw-r--r--tex/context/base/core-tab.tex4275
-rw-r--r--tex/context/base/core-tbl.tex638
-rw-r--r--tex/context/base/core-var.tex83
-rw-r--r--tex/context/base/core-ver.tex1409
-rw-r--r--tex/context/base/core-vis.tex1233
-rw-r--r--tex/context/base/docs-ini.tex81
-rw-r--r--tex/context/base/enco-ans.tex165
-rw-r--r--tex/context/base/enco-ibm.tex107
-rw-r--r--tex/context/base/enco-il2.tex175
-rw-r--r--tex/context/base/enco-ini.tex648
-rw-r--r--tex/context/base/enco-pdf.tex83
-rw-r--r--tex/context/base/enco-win.tex123
-rw-r--r--tex/context/base/font-ams.tex1003
-rw-r--r--tex/context/base/font-ber.tex46
-rw-r--r--tex/context/base/font-cmr.tex1040
-rw-r--r--tex/context/base/font-con.tex123
-rw-r--r--tex/context/base/font-csr.tex48
-rw-r--r--tex/context/base/font-def.tex66
-rw-r--r--tex/context/base/font-eul.tex347
-rw-r--r--tex/context/base/font-fil.tex102
-rw-r--r--tex/context/base/font-ibm.tex109
-rw-r--r--tex/context/base/font-ini.tex5585
-rw-r--r--tex/context/base/font-kb.tex38
-rw-r--r--tex/context/base/font-lbr.tex650
-rw-r--r--tex/context/base/font-map.tex119
-rw-r--r--tex/context/base/font-pcr.tex74
-rw-r--r--tex/context/base/font-phv.tex75
-rw-r--r--tex/context/base/font-pos.tex35
-rw-r--r--tex/context/base/font-ptm.tex75
-rw-r--r--tex/context/base/font-unk.tex211
-rw-r--r--tex/context/base/font-win.tex126
-rw-r--r--tex/context/base/java-ans.tex27
-rw-r--r--tex/context/base/java-fil.tex33
-rw-r--r--tex/context/base/java-fld.tex259
-rw-r--r--tex/context/base/java-ini.tex636
-rw-r--r--tex/context/base/knuth.tex16
-rw-r--r--tex/context/base/lang-alt.tex175
-rw-r--r--tex/context/base/lang-ana.tex41
-rw-r--r--tex/context/base/lang-art.tex45
-rw-r--r--tex/context/base/lang-bal.tex45
-rw-r--r--tex/context/base/lang-cel.tex45
-rw-r--r--tex/context/base/lang-cz.hyp10
-rw-r--r--tex/context/base/lang-cz.pat3651
-rw-r--r--tex/context/base/lang-da.pat2308
-rw-r--r--tex/context/base/lang-de.pat3623
-rw-r--r--tex/context/base/lang-deo.pat848
-rw-r--r--tex/context/base/lang-en.pat8935
-rw-r--r--tex/context/base/lang-fr.pat1021
-rw-r--r--tex/context/base/lang-ger.tex1122
-rw-r--r--tex/context/base/lang-grk.tex45
-rw-r--r--tex/context/base/lang-hnl.tex65
-rw-r--r--tex/context/base/lang-ind.tex45
-rw-r--r--tex/context/base/lang-ini.tex1126
-rw-r--r--tex/context/base/lang-it.pat1038
-rw-r--r--tex/context/base/lang-ita.tex571
-rw-r--r--tex/context/base/lang-lab.tex375
-rw-r--r--tex/context/base/lang-nl.hyp17
-rw-r--r--tex/context/base/lang-nl.pat15893
-rw-r--r--tex/context/base/lang-nlx.pat16061
-rw-r--r--tex/context/base/lang-sk.hyp10
-rw-r--r--tex/context/base/lang-sk.pat2507
-rw-r--r--tex/context/base/lang-sla.tex297
-rw-r--r--tex/context/base/lang-sp.pat301
-rw-r--r--tex/context/base/lang-ura.tex171
-rw-r--r--tex/context/base/list-ini.tex79
-rw-r--r--tex/context/base/m-ch-de.sty1
-rw-r--r--tex/context/base/m-ch-de.tex10
-rw-r--r--tex/context/base/m-ch-en.sty1
-rw-r--r--tex/context/base/m-ch-en.tex10
-rw-r--r--tex/context/base/m-ch-nl.sty1
-rw-r--r--tex/context/base/m-ch-nl.tex10
-rw-r--r--tex/context/base/m-chemic.tex21
-rw-r--r--tex/context/base/m-pictex.tex234
-rw-r--r--tex/context/base/m-pstric.tex46
-rw-r--r--tex/context/base/m-units.tex692
-rw-r--r--tex/context/base/materie.tex50
-rw-r--r--tex/context/base/modu-abr.tex7
-rw-r--r--tex/context/base/modu-arg.tex75
-rw-r--r--tex/context/base/modu-env.tex367
-rw-r--r--tex/context/base/modu-mod.tex11
-rw-r--r--tex/context/base/modu-opt.tex1
-rw-r--r--tex/context/base/modu-pap.tex112
-rw-r--r--tex/context/base/modu-pra.tex14
-rw-r--r--tex/context/base/mult-com.tex2607
-rw-r--r--tex/context/base/mult-con.tex1737
-rw-r--r--tex/context/base/mult-ini.tex2441
-rw-r--r--tex/context/base/mult-sys.tex1185
-rw-r--r--tex/context/base/patch.tex60
-rw-r--r--tex/context/base/plain.tex1236
-rw-r--r--tex/context/base/ppchtex.noc230
-rw-r--r--tex/context/base/ppchtex.tex3272
-rw-r--r--tex/context/base/reich.tex11
-rw-r--r--tex/context/base/s-abr-01.tex147
-rw-r--r--tex/context/base/s-abr-02.tex24
-rw-r--r--tex/context/base/s-faq-00.tex93
-rw-r--r--tex/context/base/s-faq-01.tex178
-rw-r--r--tex/context/base/s-faq-02.tex54
-rw-r--r--tex/context/base/s-faq-03.tex54
-rw-r--r--tex/context/base/s-map-01.tex613
-rw-r--r--tex/context/base/s-pre-01.tex374
-rw-r--r--tex/context/base/s-pre-02.tex381
-rw-r--r--tex/context/base/setupa.tex685
-rw-r--r--tex/context/base/setupb.tex7862
-rw-r--r--tex/context/base/spec-dvi.tex67
-rw-r--r--tex/context/base/spec-fdf.tex1663
-rw-r--r--tex/context/base/spec-ini.tex2170
-rw-r--r--tex/context/base/spec-mis.tex226
-rw-r--r--tex/context/base/spec-pdf.tex975
-rw-r--r--tex/context/base/spec-ps.tex393
-rw-r--r--tex/context/base/spec-tpd.tex1331
-rw-r--r--tex/context/base/spec-tr.tex183
-rw-r--r--tex/context/base/spec-win.tex184
-rw-r--r--tex/context/base/spec-yy.tex146
-rw-r--r--tex/context/base/supp-box.tex2668
-rw-r--r--tex/context/base/supp-eps.tex129
-rw-r--r--tex/context/base/supp-fil.tex845
-rw-r--r--tex/context/base/supp-fun.tex875
-rw-r--r--tex/context/base/supp-ini.tex37
-rw-r--r--tex/context/base/supp-lan.tex1614
-rw-r--r--tex/context/base/supp-mat.tex157
-rw-r--r--tex/context/base/supp-mis.tex451
-rw-r--r--tex/context/base/supp-mps.tex1910
-rw-r--r--tex/context/base/supp-mrk.tex801
-rw-r--r--tex/context/base/supp-num.tex201
-rw-r--r--tex/context/base/supp-pdf.tex2476
-rw-r--r--tex/context/base/supp-spe.tex335
-rw-r--r--tex/context/base/supp-tpi.tex681
-rw-r--r--tex/context/base/supp-vis.tex3791
-rw-r--r--tex/context/base/symb-ini.tex336
-rw-r--r--tex/context/base/syst-eet.tex270
-rw-r--r--tex/context/base/syst-ext.tex5170
-rw-r--r--tex/context/base/syst-gen.tex5938
-rw-r--r--tex/context/base/syst-new.tex349
-rw-r--r--tex/context/base/syst-tex.tex423
-rw-r--r--tex/context/base/table.tex3920
-rw-r--r--tex/context/base/texexec.pl624
-rw-r--r--tex/context/base/texexec.rme13
-rw-r--r--tex/context/base/texutil.pl3736
-rw-r--r--tex/context/base/thrd-ran.tex141
-rw-r--r--tex/context/base/tufte.tex13
-rw-r--r--tex/context/base/verb-ini.tex3174
-rw-r--r--tex/context/base/verb-mp.tex775
-rw-r--r--tex/context/base/verb-pl.tex908
-rw-r--r--tex/context/base/verb-tex.tex572
-rw-r--r--tex/context/config/cont-de.ini3
-rw-r--r--tex/context/config/cont-en.ini3
-rw-r--r--tex/context/config/cont-nl.ini3
-rw-r--r--tex/context/config/context.ini3
192 files changed, 131974 insertions, 95738 deletions
diff --git a/context/texexec.ini b/context/texexec.ini
new file mode 100644
index 000000000..2400b1353
--- /dev/null
+++ b/context/texexec.ini
@@ -0,0 +1,11 @@
+# sample 'texexec.ini' file
+#
+# set UsedInterfaces to nl,en
+# set UserInterface to nl
+set TeXExecutable to pdftex
+# set TeXFormatFlag to \&
+# set TeXVirginFlag to -ini
+# set TeXFormatPath to t:/tex/web2c/fmt/
+# set ConTeXtPath to t:/pragma/sources/
+# set SetupPath to t:/pragma/sources/
+# set TeXScriptsPath to t:/pragma/programs/
diff --git a/doc/context/base/readme.pdf b/doc/context/base/readme.pdf
new file mode 100644
index 000000000..18470e2b9
--- /dev/null
+++ b/doc/context/base/readme.pdf
Binary files differ
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 62723c3eb..f3516e800 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -1,1496 +1,1533 @@
-%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}{S:s}
-%D \stoptypen
-%D
-%D Gray scales are specified with the \type{s} parameter,
-%D where the is derived from screen.
-
-\def\colorlist{}
-
-\def\@@cl@@z{0}
-\def\@@cl@@o{1}
-
-\def\definecolor%
- {\dodoubleargument\dodefinecolor}
-
-\def\dodefinecolor[#1][#2]%
- {% beware
-\saveglobal
- \addtocommalist{#1}\colorlist
-\restoreglobal
- \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\let\@@cl@@s=\@@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@@k}{\@@cl@@z\@@cl@@z\@@cl@@z\@@cl@@z}
- {\doifelse{\@@cl@@s}{\@@cl@@z}
- {\showmessage{\m!colors}{8}{{[#2]},#1}%
- \redoglobal\setevalue{\??cr#1}{S:\@@cl@@z}}
- {\redoglobal\setevalue{\??cr#1}{S:\@@cl@@s}}}
- {\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 \unprotect {\tttf \f!colorprefix}.
-%D Loading such a file is done by \protect
-%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%
- {\makeshortfilename[\f!colorprefix\truefilename{##1}]%
- \readsysfile{\shortfilename}%
- {\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 \som reduce \kap{CMY} components to \kap{K}
-%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@@s
- \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@@s
- \fi\fi\fi
- \egroup}
-
-\def\dostartcolormodeS#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@@s
-%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\convertRGBtoCMYK#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@@s{\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{\@@clreductie}{\v!ja}
- {\reduceCMYKtrue}
- {\reduceCMYKfalse}%
- \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}%
- \processaction
- [\@@clconversie]
- [ \v!ja=>\preferGRAYtrue,
- \v!nee=>\preferGRAYfalse,
- \v!altijd=>\preferGRAYtrue
- \RGBsupportedfalse
- \CMYKsupportedfalse,
- \s!default=>\preferGRAYfalse,
- \s!unknown=>\preferGRAYfalse]%
- \ifRGBsupported
- \converttoGRAYfalse
- \forcegrayMPcolorsfalse
- \else\ifCMYKsupported
- \converttoGRAYfalse
- \forcegrayMPcolorsfalse
- \convertMPcolorstrue
- \ifreduceCMYK
- \reduceMPcolorstrue
- \fi
- \else
- \converttoGRAYtrue
- \forcegrayMPcolorstrue
- \convertMPcolorsfalse
- \reduceMPcolorsfalse
- \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
- \forcegrayMPcolorstrue]}
-
-%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.
-
-%D \starttypen
-%D \def\startcolorpage%
-%D {\bgroup
-%D \let\docolormark=\gobbleoneargument
-%D \edef\savedcolorlevel{\the\colorlevel}%
-%D \ifnum\colorlevel>0
-%D \stopcolormode
-%D \fi
-%D \global\colorlevel=0\relax}
-%D
-%D \def\stopcolorpage%
-%D {\global\colorlevel=\savedcolorlevel\relax
-%D \egroup}
-%D \stoptypen
-
-%D The next alternative makes (simple) color separation more
-%D easy:
-
-\def\startcolorpage%
- {\bgroup
- \let\docolormark=\gobbleoneargument
- \edef\savedcolorlevel{\the\colorlevel}%
- \localstartcolor[black]%
- \global\colorlevel=0\relax}
-
-\def\stopcolorpage%
- {\localstopcolor
- \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\doformatcolorS#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@@s}
-
-\def\doformatgrayC#1:#2:#3:#4\od%
- {\convertCMYKtoGRAY{#1}{#2}{#3}{#4}%
- \dodoformatcolor\@@cl@@s}
-
-\def\doformatgrayS#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).
-%D
-%D When needed, one can copy a palet by saying:
-%D
-%D \starttypen
-%D \definepalet [TEXcolorpretty] [colorpretty]
-%D \stoptypen
-%D
-%D This saves us some typing in for instance the modules that
-%D deal with pretty verbatim typesetting.
-
-\def\definepalet%
- {\dodoubleargument\dodefinepalet}
-
-\def\dodefinepalet[#1][#2]%
- {\doifassignmentelse{#2}
- {\setvalue{\??pa#1}{}%
- \setevalue{\??pa\??pa#1}{#2}%
- \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}{S:0}}}%
- \def\dododefinepalet##1%
- {\dodododefinepalet[##1]}%
- \processcommalist[#2]\dododefinepalet}
- {\doifdefined{\??pa#2}
- {\expanded{\dodefinepalet[#1][\getvalue{\??pa\??pa#2}]}}}}
-
-%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\showverticalpalet[#1][#2]%
- {\localvbox
- {\offinterlineskip
- \setuppalet[#1]
- \def\rule%
- {\vrule\!!width3em\!!height\ht\strutbox\!!depth\dp\strutbox}
- \tabskip\!!zeropoint
- \def\doshowpalet##1%
- {\doifinsetelse{\v!nummer}{#2}{##1\hskip.5em}{}&
- \color[##1]{\rule}\gray[##1]{\rule}&
- \doifinset{\v!waarde}{#2}{\hskip.5em\colorvalue{##1}}\crcr}
- \halign
- {\hss##&\hss##\hss&##\cr
- &\doifinset{\v!naam}{#2}{\strut#1}&\cr%
- \processpalet[#1]\doshowpalet\crcr}}}
-
-\def\showhorizontalpalet[#1][#2]%
- {\localvbox
- {\offinterlineskip
- \setuppalet[#1]
- \tabskip\!!zeropoint
- \!!widtha=\!!zeropoint
- \doifinset{\v!nummer}{#2}
- {\def\doshowpalet##1%
- {\setbox0=\hbox{##1}%
- \ifdim\!!widtha<\wd0\!!widtha=\wd0\fi}%
- \processpalet[#1]\doshowpalet}%
- \advance\!!widtha by 1em
- \ifdim\!!widtha<5em
- \!!widtha=5em
- \fi
- \halign
- {##&&\hbox to \!!widtha{\hss##\hss}\cr
- \doifinset{\v!nummer}{#2}
- {\def\doshowpalet##1{&\strut##1}%
- \processpalet[#1]\doshowpalet}\cr
- \doifinset{\v!naam}{#2}{#1\hskip.5em}%
- \def\doshowpalet##1%
- {&\color[##1]{\vrule\!!width\!!widtha\!!height\ht\strutbox\!!depth\!!zeropoint}}%
- \processpalet[#1]\doshowpalet\crcr
- \def\doshowpalet##1%
- {&\gray[##1]{\vrule\!!width\!!widtha\!!height\!!zeropoint\!!depth\dp\strutbox}}%
- \processpalet[#1]\doshowpalet\crcr
- \doifinset{\v!waarde}{#2}
- {\def\doshowpalet##1%
- {&\vbox
- {\hsize\!!widtha
- \vskip.25ex
- \everypar{\strut}
- \veryraggedcenter
- \let\colorformatseparator=\endgraf
- \colorvalue{##1}}}%
- \processpalet[#1]\doshowpalet}%
- \crcr}}}
-
-\def\processpalet[#1]%
- {\expanded{\globalprocesscommalist[\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{S},
- \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
- \setuppalet
- \tabskip\!!zeropoint
- \def\rule%
- {\vrule\!!width4em\!!height\ht\strutbox\!!depth\dp\strutbox}
- \def\colorformatseparator{\strut\cr}
- \def\dodoshowgroup##1%
- {\halign
- {\hss####\hss\cr
- \doifinset{\v!nummer}{#2}{\strut##1}\cr
- \color[#1:##1]{\vrule\!!width4em\!!height\ht\strutbox\!!depth\!!zeropoint}\cr
- \gray[#1:##1]{\vrule\!!width4em\!!height\!!zeropoint\!!depth\dp\strutbox}\cr
- \doifinset{\v!waarde}{#2}{\colorvalue{#1:##1}\strut}\crcr}}
- \def\doshowgroup##1%
- {\doifdefined{\??cr#1:##1}
- {\vbox{\dodoshowgroup{##1}}}}
- \hbox
- {\doifinset{\v!naam}{#2}
- {\strut
- \doifinsetelse{\v!waarde}{#2}
- {\raise3\lineheight\hbox{#1\hskip.5em}}
- {#1}%
- \hskip.5em}%
- \doshowgroup1\doshowgroup2\doshowgroup3\doshowgroup4%
- \doshowgroup5\doshowgroup6\doshowgroup7\doshowgroup8}}}
-
-\def\showverticalcolorgroup[#1][#2]%
- {\localvbox
- {\offinterlineskip
- \setuppalet
- \tabskip\!!zeropoint
- \def\rule%
- {\vrule\!!width2.5em\!!height\ht\strutbox\!!depth\dp\strutbox}
- \def\doshowgroup##1%
- {\doifdefined{\??cr#1:##1}
- {\doifinset{\v!nummer}{#2}{##1\hskip.5em}&
- \color[#1:##1]{\rule}\gray[#1:##1]{\rule}&
- \doifinset{\v!waarde}{#2}{\hskip.5em\colorvalue{#1:##1}}\crcr}}
- \halign
- {\hss##&\hss##\hss&##\hss\cr
- &\doifinset{\v!naam}{#2}{\strut#1}&\crcr
- \doshowgroup1\doshowgroup2\doshowgroup3\doshowgroup4%
- \doshowgroup5\doshowgroup6\doshowgroup7\doshowgroup8}}}
-
-%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 \macros
-%D {negativecolorbox}
-%D
-%D Sometimes, especially when we deal with typesetting
-%D devices, we want to reverse the color scheme. Instead of
-%D recalculating all those colors, we use a quick and dirty
-%D approach:
-%D
-%D \starttypen
-%D \negativecolorbox0
-%D \stoptypen
-%D
-%D will negate the colors in box zero.
-
-\def\negatecolorbox#1%
- {\setbox#1=\hbox
- {\dostartnegative
- \localstartcolor[white]%
- \vrule\!!height\ht#1\!!depth\dp#1\!!width\wd#1%
- \localstopcolor
- \hskip-\wd#1%
- \box#1\dostopnegative}}
-
-%D \macros
-%D {ifMPgraphics, MPcolor}
-%D
-%D A very special macro is \type{\MPcolor}. This one can be
-%D used to pass a \CONTEXT\ color to \METAPOST.
-%D
-%D \starttypen
-%D \MPcolor{my own red}
-%D \stoptypen
-%D
-%D This macro returns a \METAPOST\ triplet \type{(R,G,B)}.
-%D Only \kap{RGB} colors and gray scales are supported.
-
-\ifx\MPgraphicstrue\undefined
- \newif\ifMPgraphics\MPgraphicstrue
-\fi
-
-\def\MPcolor#1%
- {\ifMPgraphics
- \@EA\@EA\@EA\doMPcolor\csname\??cr#1\endcsname::::\end
- \else
- #1%
- \fi}
-
-\def\doMPcolor#1:#2:#3:#4:#5\end%
- {\if#1R(#2,#3,#4)\else\if#2G(#2,#2,#3)\else(1,1,1)\fi\fi}
-
-%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!reductie=\v!nee,
- \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
+%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 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}{S:s}
+%D \stoptypen
+%D
+%D Gray scales are specified with the \type{s} parameter,
+%D where the is derived from screen.
+
+\def\colorlist{}
+
+\def\@@cl@@z{0}
+\def\@@cl@@o{1}
+
+\def\definecolor%
+ {\dodoubleargument\dodefinecolor}
+
+\def\dodefinecolor[#1][#2]%
+ {% beware
+\saveglobal
+ \addtocommalist{#1}\colorlist
+\restoreglobal
+ \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\let\@@cl@@s=\@@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@@k}{\@@cl@@z\@@cl@@z\@@cl@@z\@@cl@@z}
+ {\doifelse{\@@cl@@s}{\@@cl@@z}
+ {\showmessage{\m!colors}{8}{{[#2]},#1}%
+ \redoglobal\setevalue{\??cr#1}{S:\@@cl@@z}}
+ {\redoglobal\setevalue{\??cr#1}{S:\@@cl@@s}}}
+ {\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 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 \unprotect {\tttf \f!colorprefix}.
+%D Loading such a file is done by \protect
+%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%
+ {\makeshortfilename[\f!colorprefix\truefilename{##1}]%
+ \readsysfile{\shortfilename}%
+ {\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 \som reduce \kap{CMY} components to \kap{K}
+%D \stopopsomming
+%D
+%D These options are communicated by means of:
+
+\newif\ifRGBsupported
+\newif\ifCMYKsupported
+\newif\ifconverttoGRAY
+\newif\ifpreferGRAY
+\newif\ifGRAYprefered
+\newif\ifreduceCMYK
+
+%D needs:
+
+% \newif\ifMPgraphics
+% \newif\ifinpagebody
+
+%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@@s
+ \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@@s
+ \fi\fi\fi
+ \egroup}
+
+\def\dostartcolormodeS#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@@s
+%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\convertRGBtoCMYK#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@@s{\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{\@@clreductie}{\v!ja}
+ {\reduceCMYKtrue}
+ {\reduceCMYKfalse}%
+ \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}%
+ \processaction
+ [\@@clconversie]
+ [ \v!ja=>\preferGRAYtrue,
+ \v!nee=>\preferGRAYfalse,
+ \v!altijd=>\preferGRAYtrue
+ \RGBsupportedfalse
+ \CMYKsupportedfalse,
+ \s!default=>\preferGRAYfalse,
+ \s!unknown=>\preferGRAYfalse]%
+ \ifRGBsupported
+ \converttoGRAYfalse
+ \forcegrayMPcolorsfalse
+ \else\ifCMYKsupported
+ \converttoGRAYfalse
+ \forcegrayMPcolorsfalse
+ \convertMPcolorstrue
+ \ifreduceCMYK
+ \reduceMPcolorstrue
+ \fi
+ \else
+ \converttoGRAYtrue
+ \forcegrayMPcolorstrue
+ \convertMPcolorsfalse
+ \reduceMPcolorsfalse
+ \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
+ \forcegrayMPcolorstrue]}
+
+%D \macros
+%D {doifcolorelse}
+%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 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 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
+
+%D We keep a positive color stack for foreground colors, and
+%D a negative one for backgrounds. Not that brilliant a
+%D solution, but it suits. The signs are swapped when the
+%D page ornaments are typeset.
+
+\def\@@colorplus {+}
+\def\@@colorminus{-}
+
+\def\dodoglobalstartcolor[#1]%
+ {\xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
+ \global\advance\colorlevel by \@@colorplus1
+ \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 \else
+ \xdef\currentcolor{\getvalue{\??cl\the\colorlevel C}}%
+ \debuggerinfo{\m!colors}
+ {stop \currentcolor\normalspace at level \the\colorlevel}%
+ \global\advance\colorlevel by \@@colorminus1
+ \fi}
+
+\def\dodoglobalstopcolor%
+ {\ifnum\colorlevel=0 \else
+ \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.
+
+\def\docolormark#1%
+ {\ifinpagebody \else
+ \iflocalcolor \else
+ \dodocolormark{#1}%
+ \fi
+ \fi}
+
+\let\lastcolormark=\empty
+
+\def\dodocolormark#1%
+ {\doifnot{#1}{\lastcolormark}
+ {\xdef\lastcolormark{#1}%
+ %\expandafter\colormark\expandafter{\lastcolormark}}}
+ \expandafter\setmark\expandafter\colormark\expandafter{\lastcolormark}}}
+
+%D \macros
+%D {pushcolor, popcolor}
+%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}}}
+
+\def\popcolor%
+ {\doifsomething{\getbotmark\colormark}
+ {\debuggerinfo{\m!colors}{popping \getbotmark\colormark}%
+ \startcolormode{\getbotmark\colormark}}}
+
+\def\popsplitcolor%
+ {\getsplitmarks\colormark % hier wel
+ \doifsomething{\getsplitbotmark\colormark}
+ {\debuggerinfo{\m!colors}{split popping \getsplitbotmark\colormark}%
+ \startcolormode{\getsplitbotmark\colormark}}}
+
+%D \macros
+%D {startcolorpage, stopcolorpage}
+%D
+%D Local use can be forced with the next two macros. Nesting
+%D is still supported but colors are no longer marked.
+
+%D \starttypen
+%D \def\startcolorpage%
+%D {\bgroup
+%D \let\docolormark=\gobbleoneargument
+%D \edef\savedcolorlevel{\the\colorlevel}%
+%D \ifnum\colorlevel>0
+%D \stopcolormode
+%D \fi
+%D \global\colorlevel=1000\relax} % a save offset
+%D
+%D \def\stopcolorpage%
+%D {\global\colorlevel=\savedcolorlevel\relax
+%D \egroup}
+%D \stoptypen
+
+%D The next alternative makes (simple) color separation more
+%D easy. It also supports nested colors in page backgrounds
+%D and texts.
+
+\def\startcolorpage%
+ {\bgroup
+ \def\@@colorplus{-}%
+ \def\@@colorminus{+}%
+ \let\docolormark=\gobbleoneargument
+ \edef\savedcolorlevel{\the\colorlevel}%
+ \localstartcolor[black]%
+ \global\colorlevel=0 }
+
+\def\stopcolorpage%
+ {\localstopcolor
+ \global\colorlevel=\savedcolorlevel\relax
+ \egroup}
+
+%D \macros
+%D {color,graycolor}
+%D
+%D This leaves the simple color command:
+%D
+%D \showsetup{\y!color}
+%D \showsetup{\y!graycolor}
+%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\graycolor[#1]% not \gray because this is a color
+ {\groupedcommand
+ {\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}
+ {\stopcolor}}
+
+\let\grey\graycolor
+
+%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 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\doformatcolorS#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@@s}
+
+\def\doformatgrayC#1:#2:#3:#4\od%
+ {\convertCMYKtoGRAY{#1}{#2}{#3}{#4}%
+ \dodoformatcolor\@@cl@@s}
+
+\def\doformatgrayS#1\od%
+ {\dodoformatcolor{#1}}
+
+\def\doformatgray#1:%
+ {\getvalue{doformatgray#1}}
+
+\def\grayvalue#1%
+ {\doifcolorelse{#1}
+ {\getcurrentcolorspecs{#1}%
+ \expandafter\doformatgray\currentcolorspecs\od}
+ {}}
+
+%D \macros
+%D {localstartraster,localstopraster,
+%D startraster,stopraster}
+%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} % no, we also want 0 and 1
+ {\doifelsenothing{#1}
+ {\dostartgraymode{\@@rsraster}}
+ {\dostartgraymode{#1}}}
+
+\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 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).
+%D
+%D When needed, one can copy a palet by saying:
+%D
+%D \starttypen
+%D \definepalet [TEXcolorpretty] [colorpretty]
+%D \stoptypen
+%D
+%D This saves us some typing in for instance the modules that
+%D deal with pretty verbatim typesetting.
+
+\def\definepalet%
+ {\dodoubleargument\dodefinepalet}
+
+\def\dodefinepalet[#1][#2]%
+ {\doifassignmentelse{#2}
+ {\setvalue{\??pa#1}{}%
+ \setevalue{\??pa\??pa#1}{#2}%
+ \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}{S:0}}}%
+ \def\dododefinepalet##1%
+ {\dodododefinepalet[##1]}%
+ \processcommalist[#2]\dododefinepalet}
+ {\doifdefined{\??pa#2}
+ {\expanded{\dodefinepalet[#1][\getvalue{\??pa\??pa#2}]}}}}
+
+%D \macros
+%D {setuppalet}
+%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 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\showverticalpalet[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet[#1]
+ \def\rule%
+ {\vrule\!!width3em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \tabskip\!!zeropoint
+ \def\doshowpalet##1%
+ {\doifinsetelse{\v!nummer}{#2}{##1\hskip.5em}{}&
+ \color[##1]{\rule}\graycolor[##1]{\rule}&
+ \doifinset{\v!waarde}{#2}{\hskip.5em\colorvalue{##1}}\crcr}
+ \halign
+ {\hss##&\hss##\hss&##\cr
+ &\doifinset{\v!naam}{#2}{\strut#1}&\cr%
+ \processpalet[#1]\doshowpalet\crcr}}}
+
+\def\showhorizontalpalet[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet[#1]
+ \tabskip\!!zeropoint
+ \!!widtha=\!!zeropoint
+ \doifinset{\v!nummer}{#2}
+ {\def\doshowpalet##1%
+ {\setbox0=\hbox{##1}%
+ \ifdim\!!widtha<\wd0\!!widtha=\wd0\fi}%
+ \processpalet[#1]\doshowpalet}%
+ \advance\!!widtha by 1em
+ \ifdim\!!widtha<5em
+ \!!widtha=5em
+ \fi
+ \halign
+ {##&&\hbox to \!!widtha{\hss##\hss}\cr
+ \doifinset{\v!nummer}{#2}
+ {\def\doshowpalet##1{&\strut##1}%
+ \processpalet[#1]\doshowpalet}\cr
+ \doifinset{\v!naam}{#2}{#1\hskip.5em}%
+ \def\doshowpalet##1%
+ {&\color[##1]{\vrule\!!width\!!widtha\!!height\ht\strutbox\!!depth\!!zeropoint}}%
+ \processpalet[#1]\doshowpalet\crcr
+ \def\doshowpalet##1%
+ {&\graycolor[##1]{\vrule\!!width\!!widtha\!!height\!!zeropoint\!!depth\dp\strutbox}}%
+ \processpalet[#1]\doshowpalet\crcr
+ \doifinset{\v!waarde}{#2}
+ {\def\doshowpalet##1%
+ {&\vbox
+ {\hsize\!!widtha
+ \vskip.25ex
+ \everypar{\strut}
+ \veryraggedcenter
+ \let\colorformatseparator=\endgraf
+ \colorvalue{##1}}}%
+ \processpalet[#1]\doshowpalet}%
+ \crcr}}}
+
+\def\processpalet[#1]%
+ {\expanded{\globalprocesscommalist[\getvalue{\??pa#1}]}}
+
+%D \macros
+%D {definecolorgroup}
+%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{S},
+ \v!s=>\edef\currentcolorspace{S},
+ \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 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
+ \setuppalet
+ \tabskip\!!zeropoint
+ \def\rule%
+ {\vrule\!!width4em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \def\colorformatseparator{\strut\cr}
+ \def\dodoshowgroup##1%
+ {\halign
+ {\hss####\hss\cr
+ \doifinset{\v!nummer}{#2}{\strut##1}\cr
+ \color[#1:##1]{\vrule\!!width4em\!!height\ht\strutbox\!!depth\!!zeropoint}\cr
+ \graycolor[#1:##1]{\vrule\!!width4em\!!height\!!zeropoint\!!depth\dp\strutbox}\cr
+ \doifinset{\v!waarde}{#2}{\colorvalue{#1:##1}\strut}\crcr}}
+ \def\doshowgroup##1%
+ {\doifdefined{\??cr#1:##1}
+ {\vbox{\dodoshowgroup{##1}}}}
+ \hbox
+ {\doifinset{\v!naam}{#2}
+ {\strut
+ \doifinsetelse{\v!waarde}{#2}
+ {\raise3\lineheight\hbox{#1\hskip.5em}}
+ {#1}%
+ \hskip.5em}%
+ \doshowgroup1\doshowgroup2\doshowgroup3\doshowgroup4%
+ \doshowgroup5\doshowgroup6\doshowgroup7\doshowgroup8}}}
+
+\def\showverticalcolorgroup[#1][#2]%
+ {\localvbox
+ {\offinterlineskip
+ \setuppalet
+ \tabskip\!!zeropoint
+ \def\rule%
+ {\vrule\!!width2.5em\!!height\ht\strutbox\!!depth\dp\strutbox}
+ \def\doshowgroup##1%
+ {\doifdefined{\??cr#1:##1}
+ {\doifinset{\v!nummer}{#2}{##1\hskip.5em}&
+ \color[#1:##1]{\rule}\graycolor[#1:##1]{\rule}&
+ \doifinset{\v!waarde}{#2}{\hskip.5em\colorvalue{#1:##1}}\crcr}}
+ \halign
+ {\hss##&\hss##\hss&##\hss\cr
+ &\doifinset{\v!naam}{#2}{\strut#1}&\crcr
+ \doshowgroup1\doshowgroup2\doshowgroup3\doshowgroup4%
+ \doshowgroup5\doshowgroup6\doshowgroup7\doshowgroup8}}}
+
+%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 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\graycolor[#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 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\graycolor[#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 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
+ {\graycolor[##1]{\rule}\quad
+ \color[##1]{\rule}\quad
+ \grayvalue{##1}\quad
+ \hbox to 12em{\colorvalue{##1}\hss}%
+ \strut##1}
+ \endgraf}
+ \processcommacommand[\colorlist]\docommand
+ \egroup}
+
+%D \macros
+%D {negativecolorbox}
+%D
+%D Sometimes, especially when we deal with typesetting
+%D devices, we want to reverse the color scheme. Instead of
+%D recalculating all those colors, we use a quick and dirty
+%D approach:
+%D
+%D \starttypen
+%D \negativecolorbox0
+%D \stoptypen
+%D
+%D will negate the colors in box zero.
+
+\def\negatecolorbox#1%
+ {\setbox#1=\hbox
+ {\dostartnegative
+ \localstartcolor[white]%
+ \vrule\!!height\ht#1\!!depth\dp#1\!!width\wd#1%
+ \localstopcolor
+ \hskip-\wd#1%
+ \box#1\dostopnegative}}
+
+%D \macros
+%D {ifMPgraphics, MPcolor}
+%D
+%D A very special macro is \type{\MPcolor}. This one can be
+%D used to pass a \CONTEXT\ color to \METAPOST.
+%D
+%D \starttypen
+%D \MPcolor{my own red}
+%D \stoptypen
+%D
+%D This macro returns a \METAPOST\ triplet \type{(R,G,B)}.
+%D Only \kap{RGB} colors and gray scales are supported.
+
+\def\MPcolor#1%
+ {\ifMPgraphics
+ \@EA\@EA\@EA\doMPcolor\csname\??cr#1\endcsname::::\end
+ \else
+ #1%
+ \fi}
+
+\def\doMPcolor#1:#2:#3:#4:#5\end%
+ {\if #1R(#2,#3,#4)%
+ \else\if#1C(1-#2+#5,1-#3+#5,1-#4+#5)%
+ \else\if#1S(#2,#2,#2)%
+ \else (0,0,0)%
+ \fi\fi\fi}
+
+%D \macros
+%D {PDFcolor,FDFcolor}
+%D
+%D Similar alternatives are avaliable for \PDF:
+
+\def\PDFcolor#1%
+ {\@EA\@EA\@EA\doPDFcolor\csname\??cr#1\endcsname::::\end}
+
+\def\doPDFcolor#1:#2:#3:#4:#5\end%
+ {\if #1R#2 #3 #4 rg%
+ \else\if#1C#2 #3 #4 #5 k%
+ \else\if#1S#2 g%
+ \else 0 g%
+ \fi\fi\fi}
+
+\def\FDFcolor#1%
+ {\@EA\@EA\@EA\doFDFcolor\csname\??cr#1\endcsname::::\end}
+
+\def\doFDFcolor#1:#2:#3:#4:#5\end%
+ {[\if #1R#2 #3 #4%
+ \else\if#1C#2 #3 #4 #5%
+ \else\if#1S#2%
+ \else 0%
+ \fi\fi\fi]}
+
+%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!reductie=\v!nee,
+ \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
diff --git a/tex/context/base/colo-pra.tex b/tex/context/base/colo-pra.tex
new file mode 100644
index 000000000..65f712724
--- /dev/null
+++ b/tex/context/base/colo-pra.tex
@@ -0,0 +1,67 @@
+%D \module
+%D [ file=colo-pra,
+%D version=1997.1.3,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=PRAGMA,
+%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 is not meant for third party use and defines
+%D some \PRAGMA\ specific colors.
+
+% huisstijl
+
+\definecolor [pragmacolor] [r=1,g=0.62,b=0.06]
+\definecolor [pragmakleur] [pragmacolor]
+
+\definecolor [texprettyone] [r=.8, g=0, b=0] % red
+\definecolor [texprettytwo] [r=0, g=.6, b=0] % green
+\definecolor [texprettythree] [r=.0, g=.0, b=.9] % blue
+\definecolor [texprettyfour] [r=.8, g=.8, b=.6] % yellow
+
+\definecolor [BackgroundColor] [r=1, g=1, b=.7]
+\definecolor [InteractionColor] [r=.1, g=.5, b=.8]
+
+\definecolor [AchtergrondKleur] [BackgroundColor]
+\definecolor [InteractieKleur] [InteractionColor]
+
+\definecolor [DemoRed] [r=1, g=.6, b=.6]
+\definecolor [DemoRood] [DemoRed]
+
+\definecolor [DemoBlue] [r=.6, g=.8, b=1]
+\definecolor [DemoBlauw] [DemoBlue]
+
+\definecolor [DemoYellow] [BackgroundColor]
+\definecolor [DemoGeel] [BackgroundColor]
+
+% demonstratiekleuren
+
+\definecolor [cyaan:x] [r=.3, g=.85, b=1]
+\definecolor [cyaan:y] [r=.4, g=.8, b=1]
+\definecolor [cyaan:z] [r=.5, g=.75, b=1]
+
+% schermkleuren
+
+\definecolor [schermgroen] [r=0, g=.8, b=0]
+\definecolor [schermrood] [r=.8, g=0, b=0]
+\definecolor [schermcyaan] [r=0, g=.8, b=.8]
+\definecolor [schermgeel] [r=.9, g=.9, b=0]
+
+\endinput
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex
index 3ea42994e..3b0fb5088 100644
--- a/tex/context/base/colo-rgb.tex
+++ b/tex/context/base/colo-rgb.tex
@@ -1,365 +1,367 @@
-%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
+%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 [gray] [s=.9]
+
+\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 [grijs] [gray]
+ \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-cz.tex b/tex/context/base/cont-cz.tex
new file mode 100644
index 000000000..d322788ce
--- /dev/null
+++ b/tex/context/base/cont-cz.tex
@@ -0,0 +1,35 @@
+%D \module
+%D [ file=cont-cz,
+%D version=1998.12.02,
+%D title=\CONTEXT,
+%D subtitle=\CONTEXT\ Czech 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
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+
+\installlanguage [\s!cz] [\c!status=\v!start,\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!sk] [\c!status=\v!start,\s!mapping=il2,\s!encoding=il2]
+
+\appendtoks \language [\s!cz] \to \everyjob
+\appendtoks \mainlanguage [\s!cz] \to \everyjob
+
+\setupbodyfont [csr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-de.tex b/tex/context/base/cont-de.tex
index 7800753b6..7695c00f4 100644
--- a/tex/context/base/cont-de.tex
+++ b/tex/context/base/cont-de.tex
@@ -1,21 +1,38 @@
-%D \module
-%D [ file=cont-de,
-%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
+%D \module
+%D [ file=cont-de,
+%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
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!uk] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+\installlanguage [\s!fr] [\c!status=\v!start]
+\installlanguage [\s!sp] [\c!status=\v!start]
+\installlanguage [\s!nl] [\c!status=\v!start]
+
+\installlanguage [deo] [\c!status=\v!start]
+
+\appendtoks \language [\s!de] \to \everyjob
+\appendtoks \mainlanguage [\s!de] \to \everyjob
+
+\setupbodyfont [cmr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex
index 5720142a5..1e0aa2aec 100644
--- a/tex/context/base/cont-en.tex
+++ b/tex/context/base/cont-en.tex
@@ -1,22 +1,36 @@
-%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
+%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
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!uk] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+\installlanguage [\s!fr] [\c!status=\v!start]
+\installlanguage [\s!sp] [\c!status=\v!start]
+\installlanguage [\s!nl] [\c!status=\v!start]
+
+\appendtoks \language [\s!en] \to \everyjob
+\appendtoks \mainlanguage [\s!en] \to \everyjob
+
+\setupbodyfont [cmr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 0ffbcae93..ab035804b 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -1,22 +1,24 @@
-%D \module
-%D [ file=cont-fil,
-%D version=1997.11.15,
-%D title=\CONTEXT\ Miscellaneous Macros,
-%D subtitle=File Synonyms,
-%D author=J. 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 File Synonyms}
-
-\definefilesynonym [chemic] [chemie]
-
-\definefilesynonym [unit] [eenheid]
-\definefilesynonym [einheit] [eenheid]
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=cont-fil,
+%D version=1997.11.15,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=File Synonyms,
+%D author=J. 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 File Synonyms}
+
+\definefilesynonym [chemie] [chemic]
+
+\definefilesynonym [unit] [units]
+\definefilesynonym [eenheid] [units]
+\definefilesynonym [einheit] [units]
+
+\definefilesynonym [finance] [financ]
+
+\endinput
diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex
index 339667576..aead03dda 100644
--- a/tex/context/base/cont-log.tex
+++ b/tex/context/base/cont-log.tex
@@ -1,129 +1,155 @@
-%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={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 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.
-%D Watch the \type{cmr} detection hack.
-
-\unprotect
-
-\convertargument cmr\to\someCMRfont
-
-\def\doifCMRfontelse#1#2%
- {\doifinstringelse{\someCMRfont}{\fontname\font}
- {\def\next{#1}}
- {\def\next{#2}}%
- \next}
-
-\unexpanded\def\CMRkern%
- {\doifCMRfontelse{\kern}{\scratchdimen=}}
-
-\def\TeX%
- {T%
- \kern-.1667em\lower.5ex\hbox{E}%
- \kern-.125emX}
-
-\def\ConTeXt%
- {C%
- \CMRkern-.0333emO%
- \CMRkern-.0333emN%
- \CMRkern-.0333em\TeX%
- \CMRkern-.0333emT}
-
-\def\PPCHTeX%
- {PPCH\TeX}
-
-\def\LaTeX%
- {L%
- \kern-.30em\raise.3ex\hbox{\txx A}%
- \kern-.18em\TeX}
-
-\def\TaBlE%
- {T%
- \kern-.27em\lower.5ex\hbox{A}%
- \kern-.18emB%
- \kern-.1em\lower.5ex\hbox{L}%
- \kern-.075emE}
-
-\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
- \ No newline at end of file
+%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={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 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.
+%D Watch the \type{cmr} detection hack.
+
+\unprotect
+
+\convertargument cmr\to\someCMRfont
+
+\def\doifCMRfontelse#1#2%
+ {\doifinstringelse{\someCMRfont}{\fontname\font}
+ {\def\next{#1}}
+ {\def\next{#2}}%
+ \next}
+
+\unexpanded\def\CMRkern%
+ {\doifCMRfontelse{\kern}{\scratchdimen=}}
+
+\def\TeX%
+ {T%
+ \kern-.1667em\lower.5ex\hbox{E}%
+ \kern-.125emX}
+
+\def\ConTeXt%
+ {C%
+ \CMRkern-.0333emo%
+ \CMRkern-.0333emn%
+ \CMRkern-.0333em\TeX%
+ \CMRkern-.0333emt}
+
+\def\PPCHTeX%
+ {PPCH\TeX}
+
+\def\PRAGMA%
+ {PRAGMA}
+
+\def\LaTeX%
+ {L%
+ \kern-.30em\raise.3ex\hbox{\txx A}%
+ \kern-.18em\TeX}
+
+\def\TaBlE%
+ {T%
+ \kern-.27em\lower.5ex\hbox{A}%
+ \kern-.18emB%
+ \kern-.1em\lower.5ex\hbox{L}%
+ \kern-.075emE}
+
+\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}
+
+%D The \METAFONT\ and \METAPOST\ logos adapt themselves to the
+%D current fontsize, an ugly but usefull hack.
+
+\def\setMFPfont%
+ {\font\logofont=logo%
+ \ifnum\fam=\bffam bf\else
+ \ifnum\fam=\slfam sl\else
+ \ifnum\fam=\itfam sl\else
+ \ifnum\fam=\bsfam bf\else
+ \ifnum\fam=\bifam bf\else
+ \fi\fi\fi\fi\fi
+ 10 at \currentfontscale\bodyfontsize
+ \logofont}
+
+\def\MetaFont%
+ {{\setMFPfont METAFONT}}
+
+\def\MetaPost%
+ {{\setMFPfont METAPOST}}
+
+%D \macros
+%D {TEX, METAFONT, METAPOST,
+%D PICTEX, TABLE,
+%D CONTEXT, PPCHTEX,
+%D AMSTEX, LATEX, LAMSTEX}
+%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 and \TeX.
+
+\def\TEXEDIT {\TeX EDIT}
+\def\TEXFORM {\TeX FORM}
+\def\TEXADRES {\TeX ADRES}
+\def\TEXSPELL {\TeX SPELL}
+\def\TEXUTIL {\TeX UTIL}
+\def\TEXEXEC {\TeX EXEC}
+
+%D Some placeholders:
+
+\def\eTeX {e-\TEX}
+\def\pdfTeX {pdf\TEX}
+\def\pdfeTeX {pdfe-\TEX}
+
+\let\ETEX \eTeX
+\let\PDFTEX \pdfTeX
+\let\PDFETEX \pdfeTeX
+
+\protect
+
+\endinput
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 0e2322ec9..975a762f5 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -1,20 +1,27 @@
-%D \module
-%D [ file=cont-new,
-%D version=1995.10.10,
-%D title=\CONTEXT\ Miscellaneous Macros,
-%D subtitle=New 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.
-
-% new (or test) commands
-
-\unprotect
-
-\protect
-
-\endinput
+%D \module
+%D [ file=cont-new,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=New 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.
+
+\readfile{syst-eet}{}{} % temporary here
+
+\unprotect
+
+%\writestatus{\m!systems}{BEWARE: SOMETHING NEW INSERTED!}
+
+\def\presetfieldreferences%
+ {\ifnum\totalnumberoffields>0
+ \definereference[AtOpenInitializeForm][\v!ResetForm]%
+ \fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/cont-nl.tex b/tex/context/base/cont-nl.tex
index 8e17e0eaa..98e12b28b 100644
--- a/tex/context/base/cont-nl.tex
+++ b/tex/context/base/cont-nl.tex
@@ -1,21 +1,36 @@
-%D \module
-%D [ file=cont-nl,
-%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
+%D \module
+%D [ file=cont-nl,
+%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
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!uk] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+\installlanguage [\s!fr] [\c!status=\v!start]
+\installlanguage [\s!sp] [\c!status=\v!start]
+\installlanguage [\s!nl] [\c!status=\v!start]
+
+\appendtoks \language [\s!nl] \to \everyjob
+\appendtoks \mainlanguage [\s!nl] \to \everyjob
+
+\setupbodyfont [cmr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex
new file mode 100644
index 000000000..1fb4d406a
--- /dev/null
+++ b/tex/context/base/cont-old.tex
@@ -0,0 +1,98 @@
+%D \module
+%D [ file=cont-old,
+%D version=1995.10.10,
+%D title=\CONTEXT\ Miscellaneous Macros,
+%D subtitle=Old 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 Old Macros}
+
+\unprotect
+
+\def\dosubstitutecommand#1#2%
+ {\writestatus
+ {pas op}
+ {\string#1\normalspace is nu \string#2}%
+ \gdef#1{#2}%
+ #2}
+
+\def\substitutecommand#1#2%
+ {\gdef#1{\dosubstitutecommand{#1}{#2}}}
+
+\def\blockstatus#1#2#3%
+ {\writestatus{tekstblok}{sorry, nieuwe versie, tweede/andere run nodig}%
+ \endinput}
+
+\def\presetexternfiguur[#1][#2]%
+ {\writestatus{figuren}{sorry, nieuwe versie, run texutil /figures}%
+ \endinput}
+
+\def\blokstatus {\endinput}
+\def\beginvanexternefiguren {\thisisfigureversion{0}}
+
+\substitutecommand \stelopsomminginopniveau \stelopsommingin
+\substitutecommand \stelopsommingvolledigin \stelopsommingin
+\substitutecommand \stelsomsymboolin \definieersymbool
+\substitutecommand \somsymbool \symbool
+
+\substitutecommand \stelzetspiegelin \stellayoutin
+\substitutecommand \stelmargesin \stellayoutin
+\substitutecommand \steloffsetin \stellayoutin
+
+ \def \randbreedte {\rechterrandbreedte}
+
+\substitutecommand \steldoordefinitiein \steldoordefinierenin
+\substitutecommand \steldoornummerin \steldoornummerenin
+\substitutecommand \steldoorsprongin \steldoorspringenin
+
+\substitutecommand \volgendehoofdstuk {\stelkopnummerin[hoofdstuk][+1]}
+\substitutecommand \volgendeparagraaf {\stelkopnummerin[paragraaf][+1]}
+\substitutecommand \volgendesubparagraaf {\stelkopnummerin[subparagraaf][+1]}
+\substitutecommand \volgendesubsubparagraaf {\stelkopnummerin[subsubparagraaf][+1]}
+
+\substitutecommand \volledigeinhoudsopgave \volledigeinhoud
+\substitutecommand \plaatsinhoudsopgave \plaatsinhoud
+\substitutecommand \stelinhoudsopgavein \stelinhoudin
+
+\substitutecommand \streep \onderstreep
+\substitutecommand \strepen \onderstrepen
+
+\substitutecommand \pragmakenmerk \kenmerk
+
+\substitutecommand \definieersynoniem \definieersynoniemen
+
+\substitutecommand \stelvoetnootin \stelvoetnotenin
+
+\substitutecommand \karakters \uitgerekt
+
+\substitutecommand \diepevoetnoot \voetnoot
+
+% english:
+
+\substitutecommand \setupformulas \setupformulae
+
+\substitutecommand \useexternalfigures \setupexternalfigures
+
+\substitutecommand \setupintermezzos \setupintermezzi
+
+\substitutecommand \leftlined \leftaligned
+\substitutecommand \middlelined \midaligned
+\substitutecommand \rightlined \rightaligned
+
+\substitutecommand \setupcorps \setupbodyfont
+\substitutecommand \switchtocorps \switchtobodyfont
+\substitutecommand \definecorps \definebodyfont
+\substitutecommand \definecorpsenvironment \definebodyfontenvironment
+\substitutecommand \showcorps \showbodyfont
+\substitutecommand \showcorpsenvironment \showbodyfontenvironment
+
+ \def \corpssize {\bodyfontsize}
+\protect
+
+\endinput
diff --git a/tex/context/base/cont-uk.tex b/tex/context/base/cont-uk.tex
new file mode 100644
index 000000000..e01d02846
--- /dev/null
+++ b/tex/context/base/cont-uk.tex
@@ -0,0 +1,36 @@
+%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
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!uk] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+\installlanguage [\s!fr] [\c!status=\v!start]
+\installlanguage [\s!sp] [\c!status=\v!start]
+\installlanguage [\s!nl] [\c!status=\v!start]
+
+\appendtoks \language [\s!uk] \to \everyjob
+\appendtoks \mainlanguage [\s!uk] \to \everyjob
+
+\setupbodyfont [cmr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-usr.tex b/tex/context/base/cont-usr.tex
index a16575ece..a706dc3c3 100644
--- a/tex/context/base/cont-usr.tex
+++ b/tex/context/base/cont-usr.tex
@@ -1,52 +1,63 @@
-%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
-
-% \usespecials[reset,ps,tr,pdf]
-
-% \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
+%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. Normally, when
+%D using the \type {cont-..} files, this file can best be
+%D left unchanged. The default language and font settings
+%D done in the \type {cont-.} files take precedence! This file
+%D is subject to changes.
+
+\unprotect
+
+% \usespecials[reset,ps,tr,pdf]
+
+% \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 us
+% \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
+% \installlanguage [\s!uk] [\c!status=\v!start] % english uk
+
+% \installlanguage [deo] [\c!status=\v!start] % old german
+% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit
+
+% \appendtoks \language[\s!af] \to \everyjob
+% \appendtoks \language[\s!cz] \to \everyjob
+% \appendtoks \language[\s!da] \to \everyjob
+% \appendtoks \language[\s!de] \to \everyjob
+% \appendtoks \language[\s!en] \to \everyjob
+% \appendtoks \language[\s!fi] \to \everyjob
+% \appendtoks \language[\s!fr] \to \everyjob
+% \appendtoks \language[\s!it] \to \everyjob
+% \appendtoks \language[\s!nl] \to \everyjob
+% \appendtoks \language[\s!no] \to \everyjob
+% \appendtoks \language[\s!pl] \to \everyjob
+% \appendtoks \language[\s!pt] \to \everyjob
+% \appendtoks \language[\s!sk] \to \everyjob
+% \appendtoks \language[\s!sp] \to \everyjob
+% \appendtoks \language[\s!sv] \to \everyjob
+% \appendtoks \language[\s!tr] \to \everyjob
+
+% \appendtoks \mainlanguage[\currentlanguage] \to \everyjob
+
+% \setupbodyfont[cmr]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/context.rme b/tex/context/base/context.rme
index 553088fdc..4f5748120 100644
--- a/tex/context/base/context.rme
+++ b/tex/context/base/context.rme
@@ -1,48 +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
+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
index f0f98ef7c..05dfc4455 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -1,184 +1,299 @@
-%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 To enable selective loading, we say:
-
-\CONTEXTtrue
-
-%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-box.tex
-\input supp-mrk.tex
-\input supp-vis.tex
-\input supp-fun.tex
-\input supp-pdf.tex
-\input supp-spe.tex
-\input supp-mps.tex
-\input supp-tpi.tex
-
-%D Verbatim typestting is implemented in a separate class of
-%D modules. The pretty typesetting modules are loaded at run
-%D time.
-
-\input verb-ini.tex % replaces supp-ver
-
-%D We also use some third party macros. These are loaded by
-%D saying:
-
-\input thrd-ran
-
-%D When loading the font, color and special modules, we need a
-%D bit more advanced file handling, so next we load:
-
-\input core-fil.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 colo-ini.tex
-\input spec-ini.tex
-
-%D The special modules need some additional macro's:
-
-\input spec-mis.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 Next we load some core macro's. These implement the
-%D macros' that are seen by the users.
-
-\input core-var.tex
-\input core-gen.tex
-\input core-mak.tex
-\input core-grd.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-new.tex
-\input core-nav.tex
-\input core-ref.tex
-\input core-obj.tex
-\input core-01a.tex
-\input core-mul.tex
-\input core-pag.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-jav.tex % still experimental and loaded at runtime
-
-\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 At run time, a few more files are loaded, like:
-%D
-%D \startopsomming[opelkaar]
-%D \som \type{cont-sys}: local (system dependant) defaults
-%D \som \type{cont-old}: substitutes for old (obsolete) macros
-%D \som \type{cont-new}: new macro implementations (for testing)
-%D \som \type{cont-fil}: filename and module synonyms
-%D \stopopsomming
-
-%D Dumping the format is all that's left to be done.
-
-\dump
+%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.
+
+\def\contextversion{1999.2.17}
+
+%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 To enable selective loading, we say:
+
+\CONTEXTtrue
+
+%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-box.tex
+\input supp-mrk.tex
+\input supp-vis.tex
+\input supp-fun.tex
+\input supp-eps.tex
+\input supp-pdf.tex
+\input supp-spe.tex
+\input supp-mps.tex
+\input supp-tpi.tex
+\input supp-mat.tex
+
+%D Verbatim typestting is implemented in a separate class of
+%D modules. The pretty typesetting modules are loaded at run
+%D time.
+
+\input verb-ini.tex % replaces supp-ver
+
+%D We also use some third party macros. These are loaded by
+%D saying:
+
+\input thrd-ran
+
+%D When loading the font, color and special modules, we need a
+%D bit more advanced file handling as well as some general
+%D variables, so next we load:
+
+\input core-var.tex
+\input core-fil.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 modules. They take care of
+%D some language specific things.
+
+\input supp-lan.tex
+\input supp-num.tex
+
+%D The next few modules do what their names state. They
+%D load additional definition modules when needed.
+
+\input enco-ini.tex
+
+\input lang-ini.tex
+
+\input colo-ini.tex
+
+\input spec-mis.tex
+\input spec-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 All kind of symbols are handles in:
+
+\input symb-ini.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-mat.tex
+\input core-grd.tex
+\input core-ver.tex
+\input core-vis.tex
+\input core-con.tex
+\input core-rul.tex
+\input core-tab.tex
+\input core-new.tex
+\input core-nav.tex
+\input core-ref.tex
+\input core-obj.tex
+\input core-01a.tex
+\input core-mul.tex
+\input core-pag.tex
+\input core-tbl.tex
+\input core-mis.tex
+
+%D How about fill||in fields?
+
+\input java-ini.tex
+\input core-fld.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-fig.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 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 At run time, a few more files are loaded, like:
+%D
+%D \startopsomming[opelkaar]
+%D \som \type{cont-sys}: local (system dependant) defaults
+%D \som \type{cont-old}: substitutes for old (obsolete) macros
+%D \som \type{cont-new}: new macro implementations (for testing)
+%D \som \type{cont-fil}: filename and module synonyms
+%D \stopopsomming
+
+%D Just to keep the user busy for a while, we say:
+
+\startinterface english
+
+\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.}
+
+\stopinterface
+
+\startinterface dutch
+
+\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}
+\writestring{kan 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.}
+
+\stopinterface
+
+\startinterface german
+
+\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.}
+
+\stopinterface
+
+\edef\copyrightversion%
+ {Copyright 1990-\the\normalyear\normalspace /
+ PRAGMA ADE / J. Hagen - A.F. Otten}
+
+\writeline\writestring{\copyrightversion}\writeline
+
+%D Except from english, no hyphenation patterns are loaded
+%D yet. Users can specify their needs in the next module:
+
+\input cont-usr.tex
+
+%D Let's quit this file when doing a \type {cont-..} generation.
+
+\doifparentfileelse{context}
+ {\let\next\relax}
+ {\let\next\endinput}
+
+\next
+
+%D Unless we're generating a \type {cont-..} format, we also
+%D set:
+
+\unprotect
+
+\installlanguage [\s!en] [\c!status=\v!start]
+
+\startinterface english
+
+ \installlanguage [\s!uk] [\c!status=\v!start]
+
+\stopinterface
+
+\appendtoks \language [\s!en] \to \everyjob
+\appendtoks \mainlanguage [\s!en] \to \everyjob
+
+\startinterface german
+
+ \installlanguage [\s!de] [\c!status=\v!start]
+
+ \appendtoks \language [\s!de] \to \everyjob
+ \appendtoks \mainlanguage [\s!de] \to \everyjob
+
+\stopinterface
+
+\startinterface dutch
+
+ \installlanguage [\s!nl] [\c!status=\v!start]
+
+ \appendtoks \language [\s!nl] \to \everyjob
+ \appendtoks \mainlanguage [\s!nl] \to \everyjob
+
+\stopinterface
+
+\setupbodyfont [cmr,rm,12pt]
+
+\protect
+
+%D Now dumping the format is all that's left to be done.
+
+\dump
+
+\endinput
diff --git a/tex/context/base/core-01a.tex b/tex/context/base/core-01a.tex
index 0cd073f02..2983bb8df 100644
--- a/tex/context/base/core-01a.tex
+++ b/tex/context/base/core-01a.tex
@@ -1,16216 +1,17554 @@
-%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.
-
-% nog oplossen: voetnoot setten ivm later veranderde
-% witruimte; probleem: als lijn graphic
-
-% \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
-% \pagina[ja,blanko,rechts]
-% \stelkopin[tussen] % precies aangeven waar voor/tussen/na
-% \stelpapierformaatin[liggend,A4][liggend,A4]
-
-% 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]
-% \stel...tekstenin (zonder argumenten == reset)
-
-% 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 \everybodyfont \Everybodyfont % just to be sure
-
-\appendtoks \presetnormallineheight \to \everybodyfont
-\appendtoks \setnormalbaselines \to \everybodyfont
-\appendtoks \setstrut \to \everybodyfont
-\appendtoks \settopskip \to \everybodyfont
-\appendtoks \setmaxdepth \to \everybodyfont
-\appendtoks \stelinspringenin \to \everybodyfont
-\appendtoks \stelblankoin \to \everybodyfont
-\appendtoks \stelwitruimtein \to \everybodyfont
-%\appendtoks\setupfootnotes \to \everybodyfont
-
-% \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
- 21: de hulpfile is niet geladen
- 22: gebruik een goede hulpfile
- 23: -- gearrangeerd op --
-\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 util
- 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
- 21: no utility data is loaded
- 22: use a valid utilityfile
- 23: -- arranged at --
-\stopmessages
-
-% - TOBIAS: check 21/22/23
-
-\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
- 21: Die Hilfsdatei ist nicht geladen
- 22: Brauche gute Hilfsdateien
- 23: -- arrangiert auf --
-\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
- 10: -- en -- tellen niet op tot 1.0
- 11: interlinie -- niet toegestaan in gridmode
-\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
- 10: -- and -- don't add up to 1.0
- 11: spacing -- not permitted in gridmode
-\stopmessages
-
-% TOBIAS: 10 and 11!
-
-\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
- 10: -- and -- don't add up to 1.0
- 11: spacing -- not permitted in gridmode
-\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% made global
- {\global\indentationfalse
- \gdef\checkindentation%
- {\donoindentation
- \gdef\checkindentation{\global\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%
- {\tolerance=1500
- \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~}}
-
-% kan vaker worden toegepast:
-
-\def\doadaptleftskip#1%
- {\processaction[#1] % \ExpandFirstAfter
- [\v!standaard=>\advance\leftskip by
- \ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
- \v!ja=>\advance\leftskip by
- \ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
- \v!nee=>,
- \s!unknown=>\advance\leftskip by #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
-\newdimen\openstrutheight
-\newdimen\openstrutdepth
-
-\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}
-
-\def\systemtopskipfactor {\topskipfactor}
-\def\systemmaxdepthfactor {\maxdepthfactor}
-
-% De onderstaande definitie wordt in de font-module overruled
-
-\ifx\globalbodyfontsize\undefined
- \newdimen\globalbodyfontsize
- \globalbodyfontsize=12pt
-\fi
-\ifx\normalizedbodyfontsize\undefined
- \def\normalizedbodyfontsize{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\topskipcorrection%
- {\ifdim\topskip>\openstrutheight
- \vskip\topskip
- \vskip-\openstrutheight
- \fi
- \vbox{\strut}
- \vskip-\openlineheight}
-
-\def\settopskip% the extra test is needed for the lbr family
- {\topskip=\systemtopskipfactor\globalbodyfontsize
- \ifgridsnapping \else
- \ifr@ggedbottom\!!plus5\globalbodyfontsize\fi
- \fi
- \relax % the skip
- \ifdim\topskip<\strutheightfactor\openlineheight
- \topskip=\strutheightfactor\openlineheight\relax
- \fi}
-
-\def\setmaxdepth%
- {\maxdepth=\systemmaxdepthfactor\globalbodyfontsize}
-
-\def\normalbaselines%
- {\baselineskip\normalbaselineskip
- \lineskip\normallineskip
- \lineskiplimit\normallineskiplimit}
-
-\def\setnormalbaselines%
- {\lineheight=\normallineheight
- \openlineheight=\spacingfactor\lineheight
-\openstrutheight=\strutheightfactor\openlineheight
-\openstrutdepth =\strutdepthfactor \openlineheight
- \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%
- {\ifgridsnapping
- \edef\spacingfactor{1}%
- \showmessage{\m!layouts}{11}{#1}%
- \else
- \edef\spacingfactor{#1}%
- \fi
- \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
- \normalkern-\strutwidth}}}
-
-\def\setteststrut%
- {\def\strutwidth{.8pt}%
- \setstrut}
-
-\def\begstrut%
- {\relax\ifdim\ht\strutbox=\!!zeropoint \else
- \strut
- \normalpenalty\!!tenthousand
- \normalhskip\!!zeropoint
- \ignorespaces
- \fi}
-
-\def\endstrut%
- {\relax\ifdim\ht\strutbox=\!!zeropoint \else
- \unskip
- \normalpenalty\!!tenthousand
- \normalhskip\!!zeropoint
- \strut
- \fi}
-
-\def\setnostrut%
- {\setbox\strutbox=\normalhbox{\normalhbox{}}%
- \let\strut=\empty
- \let\endstrut=\empty
- \let\begstrut=\empty}
-
-\def\resetteststrut%
- {\let\strutwidth=\!!zeropoint
- \setstrut}
-
-\def\setfontparameters%
- {\the\everybodyfont}
-
-% \setnormalbaselines
-% \setstrut
-% \settopskip
-% \setmaxdepth
-% \the\EveryFontSwitch
-
-%D We need \type{\normaloffinterlineskip} because the new
-%D definition contains an assignment, and |<|don't ask me
-%D why|>| this assignment gives troubles in for instance the
-%D visual debugger.
-
-\ifx\undefined\normaloffinterlineskip
- \let\normaloffinterlineskip=\offinterlineskip % knuth's original
-\fi
-
-\def\offinterlineskip%
- {\edef\oninterlineskip%
- {\baselineskip=\the\baselineskip
- \lineskip=\the\lineskip
- \lineskiplimit=\the\lineskiplimit
- \noexpand\let\noexpand\offinterlineskip=\noexpand\normaloffinterlineskip}%
- \normaloffinterlineskip}
-
-\let\oninterlineskip=\relax
-
-\def\leaveoutervmode%
- {\ifvmode\ifinner\else
- \leavevmode
- \fi\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:
-
-\def\defaultwidowpenalty{2000} % was: 1000
-\def\defaultclubpenalty {2000} % was: 800
-
-\widowpenalty=\defaultwidowpenalty\relax
-\clubpenalty =\defaultclubpenalty \relax
-
-% Bovendien definieren we enkele extra \fill's:
-
-\def\hfilll%
- {\hskip\!!zeropoint\!!plus1filll\relax}
-
-\def\vfilll%
- {\vskip\!!zeropoint\!!plus1filll\relax}
-
-% 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\writeutility%
- {\write\uti}
-
-\def\immediatewriteutility%
- {\immediate\write\uti}
-
-\def\writeutilitycommand#1%
- {\writeutility{c \string#1}}
-
-\def\immediatewriteutilitycommand#1%
- {\immediatewriteutility{c \string#1}}
-
-\def\openutilities%
- {\immediate\openout\uti=\jobname.\f!inputextension
- \immediatewriteutilitycommand%
- {\thisisutilityversion{\utilityversion}}}
-
-\def\closeutilities%
- {\savenofsubpages
- \savenofpages
- \immediate\closeout\uti
- \reportutilityproblems}
-
-\def\abortutilitygeneration%
- {\immediatewriteutilitycommand{\utilitygenerationaborted}%
- \immediatewriteutility{q {quit}}}
-
-\def\utilitygenerationaborted%
- {\showmessage{\m!systems}{21}{}%
- \global\let\utilitygenerationaborted=\endinput
- \gdef\reportutilityproblems{\showmessage{\m!systems}{22}{}}%
- \endinput}
-
-\let\reportutilityproblems=\relax
-
-\let\utilityresetlist=\empty
-
-\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
-%\ifgridsnapping % evt altijd, nog testen
-% \getnoflines\vsize
-% \vsize=\noflines\openlineheight % local is better and ok
-% \advance\vsize by .5\openlineheight % collect enough data
-%\fi
- \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}
-
-% NB \userpageno vervangen door \realpageno
-
-\def\doifonevenpaginaelse#1#2%
- {\ifodd\realpageno#1\else#2\fi}
-
-\def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od%
- {\ifdubbelzijdig
- \ifodd\realpageno#2\relax\else#3\relax\fi
- \else
- #1\relax
- \fi}
-
-\def\doifbothsides#1\orsideone#2\orsidetwo#3\od%
- {\ifdubbelzijdig
- \ifenkelzijdig
- #1\relax
- \else
- \ifodd\realpageno#2\relax\else#3\relax\fi
- \fi
- \else
- #1\relax
- \fi}
-
-\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\startlocal {\dostartglobaldefs>-}
-\def\stoplocal {\dostopglobaldefs}
-\def\startglobal {\dostartglobaldefs<+}
-\def\stopglobal {\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] % geen \c!schaal, scheelt hash ruimte
- [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,#2]}
-
-\def\definieerpapierformaat%
- {\dodoubleargument\dodefinieerpapierformaat}
-
-\definieerpapierformaat[][\c!breedte=210mm,\c!hoogte=297mm]
-
-\chardef\papermirror =0
-\chardef\printmirror =0
-\chardef\paperrotation =0
-\chardef\paperreverse =0
-\chardef\printrotation =0
-\chardef\printreverse =0
-\chardef\paperlandscape=0
-\chardef\printlandscape=0
-
-\def\papierschaal{1}
-
-\newif\ifnegateprintbox
-
-\def\dostelpapierrichtingin#1#2#3#4#5%
- {\global\chardef#2=0
- \global\chardef#5=0
- \gdef#3{0}%
- \gdef#4{0}%
- \global\negateprintboxfalse
- \processallactionsinset
- [#1]
- [ \v!liggend=>\global\chardef#2=1,
- \v!gespiegeld=>\global\chardef#5=1,
- \v!geroteerd=>\gdef#3{90}\gdef#4{270},
- \v!negatief=>\global\negateprintboxtrue,
- 90=>\gdef#3{90}\gdef#4{270},
- 180=>\gdef#3{180}\gdef#4{0},
- 270=>\gdef#3{270}\gdef#4{90}]}
-
-\def\dostelpapierformaatin[#1][#2]%
- {\dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror
- \dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror
- \def\docommando##1%
- {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
- {\gdef\papierformaat{##1}%
- \global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
- \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
- \processcommalist[#1]\docommando
- \doifdefinedelse{\??pp#1\c!schaal}
- {\edef\papierschaal{\getvalue{\??pp#1\c!schaal}}}
- {\edef\papierschaal{1}}%
- \def\docommando##1%
- {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
- {\global\printpapierbreedte=\getvalue{\??pp##1\c!breedte}%
- \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
- \processcommalist[#2]\docommando
- \ifnum\paperlandscape>0
- \doglobal\swapdimens\papierbreedte\papierhoogte
- \fi
- \ifnum\printlandscape>0
- \doglobal\swapdimens\printpapierbreedte\printpapierhoogte
- \fi
- \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\rugwit=\@@lyrugwit
- \global\kopwit=\@@lykopwit
- \doifelse{\@@lygrid}{\v!ja}
- {\gridsnappingtrue}
- {\gridsnappingfalse}%
-\ifgridsnapping
- \widowpenalty=0 % is gewoon beter
- \clubpenalty =0 % zeker bij grids
-\else
- \widowpenalty=\defaultwidowpenalty
- \clubpenalty=\defaultclubpenalty
-\fi
- \stelwitruimtein
- \stelblankoin
- \doifelse{\@@lybreedte}{\v!midden}
- {\global\zetbreedte=\papierbreedte
- \global\advance\zetbreedte by -2\rugwit}
- {\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{\@@lyregels}{}
- {\doifelse{\@@lyhoogte}{\v!midden}
- {\global\zethoogte=\papierhoogte
- \global\advance\zethoogte by -2\kopwit}
- {\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}}}
- {\global\zethoogte=\@@lyregels\baselineskip
- \global\advance\zethoogte by \hoofdhoogte
- \global\advance\zethoogte by \voethoogte}%
- \rugoffset=\@@lyrugoffset
- \kopoffset=\@@lykopoffset
- \calculatehsizes
- \calculatevsizes
- \global\newlogostrue
- \global\newbackgroundtrue}
-
-\newif\ifdoublesidedprint
-
-\def\setcenterpagebox#1#2#3#4%
- {\let\leftpagebox =#1%
- \let\rightpagebox =#2%
- \let\toppagebox =#3%
- \let\bottompagebox=#4}%
-
-\def\presetcenterpagebox% in \stellayoutin !!!!!!!!!!!!!!!!
- {\setcenterpagebox\relax\hss\relax\vss
- \doublesidedprintfalse
- \ExpandFirstAfter\processallactionsinset
- [\@@lyplaats]
- [ \v!midden=>\setcenterpagebox\hss\hss\vss\vss,
- \v!links=>\setcenterpagebox\relax\hss\toppagebox\bottompagebox,
- \v!rechts=>\setcenterpagebox\hss\relax\toppagebox\bottompagebox,
- \v!onder=>\setcenterpagebox\leftpagebox\rightpagebox\vss\relax,
- \v!boven=>\setcenterpagebox\leftpagebox\rightpagebox\relax\vss,
- \v!dubbelzijdig=>\doublesidedprinttrue,
- \v!enkelzijdig=>\doublesidedprintfalse]}
-
-\def\complexstellayoutin[#1]%
- {\ConvertToConstant\doifnot{#1}{\v!reset}
- {\getparameters[\??ly][#1]%
- \checkforems[#1]}%
- \resetlayout
- \presetcenterpagebox}
-
-\def\simplestellayoutin%
- {\resetlayout
- \presetcenterpagebox}
-
-\def\stellayoutin%
- {\complexorsimpleempty{stellayoutin}}
-
-\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
- \resetlayout
- \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][\c!hoogte=,\c!regels=,#1]%
- \pushpagedimensions
- \doifelsenothing{\@@zaregels}
- {\showmessage{\m!layouts}{1}{\@@zahoogte,\realfolio}}
- {\showmessage{\m!layouts}{1}{\@@zaregels\space\v!regels,\realfolio}%
- \def\@@zahoogte{\@@zaregels\openlineheight}}%
- \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
- \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=\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 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
-
-\def\douitstellen%
- {\dorecurse{\nofpostponedblocks}
- {\haalbuffer[buf-\recurselevel]}%
- \doglobal\newcounter\nofpostponedblocks}
-
-\setvalue{\e!start\e!uitstellen}%
- {\doglobal\increment\nofpostponedblocks
- \showmessage{\m!layouts}{3}{\nofpostponedblocks}%
- \startbuffer[buf-\nofpostponedblocks]
- [\e!start\e!uitstellen][\e!stop\e!uitstellen]}
-
-%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)
-
-\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}%
- \immediatewriteutilitycommand%
- {\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
- \setglobalsystemreference\rt!page{\v!eerste\v!sub\v!pagina}\firstsubpage
- \setglobalsystemreference\rt!page{\v!laatste\v!sub\v!pagina}\lastsubpage
- \bgroup
- \ifnum\realpageno=\firstsubpage\relax
- \global\let\prevsubpage=\firstsubpage
- \else
- \xdef\prevsubpage{\realfolio}%
- \doglobal\decrement\prevsubpage
- \fi
- \setglobalsystemreference\rt!page{\v!vorige\v!sub\v!pagina}\prevsubpage
- \ifnum\realpageno=\lastsubpage\relax
- \global\let\nextsubpage=\lastsubpage
- \else
- \xdef\nextsubpage{\realfolio}%
- \doglobal\increment\nextsubpage
- \fi
- \setglobalsystemreference\rt!page{\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.
-
-\countdef\realpageno = 0 \realpageno = 1
-\countdef\userpageno = 1 \userpageno = 1
-\countdef\subpageno = 2 \subpageno = 0 % !!
-\countdef\arrangeno = 3 \arrangeno = 0 % !!
-
-% we don't want conflicts when \pageno is used by other
-% packages, like CWEB, so we redefine \pageno
-
-\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}
-
-\def\gotonextrealpage%
- {\global\advance\realpageno by 1
- \ifnum\realpageno>\lastpage
- \xdef\lastpage{\realfolio}%
- \fi
- \setglobalsystemreference\rt!page{\v!eerste\v!pagina}\firstpage
- \setglobalsystemreference\rt!page{\v!laatste\v!pagina}\lastpage
- \bgroup
- \ifnum\realpageno>1
- \advance\realpageno by -1
- \xdef\prevpage{\realfolio}%
-\setglobalsystemreference\rt!page{\v!achteruit}\prevpage
- \else
- \global\let\prevpage=\firstpage
-\setglobalsystemreference\rt!page{\v!achteruit}\lastpage
- \fi
- \setglobalsystemreference\rt!page{\v!vorige\v!pagina}\realfolio
- \egroup
- \bgroup
- \ifnum\realpageno<\lastpage\relax
- \advance\realpageno by 1
- \xdef\nextpage{\realfolio}%
- \setglobalsystemreference\rt!page{\v!pagina}\realfolio
-\setglobalsystemreference\rt!page{\v!vooruit}\realfolio
- \else
- \global\let\nextpage=\lastpage
- \setglobalsystemreference\rt!page{\v!pagina}\firstpage
-\setglobalsystemreference\rt!page{\v!vooruit}\firstpage
- \fi
- \setglobalsystemreference\rt!page{\v!volgende\v!pagina}\realfolio
- \egroup}
-
-\def\checkrealpage%
- {\global\realpageno=0
- \gotonextrealpage
- \global\let\checkrealpage=\relax}
-
-\def\realnumberofpages#1% meteen laden, voor andere files (met refs)
- {\gdef\lastpage{#1}%
- \global\let\realnumberofpages=\gobbleoneargument}
-
-\def\savenofpages%
- {\advance\realpageno by -1
- \immediatewriteutilitycommand{\realnumberofpages{\realfolio}}}%
-
-\def\totaalaantalpaginas%
- {\lastpage}
-
-\def\myshipout#1%
- {\voorpagina
- \dontshowcomposition
- \dosetuppaper{\papierformaat}{\the\papierbreedte}{\the\papierhoogte}%
- \ifarrangingpages
- \actualarrange
- {\thisisrealpage{\realfolio}#1}%
- \else
- \actualshipout
- {\thisisrealpage{\realfolio}#1}%
- \fi
- \gotonextrealpage
- \napagina}
-
-\newbox\postponedcontent
-
-\def\flushatshipout%
- {\dowithnextbox
- {\global\setbox\postponedcontent=\hbox
- {\box\postponedcontent\box\nextbox}%
- \global\ht\postponedcontent=\!!zeropoint
- \global\dp\postponedcontent=\!!zeropoint
- \global\wd\postponedcontent=\!!zeropoint}%
- \hbox}
-
-\def\actualshipout#1%
- {\shipout\vbox
- {\forgetall
- \offinterlineskip
- \mindermeldingen
- \vskip-1in
- \hskip-1in
- \hbox
- {\setbox0=\hbox{#1}% just in case there are objects there
- \setbox\scratchbox=\hbox{\the\everyshipout}%
- \smashbox\scratchbox
- \box\scratchbox
- \box\postponedcontent % evt ver naar links !
- \box0}}}
-
-\def\actualarrange#1%
- {\setbox0=\hbox{\thisisrealpage{\realfolio}#1}%
- \pusharrangedpage0
- \deadcycles=0}
-
-\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#2 : tekst, floats en footnotes
-% \dopagebody#1#2 : 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{}}
-
-% bewaren tvb documentatie
-%
-% \hbox to \hsize
-% {\en
-% \switchnaarkorps[5pt]%
-% \emergencystretch2em
-% \dimen0=\baselineskip
-% \baselineskip=\dimen0 plus 1pt
-% \hsize=.2\hsize
-% \vsize=2\hsize
-% \ruledvbox to \vsize{\input tufte \par}\hss
-% \ruledvbox to \vsize{\input tufte \par\kern-\prevdepth}\hss
-% \ruledvbox to \vsize{\input tufte \par\kern0pt}\hss
-% \ruledvbox to \vsize{\input tufte \par\vfill}\hss
-% \ruledvbox to \vsize{\input tufte \par\kern-\prevdepth\vfill}}
-%
-% \hbox to \hsize
-% {\en
-% \switchnaarkorps[5pt]%
-% \emergencystretch2em
-% \dimen0=\baselineskip
-% \baselineskip=\dimen0 plus 1pt
-% \hsize=.18\hsize
-% \vsize=2.5\hsize
-% \setbox0=\vbox{\input tufte\relax}%
-% \ruledvbox to \vsize{\unvcopy0}\hss
-% \ruledvbox to \vsize{\unvcopy0\kern-\dp0}\hss
-% \ruledvbox to \vsize{\unvcopy0\kern0pt}\hss
-% \ruledvbox to \vsize{\unvcopy0\vfill}\hss
-% \ruledvbox to \vsize{\unvcopy0\kern-\dp0\vfill}}
-
-% \def\dopagecontents#1#2%
-% {\dotopinsertions
-% \bgroup
-% \forgetall
-% \boxmaxdepth=\maxdepth
-% \dimen0=\dp#2%
-% \bgroup
-% #1#2\relax
-% \pushcolor
-% \dobotinsertions
-% \egroup
-% \ifr@ggedbottom
-% \kern-\dimen0
-% \vfil
-% \fi
-% \ifb@selinebottom
-% \kern-\dimen0
-% \kern\maxdepth
-% \fi
-% \egroup
-% \placefootnotes}
-
-\def\dopagecontents#1#2% \box<n> \unvbox<n>
- {\bgroup
- \forgetall
- \boxmaxdepth=\maxdepth
- \setbox0=\vbox to \teksthoogte
- {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
- \dotopinsertions
- \fuzzysnappedbox{#1}{#2}%
- \pushcolor
- \ifgridsnapping
- \vskip-\currentpagedepth
- \vskip\openstrutdepth % \dp\strutbox
- \prevdepth\openstrutdepth % \dp\strutbox
- \dobotinsertions
- \vfil
- \else\ifr@ggedbottom
- \vskip-\currentpagedepth
- \vskip\openstrutdepth % \dp\strutbox
- \prevdepth\openstrutdepth % \dp\strutbox
- \dobotinsertions
- \vfil
- \else\ifb@selinebottom
- \kern-\currentpagedepth
- \kern\maxdepth
- \dobotinsertions
- \fi\fi\fi
- \ifdim\ht\footins>\!!zeropoint % beter dan \ifvoid\footins\else
- \kern\skip\footins
- \kern\ht\footins
- \fi}%
- \ifgridsnapping
- \getnoflines\teksthoogte
- \advance\noflines by -1
- \scratchdimen=\noflines\lineheight
- \advance\scratchdimen by \topskip
- \else
- \scratchdimen=\ht0
- \fi
- \setbox2=\hbox
- {\ifvoid\savedfootins \else
- \setbox\footins=\box\savedfootins
- \fi
- \lower\scratchdimen\vbox{\placefootnotes}}%
- \smashbox2
- \ht0=\!!zeropoint
- \vbox to \teksthoogte
- {\box0\box2}%
- \egroup}
-
-\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
-
-\newif\ifshowgrid
-
-\def\toongrid%
- {\tracegridsnappingtrue
- \showgridtrue}
-
-\def\doplaatstekstblok#1#2%
- {\bgroup
- \setbox0=\hbox to \zetbreedte
- {\vbox to \teksthoogte
- {\offinterlineskip
- \boxmaxdepth\maxdepth
- \dopagecontents#1#2}}%
- \ht0=\teksthoogte
- \wd0=\zetbreedte
- \ifshowgrid
- \setgridbox2\zetbreedte\teksthoogte
- \hbox{\color[red]{\box2}\hskip-\zetbreedte\box0}%
- \else
- \box0
- \fi
- \egroup}
-
-\def\getmainbox#1#2%
- {\setbox0=\vbox
- {\offinterlineskip % na \paginaletter !
- \calculatereducedvsizes
- \calculatehsizes
- \swapmargins
- \vskip\hoofdhoogte
- \vskip\hoofdafstand
- \hbox
- {\bgroup
- \swapmargins
- \goleftonpage
- \plaatslinkerrandblok
- \hskip\linkerrandafstand
- \showpageseparation
- \plaatslinkermargeblok
- \hskip\linkermargeafstand
- \egroup
- \doplaatstekstblok#1#2%
- \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%
- {\printpapierbreedte=\papierschaal\printpapierbreedte
- \printpapierhoogte =\papierschaal\printpapierhoogte
- \setbox#1=\vbox to \printpapierhoogte
- {\toppagebox
- \hbox to \printpapierbreedte
- {\ifdoublesidedprint
- \doifbothsides
- \leftpagebox\box#1\rightpagebox
- \orsideone
- \leftpagebox\box#1\rightpagebox
- \orsidetwo
- \rightpagebox\box#1\leftpagebox
- \od
- \else
- \leftpagebox\box#1\rightpagebox
- \fi}
- \bottompagebox}}
-
-\def\offsetprintbox#1%
- {\dimen0=\wd#1\dimen2=\ht#1\dimen4=\dp#1%
- \setbox#1=\vbox
- {\forgetall
- \offinterlineskip
- \vskip\kopoffset
- \doifbothsides
- \hskip\rugoffset
- \orsideone
- \hskip\rugoffset
- \orsidetwo
- \hskip-\rugoffset
- \od
- \box#1}%
- \wd#1=\dimen0\ht#1=\dimen2\dp#1=\dimen4}
-
-\def\replicatebox#1#2#3%
- {\setbox#1=\vbox
- {\forgetall
- \offinterlineskip
- \dorecurse{#3}{\hbox{\dorecurse{#2}{\copy#1}}}}}
-
-\def\replicatepagebox#1%
- {\ifnum\@@lynx>0 \ifnum\@@lyny>0
- \replicatebox{#1}{\@@lynx}{\@@lyny}%
- \fi\fi}
-
-\def\rotatepagebodybox#1#2#3%
- {\ifnum#2#3>0
- \setbox#1=\vbox
- {\edef\somerotation%
- {\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}%
- \dorotatebox\somerotation\hbox{\box#1}}%
- \fi}
-
-\def\rotatepaperbox#1%
- {\rotatepagebodybox{#1}\paperrotation\paperreverse}
-
-\def\rotateprintbox#1%
- {\rotatepagebodybox{#1}\printrotation\printreverse}
-
-\def\mirrorpagebodybox#1#2%
- {\ifcase#2\or
- \setbox#1=\vbox
- {\domirrorbox\vbox{\box#1}}%
- \fi}
-
-\def\mirrorpaperbox#1%
- {\mirrorpagebodybox{#1}\papermirror}
-
-\def\mirrorprintbox#1%
- {\mirrorpagebodybox{#1}\printmirror}
-
-\def\scalepagebox#1%
- {\ifdim\@@lyschaal pt=1pt \else
- \setbox#1=\vbox
- {\schaal[\c!sx=\@@lyschaal,\c!sy=\@@lyschaal]{\box#1}}%
- \papierbreedte=\@@lyschaal\papierbreedte
- \papierhoogte =\@@lyschaal\papierhoogte
- \fi}
-
-\def\negateprintbox#1%
- {\ifnegateprintbox
- \negatecolorbox{#1}%
- \fi}
-
-\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\pagecutmarksymbol%
- {\the\realpageno}%
-
-\def\addpagecutmarks#1%
- {\doif{\@@lymarkering}{\v!aan}
- {\let\cutmarksymbol=\pagecutmarksymbol
- \makecutbox{#1}}}
-
-\def\addpagecolormarks#1%
- {\doif{\@@lymarkering}{\v!kleur}
- {\let\cutmarksymbol=\pagecutmarksymbol
- \makecutbox{#1}%
- \ifnum\horizontalcutmarks>1 \chardef\colormarkoffset=4 \fi
- \ifnum\verticalcutmarks >1 \chardef\colormarkoffset=4 \fi
- \colormarkbox{#1}}}
-
-\newif\ifpagebodyornaments \pagebodyornamentstrue
-\newif\ifarrangingpages \arrangingpagesfalse
-
-\let\poparrangedpages=\relax
-\let\pusharrangedpage=\relax
-
-\def\reportarrangedpage#1%
- {\showmessage
- {\m!systems}{23}
- {\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,#1}}
-
-\def\buildpagebody#1#2%
- {\vbox
- {\forgetall % igv problemen, check: \boxmaxdepth\maxdimen
- \mindermeldingen
- \setbox0=\vbox
- {\doconvertfont{\@@lyletter}{}%
- \offinterlineskip
- \ifpagebodyornaments
- \getbackgroundbox
- \getlogobox
- \gettextboxes
- \fi
- \getmainbox#1#2}%
- \buildpagebox0
- \ifpagebodyornaments
- \addpagebackground0
- \fi
- \ifarrangingpages \else
- \addpagecutmarks0
- \replicatepagebox0
- \scalepagebox0
- \mirrorpaperbox0
- \rotatepaperbox0
- \addpagecolormarks0
- \centerpagebox0
- \mirrorprintbox0
- \rotateprintbox0
- \offsetprintbox0
- \negateprintbox0
- \fi
- \box0}}
-
-\def\finishpagebox#1%
- {\ifarrangingpages
- \addpagecutmarks#1%
- \addpagecolormarks#1%
- \centerpagebox#1%
- \mirrorprintbox#1%
- \rotateprintbox#1%
- \offsetprintbox#1%
- \negateprintbox#1%
- \fi}
-
-% TBV testdoeleinden:
-
-\def\dotoonprint[#1][#2][#3]%
- {\omlijnd
- [\c!offset=\v!overlay,
- \c!strut=\v!nee]
- {\forgetall
- \mindermeldingen
- \globaldefs=-1
- \dimen0=\pagegoal
- \definieerpapierformaat[X][\c!breedte=4em, \c!hoogte=6em]%
- \definieerpapierformaat[Y][\c!breedte=12em,\c!hoogte=14em]%
- \stelpapierformaatin[#1,X][#2,Y]%
- \stellayoutin[#3]%
- \setbox0=\vbox
- {\omlijnd
- [\c!offset=\v!overlay,\c!strut=\v!nee,
- \c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
- {\ss ABC\par DEF}}%
- \dubbelzijdigfalse
- \def\cutmarklength{.5em}%
- \addpagecutmarks0%
- \replicatepagebox0%
- \scalepagebox0%
- \mirrorpaperbox0%
- \rotatepaperbox0%
- \centerpagebox0%
- \mirrorprintbox0%
- \rotateprintbox0%
- \offsetprintbox0%
- \pagegoal=\dimen0
- \box0}}
-
-\def\toonprint%
- {\dotripleempty\dotoonprint}
-
-% \switchnaarkorps[8pt]
-%
-% \startcombinatie[4*4]
-% {\toonprint} {\strut}
-% {\toonprint[][][plaats=midden]} {\type{plaats=midden}}
-% {\toonprint[][][plaats=midden,markering=aan]} {\type{markering=aan}\break
-% \type{plaats=midden}}
-% {\toonprint[][][plaats=midden,markering=aan,nx=2]} {\type{markering=aan}\break
-% \type{plaats=midden}\break
-% \type{nx=2}}
-% {\toonprint[][][plaats=links]} {\type{plaats=links}}
-% {\toonprint[][][plaats=rechts]} {\type{plaats=rechts}}
-% {\toonprint[][][plaats={links,onder}]} {\type{plaats={links,onder}}}
-% {\toonprint[][][plaats={rechts,onder}]} {\type{plaats={rechts,onder}}}
-% {\toonprint[][][nx=2,ny=1]} {\type{nx=2,ny=1}}
-% {\toonprint[][][nx=1,ny=2]} {\type{nx=1,ny=2}}
-% {\toonprint[][][nx=2,ny=2]} {\type{nx=2,ny=2}}
-% {\toonprint[][][nx=2,ny=2,plaats=midden]} {\type{nx=2,ny=2}\break
-% \type{plaats=midden}}
-% {\toonprint[][][rugoffset=3pt]} {\type{rugoffset=.5cm}}
-% {\toonprint[][][kopoffset=3pt]} {\type{kopoffset=.5cm}}
-% {\toonprint[][][schaal=1.5]} {\type{schaal=1.5}}
-% {\toonprint[][][schaal=0.8]} {\type{schaal=0.8}}
-% \stopcombinatie
-%
-% \startcombinatie[3*4]
-% {\toonprint[liggend][][plaats=midden]} {\type{liggend}}
-% {\toonprint[][liggend][plaats=midden]} {\strut\break\type{liggend}}
-% {\toonprint[liggend][liggend][plaats=midden]} {\type{liggend}\break\type{liggend}}
-% {\toonprint[90][][plaats=midden]} {\type{90}}
-% {\toonprint[][90][plaats=midden]} {\strut\break\type{90}}
-% {\toonprint[90][90][plaats=midden]} {\type{90}\break\type{90}}
-% {\toonprint[180][][plaats=midden]} {\type{180}}
-% {\toonprint[][180][plaats=midden]} {\strut\break\type{180}}
-% {\toonprint[180][180][plaats=midden]} {\type{180}\break\type{180}}
-% {\toonprint[gespiegeld][][plaats=midden]} {\type{gespiegeld}}
-% {\toonprint[][gespiegeld][plaats=midden]} {\strut\break\type{gespiegeld}}
-% {\toonprint[gespiegeld][gespiegeld][plaats=midden]} {\type{gespiegeld}\break\type{gespiegeld}}
-% \stopcombinatie
-
-\chardef\normalpagebox=255
-
-\def\dopagebody#1#2%
- {\getallmarks
- \restoreglobalbodyfont
- \startcolorpage
- \gotonextsubpage
- \dontshowboxes
- \naastpagina
- \checkreferences
- \checkmargeblokken
- \dotoks\beforeeverypage
- \flushtoks\beforepage
- \inpagebodytrue
- \buildpagebody#1#2%
- \flushtoks\afterpage
- \dotoks\aftereverypage
- \resetpagina
- \updatelistreferences
- \resetlayoutregels % mischien in shipout
- \stopcolorpage}
-
-\def\beforefinaloutput%
- {}
-
-\def\afterfinaloutput%
- {\forgetall
- \vskip\!!zeropoint\relax
- \ifvoid\normalpagebox
- \else
- \unvbox\normalpagebox
- \penalty\outputpenalty
- \fi
- \ifnum\outputpenalty>-\@MM\relax
- \else
- \dosupereject
- \fi
- \inpagebodytrue % needed for enabling \blanko !
- \dosetbothinserts
- \setvsize % this is needed for interacting components, like floats and multicolumns
- \adaptfuzzypagegoal} % watch this hack!
-
-\def\setpagecounters%
- {\setuserpageno{\ruwenummer[\s!page]}%
- \doifelse{\@@snstatus}{\v!stop}
- {\global\subpageno=0}
- {\global\subpageno=\ruwenummer[\s!subpage]}}
-
-\def\dofinaloutput#1#2%
- {\beforefinaloutput
- \myshipout{\hbox{\dopagebody#1#2\setpagecounters}}%
- \afterfinaloutput
- \popcolor} % ... and here ...
-
-\def\donofinaloutput#1#2%
- {\beforefinaloutput
- \setpagecounters
- \message{[-\the\realpageno]}%
- \setbox0=\hbox
- {\the\everyshipout
- \dopagebody#1#2}%
- \deadcycles=0
- \gotonextrealpage
- \afterfinaloutput
- \popcolor} % ... and here
-
-\let\checkpageversion=\relax
-
-\def\finaloutput#1#2%
- {\checkpageversion
- \ifverwerken
- \ifgeselecteerd
- \dofinaloutput#1#2%
- \else
- \donofinaloutput#1#2%
- \fi
- \else
- \ifgeselecteerd
- \donofinaloutput#1#2%
- \else
- \dofinaloutput#1#2%
- \fi
- \fi
- \resetselectiepagina
- \verhoogpaginanummer
- \checkpagedimensions
- \ifnum\outputpenalty>-\@MM\relax
- \else
- \dosupereject
- \fi
- \douitstellen}
-
-\def\dooutput%
- {\finaloutput\unvbox\normalpagebox}
-
-\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]}
-
-\newif\ifwitruimteflexibel
-
-\def\dodostelwitruimtein[#1]%
- {\witruimteflexibeltrue
- \processallactionsinset
- [#1]
- [\v!herstel=>,
- \v!vast=>\witruimteflexibelfalse,
- \v!flexibel=>\witruimteflexibeltrue,
- \v!regel=>\tussenwit=\baselineskip,
- \v!halveregel=>\tussenwit=.5\baselineskip,
- \s!default=>\doifnot{\currentwitruimte}{\v!geen}
- {\stelwitruimteopnieuwin},
- \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig
- {\tussenwit}{\blankokleinmaat} % om loops af
- {\blankomiddelmaat}{\blankogrootmaat}]% % te vangen
- \edef\currentwitruimte%
- {\ifdim\tussenwit=\!!zeropoint
- \v!geen
- \else
- \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi
- \fi}%
- \ifgridsnapping
- \witruimteflexibelfalse
- \tussenwit=1\tussenwit
- \ifdim\tussenwit>\!!zeropoint
- \tussenwit=\baselineskip
- \fi
- \else
- \ifwitruimteflexibel \else \tussenwit=1\tussenwit \fi
- \fi
- \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\startopelkaar%
- {\dosingleempty\dostartopelkaar}
-
-\def\dostartopelkaar[#1]% nesting afvangen
- {\par
- \ifvmode
- \edef\lastdoneparskip{\the\lastskip}%
-\edef\lastdoneprevdepth{\the\prevdepth}% zeer recent toegevoegd
- \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\stopopelkaar%
- {\par
-\ifvmode
- \egroup
- \ifdim\lastskip=\noparskipsignal\relax
- \removelastskip
- \geenwitruimte
- \vskip-\lastdoneparskip
- \vskip+\lastdoneparskip
-\prevdepth-\lastdoneprevdepth % zeer recent toegevoegd
- \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!default=>\let\dorondomregelcorrectie=\relax,
- \s!unknown=>{\def\dorondomregelcorrectie{\blanko[#1]}}]%
- \dorondomregelcorrectie
- \startbaselinecorrection
- \offbaselinecorrection}
-
-\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.
-
-%D There are two ways to influence the interline spacing. The
-%D most general and often most consistent way is using
-%D
-%D \showsetup{\y!stelinterliniein}
-%D
-%D For instance
-%D
-%D \starttypen
-%D \setupinterlinespace[line=2.8ex]
-%D \stoptypen
-%D
-%D This setting adapts itself to the bodyfontsize, while for
-%D instance saying
-%D
-%D \starttypen
-%D \setupinterlinespace[line=12pt]
-%D \stoptypen
-%D
-%D sets things fixed for all sizes, which is definitely not
-%D what we want. Therefore one can also say:
-%D
-%D \starttypen
-%D \definecorpsenvironment[9pt][interlinespace=11pt]
-%D \stoptypen
-%D
-%D One can still use \type{\setupinterlinespace} (without
-%D arguments) to set the interline space according to the
-%D current font, e.g. a \type{\bfa}.
-
-\newif\iflocalinterlinespace
-
-\def\bodyfontinterlinespecs%
- {\??ft\normalizedbodyfontsize\c!interlinie}
-
-\def\bodyfontinterlinespace%
- {\csname\bodyfontinterlinespecs\endcsname}
-
-\def\presetnormallineheight%
- {\edef\normallineheight{\@@itregel}%
- \iflocalinterlinespace \else
- \doifdefined{\bodyfontinterlinespecs}
- {\doifsomething{\bodyfontinterlinespace}
- {\edef\normallineheight{\bodyfontinterlinespace}}}%
- \fi}
-
-\def\complexstelinterliniein[#1]% \commalistelement ipv #1
- {\doifassignmentelse{#1}
- {\getparameters[\??it][#1]%
- \scratchdimen=0\@@ithoogte pt
- \advance\scratchdimen by 0\@@itdiepte pt
- \ifdim\scratchdimen>1pt
- \showmessage{\m!layouts}{10}{\@@ithoogte,\@@itdiepte}%
- \let\@@ithoogte=\strutheightfactor
- \let\@@itdiepte=\strutdepthfactor
- \else
- \let\strutheightfactor=\@@ithoogte
- \let\strutdepthfactor =\@@itdiepte
- \fi
- \let\normallineheight=\@@itregel
- \let\topskipfactor =\@@itboven
- \let\maxdepthfactor =\@@itonder
- \setfontparameters} % overbodig \setstrut
- {\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%
- {\localinterlinespacetrue
- \setfontparameters
- \localinterlinespacefalse}
-
-\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\normalskipamount%
- {\openlineheight
- \ifgridsnapping \else \ifblankoflexibel
- \!!plus\skipgluefactor\openlineheight
- \!!minus\skipgluefactor\openlineheight
- \fi \fi
- \relax}
-
-\def\regelafstand{\normalskipamount}
-
-\def\deblankoskip{\skipfactor\regelafstand}
-
-\def\laatsteblankoskip%
- {\blankoskip}
-
-\def\geenblanko%
- {\removelastskip}
-
-\def\dosingleblanko#1% ook nog \v!halveregel+fuzzysnap
- {\doifelse{#1}{\v!regel}
- {\blankoskipamount=\openlineheight}
- {\ifgridsnapping
- \assigndimension{#1}{\blankoskipamount}%
- {.25\openlineheight}{.5\openlineheight}{\openlineheight}%
- \else
- \assigndimension{#1}{\blankoskipamount}%
- {\smallskipamount}{\medskipamount}{\bigskipamount}%
- \fi}%
- \global\advance\blankoskip by \blankoskipamount}
-
-\newif\iffuzzyvskip
-
-\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\ifdim\prevdepth>0pt\else\line{}\kern-\lineheight\fi,
- \v!regel=>\global\advance\blankoskip by \lineheight,
- \v!halveregel=>\global\fuzzyvskiptrue\global\advance\blankoskip by .5\lineheight,
- \s!unknown=>{\herhaalmetcommando[#1]\dosingleblanko}]}
-
-\def\oldprevdepth{\prevdepth}%
-\def\newprevdepth{-1001pt}
-
-\def\mindimen{0.00002pt}
-
-\def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if
- {\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
- \iffuzzyvskip
- \removelastfuzzyvskip
- \fuzzyvskip\blankoskip\relax
- \else
- \removelastskip
- \vskip\blankoskip\relax
- \fi
- \fi
- \else
- % Now, what happens to fuzzy skips?
- \fi
- \fi
- \fi
- \fi
- \global\fuzzyvskipfalse
- \presetindentation}
-
-\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=>\ifgridsnapping
- \edef\deblankoskip{\regelafstand}%
- \dostelblankoin{\deblankoskip}%
- \fi
- \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.
-
-\let\currentvoorwit=\empty
-
-\newdimen\voorwit
-
-\newif\ifindentfirstparagraph % \indentfirstparagraphtrue
-
-\def\presetindentation%
- {\ifindentfirstparagraph\else\noindentation\fi}
-
-\def\dostelinspringenin[#1]%
- {\processallactionsinset
- [#1]
- [ \v!eerste=>\indentfirstparagraphtrue,
- \v!volgende=>\indentfirstparagraphfalse,
- \s!default=>\dodostelinspringenin,
- \s!unknown=>\let\currentvoorwit=\commalistelement
- \dodostelinspringenin]}
-
-\def\dodostelinspringenin%
- {\assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}%
- \parindent=\voorwit\relax}
-
-\def\stelinspringenin%
- {\dosingleempty\dostelinspringenin}
-
-\def\doinspringen[#1]%
- {\processallactionsinset
- [#1]
- [ \v!nee=>\parindent=\voorwit\relax\noindent,
- \v!niet=>\parindent=\voorwit\relax\noindent,
- \v!ja=>\parindent=\voorwit\relax, % geen \indent !
- \v!eerste=>\indentfirstparagraphtrue,
- \v!volgende=>\indentfirstparagraphfalse,
- \v!altijd=>\parindent=\voorwit\relax, % geen \indent !
- \v!nooit=>\parindent=\!!zeropoint\relax]}
-
-\def\inspringen%
- {\dosingleargument\doinspringen}
-
-\def\nietinspringen{\inspringen[\v!nee,\v!volgende]}
-\def\welinspringen {\inspringen[\v!ja,\v!eerste]}
-
-%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}
- {\ifmmode
- \ifnum\fam<0
- \holatextfont
- \else
- \holamathfont
- \fi
- \else
- \holatextfont
- \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\relax}
-
-\def\stelkoppeltekenin%
- {\dodoubleargument\getparameters[\??kp]}
-
-\def\beginofsubsentence%
- {\ifdim\lastkern=\subsentencesignal
- \unskip
- \kern\subsentenceskip
- \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\ignorespaces}
-
-\def\endofsubsentence%
- {\ifodd\subsentencelevel
- \getvalue{\??la\currentlanguage\c!rightsentence}%
- \else
- \getvalue{\??la\currentlanguage\c!rightsubsentence}%
- \fi
- \doglobal\decrement\subsentencelevel
- \unskip
- \kern\subsentencesignal}
-
-\def\endofsubsentencespacing%
- {%\ifdim\lastkern=\subsentencesignal \else
- % \unskip
- %\fi
- \ifdim\lastkern=\subsentencesignal
- \unskip
- \hskip\subsentenceskip
- \ignorespaces
- \else
- \unskip
- \fi}
-
-% test |<|test |<|test|>| test|>| test \par
-% test|<|test|<|test|>|test|>|test \par
-% test |<||<|test|>||>| test \par
-
-\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\tooninstellingA#1#2%
- {\ifx#2\??ly
- #1&\dimen0=\getvalue{#2#1}\PtToCm{\the\dimen0}&\dimen0=\getvalue{#2#1}\the\dimen0&\cr
- \else
- #1&\PtToCm{\the#2}&\the#2&\tttf\string#2\cr
- \fi}
-
-\def\tooninstellingB#1#2#3%
- {#1&&#2#3&\tttf\string#3\cr}
-
-\def\tooninstellingen% % engels maken
- {\noindent
- \vbox
- {\forgetall
- \mindermeldingen
- \switchtobodyfont[\v!klein]
- \tabskip\!!zeropoint
- \halign
- {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
- \tooninstellingA{papierhoogte} \papierhoogte
- \tooninstellingA{papierbreedte} \papierbreedte
- \tooninstellingA{printpapierhoogte} \printpapierhoogte
- \tooninstellingA{printpapierbreedte} \printpapierbreedte
- \tooninstellingA{kopwit} \kopwit
- \tooninstellingA{rugwit} \rugwit
- \tooninstellingA{hoogte} \zethoogte
- \tooninstellingA{breedte} \zetbreedte
- \tooninstellingA{teksthoogte} \teksthoogte
- \tooninstellingA{tekstbreedte} \tekstbreedte
- \tooninstellingA{bovenafstand} \??ly
- \tooninstellingA{hoofd} \hoofdhoogte
- \tooninstellingA{hoofdafstand} \??ly
- \tooninstellingA{boven} \bovenhoogte
- \tooninstellingA{voetafstand} \??ly
- \tooninstellingA{voet} \voethoogte
- \tooninstellingA{onderafstand} \??ly
- \tooninstellingA{onder} \onderhoogte
- \tooninstellingA{linkerrand} \linkerrandbreedte
- \tooninstellingA{linkerrandafstand} \??ly
- \tooninstellingA{linkermarge} \linkermargebreedte
- \tooninstellingA{linkermargeafstand} \??ly
- \tooninstellingA{rechtermargeafstand}\??ly
- \tooninstellingA{rechtermarge} \rechtermargebreedte
- \tooninstellingA{rechterrandafstand} \??ly
- \tooninstellingA{rechterrand} \rechterrandbreedte
- \noalign{\blanko}
- \tooninstellingB{korps} \the \globalbodyfontsize
- \noalign{\blanko}
- \tooninstellingB{regel} \relax \normallineheight
- \tooninstellingB{hoogte} \relax \strutheightfactor
- \tooninstellingB{diepte} \relax \strutdepthfactor
- \tooninstellingB{boven} \relax \topskipfactor
- \tooninstellingB{onder} \relax \maxdepthfactor}}}
-
-\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%
- {\immediatewriteutilitycommand%
- {\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
- \doadaptleftskip{\getvalue{\??op1\c!marge}}%
- \dosetraggedcommand{\@@oouitlijnen}\raggedcommand
- \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
- \dosomebreak\allowbreak % toegevoegd
- \getvalue{\??op1\c!na}%
- \doif{\@@oospringvolgendein}{\v!nee}{\noindentation}%
- \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 \??dd#1\s!do\c!commando levert 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!status moet in dat geval \v!start zijn.
-%
-% herimplementeren met \nextbox en \unhbox\unvbox
-
-\newbox\@@definitiebox
-
-\def\@@definitiewoord#1%
- {\getvalue{\??dd#1\s!do\c!commando}{#1}}
-
-\def\normal@@definitiewoord#1[#2]#3%
- {\doattributes
- {\??dd#1\v!kop}
- {\getvalue{\??dd#1\c!commando}%
- {\begstrut\getvalue{\??dd#1\c!tekst}#3\endstrut}}%
- \rawreference{\s!def}{#2}{#3}}
-
-\def\@@definitielinks#1%
- {\@@definitiehang{#1}\@@definitielinkspure\@@definitielinkshang}
-
-\def\@@definitierechts#1%
- {\@@definitiehang{#1}\@@definitierechtspure\@@definitierechtshang}
-
-\def\@@definitiehang#1#2#3%
- {\processaction
- [\getvalue{\??dd#1\c!hang}]
- [ \v!geen=>\let\next=#2,
- 0=>\let\next=#2,
- \s!unknown=>\let\next=#3,
- \s!default=>\let\next=#2]%
- \next{#1}}
-
-\def\@@definitielinkspure#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \advance\leftskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedright%
- \advance\leftskip by \!!widthb
- \llap
- {\hbox to \leftskip{\copy\@@definitiebox\hss}}%
- \@@dodefinitie{#1}}
-
-\def\@@definitierechtspure#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \advance\rightskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedleft%
- \rlap
- {\hskip\hsize
- \hskip-\leftskip
- \hskip-\rightskip
- \copy\@@definitiebox}%
- \advance\rightskip by \!!widthb
- \@@dodefinitie{#1}}
-
-\def\@@makedefinitiepurebox#1#2%
- {\setbox\@@definitiebox=\vtop
- {\hsize\!!widtha
- \leftskip\!!zeropoint
- \rightskip\!!zeropoint
- #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]%
- \unhcopy\@@definitiebox}%
- \ht\@@definitiebox=\ht\strutbox
- \dp\@@definitiebox=\dp\strutbox}
-
-\def\@@definitielinkshang#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \mindermeldingen
- \advance\!!widtha by \!!widthb
- \hangindent=\!!widtha
- \@@makedefinitiehangbox{#1}{\raggedright}{\advance\rightskip by \!!widthb}%
- \llap
- {\dontshowcomposition
- \vtop to \!!zeropoint{\box\@@definitiebox}}%
- \@@dodefinitie{#1}}%
-
-\def\@@definitierechtshang#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \mindermeldingen
- \advance\!!widtha by \!!widthb
- \hangindent=-\!!widtha
- \@@makedefinitiehangbox{#1}{\raggedleft}{\advance\leftskip by \!!widthb}%
- \rlap
- {\dontshowcomposition
- \dimen0=\hsize
- \advance\dimen0 by -\leftskip
- \advance\dimen0 by -\rightskip
- \hbox to \dimen0
- {\hss\vtop to \!!zeropoint{\box\@@definitiebox}}}%
- \@@dodefinitie{#1}}
-
-\def\@@makedefinitiehangbox#1#2#3%
- {\setbox\@@definitiebox=\vtop % \vbox gaat fout in hang
- {\forgetall
- \hsize\!!widtha
- #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]#3%
- \unhcopy\@@definitiebox}%
- \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\@@definitieboven#1[#2]#3%
- {%\pagina[\v!voorkeur]% % Weg ermee!
- \dosomebreak{\goodbreak}% % Dit is beter en nodig!
- \@@dostartdefinitie{#1}[#2]{\let\\=\space#3}%
- \copy\@@definitiebox
- \nobreak
- \getvalue{\??dd#1\c!tussen}%
- \@@dodefinitie{#1}}
-
-\def\@@definitieinmarge#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \inmarge{\unhcopy\@@definitiebox}%
- \@@dodefinitie{#1}}
-
-\def\@@definitieinlinker#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \inlinker{\unhcopy\@@definitiebox}%
- \@@dodefinitie{#1}}
-
-\def\@@definitieinrechter#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \inrechter{\unhcopy\@@definitiebox}%
- \@@dodefinitie{#1}}
-
-\def\@@definitieaanelkaarpassend#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \unhcopy\@@definitiebox
- \@@dodefinitie{#1}}
-
-\def\@@definitieaanelkaarruim#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \hbox spread \!!widthb
- {\unhcopy\@@definitiebox\hss}%
- \@@dodefinitie{#1}}
-
-\def\@@definitieaanelkaarbreed#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \hbox to \!!widtha
- {\unhcopy\@@definitiebox\hss}%
- \kern\!!widthb
- \ignorespaces
- \@@dodefinitie{#1}}
-
-\def\@@definitieaanelkaar#1[#2]#3%
- {\processaction
- [\getvalue{\??dd#1\c!breedte}]
- [\v!passend=>\let\next=\@@definitieaanelkaarpassend,
- \v!ruim=>\let\next=\@@definitieaanelkaarruim,
- \s!unknown=>\let\next=\@@definitieaanelkaarbreed,
- \s!default=>\let\next=\@@definitieaanelkaarruim]%
- \next{#1}[#2]{#3}}
-
-\def\@@definitiehangend#1[#2]#3%
- {\skip0=-\leftskip % uggly trick
- \@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
- \advance\skip0 by \leftskip % but useful
- \ifdim\skip0=\!!zeropoint
- \skip0=1.5em % just some default
- \advance\leftskip by \skip0
- \fi
- \hskip-\skip0 % no hang in the first line
- \unhcopy\@@definitiebox
- \ifdim\!!widthb=\!!zeropoint
- \kern.75em % another default
- \else
- \kern\!!widthb
- \fi
- \ignorespaces
- \@@dodefinitie{#1}}
-
-\def\@@dostartdefinitie#1[#2]#3%
- {\getvalue{\??dd#1\c!voor}%
- \begingroup
- \doadaptleftskip{\getvalue{\??dd#1\c!marge}}%
- \showcomposition
- \setbox\@@definitiebox=\hbox
- {\forgetall
- \def\\{\crcr}%
- \doattributes
- {\??dd#1\v!kop}
- {\@@definitiewoord{#1}[#2]{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}%
- \!!widthb=\getvalue{\??dd#1\c!afstand}\relax
- \ifdim\!!widthb=\!!zeropoint\relax
- \doifvalue{\??dd#1\c!breedte}{\v!ruim}{\!!widthb=1em}%
- \fi
- \assignwidth
- {\!!widtha}
- {\getvalue{\??dd#1\c!breedte}}
- {\doifelsevaluenothing{\??dd#1\c!monster}
- {\unhcopy\@@definitiebox}
- {\doattributes{\??dd#1\v!kop}
- {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
- {\!!widthb}%
- %\getvalue{\??dd#1\s!do\c!lokaal}%
- \parindent=\!!zeropoint\relax
- \noindent
- \ignorespaces}
-
-\def\@@stopdefinitie#1%
- {\par
- \dostopattributes
- \endgroup
- \egroup % temporary hack
- \getvalue{\??dd#1\c!na}%
- \doifvalue{\??dd#1\c!springvolgendein}{\v!nee}{\noindentation}%
- \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]% % beter: \ifsingleargument
- {\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!marge,
- \c!springvolgendein,\c!uitlijnen,\c!tekst,\c!afstand,\c!commando]%
- \getparameters[\??dd#1]
- [\s!do\c!status=\v!stop,
- \s!do\c!commando=\normal@@definitiewoord,
- #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!status}{\v!start}
- {\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
-
-\def\special@@definitiewoord#1#2#3#4[#5]#6%
- {\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}
- {\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
- \ExpandBothAfter\doattributes
- {\??dd#1\v!kop}
- {\showdnpuretext{#2#1}}%
- \rawreference{\s!num}{#5}{}%
- \fi}
-
-\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!status=\v!start,
- \s!do\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!afstand,\c!commando,
- \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
- \c!niveaus,\c!wijze,\c!blokwijze,\c!scheider,\c!marge,
- \c!springvolgendein,\c!afsluiter,\c!sectienummer,\c!nummer]%
- \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!afstand,\c!commando,\c!marge,
- \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
- \c!springvolgendein,\c!links,\c!rechts,\c!koppeling]%
- \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}}}
- {1em}%
- \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 >= 1500 % was 200
-% \raggedness = 2 .. 6\korpsgrootte
-
-\def\leftraggedness {2\korpsgrootte}
-\def\rightraggedness {2\korpsgrootte}
-\def\middleraggedness {6\korpsgrootte}
-
-\def\setraggedness#1%
- {\ifnum\tolerance<1500\relax % kleinere waarden
- \tolerance=1500\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\doalignline#1#2%
- {\dowithnextbox
- {\noindent\hbox to \hsize
- {\strut#1\unhbox\nextbox#2}}
- \hbox}
-
-\def\regellinks {\doalignline \relax \hss }
-\def\regelrechts {\doalignline \hss \relax}
-\def\regelmidden {\doalignline \hss \hss }
-
-\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} % vervallen
-\def\woordinrechter{\inrechtermarge} % vervallen
-
-\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
-
-% dummy page & insert check
-%
-% \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!even=>\doifonevenpaginaelse
-% {\ejectinsert\ejectpage}{},
-% \v!oneven=>\doifonevenpaginaelse
-% {}{\ejectinsert\ejectpage},
-% \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
-% \ifodd\realpageno \else
-% \stelvoetin[\c!status=\v!leeg]%
-% \stelhoofdin[\c!status=\v!leeg]%
-% \hardespatie
-% \vfill
-% \ejectpage
-% \fi
-% \od},
-% \s!unknown=>\doifnumberelse{#1}
-% {\ejectinsert
-% \ejectpage
-% \loop
-% \ifnum\userpageno<#1\relax
-% \hardespatie
-% \vfill
-% \ejectinsert
-% \ejectpage
-% \repeat}
-% {}]}
-
-\def\insertdummypage%
- {\ejectinsert % beter
- \hardespatie
- \vfill
- \ejectpage}
-
-\def\docomplexpagina[#1]%
- {\flushfootnotes
- \bgroup
- \processallactionsinset
- [#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!blanko=>\pagebodyornamentsfalse,
- \v!nee=>\ifpaginageblokkeerd\else
- \dosomebreak\nobreak
- \fi,
- \v!voorkeur=>{\ifpaginageblokkeerd\else
- \ifbinnenkolommen
- \dosomebreak\goodbreak
- \else
- \testpagina[3][\!!zeropoint]%
- \fi
- \fi},
- \v!grotevoorkeur=>{\ifpaginageblokkeerd\else
- \ifbinnenkolommen
- \dosomebreak\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]}%
- \insertdummypage},
- \v!links=>{\ejectinsert
- \superejectpage
- \doifbothsidesoverruled
- \orsideone
- \resetcurrentsectionmarks
- \insertdummypage
- \orsidetwo
- \od},
- \v!rechts=>{\ejectinsert
- \superejectpage
- \doifbothsidesoverruled
- \orsideone
- \orsidetwo
- \resetcurrentsectionmarks
- \insertdummypage
- \od},
- \v!even=>\pagina
- \doifonevenpaginaelse
- {\resetcurrentsectionmarks\insertdummypage}{},
- \v!oneven=>\pagina
- \doifonevenpaginaelse
- {}{\resetcurrentsectionmarks\insertdummypage},
- \v!viertal=>{\ifdubbelzijdig
- \!!counta=\realpageno
- \!!countb=\realpageno
- \divide\!!counta by 4
- \divide\!!countb by 2
- \ifnum\!!counta=\!!countb
- \else
- \pagina
- \pagina[\v!leeg]%
- \pagina[\v!leeg]%
- \fi
- \fi},
- \v!laatste=>{\ejectinsert
- \superejectpage
- \doifbothsidesoverruled
- \naastpagina
- \orsideone
- \orsidetwo
- %\ifodd\realpageno \else % kan weer weg
- \geenhoofdenvoetregels
- \insertdummypage
- %\fi
- \od
- \filluparrangedpages},
- \s!unknown=>\doifnumberelse{#1}
- {\ejectinsert
- \ejectpage
- \loop
- \ifnum\userpageno<#1\relax
- \insertdummypage
- \repeat}
- {}]%
- \egroup}
-
-\def\complexpagina[#1]%
- {\expanded{\docomplexpagina[#1]}}
-
-\def\simplepagina%
- {\docomplexpagina[\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]}
- {\currentdate}
- {\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]%
- {\ifsecondargument
- \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
- \else
- \dosixtupleempty\dodododoteksten[#1][\v!tekst][][][][]%
- \dosixtupleempty\dodododoteksten[#1][\v!marge][][][][]%
- \dosixtupleempty\dodododoteksten[#1][\v!rand] [][][][]%
- \fi
- \dosetpagenumberlocation\@@plaatspaginanummer}
-
-\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!geenmarkering=>\bgroup
- \setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
- \let\dohaalmarkering=\nohaalmarkering
- \doplaatslayoutregel{#1}{#2}%
- \egroup,
- \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, iets als:
-
-% \def\dodosetpagenumberlocation#1#2%
-% {\let\somepagenumberlocation=\v!tekst
-% \ExpandFirstAfter\processallactionsinset
-% [\@@nmplaats]
-% [ \v!midden=>\setvalue{\??tk#1\somepagenumberlocation\c!middentekst}{#2},
-% \v!links=>\setvalue{\??tk#1\somepagenumberlocation\c!linkertekst}{#2},
-% \v!rechts=>\setvalue{\??tk#1\somepagenumberlocation\c!rechtertekst}{#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}
-% \v!rand=>\let\somepagenumberlocation=\v!rand,
-% %\v!marge=>\let\somepagenumberlocation=\v!marge,
-% \v!tekst=>\let\somepagenumberlocation=\v!tekst]}
-
-\def\dodosetpagenumberlocation#1#2%
- {\ExpandFirstAfter\processallactionsinset
- [\@@nmplaats]
- [ \v!midden=>\setvalue{\??tk#1\v!tekst\c!middentekst}{#2},
- \v!links=>\setvalue{\??tk#1\v!tekst\c!linkertekst}{#2},
- \v!rechts=>\setvalue{\??tk#1\v!tekst\c!rechtertekst}{#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%
- {\dosingleempty\dostelnummeringin}
-
-% listig: hangt af van \@@kolijst
-
-\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\pagenumber%
- {\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}%
- \pagenumber
- \@@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\nohaalmarkering[#1][#2]% tzt anders
- {}
-
-\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%
- {\flushsidefloats
- \getvalue{\??ko#1\c!voor}%
- %\witruimte vervangen door \noindent elders
- \relax
- \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 / engels
- {\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}}%
- \doifnothing{\@@koppeling}
- {\edef\@@koppeling{#1}}%
- \doifnothing{\@@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
- \def\next%
- {\dododosomekop{#1}[#2]{\sectiebloklabel{#1}}{#3}{#4}}%
- \else
- \def\next%
- {\dododosomekop{#1}[#2]{\sectiebloklabel{#1}}{\getvalue{\@@sectie\c!nummer}}{#3}}%
- \fi
- \next}
-
-\def\dododosomekop#1[#2]#3#4#5% % pas met \ExpandFirstAfter op bij twee||taligheid
- {\flushingcolumnfloatsfalse
- \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}%
- \edef\numberheaddistance {\getvalue{\??ko#1\c!afstand}}%
- \edef\numberheadalternative{\getvalue{\??ko#1\c!variant}}%
- \dostelkopvariantin[\numberheadalternative]%
- \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}%
- \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
- \ifkopprefix
- \setupreferencing[\c!prefix=-]%
- \fi
- \getvalue{\e!volgende\@@sectie}%
- \getvalue{\??ko#1\c!tussen}%
- \ifkopnummer
- \noindent % ipv \witruimte elders
- \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}% }%
- \bepaalkopnummer[#1]%
- \expanded{\markeer[#1\v!nummer]{\getvalue{\@@sectie\c!nummer}}}}%
- \writesection{#1}{#4}{#5}%
- \else
- \noindent % ipv \witruimte elders
- \doplaatskoptekst
- {#1}
- {\setsectionlistreference{\@@sectie}{#1}%
- \ExpandFirstAfter\soortpagina[\@@koppeling]%
- \rawpagereference{\s!sec}{#2}%
- \resetsectionmarks[\@@sectie]%
- \doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}}
- {#5}
- {\markeer[#1]{#5}% }%
- \bepaalkopnummer[#1]%
- \expanded{\markeer[#1\v!nummer]{\getvalue{\@@sectie\c!nummer}}}}%
- \writesection{#1}{-}{#5}%
- \fi
- \ifkopprefix
- \ExpandFirstAfter\setupreferencing[\c!prefix=\getvalue{\??ko#1\c!prefix}]%
- \fi
- \dosomebreak\nobreak
- \ifdisplaysectionhead\getvalue{\??ko#1\c!na}\fi
- \else
- \dohandelpaginaafB{#1}% toegevoegd ivm subpaginanr / tug sheets
- \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
- \ifkopprefix
- \setupreferencing[\c!prefix=-]%
- \fi
- \getvalue{\e!volgende\@@sectie}%
- \getvalue{\??ko#1\c!tussen}%
- \setsectionlistreference{\@@sectie}{#1}%
- \resetsectionmarks[\@@sectie]%
- \markeer[#1]{#5}%
- \bepaalkopnummer[#1]%
- \expanded{\markeer[#1\v!nummer]{\getvalue{\@@sectie\c!nummer}}}%
- \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\setupreferencing[\c!prefix=\getvalue{\??ko#1\c!prefix}]%
- \fi
- \fi
- \else
- \ifplaatskop
- \handelpaginaaf{#1}%
- \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
- \getvalue{\??ko#1\c!tussen}%
- \noindent % ipv \witruimte elders
- \doplaatskoptekst
- {#1}
- {\rawpagereference{\s!sec}{#2}}
- {#5}
- {}%
- \writesection{#1}{-}{#5}%
- \dosomebreak\nobreak
- \ifdisplaysectionhead\getvalue{\??ko#1\c!na}\fi
- \else
- % do nothing
- \fi
- \fi
- \flushingcolumnfloatstrue
- \ifdisplaysectionhead\else\expandafter\GotoPar\fi}
-
-% \prevdepth\dp\strutbox is belangrijk, vergelijk naast elkaar:
-%
-% \onderwerp{test} \input tufte
-% \onderwerp{test} \strut \input tufte
-% \onderwerp{test} \plaatslijst[...]
-
-\def\doplaatskoptekst#1#2#3#4%
- {\bgroup
- \forgetall
- %\showcomposition
- \mindermeldingen
- \postponefootnotes
- \def\localkopsetup%
- {\dolocalkopsetup{#1}}%
- \startsynchronisatie
- \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
- {\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}%
- \ifdisplaysectionhead\endgraf\fi}}}}%
- \ifdisplaysectionhead
- \endgraf
- \nointerlineskip
- \dosomebreak\nobreak
- \fi
- #4%
- \ifdisplaysectionhead
- \prevdepth\openstrutdepth % \dp\strutbox % ivm grid
- \fi
- \stopsynchronisatie
- \egroup
- \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}}
-
-\def\doplaatskopnummertekst#1#2#3#4#5%
- {\bgroup
- \forgetall
- %\showcomposition
- \mindermeldingen
- \postponefootnotes
- \def\localkopsetup%
- {\dolocalkopsetup{#1}}%
- \startsynchronisatie
- \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
- {\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}%
- \ifdisplaysectionhead\endgraf\fi}}}}%
- \ifdisplaysectionhead
- \endgraf
- \nointerlineskip
- \dosomebreak\nobreak
- \fi
- #5%
- \ifdisplaysectionhead
- \prevdepth\openstrutdepth % \dp\strutbox % important, see comment
- \fi
- \stopsynchronisatie
- \egroup
- \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\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}
-%
-% beter :
-
-\def\huidigekopnummer{0}
-
-\def\bepaalkopnummer[#1]%
- {\bgroup
- \setsectieenkoppeling{#1}%
- \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
- \egroup}
-
-\def\dokopnummer[#1]%
- {\bgroup
- \setsectieenkoppeling{#1}%
- \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
- \doifnot{\huidigekopnummer}{0}
- {\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}\hskip\numberheaddistance}%
- \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\plaatskopmidden#1#2%
- {\vbox
- {\localkopsetup
- \raggedcenter
- \doifsomething{#1}{\strut#1\par}\begstrut#2}}
-
-\def\plaatskopunknown#1#2%
- {}
-
-\def\plaatskopintekst#1#2%
- {\bgroup
- \localkopsetup
- \doifsomething{#1}{{#1}\hskip\numberheaddistance}%
- {\begstrut#2}%
- \hskip\numberheaddistance
- \egroup}
-
-% default == instellingen
-% koppeling == koppen, breaks, marks, enz.
-% sectie == nummering
-
-\let\@@kolijst=\empty
-
-\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!afstand=,
- \c!pagina=,
- \c!hoofd=,
- \c!letter=,
- \c!nummercommando=,
- \c!tekstcommando=,
- \c!eigennummer=\v!nee,
- \c!nummer=\v!ja,
- \c!kleur=,
- \c!springvolgendein=\v!nee,
- \c!doorgaan=\v!ja,
- \c!plaatskop=\v!ja,
- \c!verhoognummer=\v!ja,
- \c!variant=\@@kovariant,
- \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!afstand,\c!variant,\c!springvolgendein,
- %\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}]%
- \definieermarkering[#1\v!nummer]%
- \koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}\v!nummer]}}%
- \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!afstand,\c!variant,\c!springvolgendein,
- %\c!nummerletter,\c!tekstletter,
- \c!nummercommando,\c!tekstcommando]%
- \definieermarkering[#1][#2]%
- \definieermarkering[#1\v!nummer][#2\v!nummer]%
- \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
-\newif\ifdisplaysectionhead \displaysectionheadtrue
-
-\def\dostelkopvariantin[#1]%
- {\displaysectionheadtrue
- \processaction
- [#1]
- [ \v!normaal=>\def\@@plaatskop{\plaatskopnormaal},
- \v!midden=>\def\@@plaatskop{\plaatskopmidden},
- \v!marge=>\def\@@plaatskop{\plaatskopinmarge},
- \v!inmarge=>\def\@@plaatskop{\plaatskopinmarge},
- \v!tekst=>\def\@@plaatskop{\plaatskopintekst}\displaysectionheadfalse,
- \v!unknown=>\def\@@plaatskop{\plaatskopunknown}]}
-
-\def\dostelkoppenin[#1]%
- {\getparameters[\??ko][#1]%
- \doifelse{\@@kosectienummer}{\v!ja}
- {\sectienummertrue}
- {\sectienummerfalse}%
- \dostelkopvariantin[\@@kovariant]}
-
-\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.
-
-% hier nog uti blokkeren
-
-\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}
-
-\newif\iflocation
-
-\def\ifinteractief{\iflocation}
-
-\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%
- {\thisissomeinternal{\s!lst}{#1\currentsectionformat}%
- \setxvalue{\s!lst:#1\currentsectionformat}{\realfolio}%
- \setxvalue{\v!vorige\v!lokale#1}{\s!lst:#1\previoussectionformat}%
- \setxvalue{\v!huidige\v!lokale#1}{\s!lst:#1\currentsectionformat}%
- \doifelse{\currentsectionformat}{}
- {\setglobalcrossreference
- {\v!vorige#1}{}{\realfolio}{}}
- {\setglobalsystemreference\rt!list
- {\v!vorige#1}{\getvalue{\v!vorige\v!lokale#1}}}%
- \def\stoplistreferences{\dostoplistreferences}}
-
-\def\dostoplistreferences#1%
- {\iflijstgeplaatst
- \addtocommalist{#1}\updatedlistreferences % nog global (\doglobal)
- \global\let\updatedlistreferences=\updatedlistreferences % een noodverbandje
- \gdef\updatelistreferences%
- {\def\docommando####1%
- {\setglobalsystemreference\rt!list
- {\v!vorige####1}{\getvalue{\v!huidige\v!lokale####1}}}%
- \processcommacommand[\updatedlistreferences]\docommando
- \global\let\updatelistreferences=\relax
- \global\let\updatedlistreferences=\empty}%
- \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}
-
-
-\def\referencepagenumber[#1]%
- {\donottest % nodig i.v.m. scannen {tekst} bij [referentie] in \op
- {\paginaprefix\??rf[#1]%
- \translatednumber[#1]}}
-
-%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]%
- \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
- \llap{\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\inregellabel#1%
- {\doifinstringelse{--}{#1}
- {\labeltext{\v!regels}}
- {\labeltext{\v!regel}}}
-
-\def\inregel#1[#2]%
- {\doifelsenothing{#1}
- {\in{\inregellabel{\currenttextreference}}[\@@rnprefix#2]}
- {\in{#1}[\@@rnprefix#2]}}
-
-\def\dostartnummerenPAR%
- {\beginofshapebox
- \doglobal\newcounter\linereference}
-
-% localcrossref heroverwegen
-
-\def\dostopnummerenPAR% dp's -> openstrutdepth
- {\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}}%
- \setlocalcrossreference{\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
-\getreferenceelements{\linereferencename}%
- \ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
- \edef\linereferenceline{\linereferenceline--\currenttextreference}%
- \fi
- \fi
-\setlocalcrossreference{\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}}%
-\getreferenceelements{\linereferencename}%
- \beforesplitstring\currenttextreference--\at--\to\firstline
- \ifnum\firstline=\scratchline\relax
- % beter een rawtextreference
-\textreference[\linereferencename]{\currenttextreference}%
-\setlocalcrossreference{\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%
- {\let\crlf=\relax
- \let\\=\relax}
-
-%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
- \forgetall
- \hsize=\getvalue{\??do#1\c!breedte}%
- \getvalue{\??do#1\c!boven}}
-
-\def\dododostopopmaak[#1]%
- {\getvalue{\??do#1\c!onder}%
- \egroup}
-
-\def\doshipoutopmaak[#1]%
- {\bgroup
- \getvalue{\??do#1\c!voor}%
- \box\opmaak
- \setopmaaklayout[#1]%
- \pagina
- \getvalue{\??do#1\c!na}%
- \ifdubbelzijdig
- \ifodd\realpageno\else
- \processaction
- [\getvalue{\??do#1\c!dubbelzijdig}]
- [ \v!ja=>\null\pagina\verlaagpaginanummer,
- \v!leeg=>\pagebodyornamentsfalse
- \null\pagina\verlaagpaginanummer]%
- \fi
- \fi
- \verlaagpaginanummer
- \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!leeg,
- \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%
- {\flushfootnotes
- \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]%
- {\flushfootnotes
- \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}%
- {\dostoptextfloat}%
- \setvalue{\e!start\e!reserveer#1\e!tekst}%
- {\doquadrupleempty\docomplexstartreserveertekstblok[#1]}%
- \setvalue{\e!stop\e!reserveer#1\e!tekst}%
- {\dostoptextfloat}%
- \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
- \witruimte % nog checken op interferentie
- \kern\!!heighta
- \fi
- \global\sidefloatvsize=\nofloatvsize
- \global\floatflagfalse}
-
-\def\flushsidefloatsafterpar%
- {\xdef\oldpagetotal{\the\pagetotal}%
- \gdef\checksidefloat%
- {\dochecksidefloat
- \ifdim\oldpagetotal=\pagetotal \else
- \xdef\checksidefloat{\dochecksidefloat}%
- \flushsidefloats
- \fi}}
-
-\let\logsidefloat=\relax
-
-\def\pushpenalties%
- {\widowpenalty=1
- \clubpenalty=2
- \brokenpenalty=1
- \let\pushpenalties=\relax
- \edef\poppenalties%
- {\widowpenalty=\the\widowpenalty
- \clubpenalty=\the\clubpenalty
- \brokenpenalty=\the\brokenpenalty}}
-
-\let\poppenalties=\relax
-
-\def\restorepenalties%
- {\ifnum\outputpenalty=\!!tenthousand\relax
- \else
- \penalty\outputpenalty
- \fi}
-
-\def\sidefloatoutput%
- {\iffloatshort
- \unvbox\normalpagebox
- \setbox\floatbottom=\lastbox
- \ifdim\wd\floatbottom>\sidefloathsize
- \penalty-201
- \box\floatbottom
- \else
- \ifvoid\floatbottom
- \else
- \restoreleftindent
- \ifdim\wd\floatbottom<\sidefloathsize
- \parskip=\!!zeropoint
- %\noindent
- \vadjust{\penalty-1}%
- \iffloatlefteqo
- \global\floatlefteqofalse
- \else
- \global\advance\sidefloathsize by -\wd\floatbottom
- \iffloatrighteqo
- \global\floatrighteqofalse
- \else
- \global\divide\sidefloathsize by 2
- \fi
- \hskip\sidefloathsize
- \fi
- \fi
- \box\floatbottom
- \restorepenalties
- \fi
- \fi
- \global\holdinginserts=0
- \global\floatshortfalse
- \else
- \finaloutput\unvbox\normalpagebox
- \global\sidefloatvsize=\nofloatvsize
- \poppenalties
- \fi}
-
-\def\restoreleftindent%
- {\ifrightfloat
- \else
- \parskip=\!!zeropoint
- \noindent
- \vadjust{\penalty-1}%
- \global\hskip\sidefloatwidth
- \fi}
-
-\def\eqno%
- {\iffloatshort
- \global\floatrighteqotrue
- \fi
- \floatrighteqo}
-
-\def\leftmarginfloat#1%
- {\global\rightfloatfalse\marginfloattrue\putsidefloat{#1}}
-
-\def\rightmarginfloat#1%
- {\global\rightfloattrue\marginfloattrue\putsidefloat{#1}}
-
-\def\leftfloat#1%
- {\global\rightfloatfalse\marginfloatfalse\putsidefloat{#1}}
-
-\def\rightfloat#1%
- {\global\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
- \global\floatflagfalse
- \else
- \advance\!!heighta by -\pagetotal
- \fi}
-
-\def\tosssidefloat%
- {\vfill\eject}
-
-\def\measuresidefloat%
- {\global\floatflagtrue
- \dimen3=\pagetotal
- \ifmarginfloat
- \global\sidefloatwidth=\!!zeropoint
- \else
- \global\sidefloatwidth=\wd\floatbox
- \global\advance\sidefloatwidth by \floatsideskip
- \fi
- \global\sidefloathsize=\hsize
- \global\advance\sidefloathsize by -\sidefloatwidth
- \global\sidefloatheight=\ht\floatbox
-\global\advance\sidefloatheight by \dp\floatbox
- \global\advance\sidefloatheight by \sidefloattopskip
- \global\sidefloatvsize=\sidefloatheight
- \global\advance\sidefloatvsize by \dimen3
- \dimen0=\sidefloatvsize
-% \advance\dimen0 by -\baselineskip
-%\ifgridsnapping
-% \advance\dimen0 by .5\openlineheight % \vsize slightly too large
-%\fi
- \ifdim\dimen0>.99\pagegoal \relax
- \roomforfloatfalse
- \else
- \dimen0=\pagegoal
- \advance\dimen0 by -\sidefloatvsize
- \ifdim\dimen0<\sidefloatbottomskip
- \global\advance\sidefloatvsize by \dimen0
- \global\floatshorttrue
- \pushpenalties
- \holdinginserts=1
- \else
- \global\advance\sidefloatvsize by \sidefloatbottomskip
- \global\floatshortfalse
- \fi
- \roomforfloattrue
- \fi}
-
-\def\setsidefloat%
- {\vbox{\strut}\vskip-\lineheight
- \kern\sidefloattopskip
- \oldprevdepth=\prevdepth
- \nointerlineskip
- \bgroup
- \everypar={}%
- \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
- \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
- \advance\!!heighta by \sidefloatbottomskip
- \!!counta=\!!heighta
- \divide\!!counta by \baselineskip
- \ifnum\!!counta>0
- \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
- \global\floatshortfalse
- \tosssidefloat
- \else
- \kern\!!heighta
- \fi
- \fi}
-
-\def\stallsidefloat%
- {\!!counta=\pageshrink
- \divide\!!counta by \baselineskip
- \advance\!!counta by 1
- \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\setbox\floatbox=\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}%
- \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
- \ifgridsnapping
- %\topsnaptogrid{\box\topins}
- \box\topins % already snapped
- \else
- \unvbox\topins
- \fi
- \fi
- \global\topinserted=\!!zeropoint\relax}
-
-\def\dobotinsertions%
- {\ifvoid\botins\else
- \ifgridsnapping
- \snaptogrid\hbox{\box\botins}
- \else
- \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}
-
-% \testfloatboxtrue
-%
-% testfloatbox gaat mis, niet in midden, dus elders
-
-\def\flushfloatbox% nog verder doorvoeren en meer info in marge
- {\snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\box\floatbox}}}
-
-% 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
-%\ifgridsnapping
-% \advance\dimen0 by .5\openlineheight % \vsize slightly too large
-%\fi
- \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
- {\ifbinnenkolommen
- \someelsefloat[\v!hier]%
- \else
- \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}%
- \fi}
-
-\def\sometextfloat[#1]% lang, links, rechts, hoog, midden, laag, offset
- {\checkwaitingfloats{#1}%
- \def\dostoptextfloat{\dodostoptextfloat[#1]}%
- \global\floattextwidth=\hsize
- \global\floatwidth=\wd\floatbox
- \global\floatheight=\ht\floatbox % forget about the depth
- \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\dodostoptextfloat[#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{\v!offset}{#1}{\witruimte\blanko}%
- \box\floattext
- \vfill}}}%
- \doifinsetelse{\v!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=\openstrutdepth}% 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 {\openstrutdepth} % {\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{\openstrutdepth}% {\dp\strutbox}%
- \global\floatsideskip=\@@bkmarge\relax
- \global\noftopfloats=\@@bknboven\relax
- \global\nofbotfloats=\@@bknonder\relax}}
-
-\newif\ifinsidefloat
-
-\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}}}
- {\let\dofloatnummer=\empty}}
-
-\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}}} % pas op, nog wd groter dan hsize
- {\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
-\ifdim\wd4>\hsize
- \global\setbox\floatbox=\hbox to \wd4{\hss\box\floatbox\hss}%
-\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}%
- \ifbinnenkolommen
- \global\parfloatfalse
- \fi
- \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
- \bgroup
- \global\setbox\floatbox=\vbox{#7}%
- \dimen0=\ht\floatbox
- \advance\dimen0 by \dp\floatbox
- \ifdim\dimen0=\!!zeropoint\relax
- \showmessage{\m!floatblocks}{11}{}%
- \global\setbox\floatbox=\vbox{\getvalue{\e!lege#3}}%
- \fi
- \ConvertToConstant\doifelse{#6}{\v!geen}
- {\global\setbox\floatbox=\ruledvbox
- {\unvbox\floatbox
- \vss % gets rid of the depth
- \rawpagereference{\s!flt}{#2}}%
- \egroup\dofloat{#4}{}{#6}{#1}}
- {\doifelsevalue{\??kj#1\c!nummer}{\v!ja}
- {\verhoognummer[#1]%
- \maakhetnummer[#1]%
- \global\setbox\floatbox=\vbox
- {\unvbox\floatbox % no \vss, keep the depth
- \dofloatreference
- \redofloatorder{#1}%
- \rawreference{\s!flt}{#2}{\hetnummer}%
- \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
- \egroup\dofloat{#4}{#5\hetnummer}{#6}{#1}}
- {\global\setbox\floatbox=\vbox
- {\unvbox\floatbox % no \vss, keep the depth
- \rawpagereference{\s!flt}{#2}}%
- \egroup\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]}
-
-% ook (continued)
-
-\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]%
- \ifnum\ruwenummer[\??si]=1 \ifdim\ht\nextbox=\!!zeropoint
- \let\floatcaptionsuffix=\empty
- \fi\fi
- \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}%
- \snaptomathgrid{$$#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\formuleummer{\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}
- {\snaptomathgrid{$$#4\doleqno$$}}
- {\snaptomathgrid{$$#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}{\snaptomathgrid\bgroup\setdisplayskips$$}
-\setvalue{\e!stop \e!formule}{$$\egroup}
-
-\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
-%
-% \def\shipoutfacingpage%
-% {\iffacingpages
-% \setbox\facingpage=\vbox to \zethoogte
-% {\kern\hoofdhoogte
-% \kern\ht\topins % ?
-% \kern\dp\topins % ?
-% \kern\dp\strutbox % checken
-% \box\facingpage
-% \vfill}%
-% \myshipout{\buildpagebody\box\facingpage}%
-% \fi
-% \global\setbox\facingpage=\box\voidb@x
-% \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}
-
-\newbox\facingbox
-\newbox\facingpage
-
-\newif\iffacingpages \facingpagesfalse
-
-\def\shipoutfacingpage%
- {\iffacingpages
- \ifnum\realpageno>1
- \bgroup
- \pagebodyornamentsfalse
- \setbox\facingpage=\vbox to \zethoogte
- {\unvbox\facingpage\vfil}%
- \myshipout{\buildpagebody\box\facingpage}%
- \egroup
- \else
- \global\setbox\facingpage=\box\voidb@x
- \fi
- \fi}
-
-\def\naastpagina%
- {\shipoutfacingpage}
-
-\def\facefloat% redefined
- {\startnaast\box\floatbox\stopnaast}
-
-\def\startnaast% beter: \dowithnextbox
- {\iffacingpages
- \global\setbox\facingbox=\ruledvbox
- \bgroup
- \hsize=\zetbreedte
- \else
- \def\next{\gobbleuntil\stopnaast}%
- \expandafter\next
- \fi}
-
-\def\stopnaast%
- {\egroup
- \global\setbox\facingpage=\vbox
- {\ifvoid\facingpage
- \vskip\openstrutdepth % \dp\strutbox
- \else
- \unvbox\facingpage
- \fi
- \box\facingbox
- \blanko}}
-
-\def\dostelnaastplaatsenin[#1]%
- {\getparameters[\??np][#1]%
- \doifelse{\@@npstatus}{\v!start}
- {\global\facingpagestrue}
- {\global\facingpagesfalse}}
-
-\def\stelnaastplaatsenin%
- {\dosingleargument\dostelnaastplaatsenin}
-
-%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\pagenumber}}
- {\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\pagenumber}}
- {\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\dobeginoflist%
- {\begingroup
- \startopelkaar[\v!blanko]}
-
-\def\doendoflist%
- {\stopopelkaar
- \endgroup}
-
-\def\doplaatslijst[#1][#2]%
- {\dobeginoflist
- \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}%
- \doendoflist}
-
-\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}{#6}{\copy0}}
- {##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}{#6}{\copy0}}
- {\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}{#6}{\copy0}}
- {\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}{#7}{\copy0}}}
-
-\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%
-% {\switchtobodyfont[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}{\switchtbodyfont[5pt]\haalbuffer[kanweg]}
-%
-% \plaatsreferentielijst
-% [externalfigure,externaltable]
-
-% algemeen
-
-\def\referentiebutton#1[#2]%
- {\bgroup
- \let\referenceprefix=\empty
- \setbox0=\hbox{\ignorespaces#1}%
- \naarbox{\copy0}[#2]%
- \egroup}
-
-\newcounter\referencecounter
-
-\def\doreferentielijstelement#1#2#3#4#5%
- {\doiftoclevelelse[#4]
- {\getvalue{\??rl#1\c!voor}%
- \referentiebutton
- {\getvalue{\??rl#1\c!commando}{#3}\pagereference[\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\pagenumber}}
- {\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
- \pagereference[\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]%
- {\dobeginoflist
- \dostellijstin[#1][#2]%
- \doutilities{#1}{\jobname}{#1}{}{\par}%
- \doendoflist}
-
-\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}
- {\immediatewriteutility{s e {#1} {#2} {#3} {#4}}}
- {\convertargument#3\to\asciia
- \convertargument#4\to\asciib
- \immediatewriteutility{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}{\donottest\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%
- {\donottest\getsynonymmeaning{#1}{\??sm:#1:##1}}%
- \ifthirdargument
- \def#3##1%
- {\donottest\getvalue{\??sm:#1:##1}}%
- \fi
- \setvalue{#1}%
- {\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}%
- \else
- \ifthirdargument
- \def#3##1%
- {\donottest\getsynonymmeaning{#1}{##1}}%
- \fi
- \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}
- {\immediatewriteutility{s e {#1} {#2} {#3} {}}}
- {\convertargument#3\to\asciia
- \immediatewriteutility{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%
- {\writeutility%
- {r e %
- {\currentregister} %
- {\nextinternalreference} %
- {#1} %
- {\ascii} %
- {\sectionformat::\noexpand\pagenumber} %
- {\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%
- {\writeutility%
- {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
-
-\let\c!entryletter=\empty
-\let\c!entrya =\relax
-\let\c!entryb =\relax
-\let\c!entryc =\relax
-
-\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
-\global\let\c!entrya=\relax
- \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
-\global\let\c!entrya=\relax
-\global\let\c!entryb=\relax
- \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}{##3}{\copy0}%
- \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}{##3}{\copy0}%
- \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}
- {\pagereference[#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}
- {\pagereference[#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% is die page reference echt nodig?
- {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
- \setregisterpage{#1}%
- \setvalue{#1\s!entrya}##1%
- {\global\utilitydonetrue
- \c!entryletter
- \iflocation
- \getalllistreferences{#1}{##1}%
- \endgraf\hangindent1em\noindent
- %
- %\thisissomeinternal{\s!lin}{\internallistreference}%
- %
- \pagereference[\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}{####2}{\copy0}}%
- \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}
- {\pagereference[#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}
- {\pagereference[#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}{##2}{\copy0}}%
- \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}
- {\gotosomeinternal
- {\s!lin}{\internallistreference}{\currentrealreference}
- {\showlocation{#3}}}
- {\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\processnextbufferline#1#2#3%
- {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run
- \convertargument#1 \to\next
- \doifinstringelse{\endofblock}{\next}
- {\ifnum\nestedbufferlevel=0\relax % \relax ?
- \def\next{#2}%
- \else
- \decrement\nestedbufferlevel\relax
- \def\next{#3}%
- \fi}
- {\doifinstringelse{\beginofblock}{\next}
- {\increment\nestedbufferlevel\relax
- \def\next{#3}}
- {\def\next{#3}}}%
- \next}
-
-\def\dostartbuffer[#1][#2][#3]%
- {\showmessage{\m!systems}{15}{#1}%
- \doifelse{#3}{}
- {\let\stopbuffer=\relax % \undefined
- \convertargument startbuffer\to\beginofblock % else a space
- \let\processnextblockline=\processnextbufferline
- \convertargument\stopbuffer\to\endofblock}
- {\letvalue{#3}=\relax % \undefined
- \@EA\convertargument\csname#2\endcsname\to\beginofblock
- \@EA\convertargument\csname#3\endcsname\to\endofblock}%
- \def\closeblock%
- {\immediate\closeout\tmpblocks
- \egroup
- \getvalue{#3}}%
- \doifelsenothing{#1}
- {\immediate\openout\tmpblocks=\jobname.\f!temporaryextension}
- {\immediate\openout\tmpblocks=#1.\f!temporaryextension}%
- \newcounter\nestedbufferlevel
- \setupcopyblock
- \def\writeoutblocks##1{}%
- \copyblockline}
-
-\def\startbuffer%
- {\bgroup
- \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv)
- \dotripleempty\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\doaddpagebackground#1#2%
- {\doifvaluesomething{\??ma#1\c!achtergrond}
- {\setbox2=\vbox
- {\offinterlineskip
- \localframed
- [\??ma#1]
- [\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]%, \c!offset=\v!overlay]
- {\getvalue{\??ma#1\c!commando}}}%
- \wd2=\!!zeropoint
- \dp2=\!!zeropoint
- \setbox#2=\vbox
- {\hbox{\box2\box#2}}}}
-
-\def\addpagebackground#1%
- {\doifbothsidesoverruled
- \doaddpagebackground{\v!rechterpagina}{#1}%
- \orsideone
- \doaddpagebackground{\v!rechterpagina}{#1}%
- \orsidetwo
- \doaddpagebackground{\v!linkerpagina}{#1}%
- \od
- \doaddpagebackground{\v!pagina}{#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\dododopagebodybackground#1#2#3#4%
- {\edef\!!stringe{\??ma#3#4}%
- \doifelsevaluenothing{\!!stringe\c!achtergrond }
- {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!linker\c!kader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!rechter\c!kader}\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!boven\c!kader }\v!aan\!!doneatrue
- {\doifelsevalue{\!!stringe\c!onder\c!kader }\v!aan\!!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%
- {\doifinsetelse{##1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
- {\getparameters[\??ma##1][#3]%
- \dosetpageseparation}
- {\def\dodocommando####1%
- {\getparameters[\??ma##1####1][#3]}
- \processcommalist[#2]\dodocommando}}%
- \processcommalist[#1]\docommando
- \else
- \doifcommonelse{#1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
- {\def\docommando##1%
- {\getparameters[\??ma##1][#2]}%
- \processcommalist[#1]\docommando
- \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]
-\presetlocalframed [\??ma\v!linkerpagina]
-\presetlocalframed [\??ma\v!rechterpagina]
-
-\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]
-
-\copyparameters
- [\??ma\v!linkerpagina\c!kader][\??ma\v!linkerpagina]
- [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
-
-\copyparameters
- [\??ma\v!linkerpagina\c!achtergrond][\??ma\v!linkerpagina]
- [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
-
-\copyparameters
- [\??ma\v!rechterpagina\c!kader][\??ma\v!rechterpagina]
- [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
-
-\copyparameters
- [\??ma\v!rechterpagina\c!achtergrond][\??ma\v!rechterpagina]
- [\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%
- {\immediatewriteutility{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!filfilename}
- {\showmessage{\m!systems}{2}{\f!filfilename}}{}%
- \readsysfile{\f!sysfilename}
- {\showmessage{\m!systems}{2}{\f!sysfilename}}{}}
-
-\def\loadoptionfile%
- {\readsysfile{\f!optfilename}
- {\showmessage{\m!systems}{2}{\f!optfilename}}{}}
-
-% \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 \loadoptionfile \to \everyjob
-\appendtoks \loadtwopassdata \to \everyjob
-\appendtoks \setupfootnotes \to \everyjob % eigenlijk ergens anders
- % hangt af van korps
-\let\normalend=\end
-\newevery \everybye \EveryBye
-
-\def\end%
- {\the\everybye
- \normalend}
-
-\appendtoks \pagina[\v!laatste] \pagina
- \ifarrangingpages\poparrangedpages\fi \to \everybye
-
-\appendtoks \registreerfileinfo{e}{\jobname} \to \everybye
-\appendtoks \stopcopyingblocks \to \everybye
-\appendtoks \closeutilities \to \everybye
-\appendtoks \closespecialfile \to \everybye
-
-\def\starttekst%
- {\ifnum\textlevel=0\relax
- \registreerfileinfo{b}{\jobname}%
- \startcopyingblocks
- \fi
- \doglobal\increment\textlevel\relax}
-
-\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
- \startreadingfile
- \readlocfile{#1}{}{}%
- \stopreadingfile}
-
-\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}}
-
-\expanded
- {\long\noexpand\def\csname\e!start\e!instellingen\endcsname##1 ##2\csname\e!stop\e!instellingen\endcsname%
- {\noexpand\long\noexpand\setvalue{\??su##1}{##2}}}
-
-\long\def\startsetups#1 #2\stopsetups% for international purposes
- {\long\setvalue{\??su#1}{#2}}
-
-\def\dodosetups#1%
- {\getvalue{\??su#1}}
-
-\def\dosetups[#1]%
- {\iffirstargument
- \dodosetups{#1}%
- \else
- \expandafter\dodosetups
- \fi}
-
-\def\setups%
- {\dosingleargument\dosetups}
-
-\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}
-
-% Nog toevoegen:
-%
-% For calculating random numbers we use Donald Arseneau's macros.
-
-\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\meldveranderingen%
- {\writeline
- \writestring{Currently, the reference mechanism of ConTeXt is optimized as well as}%
- \writestring{extended. There is also beta grid snapping in combination with some}%
- \writestring{more footnote features. Please report any anomalities to pragma@pi.net.}%
- \writeline
- \writestring{At this moment some pdfTeX primitives and functionality are under}%
- \writestring{reconstruction. Please use the most recent tpd special driver!}}
-
-\appendtoks \meldveranderingen \to \everybye
-
-\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%
- {\donottest\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
-
-% the buffer mechanism handles nesting, add some switch
-
-\setvalue{\e!start\e!verbergen}%
- {\startbuffer[buf-\nofpostponedblocks]
- [\e!start\e!verbergen][\e!stop\e!verbergen]}
-
-% 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=\normalizedlocalbodyfontsize] % 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,
- \c!schaal=1,
- \c!nx=1,
- \c!ny=1,
- \c!grid=\v!nee,
- \c!regels=]
-
-% 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]
-
-\stelinterliniein
- [\c!hoogte=.72,
- \c!diepte=.28,
- \c!boven=1.0,
- \c!onder=0.4,
- \c!regel=2.8ex]
-
-\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!springvolgendein=\v!nee,
- \c!pagina=\v!rechts,
- \c!hoofd=,
- \c!letter=\tfc,
- \c!afstand=.75em,
- \c!voor={\blanko[2*\v!groot]},
- \c!na={\blanko[2*\v!groot]}]
-
-\stelkopin
- [\v!paragraaf]
- [\c!uitlijnen=\v!normaal,
- \c!letter=\tfa,
- \c!afstand=.75em,
- \c!springvolgendein=\v!nee,
- \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!springvolgendein=\v!ja,
- \c!breedte=1.5em,
- \c!factor=0,
- \c!afstand=.5em,
- \c!uitlijnen=\v!normaal,
- \c!marletter=\c!type, % \c! ???
- \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]
-
-\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!leeg]
-
-\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!afstand=0pt,
- \c!hang=,
- \c!monster=,
- \c!uitlijnen=,
- \c!marge=\v!nee,
- \c!voor=\blanko,
- \c!tussen=\blanko,
- \c!na=\blanko,
- \c!springvolgendein=\v!ja,
- \c!commando=]
-
-\steldoornummerenin
- [\c!plaats=\v!boven,
- \c!kopletter=\v!vet,
- \c!kopkleur=,
- \c!letter=\v!normaal,
- \c!kleur=,
- \c!breedte=8em,
- \c!afstand=0pt,
- \c!hang=,
- \c!monster=,
- \c!uitlijnen=,
- \c!marge=\v!nee,
- \c!voor=\blanko,
- \c!tussen=\blanko,
- \c!na=\blanko,
- \c!springvolgendein=\v!ja,
- \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=,
- \c!commando=]
-
-\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=\donottest\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,\v!linkerpagina,\v!rechterpagina]
- [\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
+%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.
+
+% nog oplossen: voetnoot setten ivm later veranderde
+% witruimte; probleem: als lijn graphic
+
+\newevery \everybodyfont \Everybodyfont % just to be sure
+
+\appendtoks \presetnormallineheight \to \everybodyfont
+\appendtoks \setnormalbaselines \to \everybodyfont
+\appendtoks \setstrut \to \everybodyfont
+\appendtoks \settopskip \to \everybodyfont
+\appendtoks \setmaxdepth \to \everybodyfont
+\appendtoks \stelinspringenin \to \everybodyfont
+\appendtoks \stelblankoin \to \everybodyfont
+\appendtoks \stelwitruimtein \to \everybodyfont
+%\appendtoks\setupfootnotes \to \everybodyfont
+\appendtoks \stelspatieringin \to \everybodyfont % nieuw
+\appendtoks \setdisplayskips \to \everybodyfont % nieuw
+
+% \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
+ 21: de hulpfile is niet geladen
+ 22: gebruik een goede hulpfile
+ 23: -- gearrangeerd op --
+ 24: Plaatsblokken
+ 25: Verwijzingen
+ 26: Registers
+ 27: Versie
+\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 util
+ 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
+ 21: no utility data is loaded
+ 22: use a valid utilityfile
+ 23: -- arranged at --
+ 24: Floatblocks
+ 25: References
+ 26: Registers
+ 27: Version
+\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
+ 21: Die Hilfsdatei ist nicht geladen
+ 22: Benoetige gueltige Hilfsdateie
+ 23: -- angeordnet auf --
+ 24: Fliessbloecke
+ 25: Referenzen
+ 26: Register
+ 27: Version
+\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
+ 10: -- en -- tellen niet op tot 1.0
+ 11: interlinie -- niet toegestaan in gridmode
+\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
+ 10: -- and -- don't add up to 1.0
+ 11: spacing -- not permitted in gridmode
+\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
+ 10: -- und -- ergeben zusammen nicht 1.0
+ 11: Zwischenraum -- nicht im Grittermoduserlau
+\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% made global
+ {\ifinpagebody \else
+ \global\indentationfalse
+ \gdef\checkindentation%
+ {\donoindentation
+ \gdef\checkindentation{\global\indentationtrue}}%
+ \fi}
+
+\def\nonoindentation% bv bij floats
+ {\ifinpagebody \else
+ \global\indentationtrue
+ \gdef\checkindentation{\global\indentationtrue}%
+ \fi}
+
+\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
+ \indentfirstparagraphtrue % recently added
+ \stelinspringenin[\v!geen]}
+
+\def\forgetparskip%
+ {\stelwitruimtein[\v!geen]}
+
+\def\forgetbothskips%
+ {\tolerance=1500
+ \leftskip\!!zeropoint
+ \rightskip\!!zeropoint\relax}
+
+\def\forgetspacing%
+ {\emergencystretch\!!zeropoint\relax}
+
+\def\forgetall%
+ {\let\par=\endgraf % i.v.m. getpar etc
+ \notragged
+ \forgetparskip
+ \forgetparindent
+ \forgetbothskips
+ \forgetspacing % i.v.m. funny spacing in pagebody
+ \everypar{}} % indeed!
+
+\def\localvbox#1#%
+ {\vbox#1\bgroup
+ \forgetparskip
+ \setlocalhsize
+ \hsize=\localhsize
+ \forgetparindent
+ \forgetbothskips
+ \forgeteverypar
+ \let\next=}
+
+% ach ja
+
+\unexpanded\def\dostartattributes#1#2#3%
+ {\begingroup % geen \bgroup, anders in mathmode lege \hbox
+ \doifdefinedelse{#1#2}
+ {\def\fontattribute{\getvalue{#1#2}}}
+ {\let\fontattribute=\empty}%
+ \doifdefinedelse{#1#3}
+ {\def\colorattribute{\getvalue{#1#3}}}
+ {\let\colorattribute=\empty}%
+ \startcolor[\colorattribute]%
+ \@EA\doconvertfont\@EA{\fontattribute}}
+
+\unexpanded\def\dostopattributes%
+ {\stopcolor
+ \endgroup}
+
+\unexpanded\def\doattributes#1#2#3#4%
+ {\dostartattributes{#1}{#2}{#3}{#4}\dostopattributes}
+
+% \dotextprefix{tekst}
+%
+% als {tekst} niet leeg is: tekst~
+
+\def\dotextprefix#1%
+ {\ConvertToConstant\doifnot{#1}{}{#1~}}
+
+% kan vaker worden toegepast:
+
+\def\doadaptleftskip#1%
+ {\processaction[#1] % \ExpandFirstAfter
+ [\v!standaard=>\advance\leftskip by
+ \ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
+ \v!ja=>\advance\leftskip by
+ \ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi,
+ \v!nee=>,
+ \s!unknown=>\advance\leftskip by #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,\pseudostrut
+%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
+\newdimen\openstrutheight
+\newdimen\openstrutdepth
+
+\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.5}
+
+\def\systemtopskipfactor {\topskipfactor}
+\def\systemmaxdepthfactor {\maxdepthfactor}
+
+% De onderstaande definitie wordt in de font-module overruled
+
+\ifx\globalbodyfontsize\undefined
+ \newdimen\globalbodyfontsize
+ \globalbodyfontsize=12pt
+\fi
+\ifx\normalizedbodyfontsize\undefined
+ \def\normalizedbodyfontsize{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\topskipcorrection%
+ {\ifdim\topskip>\openstrutheight
+ \vskip\topskip
+ \vskip-\openstrutheight
+ \fi
+ \vbox{\strut}
+ \vskip-\openlineheight}
+
+\def\settopskip% the extra test is needed for the lbr family
+ {\topskip=\systemtopskipfactor\globalbodyfontsize
+ \ifgridsnapping \else
+ \ifr@ggedbottom\!!plus5\globalbodyfontsize\fi
+ \fi
+ \relax % the skip
+ \ifdim\topskip<\strutheightfactor\openlineheight
+ \topskip=\strutheightfactor\openlineheight\relax
+ \fi}
+
+\def\setmaxdepth%
+ {\maxdepth=\systemmaxdepthfactor\globalbodyfontsize}
+
+\def\normalbaselines%
+ {\baselineskip\normalbaselineskip
+ \lineskip\normallineskip
+ \lineskiplimit\normallineskiplimit}
+
+\def\setnormalbaselines%
+ {\lineheight=\normallineheight
+ \openlineheight=\spacingfactor\lineheight
+\openstrutheight=\strutheightfactor\openlineheight
+\openstrutdepth =\strutdepthfactor \openlineheight
+ \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%
+ {\ifgridsnapping
+ \edef\spacingfactor{1}%
+ \showmessage{\m!layouts}{11}{#1}%
+ \else
+ \edef\spacingfactor{#1}%
+ \fi
+ \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
+ \normalkern-\strutwidth}}}
+
+\def\setteststrut%
+ {\def\strutwidth{.8pt}%
+ \setstrut}
+
+\def\begstrut%
+ {\relax\ifdim\ht\strutbox=\!!zeropoint\else
+ \strut
+ \normalpenalty\!!tenthousand
+ \normalhskip\!!zeropoint
+ \ignorespaces
+ \fi}
+
+\def\endstrut%
+ {\relax\ifhmode\ifdim\ht\strutbox=\!!zeropoint\else
+ \unskip
+ \normalpenalty\!!tenthousand
+ \normalhskip\!!zeropoint
+ \strut
+ \fi\fi}
+
+\def\setnostrut%
+ {\setbox\strutbox=\normalhbox{\normalhbox{}}%
+ \let\strut=\empty
+ \let\endstrut=\empty
+ \let\begstrut=\empty}
+
+\def\pseudostrut%
+ {\bgroup
+ \setnostrut
+ \normalstrut
+ \egroup}
+
+\def\resetteststrut%
+ {\let\strutwidth=\!!zeropoint
+ \setstrut}
+
+\def\setfontparameters%
+ {\the\everybodyfont}
+
+% \setnormalbaselines
+% \setstrut
+% \settopskip
+% \setmaxdepth
+% \the\EveryFontSwitch
+
+%D We need \type{\normaloffinterlineskip} because the new
+%D definition contains an assignment, and |<|don't ask me
+%D why|>| this assignment gives troubles in for instance the
+%D visual debugger.
+
+\ifx\undefined\normaloffinterlineskip
+ \let\normaloffinterlineskip=\offinterlineskip % knuth's original
+\fi
+
+% \def\offinterlineskip%
+% {\edef\oninterlineskip%
+% {\baselineskip=\the\baselineskip
+% \lineskip=\the\lineskip
+% \lineskiplimit=\the\lineskiplimit
+% \noexpand\let\noexpand\offinterlineskip=\noexpand\normaloffinterlineskip}%
+% \normaloffinterlineskip}
+
+\def\offinterlineskip%
+ {\ifdim\baselineskip>\!!zeropoint
+ \edef\oninterlineskip%
+ {\baselineskip=\the\baselineskip
+ \lineskip=\the\lineskip
+ \lineskiplimit=\the\lineskiplimit
+ \noexpand\let\noexpand\offinterlineskip=\noexpand\normaloffinterlineskip}%
+ \else
+ \let\oninterlineskip=\setnormalbaselines
+ \fi
+ \normaloffinterlineskip}
+
+\let\oninterlineskip=\relax
+
+\def\leaveoutervmode%
+ {\ifvmode\ifinner\else
+ \leavevmode
+ \fi\fi}
+
+% We passen ook de \displayskip's wat aan (nog eens uitzoeken):
+
+\def\displayskipsize#1#2%
+ {\ifdim\tussenwit>\!!zeropoint
+ #1\tussenwit\!!plus#2\tussenwit\!!minus#2\tussenwit\relax
+ \else
+ #1\lineheight\!!plus#2\lineheight\!!minus#2\lineheight\relax
+ \fi}
+
+\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:
+
+\def\defaultwidowpenalty{2000} % was: 1000
+\def\defaultclubpenalty {2000} % was: 800
+
+\widowpenalty=\defaultwidowpenalty\relax
+\clubpenalty =\defaultclubpenalty \relax
+
+% Bovendien definieren we enkele extra \fill's:
+
+\def\hfilll%
+ {\hskip\!!zeropoint\!!plus1filll\relax}
+
+\def\vfilll%
+ {\vskip\!!zeropoint\!!plus1filll\relax}
+
+% 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\writeutility%
+ {\write\uti}
+
+\def\immediatewriteutility%
+ {\immediate\write\uti}
+
+\def\writeutilitycommand#1%
+ {\writeutility{c \string#1}}
+
+\def\immediatewriteutilitycommand#1%
+ {\immediatewriteutility{c \string#1}}
+
+\def\openutilities%
+ {\immediate\openout\uti=\jobname.\f!inputextension
+ \immediatewriteutilitycommand{\thisisutilityversion{\utilityversion}}}
+
+\def\closeutilities%
+ {\savenofsubpages
+ \savenofpages
+ \immediate\closeout\uti
+ \reportutilityproblems}
+
+\def\abortutilitygeneration%
+ {\immediatewriteutilitycommand{\utilitygenerationaborted}%
+ \immediatewriteutility{q {quit}}}
+
+\def\utilitygenerationaborted%
+ {\showmessage{\m!systems}{21}{}%
+ \global\let\utilitygenerationaborted=\endinput
+ \gdef\reportutilityproblems{\showmessage{\m!systems}{22}{}}%
+ \endinput}
+
+\def\savecurrentvalue#1#2%
+ {\immediatewriteutilitycommand{\initializevariable\string#1{#2}}}
+
+\let\initializevariable\gdef
+
+\def\disableinitializevariables%
+ {\global\let\initializevariable\gobbletwoarguments}
+
+\let\reportutilityproblems=\relax
+
+\let\utilityresetlist=\empty
+
+%\def\addutilityreset#1%
+% {\addtocommalist{\s!reset#1}\utilityresetlist}
+%
+%\def\resetutilities%
+% {\processcommacommand[\utilityresetlist]\getvalue}
+
+\def\addutilityreset#1%
+ {\addtocommalist{#1}\utilityresetlist}
+
+\def\doresetutility#1%
+ {\getvalue{\s!reset#1}}
+
+\def\resetutilities%
+ {\processcommacommand[\utilityresetlist]\doresetutility}
+
+% #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
+ {\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
+ \disableinitializevariables
+ \endgroup}
+
+% 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\appendtwopasselement#1#2#3%
+ {\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}%
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}#3,}}
+
+\def\dodefinetwopasslist#1%
+ {\doifundefined{#1:\s!list}
+ {\debuggerinfo{\m!systems}{defining twopass class #1}%
+ \doglobal\addtocommalist{#1}\alltwopasslists
+ \doglobal\addutilityreset{#1\s!pass}%
+ \setgvalue{\s!set#1\s!pass}%
+ {\global\letvalue{\s!set#1\s!pass}\gobbletwoarguments
+ \setgvalue{@@#1\s!pass}{\appendtwopasselement{#1}}}%
+ \setgvalue{\s!reset#1\s!pass}%
+ {\global\letvalue{@@#1\s!pass}\gobbletwoarguments}%
+ \getvalue{\s!reset#1\s!pass}}}
+
+\def\definetwopasslist#1%
+ {\expanded{\dodefinetwopasslist{#1}}}
+
+\def\doloadtwopassdata#1%
+ {\doifundefined{#1:\s!list}
+ {\global\letvalue{#1:\s!list}\empty
+ \doutilities{#1\s!pass}{\jobname}{}{}{}%
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list}0,0}}}
+
+\def\loadtwopassdata%
+ {\ifx\alltwopasslists\empty\else
+ \processcommacommand[\alltwopasslists]\doloadtwopassdata
+ \global\let\alltwopassdata\empty
+ \fi}
+
+\let\twopassdata=\empty
+
+\def\dogettwopassdata[#1,#2]#3%
+ {\doifelse{#1}{0} % \ifcase truukje gaat fout
+ {\twopassdatafoundfalse
+ \let\twopassdata\empty}
+ {\twopassdatafoundtrue
+ \setxvalue{#3:\s!list}{#2}%
+ \edef\twopassdata{#1}}}
+
+\def\gettwopassdata#1%
+ {\loadtwopassdata
+ \edef\!!stringa{\getvalue{#1:\s!list}}%
+ \debuggerinfo{\m!systems}{twopass get #1 - \!!stringa}%
+ \expandafter\dogettwopassdata\expandafter[\!!stringa]{#1}}
+
+\def\findtwopassdata%
+ {\loadtwopassdata
+ \ExpandBothAfter\dofindtwopassdata}
+
+\def\dofindtwopassdata#1#2%
+ {\edef\!!stringa{,\getvalue{#1:\s!list}}%
+ \debuggerinfo{\m!systems}{twopass find #2 - \!!stringa}%
+ \def\dodofindtwopassdata[##1,##2#2##3,##4]%
+ {\edef\twopassdata{##3}%
+ \ifx\twopassdata\empty
+ \twopassdatafoundfalse
+ \else
+ \twopassdatafoundtrue
+ \fi}%
+ \@EA\dodofindtwopassdata\@EA[\!!stringa,#2,#2,]}
+
+\def\getfirsttwopassdata#1%
+ {\loadtwopassdata
+ \edef\!!stringa{\getvalue{#1:\s!list}}%
+ \expandafter\dogetfirsttwopassdata\expandafter[\!!stringa]{#1}}
+
+\def\dogetfirsttwopassdata[#1,#2]#3%
+ {\doifelse{#1}{0}
+ {\twopassdatafoundfalse
+ \let\twopassdata\empty}
+ {\twopassdatafoundtrue
+ \edef\twopassdata{#1}}}
+
+\def\getlasttwopassdata#1%
+ {\loadtwopassdata
+ \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%
+ {\loadtwopassdata
+ \getfromcommacommand[\getvalue{#1:\s!list}][#2]%
+ \doifelsenothing{\commalistelement}
+ {\twopassdatafoundfalse
+ \let\twopassdata\empty}
+ {\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}}
+
+% NOG EENS NAGAAN WANNEER NU GLOBAL EN WANNEER NIET
+
+\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
+%\ifgridsnapping % evt altijd, nog testen
+% \getnoflines\vsize
+% \vsize=\noflines\openlineheight % local is better and ok
+% \advance\vsize by .5\openlineheight % collect enough data
+%\fi
+ \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}
+
+% NB \userpageno vervangen door \realpageno
+
+\def\doifonevenpaginaelse#1#2%
+ {\ifodd\realpageno#1\else#2\fi}
+
+\def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od%
+ {\ifdubbelzijdig
+ \ifodd\realpageno#2\relax\else#3\relax\fi
+ \else
+ #1\relax
+ \fi}
+
+\def\doifbothsides#1\orsideone#2\orsidetwo#3\od%
+ {\ifdubbelzijdig
+ \ifenkelzijdig
+ #1\relax
+ \else
+ \ifodd\realpageno#2\relax\else#3\relax\fi
+ \fi
+ \else
+ #1\relax
+ \fi}
+
+\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\startlocal {\dostartglobaldefs>-}
+\def\stoplocal {\dostopglobaldefs}
+\def\startglobal {\dostartglobaldefs<+}
+\def\stopglobal {\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] % geen \c!schaal, scheelt hash ruimte
+ [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,#2]}
+
+\def\definieerpapierformaat%
+ {\dodoubleargument\dodefinieerpapierformaat}
+
+\definieerpapierformaat[][\c!breedte=210mm,\c!hoogte=297mm]
+
+\chardef\papermirror =0
+\chardef\printmirror =0
+\chardef\paperrotation =0
+\chardef\paperreverse =0
+\chardef\printrotation =0
+\chardef\printreverse =0
+\chardef\paperlandscape=0
+\chardef\printlandscape=0
+
+\def\papierschaal{1}
+
+\newif\ifnegateprintbox
+
+\def\dostelpapierrichtingin#1#2#3#4#5%
+ {\global\chardef#2=0
+ \global\chardef#5=0
+ \gdef#3{0}%
+ \gdef#4{0}%
+ \global\negateprintboxfalse
+ \processallactionsinset
+ [#1]
+ [ \v!liggend=>\global\chardef#2=1,
+ \v!gespiegeld=>\global\chardef#5=1,
+ \v!geroteerd=>\gdef#3{90}\gdef#4{270},
+ \v!negatief=>\global\negateprintboxtrue,
+ 90=>\gdef#3{90}\gdef#4{270},
+ 180=>\gdef#3{180}\gdef#4{0},
+ 270=>\gdef#3{270}\gdef#4{90}]}
+
+\def\dostelpapierformaatin[#1][#2]%
+ {\ifsecondargument
+ \dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror
+ \dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror
+ \def\docommando##1%
+ {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+ {\gdef\papierformaat{##1}%
+ \global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
+ \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
+ \processcommalist[#1]\docommando
+ \doifdefinedelse{\??pp#1\c!schaal}
+ {\edef\papierschaal{\getvalue{\??pp#1\c!schaal}}}
+ {\edef\papierschaal{1}}%
+ \def\docommando##1%
+ {\doifsomething{##1}{\doifdefined{\??pp##1\c!breedte}
+ {\global\printpapierbreedte=\getvalue{\??pp##1\c!breedte}%
+ \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}}}}%
+ \processcommalist[#2]\docommando
+ \ifnum\paperlandscape>0
+ \doglobal\swapdimens\papierbreedte\papierhoogte
+ \fi
+ \ifnum\printlandscape>0
+ \doglobal\swapdimens\printpapierbreedte\printpapierhoogte
+ \fi
+ \ifdim\papierhoogte>\printpapierhoogte
+ \global\printpapierhoogte=\papierhoogte
+ \fi
+ \ifdim\papierbreedte>\printpapierbreedte
+ \global\printpapierbreedte=\papierbreedte
+ \fi
+ \calculatehsizes
+ \calculatevsizes
+ \global\newlogostrue
+ \global\newbackgroundtrue
+ \resetlayout
+ \else\iffirstargument
+ \stelpapierformaatin[#1][#2]%
+ \fi\fi}
+
+\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\rugwit=\@@lyrugwit
+ \global\kopwit=\@@lykopwit
+ \doifelse{\@@lygrid}{\v!ja}
+ {\gridsnappingtrue}
+ {\gridsnappingfalse}%
+\ifgridsnapping
+ \widowpenalty=0 % is gewoon beter
+ \clubpenalty =0 % zeker bij grids
+\else
+ \widowpenalty=\defaultwidowpenalty
+ \clubpenalty=\defaultclubpenalty
+\fi
+ \stelwitruimtein
+ \stelblankoin
+ \doifelse{\@@lybreedte}{\v!midden}
+ {\global\zetbreedte=\papierbreedte
+ \global\advance\zetbreedte by -2\rugwit}
+ {\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{\@@lyregels}{}
+ {\doifelse{\@@lyhoogte}{\v!midden}
+ {\global\zethoogte=\papierhoogte
+ \global\advance\zethoogte by -2\kopwit}
+ {\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}}}
+ {\global\zethoogte=\@@lyregels\lineheight
+ \global\advance\zethoogte by \hoofdhoogte
+ \global\advance\zethoogte by \voethoogte}%
+ \rugoffset=\@@lyrugoffset
+ \kopoffset=\@@lykopoffset
+ \calculatehsizes
+ \calculatevsizes
+ \global\newlogostrue
+ \global\newbackgroundtrue}
+
+\def\checklayout%
+ {\doifsomething{\@@lyregels}
+ {\ifdim\zethoogte=\@@lyregels\lineheight \else \resetlayout \fi}}
+
+\appendtoks \checklayout \to \everystarttext
+
+\newif\ifdoublesidedprint
+
+\def\setcenterpagebox#1#2#3#4%
+ {\let\leftpagebox =#1%
+ \let\rightpagebox =#2%
+ \let\toppagebox =#3%
+ \let\bottompagebox=#4}%
+
+\def\presetcenterpagebox% in \stellayoutin !!!!!!!!!!!!!!!!
+ {\setcenterpagebox\relax\hss\relax\vss
+ \doublesidedprintfalse
+ \ExpandFirstAfter\processallactionsinset
+ [\@@lyplaats]
+ [ \v!midden=>\setcenterpagebox\hss\hss\vss\vss,
+ \v!links=>\setcenterpagebox\relax\hss\toppagebox\bottompagebox,
+ \v!rechts=>\setcenterpagebox\hss\relax\toppagebox\bottompagebox,
+ \v!onder=>\setcenterpagebox\leftpagebox\rightpagebox\vss\relax,
+ \v!boven=>\setcenterpagebox\leftpagebox\rightpagebox\relax\vss,
+ \v!dubbelzijdig=>\doublesidedprinttrue,
+ \v!enkelzijdig=>\doublesidedprintfalse]}
+
+\def\complexstellayoutin[#1]%
+ {\ConvertToConstant\doifnot{#1}{\v!reset}
+ {\getparameters[\??ly][#1]%
+ \checkforems[#1]}%
+ \resetlayout
+ \presetcenterpagebox}
+
+\definecomplexorsimpleempty\stellayoutin
+
+\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
+ \resetlayout
+ \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\adaptpagedimensions%
+ {\rawdoifinsetelse{\realfolio}{\adaptedpages}
+ {\getvalue{\??za\realfolio}%
+ \letbeundefined{\??za\realfolio}}
+ {}}
+
+\def\checkpagedimensions%
+ {\poppagedimensions
+ \adaptpagedimensions}
+
+\def\reportpagedimensions%
+ {\ifx\poppagedimensions\relax
+ \else
+ \spatie\@@zahoogte\spatie-
+ \fi
+ \realfolio}
+
+\def\dodopaslayoutaan[#1]%
+ {\getparameters[\??za][\c!hoogte=,\c!regels=,#1]%
+ \pushpagedimensions
+ \doifelsenothing{\@@zaregels}
+ {\showmessage{\m!layouts}{1}{\@@zahoogte,\realfolio}}
+ {\showmessage{\m!layouts}{1}{\@@zaregels\space\v!regels,\realfolio}%
+ \def\@@zahoogte{\@@zaregels\openlineheight}}%
+ \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
+ \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\c!letter\c!kleur{}%
+ \begstrut\ignorespaces}
+
+\def\dostopmargeblok%
+ {\unskip\endstrut
+ \dostopattributes
+ \egroup
+ \egroup}
+
+\def\dontstartmargeblok%
+ {\@@mbvoor
+ \bgroup
+ \dostartattributes\??mb\c!letter\c!kleur{}}
+
+\def\dontstopmargeblok%
+ {\dostopattributes
+ \egroup
+ \@@mbna}
+
+%I n=Uitstellen
+%I c=\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 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
+
+\newif\ifinuitstellen
+
+\newevery\everytopofpage\relax
+
+\appendtoks\the\everytopofpage\to\everystarttext
+\appendtoks\global\everytopofpage{}\to\everystoptext
+
+\def\douitstellen%
+ {\the\everytopofpage
+ \ifinuitstellen\else\ifcase\nofpostponedblocks\else % The \nof-test is
+ \global\inuitstellentrue % definitely needed
+ \dorecurse{\nofpostponedblocks} % else we can loose
+ {\haalbuffer[buf-\recurselevel]} % or disorder floats
+ \doflushfloats % new but potential dangerous % and that is something
+ \doglobal\newcounter\nofpostponedblocks % we don't want, do we?
+ \global\inuitstellenfalse % Anyhow, 'uitstellen'
+ \fi\fi} % is still suboptimal.
+
+\setvalue{\e!start\e!uitstellen}%
+ {\doglobal\increment\nofpostponedblocks
+ \showmessage{\m!layouts}{3}{\nofpostponedblocks}%
+ \dostartbuffer[buf-\nofpostponedblocks]
+ [\e!start\e!uitstellen][\e!stop\e!uitstellen]}
+
+%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)
+
+\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}%
+ \immediatewriteutilitycommand%
+ {\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% overlapt behoorlijk met realpage macro
+ {\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
+ \setglobalsystemreference\rt!page{\v!eerstesubpagina}\firstsubpage
+ \setglobalsystemreference\rt!page{\v!laatstesubpagina}\lastsubpage
+ \bgroup
+ \ifnum\realpageno=\firstsubpage\relax
+ \global\let\prevsubpage=\firstsubpage
+\setglobalsystemreference\rt!page{\v!sub\v!achteruit}\lastsubpage
+ \else
+ \xdef\prevsubpage{\realfolio}%
+ \doglobal\decrement\prevsubpage
+\setglobalsystemreference\rt!page{\v!sub\v!achteruit}\prevsubpage
+ \fi
+ \setglobalsystemreference\rt!page{\v!vorigesubpagina}\prevsubpage
+ \ifnum\realpageno=\lastsubpage\relax
+ \global\let\nextsubpage=\lastsubpage
+\setglobalsystemreference\rt!page{\v!sub\v!vooruit}\firstsubpage
+ \else
+ \xdef\nextsubpage{\realfolio}%
+ \doglobal\increment\nextsubpage
+\setglobalsystemreference\rt!page{\v!sub\v!vooruit}\nextsubpage
+ \fi
+ \setglobalsystemreference\rt!page{\v!volgendesubpagina}\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.
+
+\countdef\realpageno = 0 \realpageno = 1
+\countdef\userpageno = 1 \userpageno = 1
+\countdef\subpageno = 2 \subpageno = 0 % !!
+\countdef\arrangeno = 3 \arrangeno = 0 % !!
+
+% we don't want conflicts when \pageno is used by other
+% packages, like CWEB, so we redefine \pageno
+
+\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}
+
+\def\gotonextrealpage%
+ {\global\advance\realpageno by 1
+ \ifnum\realpageno>\lastpage
+ \xdef\lastpage{\realfolio}%
+ \fi
+ \setglobalsystemreference\rt!page{\v!eerstepagina}\firstpage
+ \setglobalsystemreference\rt!page{\v!laatstepagina}\lastpage
+ \bgroup
+ \ifnum\realpageno>1
+ \advance\realpageno by -1
+ \xdef\prevpage{\realfolio}%
+ \setglobalsystemreference\rt!page{\v!achteruit}\prevpage
+ \else
+ \global\let\prevpage=\firstpage
+ \setglobalsystemreference\rt!page{\v!achteruit}\lastpage
+ \fi
+ \setglobalsystemreference\rt!page{\v!vorigepagina}\prevpage
+ \egroup
+ \bgroup
+ \ifnum\realpageno<\lastpage\relax
+ \advance\realpageno by 1
+ \xdef\nextpage{\realfolio}%
+ \setglobalsystemreference\rt!page{\v!pagina}\nextpage
+ \setglobalsystemreference\rt!page{\v!vooruit}\nextpage
+ \else
+ \global\let\nextpage=\lastpage
+ \setglobalsystemreference\rt!page{\v!pagina}\firstpage
+ \setglobalsystemreference\rt!page{\v!vooruit}\firstpage
+ \fi
+ \setglobalsystemreference\rt!page{\v!volgendepagina}\realfolio
+ \egroup}
+
+\def\checkrealpage%
+ {\global\realpageno=0
+ \gotonextrealpage
+ \global\let\checkrealpage=\relax}
+
+%\def\realnumberofpages#1% meteen laden, voor andere files (met refs)
+% {\gdef\lastpage{#1}%
+% \global\let\realnumberofpages=\gobbleoneargument}
+
+\def\savenofpages%
+ {\advance\realpageno by -1
+ \savecurrentvalue\lastpage{\realfolio}}%
+ %\immediatewriteutilitycommand{\realnumberofpages{\realfolio}}}%
+
+\def\totaalaantalpaginas%
+ {\lastpage}
+
+\def\initializepaper%
+ {\iflocation
+ \dosetuppaper
+ {\papierformaat}
+ {\the\papierbreedte}
+ {\the\papierhoogte}%
+ \else
+ \dosetuppaper
+ {\printpapierformaat}
+ {\the\printpapierbreedte}
+ {\the\printpapierhoogte}%
+ \fi}
+
+\def\myshipout#1%
+ {\voorpagina
+ \dontshowcomposition
+ \ifarrangingpages
+ \actualarrange
+ {\thisisrealpage{\realfolio}#1}%
+ \else
+ \actualshipout
+ {\thisisrealpage{\realfolio}#1}%
+ \fi
+ \gotonextrealpage
+ \napagina}
+
+\newbox\postponedcontent
+
+\def\flushatshipout%
+ {\dowithnextbox
+ {\global\setbox\postponedcontent=\hbox to \!!zeropoint
+ {%\hskip-\maxdimen % niet hier, gaat mis in acrobat (clipt)
+ \box\postponedcontent\box\nextbox}%
+ \global\ht\postponedcontent=\!!zeropoint
+ \global\dp\postponedcontent=\!!zeropoint
+ \global\wd\postponedcontent=\!!zeropoint}%
+ \hbox}
+
+% \starttypen
+% \def\pagestoshipout{1,3,5}
+% \stoptypen
+
+\newcounter\shippedoutpages
+\let\pagestoshipout\empty % {1,3,6}
+\chardef\whichpagetoshipout=0 % 0=all 1=odd 2=even
+
+\def\actualshipout#1%
+ {\doglobal\increment\shippedoutpages
+ \ifx\pagestoshipout\empty
+ \ifcase\whichpagetoshipout\relax
+ \donetrue
+ \or % 1
+ \ifodd\shippedoutpages\relax\donetrue\else\donefalse\fi
+ \or % 2
+ \ifodd\shippedoutpages\relax\donefalse\else\donetrue\fi
+ \else
+ \donetrue
+ \fi
+ \else
+ \ExpandBothAfter\doifinsetelse{\shippedoutpages}{\pagestoshipout}
+ \donetrue\donefalse
+ \fi
+ \ifdone
+ \shipout\vbox
+ {\forgetall
+ \offinterlineskip
+ \mindermeldingen
+ \vskip-1in
+ \hskip-1in
+ \hbox
+ {\setbox0=\hbox{#1}% just in case there are objects there
+ \setbox\scratchbox=\hbox
+ {\the\everyshipout
+ \ifnum\realpageno=\lastpage\relax\the\everylastshipout\fi}%
+ \smashbox\scratchbox
+ \box\scratchbox
+ \box\postponedcontent % evt ver naar links !
+ \box0}}%
+ \else
+ \message
+ {[\ifarrangingpages arranged \fi page
+ \ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
+ not flushed]}%
+ \setbox0=\hbox{#1}%
+ \deadcycles=0
+ \fi}
+
+
+\def\actualarrange#1%
+ {\setbox0=\hbox{\thisisrealpage{\realfolio}#1}%
+ \pusharrangedpage0
+ \deadcycles=0}
+
+\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#2 : tekst, floats en footnotes
+% \dopagebody#1#2 : 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
+ \nofbotfloats=0
+ \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{}}
+
+% bewaren tvb documentatie
+%
+% \hbox to \hsize
+% {\en
+% \switchnaarkorps[5pt]%
+% \emergencystretch2em
+% \dimen0=\baselineskip
+% \baselineskip=\dimen0 plus 1pt
+% \hsize=.2\hsize
+% \vsize=2\hsize
+% \ruledvbox to \vsize{\input tufte \par}\hss
+% \ruledvbox to \vsize{\input tufte \par\kern-\prevdepth}\hss
+% \ruledvbox to \vsize{\input tufte \par\kern0pt}\hss
+% \ruledvbox to \vsize{\input tufte \par\vfill}\hss
+% \ruledvbox to \vsize{\input tufte \par\kern-\prevdepth\vfill}}
+%
+% \hbox to \hsize
+% {\en
+% \switchnaarkorps[5pt]%
+% \emergencystretch2em
+% \dimen0=\baselineskip
+% \baselineskip=\dimen0 plus 1pt
+% \hsize=.18\hsize
+% \vsize=2.5\hsize
+% \setbox0=\vbox{\input tufte\relax}%
+% \ruledvbox to \vsize{\unvcopy0}\hss
+% \ruledvbox to \vsize{\unvcopy0\kern-\dp0}\hss
+% \ruledvbox to \vsize{\unvcopy0\kern0pt}\hss
+% \ruledvbox to \vsize{\unvcopy0\vfill}\hss
+% \ruledvbox to \vsize{\unvcopy0\kern-\dp0\vfill}}
+
+% \def\dopagecontents#1#2%
+% {\dotopinsertions
+% \bgroup
+% \forgetall
+% \boxmaxdepth=\maxdepth
+% \dimen0=\dp#2%
+% \bgroup
+% #1#2\relax
+% \pushcolor
+% \dobotinsertions
+% \egroup
+% \ifr@ggedbottom
+% \kern-\dimen0
+% \vfil
+% \fi
+% \ifb@selinebottom
+% \kern-\dimen0
+% \kern\maxdepth
+% \fi
+% \egroup
+% \placefootnotes}
+
+\def\dopagecontents#1#2% \box<n> \unvbox<n>
+ {\bgroup
+ \forgetall
+ \boxmaxdepth=\maxdepth
+ \setbox0=\vbox to \teksthoogte
+ {\edef\currentpagedepth{\the\dp#2}% still to be derived from #1
+ \dotopinsertions
+ #1#2% \fuzzysnappedbox{#1}{#2}% goes wrong
+ \pushcolor
+ \ifgridsnapping
+ \vskip-\currentpagedepth
+ \vskip\openstrutdepth % \dp\strutbox
+ \prevdepth\openstrutdepth % \dp\strutbox
+ \dobotinsertions
+ \vfil
+ \else\ifr@ggedbottom
+ \vskip-\currentpagedepth
+ \vskip\openstrutdepth % \dp\strutbox
+ \prevdepth\openstrutdepth % \dp\strutbox
+ \dobotinsertions
+ \vfil
+ \else\ifb@selinebottom
+ \kern-\currentpagedepth
+ \kern\maxdepth
+ \dobotinsertions
+ \else
+ %\dobotinsertions
+ \fi\fi\fi
+ \ifdim\ht\footins>\!!zeropoint % beter dan \ifvoid\footins\else
+ \kern\skip\footins
+ \kern\ht\footins
+ \fi}%
+ \ifgridsnapping
+ \getnoflines\teksthoogte
+ \advance\noflines by -1
+ \scratchdimen=\noflines\lineheight
+ \advance\scratchdimen by \topskip
+ \else
+ \scratchdimen=\ht0
+ \fi
+ \setbox2=\hbox
+ {\ifvoid\savedfootins \else
+ \setbox\footins=\box\savedfootins
+ \fi
+ \lower\scratchdimen\vbox{\placefootnotes}}%
+ \smashbox2
+ \ht0=\!!zeropoint
+ \vbox to \teksthoogte
+ {\box0\box2}%
+ \egroup}
+
+\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}%
+ {\vskip\bovenhoogte} % \vbox to \bovenhoogte{\vss}}
+
+\setvalue{\s!dummy\c!commando\v!onder}%
+ {\vskip\onderhoogte} % \vbox to \onderhoogte{\vss}}
+
+\def\plaatslinkerrandblok {\dodummypageskip\v!links}
+\def\plaatsrechterrandblok {\dodummypageskip\v!rechts}
+
+\def\plaatsboventekstblok {\dodummypageskip\v!boven}
+\def\plaatsondertekstblok {\dodummypageskip\v!onder}
+
+% kan tzt nog eens als:
+%
+% \newtoks\everyboventekstblok
+%
+%\def\plaatsboventekstblok%
+% {\vbox to \bovenhoogte
+% {\the\everyboventekstblok}
+%
+% \def\doplaatsboventekstblok#1%
+% {\vbox to \bovenhoogte
+% {\@@tkboventekstvoor#1\@@tkboventekstna\kern\!!zeropoint}%
+% \vskip-\bovenhoogte}
+%
+% \appendtoks\interactiemenus[\v!boven]\to\everyboventekstblok
+%
+% kan vaker, is namelijk sneller als commalist
+
+\newtoks\afterpage \newtoks\aftereverypage
+\newtoks\beforepage \newtoks\beforeeverypage
+
+\newif\ifshowgrid
+
+\def\toongrid%
+ {\tracegridsnappingtrue
+ \showgridtrue}
+
+\def\doplaatstekstblok#1#2%
+ {\bgroup
+ \setbox0=\hbox to \zetbreedte
+ {\vbox to \teksthoogte
+ {\offinterlineskip
+ \boxmaxdepth\maxdepth
+ \dopagecontents#1#2}}%
+ \ht0=\teksthoogte
+ \wd0=\zetbreedte
+ \ifshowgrid
+ \setgridbox2\zetbreedte\teksthoogte
+ \hbox{\color[red]{\box2}\hskip-\zetbreedte\box0}%
+ \else
+ \box0
+ \fi
+ \egroup}
+
+\def\getmainbox#1#2%
+ {\setbox0=\vbox
+ {\offinterlineskip % na \paginaletter !
+ \calculatereducedvsizes
+ \calculatehsizes
+ \swapmargins
+ \vskip\hoofdhoogte
+ \vskip\hoofdafstand
+ \hbox
+ {\bgroup
+ \swapmargins
+ \goleftonpage
+ \plaatslinkerrandblok
+ \hskip\linkerrandafstand
+ \showpageseparation
+ \plaatslinkermargeblok
+ \hskip\linkermargeafstand
+ \egroup
+ \doplaatstekstblok#1#2%
+ \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%
+ {\printpapierbreedte=\papierschaal\printpapierbreedte
+ \printpapierhoogte =\papierschaal\printpapierhoogte
+ \setbox#1=\vbox to \printpapierhoogte
+ {\toppagebox
+ \hbox to \printpapierbreedte
+ {\ifdoublesidedprint
+ \doifbothsides
+ \leftpagebox\box#1\rightpagebox
+ \orsideone
+ \leftpagebox\box#1\rightpagebox
+ \orsidetwo
+ \rightpagebox\box#1\leftpagebox
+ \od
+ \else
+ \leftpagebox\box#1\rightpagebox
+ \fi}
+ \bottompagebox}}
+
+\def\offsetprintbox#1%
+ {\dimen0=\wd#1\dimen2=\ht#1\dimen4=\dp#1%
+ \setbox#1=\vbox
+ {\forgetall
+ \offinterlineskip
+ \vskip\kopoffset
+ \doifbothsides
+ \hskip\rugoffset
+ \orsideone
+ \hskip\rugoffset
+ \orsidetwo
+ \hskip-\rugoffset
+ \od
+ \box#1}%
+ \wd#1=\dimen0\ht#1=\dimen2\dp#1=\dimen4}
+
+\def\replicatebox#1#2#3%
+ {\setbox#1=\vbox
+ {\forgetall
+ \offinterlineskip
+ \dorecurse{#3}
+ {\hbox{\dorecurse{#2}{\copy#1\hskip\@@lydx}\unskip}%
+ \vskip\@@lydy}
+ \unskip}}
+
+\def\replicatepagebox#1%
+ {\ifnum\@@lynx>0 \ifnum\@@lyny>0
+ \replicatebox{#1}{\@@lynx}{\@@lyny}%
+ \fi\fi}
+
+\def\rotatepagebodybox#1#2#3%
+ {\ifnum#2#3>0
+ \setbox#1=\vbox
+ {\edef\somerotation%
+ {\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}%
+ \dorotatebox\somerotation\hbox{\box#1}}%
+ \fi}
+
+\def\rotatepaperbox#1%
+ {\rotatepagebodybox{#1}\paperrotation\paperreverse}
+
+\def\rotateprintbox#1%
+ {\rotatepagebodybox{#1}\printrotation\printreverse}
+
+\def\mirrorpagebodybox#1#2%
+ {\ifcase#2\or
+ \setbox#1=\vbox
+ {\domirrorbox\vbox{\box#1}}%
+ \fi}
+
+\def\mirrorpaperbox#1%
+ {\mirrorpagebodybox{#1}\papermirror}
+
+\def\mirrorprintbox#1%
+ {\mirrorpagebodybox{#1}\printmirror}
+
+\def\scalepagebox#1%
+ {\ifdim\@@lyschaal pt=1pt \else
+ \setbox#1=\vbox
+ {\schaal[\c!sx=\@@lyschaal,\c!sy=\@@lyschaal]{\box#1}}%
+ \papierbreedte=\@@lyschaal\papierbreedte
+ \papierhoogte =\@@lyschaal\papierhoogte
+ \fi}
+
+\def\negateprintbox#1%
+ {\ifnegateprintbox
+ \negatecolorbox{#1}%
+ \fi}
+
+\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\pagecutmarksymbol%
+ {\the\realpageno}%
+
+\def\addpagecutmarks#1%
+ {\doif{\@@lymarkering}{\v!aan}
+ {\let\cutmarksymbol=\pagecutmarksymbol
+ \makecutbox{#1}}}
+
+\def\addpagecolormarks#1%
+ {\doif{\@@lymarkering}{\v!kleur}
+ {\let\cutmarksymbol=\pagecutmarksymbol
+ \makecutbox{#1}%
+ \ifnum\horizontalcutmarks>1 \chardef\colormarkoffset=4 \fi
+ \ifnum\verticalcutmarks >1 \chardef\colormarkoffset=4 \fi
+ \colormarkbox{#1}}}
+
+\newif\ifpagebodyornaments \pagebodyornamentstrue
+\newif\ifarrangingpages \arrangingpagesfalse
+
+\let\poparrangedpages=\relax
+\let\pusharrangedpage=\relax
+
+\def\reportarrangedpage#1%
+ {\showmessage
+ {\m!systems}{23}
+ {\the\realpageno.\the\pageno\ifnum\subpageno>0 .\the\subpageno\fi,#1}}
+
+\def\buildpagebody#1#2%
+ {\vbox
+ {\beginrestorecatcodes
+ \forgetall % igv problemen, check: \boxmaxdepth\maxdimen
+ \boxmaxdepth\maxdimen % new
+ \mindermeldingen
+ \setbox0=\vbox
+ {\doconvertfont{\@@lyletter}{}%
+ \offinterlineskip
+ \ifpagebodyornaments
+ \getbackgroundbox
+ \getlogobox
+ \gettextboxes
+ \fi
+ \getmainbox#1#2}%
+ \buildpagebox0
+ \ifpagebodyornaments
+ \addpagebackground0
+ \fi
+ \ifarrangingpages \else
+ \addpagecutmarks0
+ \replicatepagebox0
+ \scalepagebox0
+ \mirrorpaperbox0
+ \rotatepaperbox0
+ \addpagecolormarks0
+ \centerpagebox0
+ \mirrorprintbox0
+ \rotateprintbox0
+ \offsetprintbox0
+ \negateprintbox0
+ \fi
+ \box0
+ \endrestorecatcodes}}
+
+\def\finishpagebox#1%
+ {\ifarrangingpages
+ \addpagecutmarks#1%
+ \addpagecolormarks#1%
+ \centerpagebox#1%
+ \mirrorprintbox#1%
+ \rotateprintbox#1%
+ \offsetprintbox#1%
+ \negateprintbox#1%
+ \fi}
+
+% TBV testdoeleinden:
+
+\def\dotoonprint[#1][#2][#3]%
+ {\framed
+ [\c!offset=\v!overlay,
+ \c!strut=\v!nee]
+ {\forgetall
+ \mindermeldingen
+ \globaldefs=-1
+ \dimen0=\pagegoal
+ \definieerpapierformaat[X][\c!breedte=4em, \c!hoogte=6em]%
+ \definieerpapierformaat[Y][\c!breedte=12em,\c!hoogte=14em]%
+ \stelpapierformaatin[#1,X][#2,Y]%
+ \stellayoutin[#3]%
+ \setbox0=\vbox
+ {\framed
+ [\c!offset=\v!overlay,\c!strut=\v!nee,
+ \c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
+ {\ss ABC\par DEF}}%
+ \dubbelzijdigfalse
+ \def\cutmarklength{.5em}%
+ \addpagecutmarks0%
+ \replicatepagebox0%
+ \scalepagebox0%
+ \mirrorpaperbox0%
+ \rotatepaperbox0%
+ \centerpagebox0%
+ \mirrorprintbox0%
+ \rotateprintbox0%
+ \offsetprintbox0%
+ \pagegoal=\dimen0
+ \box0}}
+
+\def\toonprint%
+ {\dotripleempty\dotoonprint}
+
+% \switchnaarkorps[8pt]
+%
+% \startcombinatie[4*4]
+% {\toonprint} {\strut}
+% {\toonprint[][][plaats=midden]} {\type{plaats=midden}}
+% {\toonprint[][][plaats=midden,markering=aan]} {\type{markering=aan}\break
+% \type{plaats=midden}}
+% {\toonprint[][][plaats=midden,markering=aan,nx=2]} {\type{markering=aan}\break
+% \type{plaats=midden}\break
+% \type{nx=2}}
+% {\toonprint[][][plaats=links]} {\type{plaats=links}}
+% {\toonprint[][][plaats=rechts]} {\type{plaats=rechts}}
+% {\toonprint[][][plaats={links,onder}]} {\type{plaats={links,onder}}}
+% {\toonprint[][][plaats={rechts,onder}]} {\type{plaats={rechts,onder}}}
+% {\toonprint[][][nx=2,ny=1]} {\type{nx=2,ny=1}}
+% {\toonprint[][][nx=1,ny=2]} {\type{nx=1,ny=2}}
+% {\toonprint[][][nx=2,ny=2]} {\type{nx=2,ny=2}}
+% {\toonprint[][][nx=2,ny=2,plaats=midden]} {\type{nx=2,ny=2}\break
+% \type{plaats=midden}}
+% {\toonprint[][][rugoffset=3pt]} {\type{rugoffset=.5cm}}
+% {\toonprint[][][kopoffset=3pt]} {\type{kopoffset=.5cm}}
+% {\toonprint[][][schaal=1.5]} {\type{schaal=1.5}}
+% {\toonprint[][][schaal=0.8]} {\type{schaal=0.8}}
+% \stopcombinatie
+%
+% \startcombinatie[3*4]
+% {\toonprint[liggend][][plaats=midden]} {\type{liggend}}
+% {\toonprint[][liggend][plaats=midden]} {\strut\break\type{liggend}}
+% {\toonprint[liggend][liggend][plaats=midden]} {\type{liggend}\break\type{liggend}}
+% {\toonprint[90][][plaats=midden]} {\type{90}}
+% {\toonprint[][90][plaats=midden]} {\strut\break\type{90}}
+% {\toonprint[90][90][plaats=midden]} {\type{90}\break\type{90}}
+% {\toonprint[180][][plaats=midden]} {\type{180}}
+% {\toonprint[][180][plaats=midden]} {\strut\break\type{180}}
+% {\toonprint[180][180][plaats=midden]} {\type{180}\break\type{180}}
+% {\toonprint[gespiegeld][][plaats=midden]} {\type{gespiegeld}}
+% {\toonprint[][gespiegeld][plaats=midden]} {\strut\break\type{gespiegeld}}
+% {\toonprint[gespiegeld][gespiegeld][plaats=midden]} {\type{gespiegeld}\break\type{gespiegeld}}
+% \stopcombinatie
+
+\chardef\normalpagebox=255
+
+\appendtoks \restoreglobalbodyfont \to \everypagebody
+\appendtoks \restorecolumnsettings \to \everypagebody
+
+\def\dopagebody#1#2%
+ {\getallmarks
+ \the\everypagebody
+ \startcolorpage
+ \gotonextsubpage
+ \dontshowboxes
+ \naastpagina
+ \checkreferences
+ \checkmargeblokken
+ \dotoks\beforeeverypage
+ \flushtoks\beforepage
+ \inpagebodytrue
+ \buildpagebody#1#2%
+ \flushtoks\afterpage
+ \dotoks\aftereverypage
+ \resetpagina
+ \updatelistreferences
+ \resetlayoutregels % mischien in shipout
+ \stopcolorpage}
+
+\def\beforefinaloutput%
+ {}
+
+\def\afterfinaloutput%
+ {\forgetall
+ \vskip\!!zeropoint\relax
+ \ifvoid\normalpagebox
+ \else
+ \unvbox\normalpagebox
+ \penalty\outputpenalty
+ \fi
+ \ifnum\outputpenalty>-\@MM\relax
+ \else
+ \dosupereject
+ \fi
+ \inpagebodytrue % needed for enabling \blanko !
+ \dosetbothinserts
+ \setvsize % this is needed for interacting components, like floats and multicolumns
+ \adaptfuzzypagegoal} % watch this hack!
+
+\def\setpagecounters%
+ {\setuserpageno{\ruwenummer[\s!page]}%
+ \doifelse{\@@snstatus}{\v!stop}
+ {\global\subpageno=0}
+ {\global\subpageno=\ruwenummer[\s!subpage]}}
+
+\newtoks\pageboundsettings
+
+\prependtoks \initializepaper \to \pageboundsettings
+
+\def\dofinaloutput#1#2%
+ {\beforefinaloutput
+ \the\everybeforeshipout
+ \ifspecialbasedsettings
+ \myshipout{\hbox{\hbox to \!!zeropoint{\the\pageboundsettings}\hbox{\dopagebody#1#2\setpagecounters}}}%
+ \else
+ \the\pageboundsettings
+ \myshipout{\hbox{\dopagebody#1#2\setpagecounters}}%
+ \fi
+ \the\everyaftershipout
+ \afterfinaloutput
+ \popcolor} % ... and here ...
+
+\def\donofinaloutput#1#2%
+ {\beforefinaloutput
+ \the\everybeforeshipout
+ \setpagecounters
+ \message{[-\the\realpageno]}%
+ \setbox0=\hbox
+ {\the\everyshipout
+ \dopagebody#1#2}%
+ \deadcycles=0
+ \gotonextrealpage
+ \the\everyaftershipout
+ \afterfinaloutput
+ \popcolor} % ... and here
+
+\let\checkpageversion=\relax
+
+\def\finaloutput#1#2%
+ {\checkpageversion
+ \ifverwerken
+ \ifgeselecteerd
+ \dofinaloutput#1#2%
+ \else
+ \donofinaloutput#1#2%
+ \fi
+ \else
+ \ifgeselecteerd
+ \donofinaloutput#1#2%
+ \else
+ \dofinaloutput#1#2%
+ \fi
+ \fi
+ \resetselectiepagina
+ \verhoogpaginanummer
+ \checkpagedimensions
+ \ifnum\outputpenalty>-\@MM\relax
+ \else
+ \dosupereject
+ \fi
+ \douitstellen}
+
+\def\dooutput%
+ {\finaloutput\unvbox\normalpagebox}
+
+\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\complexstelspatieringin[#1]%
+ {\processaction
+ [#1]
+ [\v!opelkaar=>\newfrenchspacing,
+ \v!ruim=>\nonfrenchspacing]%
+ \updateraggedskips}
+
+\def\simplestelspatieringin%
+ {\updateraggedskips}
+
+\definecomplexorsimple\stelspatieringin
+
+\bgroup
+\catcode`\~=\@@active % eigenlijk is ~ al actief
+\gdef\fixedspaces% % in Plain \TeX, maar we weten
+ {\catcode`\~=\@@active % nooit wat er inmiddels is
+ \def~{\fixedspace}} % gebeurd, vandaar.
+\egroup
+
+\def\space { }
+\def\fixedspace {\hskip.5em\relax}
+\def\nospace {\unskip\ignorespaces}
+
+\let\spatie \space
+\let\hardespatie\fixedspace
+\let\geenspatie \nospace
+
+\def\opelkaar%
+ {\nointerlineskip}
+
+\def\omlaag[#1]% nog eens mooier, relateren aan blanko
+ {\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]}
+
+\newif\ifwitruimteflexibel
+
+\def\dodostelwitruimtein[#1]%
+ {\witruimteflexibeltrue
+ \processallactionsinset
+ [#1]
+ [\v!herstel=>,
+ \v!vast=>\witruimteflexibelfalse,
+ \v!flexibel=>\witruimteflexibeltrue,
+ \v!regel=>\tussenwit=\baselineskip,
+ \v!halveregel=>\tussenwit=.5\baselineskip,
+ \s!default=>\doifnot{\currentwitruimte}{\v!geen}
+ {\stelwitruimteopnieuwin},
+ \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig
+ {\tussenwit}
+ {\blankokleinmaat}{\blankomiddelmaat}{\blankogrootmaat}]% % te vangen
+ \edef\currentwitruimte%
+ {\ifdim\tussenwit=\!!zeropoint
+ \v!geen
+ \else
+ \ifgridsnapping\the\baselineskip\else\the\tussenwit\fi
+ \fi}%
+ \ifgridsnapping
+ \witruimteflexibelfalse
+ \tussenwit=1\tussenwit
+ \ifdim\tussenwit>\!!zeropoint
+ \tussenwit=\baselineskip
+ \fi
+ \else
+ \ifwitruimteflexibel \else \tussenwit=1\tussenwit \fi
+ \fi
+ \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}
+
+\def\savecurrentwitruimte%
+ {\edef\restorecurrentwitruimte%
+ {\tussenwit=\the\tussenwit
+ \parskip=\the\parskip
+ \noexpand\def\noexpand\currentwitruimte{\currentwitruimte}%
+ \ifwitruimteflexibel
+ \noexpand\witruimteflexibeltrue
+ \else
+ \noexpand\witruimteflexibelfalse
+ \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\startopelkaar%
+ {\dosingleempty\dostartopelkaar}
+
+\def\dostartopelkaar[#1]% nesting afvangen
+ {\par
+ \ifvmode
+ \edef\lastdoneparskip{\the\lastskip}%
+\edef\lastdoneprevdepth{\the\prevdepth}% zeer recent toegevoegd
+ \ifdim\prevdepth=-1000pt % toegevoegd omdat binnen
+ \else % een vbox een extra skip
+ \witruimte % ongewenst is; dit kan
+\baselinecorrection %% zie in \plaatsregister[n=1]
+ \vskip\noparskipsignal % waarschijnlijk ook in
+ \fi % blanko blokkeer
+ \bgroup
+ \doifelse{#1}{\v!blanko}
+ {\opelkaarfalse}
+ {\opelkaartrue}%
+ \blanko[\v!blokkeer]%
+ \stelwitruimtein[\v!geen]
+ \fi}
+
+\def\stopopelkaar%
+ {\par
+\ifvmode
+ \egroup
+ \ifdim\lastskip=\noparskipsignal\relax
+ \removelastskip
+ \geenwitruimte
+ \vskip-\lastdoneparskip
+ \vskip+\lastdoneparskip
+\prevdepth-\lastdoneprevdepth % zeer recent toegevoegd
+ \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!default=>\let\dorondomregelcorrectie=\relax,
+ \s!unknown=>{\def\dorondomregelcorrectie{\blanko[#1]}}]%
+ \dorondomregelcorrectie
+ \startbaselinecorrection
+ \offbaselinecorrection}
+
+\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.
+
+%D There are two ways to influence the interline spacing. The
+%D most general and often most consistent way is using
+%D
+%D \showsetup{\y!stelinterliniein}
+%D
+%D For instance
+%D
+%D \starttypen
+%D \setupinterlinespace[line=2.8ex]
+%D \stoptypen
+%D
+%D This setting adapts itself to the bodyfontsize, while for
+%D instance saying
+%D
+%D \starttypen
+%D \setupinterlinespace[line=12pt]
+%D \stoptypen
+%D
+%D sets things fixed for all sizes, which is definitely not
+%D what we want. Therefore one can also say:
+%D
+%D \starttypen
+%D \definecorpsenvironment[9pt][interlinespace=11pt]
+%D \stoptypen
+%D
+%D One can still use \type{\setupinterlinespace} (without
+%D arguments) to set the interline space according to the
+%D current font, e.g. a \type{\bfa}.
+
+\newif\iflocalinterlinespace
+
+\def\bodyfontinterlinespecs%
+ {\??ft\normalizedbodyfontsize\c!interlinie}
+
+\def\bodyfontinterlinespace%
+ {\csname\bodyfontinterlinespecs\endcsname}
+
+\def\presetnormallineheight%
+ {\edef\normallineheight{\@@itregel}%
+ \iflocalinterlinespace \else
+ \doifdefined{\bodyfontinterlinespecs}
+ {\doifsomething{\bodyfontinterlinespace}
+ {\edef\normallineheight{\bodyfontinterlinespace}}}%
+ \fi}
+
+\def\complexstelinterliniein[#1]% \commalistelement ipv #1
+ {\doifassignmentelse{#1}
+ {\getparameters[\??it][#1]%
+ \scratchdimen=0\@@ithoogte pt
+ \advance\scratchdimen by 0\@@itdiepte pt
+ \ifdim\scratchdimen>1pt
+ \showmessage{\m!layouts}{10}{\@@ithoogte,\@@itdiepte}%
+ \let\@@ithoogte=\strutheightfactor
+ \let\@@itdiepte=\strutdepthfactor
+ \else
+ \let\strutheightfactor=\@@ithoogte
+ \let\strutdepthfactor =\@@itdiepte
+ \fi
+ \let\normallineheight=\@@itregel
+ \let\topskipfactor =\@@itboven
+ \let\maxdepthfactor =\@@itonder
+ \setfontparameters % redundant \setstrut
+ \updateraggedskips} % yes indeed
+ {\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%
+ {\localinterlinespacetrue
+ \setfontparameters
+ \updateraggedskips % funny one here
+ \localinterlinespacefalse}
+
+\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
+\newif\ifblankoforceer
+
+\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\normalskipamount%
+ {\openlineheight
+ \ifgridsnapping \else \ifblankoflexibel
+ \!!plus\skipgluefactor\openlineheight
+ \!!minus\skipgluefactor\openlineheight
+ \fi \fi
+ \relax}
+
+\def\regelafstand{\normalskipamount}
+
+\def\deblankoskip{\skipfactor\regelafstand}
+
+\def\laatsteblankoskip%
+ {\blankoskip}
+
+\def\geenblanko%
+ {\removelastskip}
+
+\def\dosingleblanko#1% ook nog \v!halveregel+fuzzysnap
+ {\doifelse{#1}{\v!regel}
+ {\blankoskipamount=\openlineheight}
+ {\ifgridsnapping
+ \assigndimension{#1}{\blankoskipamount}%
+ {.25\openlineheight}{.5\openlineheight}{\openlineheight}%
+ \else
+ \assigndimension{#1}{\blankoskipamount}%
+ {\smallskipamount}{\medskipamount}{\bigskipamount}%
+ \fi}%
+ \global\advance\blankoskip by \blankoskipamount}
+
+\newif\iffuzzyvskip
+
+\def\doblanko#1%
+ {\processallactionsinset
+ [#1]
+ [ \v!groot=>\dosingleblanko\v!groot, % happens often
+ \v!buiten=>\ifvmode\ifinner\blankobuitentrue\fi\fi,
+ \v!reset=>\global\blankoresettrue,
+ \v!back=>\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=>\global\blankoforceertrue,
+ \v!regel=>\global\advance\blankoskip by \lineheight,
+ \v!halveregel=>\global\fuzzyvskiptrue\global\advance\blankoskip by .5\lineheight,
+ \s!unknown=>{\herhaalmetcommando[#1]\dosingleblanko}]}
+
+\def\oldprevdepth{\prevdepth}%
+\def\newprevdepth{-1001pt}
+
+\def\mindimen{0.00002pt}
+
+\def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if
+ {\global\blankoresetfalse
+ \global\blankoblokkeerfalse
+ \global\blankogeenwitfalse
+ \global\blankoskip=\!!zeropoint\relax
+ \global\blankoforceerfalse
+ \blankobuitenfalse
+ \processcommalist[#1]\doblanko
+ \ifblankobuiten
+ \else
+ \par
+ \ifvmode
+ \ifblankoforceer\ifdim\prevdepth>\!!zeropoint\else
+ \vbox{\strut}\kern-\lineheight
+ \fi\fi
+ \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
+ \iffuzzyvskip
+ \removelastfuzzyvskip
+ \fuzzyvskip\blankoskip\relax
+ \else
+ \removelastskip
+ \vskip\blankoskip\relax
+ \fi
+ \fi
+ \else
+ \iffuzzyvskip
+ \removelastfuzzyvskip
+ \fuzzyvskip\blankoskip\relax
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \global\fuzzyvskipfalse
+ \presetindentation}
+
+\def\complexdodoblanko[#1]%
+ {\flushfootnotes
+ \ifopelkaar
+ \ifinpagebody
+ \expanded{\docomplexdoblanko[#1]}% \expanded=nieuw
+ \else
+ \par
+ \fi
+ \else
+ \expanded{\docomplexdoblanko[#1]}% \expanded = nieuw
+ \fi}
+
+\def\doindirectblanko#1%
+ {\ifundefined{\??bo#1}% <-etex \expandafter\ifx\csname\??bo#1\endcsname\relax
+ \expanded{\complexdodoblanko[#1]}%
+ \else
+ \expandafter\complexdoblanko\expandafter[\csname\??bo#1\endcsname]%
+ \fi}
+
+\def\complexdoblanko[#1]% enables [force,8\bodyfontsize]
+ {\doifinstringelse{,}{#1}
+ {\expanded{\complexdodoblanko[#1]}}
+ {\doifnumberelse{#1}
+ {\expanded{\complexdodoblanko[#1]}}
+ {\doindirectblanko{#1}}}}
+
+\def\currentblanko%
+ {\v!groot}
+
+\def\simpledoblanko%
+ {\doifelse{\currentwitruimte}{\v!geen}
+ {\blanko[\currentblanko]}
+ {\blanko[\currentwitruimte]}}
+
+\def\blanko% % the \relax is definitely needed due to the many \if's
+ {\relax\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]%
+ {\ifgridsnapping
+ \blankoflexibelfalse
+ \else
+ \ExpandFirstAfter\processallactionsinset
+ [#1]
+ [ \v!flexibel=>\blankoflexibeltrue,
+ \v!vast=>\blankoflexibelfalse]%
+ \fi
+ \ExpandFirstAfter\processallactionsinset
+ [#1]
+ [ \v!flexibel=>\dostelblankoin{\deblankoskip},
+ \v!vast=>\dostelblankoin{\deblankoskip},
+ \v!regel=>\edef\deblankoskip{\regelafstand}%
+ \dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!groot,
+ \v!halveregel=>\scratchskip=.5\regelafstand
+ \edef\deblankoskip{\the\scratchskip}%
+ \dostelblankoin{\deblankoskip}%
+ \let\deblanko=\v!middel,
+ \v!groot=>\ifgridsnapping
+ \edef\deblankoskip{\regelafstand}%
+ \dostelblankoin{\deblankoskip}%
+ \fi
+ \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}
+
+\definecomplexorsimpleempty\stelblankoin
+
+\def\dodefinieerblanko[#1][#2]%
+ {\setvalue{\??bo#1}{#2}}
+
+\def\definieerblanko%
+ {\dodoubleargument\dodefinieerblanko}
+
+\def\savecurrentblanko%
+ {\edef\restorecurrentblanko%
+ {\bigskipamount=\the\bigskipamount
+ \medskipamount=\the\medskipamount
+ \smallskipamount=\the\smallskipamount
+ \noexpand\def\noexpand\currentblanko{\currentblanko}%
+ \ifblankoflexibel
+ \noexpand\blankoflexibeltrue
+ \else
+ \noexpand\blankoflexibelfalse
+ \fi}}
+
+%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.
+
+\let\currentvoorwit=\empty
+
+\newdimen\voorwit
+
+\newif\ifindentfirstparagraph % \indentfirstparagraphtrue
+
+\def\presetindentation%
+ {\doifoutervmode
+ {\ifindentfirstparagraph\else\noindentation\fi}}
+
+\def\dostelinspringenin[#1]%
+ {\processallactionsinset
+ [#1]
+ [ \v!eerste=>\indentfirstparagraphtrue,
+ \v!volgende=>\indentfirstparagraphfalse,
+ \s!default=>\dodostelinspringenin,
+ \s!unknown=>\edef\currentvoorwit{\commalistelement}%
+ \dodostelinspringenin]}
+
+\def\dodostelinspringenin%
+ {\assigndimension{\currentvoorwit}{\voorwit}{1em}{1.5em}{2em}%
+ \parindent=\voorwit\relax}
+
+\def\stelinspringenin%
+ {\dosingleempty\dostelinspringenin}
+
+\def\doinspringen[#1]%
+ {\processallactionsinset
+ [#1]
+ [ \v!nee=>\parindent=\voorwit\relax\noindent,
+ \v!niet=>\parindent=\voorwit\relax\noindent,
+ \v!ja=>\parindent=\voorwit\relax, % geen \indent !
+ \v!eerste=>\indentfirstparagraphtrue,
+ \v!volgende=>\indentfirstparagraphfalse,
+ \v!altijd=>\parindent=\voorwit\relax, % geen \indent !
+ \v!nooit=>\parindent=\!!zeropoint\relax]}
+
+\def\inspringen%
+ {\dosingleargument\doinspringen}
+
+\def\nietinspringen{\inspringen[\v!nee,\v!volgende]}
+\def\welinspringen {\inspringen[\v!ja,\v!eerste]}
+
+%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}
+ {\ifmmode
+ \ifnum\fam<0
+ \holatextfont
+ \else
+ \holamathfont
+ \fi
+ \else
+ \holatextfont
+ \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,\uitgerekt
+%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 \uitgerekt{tekst}
+%I
+%I bijvoorbeeld:
+%I
+%I \hbox to 20em{\uitgerekt{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\relax}
+
+\def\stelkoppeltekenin%
+ {\dodoubleargument\getparameters[\??kp]}
+
+\def\beginofsubsentence%
+ {\ifdim\lastkern=\subsentencesignal
+ \unskip
+ \kern\subsentenceskip
+ \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\ignorespaces}
+
+\def\endofsubsentence%
+ {\ifodd\subsentencelevel
+ \getvalue{\??la\currentlanguage\c!rightsentence}%
+ \else
+ \getvalue{\??la\currentlanguage\c!rightsubsentence}%
+ \fi
+ \doglobal\decrement\subsentencelevel
+ \unskip
+ \kern\subsentencesignal}
+
+\def\endofsubsentencespacing%
+ {%\ifdim\lastkern=\subsentencesignal \else
+ % \unskip
+ %\fi
+ \ifdim\lastkern=\subsentencesignal
+ \unskip
+ \hskip\subsentenceskip
+ \ignorespaces
+ \else
+ \unskip
+ \fi}
+
+% test |<|test |<|test|>| test|>| test \par
+% test|<|test|<|test|>|test|>|test \par
+% test |<||<|test|>||>| test \par
+
+\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!status=\v!start,
+ \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
+ \doifnot{\@@psstatus}{\v!overlay}
+ {\skip2=##5\relax
+ \advance\skip2 by ##3\relax
+ \ifdim##3<-##7\relax\global##7=-##3\relax\fi
+ \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}
+
+%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%
+ {\doifinsetelse{\@@kloffset}{\v!geen,\v!overlay}
+ {\let\@@kloffset\!!zeropoint}
+ {\scratchdimen=\@@kloffset
+ \advance\scratchdimen by -\@@kllijndikte
+ \edef\@@kloffset{\the\scratchdimen}}%
+ \localframed
+ [\??kl]
+ [\c!strut=\v!nee,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!uitlijnen=]}
+
+\let\restorecolumnsettings\relax
+
+\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
+ \def\columntextoffset{\@@kloffset}}%
+ \ifx\@@klcommando\empty\else
+ \let\postprocesscolumnline\@@klcommando
+ \fi
+ \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
+ %
+ % probably more is needed, and how about nesting save's
+ %
+ \savecurrentblanko
+ \savecurrentwitruimte
+ \def\restorecolumnsettings%
+ {\boxmaxdepth\maxdimen % done elsewhere
+ \restorecurrentblanko
+ \restorecurrentwitruimte}%
+ %
+ \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}
+
+\definecomplexorsimpleempty\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\dotoonkader[#1][#2]%
+ {\ifsecondargument
+ \stelachtergrondenin
+ [#1][#2]
+ [\c!achtergrond=,
+ \c!kader=\v!aan,
+ \c!hoek=\v!recht,
+ \c!kaderoffset=\!!zeropoint,
+ \c!kaderdiepte=\!!zeropoint,
+ \c!kaderkleur=]
+ \else\iffirstargument
+ \toonkader
+ [\v!hoofd,\v!tekst,\v!voet]
+ [#1]
+ \else
+ \toonkader
+ [\v!hoofd,\v!tekst,\v!voet]
+ [\v!linkerrand,\v!linkermarge,
+ \v!tekst,
+ \v!rechtermarge,\v!rechterrand]
+ \fi\fi
+ \let\pageseparation=\!!zeropoint}
+
+\def\toonkader{\dodoubleempty\dotoonkader}
+
+\def\tooninstellingA#1#2%
+ {#1&\PtToCm{\the#2}&\the#2&\tttf\string#2\cr}
+
+\def\tooninstellingC#1#2%
+ {#1&\dimen0=#2\PtToCm{\the\dimen0}&\dimen0=#2\the\dimen0&\tttf\string#2\cr}
+
+\def\tooninstellingB#1#2#3%
+ {#1&&#2#3&\tttf\string#3\cr}
+
+\startinterface dutch
+
+\def\tooninstellingen%
+ {\noindent
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \switchtobodyfont[\v!klein]
+ \tabskip\!!zeropoint
+ \halign
+ {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
+ \tooninstellingA{papierhoogte} \papierhoogte
+ \tooninstellingA{papierbreedte} \papierbreedte
+ \tooninstellingA{printpapierhoogte} \printpapierhoogte
+ \tooninstellingA{printpapierbreedte} \printpapierbreedte
+ \tooninstellingA{kopwit} \kopwit
+ \tooninstellingA{rugwit} \rugwit
+ \tooninstellingA{hoogte} \zethoogte
+ \tooninstellingA{breedte} \zetbreedte
+ \tooninstellingA{teksthoogte} \teksthoogte
+ \tooninstellingA{tekstbreedte} \tekstbreedte
+ \tooninstellingC{bovenafstand} \bovenafstand
+ \tooninstellingA{hoofd} \hoofdhoogte
+ \tooninstellingC{hoofdafstand} \hoofdafstand
+ \tooninstellingA{boven} \bovenhoogte
+ \tooninstellingC{voetafstand} \voetafstand
+ \tooninstellingA{voet} \voethoogte
+ \tooninstellingC{onderafstand} \onderafstand
+ \tooninstellingA{onder} \onderhoogte
+ \tooninstellingA{linkerrand} \linkerrandbreedte
+ \tooninstellingC{linkerrandafstand} \linkerrandafstand
+ \tooninstellingA{linkermarge} \linkermargebreedte
+ \tooninstellingC{linkermargeafstand} \linkermargeafstand
+ \tooninstellingC{rechtermargeafstand}\rechtermargeafstand
+ \tooninstellingA{rechtermarge} \rechtermargebreedte
+ \tooninstellingC{rechterrandafstand} \rechterrandafstand
+ \tooninstellingA{rechterrand} \rechterrandbreedte
+ \noalign{\blanko}
+ \tooninstellingB{korps} \the \globalbodyfontsize
+ \noalign{\blanko}
+ \tooninstellingB{regel} \relax \normallineheight
+ \tooninstellingB{hoogte} \relax \strutheightfactor
+ \tooninstellingB{diepte} \relax \strutdepthfactor
+ \tooninstellingB{boven} \relax \topskipfactor
+ \tooninstellingB{onder} \relax \maxdepthfactor}}}
+
+\stopinterface
+
+\startinterface english
+
+\def\tooninstellingen%
+ {\noindent
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \switchtobodyfont[\v!klein]
+ \tabskip\!!zeropoint
+ \halign
+ {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
+ \tooninstellingA{paperheight} \paperheight
+ \tooninstellingA{paperwidth} \paperwidth
+ \tooninstellingA{printpaperheight} \printpaperheight
+ \tooninstellingA{printpaperwidth} \printpaperwidth
+ \tooninstellingA{topspace} \topspace
+ \tooninstellingA{backspace} \backspace
+ \tooninstellingA{height} \makeupheight
+ \tooninstellingA{width} \makeupwidth
+ \tooninstellingA{textheight} \textheight
+ \tooninstellingA{textwidth} \textwidth
+ \tooninstellingA{top} \topheight
+ \tooninstellingC{topdistance} \topdistance
+ \tooninstellingA{header} \headerheight
+ \tooninstellingC{headerdistance} \headerdistance
+ \tooninstellingC{footerdistance} \footerdistance
+ \tooninstellingA{footer} \footerheight
+ \tooninstellingC{bottomdistance} \bottomdistance
+ \tooninstellingA{bottom} \bottomheight
+ \tooninstellingA{leftedge} \leftedgewidth
+ \tooninstellingC{leftedgedistance} \leftedgedistance
+ \tooninstellingA{leftmargin} \leftmarginwidth
+ \tooninstellingC{leftmargindistance} \leftmargindistance
+ \tooninstellingC{rightmargindistance}\rightmargindistance
+ \tooninstellingA{rightmargin} \rightmarginwidth
+ \tooninstellingC{rightedgedistance} \rightedgedistance
+ \tooninstellingA{rightedge} \rightedgewidth
+ \noalign{\blanko}
+ \tooninstellingB{bodyfontsize} \the \globalbodyfontsize
+ \noalign{\blanko}
+ \tooninstellingB{line} \relax \normallineheight
+ \tooninstellingB{height} \relax \strutheightfactor
+ \tooninstellingB{depth} \relax \strutdepthfactor
+ \tooninstellingB{topskip} \relax \topskipfactor
+ \tooninstellingB{maxdepth} \relax \maxdepthfactor}}}
+
+\stopinterface
+
+\startinterface german
+
+\def\tooninstellingen%
+ {\noindent
+ \vbox
+ {\forgetall
+ \mindermeldingen
+ \switchtobodyfont[\v!klein]
+ \tabskip\!!zeropoint
+ \halign
+ {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
+ \tooninstellingA{papierhoehe} \papierhoehe
+ \tooninstellingA{papierbreite} \papierbreite
+ \tooninstellingA{printpapierhoehe} \printpapierhoehe
+ \tooninstellingA{printpapierbreite} \printpapierbreite
+ \tooninstellingA{kopfweite} \kopfweite
+ \tooninstellingA{rumpfweite} \rumpfweite
+ \tooninstellingA{hoehe} \satzhoehe
+ \tooninstellingA{breite} \satzbreite
+ \tooninstellingA{texthoehe} \texthoehe
+ \tooninstellingA{textbreite} \textbreite
+ \tooninstellingA{oben} \hoeheoben
+ \tooninstellingC{abstandoben} \abstandoben
+ \tooninstellingA{kopfzeile} \kopfzeilenhoehe
+ \tooninstellingC{kopfzeilenabstand} \kopfzeilenabstand
+ \tooninstellingC{fusszeileabstand} \fusszeileabstand
+ \tooninstellingA{fusszeilen} \fusszeilenhoehe
+ \tooninstellingC{abstandunten} \abstandunten
+ \tooninstellingA{hoeheunten} \hoeheunten
+ \tooninstellingA{linkerrand} \breitelinkerrand
+ \tooninstellingC{abstandlinkerrand} \abstandlinkerrand
+ \tooninstellingA{linkemarginal} \linkemarginalbreite
+ \tooninstellingC{linkemarginalafstand} \linkemarginalafstand
+ \tooninstellingC{rechtemarginalafstand}\rechtemarginalafstand
+ \tooninstellingA{rechtemarginal} \rechtemarginalbreite
+ \tooninstellingC{abstandrechterrand} \abstandrechterrand
+ \tooninstellingA{rechterrand} \breiterechterrand
+ \noalign{\blanko}
+ \tooninstellingB{fliesstext} \the \globalbodyfontsize
+ \noalign{\blanko}
+ \tooninstellingB{linie} \relax \normallineheight
+ \tooninstellingB{hoehe} \relax \strutheightfactor
+ \tooninstellingB{tiefe} \relax \strutdepthfactor
+ \tooninstellingB{topskip} \relax \topskipfactor
+ \tooninstellingB{maxdepth} \relax \maxdepthfactor}}}
+
+\stopinterface
+
+\def\toonlayout% interfereert lelijk met een \typefile er na
+ {\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\ifoptimizeitems \optimizeitemstrue
+\newif\ifpackeditems \packeditemsfalse
+\newif\iffirstlist \firstlistfalse
+
+\definetwopasslist{\s!list}
+
+\newcounter\noflists
+\newcounter\itemlevel
+
+\def\dolistreference%
+ {\immediatewriteutilitycommand%
+ {\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!letter,\c!marletter,\c!symletter,\c!kopletter,
+ \c!kleur,\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}]%
+ %\dorecurse{\@@ooniveaus}{\setnextitemlevel\recurselevel}%
+ \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#4]% * permits [2]
+ {\processaction
+ [#2#3#4]
+ [ \v!opelkaar*=>\packitems,
+ \v!intro*=>\somintrotrue,
+ \v!autointro*=>\somautointrotrue,
+ \v!ruim*=>{\doassign[\??op#1][\c!factor=1]},
+ #2#3*\v!ruim*=>{\doassign[\??op#1][\c!factor=#2#3]},
+ #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!los*=>\optimizeitemsfalse,
+ \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#3*\v!aanelkaar*=>{\doassign[\??op#1][\c!factor=-#2#3]},
+ #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]}]}
+% {\dorecurse{\maxitemlevel}{\ExpandFirstAfter\dodododostelopsommingin[\recurselevel][#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}
+
+% PAS OP: ook 'opelkaar' en zo worden getest, nog eens afvangen!
+
+\def\setitemmark#1% % en pas op: resets \docommando
+ {\doifsymboldefinedelse{#1}
+ {\setxvalue{\??op\c!symbool\s!global\itemlevel}{#1}%
+ \setgvalue{\??op\c!symbool\s!local\itemlevel}{?}%
+ \def\listitem{\symbol[#1]}%
+ \let\docommando\gobbleoneargument}
+ {\doifconversiondefinedelse{#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}%
+ \let\docommando\gobbleoneargument}
+ {\let\listitem\empty}}}
+
+%\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\calculatelistwidth#1#2%
+ {#2=\getvalue{\??op#1\c!afstand}\relax
+ \ifnum\getvalue{\??op#1\c!factor}>0
+ \ifdim#2=\!!zeropoint #2=.5em\fi
+ \fi
+ \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
+ \doadaptleftskip{\getvalue{\??op1\c!marge}}%
+% \dosetraggedcommand{\@@oouitlijnen}\raggedcommand
+ \fi
+\dosetraggedcommand{\getvalue{\??op\itemlevel\c!uitlijnen}}\raggedcommand
+ \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}\c!marletter\c!markleur{##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}\c!symletter\c!symkleur{##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}}}}%
+ \setvalue{\v!its}%
+ {\getvalue{\v!ran}%
+ {\dorecurse{\getvalue{\??op\itemlevel\c!items}}{\listitem\hss}%
+ \unskip}}%
+ \setvalue{\v!ran}##1%
+ {\getvalue{\v!sym}%
+ {\calculatelistwidth{\itemlevel}{\dimen0}%
+ \hbox to \dimen0
+ {##1\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
+ \ifsomkolommen \else
+ \dolistreference % beware !
+ \fi
+ \endgroup
+ \ifsomkolommen
+ \global\somkolommenfalse
+ \stopkolommen
+ \getvalue{\??op\itemlevel\c!na}%
+ \else
+ \ifnum\itemlevel=1
+ \dosomebreak\allowbreak % toegevoegd
+ \getvalue{\??op1\c!na}%
+ \doif{\@@oospringvolgendein}{\v!nee}{\noindentation}%
+ \fi
+ \fi
+ \endgroup
+ \doglobal\decrement(\itemlevel,\itemincrement)%
+ \egroup}
+
+\def\sombreak%
+ {\flushfootnotes\penalty-5\relax} % -10
+
+\def\somnobreak%
+ {\flushfootnotes\penalty+5\ifbinnenkolommen\else00\fi\relax} % +5
+
+\def\dolistitem%
+ {\par
+ \ignorespaces
+ \increment\noflistelements
+% \ifnum\noflistelements=1 % als gevolg van nesting
+% \findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
+% \fi % verstoord, vandaar \find
+ \ifsomkolommen\else\ifoptimizeitems
+ \ifnum\noflistelements=1 % tgv bv kolommen/nesting
+ \findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
+ \fi % verstoord, vandaar
+ \iftwopassdatafound
+ \ifnum\twopassdata=3
+ \ifnum\noflistelements>1
+ \dosomebreak\somnobreak
+ \fi
+ \else\ifnum\twopassdata>3
+ \ifnum\noflistelements=2
+ \ifsomintro
+ \dosomebreak\nobreak
+ \else
+ \dosomebreak\somnobreak
+ \fi
+ \else\ifnum\twopassdata=\noflistelements\relax
+ \dosomebreak\somnobreak
+ \else\ifnum\noflistelements>2
+ \dosomebreak\sombreak
+ \else
+ \ifsomintro\else\dosomebreak\sombreak\fi
+ \fi\fi\fi
+ \fi\fi
+ \fi
+ \fi\fi
+ \noindent
+ \ifkopsom
+ \setbox8=\hbox
+ {\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur{\listitem}}%
+ \else\ifsymsom
+ \setbox8=\hbox{\symsymbol}%
+ \else
+ \setbox8=\hbox
+ {\doattributes{\??op\itemlevel}\c!letter\c!kleur{\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\ifbinnenkolommen\else % dubbelop
+ \ifnum\noflistelements>0\relax\dosomebreak\nobreak\fi
+ \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}
+ {\doifnot{\itemreference}{?}
+ {\bgroup
+ \protectconversion
+ \rawreference{\s!lst}{#1}{\itemreference}%
+ \egroup}}%
+ \ignorespaces}
+
+\def\complexsom[#1]#2\par%
+ {\startopsomming[#1]
+ \complexdosom[]\ignorespaces#2\par
+ \stopopsomming}
+
+\definecomplexorsimpleempty\som
+\definecomplexorsimpleempty\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}\c!kopletter\c!kopkleur
+% {\ignorespaces#2}}\par%
+% \ifpackeditems\else\itemuse{\c!kopna}\fi%
+% \dosomebreak\nobreak}
+
+\def\complexdokop[#1]#2\par%
+ {\ifpackeditems\else\itemuse{\c!kopvoor}\fi%
+ \dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+ \complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
+ {\ignorespaces#2}}\par%
+ \ifpackeditems\else\itemuse{\c!kopna}\fi%
+ \dosomebreak\nobreak
+ \noindentation}
+
+\def\complexkop[#1]#2\par#3\par%
+ {\startopsomming[#1]%
+ \complexdokop[]\ignorespaces#2\par#3\par%
+ \stopopsomming}
+
+\definecomplexorsimpleempty\kop
+\definecomplexorsimpleempty\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 \??dd#1\s!do\c!commando levert 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!status moet in dat geval \v!start zijn.
+%
+% herimplementeren met \nextbox en \unhbox\unvbox
+
+\newbox\@@definitiebox
+
+\def\@@definitiewoord#1%
+ {\getvalue{\??dd#1\s!do\c!commando}{#1}}
+
+\def\normal@@definitiewoord#1[#2]#3#4%
+ {\doattributes
+ {\??dd#1}\c!kopletter\c!kopkleur
+ {\getvalue{\??dd#1\c!commando}%
+ {\begstrut\getvalue{\??dd#1\c!tekst}#4\endstrut}}%
+ \rawreference{\s!def}{#2}{#3}}
+
+\setvalue{@@definitie\v!links}#1%
+ {\@@definitiehang{#1}\@@definitielinkspure\@@definitielinkshang}
+
+\setvalue{@@definitie\v!rechts}#1%
+ {\@@definitiehang{#1}\@@definitierechtspure\@@definitierechtshang}
+
+\def\@@definitiehang#1#2#3%
+ {\processaction
+ [\getvalue{\??dd#1\c!hang}]
+ [ \v!geen=>\let\next=#2,
+ 0=>\let\next=#2,
+ \s!unknown=>\let\next=#3,
+ \s!default=>\let\next=#2]%
+ \next{#1}}
+
+\def\@@definitielinkspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \advance\leftskip by \!!widtha
+ \@@makedefinitiepurebox{#1}\raggedright%
+ \advance\leftskip by \!!widthb
+ \llap
+ {\hbox to \leftskip{\copy\@@definitiebox\hss}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitierechtspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \advance\rightskip by \!!widtha
+ \@@makedefinitiepurebox{#1}\raggedleft%
+ \rlap
+ {\hskip\hsize
+ \hskip-\leftskip
+ \hskip-\rightskip
+ \copy\@@definitiebox}%
+ \advance\rightskip by \!!widthb
+ \@@dodefinitie{#1}}
+
+\def\@@makedefinitiepurebox#1#2%
+ {\setbox\@@definitiebox=\vtop
+ {\mindermeldingen
+ \hsize\!!widtha
+ \leftskip\!!zeropoint
+ \rightskip\!!zeropoint
+ #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]%
+ \unhcopy\@@definitiebox}%
+ \ht\@@definitiebox=\ht\strutbox
+ \dp\@@definitiebox=\dp\strutbox}
+
+\def\@@definitielinkshang#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \mindermeldingen
+ \advance\!!widtha by \!!widthb
+ \hangindent=\!!widtha
+ \@@makedefinitiehangbox{#1}{\raggedright}{\advance\rightskip by \!!widthb}%
+ \llap
+ {\dontshowcomposition
+ \vtop to \!!zeropoint{\box\@@definitiebox}}%
+ \@@dodefinitie{#1}}%
+
+\def\@@definitierechtshang#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \mindermeldingen
+ \advance\!!widtha by \!!widthb
+ \hangindent=-\!!widtha
+ \@@makedefinitiehangbox{#1}{\raggedleft}{\advance\leftskip by \!!widthb}%
+ \rlap
+ {\mindermeldingen
+ \dontshowcomposition
+ \dimen0=\hsize
+ \advance\dimen0 by -\leftskip
+ \advance\dimen0 by -\rightskip
+ \hbox to \dimen0
+ {\hss\vtop to \!!zeropoint{\box\@@definitiebox}}}%
+ \@@dodefinitie{#1}}
+
+\def\@@makedefinitiehangbox#1#2#3%
+ {\setbox\@@definitiebox=\vtop % \vbox gaat fout in hang
+ {\forgetall
+ \mindermeldingen
+ \hsize\!!widtha
+ #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]#3%
+ \unhcopy\@@definitiebox}%
+ \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}}}%
+
+\setvalue{@@definitie\v!boven}#1[#2]#3%
+ {%\pagina[\v!voorkeur]% % Weg ermee!
+ \dosomebreak{\goodbreak}% % Dit is beter en nodig!
+ \@@dostartdefinitie{#1}[#2]{\let\\=\space#3}%
+ \copy\@@definitiebox
+ \nobreak
+ \getvalue{\??dd#1\c!tussen}%
+ \@@dodefinitie{#1}}
+
+\setvalue{@@definitie\v!inmarge}#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \inmarge{\unhcopy\@@definitiebox}%
+ \@@dodefinitie{#1}}
+
+\setvalue{@@definitie\v!inlinker}#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \inlinker{\unhcopy\@@definitiebox}%
+ \@@dodefinitie{#1}}
+
+\setvalue{@@definitie\v!inrechter}#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \inrechter{\unhcopy\@@definitiebox}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaarpassend#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \unhcopy\@@definitiebox
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaarruim#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \unhcopy\@@definitiebox
+ \hskip\!!widthb \!!plus .5\!!widthb \!!minus .25\!!widthb
+ \@@dodefinitie{#1}}
+
+\def\@@definitieaanelkaarbreed#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \hbox to \!!widtha
+ {\unhcopy\@@definitiebox\hss}%
+ \hskip\!!widthb
+ \ignorespaces
+ \@@dodefinitie{#1}}
+
+\setvalue{@@definitie\v!aanelkaar}#1[#2]#3%
+ {\processaction
+ [\getvalue{\??dd#1\c!breedte}]
+ [\v!passend=>\let\next=\@@definitieaanelkaarpassend,
+ \v!ruim=>\let\next=\@@definitieaanelkaarruim,
+ \s!unknown=>\let\next=\@@definitieaanelkaarbreed,
+ \s!default=>\let\next=\@@definitieaanelkaarruim]%
+ \next{#1}[#2]{#3}}
+
+\setvalue{@@definitie\v!hangend}#1[#2]#3%
+ {\skip0=-\leftskip % uggly trick
+ \@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
+ \advance\skip0 by \leftskip % but useful
+ \ifdim\skip0=\!!zeropoint
+ \skip0=1.5em % just some default
+ \advance\leftskip by \skip0
+ \fi
+ \hskip-\skip0 % no hang in the first line
+ \unhcopy\@@definitiebox
+ \ifdim\!!widthb=\!!zeropoint
+ \kern.75em % another default
+ \else
+ \kern\!!widthb
+ \fi
+ \ignorespaces
+ \@@dodefinitie{#1}}
+
+\def\@@dostartdefinitie#1[#2]#3%
+ {\getvalue{\??dd#1\c!voor}%
+ \begingroup
+ \doadaptleftskip{\getvalue{\??dd#1\c!marge}}%
+ \showcomposition
+ \setbox\@@definitiebox=\hbox
+ {\forgetall
+ \mindermeldingen
+ \def\\{\crcr}%
+ \doattributes
+ {\??dd#1}\c!kopletter\c!kopkleur
+ {\doifelsevalue{\??dd#1\c!plaats}{\v!aanelkaar}
+ {\@@definitiewoord{#1}[#2]{#3}{#3}}
+ {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}}%
+ \!!widthb=\getvalue{\??dd#1\c!afstand}\relax
+ \ifdim\!!widthb=\!!zeropoint\relax
+ \doifvalue{\??dd#1\c!breedte}{\v!ruim}{\!!widthb=1em}%
+ \fi
+ \assignwidth
+ {\!!widtha}
+ {\getvalue{\??dd#1\c!breedte}}
+ {\doifelsevaluenothing{\??dd#1\c!monster}
+ {\unhcopy\@@definitiebox}
+ {\doattributes
+ {\??dd#1}\c!kopletter\c!kopkleur
+ {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
+ {\!!widthb}%
+ %\getvalue{\??dd#1\s!do\c!lokaal}%
+ \parindent=\!!zeropoint\relax
+ \noindent
+ \ignorespaces}
+
+\def\@@stopdefinitie#1%
+ {\par
+ \dostopattributes
+ \endgroup
+ \egroup % temporary hack
+ \getvalue{\??dd#1\c!na}%
+ \doifvalue{\??dd#1\c!springvolgendein}{\v!nee}{\noindentation}}
+
+\def\@@dodefinitie#1%
+ {\dostartattributes{\??dd#1}\c!letter\c!kleur{}%
+ \ignorespaces}
+
+\def\@@somedefinitie#1[#2]#3%
+ {\bgroup % temporary hack
+ %\BeforePar{\getvalue{\??dd#1}[#2]{#3}}%
+ \BeforePar{\executedoordefinitie{#1}[#2]{#3}}%
+ \AfterPar{\@@stopdefinitie{#1}}%
+ \GetPar}
+
+\def\@@startsomedefinitie#1[#2]#3%
+ {\bgroup % temporary hack
+ %\BeforePar{\getvalue{\??dd#1}[#2]{#3}}%
+ \BeforePar{\executedoordefinitie{#1}[#2]{#3}}%
+ \GotoPar}
+
+\def\dodosteldoordefinierenin[#1][#2]%
+ {\getparameters[\??dd#1][#2]}
+
+\def\dosteldoordefinierenin[#1][#2]% % beter: \iffirstargument
+ {\ConvertToConstant\doifelse{#2}{}
+ {\dodosteldoordefinierenin[][#1]}
+ {\dodoubleargumentwithset\dodosteldoordefinierenin[#1][#2]}}
+
+\def\steldoordefinierenin%
+ {\dodoubleempty\dosteldoordefinierenin}
+
+\def\executedoordefinitie#1[#2]%
+ {\ExpandAfter\doifundefined{@@definitie\getvalue{\??dd#1\c!plaats}}
+ {\setvalue{\??dd#1\c!plaats}{\v!links}}%
+ \getvalue{@@definitie\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!marge,
+ \c!springvolgendein,\c!uitlijnen,\c!tekst,\c!afstand,\c!commando]%
+ \getparameters[\??dd#1]
+ [\s!do\c!status=\v!stop,
+ \s!do\c!commando=\normal@@definitiewoord,
+ #2]%
+ \doifvalue{\??dd#1\c!plaats}{\v!boven}%
+ {\doassign[\??dd#1][\c!tussen={\blanko}]}%
+ \setvalue{#1}%
+ {\dodoubleempty\@@definitie[#1]}%
+ \setvalue{\e!start#1}%
+ {\dodoubleempty\@@startdefinitie[#1]}%
+ \setvalue{\e!stop#1}%
+ {\@@stopdefinitie{#1}}}%
+
+\def\@@startdefinitie[#1][#2]%
+ {\doifelsevalue{\??dd#1\s!do\c!status}{\v!start}
+ {\def\next{\@@startsomedefinitie{#1}[#2]{}}}
+ {\def\next{\dowithwargument{\@@startsomedefinitie{#1}[#2]}}}%
+ \next}
+
+\def\@@definitie[#1][#2]%
+ {\doifelsevalue{\??dd#1\s!do\c!status}{\v!start}
+ {\def\next{\@@somedefinitie{#1}[#2]{}}}
+ {\def\next{\dowithwargument{\@@somedefinitie{#1}[#2]}}}%
+ \next}
+
+\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#7=#1[#2]#3#4 van definitie
+
+\def\special@@definitiewoord#1#2#3#4[#5]#6#7%
+ {\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}\c!kopletter\c!kopkleur
+ {\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
+ \edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
+ \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
+ {\!!stringa}}%
+ \rawreference{\s!num}{#5}{}%
+ \fi}
+
+\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!status=\v!start,
+ \s!do\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!afstand,\c!commando,
+ \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
+ \c!niveaus,\c!wijze,\c!blokwijze,\c!scheider,\c!marge,
+ \c!springvolgendein,\c!afsluiter,\c!sectienummer,\c!nummer]%
+ \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!afstand,\c!commando,\c!marge,
+ \c!monster,\c!hang,\c!uitlijnen,\c!voor,\c!tussen,\c!na,
+ \c!springvolgendein,\c!links,\c!rechts,\c!koppeling]%
+ \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}%
+ {\doresetdoornummer[#1][#3]}%
+ \setvalue{\e!volgende#3#1}%
+ {\dotripleempty\dovolgendedoornummer[#1][#3]}}
+
+\def\dovolgendedoornummer[#1][#2]%
+ {\getvalue{\??dd\c!volgende#2\c!nummer}{#1}}%
+
+\def\doresetdoornummer[#1][#2]%
+ {\getvalue{\??dd\s!reset#2\c!nummer}{#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
+ \dosomebreak{\goodbreak}% \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}\c!kopletter\c!kopkleur
+ {\getvalue{\??ds#1\c!monster}\getvalue{\??ds#1\c!scheider}}}
+ {1em}%
+ \advance\!!widtha by \tfskipsize
+ \setbox2=\hbox to \!!widtha
+ {\doattributes
+ {\??ds#1}\c!kopletter\c!kopkleur
+ {\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}\c!letter\c!kleur{}% #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}\c!kopletter\c!kopkleur
+ {\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 >= 1500 % was 200
+% \raggedness = 2 .. 6\korpsgrootte
+
+\def\leftraggedness {2\korpsgrootte}
+\def\rightraggedness {2\korpsgrootte}
+\def\middleraggedness {6\korpsgrootte}
+
+\def\setraggedness#1%
+ {\ifnum\tolerance<1500\relax % kleinere waarden
+ \tolerance=1500\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
+
+\let\updateraggedskips\relax
+
+\def\setraggedskips#1#2#3#4#5#6% never change this name
+ {\def\updateraggedskips%
+ {\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}}%
+ \updateraggedskips}
+
+\def\dosetraggedskips#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\doalignline#1#2%
+ {\dowithnextbox
+ {\noindent\hbox to \hsize
+ {\strut#1\unhbox\nextbox#2}}
+ \hbox}
+
+% directe commando's
+
+\def\regellinks {\doalignline \relax \hss }
+\def\regelrechts{\doalignline \hss \relax}
+\def\regelmidden{\doalignline \hss \hss }
+
+% indirecte commando's
+
+\setvalue{regel\v!links }{\doalignline \relax \hss }
+\setvalue{regel\v!rechts}{\doalignline \hss \relax}
+\setvalue{regel\v!midden}{\doalignline \hss \hss }
+
+\def\doregelplaats#1%
+ {\getvalue{regel#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\margestrutheight{\ht\strutbox}
+
+\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!nee=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!normaal},
+ \v!binnen=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2},
+ \v!buiten=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#3},
+ \v!links=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!links},
+ \v!midden=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!midden},
+ \v!rechts=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{\v!rechts},
+ \s!default=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}]%
+ \setbox0=\vbox\localframed
+ [\??im\margetekstnummer]
+ [\c!strut=\v!nee]
+ {\decrement\margetekstregels
+ \@@imvoor
+ \doattributes
+ {\??im\margetekstnummer}\c!letter\c!kleur
+ {\dorecurse{\margetekstregels}{\strut\\}%
+ \xdef\margestrutheight{\the\ht\strutbox}%
+ \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
+ \dimen0=\dp\strutbox
+ \advance\dimen0 by \margestrutheight
+ \advance\dimen0 by -\ht\strutbox
+ \raise\dimen0
+ \fi
+ \box0}}%
+ \ht0=\!!zeropoint
+ \dp0=\!!zeropoint
+ \gdef\margestrutheight{\the\ht\strutbox}%
+ \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
+ [\v!links][\doinlinker][\doinrechter]}
+
+\def\inrechter%
+ {\indentation\doquintupleempty\doinmarge
+ [\v!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][]% see next macro
+ \@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA
+ {\@EA\stelinmargein\@EA[\margincontent][]% see next macro
+ \flushmargincontent[#1][#2]{#3}}}
+
+\def\margewoordpositie[#1]#2%
+ {\ifnum#1>\margincontent
+ \xdef\margincontent{#1}%
+ \fi
+ \stelinmargein[#1][]% when at outer level, saves local settings
+ \setgvalue{\??im#1}%
+ {\stelinmargein[#1][]% needed when par start outside group
+ \flushmargincontent[][]{#2}}}
+
+\def\margewoord%
+ {\dodoubleempty\complexmargewoord}
+
+\def\margetitel%
+ {\margewoord}
+
+\def\margetekst%
+ {\margewoord}
+
+\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} % vervallen
+\def\woordinrechter{\inrechtermarge} % vervallen
+
+\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]%
+ {\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
+ \fi
+ \else
+ \goodbreak
+ \fi
+ \fi}
+
+\let\resetcurrentsectionmarks=\relax
+
+% was: \resetsectionmarks[\firstsection], zie \handelpaginaaf
+
+\def\insertdummypage%
+ {\ejectinsert % beter
+ \hardespatie
+ \vfill
+ \ejectpage}
+
+\def\docomplexpagina[#1]%
+ {\flushfootnotes
+ \bgroup
+ \processallactionsinset
+ [#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!blanko=>\pagebodyornamentsfalse,
+ \v!nee=>\ifpaginageblokkeerd\else
+ \dosomebreak\nobreak
+ \fi,
+ \v!voorkeur=>{\ifpaginageblokkeerd\else
+ \ifbinnenkolommen
+ \dosomebreak\goodbreak
+ \else
+ \testpagina[3][\!!zeropoint]%
+ \fi
+ \fi},
+ \v!grotevoorkeur=>{\ifpaginageblokkeerd\else
+ \ifbinnenkolommen
+ \dosomebreak\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]}%
+ \insertdummypage},
+ \v!links=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \orsideone
+ \resetcurrentsectionmarks
+ \insertdummypage
+ \orsidetwo
+ \od},
+ \v!rechts=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \orsideone
+ \orsidetwo
+ \resetcurrentsectionmarks
+ \insertdummypage
+ \od},
+ \v!even=>\pagina
+ \doifonevenpaginaelse
+ {\resetcurrentsectionmarks\insertdummypage}{},
+ \v!oneven=>\pagina
+ \doifonevenpaginaelse
+ {}{\resetcurrentsectionmarks\insertdummypage},
+ \v!viertal=>{\ifdubbelzijdig
+ \!!counta=\realpageno
+ \!!countb=\realpageno
+ \divide\!!counta by 4
+ \divide\!!countb by 2
+ \ifnum\!!counta=\!!countb
+ \else
+ \pagina
+ \pagina[\v!leeg]%
+ \pagina[\v!leeg]%
+ \fi
+ \fi},
+ \v!laatste=>{\ejectinsert
+ \superejectpage
+ \doifbothsidesoverruled
+ \naastpagina
+ \orsideone
+ \orsidetwo
+ %\ifodd\realpageno \else % kan weer weg
+ \geenhoofdenvoetregels
+ \insertdummypage
+ %\fi
+ \od
+ \filluparrangedpages},
+ \s!unknown=>\doifnumberelse{#1}
+ {\ejectinsert
+ \ejectpage
+ \loop
+ \ifnum\userpageno<#1\relax
+ \insertdummypage
+ \repeat}
+ {}]%
+ \egroup}
+
+\def\complexpagina[#1]%
+ {\expanded{\docomplexpagina[#1]}}
+
+\def\simplepagina%
+ {\docomplexpagina[\v!ja]}
+
+\definecomplexorsimple\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]}
+
+% THIS: !!!
+
+\def\dolimitateteksten#1#2%
+ {\doifelsevaluenothing{#1}{#2}{\limitatetext{#2}{\getvalue{#1}}{...}}}
+
+\def\doteksten#1#2#3#4#5#6%
+ {\bgroup
+ %\showcomposition % I need to test first
+ \convertargument#6\to\ascii
+ \doifsomething{\ascii}
+ {\doattributes{#1#2}#3#4%
+ {\doifvalue{#1\v!tekst\c!strut}{\v!ja}{\setstrut\strut}% here!
+ \doifdefinedelse{\??mk\ascii\c!koppeling} % brrr
+ {\dolimitateteksten{#1#2#5}{\haalmarkering[\ascii][\v!eerste]}}
+ {\ConvertConstantAfter\doifelse{\v!paginanummer}{#6}
+ {\@@plaatspaginanummer}
+ {\ConvertConstantAfter\doifelse{\v!datum}{#6}
+ {\currentdate}
+ {\opeenregel\dolimitateteksten{#1#2#5}{#6}}}}}}%
+ \egroup}
+
+\def\dodoteksten#1#2#3#4#5#6%
+ {\doifonevenpaginaelse
+ {\doteksten{#1}{#2}#3{#4}} % #3 => provides three arguments
+ {\doteksten{#1}{#2}#5{#6}}} % #5 => provides three arguments
+
+\def\dodododoteksten[#1][#2][#3][#4][#5][#6]%
+ {\ifsixthargument
+ \setvalue{\??tk#1#2\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{#2}
+ {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#3}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#6}}%
+ \setvalue{\??tk#1#2\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{#2}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}
+ {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#5}}%
+ \else\iffifthargument
+ \setvalue{\??tk#1\v!tekst\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}
+ {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#2}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#5}}%
+ \setvalue{\??tk#1\v!tekst\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}
+ {\c!linkerletter \c!linkerkleur \c!linkerbreedte }{#4}}%
+ \else\iffourthargument
+ \setvalue{\??tk#1#2\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{#2}
+ {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#3}
+ {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#3}}%
+ \setvalue{\??tk#1#2\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{#2}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#4}}%
+ \else\ifthirdargument
+ \setvalue{\??tk#1\v!tekst\c!linkertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}
+ {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#2}
+ {\c!linkerletter\c!linkerkleur\c!linkerbreedte}{#2}}%
+ \setvalue{\??tk#1\v!tekst\c!rechtertekst}%
+ {\dodoteksten{\??tk#1}{\v!tekst}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}
+ {\c!rechterletter\c!rechterkleur\c!rechterbreedte}{#3}}%
+ \else\ifsecondargument % new
+ \setvalue{\??tk#1\v!tekst\c!linkertekst}{}%
+ \setvalue{\??tk#1\v!tekst\c!rechtertekst}{}%
+ \setvalue{\??tk#1\v!tekst\c!middentekst}%
+ {\doteksten{\??tk#1}{\v!tekst}\c!letter\c!kleur\c!breedte{#2}}%
+ \else
+ \dosixtupleempty\dodododoteksten[#1][\v!tekst][][][][]%
+ \dosixtupleempty\dodododoteksten[#1][\v!marge][][][][]%
+ \dosixtupleempty\dodododoteksten[#1][\v!rand] [][][][]%
+ \fi\fi\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\@@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\definieertekst%
+ {\dosixtupleempty\dodefinieertekst}
+
+\def\dodefinieertekst[#1][#2][#3][#4][#5][#6]%
+ {\ifsixthargument
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4][#5][#6]}%
+ \else\iffourthargument
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3][#4]}%
+ \else
+ \setvalue{\??tk#2#1}{\dosixtupleempty\dodododoteksten[#2][#3]}%
+ \fi\fi}
+
+% \definieertekst[hoofdstuk][voet][paginanummer]
+% \stelkopin[hoofdstuk][hoofd=hoog,voet=hoofdstuk]
+% \stelhoofdtekstenin[paginanummer]
+% \stelvoettekstenin[links][rechts]
+% \hoofdstuk{eerste} \dorecurse{20}{\input tufte \relax}
+% \hoofdstuk{tweede} \dorecurse{20}{\input tufte \relax}
+
+\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!geenmarkering=>\bgroup
+ \setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
+ \let\dohaalmarkering=\nohaalmarkering
+ \doplaatslayoutregel{#1}{#2}%
+ \egroup,
+ \v!normaal=>\doplaatslayoutregel{#1}{#2},
+ \s!default=>\doplaatslayoutregel{#1}{#2},
+ \s!unknown=>\bgroup % new
+ \setgvalue{\??tk#1\v!tekst\c!status}{\v!normaal}%
+ \getvalue{\??tk#1\commalistelement}%
+ \doplaatslayoutregel{#1}{#2}%
+ \egroup]}
+
+\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-\bovenhoogte
+\plaatsboventekstblok
+ \vskip\bovenafstand
+ \plaatshoofdregel
+ \vskip\hoofdafstand
+ \plaatstekstregel
+ \vskip\voetafstand
+ \plaatsvoetregel
+ \vskip\onderafstand
+ \plaatsonderregel
+\vskip-\onderhoogte
+\plaatsondertekstblok
+ \plaatsversieaanduiding
+ \vfilll}%
+ \smashbox0
+ \box0
+ \egroup}
+
+%\def\@@plaatspaginascheider%
+% {\doif{\@@nmstatus}{\v!start}%
+% {\@@nmtekstscheider}}
+
+\def\@@nmin {} % kan vervallen (upward compatibility)
+\def\@@nmplaats {} % mag {plaats, in} zijn
+
+\newcounter\@@pagenumberlocation
+
+\def\do@@plaatspaginanummer#1%
+ {\ifnum#1=\@@pagenumberlocation\@@plaatspaginanummer\fi}
+
+\def\dodosetpagenumberlocation#1% tricky because of ...texts
+ {\increment\@@pagenumberlocation
+ \ifx\@@nmplaats\empty\else
+ \def\dododosetpagenumberlocation##1%
+ {\donetrue
+ \setevalue{\??tk#1##1}%
+ {\noexpand\do@@plaatspaginanummer{\@@pagenumberlocation}}}%
+ \donefalse
+ \ExpandFirstAfter\processallactionsinset
+ [\@@nmplaats]
+ [ \v!midden=>\dododosetpagenumberlocation{\v!tekst\c!middentekst},
+ \v!links=>\dododosetpagenumberlocation{\v!tekst\c!linkertekst},
+ \v!rechts=>\dododosetpagenumberlocation{\v!tekst\c!rechtertekst},
+ \v!inlinker=>\dododosetpagenumberlocation{\v!marge\c!linkertekst},
+ \v!inrechter=>\dododosetpagenumberlocation{\v!marge\c!rechtertekst},
+ \v!inmarge=>\dododosetpagenumberlocation{\v!marge\ifdubbelzijdig
+ \c!margetekst\else\c!rechtertekst\fi},
+ \v!marge=>\dododosetpagenumberlocation{\v!marge\ifdubbelzijdig
+ \c!margetekst\else\c!rechtertekst\fi},
+ \v!opmarge=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst},
+ \v!kantlijn=>\dododosetpagenumberlocation{\v!tekst\c!kantlijntekst}]%
+ \ifdone \else
+ \dododosetpagenumberlocation{\v!tekst\c!middentekst}% default
+ \fi
+ \fi}
+
+\def\dosetpagenumberlocation%
+ {\ExpandBothAfter\doifinsetelse{\v!hoofd}{\@@nmplaats,\@@nmin}
+ {\dodosetpagenumberlocation\v!hoofd}
+ {\dodosetpagenumberlocation\v!voet}}
+
+\def\dostelnummeringin[#1]%
+ {\getparameters[\??nm][#1]%
+ \preparepaginaprefix{\??nm}%
+ \enkelzijdigfalse
+ \dubbelzijdigfalse
+ \ExpandFirstAfter\processallactionsinset
+ [\@@nmvariant]
+ [ \v!enkelzijdig=>\enkelzijdigtrue,
+ \v!dubbelzijdig=>\dubbelzijdigtrue]%
+ \ifdubbelzijdig
+ \trackingmarginnotestrue
+ \else
+ \trackingmarginnotesfalse
+ \fi
+ \dosetpagenumberlocation
+ \global\newbackgroundtrue
+ \global\newlogostrue}
+
+\def\stelnummeringin%
+ {\dosingleempty\dostelnummeringin}
+
+% listig: hangt af van \@@kolijst
+
+% erg fout
+%
+% \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\preparepaginaprefix#1%
+ {\def\dopreparepaginaprefix##1%
+ {\doifelsevalue{#1##1\v!nummer}{\v!ja} % v
+ {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}} % v
+ {\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!nee}}}% % v
+ \processcommacommand[\@@kolijst]\dopreparepaginaprefix}
+
+\def\dopaginaprefix#1#2%
+ {\doifelsevalue{#1#2\v!nummer}{\v!ja} % v
+ {\@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}
+
+\unexpanded\def\@@plaatspaginanummer% called in empty tests
+ {\doif{\@@nmstatus}{\v!start}%
+ {{\@@nmcommando{\doattributes\??nm\c!letter\c!kleur{\volledigepaginanummer}}}}}
+
+\def\@@plaatspaginascheider%
+ {\doif{\@@nmstatus}{\v!start}%
+ {\@@nmtekstscheider}}
+
+\def\userfolio% naast realfolio
+ {\nummer[\s!page]}
+
+\def\pagenumber%
+ {\userfolio}
+
+\def\volledigepaginanummer% alleen voor paginanummers !!
+ {\@@nmlinks
+ \def\donexttrackcommando##1%
+ {\doifvalue{\??nm##1\v!nummer}{\v!ja} % v
+ {\ifnum\countervalue{\??se##1}>0\relax
+ \getvalue{##1\c!nummer}\@@nmnummerscheider
+ \fi}%
+ \doifsomething{\@@nmtekst}
+ {\@@nmtekst\@@nmnummerscheider}%
+ \donexttracklevel{##1}}%
+ \donexttrackcommando{\firstsection}%
+ \pagenumber
+ \@@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.
+
+% voor 'interne' doeleinden zijn beschikbaar:
+%
+% \fetchmark[naam][plaats]
+
+% nog expansie in hoofdmarkering
+
+% ook nog reset koppelen aan sectie
+
+\def\hoofdmarkering#1%
+ {\getvalue{\??mk#1\c!koppeling}}
+
+\def\dodoresetmarkering#1%
+ {\doifdefined{\??mk\hoofdmarkering{#1}}
+ {\expandafter\resetmark\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}
+
+\letvalue{\??mk \v!vorige}\gettopmark
+\letvalue{\??mk \v!eerste}\getfirstmark
+\letvalue{\??mk\v!laatste}\getbotmark
+
+\def\dododefinieermarkering[#1][#2]%
+ {\stelmarkeringin[#1]
+ [% \c!expansie=\v!nee, % saves a macro
+ \c!scheider={ --- }, % watch the spaces
+ \c!status=\v!start]%
+ \ontkoppelmarkering[#1]% % no coupling with sections
+ \setevalue{\??mk#1\c!koppeling}{#2}%
+ \expandafter\newmark\csname\??mk#2\endcsname
+ \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\fetchmark[#1][#2]% geen \def, anders problemen in \doif...
+% {\def\dofetchmark{\getvalue{\??mk#2}}%
+% \expandafter\dofetchmark\csname\??mk\hoofdmarkering{#1}\endcsname}
+
+\def\dofetchmark#1#2% needed because we need to expand
+ {\getvalue{\??mk#2}#1}
+
+\def\fetchmark[#1][#2]% never \unexpanded
+ %{\getvalue{\getvalue{\??mk#2}\??mk\hoofdmarkering{#1}}}
+ {\expandafter\dofetchmark\csname\??mk\hoofdmarkering{#1}\endcsname{#2}}
+
+\def\fetchtwomarks[#1]%
+ {\doifsomething{\fetchmark[#1][\v!eerste]}
+ {\fetchmark[#1][\v!eerste]%
+ \doifsomething{\fetchmark[#1][\v!laatste]}
+ {\doifnot{\fetchmark[#1][\v!eerste]}{\fetchmark[#1][\v!laatste]}
+ {\getvalue{\??mk#1\c!scheider}\fetchmark[#1][\v!laatste]}}}}
+
+\def\fetchallmarks[#1]%
+ {\doifsomething{\fetchmark[#1][\v!eerste]}
+ {\doifsomething{\fetchmark[#1][\v!vorige]}
+ {\doifnot{\fetchmark[#1][\v!vorige]}{\fetchmark[#1][\v!eerste]}
+ {\fetchmark[#1][\v!vorige]\getvalue{\??mk#1\c!scheider}}}}%
+ \fetchtwomarks[#1]}
+
+\def\dohaalmarkering[#1][#2]%
+ {\doifvalue{\??mk#1\c!status}{\v!start}
+ {\bgroup
+ \def\geenmarkering##1{\onbekend\ }%
+ \processaction
+ [#2]
+ [ \v!beide=>{\fetchtwomarks[#1]},
+ \v!alles=>{\fetchallmarks[#1]},
+ \s!default=>{\fetchmark[#1][\v!eerste]},
+ \s!unknown=>{\fetchmark[#1][#2]}]%
+ \egroup}}
+
+\def\nohaalmarkering[#1][#2]%
+ {}
+
+\unexpanded\def\haalmarkering%
+ {\dodoubleargument\dohaalmarkering}
+
+\def\domarking[#1]#2%
+ {\bgroup
+ \doifelsevalue{\??mk#1\c!expansie}{\v!ja}
+ {\expandmarkstrue}
+ {\expandmarksfalse}%
+% \getvalue{\??mk\hoofdmarkering{#1}}{#2}%
+ \expandafter\setmark\csname\??mk\hoofdmarkering{#1}\endcsname{#2}%
+ \egroup}
+
+\def\marking%
+ {\dosingleargument\domarking}
+
+%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{}
+\let\@@sectie\empty
+\let\@@koppeling\empty
+
+\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!vorigenummer}{\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{\zerosection}}} % \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!vorigenummer=\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}}}
+
+\def\@@sectionlevel#1%
+ {\ifundefined{\??se#1\c!niveau}0\else\getvalue{\??se#1\c!niveau}\fi}
+
+% Omdat een markering kan worden herdefinieerd moeten we
+% eerst testen of er wel een keten||afhankelijkheid is.
+
+\def\resetsectionmarks[#1]%
+ {\doifdefinedelse{\??se#1}
+ {\def\donexttrackcommando##1%
+ {\doifdefined{\??se##1\c!markering} % skip zero level
+ {\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
+
+% evt ook level gaan opslaan tbv snelle selectie
+
+\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% opvoeren met \ifcsname
+ {\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[\zerosection]% was firstsection
+ \resetsectionmarks[\zerosection]}
+
+\def\dostartsectieblok#1#2%
+ {\begingroup
+ \doaroundsectieblok{#1}%
+ \dosetlocalsectieblok{#1}{#2}%
+ \expandafter\csname#2true\endcsname % vervangen door mode
+ \enablemode[#1]%
+ \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%
+ {\flushsidefloats
+ \getvalue{\??ko#1\c!voor}%
+ %\witruimte vervangen door \noindent elders
+ \relax
+ \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}]}}%
+ \doifinset{\getvalue{\??tk\v!voet\v!tekst\c!status}}{\v!normaal,\v!start}
+ {\doifvaluesomething{\??ko#1\c!voet} % new
+ {\stelvoetin[\c!status=\getvalue{\??ko#1\c!voet}]}}}}
+
+\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\handelpaginaafC#1%
+ {\xdef\@@koniveau{\getvalue{\??se\@@sectie\c!niveau}}%
+ \nobreak}
+
+\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels
+ {\forgetall
+ \doifvaluesomething{\??ko#1\c!uitlijnen} % can be embedded in \framed etc
+ {\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}}%
+ \doifnothing{\@@koppeling}
+ {\edef\@@koppeling{#1}}%
+ \doifnothing{\@@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\dodosomekop#1[#2]#3%
+ {\doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\def\next{\doquadruplegroupempty\dododosomekop{#1}{#2}{#3}}}
+ {\def\next{\fourthargumentfalse\dododosomekop{#1}{#2}{#3}{}}}%
+ \next}
+
+\def\finalsectionnumber%
+ {\ifundefined{\@@sectie\c!nummer}\else
+ \getvalue{\@@sectie\c!nummer}%
+ \fi}
+
+\def\dododosomekop#1#2#3#4%
+ {\iffourthargument
+ \def\next%
+ {\dodododosomekop{#1}[#2]{\sectiebloklabel{#1}}{#3}{#4}}%
+ \else
+ \def\next%
+ {\dodododosomekop{#1}[#2]{\sectiebloklabel{#1}}{\finalsectionnumber}{#3}}%
+ \fi
+ \next}
+
+\def\findsectionnumber#1#2#3% class file title
+ {\begingroup
+ \setsectieenkoppeling{#1}%
+ \xdef\foundsectionnumber{1}%
+ \def\dolijstelement##1##2##3##4##5##6%
+ {\doif{##1}{#1}
+ {\ConvertConstantAfter\doif{##4}{#3}
+ {\global\utilitydonetrue
+ \scratchcounter=0\getvalue{\??se\@@sectie\c!niveau}%
+ \advance\scratchcounter by 2
+ \def\do####1:####2]%
+ {\advance\scratchcounter by -1
+ \ifcase\scratchcounter
+ \xdef\foundsectionnumber{####1}%
+ \else
+ \do####2]%
+ \fi}%
+ \do##5]}}}%
+ \setbox0=\vbox
+ {\doutilities{#1}{#2}{#1}{}{}}%
+ \endgroup
+ \doifnumberelse{\foundsectionnumber}
+ {\doif{\foundsectionnumber}{0}{\xdef\foundsectionnumber{1}}}
+ {\xdef\foundsectionnumber{1}}% an appendix or so
+ \stelkopnummerin[#1][\foundsectionnumber]%
+ \stelkopnummerin[#1][-1]}
+
+\def\dodododosomekop#1[#2]#3#4#5% % pas met \ExpandFirstAfter op bij twee||taligheid
+ {\flushingcolumnfloatsfalse
+ \setsectieenkoppeling{#1}%
+ \doifelsevalue{\??ko#1\c!prefix}{}
+ {\kopprefixfalse}
+ {\kopprefixtrue}%
+ \ifkopprefix
+ \doifelsevalue{\??ko#1\c!prefix}{+}
+ {\doifelsenothing{#2}
+ {\def\localkopprefix{+}}
+ {\def\localkopprefix{#2}}}
+ {\edef\localkoprefix{\getvalue{\??ko#1\c!prefix}}}%
+ \fi
+ \doifelsevalue{\??ko#1\c!plaatskop}{\v!ja}
+ {\plaatskoptrue}
+ {\plaatskopfalse}%
+ %\doifelsevalue{\??ko#1\c!verhoognummer}{\v!ja}
+ % {\verhoognummertrue}
+ % {\verhoognummerfalse}%
+ \processaction
+ [\getvalue{\??ko#1\c!verhoognummer}]
+ [ \v!ja=>\verhoognummertrue,
+ \v!nee=>\verhoognummerfalse,
+ \s!unknown=>{\ifx\currentproduct\empty
+ \findsectionnumber{#1}\commalistelement{#5}%
+ \fi
+ \verhoognummertrue}]%
+ \edef\numberheaddistance {\getvalue{\??ko#1\c!afstand}}%
+ \edef\numberheadalternative{\getvalue{\??ko#1\c!variant}}%
+ \dostelkopvariantin[\numberheadalternative]%
+ \ifsectienummer
+ \doifelsevalue{\??sb\@@sectieblok\c!nummer}{\v!ja}
+ {\doifelsevalue{\??ko#1\c!nummer}{\v!ja}
+ {\kopnummertrue}{\kopnummerfalse}}
+ {\kopnummerfalse}%
+ \else
+ \kopnummerfalse
+ \fi
+ %\convertargument#5\to\asciititle
+ \processaction
+ [\getvalue{\??ko#1\c!expansie}]
+ [ \v!ja=>{\edef\asciititle{#5}},
+ \v!commando=>{\convertcommand#5\to\asciititle},
+ \s!default=>{\convertargument#5\to\asciititle},
+ \s!unknown=>{\convertargument#5\to\asciititle}]%
+ \ifverhoognummer
+ \ifplaatskop
+ \checknexthead\handelpaginaaf{#1}%
+ \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
+ \ifkopprefix
+ \setupreferencing[\c!prefix=-]%
+ \fi
+ \getvalue{\e!volgende\@@sectie}%
+ \getvalue{\??ko#1\c!tussen}%
+ \ifkopnummer
+ \doplaatskopnummertekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+% \rawreference{\s!sec}{#2}{#4}%
+\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \resetsectionmarks[\@@sectie]%
+\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}}
+ {#3#4}
+ {#5}
+ {\marking[#1]{#5}%
+ \bepaalkopnummer[#1]%
+ \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
+ \writesection{#1}{#4}{#5}%
+ \else
+ \doplaatskoptekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+% \rawpagereference{\s!sec}{#2}%
+\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \resetsectionmarks[\@@sectie]%
+\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}}
+ {#5}
+ {\marking[#1]{#5}%
+ \bepaalkopnummer[#1]%
+ \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
+ \writesection{#1}{-}{#5}%
+ \fi
+ \ifkopprefix
+ \ExpandFirstAfter\setupreferencing[\c!prefix=\localkopprefix]%
+ \fi
+ \dosomebreak\nobreak
+ \ifdisplaysectionhead\getvalue{\??ko#1\c!na}\fi
+ \else
+ \checknexthead\dohandelpaginaafB{#1}% toegevoegd ivm subpaginanr / tug sheets
+ \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
+ \ifkopprefix
+ \setupreferencing[\c!prefix=-]%
+ \fi
+ \getvalue{\e!volgende\@@sectie}%
+ \getvalue{\??ko#1\c!tussen}%
+ \setsectionlistreference{\@@sectie}{#1}%
+ \resetsectionmarks[\@@sectie]%
+ \marking[#1]{#5}%
+ \bepaalkopnummer[#1]%
+ \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+\bgroup
+\stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \ifkopnummer
+% \rawreference{\s!sec}{#2}{#4}%
+\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}%
+ \writesection{#1}{#4}{#5}%
+ \else
+% \rawpagereference{\s!sec}{#2}%
+\rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \doschrijfnaarlijst{\@@koppeling}{}{#5}{\v!kop}%
+ \writesection{#1}{-}{#5}%
+ \fi
+\egroup
+ \ifkopprefix
+ \ExpandFirstAfter\setupreferencing[\c!prefix=\localkopprefix]%
+ \fi
+ \fi
+ \else
+ \ifplaatskop
+ \checknexthead\handelpaginaaf{#1}%
+ \setsectieenkoppeling{#1}% can be changed when [voor=\somehead{..}...]
+ \getvalue{\??ko#1\c!tussen}%
+ \doplaatskoptekst
+ {#1}
+% {\rawpagereference{\s!sec}{#2}}
+{\rawreference{\s!sec}{#2}{#4{}{\asciititle}}}
+ {#5}
+ {}%
+ \writesection{#1}{-}{#5}%
+ \dosomebreak\nobreak
+ \ifdisplaysectionhead\getvalue{\??ko#1\c!na}\fi
+ \else
+ % do nothing
+ \fi
+ \fi
+ \flushingcolumnfloatstrue
+ \ifdisplaysectionhead\else\expandafter\GotoPar\fi}
+
+% \prevdepth\dp\strutbox is belangrijk, vergelijk naast elkaar:
+%
+% \onderwerp{test} \input tufte
+% \onderwerp{test} \strut \input tufte
+% \onderwerp{test} \plaatslijst[...]
+
+% \def\doplaatskoptekst#1#2#3#4%
+% {\bgroup
+% \forgetall
+% %\showcomposition
+% \mindermeldingen
+% \postponefootnotes
+% \def\localkopsetup%
+% {\dolocalkopsetup{#1}}%
+% \startsynchronisatie
+% \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
+% {\getvalue{\??ko#1\c!commando}
+% {} % no number
+% {\doattributes
+% {\??ko#1}\c!letter\c!kleur
+% {\doattributes
+% {\??ko#1}\c!tekstletter\c!tekstkleur
+% {\dontconvertfont
+% \ifdisplaysectionhead\stelinterliniein\fi
+% #2%
+% \getvalue{\??ko#1\c!voorcommando}%
+% \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#3\endstrut}%
+% \getvalue{\??ko#1\c!nacommando}%
+% \ifdisplaysectionhead\endgraf\fi}}}}%
+% \ifdisplaysectionhead
+% \endgraf
+% \nointerlineskip
+% \dosomebreak\nobreak
+% \fi
+% #4%
+% \ifdisplaysectionhead
+% \prevdepth\openstrutdepth % \dp\strutbox % ivm grid
+% \fi
+% \stopsynchronisatie
+% \egroup
+% \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}}
+%
+% \def\doplaatskopnummertekst#1#2#3#4#5%
+% {\bgroup
+% \forgetall
+% %\showcomposition
+% \mindermeldingen
+% \postponefootnotes
+% \def\localkopsetup%
+% {\dolocalkopsetup{#1}}%
+% \startsynchronisatie
+% \ifdisplaysectionhead\@EA\snaptogrid\@EA\hbox\fi
+% {\getvalue{\??ko#1\c!commando}%
+% {\doattributes{\??ko#1}\c!letter\c!kleur
+% {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
+% {\getvalue{\??ko#1\c!voorcommando}%
+% \getvalue{\??ko#1\c!nummercommando}{\setstrut\begstrut#3\endstrut}}}}
+% {\doattributes{\??ko#1}\c!letter\c!kleur
+% {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
+% {\dontconvertfont
+% \ifdisplaysectionhead\stelinterliniein\fi
+% #2%
+% \getvalue{\??ko#1\c!tekstcommando}{\setstrut\begstrut#4\endstrut}%
+% \getvalue{\??ko#1\c!nacommando}%
+% \ifdisplaysectionhead\endgraf\fi}}}}%
+% \ifdisplaysectionhead
+% \endgraf
+% \nointerlineskip
+% \dosomebreak\nobreak
+% \fi
+% #5%
+% \ifdisplaysectionhead
+% \prevdepth\openstrutdepth % \dp\strutbox % important, see comment
+% \fi
+% \stopsynchronisatie
+% \egroup
+% \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}}
+
+\def\doplaatskoptekst#1#2#3#4%
+ {\beginheadplacement{#1}%
+ \setbox0=\hbox
+ {\getvalue{\??ko#1\c!commando}
+ {} % no number
+ {\doattributes
+ {\??ko#1}\c!letter\c!kleur
+ {\doattributes
+ {\??ko#1}\c!tekstletter\c!tekstkleur
+ {\dontconvertfont
+ \ifdisplaysectionhead\stelinterliniein\fi
+ #2%
+ \getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#3\endstrut
+ \else
+ #3%
+ \fi}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi}}}}%
+ \endheadplacement{#1}{#4}}
+
+\def\doplaatskopnummertekst#1#2#3#4#5%
+ {\beginheadplacement{#1}%
+ \setbox0=\hbox
+ {\getvalue{\??ko#1\c!commando}%
+ {\doattributes{\??ko#1}\c!letter\c!kleur
+ {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur
+ {\getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!nummercommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#3\endstrut
+ \else
+ #3%
+ \fi}}}}
+ {\doattributes{\??ko#1}\c!letter\c!kleur
+ {\doattributes{\??ko#1}\c!tekstletter\c!tekstkleur
+ {\dontconvertfont
+ \ifdisplaysectionhead\stelinterliniein\fi
+ #2%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#4\endstrut
+ \else
+ #4%
+ \fi}%
+ \getvalue{\??ko#1\c!nacommando}%
+ \ifdisplaysectionhead\endgraf\fi}}}}%
+ \endheadplacement{#1}{#5}}
+
+\newsignal\headsignal
+\let\headlastlinewidth\!!zeropoint
+\newif\ifcontinuoushead
+
+\def\beginheadplacement#1%
+ {\bgroup
+ \everypar{}% needed indeed
+ \noindent % ipv \witruimte elders, na \forgetall !
+ \bgroup
+ \forgetall % now we may forget everything
+ %\showcomposition
+ \mindermeldingen
+ \postponefootnotes
+ \iflocation\ifdisplaysectionhead\else\noninterferingmarks\fi\fi
+ \stelinteractiein
+ [\c!letter=,
+ \c!kleur=,
+ \c!contrastkleur=]%
+ \strictouterreferencestrue % tzt instelling
+ \def\localkopsetup%
+ {\dolocalkopsetup{#1}}%
+ \startsynchronisatie}
+
+\def\endheadplacement#1#2%
+ {\doifvaluenothing{\??ko#1\c!file}{\locationfalse}%
+ \ifdisplaysectionhead
+ \let\headlastlinewidth\!!zeropoint
+ \snaptogrid\hbox
+ {\iflocation
+ \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
+ \else
+ \hbox{\box0}%
+ \fi}%
+ \endgraf
+ \nointerlineskip
+ \dosomebreak\nobreak
+ #2%
+ \else
+ \strut
+ \iflocation
+ \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\!!zeropoint\fi
+ \unhhbox0\with{\naarbox{\box\hhbox}[\getvalue{\??ko#1\c!file}::#1]}%
+ \advance\lasthhboxwidth by \numberheaddistance
+ \xdef\headlastlinewidth{\the\lasthhboxwidth}%
+ \else
+ \unhbox0
+ \global\let\headlastlinewidth\!!zeropoint
+ \fi
+ #2%
+ \dimen0=\numberheaddistance
+ \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
+ \hskip\headsignal\ignorespaces
+ \fi
+ %#2%
+ \ifdisplaysectionhead
+ \prevdepth\openstrutdepth % \dp\strutbox % important, see comment
+ \fi
+ \stopsynchronisatie
+ \egroup
+ \egroup
+ \ifdisplaysectionhead
+ \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
+ \fi}
+
+\def\checknexthead#1#2% nog optioneel
+ {\ifhmode
+ \scratchcounter=\lastpenalty\unpenalty % no beauty in this
+ \ifdim\lastskip=\headsignal
+ \handelpaginaafC{#1}%
+ \global\continuousheadtrue
+ \else
+ \penalty\scratchcounter
+ \global\continuousheadfalse
+ #1{#2}%
+ \fi
+ \else
+ \global\continuousheadfalse
+ #1{#2}%
+ \fi}
+
+\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{\finalsectionnumber}{0} % kan effienter
+% {\finalsectionnumber}%
+% \egroup}
+%
+% beter :
+
+\def\huidigekopnummer{0}
+
+\def\bepaalkopnummer[#1]%
+ {\bgroup
+ \setsectieenkoppeling{#1}%
+ \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
+ \egroup}
+
+\def\complexkopnummer[#1]%
+ {\bgroup
+ \setsectieenkoppeling{#1}%
+ \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
+ \doifnot{\huidigekopnummer}{0}
+ {\finalsectionnumber}%
+ \egroup}
+
+\def\simplekopnummer%
+ {\huidigekopnummer}
+
+\definecomplexorsimple\kopnummer
+
+\def\alinea%
+ {\par}
+
+\def\plaatskopnormaal#1#2%
+ {\doifelsenothing{#1}
+ {\vbox
+ {\localkopsetup
+ \noindent
+ #2}}%
+ {\setbox0=\hbox{{#1}\hskip\numberheaddistance}%
+ \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\plaatskopmidden#1#2%
+ {\vbox
+ {\localkopsetup
+ \veryraggedcenter
+ \let\\\endgraf
+ \let\crlf\endgraf
+ \doifsomething{#1}{\strut#1\par}\begstrut#2}}
+
+\def\plaatskopintekst#1#2%
+ {\bgroup
+ \localkopsetup
+ \doifsomething{#1}{{#1}\kern\numberheaddistance}% no stretch
+ {\begstrut#2}%
+ %\hskip\numberheaddistance % naar elders
+ \egroup}
+
+% default == instellingen
+% koppeling == koppen, breaks, marks, enz.
+% sectie == nummering
+
+\let\@@kolijst=\empty
+
+\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!afstand=,
+ \c!pagina=,
+ \c!hoofd=,
+ \c!voet=,
+ \c!letter=,
+ \c!nummercommando=,
+ \c!tekstcommando=,
+ \c!eigennummer=\v!nee,
+ \c!nummer=\v!ja,
+ \c!kleur=,
+ \c!springvolgendein=\v!nee,
+ \c!doorgaan=\v!ja,
+ \c!plaatskop=\v!ja,
+ \c!verhoognummer=\v!ja,
+ \c!variant=\@@kovariant,
+ \c!commando=\@@plaatskop,
+ \c!uitlijnen=,
+ \c!file=,
+ \c!expansie=,
+ #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!file,\c!pagina,\c!doorgaan,\c!hoofd,\c!voet,
+ \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
+ \c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
+ %\c!nummerletter,\c!tekstletter,
+ %\c!expansie, % njet
+ \c!uitlijnen,\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}]%
+ \definieermarkering[#1\v!nummer]%
+ \koppelmarkering[#1\v!nummer][\getvalue{\??ko#1\c!sectie}\v!nummer]}}%
+ \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!file,\c!pagina,\c!doorgaan,\c!hoofd,\c!voet,
+ \c!nummer,\c!eigennummer,\c!plaatskop,\c!verhoognummer,
+ \c!letter,\c!kleur,\c!afstand,\c!variant,\c!springvolgendein,
+ %\c!nummerletter,\c!tekstletter,
+ %\c!expansie, % njet
+ \c!uitlijnen,\c!nummercommando,\c!tekstcommando]%
+ \definieermarkering[#1][#2]%
+ \definieermarkering[#1\v!nummer][#2\v!nummer]%
+ \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}%
+ {\dodoubleempty\dosomekop[#1]}}
+
+\def\definieerkop%
+ {\dodoubleemptywithset\dodefinieerkop}
+
+\def\dosomekop[#1][#2]%
+ {\dowithpargument{\dodosomekop{#1}[#2]}}
+
+\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
+\newif\ifdisplaysectionhead \displaysectionheadtrue
+
+\def\@@plaatskop{\plaatskopnormaal}
+
+\def\dostelkopvariantin[#1]%
+ {\displaysectionheadtrue
+ \processaction
+ [#1]
+ [ \v!normaal=>\def\@@plaatskop{\plaatskopnormaal},
+ \v!midden=>\def\@@plaatskop{\plaatskopmidden},
+ \v!marge=>\def\@@plaatskop{\plaatskopinmarge},
+ \v!inmarge=>\def\@@plaatskop{\plaatskopinmarge},
+ \v!tekst=>\def\@@plaatskop{\plaatskopintekst}\displaysectionheadfalse,
+ \s!unknown=>\def\@@plaatskop{\plaatskopnormaal}]}
+
+\def\dostelkoppenin[#1]%
+ {\getparameters[\??ko][#1]%
+ \doifelse{\@@kosectienummer}{\v!ja}
+ {\sectienummertrue}
+ {\sectienummerfalse}%
+ \dostelkopvariantin[\@@kovariant]}
+
+\def\stelkoppenin%
+ {\dosingleargument\dostelkoppenin}
+
+\def\systemsuppliedchapter {\getvalue{\v!hoofdstuk}}
+\def\systemsuppliedtitle {\getvalue{\v!titel}}
+
+% a left over
+
+\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.
+
+% hier nog uti blokkeren
+
+\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}
+
+\newif\iflocation
+
+\def\ifinteractief{\iflocation}
+
+\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%
+ {\thisissomeinternal{\s!lst}{#1\currentsectionformat}%
+ \setxvalue{\s!lst:#1}{\realfolio}% to be sure
+ \setxvalue{\s!lst:#1\currentsectionformat}{\realfolio}%
+ \setxvalue{\e!vorigelokale#1}{\s!lst:#1\previoussectionformat}%
+ \setxvalue{\e!huidigelokale#1}{\s!lst:#1\currentsectionformat}%
+ \doifelse{\currentsectionformat}{}
+ {\setglobalcrossreference
+ {\e!vorige#1}{}{\realfolio}{}}
+%
+ {\setglobalsystemreference\rt!list
+ {\e!vorige#1}{\getvalue{\e!vorigelokale#1}}}%
+%
+% {\definereference[\e!vorige#1][\getvalue{\e!vorigelokale#1}]%
+%
+ \def\stoplistreferences{\dostoplistreferences}}
+
+\def\dostoplistreferences#1%
+ {\iflijstgeplaatst
+ \addtocommalist{#1}\updatedlistreferences % nog global (\doglobal)
+ \global\let\updatedlistreferences=\updatedlistreferences % een noodverbandje
+ \gdef\updatelistreferences%
+ {\def\docommando####1%
+%
+ {\setglobalsystemreference\rt!list
+ {\e!vorige####1}{\getvalue{\e!huidigelokale####1}}}%
+%
+% {\definereference[\e!vorige####1][\getvalue{\e!huidigelokale####1}]%
+%
+ \processcommacommand[\updatedlistreferences]\docommando
+ \global\let\updatelistreferences=\relax
+ \global\let\updatedlistreferences=\empty}%
+ \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}
+
+\unexpanded\def\referencepagenumber[#1]%
+ {\paginaprefix\??rf[#1]\translatednumber[#1]}
+
+%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]
+ \witruimte
+ \begingroup
+ \def\@@rgstepyes{\parindent\!!zeropoint}%
+ \def\@@rgstepno{\parindent\!!zeropoint}%
+ \edef\@@rgparindent{\the\parindent}%
+ \gdef\@@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
+ \let\checkindentation=\relax
+ \@@rgstepno
+ \ignorespaces
+ \def\obeyedline%
+ {\par
+ \ifdim\lastskip>\!!zeropoint
+ \def\@@rglinesteptoggle{0}%
+ \else
+ \doglobal\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
+ \llap{\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\c!letter\c!kleur{\dodoschrijfregelnummer}%
+ \fi
+ \fi}
+
+\def\eenregel[#1]%
+ {\regelreferentie0[#1]\ignorespaces}
+
+\def\startregel[#1]%
+ {\regelreferentie1[#1]\ignorespaces}
+
+\def\stopregel[#1]%
+ {\unskip\regelreferentie2[#1]}
+
+\def\inregellabel#1%
+ {\doifinstringelse{--}{#1}
+ {\labeltext{\v!regels}}
+ {\labeltext{\v!regel}}}
+
+\def\inregel#1[#2]%
+ {\doifelsenothing{#1}
+ {\in{\inregellabel{\currenttextreference}}[\@@rnprefix#2]}
+ {\in{#1}[\@@rnprefix#2]}}
+
+\def\dostartnummerenPAR%
+ {\beginofshapebox
+ \doglobal\newcounter\linereference}
+
+% localcrossref heroverwegen
+
+\def\setlinereference#1#2#3#4%
+ {\setxvalue{lrf:#1}{\noexpand\dogetlinereference{#2}{#3}{#4}}}
+
+\def\getlinereference#1%
+ {\getvalue{lrf:#1}}
+
+\def\dogetlinereference#1#2#3%
+ {\edef\linereferencename{#1}%
+ \edef\linereferenceline{#2}%
+ \edef\linereferenceplus{#3}}
+
+% 1 xxx xxx xxx xxx xxx xxx xxx
+% 2 xxx yyy yyy yyy yyy yyy yyy <= start y
+% 3 yyy yyy yyy yyy yyy yyy yyy
+% 4 yyy yyy yyy yyy yyy xxx xxx <= stop y
+% 5 xxx xxx xxx xxx xxx xxx xxx
+
+%\def\regelreferentie#1[#2]%
+% {\bgroup
+% \dimen0=\dp\strutbox
+% \doif{\@@rnrefereren}{\v!aan}
+% {\doglobal\increment\linereference
+% % start 1=>(n=y,l=0,p=1)
+% % stop 2=>(n=y,l=0,p=2)
+% \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 \!!height \!!zeropoint
+% \prewordbreak
+% \egroup}
+
+\def\regelreferentie#1[#2]%
+ {\bgroup
+ \dimen0=\dp\strutbox
+ \doif{\@@rnrefereren}{\v!aan}
+ {\doglobal\increment\linereference
+ % start 1=>(n=y,l=0,p=1)
+ % stop 2=>(n=y,l=0,p=2)
+ \setlinereference{\linereference}{\@@rnprefix#2}{0}{#1}%
+ \advance\dimen0 by \linereference sp}%
+ \prewordbreak
+ \vrule \!!width \!!zeropoint \!!depth \dimen0 \!!height \!!zeropoint
+ \prewordbreak
+ \egroup}
+
+%\def\dostopnummerenPAR% dp's -> openstrutdepth
+% {\endofshapebox
+% \checkreferences
+% \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
+% % 1=>4 | 2=>4 1=>2
+% % start 1=>(n=y,l=2,p=1)
+% % stop 2=>(n=y,l=4,p=2)
+% \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 % stop
+% \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}%
+% \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}%
+% % ref y: text = 4 / Kan dit buiten referentie mechanisme om?
+% \expanded{\setlocalcrossreference
+% {\referenceprefix\linereferencename}{}{}{\linereferenceline}}%
+% \fi}%
+% \dorecurse{\linereference}
+% {\edef\linereferenceplus{\getvalue{lrf:p:\recurselevel}}%
+% \ifnum\linereferenceplus<2 % start / lone
+% \edef\linereferencename{\getvalue{lrf:n:\recurselevel}}% y
+% \edef\linereferenceline{\getvalue{lrf:l:\recurselevel}}% 2
+% \ifnum\linereferenceplus=1 % start
+% \getreferenceelements{\linereferencename}% text = 4
+% \ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
+% \edef\linereferenceline{\linereferenceline--\currenttextreference}%
+% \fi
+% \fi
+% \expanded{\setlocalcrossreference
+% {\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}}%
+% \getreferenceelements{\linereferencename}%
+% \beforesplitstring\currenttextreference--\at--\to\firstline
+% \ifnum\firstline=\scratchline\relax
+% % beter een rawtextreference
+% \textreference[\linereferencename]{\currenttextreference}%
+% \expanded{\setlocalcrossreference
+% {\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\dostopnummerenPAR% dp's -> openstrutdepth
+ {\endofshapebox
+ \checkreferences
+ \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
+ % 1=>4 | 2=>4 1=>2
+ % start 1=>(n=y,l=2,p=1)
+ % stop 2=>(n=y,l=4,p=2)
+ \dostepwiserecurse{1}{\number\dimen0}{1}
+ {\getlinereference\recurselevel
+ \setlinereference\recurselevel
+ {\linereferencename}{\the\linenumber}{\linereferenceplus}}%
+ \fi}%
+ \global\advance\linenumber by \linestepper
+ \ifnum\linereference>0 % anders vreemde loop in paragraphs+recurse
+ \dorecurse{\linereference}
+ {\getlinereference\recurselevel
+ \ifnum\linereferenceplus=2 % stop
+ % ref y: text = 4 / Kan dit buiten referentie mechanisme om?
+ \expanded{\setlocalcrossreference
+ {\referenceprefix\linereferencename}{}{}{\linereferenceline}}%
+ \fi}%
+ \dorecurse{\linereference}
+ {\getlinereference\recurselevel
+ \ifnum\linereferenceplus<2 % start / lone
+ \ifnum\linereferenceplus=1 % start
+ \getreferenceelements{\linereferencename}% text = 4
+ \ifnum\linereferenceline<0\currenttextreference\relax % 0 prevents error
+ \edef\linereferenceline{\linereferenceline--\currenttextreference}%
+ \fi
+ \fi
+ \expanded{\setlocalcrossreference
+ {\referenceprefix\linereferencename}{}{}{\linereferenceline}}%
+ \fi}%
+ \global\let\scratchline=\linenumber % We are going back!
+ \reshapebox
+ {\doglobal\decrement\scratchline
+ \hbox
+ {\dorecurse{\linereference}
+ {\getlinereference\recurselevel
+ \getreferenceelements{\linereferencename}%
+ \beforesplitstring\currenttextreference--\at--\to\firstline
+ \ifnum\firstline=\scratchline\relax
+ % beter een rawtextreference
+ \textreference[\linereferencename]{\currenttextreference}%
+ \expanded{\setlocalcrossreference
+ {\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{\unskip\space}\let\\\crlf}
+
+%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
+ \forgetall
+ \hsize=\getvalue{\??do#1\c!breedte}%
+ \getvalue{\??do#1\c!boven}}
+
+\def\dododostopopmaak[#1]%
+ {\getvalue{\??do#1\c!onder}%
+ \egroup}
+
+\def\doshipoutopmaak[#1]%
+ {\bgroup
+ \getvalue{\??do#1\c!voor}%
+ \box\opmaak
+ \setopmaaklayout[#1]%
+ \pagina
+ \getvalue{\??do#1\c!na}%
+ \ifdubbelzijdig
+ \ifodd\realpageno\else
+ \processaction
+ [\getvalue{\??do#1\c!dubbelzijdig}]
+ [ \v!ja=>\null\pagina\verlaagpaginanummer,
+ \v!leeg=>\pagebodyornamentsfalse
+ \null\pagina\verlaagpaginanummer]%
+ \fi
+ \fi
+ \verlaagpaginanummer
+ \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\dodostopopmaak[#1]%
+ {\dododostopopmaak[#1]%
+ \doflushopmaak[#1]%
+ \endgroup
+ \calculatehsizes
+ \calculatevsizes}
+
+\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!leeg,
+ \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%
+ {\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=>\global\advance\middensmaller by \commalistelement]}
+
+\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]}
+
+\definecomplexorsimple\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\dosetraggedvbox#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\dosetraggedhbox#1%
+ {\processaction
+ [#1]
+ [ \v!links=>\let\raggedbox\regellinks,
+ \v!rechts=>\let\raggedbox\regelrechts,
+ \v!midden=>\let\raggedbox\regelmidden,
+ \s!default=>\let\raggedbox\hbox,
+ \s!unknown=>\let\raggedbox\hbox]}
+
+\def\dosetraggedcommand#1% ook ruim,rechts en zo
+ {\processaction
+ [#1]
+ [ \v!links=>\def\raggedcommand{\raggedleft},
+ \v!rechts=>\def\raggedcommand{\raggedright},
+ \v!midden=>\def\raggedcommand{\raggedcenter},
+ \v!nee=>\def\raggedcommand{\raggedright},
+% \v!normaal=>\let\raggedcommand\relax,
+ \s!default=>\def\raggedcommand{\raggedcenter},
+ \s!unknown=>\let\raggedcommand\relax]}
+
+%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%
+ {\flushfootnotes
+ \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]%
+ {\flushfootnotes
+ \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!achtergrondoffset=\@@bkachtergrondoffset,
+ \c!bovenkader=\@@bkbovenkader,
+ \c!onderkader=\@@bkonderkader,
+ \c!linkerkader=\@@bklinkerkader,
+ \c!rechterkader=\@@bkrechterkader,
+ \c!kaderoffset=\@@bkkaderoffset,
+ \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=\Word{#1}~]%
+ \presetheadtext[#2=\Word{#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}%
+ {\dostoptextfloat}%
+ \setvalue{\e!start\e!reserveer#1\e!tekst}%
+ {\doquadrupleempty\docomplexstartreserveertekstblok[#1]}%
+ \setvalue{\e!stop\e!reserveer#1\e!tekst}%
+ {\dostoptextfloat}%
+ \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 even more! In inner, gaat't mis omdat daar
+% pagetotal enz niet zijn aangepast. Inner kan overigens niet
+% betrouwbaar worden getest!
+
+% NOT TOEVOEGEN: \the\everytrace
+
+\everypar ={\flushfootnotes
+ \ifinner\else\checksidefloat\fi
+ \checkindentation
+ \flushmargincontents
+ \flushcomments}
+\neverypar ={}
+\everydisplay={\flushfootnotes
+ \adjustsidefloatdisplaylines}
+
+\def\flushsidefloats%
+ {\par
+ \!!heighta=\sidefloatvsize
+ \advance\!!heighta by -\pagetotal
+ \ifdim\!!heighta>\!!zeropoint
+ \witruimte % nog checken op interferentie
+ \kern\!!heighta
+ \fi
+ \global\sidefloatvsize=\nofloatvsize
+ \global\floatflagfalse}
+
+\def\flushsidefloatsafterpar%
+ {\xdef\oldpagetotal{\the\pagetotal}%
+ \gdef\checksidefloat%
+ {\dochecksidefloat
+ \ifdim\oldpagetotal=\pagetotal \else
+ \xdef\checksidefloat{\dochecksidefloat}%
+ \flushsidefloats
+ \fi}}
+
+\let\logsidefloat=\relax
+
+\def\pushpenalties%
+ {\widowpenalty=1
+ \clubpenalty=2
+ \brokenpenalty=1
+ \let\pushpenalties=\relax
+ \edef\poppenalties%
+ {\widowpenalty=\the\widowpenalty
+ \clubpenalty=\the\clubpenalty
+ \brokenpenalty=\the\brokenpenalty}}
+
+\let\poppenalties=\relax
+
+\def\restorepenalties%
+ {\ifnum\outputpenalty=\!!tenthousand\relax
+ \else
+ \penalty\outputpenalty
+ \fi}
+
+\def\sidefloatoutput%
+ {\iffloatshort
+ \unvbox\normalpagebox
+ \setbox\floatbottom=\lastbox
+ \ifdim\wd\floatbottom>\sidefloathsize
+ \penalty-201
+ \box\floatbottom
+ \else
+ \ifvoid\floatbottom
+ \else
+ \restoreleftindent
+ \ifdim\wd\floatbottom<\sidefloathsize
+ \parskip=\!!zeropoint
+ %\noindent
+ \vadjust{\penalty-1}%
+ \iffloatlefteqo
+ \global\floatlefteqofalse
+ \else
+ \global\advance\sidefloathsize by -\wd\floatbottom
+ \iffloatrighteqo
+ \global\floatrighteqofalse
+ \else
+ \global\divide\sidefloathsize by 2
+ \fi
+ \hskip\sidefloathsize
+ \fi
+ \fi
+ \box\floatbottom
+ \restorepenalties
+ \fi
+ \fi
+ \global\holdinginserts=0
+ \global\floatshortfalse
+ \else
+ \finaloutput\unvbox\normalpagebox
+ \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%
+ {\global\rightfloatfalse\marginfloattrue\putsidefloat{#1}}
+
+\def\rightmarginfloat#1%
+ {\global\rightfloattrue\marginfloattrue\putsidefloat{#1}}
+
+\def\leftfloat#1%
+ {\global\rightfloatfalse\marginfloatfalse\putsidefloat{#1}}
+
+\def\rightfloat#1%
+ {\global\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
+ \global\floatflagfalse
+ \else
+ \advance\!!heighta by -\pagetotal
+ \fi}
+
+\def\tosssidefloat%
+ {\vfill\eject}
+
+\def\measuresidefloat%
+ {\global\floatflagtrue
+ \dimen3=\pagetotal
+ \ifmarginfloat
+ \global\sidefloatwidth=\!!zeropoint
+ \else
+ \global\sidefloatwidth=\wd\floatbox
+ \global\advance\sidefloatwidth by \floatsideskip
+ \fi
+ \global\sidefloathsize=\hsize
+ \global\advance\sidefloathsize by -\sidefloatwidth
+ \global\sidefloatheight=\ht\floatbox
+\global\advance\sidefloatheight by \dp\floatbox
+ \global\advance\sidefloatheight by \sidefloattopskip
+ \global\sidefloatvsize=\sidefloatheight
+ \global\advance\sidefloatvsize by \dimen3
+ \dimen0=\sidefloatvsize
+% \advance\dimen0 by -\baselineskip
+%\ifgridsnapping
+% \advance\dimen0 by .5\openlineheight % \vsize slightly too large
+%\fi
+ \ifdim\dimen0>.99\pagegoal \relax
+ \roomforfloatfalse
+ \else
+ \dimen0=\pagegoal
+ \advance\dimen0 by -\sidefloatvsize
+ \ifdim\dimen0<\sidefloatbottomskip
+ \global\advance\sidefloatvsize by \dimen0
+ \global\floatshorttrue
+ \pushpenalties
+ \global\holdinginserts=1
+ \else
+ \global\advance\sidefloatvsize by \sidefloatbottomskip
+ \global\floatshortfalse
+ \fi
+ \roomforfloattrue
+ \fi}
+
+\def\setsidefloat%
+ {\vbox{\strut}\vskip-\lineheight
+ \kern\sidefloattopskip
+ \edef\presidefloatdepth{\the\prevdepth}%
+ \nointerlineskip
+ \bgroup
+ \everypar={}%
+ \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
+ \normalbaselines
+ \prevdepth=\presidefloatdepth
+ %\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
+ \advance\!!heighta by \sidefloatbottomskip
+ \!!counta=\!!heighta
+ \divide\!!counta by \baselineskip
+ \ifnum\!!counta>0
+ \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
+ \global\floatshortfalse
+ \tosssidefloat
+ \else
+ \kern\!!heighta
+ \fi
+ \fi}
+
+\def\stallsidefloat%
+ {\!!counta=\pageshrink
+ \divide\!!counta by \baselineskip
+ \advance\!!counta by 1
+ \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%
+ {\bgroup
+ \!!counta=\totalnoffloats
+ \advance\!!counta by -\savednoffloats
+ \dofloatinfomessage{<}{3}{\the\!!counta}%
+ \egroup}
+
+\def\doinsertfloatinfo%
+ {\dofloatinfomessage{<}{4}{\the\totalnoffloats}}
+
+% ook voetnoten saven
+
+\def\dosavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \box\floatbox
+ \unvbox\floatlist}%
+ \global\advance\savednoffloats by 1
+ \global\somefloatwaitingtrue
+ \dosavefloatinfo
+ \nonoindentation}
+
+\def\doresavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \unvbox\floatlist
+ \box\floatbox}%
+ \global\advance\savednoffloats by 1
+ \global\somefloatwaitingtrue}
+
+\def\doreversesavefloat%
+ {\global\setbox\floatlist=\vbox
+ {\nointerlineskip
+ \unvbox\floatlist
+ \box\floatbox}%
+ \global\advance\savednoffloats by 1
+ \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
+ \global\somefloatwaitingfalse
+ \fi
+ \else
+ \global\savednoffloats=0
+ \global\setbox\floatbox=\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}
+
+% The number of topinserts also influences the float order,
+% in this respect that when a moved float does not fit, but a
+% next one does, it is indeed placed. Take for instance a
+% sequence of 20 floats, large and small, where a large one
+% migrates and the next smaller one is inserted.
+
+% \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
+ \let\totaltopinserted=\!!zeropoint
+ \dodosettopinserts
+ \ifnum\@@bknonder=0
+ \ifnum\@@bknregels>0
+ \ifdim\totaltopinserted>\!!zeropoint\relax
+ \dimen0=\lineheight
+ \dimen0=\@@bknregels\dimen0
+ \advance\dimen0 by \totaltopinserted\relax
+ \ifdim\dimen0>\teksthoogte
+ \showmessage{\m!floatblocks}{8}{\@@bknregels}%
+ \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
+ \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
+ \ifgridsnapping
+ %\topsnaptogrid{\box\topins}
+ \box\topins % already snapped
+ \else
+ \unvbox\topins
+ \fi
+ \fi
+ \global\topinserted=\!!zeropoint\relax}
+
+\def\dobotinsertions%
+ {\ifvoid\botins\else
+ \ifgridsnapping
+ \snaptogrid\hbox{\box\botins}
+ \else
+ \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}
+
+% \testfloatboxtrue
+%
+% testfloatbox gaat mis, niet in midden, dus elders
+
+\def\flushfloatbox% nog verder doorvoeren en meer info in marge
+ {\snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\box\floatbox}}}
+
+% 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
+%\ifgridsnapping
+% \advance\dimen0 by .5\openlineheight % \vsize slightly too large
+%\fi
+ \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
+ {\ifbinnenkolommen
+ \someelsefloat[\v!hier]%
+ \else
+ \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}%
+ \fi}
+
+\def\sometextfloat[#1]% lang, links, rechts, hoog, midden, laag, offset
+ {\checkwaitingfloats{#1}%
+ \def\dostoptextfloat{\dodostoptextfloat[#1]}%
+ \global\floattextwidth=\hsize
+ \global\floatwidth=\wd\floatbox
+ \global\floatheight=\ht\floatbox % forget about the depth
+ \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\dodostoptextfloat[#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{\v!offset}{#1}{\witruimte\blanko}%
+ \box\floattext
+ \vfill}}}%
+ \doifinsetelse{\v!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=\openstrutdepth}% 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}
+ {\doroomfloat
+ \ifroomforfloat
+ \processallactionsinset
+ [#1]
+ [ \v!boven=>\dotopfloat,
+ \v!onder=>\dobotfloat,
+ \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 {\openstrutdepth} % {\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{\openstrutdepth}% {\dp\strutbox}%
+ \global\floatsideskip=\@@bkmarge\relax
+ \global\noftopfloats=\@@bknboven\relax
+ \global\nofbotfloats=\@@bknonder\relax}}
+
+\newif\ifinsidefloat
+
+\def\floatcaptionsuffix{} % an optional suffix
+\def\floatcaptionnumber{} % a logical counter
+
+\def\dosetfloatcaption#1#2#3%
+ {\def\dofloattekst%
+ {{\doattributes{\??kj#1}\c!letter\c!kleur{#3}}}%
+ \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ {\def\dofloatnummer%
+ {{\xdef\floatcaptionnumber{#1}%
+ \hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur
+ {\strut#2\floatcaptionsuffix}}}%
+ \ConvertToConstant\doifnot{#3}{}
+ {\tfskip
+ \emergencystretch=.5em}}}
+ {\let\dofloatnummer=\empty}}
+
+\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}}} % pas op, nog wd groter dan hsize
+ {\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}
+ {\dosetraggedvbox{\@@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}
+ {\dosetraggedvbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\@@kjkjbreedte
+ \putcompletecaption}}%
+ \fi}}%
+ \global\setbox\floatbox=\vbox
+ {\forgetall
+ \processaction
+ [\@@kjkjplaats]
+ [ \v!boven=>\locatefloat{\copy2}%
+ \endgraf\@@kjkjtussen
+ \locatefloat{\copy4},
+ \v!onder=>\locatefloat{\copy4}%
+ \endgraf\@@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\wd4>\hsize
+ \global\setbox\floatbox=
+ \hbox to \ifbinnenkolommen\wd4\else\hsize\fi
+ {\hss\box\floatbox\hss}%
+ \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}
+ {\dosetraggedvbox{\@@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}
+ {\dosetraggedvbox{\@@kjkjuitlijnen}%
+ \setbox2=\raggedbox
+ {\hsize\wd4
+ \putcompletecaption}}}%
+ \global\setbox\floatbox=\vbox
+ {\processaction
+ [\@@kjkjplaats]
+ [ \v!boven=>\box2
+ \endgraf\@@kjkjtussen
+ \box4,
+ \v!onder=>\box4
+ \endgraf\@@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}%
+ \ifbinnenkolommen
+ \global\parfloatfalse
+ \fi
+ \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
+\setbox\floatbox=\hbox{\black\box\floatbox}%
+ \global\floatheight=\ht\floatbox
+ \global\advance\floatheight by \dp\floatbox
+ \global\floatwidth=\wd\floatbox
+ \global\advance\totalnoffloats by 1
+ \doifnotinset{\v!marge}{#1} % gaat namelijk nog fout
+ {\setbox\floatbox=\vbox
+ {\parindent\!!zeropoint
+ \ifvoorlopig
+ \inlinkermarge{\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}
+
+\def\dogetfloatbox#1%
+ {\ifvisible
+\let\next\relax % ivm eetex
+ \processfirstactioninset
+ [#1]
+ [ \v!hier=>\def\next{\global\floatsonpagetrue\someelsefloat[#1]},
+ \v!forceer=>\def\next{\global\floatsonpagetrue\somefixdfloat[#1]},
+ \v!links=>\def\next{\global\floatsonpagetrue\somesidefloat[#1]\presetindentation},
+ \v!rechts=>\def\next{\global\floatsonpagetrue\somesidefloat[#1]},
+ \v!tekst=>\def\next{\global\floatsonpagetrue\sometextfloat[#1]},
+ \v!boven=>\def\next{\someelsefloat[#1]\nonoindentation}, % !
+ \v!onder=>\def\next{\global\floatsonpagetrue\someelsefloat[#1]},
+ \v!marge=>\def\next{\somenextfloat[#1]\nonoindentation}, % !
+ \v!pagina=>\def\next{\global\floatsonpagetrue\somepagefloat[#1]},
+ \v!naast=>\def\next{\global\floatsonpagetrue\somefacefloat[#1]},
+ \v!inmarge=>\def\next{\global\floatsonpagetrue\somesidefloat[#1]},
+ \v!inlinker=>\def\next{\global\floatsonpagetrue\somesidefloat[#1]},
+ \v!inrechter=>\def\next{\global\floatsonpagetrue\somesidefloat[#1]},
+ \s!default=>\def\next{\global\floatsonpagetrue\someelsefloat[\v!hier,#1]},
+ \s!unknown=>\def\next{\global\floatsonpagetrue\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
+ \bgroup
+ \global\setbox\floatbox=\vbox{#7}%
+ \dimen0=\ht\floatbox
+ \advance\dimen0 by \dp\floatbox
+ \ifdim\dimen0=\!!zeropoint\relax
+ \showmessage{\m!floatblocks}{11}{}%
+ \global\setbox\floatbox=\vbox{\getvalue{\e!lege#3}}%
+ \fi
+ \ConvertToConstant\doifelse{#6}{\v!geen}
+ {\global\setbox\floatbox=\vbox
+ {\unvbox\floatbox
+ \vss % gets rid of the depth
+ \rawpagereference{\s!flt}{#2}}%
+ \egroup\dofloat{#4}{}{#6}{#1}}
+ {\convertargument#6\to\asciititle
+ \doifelsevalue{\??kj#1\c!nummer}{\v!ja}
+ {\verhoognummer[#1]%
+ \maakhetnummer[#1]%
+ \global\setbox\floatbox=\vbox
+ {\unvbox\floatbox % no \vss, keep the depth
+ \dofloatreference
+ \redofloatorder{#1}%
+% \rawreference{\s!flt}{#2}{\hetnummer}%
+\rawreference{\s!flt}{#2}{{\hetnummer}{\asciititle}}%
+ \doschrijfnaarlijst{#3}{\hetnummer}{#6}{#3}}%
+ \egroup\dofloat{#4}{#5\hetnummer}{#6}{#1}}
+ {\global\setbox\floatbox=\vbox
+ {\unvbox\floatbox % no \vss, keep the depth
+% \rawpagereference{\s!flt}{#2}}%
+\rawreference{\s!flt}{#2}{{}{\asciititle}}}%
+ \egroup\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]}
+
+% ook (continued)
+
+\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]%
+ \ifnum\ruwenummer[\??si]=1 \ifdim\ht\nextbox=\!!zeropoint
+ \let\floatcaptionsuffix=\empty
+ \fi\fi
+ \bgroup
+ #2{\unvbox2}
+ \egroup
+ \ifdim\ht\nextbox>\!!zeropoint
+ \pagina
+ \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{}%
+ \definecomplexorsimpleempty\formulenummer
+ \def\subformulenummer{\formulenummer}%
+ \dostartformula#4\dostopformula
+ \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\formuleummer{\doformulenummer}%
+ \doformulenummer}%
+ \definecomplexorsimple\formulenummer
+ \def\subformulenummer%
+ {\let\verhoogformulenummer=\relax
+ \complexorsimple\formulenummer}%
+ \gdef\doleqno{\leqno{\formulenummer}}%
+ \gdef\doeqno{\eqno{\formulenummer}}%
+ \doifelse{\@@fmplaats}{\v!links}
+ {\dostartformula#4\doleqno\dostopformula}
+ {\dostartformula#4\doeqno\dostopformula}%
+ \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}{\dostartformula}
+\setvalue{\e!stop \e!formule}{\dostopformula}
+
+\def\dostartformula%
+ {\dowithnextbox
+ {\scratchskip=\ifdim\tussenwit>\!!zeropoint\tussenwit\else\blankoskip\fi
+ \startregelcorrectie[\the\scratchskip]
+ \box\nextbox
+ \stopregelcorrectie}
+ \vbox\bgroup
+ \forgetall
+ \abovedisplayskip\!!zeropoint
+ \belowdisplayskip\!!zeropoint
+ \abovedisplayshortskip\!!zeropoint
+ \belowdisplayshortskip\!!zeropoint
+ $$\def\dostopformula{$$\egroup}}
+
+\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
+ \expandafter\dodoplaatsstartformule
+ \else
+ \expandafter\dodoplaatsformule
+ \fi
+ #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
+%
+% \def\shipoutfacingpage%
+% {\iffacingpages
+% \setbox\facingpage=\vbox to \zethoogte
+% {\kern\hoofdhoogte
+% \kern\ht\topins % ?
+% \kern\dp\topins % ?
+% \kern\dp\strutbox % checken
+% \box\facingpage
+% \vfill}%
+% \myshipout{\buildpagebody\box\facingpage}%
+% \fi
+% \global\setbox\facingpage=\box\voidb@x
+% \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}
+
+\newbox\facingbox
+\newbox\facingpage
+
+\newif\iffacingpages \facingpagesfalse
+
+\def\shipoutfacingpage%
+ {\iffacingpages
+ \ifnum\realpageno>1
+ \bgroup
+ \pagebodyornamentsfalse
+ \setbox\facingpage=\vbox to \zethoogte
+ {\unvbox\facingpage\vfil}%
+ \myshipout{\buildpagebody\box\facingpage}%
+ \egroup
+ \else
+ \global\setbox\facingpage=\box\voidb@x
+ \fi
+ \fi}
+
+\def\naastpagina%
+ {\shipoutfacingpage}
+
+\def\facefloat% redefined
+ {\startnaast\box\floatbox\stopnaast}
+
+\def\startnaast% beter: \dowithnextbox
+ {\iffacingpages
+ \global\setbox\facingbox=\vbox
+ \bgroup
+ \hsize=\zetbreedte
+ \else
+ \def\next{\gobbleuntil\stopnaast}%
+ \expandafter\next
+ \fi}
+
+\def\stopnaast%
+ {\egroup
+ \global\setbox\facingpage=\vbox
+ {\ifvoid\facingpage
+ \vskip\openstrutdepth % \dp\strutbox
+ \else
+ \unvbox\facingpage
+ \fi
+ \box\facingbox
+ \blanko}}
+
+\def\dostelnaastplaatsenin[#1]%
+ {\getparameters[\??np][#1]%
+ \doifelse{\@@npstatus}{\v!start}
+ {\global\facingpagestrue}
+ {\global\facingpagesfalse}}
+
+\def\stelnaastplaatsenin%
+ {\dosingleargument\dostelnaastplaatsenin}
+
+%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\pagenumber}}
+% {\def\dopaginanummer{0}}%
+% \edef\schrijfwegnaarlijst%
+% {\writeutilitycommand%
+% {\listentry%
+% {#1}%
+% {\nextinternalreference}%
+% {#2}%
+% {\ascii}%
+% {\sectionformat::\dopaginanummer}%
+% {\noexpand\realfolio}}}%
+% \schrijfwegnaarlijst
+% \endgroup}}
+
+\def\doschrijfnaarlijst#1#2#3#4%
+ {\doifvalue{\??li#1\c!status}{\v!start}
+ {\begingroup
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??li#1\c!expansie}]
+ [ \v!ja=>{\edef\ascii{#3}},
+ \v!commando=>{\convertcommand#3\to\ascii},
+ \s!default=>{\convertargument#3\to\ascii},
+ \s!unknown=>{\convertargument#3\to\ascii}]%
+ \makesectionformat
+ \doifelse{\@@nmstatus}{\v!start}
+ {\def\dopaginanummer{\noexpand\pagenumber}}
+ {\def\dopaginanummer{0}}%
+ % niet waterdicht, wat te doen met figuren en zo
+ % first hack: scheelt rommel, second hack: alleen koppen
+ \ExpandBothAfter\rawdoifinsetelse{#1}{\crossdocumentelements}
+ {\doif{\@@sectionlevel\@@sectie}{0}{\autocrossdocumentfalse}}
+ {\autocrossdocumentfalse}%
+ % blijft nog wat zwakjes
+ \ifautocrossdocument
+ \bgroup
+ \thisisdestination{#1::\sectionformat}%
+ \@EA\setsectieenkoppeling\@EA{#1}%
+ \edef\currentlevel{\@@sectionlevel\@@sectie}%
+ \def\docommando##1%
+ {\def\dodocommando####1%
+ {\setsectieenkoppeling{####1}%
+ \def\level{\@@sectionlevel\@@sectie}%
+ \ifnum\level>\currentlevel
+ \expanded{\definereference[##1::####1][\v!geen]}%
+ \else\ifnum\level=\currentlevel
+ \expanded{\definereference[##1::####1][##1::{####1::\sectionformat}]}%
+ \fi\fi}%
+ \processcommacommand[\crossdocumentelements]\dodocommando}%
+ \processcommacommand[\crossdocumentreferences]\docommando
+ \egroup
+ \else
+ \thisisnextinternal{#1}%
+ \fi
+ \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\pagenumber}}
+ {\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\lijstwidth{2em}}
+
+\def\@@livariantb% nr - tit - fill - pag
+ {\def\lijstfill{\hfill}%
+ \def\lijstskip{5em}%
+ \def\lijstwidth{2em}}
+
+\def\@@livariantc% nr - tit - dots - pag
+ {\def\lijstfill{\leaders\hbox to .5em{\hss.\hss}\hfill\hskip.5em}%
+ \def\lijstskip{5em}%
+ \def\lijstwidth{0pt}}
+
+\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\dodosetlijst#1%
+ {\def\geenlijst##1{\unknown}%
+ \setvalue{#1\c!tussen}{\dotussenlijst{#1}}%
+ \setvalue{#1\c!lijst}{\dolijstelement{#1}}}
+
+\def\dodoresetlijst#1%
+ {\let\geenlijst\empty
+ \setvalue{#1\c!tussen}{\gobblefourarguments{#1}}%
+ \setvalue{#1\c!lijst}{\gobblesixarguments{#1}}}
+
+\let\geenlijst\empty
+
+\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\v!nummer=\v!ja, % nodig ? % v
+ \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\dobeginoflist%
+ {\begingroup
+ \startopelkaar[\v!blanko]}
+
+\def\doendoflist%
+ {\stopopelkaar
+ \endgroup}
+
+\def\doplaatslijst[#1][#2]%
+ {\dobeginoflist
+ \dogetcommalistelement1\from#1\to\firstlistelement
+ \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}%
+ \doendoflist}
+
+\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#3}
+ {\stelinteractiein[\c!kleur=,\c!contrastkleur=]}%
+ \doattributes{\??li#1}{#2}{#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}{#6}{\copy0}}
+% {##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!nummertekst\c!nummerkleur
+% {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+% \makelijstelement\v!tekst
+% {\dolistattributes{#1}\c!tekstletter\c!tekstkleur
+% {\def\\{ }%
+% \dontconvertfont
+% \getvalue{\??li#1\c!tekstcommando}{#4}}}%
+% \doifvalue{\??li#1\c!paginanummer}{\v!ja}
+% {\doifsomething{#5}
+% {\makelijstelement\v!paginanummer
+% {\dolistattributes{#1}\c!paginaletter\c!paginakleur
+% {\getvalue{\??li#1\c!paginacommando}
+% {\paginaprefix\??li#1[#5]%
+% \translatednumber[#5]}}}}}}}%
+% \nointerlineskip % anders verkeerde spatiering bij multi-line
+% \endgraf
+% \allowbreak
+% }%
+% \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}{#6}{\copy0}}
+% {\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!nummerletter\c!nummerkleur
+% {\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!paginaletter\c!paginakleur
+% {\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!tekstletter\c!tekstkleur
+% {\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
+% \allowbreak
+% \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}{#6}{\copy0}}
+% {\hbox{##2}}}%
+% \setbox4=\hbox
+% {\doifvalue{\??li#1\c!paginanummer}{\v!ja}
+% {\doifsomething{#5}
+% {\makelijstelement\v!paginanummer
+% {\dolistattributes{#1}\c!paginaletter\c!paginakleur
+% {\getvalue{\??li#1\c!paginacommando}
+% {\paginaprefix\??li#1[#5]%
+% \translatednumber[#5]}}}}}}%
+% \hbox
+% {\getvalue{\??li#1\c!links}%
+% \makelijstelement\v!sectienummer
+% {\dolistattributes{#1}\c!nummerletter\c!nummerkleur
+% {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+% \getvalue{\??li#1\c!rechts}%
+% \hskip.5em}%
+% \nobreak
+% \tolerance3500
+% \dolistattributes{#1}\c!tekstletter\c!tekstkleur
+% {\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!diepte=\!!zeropoint,\c!kleur=]}{#1}}
+%
+% \def\dodofixdlijstelementF%
+% {\dodofixdlijstelementEFG\relax}
+%
+% \def\dodofixdlijstelementG#1%
+% {\dodofixdlijstelementEFG\regelmidden{#1}}
+%
+% \def\dodofixdlijstelementEFG#1#2#3#4#5#6#7%
+% {\noindent
+% \hbox
+% {\def\\={ }% or better \relax ?
+% \setbox0=\hbox
+% {#1{\showcontrastlocation{\??ia}{#7}
+% {\dostartattributes{\??li#2}\c!letter\c!kleur{}%
+% \ignorespaces\dontconvertfont#5%
+% \dostopattributes}}}%
+% \gotonextinternal{#2}{#3}{#7}{\copy0}}
+% \par}
+
+\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}}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
+ %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ {##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!nummertekst\c!nummerkleur
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+ \makelijstelement\v!tekst
+ {\dolistattributes{#1}\c!tekstletter\c!tekstkleur
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li#1\c!tekstcommando}{#4}}}%
+ \doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5}
+ {\makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginaletter\c!paginakleur
+ {\getvalue{\??li#1\c!paginacommando}
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}}}}}%
+ \nointerlineskip % anders verkeerde spatiering bij multi-line
+ \endgraf
+ \allowbreak}
+ \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}}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
+ %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ {\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!nummerletter\c!nummerkleur
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}%
+ \hfill}}%
+ \setbox4=\hbox
+ {\doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5} % \lijstwidth is new ; temp hack
+ {\hbox \ifdim\lijstwidth>\!!zeropoint to \lijstwidth\fi
+ {\hfill
+ \makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginaletter\c!paginakleur
+ {\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!tekstletter\c!tekstkleur
+ {\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
+ \allowbreak
+ \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}%
+\ifvmode
+ \advance\leftskip\getvalue{\??li#1\c!marge}% AANGEPAST
+\fi
+ \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}}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\copy0}}%
+ %\gotonextinternal{#1}{#2}{#6}{\copy0}%
+ {\hbox{##2}}}%
+ \setbox4=\hbox
+ {\doifvalue{\??li#1\c!paginanummer}{\v!ja}
+ {\doifsomething{#5}
+ {\makelijstelement\v!paginanummer
+ {\dolistattributes{#1}\c!paginaletter\c!paginakleur
+ {\getvalue{\??li#1\c!paginacommando}
+ {\paginaprefix\??li#1[#5]%
+ \translatednumber[#5]}}}}}}%
+ \hbox
+ {\getvalue{\??li#1\c!links}%
+ \makelijstelement\v!sectienummer
+ {\dolistattributes{#1}\c!nummerletter\c!nummerkleur
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+ \getvalue{\??li#1\c!rechts}%
+ \hskip.5em}%
+ \nobreak
+ \tolerance3500 % niet zomaar veranderen
+ \dolistattributes{#1}\c!tekstletter\c!tekstkleur
+ {\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
+ {\stelinteractiein[\c!strut=\v!nee]}
+ {\localframed[\??li#1][\c!diepte=\!!zeropoint,\c!kleur=]}
+ {#1}}
+
+\def\dodofixdlijstelementF#1%
+ {\dodofixdlijstelementEFG
+ {}
+ {\dosetraggedhbox{\getvalue{\??li#1\c!uitlijnen}}\raggedbox}
+ {#1}}
+
+\def\dodofixdlijstelementG#1%
+ {\dodofixdlijstelementEFG
+ {}
+ \regelmidden
+ {#1}}
+
+\def\dodofixdlijstelementEFG#1#2#3#4#5#6#7#8%
+ {\noindent
+ \hbox
+ {#1% in case E nils the strut
+ \def\\={ }%
+ \setbox0=\hbox
+ {#2{\showcontrastlocation{\??ia}{#8}
+ {\dostartattributes{\??li#3}\c!letter\c!kleur{}%
+ \ignorespaces\dontconvertfont\setstrut
+ \begstrut
+ \getvalue{\??li#3\c!tekstcommando}{#6}% tekstcommando nieuw
+ \endstrut % struts new
+ \dostopattributes}}}%
+ \linklisttoelement{#3}{#4}{#7}{#8}{\copy0}}%
+ %\gotonextinternal{#3}{#4}{#8}{\copy0}%
+ \par}
+
+\def\strippedlistentry[#1::#2::#3]{#1::#2}%
+
+\def\linklisttoelement#1#2#3#4#5% % list location format page data
+ {\ifautocrossdocument
+ \gotodestination{}{}{#1::\strippedlistentry[#3]}{#4}{#5}%
+ \else
+ \gotonextinternal{#1}{#2}{#4}{#5}%
+ \fi}
+
+\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!tekstletter\c!tekstkleur
+ {\def\\{ }%
+ \dontconvertfont
+ \getvalue{\??li##1\c!tekstcommando}{##4}}}%
+ \global\utilitydonetrue}
+ {}}%
+ \dostellijstin[#1][#2]%
+ \dogetcommalistelement1\from#1\to\commalistelement
+ \dosettoclevel{\getvalue{\??li\commalistelement\c!criterium}}%
+ \setbox0=\vbox
+ {\doutilities{#1}{\jobname}{#1}{}{\par}}%
+ \xdef\utilitylistheight {\the\ht0}%
+ \xdef\utilitylistwidth {\the\wd0}%
+ \endgroup
+ \iflijstgeplaatst\enablemode[\e!lijst]\else\disablemode[\e!lijst]\fi}
+
+\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%
+% {\switchtobodyfont[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}{\switchtbodyfont[5pt]\haalbuffer[kanweg]}
+%
+% \plaatsreferentielijst
+% [externalfigure,externaltable]
+
+% algemeen
+
+\def\referentiebutton#1[#2]%
+ {\bgroup
+ \let\referenceprefix=\empty
+ \setbox0=\hbox{\ignorespaces#1}%
+ \naarbox{\copy0}[#2]%
+ \egroup}
+
+\newcounter\referencecounter
+
+\def\doreferentielijstelement#1#2#3#4#5%
+ {\doiftoclevelelse[#4]
+ {\getvalue{\??rl#1\c!voor}%
+ \referentiebutton
+ {\getvalue{\??rl#1\c!commando}{#3}\pagereference[\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]%
+ \dogetcommalistelement1\from#1\to\commalistelement
+ \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\pagenumber}}
+ {\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
+ \pagereference[\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\doplaatssamengesteldelijst[#1][#2]%
+ {\begingroup
+ \getparameters[\??ih#1][#2]%
+ \dosettoclevel{\getvalue{\??ih#1\c!criterium}}%
+ \edef\samengesteldelijst{\getvalue{\??ih#1\c!lijst}}%
+ \stripspaces\from\samengesteldelijst\to\samengesteldelijst
+ \doifelsevalue{\??ih#1\c!niveau}{\v!huidige} % criterium=vorige,niveau=huidige
+ {\!!counta=0\@@koniveau} % hm: \@@koniveau
+ {\ExpandFirstAfter\doifnumberelse{\getvalue{\??ih#1\c!niveau}}% in verband
+ {\!!counta=\getvalue{\??ih#1\c!niveau}% met de vorige implementatie
+ \advance\!!counta by 1 % 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]%
+ {\dobeginoflist
+ \dostellijstin[#1][#2]%
+ \doutilities{#1}{\jobname}{#1}{}{\par}%
+ \doendoflist}
+
+\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}
+
+\def\plaatssamengesteldelijst%
+ {\dodoubleempty\doplaatssamengesteldelijst}
+
+%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#4%
+ {\bgroup
+ \global\utilitydonetrue
+ \syndef
+ {\doattributes{\??sm#1}\c!tekstletter\c!tekstkleur{#3}}
+ \ConvertToConstant\doifelse{#4}{}{\onbekend}{#4}\par
+ \egroup}
+
+\def\synonymentry#1%
+ {\executeifdefined{#1\s!entry}\gobblethreearguments}
+
+\def\dosetsynonym#1%
+ {\doifdefinedelse{\??sm#1\c!commando}
+ {\setvalue{#1\s!entry}{\getvalue{\??sm#1\c!commando}}}
+ {\setvalue{#1\s!entry}{\dohandlesynonymentry{#1}}}}
+
+\def\doplaatslijstmetsynoniemen#1#2%
+ {\witruimte
+ \begingroup
+ \def\currentsynonym{#1}%
+% \def\synplaats{\getvalue{\??sm#1\c!plaats}}%
+% \def\synbreedte{\getvalue{\??sm#1\c!breedte}}%
+% \def\synmonster{\getvalue{\??sm#1\c!monster}}%
+%
+ \doordefinieren % nog eens een class van maken, net als framed
+ [syndef]
+ [\c!plaats=\getvalue{\??sm#1\c!plaats},
+ \c!breedte=\getvalue{\??sm#1\c!breedte},
+ \c!afstand=\getvalue{\??sm#1\c!afstand},
+ \c!monster=\getvalue{\??sm#1\c!monster},
+ \c!hang=\getvalue{\??sm#1\c!hang},
+ \c!uitlijnen=\getvalue{\??sm#1\c!uitlijnen},
+ \c!voor=\getvalue{\??sm#1\c!voor},
+ \c!tussen=\getvalue{\??sm#1\c!tussen},
+ \c!na=\getvalue{\??sm#1\c!na},
+ \c!springvolgendein=\getvalue{\??sm#1\c!springvolgendein},
+ \c!kopletter=,
+ \c!letter=]%
+%
+ \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!synoniemletter\c!synoniemkleur
+ {\synonymmeaningfalse#3}%
+ \else
+ \explicithmode
+ \doattributes{\??sm#1}\c!tekstletter\c!tekstkleur{#2}%
+ \fi
+ \endgroup}
+
+%\def\getsynonymmeaning#1#2#3%
+% {\doifdefinedelse{#2#3}
+% {{\synonymmeaningtrue\getvalue{#2#3}}}
+% {{\showmessage{\m!systems}{18}{#1,#3}}}
+
+\def\getsynonymmeaning#1#2#3%
+ {\bgroup
+ \doifundefined{#2#3}
+ {\setgvalue{#2#3}{{\tt[#3]}}%
+ \showmessage{\m!systems}{18}{#1,#3}}%
+ \synonymmeaningtrue
+ \getvalue{#2#3}%
+ \egroup}
+
+\def\dowritesynonym#1#2#3#4%
+ {\begingroup % anders in mathmode lege \hbox
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??sm#1\c!expansie}]
+ [ \v!ja=>{\edef\asciiA{#3}\edef\asciiB{#4}},
+ \v!commando=>{\convertcommand#3\to\asciiA\convertcommand#4\to\asciiB},
+ \s!default=>{\convertargument#3\to\asciiA\convertargument#4\to\asciiB},
+ \s!unknown=>{\convertargument#3\to\asciiA\convertargument#4\to\asciiB}]%
+ %\doifelsevalue{\??sm#1\c!expansie}{\v!ja}
+ % {\immediatewriteutility{s e {#1} {#2} {#3} {#4}}}
+ % {\convertargument#3\to\asciiA
+ % \convertargument#4\to\asciiB
+ % \immediatewriteutility{s e {#1} {#2} {\asciiA} {\asciiB}}}%
+ \immediatewriteutility{s e {#1} {#2} {\asciiA} {\asciiB}}%
+ \endgroup}
+
+\def\preexecutesynonym#1#2#3#4%
+ {\ifdoinpututilities \else
+ \dowritesynonym{#1}{#2}{#3}{#4}%
+ \unexpanded\setgvalue{#2}{\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%
+ {\doifsomething{#2}
+ {\getvalue{\s!check#1}{#2}%
+ \doifelsevalue{\??sm#1\c!conversie}{\v!ja}
+ {\unexpanded\setgvalue{#2}{\expandsynonym{#1}{#2}{#3}{#4}}}
+ {\doifelsevalue{\??sm#1\c!status}{\v!start}
+ {\doifelsevalue{\??sm#1\c!criterium}{\v!alles}
+ {\preexecutesynonym{#1}{#2}{#3}{#4}}
+ {\unexpanded\setgvalue{#2}{\executesynonym{#1}{#2}{#3}{#4}}}}
+ {\unexpanded\setgvalue{#2}{\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!criterium=,
+ \c!plaats=\v!links,
+ \c!breedte=5em,
+ \c!afstand=0pt,
+ \c!monster=,
+ \c!hang=,
+ \c!uitlijnen=,
+ \c!voor=,
+ \c!tussen=,
+ \c!na=,
+ \c!springvolgendein=\v!nee]%
+ \presetheadtext
+ [#2=\Word{#2}]%
+ \setvalue{\e!stel#2\e!in}%
+ {\dodoubleargument\getparameters[\??sm#1]}%
+ \iffourthargument
+ \unexpanded\def#4##1%
+ {\getsynonymmeaning{#1}{\??sm:#1:}{##1}}%
+ \ifthirdargument
+ \unexpanded\def#3##1%
+ {\getvalue{\??sm:#1:##1}}%
+ \fi
+ \setvalue{#1}%
+ {\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}%
+ \else
+ \ifthirdargument
+ \unexpanded\def#3##1%
+ {\getsynonymmeaning{#1}{}{##1}}%
+ \fi
+ \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}\c!letter\c!kleur{##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}\c!letter\c!kleur{#2}%
+ \egroup}
+
+\def\dowritesort#1#2#3%
+ {\bgroup
+ %\doifelsevalue{\??so#1\c!expansie}{\v!ja}
+ % {\immediatewriteutility{s e {#1} {#2} {#3} {}}}
+ % {\convertargument#3\to\asciiA
+ % \immediatewriteutility{s e {#1} {#2} {\asciiA} {}}}%
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??so#1\c!expansie}]
+ [ \v!ja=>{\edef\asciiA{#3}},
+ \v!commando=>{\convertcommand#3\to\asciiA},
+ \s!default=>{\convertargument#3\to\asciiA},
+ \s!unknown=>{\convertargument#3\to\asciiA}]%
+ \immediatewriteutility{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}%
+ \unexpanded\setgvalue{#2}{\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%
+ {\doifsomething{#2}
+ {\getvalue{\s!check#1}{#2}%
+ \doifelsevalue{\??so#1\c!status}{\v!start}
+ {\doifelsevalue{\??so#1\c!criterium}{\v!alles}
+ {\preexecutesort{#1}{#2}{#3}}
+ {\unexpanded\setgvalue{#2}{\executesort{#1}{#2}{#3}}}}
+ {\unexpanded\setgvalue{#2}{\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=, % we test for defined !
+ \c!status=\v!start,
+ \c!criterium=,
+ \c!letter=,
+ \c!voor=,
+ \c!na=\endgraf]%
+ \presetheadtext[#2=\Word{#2}]%
+ \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt
+ {\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}
+
+%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.
+%
+% \index {entry}
+% \index[key] {entry}
+% \index[pageclass::] {entry}
+% \index[pageclass::key]{entry}
+% \index {textclass::entry}
+% \index[key] {textclass::entry}
+% \index[pageclass::] {textclass::entry}
+% \index[pageclass::key]{textclass::entry}
+%
+% Deze file wordt met het Perl script TeXUtil omgezet in
+% een in te lezen file met de commando's:
+%
+% \registerentrya {tag} {ingang}
+% \registerentryb {tag} {subingang}
+% \registerentryc {tag} {subsubingang}
+%
+% \registerpage {tag} {pag,txt} {volgnummer} {paginanummer} {volgnummer}
+%
+% \registersee {tag} {pag,txt} {andere ingang}
+%
+% \registerentry {tag} {letter}
+
+\def\dostelregisterin[#1][#2][#3]%
+ {\ifthirdargument
+ \def\docommando##1%
+ {\getparameters[\??id##1#2][#3]%
+ \preparepaginaprefix{\??id##1}}%
+ \else
+ \def\docommando##1%
+ {\getparameters[\??id##1][#2]%
+ \preparepaginaprefix{\??id##1}}%
+ \fi
+ \processcommalist[#1]\docommando}
+
+\def\stelregisterin%
+ {\dotripleempty\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}%
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??id\currentregister\c!expansie}]
+ [ \v!ja=>{\edef\ascii{#2}},
+ \v!commando=>{\convertcommand#2\to\ascii},
+ \s!default=>{\convertargument#2\to\ascii},
+ \s!unknown=>{\convertargument#2\to\ascii}]%
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\writeutility%
+ {r \ifcase\registerpagestatus\space\or e \or f \or t \fi
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\ascii} %
+ {\sectionformat::\noexpand\pagenumber} %
+ {\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\doregister#1%
+ {\chardef\registerpagestatus=1
+ \def\currentregister{#1}%
+ \complexorsimpleempty\doregister}
+
+\def\startregister%
+ {\dodoubleargument\dostartregister}
+
+\def\dostartregister[#1][#2]#3%
+ {\chardef\registerpagestatus=2
+ \def\currentregister{#1}%
+ \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#2]{#3}}%
+ \complexdoregister[#2]{#3}}
+
+\def\stopregister%
+ {\dodoubleargument\dostopregister}
+
+\def\dostopregister[#1][#2]%
+ {\getvalue{\??id#1\??id#2}\setgvalue{\??id#1\??id#2}{}}
+
+\def\dodostopregister[#1][#2]%
+ {\chardef\registerpagestatus=3
+ \def\currentregister{#1}%
+ \complexdoregister[#2]}
+
+\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}%
+ \ExpandFirstAfter\processaction
+ [\getvalue{\??id\currentregister\c!expansie}]
+ [ \v!ja=>{\edef\ascii{#2}},
+ \v!commando=>{\convertcommand#2\to\ascii},
+ \s!default=>{\convertargument#2\to\ascii},
+ \s!unknown=>{\convertargument#2\to\ascii}]%
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\writeutility%
+ {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#2%
+ {\nextregisterpage
+ \hbox to 1em{\hss\doregisterpagehowto{#1}{#2}\hss}}
+
+\def\setregisterpage#1%
+ {\let\registerpageseparator=\empty
+ \processaction
+ [\getvalue{\??id#1\c!symbool}]
+ [ \c!n=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\registerpagenumber}\/}},
+ \c!a=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\character{\registerpagenumber}\/}}},
+ 1=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{$\bullet$}}},
+ 2=>{\def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\vrule\!!width1em\!!height1ex\!!depth\!!zeropoint}}},
+ \v!geen=>{\def\doregisterpage##1[##2]{}},%
+ \s!unknown=>{\def\registerpagesymbol{\getvalue{\??id#1\c!symbool}}%
+ \def\doregisterpage##1[##2]%
+ {\doregisterpagelocation{#1}{\registerpagesymbol}}},
+ \s!default=>{\def\registerpageseparator%
+ {,}%
+ \def\doregisterpage##1[##2]%
+ {\doregisterpagehowto{##1}
+ {\strut
+ \paginaprefix{\??id##1}[##2]%
+ \translatednumber[##2]}}}]}
+
+\let\registerpagehowto\empty
+\let\registertexthowto\empty
+
+\def\setregisterhowto[#1,#2]%
+ {\def\registerpagehowto{#1}%
+ \def\registertexthowto{#2}}%
+
+\def\doregistertexthowto#1#2%
+ {\dostartattributes{\??id#1\registertexthowto}\c!tekstletter\c!tekstkleur{}%
+ \getvalue{\??id#1\c!tekstcommando}{#2}%
+ \dostopattributes}
+
+\def\doregisterpagehowto#1#2%
+ {\dostartattributes{\??id#1\registerpagehowto}\c!paginaletter\c!paginakleur{}%
+ \getvalue{\??id#1\c!paginacommando}{#2}%
+ \dostopattributes}
+
+\def\registerentry #1{\executeifdefined{#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}\gobblethrearguments}
+\def\registerpage #1{\executeifdefined{#1\s!page}\gobblefourarguments}
+\def\registerfrom #1{\executeifdefined{#1\s!from}\gobblefourarguments}
+\def\registerto #1{\executeifdefined{#1\s!to}\gobblefourarguments}
+
+\def\doresetregister#1%
+ {\letvalue{#1\s!entrya}=\gobbleoneargument
+ \letvalue{#1\s!entryb}=\gobbleoneargument
+ \letvalue{#1\s!entryc}=\gobbleoneargument
+ \letvalue {#1\s!see}=\gobblethreearguments
+ \letvalue {#1\s!page}=\gobblefourarguments
+ \letvalue {#1\s!from}=\gobblefourarguments
+ \letvalue {#1\s!to}=\gobblefourarguments
+ \letvalue {#1\s!entry}=\gobbleoneargument}
+
+\newif\iffirstsubentry
+\newif\iffirstsubsubentry
+
+\newcounter\currententrylevel
+
+\let\c!entryletter=\empty
+\let\c!entrya =\relax
+\let\c!entryb =\relax
+\let\c!entryc =\relax
+
+% \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
+% \global\let\c!entrya=\relax
+% \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
+% \global\let\c!entrya=\relax
+% \global\let\c!entryb=\relax
+% \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 % \strut nieuw
+% \setbox0=\hbox{\showlocation{\getvalue{\??id#1\c!tekstcommando}{\strut####1}}}%
+% \gotonextinternal{\s!ind}{##1}{##3}{\copy0}%
+% \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}{##3}{\copy0}%
+% \egroup}
+% {\hbox{\doregisterpage{#1}[##2]}}%
+% \ignorespaces
+% \global\firstregisterpagefalse}
+% {}}%
+% \setvalue{#1\s!see}##1##2%
+% {\doifreglevelelse[##2::0]
+% {{\global\utilitydonetrue
+% \def\dohandleregisterentry####1% dubbelop | \strut nieuw
+% {\getvalue{\??id#1\c!tekstcommando}{\strut####1}}%
+% \ifcase\currententrylevel % \e!zie must be label
+% \getvalue{#1\s!entrya}{\sl\e!zie\space##1}%
+% \or
+% \getvalue{#1\s!entryb}{\sl\e!zie\space##1}%
+% \or
+% \getvalue{#1\s!entryc}{\sl\e!zie\space##1}%
+% \fi
+% \c!entryletter\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
+% \global\firstregisterpagefalse}}
+% {}}%
+% \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}\c!letter\c!kleur
+% {\doifvalue{\??id#1\c!refereren}{\v!aan}
+% {\pagereference[#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}
+% {\pagereference[#1:##1]}}}}}
+
+\chardef\lastregisterpagestatus=0
+
+\def\dosetpageregisterpage#1#2#3#4#5#6%
+ {\doifreglevelelse[#5]
+ {\global\utilitydonetrue
+ \c!entryletter
+ \setregisterhowto[#3]%
+ \def\dohandleregisterentry##1%
+ {\bgroup
+ \if!!donea % \strut nieuw
+ \setbox0=\hbox{\showlocation{\doregistertexthowto{#2}{\strut##1}}}%
+ \gotonextinternal{\s!ind}{#4}{#6}{\copy0}%
+ \else
+ \doregistertexthowto{#2}{##1}%
+ \fi
+ \egroup
+ \!!doneafalse}%
+ \!!doneafalse
+ \doifelsevalue{\??id#2\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
+ \global\chardef\lastregisterpagestatus=0
+ \expandafter\hskip\getvalue{\??id#2\c!afstand}\relax
+ \donetrue
+ \else\ifnum#1=3
+ |--|\relax % -- !
+ \donetrue
+ \else\ifnum\lastregisterpagestatus=2
+ \donefalse % waiting for "to" pagenumber
+ \else
+ \registerpageseparator
+ |\spatie|\relax % \relax needed because | looks ahead
+ \donetrue
+ \fi\fi\fi
+ \ifdone
+ \doifelsevalue{\??id#2\c!interactie}{\v!paginanummer}
+ {\bgroup
+ \setbox0=\hbox
+ {\showlocation{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
+ \gotonextinternal{\s!ind}{#4}{#6}{\copy0}%
+ \egroup}
+ {\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
+ \ignorespaces
+ \global\chardef\lastregisterpagestatus=#1\relax
+ \fi
+ \global\firstregisterpagefalse}
+ {}}
+
+\def\dosetpageregistersee#1#2#3#4%
+ {\doifreglevelelse[#4::0]
+ {{\global\utilitydonetrue
+ \setregisterhowto[#2]%
+ \def\dohandleregisterentry##1% dubbelop | \strut nieuw
+ {\doregistertexthowto{#1}{\strut##1}}%
+ \getvalue
+ {#1\ifcase\currententrylevel\s!entrya\or\s!entryb\else\s!entryc\fi}%
+ {\doregisterpagehowto{#1}{\labeltext\v!zie\space#3}}%
+ \c!entryletter\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
+ \global\chardef\lastregisterpagestatus=0
+ \global\firstregisterpagefalse}}
+ {}}
+
+\def\dosetpageregisterletter#1#2%
+ {\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}\c!letter\c!kleur
+ {\doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\pagereference[#1:#2]}%
+ \strut\ignorespaces#2}}%
+ \getvalue{\??id#1\c!na}%
+ \par\nobreak} % don't use \string#2, other hack
+ {\goodbreak % needed #2 can be \string...
+ \doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\pagereference[#1:#2]}}}}
+
+\def\dosetpageregisterentrya#1#2%
+ {\edef\currententrylevel{1}%
+ \global\let\c!entryb=\relax
+ \global\let\c!entryc=\relax
+ \gdef\c!entrya%
+ {\global\firstregisterpagetrue
+ \endgraf
+ \hangindent1em\noindent
+ \dohandleregisterentry{#2}%
+ \global\firstsubentrytrue
+ \global\firstsubsubentrytrue}}
+
+\def\dosetpageregisterentryb#1#2%
+ {\edef\currententrylevel{2}%
+ \global\let\c!entryc=\relax
+ \global\def\c!entryb%
+ {\global\firstregisterpagetrue
+ \global\let\c!entrya=\relax
+ \endgraf
+ \iffirstsubentry\nobreak\fi
+ \hangindent2em\noindent\hskip1em\relax
+ \dohandleregisterentry{#2}%
+ \global\firstsubentryfalse
+ \global\firstsubsubentrytrue}}
+
+\def\dosetpageregisterentryc#1#2%
+ {\edef\currententrylevel{3}%
+ \gdef\c!entryc%
+ {\global\firstregisterpagetrue
+ \global\let\c!entrya=\relax
+ \global\let\c!entryb=\relax
+ \endgraf
+ \iffirstsubsubentry\nobreak\fi
+ \hangindent3em\noindent\hskip2em\relax
+ \dohandleregisterentry{#2}%
+ \global\firstsubsubentryfalse}}
+
+\def\dosetpageregister#1%
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \chardef\lastregisterpagestatus=0
+ \setvalue{#1\s!entrya}{\dosetpageregisterentrya {#1}}%
+ \setvalue{#1\s!entryb}{\dosetpageregisterentryb {#1}}%
+ \setvalue{#1\s!entryc}{\dosetpageregisterentryc {#1}}%
+ \setvalue {#1\s!page}{\dosetpageregisterpage{1}{#1}}%
+ \setvalue {#1\s!from}{\dosetpageregisterpage{2}{#1}}%
+ \setvalue {#1\s!to}{\dosetpageregisterpage{3}{#1}}%
+ \setvalue {#1\s!see}{\dosetpageregistersee {#1}}%
+ \setvalue {#1\s!entry}{\dosetpageregisterletter {#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% is die page reference echt nodig?
+ {\dosetreglevel{\getvalue{\??id#1\c!criterium}}%
+ \setregisterpage{#1}%
+ \setvalue{#1\s!entrya}##1%
+ {\global\utilitydonetrue
+ \c!entryletter
+ \iflocation
+ \getalllistreferences{#1}{##1}%
+ \endgraf\hangindent1em\noindent
+ %
+ %\thisissomeinternal{\s!lin}{\internallistreference}%
+ %
+ \pagereference[\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}{####2}{\copy0}}%
+ \def\docommando####1####2%
+ {\setbox0=\hbox{\showlocation{\hbox to 1em{\hss\symbol[####2]\hss}}}%
+ \ifx####1\empty
+ % \hskip\wd0 % (optioneel maken)
+ \else
+ \expandafter\dodocommando\expandafter[####1]%
+ \fi}%
+ {\docommando\firstlistreference\v!vorige}%
+ {\docommando\midlistreference\v!ergens}%
+ {\docommando\lastlistreference\v!volgende}%
+ \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}\c!letter\c!kleur
+ {\doifvalue{\??id#1\c!refereren}{\v!aan}
+ {\pagereference[#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}
+ {\pagereference[#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\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!from}%
+ {\getvalue{#1\s!page}}%
+ \setvalue{#1\s!page}##1##2##3##4%
+ {\doifreglevelelse[##3]
+ {\global\utilitydonetrue
+ \iffirstregisterpage
+ \global\firstregisterpagefalse
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\internallistreference::##2-##4}%
+ \else
+ \setxvalue{\??id#1\??id\currentregisterentry}%
+ {\getvalue{\??id#1\??id\currentregisterentry},##2-##4}%
+ \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
+ \fi
+ \ifx\nextlistreference\empty
+ \let\nextlistreference=\firstlistreference
+ \fi
+ \ifx\prevlistreference\selflistreference
+ \let\prevlistreference=\empty
+ \let\nextlistreference=\empty
+ \fi
+ \def\dodocommando[##1-##2]%
+ {\gotonextinternal{\s!ind}{##1}{##2}{\copy0}}%
+ \def\docommando##1##2%
+ {\setbox0=\hbox to 1em{\hss\showlocation{\symbol[##2]}\hss}%
+ \ifx##1\empty
+ \hskip\wd0 % (optioneel maken)
+ \else
+ \expandafter\dodocommando\expandafter[##1]%
+ \fi}%
+ \bgroup
+ \docommando\prevlistreference{\v!vorige}%
+ \egroup
+ \bgroup
+ \doifreferencefoundelse{\s!lin:\internallistreference}
+ {\gotosomeinternal
+ {\s!lin}{\internallistreference}{\currentrealreference}
+ {\showlocation{#3}}}
+ {\hbox{#3}}%
+ \egroup
+ \bgroup
+ \docommando\nextlistreference{\v!volgende}%
+ \egroup}}
+
+\def\dodolinkedregister[#1][#2]#3%
+ {\bgroup
+ \chardef\registerpagestatus=1
+ \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!paginaletter=\v!schuin,
+ \c!aanduiding=\v!ja,
+ \v!deel\v!nummer=\v!ja, % v
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \c!criterium=\v!alles,
+ \c!commando=,
+ \c!refereren=\v!aan]%
+ \presetheadtext[#1=\Word{#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!from}%
+ {\getvalue{#1\s!page}}%
+ \setvalue{#1\s!page}##1##2##3##4%
+ {\doifreglevelelse[##3]
+ {\doglobal\increment\utilitylistlength
+ \global\utilitydonetrue}
+ {}}%
+ \doglobal\newcounter\utilityregisterlength
+ \setbox0=\vbox
+ {\doutilities{#1}{\jobname}{#1}{}{}}%
+ \endgroup
+ \ifregistergeplaatst\enablemode[\e!register]\else\disablemode[\e!register]\fi}
+
+\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.
+
+
+% \EveryPar%
+% {\doglobal\newcounter\NOfLines}
+%
+% \EveryLine%
+% {\doglobal\increment\NOfLines%
+% \hskip-3em%
+% \hbox to 3em{\hss\NOfLines\hskip1em}}
+
+\def\processnextbufferline#1#2#3%
+ {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run
+ \convertargument#1 \to\next
+ \doifinstringelse{\endofblock}{\next}
+ {\ifnum\nestedbufferlevel=0\relax % \relax ?
+ \def\next{#2}%
+ \else
+ \decrement\nestedbufferlevel\relax
+ \def\next{#3}%
+ \fi}
+ {\doifinstringelse{\beginofblock}{\next}
+ {\increment\nestedbufferlevel\relax
+ \def\next{#3}}
+ {\def\next{#3}}}%
+ \next}
+
+\def\dodostartbuffer[#1][#2][#3]%
+ {\showmessage{\m!systems}{15}{#1}%
+ \doifelse{#3}{}
+ {\letbeundefined{\e!stop\e!buffer}% % \let\stopbuffer=\relax % \undefined
+ \@EA\@EA\@EA\convertargument\@EA\e!start\e!buffer\to\beginofblock % else a space
+ \@EA\@EA\@EA\convertargument\@EA\e!stop\e!buffer\to\endofblock
+ \let\processnextblockline=\processnextbufferline}
+ {\letbeundefined{#3}% \letvalue{#3}=\relax % \undefined
+ \@EA\convertargument\csname#2\endcsname\to\beginofblock
+ \@EA\convertargument\csname#3\endcsname\to\endofblock}%
+ \def\closeblock%
+ {\immediate\closeout\tmpblocks
+ \egroup
+ \getvalue{#3}}%
+ \doifelsenothing{#1}
+ {\immediate\openout\tmpblocks=\jobname.\f!temporaryextension}
+ {\immediate\openout\tmpblocks=#1.\f!temporaryextension}%
+ \newcounter\nestedbufferlevel
+ \setupcopyblock
+ \let\writeoutblocks\gobbleoneargument
+ \copyblockline}
+
+\def\dostartbuffer%
+ {\bgroup
+ \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv)
+ \dotripleempty\dodostartbuffer}
+
+\letvalue{\e!start\e!buffer}\dostartbuffer
+
+% \setbuffer[name]#2\endbuffer : saves to file #2.tmp
+
+\def\setbuffer[#1]#2\endbuffer%
+ {\immediate\openout\tmpblocks=#1.\f!temporaryextension
+ \convertargument#2\to\ascii
+ \immediate\write\tmpblocks{\ascii}%
+ \immediate\closeout\tmpblocks}
+
+\def\dobuffer#1[#2]#3%
+ {\def\dodobuffer##1%
+ {\showmessage{\m!systems}{#1}{##1}%
+ \beginrestorecatcodes
+ #3{##1.\f!temporaryextension}{}{}%
+ \endrestorecatcodes}%
+ \doifelsenothing{#2}
+ {\dodobuffer\jobname}
+ {\processcommalist[#2]\dodobuffer}}
+
+\def\haalbuffer%
+ {\dodoubleempty\dohaalbuffer}
+
+\def\dohaalbuffer[#1][#2]%
+ {\iffirstargument
+ \dodohaalbuffer[][#1]%
+ \else
+ \dodohaalbuffer[#1][#2]%
+ \fi}
+
+\def\dodohaalbuffer[#1][#2]%
+ {\getvalue{\??bu#1\c!voor}%
+ \dobuffer{16}[#2]\readjobfile
+ \getvalue{\??bu#1\c!na}}
+
+\def\typebuffer%
+ {\dodoubleempty\dotypebuffer}
+
+\def\dotypebuffer[#1][#2]%
+ {\iffirstargument
+ \dobuffer{17}[#1]\typefile
+ \else
+ \dobuffer{17}[#2]\typefile
+ \fi}
+
+\def\stelbufferin%
+ {\dodoubleempty\dostelbufferin}
+
+\def\dostelbufferin[#1][#2]%
+ {\ifsecondargument
+ \getparameters[\??bu#1][#2]%
+ \else
+ \getparameters[\??bu][#1]%
+ \fi}
+
+\def\dodefinieerbuffer[#1]%
+ {\iffirstargument % else problems
+ \doglobal\increment\nofdefinedbuffers
+ \setevalue{\e!start#1}%
+ {\noexpand\dostartbuffer[def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}%
+ \setevalue{\e!haal#1}%
+ {\noexpand\dodohaalbuffer[#1][def-\nofdefinedbuffers]}%
+ \setevalue{\e!type#1}%
+ {\noexpand\dodotypebuffer[#1][def-\nofdefinedbuffers]}%
+ \fi}
+
+\def\definieerbuffer%
+ {\dosingleargument\dodefinieerbuffer}
+
+%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 komt neer 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.
+
+% MEER GEBRUIKEN : \dodoubleargumentwithset
+
+\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
+ % \let\copynextline\relax
+ %\fi
+ %\copynextline}%
+ \ifeof\inpblocks\else\expandafter\copynextline\fi}%
+ \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% kan vlotter
+% {\!!counta=1\relax
+% \loop
+% \catcode\!!counta=\@@other
+% \advance\!!counta by 1\relax
+% \ifnum\!!counta<255\relax
+% \repeat
+% \obeylines}
+
+\def\setupcopyblock%
+ {\dostepwiserecurse{1}{255}{1}{\catcode\recurselevel=\@@other}%
+ \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%
+ {\let\opentmpblock\empty
+ \let\closetmpblock\empty
+ \let\writetmpblock\gobbleoneargument
+ \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%
+ {\dosingleargumentwithset\dodefinieerblok}
+
+\def\dostelblokin[#1][#2]%
+ {\getparameters[\??tb#1][#2]}
+
+\def\stelblokin%
+ {\dodoubleargumentwithset\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}\c!letter\c!kleur{}%
+ \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
+% \doifinsetelse{-}{#3}
+% {\showwarning{\m!textblocks}{10}{\bloktitel}%
+% \setvalue{\s!thiswasblock#1}%
+% {\global\advance\blocklevel by -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}\c!letter\c!kleur{}%
+% \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
+% \dogetcommalistelement1\from#1\to\commalistelement
+% \doifdefined{\??tb\commalistelement\c!file}
+% {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}%
+% \endgroup}
+%
+% \def\gebruikblokken%
+% {\begingroup
+% \doassign[\??bs][\c!criterium=\v!alles]%
+% \dodoubleempty\dogebruikblokken}
+
+\newconditional\processblockstatus
+\newconditional\dummyblockstatus
+
+\def\dodogebruikblok#1#2#3#4%
+ {\getblockstatus{#2}%
+ \ifblockpermitted
+ \setfalse\dummyblockstatus
+ \doifelsenothing{#4}
+ {\edef\bloktitel{#1}}
+ {\doifnotcommon{#3}{#4}
+ {\ifconditional\processblockstatus
+ \settrue\dummyblockstatus
+ \else
+ \global\blockpermittedfalse
+ \fi}%
+ \edef\bloktitel{#1:#3}}%
+ \else
+ \edef\bloktitel{#1}%
+ \fi
+ \ifblockpermitted
+ \global\advance\blocklevel by 1
+ \doifinset{-}{#3}{\settrue\dummyblockstatus}%
+ \ifconditional\dummyblockstatus
+ \showwarning{\m!textblocks}{10}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par
+ \egroup
+ \global\advance\blocklevel by -1\relax}%
+ \def\next%
+ {\setbox0=\vbox\bgroup}%
+ \else
+ \showwarning{\m!textblocks}{11}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par
+ \egroup
+ \getvalue{\??tb#1\c!na}%
+ \global\advance\blocklevel by -1\relax}%
+ \def\next%
+ {\getvalue{\??tb#1\c!voor}%
+ \bgroup
+ \visibletrue
+ \doattributes{\??tb#1}\c!letter\c!kleur{}%
+ \getvalue{\??tb#1\c!binnen}}%
+ \fi
+ \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\dodogebruikblokken[#1][#2]%
+ {\def\docommando##1%
+ {\dogebruikblok[##1][#2]}%
+ \processcommalist[#1]\docommando
+ \dogetcommalistelement1\from#1\to\commalistelement
+ \doifdefined{\??tb\commalistelement\c!file}
+ {\loadallblocks{\getvalue{\??tb\commalistelement\c!file}}}%
+ \endgroup}
+
+\def\dogebruikblokken%
+ {\begingroup
+ \doassign[\??bs][\c!criterium=\v!alles]%
+ \dodoubleempty\dodogebruikblokken}
+
+\def\gebruikblokken%
+ {\setfalse\processblockstatus\dogebruikblokken}
+
+\def\verwerkblokken%
+ {\settrue \processblockstatus\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\doaddpagebackground#1#2%
+ {\doifvaluesomething{\??ma#1\c!achtergrond}
+ {\setbox2=\vbox
+ {\offinterlineskip
+ \localframed
+ [\??ma#1]
+ [\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]%, \c!offset=\v!overlay]
+ {\getvalue{\??ma#1\c!commando}}}%
+ \wd2=\!!zeropoint
+ \dp2=\!!zeropoint
+ \setbox#2=\vbox
+ {\hbox{\box2\box#2}}}}
+
+\def\addpagebackground#1%
+ {\doifbothsidesoverruled
+ \doaddpagebackground{\v!rechterpagina}{#1}%
+ \orsideone
+ \doaddpagebackground{\v!rechterpagina}{#1}%
+ \orsidetwo
+ \doaddpagebackground{\v!linkerpagina}{#1}%
+ \od
+ \doaddpagebackground{\v!pagina}{#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\dododopagebodybackground#1#2#3#4%
+ {\edef\!!stringe{\??ma#3#4}%
+ \doifelsevaluenothing{\!!stringe\c!achtergrond }
+ {\doifelsevalue{\!!stringe\c!kader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!linkerkader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!rechterkader}\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!bovenkader }\v!aan\!!doneatrue
+ {\doifelsevalue{\!!stringe\c!onderkader }\v!aan\!!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
+\doifnot{\@@mastatus}{\v!herhaal}{\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]%
+ {\ifthirdargument
+ \docheckbackgrounddefinitions
+ \def\docommando##1%
+ {\doifinsetelse{##1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ {\getparameters[\??ma##1][#3]%
+ \dosetpageseparation}
+ {\def\dodocommando####1%
+ {\getparameters[\??ma##1####1][#3]}
+ \processcommalist[#2]\dodocommando}}%
+ \processcommalist[#1]\docommando
+ \else\ifsecondargument
+ \docheckbackgrounddefinitions
+ \doifcommonelse{#1}{\v!pagina,\v!linkerpagina,\v!rechterpagina}
+ {\def\docommando##1%
+ {\getparameters[\??ma##1][#2]}%
+ \processcommalist[#1]\docommando
+ \dosetpageseparation}
+ {\dostelachtergrondenin
+ [#1]
+ [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]
+ [#2]}%
+ \else\iffirstargument
+ \getparameters[\??ma][#1]%
+ \fi\fi\fi
+ \doifelse{\@@mastatus}{\v!stop}
+ {\global\newbackgroundfalse}
+ {\global\newbackgroundtrue}}
+
+\def\stelachtergrondenin%
+ {\dotripleempty\dostelachtergrondenin}
+
+% a lot of setups, including short ones
+
+\presetlocalframed [\??ma\v!pagina]
+\presetlocalframed [\??ma\v!linkerpagina]
+\presetlocalframed [\??ma\v!rechterpagina]
+
+\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]
+
+\copyparameters
+ [\??ma\v!linkerpagina\c!kader][\??ma\v!linkerpagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
+ [\??ma\v!linkerpagina\c!achtergrond][\??ma\v!linkerpagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
+ [\??ma\v!rechterpagina\c!kader][\??ma\v!rechterpagina]
+ [\c!offset,\c!diepte,\c!straal,\c!hoek,\c!kleur,\c!raster]
+
+\copyparameters
+ [\??ma\v!rechterpagina\c!achtergrond][\??ma\v!rechterpagina]
+ [\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\processlocalfile#1#2%
+ {\doglobal\increment\fileprocesslevel
+ \setxvalue{\c!file::\fileprocesslevel}{#2}%
+ \@EA\doglobal\@EA\addtocommalist\@EA{#2}\processedfiles
+ #1{#2}{}{}% #1=\readlocfile|\readsetfile{dir} #2=filename
+ \doglobal\decrement\fileprocesslevel}
+
+\def\processfile#1%
+ {\ifx\allinputpaths\empty
+ \processlocalfile{\readlocfile}{#1}{}%
+ \else
+ \let\filepath\empty
+ \def\docommando##1%
+ {\doiffileelse{\pathplusfile{##1}{#1}}
+ {\donetrue\def\filepath{##1}}
+ {\donefalse}%
+ \ifdone\expandafter\quitcommalist\fi}%
+ \processcommacommand[.,\allinputpaths]\docommando
+ \ifx\filepath\empty
+ \processlocalfile{\readlocfile }{#1}% fall back ../../..
+ \else
+ \processlocalfile{\readsetfile\filepath}{#1}% file found
+ \fi
+ \fi}
+
+\let\allinputpaths\empty
+
+\def\usepath[#1]%
+ {\def\docommando##1%
+ {\doifelse{##1}{\v!reset}
+ {\let\allinputpaths\empty}
+ {\addtocommalist{##1}\allinputpaths}}%
+ \processcommalist[#1]\docommando}
+
+\def\registreerfileinfo[#1#2]#3%
+ {\writestatus{\m!systems}{#1#2 file #3 at line \the\inputlineno}%
+ \immediatewriteutility{f #1 {#3}}}
+
+\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!filfilename}
+ {\showmessage{\m!systems}{2}{\f!filfilename}}{}%
+ \readsysfile{\f!sysfilename}
+ {\showmessage{\m!systems}{2}{\f!sysfilename}}{}}
+
+% test \@@svgebied
+
+\def\loadallsystemfiles#1%
+ {\ifx\@@svgebied\empty
+ \readsysfile{#1}{\showmessage{\m!systems}{2}{#1}}{}%
+ \else
+ \def\doloadsystemfile##1%
+ {\readsetfile{##1}{#1}{\showmessage{\m!systems}{2}{#1}}{}}%
+ \processcommacommand[\@@svgebied]\doloadsystemfile
+ \fi}
+
+\def\loadsystemfiles%
+ {\readsysfile{\f!newfilename}
+ {\showmessage{\m!systems}{2}{\f!newfilename}}{}%
+ \readsysfile{\f!oldfilename}
+ {\showmessage{\m!systems}{2}{\f!oldfilename}}{}%
+ \loadallsystemfiles\f!filfilename
+ \loadallsystemfiles\f!sysfilename}
+
+%
+
+\def\loadoptionfile%
+ {\readsysfile{\f!optfilename}
+ {\showmessage{\m!systems}{2}{\f!optfilename}}{}}
+
+% \newevery \everyjob \EveryJob
+% \appendtoks ... \to \everyjob
+
+\appendtoks \showcontextbanner \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 \loadoptionfile \to \everyjob
+\appendtoks \loadtwopassdata \to \everyjob
+\appendtoks \setupfootnotes \to \everyjob % eigenlijk ergens anders
+ % hangt af van korps
+\appendtoks \pagina[\v!laatste] \pagina
+ \ifarrangingpages\poparrangedpages\fi \to \everybye
+
+\appendtoks \registreerfileinfo[end]{\jobname} \to \everybye
+\appendtoks \stopcopyingblocks \to \everybye
+\appendtoks \closeutilities \to \everybye
+\appendtoks \closespecialfile \to \everybye
+
+\def\doateverystarttext%
+ {\the\everystarttext
+ \global\let\doateverystarttext\relax}
+
+\def\starttekst%
+ {\doateverystarttext
+ \ifnum\textlevel=0\relax
+ \registreerfileinfo[begin]{\jobname}%
+ \startcopyingblocks
+ \fi
+ \doglobal\increment\textlevel\relax}
+
+\def\stoptekst%
+ {\doglobal\decrement\textlevel\relax
+ \ifnum\textlevel>0 \else
+ \the\everystoptext
+ \the\everybye
+ \expandafter\normalend
+ \fi}
+
+\let\normalend=\end
+
+\def\end%
+ {\ifnum\textlevel>0 \else
+ \the\everybye
+ \expandafter\normalend
+ \fi}
+
+\def\doexecutefileonce#1%
+ {\beforesplitstring#1\at.\to\currentfile
+ \ExpandBothAfter\doifnotinset{\currentfile}{\loadedfiles}%
+ {\ExpandFirstAfter\addtocommalist{\currentfile}\loadedfiles
+ \doexecutefile{#1}}}
+
+\def\doexecutefile#1%
+ {\registreerfileinfo[begin]{#1}
+ \processfile{#1}%
+ \registreerfileinfo[end]{#1}}
+
+\def\donotexecutefile#1%
+ {}
+
+\def\verwerkfile#1 %
+ {\doexecutefile{#1}}
+
+\def\omgeving #1 % at outermost level only
+ {\def\startomgeving ##1 {}%
+ \let\stopomgeving=\relax
+ \startreadingfile
+ \readlocfile{#1}{}{}%
+ \stopreadingfile}
+
+\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\doprevlevel%
+ {\ifnum\filelevel=1
+ \expandafter\stoptekst
+ \else
+ \decrement\filelevel\relax
+ \expandafter\endinput
+ \fi}
+
+\def\startprojekt #1 %
+ {\!!donextlevel\currentproject
+ \donotexecutefile\doexecutefileonce
+ \doexecutefileonce\doexecutefile#1\\}
+
+\def\stopprojekt%
+ {\doprevlevel}
+
+\def\startprodukt #1 %
+ {\doateverystarttext
+ \!!donextlevel\currentproduct
+ \doexecutefileonce\doexecutefileonce
+ \donotexecutefile\doexecutefile#1\\}
+
+\def\stopprodukt%
+ {\doprevlevel}
+
+\def\startonderdeel #1 %
+ {\doateverystarttext
+ \!!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}}
+
+\expanded
+ {\long\noexpand\def\csname\e!start\e!instellingen\endcsname##1 ##2\csname\e!stop\e!instellingen\endcsname%
+ {\noexpand\long\noexpand\setvalue{\??su##1}{##2}}}
+
+\long\def\startsetups#1 #2\stopsetups% for international purposes
+ {\long\setvalue{\??su#1}{#2}}
+
+\def\dodosetups#1%
+ {\getvalue{\??su#1}}
+
+\def\dosetups[#1]%
+ {\iffirstargument
+ \dodosetups{#1}%
+ \else
+ \expandafter\dodosetups
+ \fi}
+
+\def\setups%
+ {\dosingleargument\dosetups}
+
+\newif\ifvoorlopig
+\voorlopigfalse
+
+\newif\ifconcept
+\conceptfalse
+
+\def\infofont%
+ {\getvalue{7pttttf}}
+
+\edef\utilityversion{1998.07.07} % was: 1996.03.15 % status variables
+\edef\utilityversion{1998.12.20} % was: 1998.07.07 % index attributes
+
+\def\doplaatsversieaanduiding#1#2%
+ {\doifsomething{#2}
+ {\@EA\convertargument#2\to\ascii
+ \ #1: \ascii\
+ \!!doneatrue}}
+
+\def\plaatsversieaanduiding% nog engels maken
+ {\ifvoorlopig
+ \vskip\!!sixpoint
+ \hbox to \zetbreedte
+ {\infofont
+ \getmessage\m!systems{27}: \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\ifinpagebody\else
+ \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}
+ {8em}
+ {..}%
+ \quad}}}%
+ \endgroup
+ \ifinner
+ \aftergroup\totaltestinfo
+ \else
+ \totaltestinfo
+ \fi
+ \fi\fi}
+
+\def\referentieinfo%
+ {\dotestinfo\referentieinfobox}
+
+\def\registerinfo%
+ {\dotestinfo\registerinfobox}
+
+\def\floatinfo%
+ {\dotestinfo\floatinfobox}
+
+\def\plaatstestinfo%
+ {\setbox0=\vbox to \teksthoogte
+ {\forgetall
+ \infofont
+ \hsize10em
+ \ifvoid\floatinfobox\else
+ \strut \getmessage\m!systems{24}
+ \vskip\!!sixpoint
+ \unvbox\floatinfobox
+ \vskip\!!twelvepoint
+ \fi
+ \ifvoid\referentieinfobox\else
+ \strut \getmessage\m!systems{25}
+ \vskip\!!sixpoint
+ \unvbox\referentieinfobox
+ \vskip\!!twelvepoint
+ \fi
+ \ifvoid\registerinfobox\else
+ \strut \getmessage\m!systems{26}
+ \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\complexdefinieer[#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}
+
+\definecomplexorsimpleempty\definieer
+
+\unexpanded\def\naam#1%
+ {\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\getvalue{\e!start#1}}
+\def\complexstop [#1]{\getvalue{\e!stop #1}\egroup}
+
+\def\simplestart{\bgroup}
+\def\simplestop {\egroup}
+
+\definecomplexorsimple\start
+\definecomplexorsimple\stop
+
+\def\dodefinieerstartstop[#1][#2]%
+ {\getparameters
+ [\??be#1]
+ [\c!voor=,
+ \c!na=,
+ \c!commandos=,
+ \c!letter=,
+ #2]%
+ \setvalue{#1}%
+ {\groupedcommand
+ {\getvalue{\??be#1\c!commandos}%
+ \dostartattributes{\??be#1}\c!letter\c!kleur}
+ {\dostopattributes}}%
+ \setvalue{\e!start#1}%
+ {\getvalue{\??be#1\c!voor}%
+ \bgroup
+ \getvalue{\??be#1\c!commandos}%
+ \dostartattributes{\??be#1}\c!letter\c!kleur{}}%
+ \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
+
+% the buffer mechanism handles nesting, add some switch
+
+\setvalue{\e!start\e!verbergen}%
+ {\dostartbuffer[buf-\nofpostponedblocks]
+ [\e!start\e!verbergen][\e!stop\e!verbergen]}
+
+% 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\dosetupsystem[#1]%
+ {\getparameters[\??sv][#1]%
+ \beforesplitstring\@@svresolutie\at dpi\to\@@svresolutie
+ \let\outputresolution=\@@svresolutie}
+
+\def\setupsystem%
+ {\dosingleargument\dosetupsystem}
+
+% Default-instellingen (verborgen)
+
+\resetutilities
+
+% Uitgestelde instellingen
+
+\def\dooutput{\sidefloatoutput} % redefinition of \dooutput
+
+% Default-instellingen (zichtbaar)
+
+\setupsystem
+ [\c!gebied=,
+ \c!resolutie=300dpi,
+ \c!korps=\normalizedlocalbodyfontsize] % 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,
+ \c!schaal=1,
+ \c!nx=1,
+ \c!ny=1,
+ \c!dx=\!!zeropoint,
+ \c!dy=\!!zeropoint,
+ \c!grid=\v!nee,
+ \c!regels=]
+
+% 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]
+
+\stelinterliniein
+ [\c!hoogte=.72,
+ \c!diepte=.28,
+ \c!boven=1.0,
+ \c!onder=0.4,
+ \c!regel=2.8ex]
+
+\stelkolommenin
+ [\c!n=2,
+ \c!commando=,
+ \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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!hoofd\v!tekst\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!hoofd\v!tekst\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!hoofd\v!marge\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!hoofd\v!marge\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!hoofd\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!hoofd\v!rand\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!voet\v!tekst\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!voet\v!tekst\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!voet\v!marge\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!voet\v!marge\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!voet\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!voet\v!rand\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!boven\v!tekst\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!boven\v!tekst\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!boven\v!marge\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!boven\v!marge\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!boven\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!boven\v!rand\c!breedte}]
+
+\stelonderin
+ [\v!tekst]
+ [\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!onder\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!onder\v!rand\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!onder\v!marge\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!onder\v!marge\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!onder\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!onder\v!rand\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!tekst\v!tekst\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!tekst\v!tekst\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!tekst\v!marge\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!tekst\v!marge\c!breedte}]
+
+\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!breedte=,
+ \c!linkerbreedte=\getvalue{\??tk\v!tekst\v!rand\c!breedte},
+ \c!rechterbreedte=\getvalue{\??tk\v!tekst\v!rand\c!breedte}]
+
+\stelnummeringin % na instellen hoofdteksten !
+ [\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\v!nummer=\v!nee, % v
+ \v!deel\v!nummer=\v!ja, % v
+ \c!nummerscheider=--,
+ \c!tekstscheider=\tfskip,
+ \c!status=\v!start,
+ \c!commando=,
+ \c!letter=\v!normaal,
+ \c!kleur=]
+
+\stelblankoin
+ [\v!standaard,
+ \v!groot]
+
+\definieerblanko[\v!default] [\currentblanko]
+\definieerblanko[\v!voor] [\v!default]
+\definieerblanko[\v!tussen] [\v!default]
+\definieerblanko[\v!na] [\v!voor]
+
+% doen?
+
+\def\@@blankovoor {\blanko[\v!voor]} %
+\def\@@blankotussen{\blanko[\v!tussen]} % scheelt 5 tokens == >20 bytes
+\def\@@blankona {\blanko[\v!na]} %
+
+\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!sectionlevel-1] % deel
+\definieersectie[\v!sectionlevel-2] % hoofdstuk
+\definieersectie[\v!sectionlevel-3] % paragraaf
+\definieersectie[\v!sectionlevel-4] % subparagraaf
+\definieersectie[\v!sectionlevel-5] % subsubparagraaf
+\definieersectie[\v!sectionlevel-6] % subsubsubparagraaf
+\definieersectie[\v!sectionlevel-7] % subsubsubsubparagraaf
+
+% \c!eigennummer ook hier?
+
+\definieerkop
+ [\v!deel]
+ [\c!sectie=\v!sectionlevel-1]
+
+\definieerkop
+ [\v!hoofdstuk]
+ [\c!sectie=\v!sectionlevel-2]
+
+\definieerkop
+ [\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-3]
+
+\definieerkop
+ [\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-4,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-5,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-6,
+ \c!default=\v!paragraaf]
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-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!sectionlevel-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=,
+ \c!doorgaan=\v!nee,
+ \c!springvolgendein=\v!nee,
+ \c!pagina=\v!rechts,
+ \c!hoofd=,
+ \c!letter=\tfc,
+ \c!afstand=.75em,
+ \c!voor={\blanko[2*\v!groot]},
+ \c!na={\blanko[2*\v!groot]}]
+
+\stelkopin
+ [\v!paragraaf]
+ [\c!uitlijnen=,
+ \c!letter=\tfa,
+ \c!afstand=.75em,
+ \c!springvolgendein=\v!nee,
+ \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!achtergrondoffset=\!!zeropoint,
+ \c!bovenkader=,
+ \c!onderkader=,
+ \c!linkerkader=,
+ \c!rechterkader=,
+ \c!kaderoffset=\!!zeropoint,
+ \c!voor=,
+ \c!na=,
+ \c!voorwit=\v!groot,
+ \c!nawit=\v!groot,
+ \c!zijvoorwit=\@@bkvoorwit,
+ \c!zijnawit=\@@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!springvolgendein=\v!ja,
+ \c!breedte=1.5em,
+ \c!factor=0,
+ \c!afstand=.5em,
+ \c!uitlijnen=\v!normaal,
+ \c!kleur=,
+ \c!letter=, % kan tzt weg
+ \c!marletter=\c!type, % \c! ???
+ \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, % kan gewoon check zijn op afsluiter
+ \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=\onbekend,
+ \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] % njet
+
+\stelinmargein
+ [\v!rechts]
+ [\c!plaats=\v!rechts]
+% \c!uitlijnen=\v!rechts] % njet
+
+\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]
+
+\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!leeg]
+
+\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!afstand=0pt,
+ \c!hang=,
+ \c!monster=,
+ \c!uitlijnen=,
+ \c!marge=\v!nee,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!springvolgendein=\v!ja,
+ \c!commando=]
+
+\steldoornummerenin
+ [\c!plaats=\v!boven,
+ \c!kopletter=\v!vet,
+ \c!kopkleur=,
+ \c!letter=\v!normaal,
+ \c!kleur=,
+ \c!breedte=8em,
+ \c!afstand=0pt,
+ \c!hang=,
+ \c!monster=,
+ \c!uitlijnen=,
+ \c!marge=\v!nee,
+ \c!voor=\blanko,
+ \c!tussen=\blanko,
+ \c!na=\blanko,
+ \c!springvolgendein=\v!ja,
+ \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=,
+ \c!commando=]
+
+\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=\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
+ [\c!status=\c!start]
+
+\stelachtergrondenin
+ [\v!pagina,\v!linkerpagina,\v!rechterpagina]
+ [\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
diff --git a/tex/context/base/core-01b.tex b/tex/context/base/core-01b.tex
index 4d5352575..f6e50edbe 100644
--- a/tex/context/base/core-01b.tex
+++ b/tex/context/base/core-01b.tex
@@ -1,1385 +1,1453 @@
-%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[#1]%
- {\bgroup
- \@@civoor
- \doifelsenothing{#1}
- {\let\dostopcitaat=\relax}
- {\startsmaller[#1]
- \let\dostopcitaat=\stopsmaller}%
- \dostartattributes\??ci{}%
- \setbox0=\hbox{\getvalue{\??la\currentlanguage\c!leftquotation}}%
- \hskip-\wd0
- \box0\relax
- \ignorespaces}
-
-\def\stopcitaat%
- {\unskip\hsmash{\getvalue{\??la\currentlanguage\c!rightquotation}}%
- \dostopattributes
- \dostopcitaat
- \@@cina
- \egroup}
-
-\def\startcitaat%
- {\dosingleempty\dostartcitaat}
-
-\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=,
- \c!voor=\startsmaller,
- \c!na=\stopsmaller]
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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}
+
+\setvalue{doitems\v!boven}#1%
+ {\dostartitems{#1}\horitems\@@isbreedte
+ \noindent\vbox
+ {\forgetall
+ \doifsomething{\@@issymbool}
+ {\doifnot{\@@issymbool}{\v!geen}
+ {\box2
+ \@@istussen
+ \nointerlineskip}}%
+ \box0}%
+ \dostopitems}
+
+\setvalue{doitems\v!onder}#1%
+ {\dostartitems{#1}\horitems\@@isbreedte
+ \noindent\vbox
+ {\forgetall
+ \box0
+ \doifsomething{\@@issymbool}
+ {\@@istussen
+ \nointerlineskip
+ \box2}}%
+ \dostopitems}
+
+\setvalue{doitems\v!inmarge}#1%
+ {\dostartitems{#1}{\veritems}{-1.5em}% - is a signal
+ \noindent\hbox{\llap{\box2\hskip\linkermargeafstand}\box0}%
+ \dostopitems}
+
+\setvalue{doitems\v!links}#1%
+ {\advance\hsize by -1.5em\relax
+ \dostartitems{#1}{\veritems}{1.5em}%
+ \noindent\hbox{\box2\box0}%
+ \dostopitems}
+
+\setvalue{doitems\v!rechts}#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
+ \doifundefined{doitems\@@isplaats}%
+ {\let\@@isplaats\v!links}%
+ \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=]
+
+% 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]}
+
+% nog monster
+%
+%\assignwidth
+% {\!!widtha}
+% {\getvalue{\??dd#1\c!breedte}}
+% {\doifelsevaluenothing{\??dd#1\c!monster}
+% {\hskip
+% {\doattributes
+% {\??al#1}\c!letter\c!kleur
+% {\getvalue{\??dd#1\c!monster}}}}
+% {0pt}
+
+\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}\c!letter\c!kleur
+ {}%
+ \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\bedragprefix{\mathematics{f\normalfixedspace}}
+\def\bedragsuffix{}
+
+\def\bedrag#1%
+ {\strut\hbox\bgroup
+ \let\normalfixedspace~%
+ \def~{\futurelet\next\dofixedspace}%
+ \def\dofixedspace%
+ {\hskip.5em\relax
+ \ifx\next,%
+ \hphantom,\let\next\gobbleoneargument
+ \else\ifx\next.%
+ \hphantom.\let\next\gobbleoneargument
+ \else
+ \let\next\relax
+ \fi\fi
+ \next}%
+ \bedragprefix#1\bedragsuffix
+ \egroup}
+
+% \definieeralineas[test][n=3]
+%
+% \stelalineasin[test][3][breedte=4cm,uitlijnen=links]
+%
+% \startopelkaar
+% \test hans \\ ton \\ \bedrag{1.000,--} \\
+% \test hans \\ ton \\ \bedrag{~.~~1,--} \\
+% \test hans \\ ton \\ \bedrag{~.~~1,~~} \\
+% \test hans \\ ton \\ \bedrag{~.100,--} \\
+% \test hans \\ ton \\ \subtot{1.000,--} \\
+% \test hans \\ ton \\ \bedrag{1.000,--} \\
+% \test hans \\ ton \\ \bedrag{1.000,--} \\
+% \test hans \\ ton \\ \totaal{1.000,--} \\
+% \test hans \\ ton \\ \bedrag{nihil,--} \\
+% \test hans \\ ton \\ \totaal{nihil,--} \\
+% \test hans \\ ton \\ \subtot{nihil,--} \\
+% \stopopelkaar
+
+\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]}
+
+\definecomplexorsimple\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
+
+\def\permine%
+ {\dontleavehmode
+ \bgroup
+ \setbox0=\hbox
+ {\mathematics{+}}%
+ \hbox to \wd0
+ {\hss
+ \mathematics{^{\scriptscriptstyle-}\kern-.4em/\kern-.3em_{\scriptscriptstyle-}}%
+ \hss}%
+ \egroup}
+
+% for compatibility
+
+\def\unknown%
+ {\punten[3]}
+
+% 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 [letter=]
+
+\newsignal\quotationsignal
+\def\quotationskip{.125em}
+
+\def\stelciterenin%
+ {\dodoubleargument\getparameters[\??ci]}
+
+\def\stelcitatenin%
+ {\stelciterenin}
+
+\def\dostartcitaat[#1]%
+ {\bgroup
+ \@@civoor
+ \doifelsenothing{#1}
+ {\let\dostopcitaat=\relax}
+ {\startsmaller[#1]
+ \let\dostopcitaat=\stopsmaller}%
+ \dostartattributes\??ci\c!letter\c!kleur{}%
+ \setbox0=\hbox{\getvalue{\??la\currentlanguage\c!leftquotation}}%
+ \hskip-\wd0
+ \box0\relax
+ \ignorespaces}
+
+\def\stopcitaat%
+ {\unskip\hsmash{\getvalue{\??la\currentlanguage\c!rightquotation}}%
+ \dostopattributes
+ \dostopcitaat
+ \@@cina
+ \egroup}
+
+\def\startcitaat%
+ {\dosingleempty\dostartcitaat}
+
+\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\c!letter\c!kleur}
+ {\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}
+
+\definecomplexorsimpleempty\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\c!letter\c!kleur{#1}\hskip\linkermargeafstand}}
+ {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlbreedte
+ \hbox spread 1em{\hss\doattributes\??tl\c!letter\c!kleur{\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{}}
+
+\definecomplexorsimple\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\c!letter\c!kleur
+ {\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}
+
+\definecomplexorsimpleempty\invullijnen
+
+\def\complexinvultekst[#1]#2#3\par%
+ {\dodocomplexinvullijnen[#1]{\ignorespaces#3\endgraf}{#2}{}}
+
+\definecomplexorsimpleempty\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}
+
+\definecomplexorsimpleempty\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!x=0,\c!y=0,
+ \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,
+ \c!plaats=\v!links,
+ #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}%
+ \doglobal\newcounter\@@roosterc
+ \doglobal\newcounter\@@roosterd
+ \doglobal\newcounter\@@roostere
+ \def\setlegend##1##2##3%
+ {\gdef\@@roosterc{0}%
+ \dimen0=2em\relax
+ \dimen2=##2\@@rteenheid\relax
+ \dimen2=\@@rtschaal\dimen2\relax
+ \dimen2=\@@rtfactor\dimen2\relax
+ \divide\dimen0 by \dimen2\relax
+ \xdef\@@roostere{\number\dimen0}%
+ \ifnum\@@roostere>50
+ \gdef\@@roostere{100}%
+ \else\ifnum\@@roostere>10
+ \gdef\@@roostere{50}%
+ \else\ifnum\@@roostere>5
+ \gdef\@@roostere{10}%
+ \else\ifnum\@@roostere>1
+ \gdef\@@roostere{5}%
+ \else
+ \gdef\@@roostere{1}%
+ \fi\fi\fi\fi
+ \gdef\@@roosterd{0}%
+ \def\legend%
+ {\ifnum\@@roosterd=0\relax
+ \vbox
+ {\increment(\@@roosterc,##1)%
+ \hbox to 2em{\hss\@@roosterc\hss}}%
+ \global\let\@@roosterd=\@@roostere
+ \fi
+ \doglobal\decrement\@@roosterd
+ \doglobal\increment(\@@roosterc,##1)}}%
+ \def\draw##1##2##3##4##5##6##7##8##9%
+ {\stelpositionerenin
+ [\c!status=##8,
+ \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]%
+ \doifelse{##9}{\v!midden}
+ {\scratchdimen=##3pt\scratchdimen=.5\scratchdimen
+ \edef\@@psxx{\withoutpt\the\scratchdimen}%
+ \scratchdimen=##4pt\scratchdimen=.5\scratchdimen
+ \edef\@@psyy{\withoutpt\the\scratchdimen}%
+ \scratchcounter=##2\advance\scratchcounter by -1
+ \edef\@@pszz{\the\scratchcounter}}
+ {\edef\@@psxx{0}\edef\@@psyy{0}\edef\@@pszz{##2}}%
+ \positioneer(\@@psxx,\@@psyy){##1}%
+ \stelpositionerenin
+ [\c!status=##8,
+ \c!xstap=\v!relatief,
+ \c!ystap=\v!relatief,
+ \c!schaal=\@@rtschaal,
+ \c!factor=\@@rtfactor,
+ \c!offset=\@@rtoffset,
+ \c!eenheid=\@@rteenheid]%
+ \dorecurse{\@@pszz}{\positioneer(##3,##4){##5}}}%
+ \draw
+ \verline\@@rtnx\@@rtdx0\verline\!!zeropoint\!!zeropoint\v!start\empty
+ \draw
+ \horline\@@rtny0\@@rtdy\horline\!!zeropoint\!!zeropoint\v!start\empty
+ \tfx
+ \doifnot{\@@rtxstap}{0}
+ {\setlegend\@@rtxstap\@@rtdx\@@rtx
+ \draw\legend\@@rtnx\@@rtdx0\legend{-1em}{-1.5em}\v!overlay\@@rtplaats}%
+ \doifnot{\@@rtystap}{0}
+ {\setlegend\@@rtystap\@@rtdy\@@rty
+ \draw\legend\@@rtny0\@@rtdy\legend{-2em}{-.75ex}\v!overlay\@@rtplaats}%
+ \stoppositioneren
+ \endgroup}
+
+\def\rooster%
+ {\dosingleempty\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}
+
+\definecomplexorsimpleempty\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}
+
+\definecomplexorsimpleempty\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!letter=\v!normaal,
+ \c!kleur=,
+ \c!voor=\startsmaller,
+ \c!na=\stopsmaller]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-01c.tex b/tex/context/base/core-01c.tex
index 9d91c6f4b..7b7205263 100644
--- a/tex/context/base/core-01c.tex
+++ b/tex/context/base/core-01c.tex
@@ -1,1233 +1,636 @@
-%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 typesetting sources and putting eps coded logos into
-%D a heading. Temporary restoring the \CATCODES\ is done in
-%D the calling routine.
-
-\def\iffigurefileopened#1%
- {\openjobin{\scratchread}{#1}%
- \ifeof\scratchread
- \doifsomething{\@@exgebied}
- {\closein\scratchread
- \openfixin{\scratchread}{\@@exgebied}{#1}}%
- \fi
- \ifeof\scratchread
- \closein\scratchread
- \else}
-
-\def\dogetfiguresizeeps#1#2#3#4#5%
- {\bgroup
- \global\chardef\epsffound=0
- \iffigurefileopened{#1}%
- \uncatcodespecials
- \def\next%
- {\read\scratchread to \epsffileline
- \ifeof\scratchread
- \let\next=\relax
- \else
- \expandafter\epsfaux\epsffileline:. \\%
- \fi
- \next}%
- \next
- \closein\scratchread
- \fi
- \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\set@@effullname%
- {\ifx\@@efextension\empty
- \edef\@@effullname{\@@effilename.\@@eftype}%
- \else
- \edef\@@effullname{\@@effilename.\@@efextension}%
- \fi}
-
-\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}%
- \set@@effullname
- \doifelse{\@@efpreset}{\v!nee} % iets anders
- {\figurefoundtrue
- \set@@effullname}
- {\doifelse{#1}{\s!figurepreset}
- {\figurefoundtrue
- \let\@@eftype=\@@epe
- \set@@effullname}
- {\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
- \set@@effullname
- \showmessage{\m!figures}{1}{\@@effullname}%
- \else
- \doreadglobalfigurefile
- \iffigurefound
- \set@@effullname
- \showmessage{\m!figures}{2}{\@@effullname}%
- \else
- \doif{\@@eftype}{\s!unknown}
- {\let\@@eftype=\c!eps}%
- \set@@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
- \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}}%
- \doif{\@@efmethode}{mps}
- {\convertMPcolors{\@@effullname}}%
- \doinsertfile
- {\@@eftype,\@@efmethode}{\@@effullname}
- {\scax}{\scay}
- {\figx}{\figy}
- {\number\figwid}{\number\fighei}
- {\@@efpreview}}%
- \else
- \localframed
- [\??ef]
- [\c!breedte=\figwid,
- \c!hoogte=\fighei,
- \c!kader=\v!aan]
- {\tttf #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\legendaspacing%
- {\hskip.5em}
-
-\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\legendaspacing##\legendaspacing\hfil
- &\ifdoublelegends$##$\hfil\fi
- &\ifdoublelegends\hfil\legendaspacing##\legendaspacing\hfil\fi
- &##\unskip\hfil\legendaspacing\legendaspacing
- &$\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
- &\legendaspacing\legendaspacing\hfil$##$&\hfil\legendaspacing##\legendaspacing\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}
-
-\long\def\dodostartcombinatie[#1*#2*#3]%
- {\stelfractiesin
- [\c!n=\v!passend,
- \c!afstand=\@@coafstand]%
- \global\horcombinatie=#1\relax
- \global\totcombinatie=#2\relax
- \xdef\maxhorcombinatie{\the\horcombinatie}%
- \multiply\totcombinatie by \horcombinatie
- \tabskip=\!!zeropoint
- \doifelse{\@@cobreedte}{\v!passend}
- {\halign}
- {\halign to \@@cobreedte}%
- \bgroup&\hfil##\hfil&\tabskip\!!zeropoint \!!plus 1fill##\cr
- \docombinatie}
-
-\def\docombinatie%
- {\dowithnextbox
- {\setbox0=\box\nextbox
- \dowithnextbox
- {\setbox2=\box\nextbox
- \dodocombinatie}
- \hbox}
- \hbox}
-
-\def\dodocombinatie%
- {\vbox
- {\forgetall % \stelwitruimtein[\v!geen]%
- \vbox
- {\copy0}%
- \ifdim\ht2>\!!zeropoint\relax % beter dan \wd2, nu \strut mogelijk
- \@@cotussen
- \vtop
- {\nointerlineskip % recently added
- \hsize\wd0
- \steluitlijnenin[\@@couitlijnen]% % \raggedcenter
- \begstrut\unhbox2\endstrut}%
- \fi}%
- \ifnum\totcombinatie>1
- \global\advance\totcombinatie by -1
- \global\advance\horcombinatie by -1
- \ifnum\horcombinatie=0
- \def\next%
- {\cr\noalign
- {\forgetall %\stelwitruimtein[\v!geen]%
- \nointerlineskip
- \@@cona
- \@@covoor
- \vss
- \nointerlineskip}%
- \global\horcombinatie=\maxhorcombinatie\relax
- \docombinatie}%
- \else
- \def\next%
- {&&&\hskip\@@coafstand&\docombinatie}%
- \fi
- \else
- \def\next%
- {\cr\egroup}%
- \fi
- \next}
-
-\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
- \expandafter\dodogetoverlay
- \fi}
-
-\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\switchtobodyfont[\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\nextbox
- {#2\relax
- \hbox to #4\nextbox
- {#5\relax
- \doifelsenothing{\@@rorotatie}
- {\dostartrotation{90}}
- {\dostartrotation{\@@rorotatie}}%
- \wd\nextbox=\!!zeropoint
- \ht\nextbox=\!!zeropoint
- \box\nextbox
- \dostoprotation
- #6}
- #3}%
- \egroup}
-
-\def\dostoproteer%
- {\!!counta=\@@rorotatie
- \divide\!!counta by 90
- \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}
-
-\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop
- {\bgroup
- \hbox\bgroup % compatibility hack
- \dowithnextbox
- {\edef\@@rorotatie{#1}%
- \setbox\nextbox=\vbox{\box\nextbox}%
- \dostoproteer
- \egroup}}
-
-\def\complexroteer[#1]%
- {\dowithnextbox
- {\getparameters[\??ro][#1]%
- \dostoproteer}%
- \vbox\localframed[\??ro][#1]}
-
-\def\roteer%
- {\bgroup % \roteer kan argument zijn
- \complexorsimpleempty{roteer}}
-
-% schaal
-
-\def\doschaal[#1]%
- {\bgroup
- \getparameters[\??xy][\c!sx=1,\c!sy=1,#1]%
- \dowithnextbox
- {\setbox\nextbox=\vbox
- {\dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}%
- \wd\nextbox=\@@xysx\wd\nextbox
- \ht\nextbox=\@@xysy\ht\nextbox
- \dp\nextbox=\@@xysy\dp\nextbox
- \box\nextbox
- \egroup}
- \vbox}
-
-\def\schaal%
- {\dosingleempty\doschaal}
-
-% mirror
-
-\def\domirrorbox% \hbox/\vbox/\vtop
- {\bgroup
- \dowithnextbox
- {\dimen0=\wd\nextbox
- \setbox\nextbox=\vbox
- {\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
- \wd\nextbox=\dimen0
- \box\nextbox
- \egroup}}
-
-\def\spiegel%
- {\domirrorbox\vbox}
-
-%\setbox0=\hbox{gans}
-%
-%\ruledhbox{\copy0 \schaal[sx=2,sy=2]{\copy0}}
-%
-%\spiegel{\ruledhbox{\copy0 \schaal{\box0}}}
-
-% 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!overlay,
- \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
+%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: 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
+
+%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\legendaspacing%
+% {\hskip.5em}
+%
+% \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\legendaspacing##\legendaspacing\hfil
+% &\ifdoublelegends$##$\hfil\fi
+% &\ifdoublelegends\hfil\legendaspacing##\legendaspacing\hfil\fi
+% &##\unskip\hfil\legendaspacing\legendaspacing
+% &$\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
+% &\legendaspacing\legendaspacing\hfil$##$&\hfil\legendaspacing##\legendaspacing\hfil&
+% $\rm##$\hfil\cr}
+%
+% \def\stopgegeven%
+% {\egroup
+% \egroup
+% \blanko}
+%
+% \def\geg#1\\#2\\#3\\%
+% {#1&
+% #2&=&
+% #3\cr}
+
+\definetabulate
+ [\e!legenda]
+ [|emj1|i1|mR|]
+
+\setuptabulate
+ [\e!legenda]
+ [\c!eenheid=.75em,\c!binnen=\setquicktabulate\leg,EQ={=}]
+
+\definetabulate
+ [\e!legenda][\v!twee]
+ [|emj1|emk1|i1|mR|]
+
+\definetabulate
+ [\e!gegeven]
+ [|R|ecmj1|i1mR|]
+
+\setuptabulate
+ [\e!gegeven]
+ [\c!eenheid=.75em,\c!binnen=\setquicktabulate\geg,EQ={=}]
+
+\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}
+
+\long\def\dodostartcombinatie[#1*#2*#3]%
+ {\stelfractiesin
+ [\c!n=\v!passend,
+ \c!afstand=\@@coafstand]%
+ \global\horcombinatie=#1\relax
+ \global\totcombinatie=#2\relax
+ \xdef\maxhorcombinatie{\the\horcombinatie}%
+ \multiply\totcombinatie by \horcombinatie
+ \tabskip=\!!zeropoint
+ \doifelse{\@@cobreedte}{\v!passend}
+ {\halign}
+ {\halign to \@@cobreedte}%
+ \bgroup&\hfil##\hfil&\tabskip\!!zeropoint \!!plus 1fill##\cr
+ \docombinatie}
+
+\def\docombinatie%
+ {\dowithnextbox
+ {\setbox0=\box\nextbox
+ \dowithnextbox
+ {\setbox2=\box\nextbox
+ \dodocombinatie}
+ \hbox}
+ \hbox}
+
+\def\dodocombinatie%
+ {\vbox
+ {\forgetall % \stelwitruimtein[\v!geen]%
+ \vbox
+ {\copy0}%
+ \ifdim\ht2>\!!zeropoint\relax % beter dan \wd2, nu \strut mogelijk
+ \@@cotussen
+ \vtop
+ {\nointerlineskip % recently added
+ \hsize\wd0
+ \steluitlijnenin[\@@couitlijnen]% % \raggedcenter
+ \begstrut\unhbox2\endstrut}%
+ \fi}%
+ \ifnum\totcombinatie>1
+ \global\advance\totcombinatie by -1
+ \global\advance\horcombinatie by -1
+ \ifnum\horcombinatie=0
+ \def\next%
+ {\cr\noalign
+ {\forgetall %\stelwitruimtein[\v!geen]%
+ \nointerlineskip
+ \@@cona
+ \@@covoor
+ \vss
+ \nointerlineskip}%
+ \global\horcombinatie=\maxhorcombinatie\relax
+ \docombinatie}%
+ \else
+ \def\next%
+ {&&&\hskip\@@coafstand&\docombinatie}%
+ \fi
+ \else
+ \def\next%
+ {\cr\egroup}%
+ \fi
+ \next}
+
+\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\plaatsnaastelkaar%
+% {\bgroup
+% \dowithnextbox
+% {\dowithnextbox
+% {\valign{\vss########\vss\cr\box0\cr\box\nextbox\cr}%
+% \egroup}
+% \vbox}
+% \vbox}
+
+\def\plaatsondernaastelkaar#1#2%
+ {\bgroup
+ \def\plaatsonderelkaar%
+ {#2\cr\omit\bgroup#2%
+ \aftergroup#2%
+ \aftergroup\cr
+ \aftergroup\egroup
+ \aftergroup\egroup
+ \let\next=}%
+ #1\bgroup##\cr
+ \omit\bgroup#2%
+ \aftergroup\plaatsonderelkaar
+ \let\next=}
+
+\def\plaatsonderelkaar%
+ {\plaatsondernaastelkaar\halign\hss}
+
+\def\plaatsnaastelkaar%
+ {\plaatsondernaastelkaar\valign\vss}
+
+%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\switchtobodyfont[\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%
+ {\dontshowcomposition
+ \vbox to #1\nextbox
+ {#2\relax
+ \hbox to #4\nextbox
+ {#5\relax
+ \doifelsenothing{\@@rorotatie}
+ {\dostartrotation{90}}
+ {\dostartrotation{\@@rorotatie}}%
+ \wd\nextbox=\!!zeropoint
+ \ht\nextbox=\!!zeropoint
+ \box\nextbox
+ \dostoprotation
+ #6}
+ #3}%
+ \egroup}
+
+\def\dostoproteer%
+ {\!!counta=\@@rorotatie
+ \divide\!!counta by 90
+ \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
+ \or
+ \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \else
+ \def\@@rotatie{90}%
+ \dodostoproteer\ht\relax\vfill\wd\relax\hfill
+ \fi}
+
+\def\dorotatebox#1% {angle} \hbox/\vbox/\vtop
+ {\bgroup
+ \hbox\bgroup % compatibility hack
+ \dowithnextbox
+ {\edef\@@rorotatie{#1}%
+ \setbox\nextbox=\vbox{\box\nextbox}%
+ \dostoproteer
+ \egroup}}
+
+\def\complexroteer[#1]%
+ {\dowithnextbox
+ {\getparameters[\??ro][#1]%
+ \dostoproteer}%
+ \vbox\localframed[\??ro][#1]}
+
+\def\roteer%
+ {\bgroup % \roteer kan argument zijn
+ \complexorsimpleempty\roteer}
+
+% schaal
+
+\def\doschaal[#1]%
+ {\bgroup
+ \forgetall
+ \getparameters[\??xy][\c!sx=1,\c!sy=1,#1]%
+ \dowithnextbox
+ {\dontshowcomposition
+ \dimen0=\@@xysy\ht\nextbox
+ \dimen2=\@@xysy\dp\nextbox
+ \dimen4=\@@xysx\wd\nextbox
+ \dimen6=\dimen0\advance\dimen6 by \dimen2
+ \setbox\nextbox=\vbox to \dimen6
+ {\ht\nextbox=\!!zeropoint
+ \dp\nextbox=\!!zeropoint
+ \vfill % erbij
+ \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling
+ }% was \vfill}%
+ \ht\nextbox=\dimen0
+ \dp\nextbox=\dimen2
+ \wd\nextbox=\dimen4
+ \box\nextbox
+ \egroup}
+ \hbox} % was \vbox}
+
+\def\schaal%
+ {\dosingleempty\doschaal}
+
+% mirror
+
+\def\domirrorbox% \hbox/\vbox/\vtop
+ {\bgroup
+ \dowithnextbox
+ {\dontshowcomposition
+ \dimen0=\wd\nextbox
+ \setbox\nextbox=\vbox
+ {\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
+ \wd\nextbox=\dimen0
+ \box\nextbox
+ \egroup}}
+
+\def\spiegel%
+ {\domirrorbox\hbox}
+
+%\setbox0=\hbox{gans}
+%
+%\ruledhbox{\copy0 \schaal[sx=2,sy=2]{\copy0}}
+%
+%\spiegel{\ruledhbox{\copy0 \schaal{\box0}}}
+
+% 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
+
+\stelroterenin
+ [\c!rotatie=90,
+ \c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!offset=\v!overlay,
+ \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
diff --git a/tex/context/base/core-01d.tex b/tex/context/base/core-01d.tex
index b2e05c76d..57c12a235 100644
--- a/tex/context/base/core-01d.tex
+++ b/tex/context/base/core-01d.tex
@@ -1,2313 +1,2233 @@
-%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: 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
-
-%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} % niet waterdicht
- {\@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 ADE / HASSELT NL / pragma@pi.net / \jobname.tex}
- {\@@iadatum}
- \egroup}}
-
-\def\simplestelinteractieschermin%
- {\setupinteractionscreens}
-
-\def\stelinteractieschermin%
- {\complexorsimple{stelinteractieschermin}}
-
-%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}
-% {\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}}
-
-% \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
-
-\newif\iflocationmenupermitted
-
-\def\testinteractiemenu#1%
- {\iflocation
- \doifelse{\@@iamenu}{\v!aan}
- {\doifelsevalue{\??am#1\c!status}{\v!start}
- {\global\locationmenupermittedtrue}
- {\global\locationmenupermittedfalse}}
- {\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 !
- \resetgoto
- \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]%
- {\ifx\currentouterreference\empty
- \doifelse{\currentrealreference}{\realfolio}
- {\!!doneafalse}
- {\!!doneatrue}%
- \else
- \!!doneatrue
- \fi
- \if!!donea
- \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
- \else
- \locationdummytrue
- \dosetlocationbox{#1}[#2,\c!dummy=\v!nee]{#3}{\gotolocation{#4}}%
- \fi}
-
-\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]%
- {\donottest\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\effiguur#1%
- {\positioneer(0,0){\naam{#1}}}
-
-\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{}}%
- \naarbox{\copy0}[#4]}
-
-\def\efmark(#1,#2)#3(#4,#5)#6[#7]%
- {\advance\efreference by 1
- \positioneer(#1,#2)
- {\hbox{\the\efreference}}%
- \positioneer(#1,#2)
- {\gotosomeinternal
- {\s!vwb}{#7}{\realfolio}
- {\efdomarker(#4,#5){\v!aan}{\thisissomeinternal{\s!vwa}{#7}}}}}
-
-\def\eftext#1(#2,#3)#4(#5,#6)#7[#8]%
- {\advance\efreference by 1
- \hbox
- {\quad
- \thisissomeinternal{\s!vwb}{#8}%
- \gotosomeinternal
- {\s!vwa}{#8}{\realfolio}
- {\hbox to 1.5em{\the\efreference\presetgoto\hfill}}%
- \quad#1 (#2,#3) (#5,#6) [#8]\hfill}%
- \endgraf}
-
-\def\efthisis(#1,#2)#3[#4]%
- {\efdoarea(#1,#2){#3}{\pagereference[#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.
-
-\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.
-
-% 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
- %\thisisdestination{\syncprefix:\synccounter}%
- \paginareferentie[\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
- %\gotodestination
- % {}{#1}{\syncprefix:##1}{}
- % {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}}%
- \naarbox
- {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}%
- [#1::\syncprefix:##1]}%
- \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}}%
- %\gotodestination
- % {}{##1}{\syncprefix:#1}{0}
- % {\color[\locationcolor\@@bakleur]{\blackrule}}%
- \naarbox %
- {\color[\locationcolor\@@bakleur]{\blackrule}}%
- [#1::\syncprefix:\synccounter]%
- \egroup}
-
-\def\synchronisatiebalk[#1][#2]%
- {\iflocation\ifsynchronisation
- \bgroup
- \stelsynchronisatiebalkin
- [\c!tekst=\getvalue{doc:des:#1},#2]%
- \getvalue{synchronisatie\@@bavariant}[#1]%
- \egroup
- \fi\fi}
-
-%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\doganaareenpagina#1#2#3% nog checken !
- {\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\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\firstpage
- \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\prevpage
- \fi
- \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=.5em]}%
- \ifnum\realpageno<\lastpage\relax
- \doganaareenpagina\??ib\blackrule\nextpage
- \!!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\lastpage}%
- \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%
- {\doganaareenpagina{}{\blackrule[\c!breedte=##1]}}%
- \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}\firstpage
- \hss
- \goto{\!!widtha}\prevpage
- \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=1em]}%
- \goto{\!!widthb}\nextpage
- \hss
- \goto{1em}\lastpage
- \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=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
- {\dostartgoto
- \data
- {\dolocationattributes{\??ia}{#1\presetgoto}}%
- \start
- \dostartgotoprofile
- {\number\buttonwidth}{\number\buttonheight}
- {#2}%
- \stop
- \dostopgotoprofile
- \dostopgoto}%
- \else
- {#1}%
- \fi}
-
-\def\volgprofiel#1[#2]%
- {\iflocation
- \doif{\@@pfoptie}{\v!test}{\pagereference[\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
-%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]}
-
-\newcounter\currentpagetransition
-
-\definecomplexorsimple\stelpaginaovergangenin
-
-\def\simplestelpaginaovergangenin%
- {\complexstelpaginaovergangenin[\pagetransitions]}
-
-\def\complexstelpaginaovergangenin[#1]%
- {\doifsomething{#1}
- {\doifelse{#1}{\v!reset}
- {\let\setpagetransition=\relax}
- {\def\setpagetransition%
- {\doifelse{#1}{\v!willekeurig}
- {\expanded{\getcommalistsize[\pagetransitions]}%
- \getrandomnumber{\currentpagetransition}{1}{\commalistsize}%
- \expanded{\getfromcommalist[\pagetransitions][\currentpagetransition]}}
- {\doglobal\increment\currentpagetransition
- \expanded{\getfromcommalist[#1][\currentpagetransition]}}%
- \ifx\commalistelement\empty
- \doglobal\newcounter\currentpagetransition
- \setpagetransition
- \else\iflocation
- %\message{[\commalistelement]}\wait
- \expanded{\dosetpagetransition{\commalistelement}}%
- \fi\fi}}}}
-
-\prependtoks \setpagetransition \to \everyshipout
-
-% temporary here
-
-%D \startbuffer
-%D \dorecurse{10}
-%D {\horizontalpositionbar
-%D \pos\recurselevel \min1 \max10
-%D \token\framed{\recurselevel}%
-%D \\}
-%D
-%D \hbox to 15em
-%D {\hss
-%D \dorecurse{10}
-%D {\verticalpositionbar\pos\recurselevel\min1\max10\token\blokje\\
-%D \hss}}
-%D \stopbuffer
-
-\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}}
-
-\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=]
-
-\stelpaginaovergangenin
- [\v!reset]
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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: 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
+
+%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
+%I \rul tekst \\ : niet interactief menu item (omlijnd)
+%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\initializepaper%
+% {\iflocation % without screen settings
+% \dosetuppaper
+% {\papierformaat}
+% {\the\papierbreedte}
+% {\the\papierhoogte}%
+% \else
+% \dosetuppaper
+% {\printpapierformaat}
+% {\the\printpapierbreedte}
+% {\the\printpapierhoogte}%
+% \fi}
+
+\def\berekeninteractiescherm%
+ {\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}
+ {\doifelse{\@@scbreedte}{\v!max}
+ {\!!widtha=\printpapierbreedte}
+ {\!!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}
+ {\doifelse{\@@schoogte}{\v!max}
+ {\!!heighta=\printpapierhoogte}
+ {\!!heighta=\@@schoogte}}}
+
+\def\complexstelinteractieschermin[#1]%
+ {\getparameters[\??sc][#1]%
+ \def\initializepaper%
+ {\bgroup
+ \berekeninteractiescherm
+\ifdim \!!widtha>\papierbreedte \papierbreedte=\!!widtha \fi
+\ifdim \!!heighta>\papierhoogte \papierhoogte=\!!heighta \fi
+ \dosetuppaper
+ {\printpapierformaat}
+ {\the\papierbreedte}
+ {\the\papierhoogte}%
+ \egroup}%
+ \def\setupinteractionscreens% met a, b en \number
+ {\bgroup
+ \berekeninteractiescherm
+ \doifelse{\@@scoptie}{\v!max}
+ {\doif{\@@lyplaats}{\v!midden} % werkt niet goed
+ {\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} % niet waterdicht
+ {\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}%
+ \dosetupscreen
+ {\number\rugoffset}{\number\kopoffset}
+ {\number\!!widtha}{\number\!!heighta}
+ {\the\!!counte}%
+ \dosetupidentity
+ {\@@iatitel}
+ {\@@iasubtitel}
+ {\@@iaauteur} % The next line is not to be removed. Copyright!
+ {CONTEXT / PRAGMA ADE / HASSELT NL / pragma@wxs.nl / \jobname.tex}
+ {\@@iadatum}
+ \egroup}}
+
+\def\simplestelinteractieschermin%
+ {\setupinteractionscreens}
+
+\definecomplexorsimple\stelinteractieschermin
+
+%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}
+% {\doinsertbookmark{0}{0}{#2}{\currentrealreference}}{1}
+% {\unknownreference{#1}}%
+% \egroup}
+
+\newif\iftracebookmarks \tracebookmarksfalse
+
+\let\tracebookmarks\tracebookmarkstrue
+
+\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}}%
+ \doifelsenothing{#1}
+ {\global\chardef\currentbookmarklevel=0\relax}
+ {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \ifnum\currentbookmarklevel>\previousbookmarklevel
+ \setxvalue{\@@bookcount\the\currentbookmarklevel}{1}%
+ \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\utilitydonetrue
+ \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}}%
+ \doifelsenothing{#1}
+ {\global\chardef\currentbookmarklevel=0\relax}
+ {\global\chardef\currentbookmarklevel=\getvalue{\@@booklevel#1}\relax}%
+ \ifnum\currentbookmarklevel>\previousbookmarklevel
+ \setxvalue{\@@bookcount\the\currentbookmarklevel}{1}%
+ \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
+ \global\utilitydonetrue
+ \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}}
+
+% \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
+
+\newif\iflocationmenupermitted
+
+\def\testinteractiemenu#1%
+ {\iflocation
+ \doifelse{\@@iamenu}{\v!aan}
+ {\doifelsevalue{\??am#1\c!status}{\v!start}
+ {\global\locationmenupermittedtrue}
+ {\global\locationmenupermittedfalse}}
+ {\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 !
+ \resetgoto
+ \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}\c!letter\c!kleur{#3}}}%
+ \hbox{#4{\copy\locationbox}}}
+
+\def\setlocationboxyes#1[#2]#3[#4]%
+ {\ifx\currentouterreference\empty
+ \ifrealreferencepage\!!doneatrue\else\!!doneafalse\fi
+ %\doifelse{\currentrealreference}{\realfolio}
+ % {\!!doneatrue}{\!!doneafalse}%
+ \else
+ \!!doneafalse
+ \fi
+ \if!!donea
+ \ifcase\getvalue{#1\c!zelfdepagina}\relax
+ \bgroup
+ \locationdummytrue
+ \setevalue{#1\c!kleur}{\getvalue{#1\c!contrastkleur}}%
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!nee]{#3}{\gotolocation{#4}}%
+ \egroup
+ \or
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!ja]{#3}{\gotolocation{#4}}%
+ \or
+ \locationdummyfalse
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!ja]{#3}{\gotolocation{#4}}%
+ \or
+ \locationdummyfalse
+ \global\skippedmenuitemtrue
+ \fi
+ \else
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!nee]{#3}{\gotolocation{#4}}%
+ \fi}
+
+\def\setlocationboxnop#1[#2]#3[#4]%
+ {\ifcase\getvalue{#1\c!onbekendeverwijzing}\relax
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!nee]{#3}{}%
+ \or
+ \locationdummytrue
+ \dosetlocationbox{#1}[#2,\c!leeg=\v!ja]{#3}{}%
+ \or
+ \locationdummyfalse
+ \dosetlocationbox{#1}[#2,\c!leeg=\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\setlocationbox#1[#2]#3[#4]%
+ {\doifreferencepermitedelse{#4}{\getvalue{#1\c!blokkade}}
+ {\setlocationboxyes{#1}[#2]{#3}[#4]}
+ {\setlocationboxnop{#1}[#2]{#3}[#4]}}
+
+%\dolocationattributes{#1}\c!letter\c!kleur{#3}}}%
+
+\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}\relax
+ \ifextendedmenu
+ \setamboxcommands{#1}{#4}%
+ \def\next%
+ {\ignorespaces#2}%
+ \else
+ \def\dolocationcommand##1%
+ {\dosetlocationcommanditem{#1}{#4}{##1}}%
+ \def\next%
+ {\processcommalist[#2]\dolocationcommand}%
+ \fi
+ \next
+ \unskip
+ \getvalue{\??am#1#5}}
+
+\def\setamboxcommands#1#2%
+ {\def\@@amboxcommand##1\\%
+ {\bgroup
+ \leavevmode\ignorespaces##1\unskip\relax
+ \ifskippedmenuitem \else
+ \getvalue{\??am#1#2}%
+ \fi
+ \egroup
+ \ignorespaces}%
+ \def\raw[##1]##2\\%
+ {\@@amboxcommand\naarbox{\ignorespaces##2\unskip}[##1]\\}%
+ \def\but[##1]##2\\%
+ {\@@amboxcommand\setlocationbox{\??am#1}[]{\ignorespaces##2\unskip}[##1]\\}%
+ \def\got[##1]##2\\%
+ {\@@amboxcommand\setlocationbox{\??am#1}[\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces##2\unskip}[##1]\\}%
+ \def\nop##1\\%
+ {\@@amboxcommand\phantom{\localframed[\??am#1][]{}}\\}%
+ \def\txt##1\\%
+ {\@@amboxcommand\localframed[\??am#1][\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces##1\unskip}\\}%
+ \def\rul##1\\%
+ {\@@amboxcommand\localframed[\??am#1][]{\ignorespaces##1\unskip}\\}%
+ \def\com##1\\%
+ {\ignorespaces##1\unskip}}
+
+\def\@@amhbox#1#2#3#4%
+ {\testinteractiemenu{#3}%
+ \iflocationmenupermitted
+ \bgroup
+\showcomposition
+ \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
+\showcomposition
+ \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}}
+
+\unexpanded\def\interactiemenu[#1]%
+ {\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]%
+ \letvalue{\??am#1\c!blokkade}\empty
+ \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!contrastkleur,\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}
+
+\processbetween{\e!interactiemenu}\dostartinteractiemenu
+
+\def\dostartinteractiemenu#1%
+ {\dodostartinteractiemenu#1\dodostopinteractiemenu}
+
+\def\dodostartinteractiemenu[#1]#2\dodostopinteractiemenu%
+ {\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}
+
+\definecomplexorsimple\scherm
+
+%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.
+
+\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}\c!letter\c!kleur{##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.
+
+% Hier volgen de synchronisatiemacro's:
+
+\def\syncprefix{sync}
+\def\syncmarker{syncmark}
+
+%\definieermarkering[\syncmarker]
+%\stelmarkeringin[\syncmarker][\c!expansie=\v!ja]
+
+\newmark\syncmarker
+
+\newcounter\synccounter
+
+\newif\ifsynchronisation
+
+\def\startsynchronisatie%
+ {\iflocation\ifsynchronisation
+ \doglobal\increment\synccounter
+ \fi\fi}
+
+\def\stopsynchronisatie%
+ {\iflocation\ifsynchronisation
+ %\thisisdestination{\syncprefix:\synccounter}%
+ \paginareferentie[\syncprefix:\synccounter]%
+ \ifvmode
+ \@EA\setmark\@EA\syncmarker\@EA{\synccounter} % \marking[\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\c!letter\c!kleur{\strut\@@batekst}}}%
+ \mindermeldingen
+ \def\onder%
+ {\leaders\hrule\!!depth1ex\!!height-.5ex\hfil}%
+ \def\boven##1##2##3%
+ {\dimen0=\wd0
+ \divide\dimen0 by 3
+ \multiply\dimen0 by ##2\relax
+ \dimen2=.25em
+ \advance\dimen0 by -##3\dimen2
+ %\gotodestination
+ % {}{#1}{\syncprefix:##1}{}
+ % {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}}%
+ \naarbox
+ {\hbox to \dimen0{\color[\locationcolor\@@bakleur]{\onder}}}%
+ [#1::\syncprefix:##1]}%
+ \hbox
+ {\def\check##1##2%
+ {\edef##2{0##1\syncmarker}%
+ \ifnum0##2=0 \def##2{1}\fi}%
+ \check\gettopmark\top
+ \check\getfirstmark\first
+ \check\getbotmark\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}}%
+ %\gotodestination
+ % {}{##1}{\syncprefix:#1}{0}
+ % {\color[\locationcolor\@@bakleur]{\blackrule}}%
+ \naarbox %
+ {\color[\locationcolor\@@bakleur]{\blackrule}}%
+ [#1::\syncprefix:\synccounter]%
+ \egroup}
+
+\def\synchronisatiebalk[#1][#2]%
+ {\iflocation\ifsynchronisation
+ \bgroup
+ \stelsynchronisatiebalkin
+ [\c!tekst=\getvalue{doc:des:#1},#2]%
+ \getvalue{synchronisatie\@@bavariant}[#1]%
+ \egroup
+ \fi\fi}
+
+%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\doganaareenpagina#1#2#3% nog checken !
+ {\checkreferences % nodig ??
+ \iflocation
+ \ifnum#3=\realpageno
+ {#2}%
+ \else
+ \doifelsenothing{#1}
+ {\hbox{\gotorealpage{}{}{#3}
+ {#2}}}
+ {\hbox{\gotorealpage{}{}{#3}
+ {\dolocationattributes{#1}\c!letter\c!kleur{#2}}}}%
+ \fi
+ \else
+ {#2}%
+ \fi}
+
+\def\interactiebalka%
+ {\iflocation
+ \bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \setupblackrules[\c!hoogte=\v!max,\c!diepte=\v!max]% maten ??
+ \!!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\firstpage
+ \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\prevpage
+ \fi
+ \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=.5em]}%
+ \ifnum\realpageno<\lastpage\relax
+ \doganaareenpagina\??ib\blackrule\nextpage
+ \!!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\lastpage}%
+ \egroup
+ \fi}
+
+\presetlocalframed[\??ib]
+
+\def\interactiebalkc%
+ {\iflocation
+ \ifnum\lastpage>1
+ \hbox to \@@ibbreedte
+ {\setupblackrules[\c!hoogte=\@@ibhoogte,\c!diepte=\@@ibdiepte]%
+ \def\gotox##1%
+ {\doganaareenpagina{}{\blackrule[\c!breedte=##1]}}%
+ \dimen0=\@@ibbreedte\relax
+ \advance\dimen0 by -4em
+ \!!counta=\lastpage
+ \advance\!!counta by -1
+ \divide\dimen0 by \!!counta
+ \!!counta=\realpageno
+ \advance\!!counta by -1
+ \!!widtha=\!!counta\dimen0\relax
+ \!!countb=\lastpage
+ \advance\!!countb by -\realpageno
+ \!!widthb=\!!countb\dimen0
+ \startcolor[\locationcolor\@@ibkleur]%
+ \gotox{1em}\firstpage
+ \hss
+ \gotox{\!!widtha}\prevpage
+ \color[\@@ibcontrastkleur]{\blackrule[\c!breedte=1em]}%
+ \gotox{\!!widthb}\nextpage
+ \hss
+ \gotox{1em}\lastpage
+ \stopcolor}%
+ \fi
+ \fi}
+
+\def\interactiebalkd%
+ {\iflocation\ifshowingsubpage
+ \ifnum\nofsubpages>1
+ \hbox
+ \bgroup
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \ifbalksymbool % beter: 3 chars assign en 3*box
+ \setupsymbolset[\@@iasymboolset]%
+ \setbox0=\hbox{\symbol[\v!vorige]}%
+ \setbox2=\hbox{\symbol[\v!ergens]}%
+ \setbox4=\hbox{\symbol[\v!volgende]}%
+ \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
+ \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
+ \setupsymbolset[\@@iasymboolset]%
+ \setbox0=\hbox{\symbol[\v!vorige]}%
+ \setbox2=\hbox{\symbol[\v!ergens]}%
+ \setbox4=\hbox{\symbol[\v!volgende]}%
+ \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
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ \noindent
+ \hbox to \@@ibbreedte
+ \bgroup
+ \!!countb=0
+ \loop
+ \advance\!!countb by 1
+ \!!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
+\advance\!!countc by -2
+\!!widtha=-\@@ibafstand
+\!!widtha=\!!countc\!!widtha
+\advance\!!widtha by \@@ibbreedte
+\advance\!!countc by 1
+\divide\!!widtha by \!!countc
+ \ifbalksymbool
+ \setupsymbolset[\@@iasymboolset]%
+ \setbox0=\hbox{\symbol[\v!vorige]}%
+ \setbox4=\hbox{\symbol[\v!ergens]}%
+ \setbox8=\hbox{\symbol[\v!volgende]}%
+ \setbox2=\copy4
+ \setbox6=\copy4
+ \else
+ \setbox0=\hbox
+ {\vrule
+ \!!height\@@ibhoogte
+ \!!depth\@@ibdiepte
+ \!!width\!!widtha}%
+ \setbox4=\copy0
+ \setbox8=\copy0
+ \setbox2=\hbox
+ {\vrule
+ \!!height.5\ht0
+ \!!depth.5\dp0
+ \!!width\!!widtha}%
+ \ht2=\ht0
+ \dp2=\dp0
+ \setbox6=\copy2
+ \fi
+ \def\gotox##1%
+ {\ifnum\teller=\realpageno
+ \color
+ [\@@ibcontrastkleur]
+ {\gotorealpage{}{}{\teller}{\copy##1}}%
+ \else
+ \gotorealpage{}{}{\teller}{\copy##1}%
+ \fi
+ \!!countf=0
+ \hss}%
+ \startcolor[\locationcolor\@@ibkleur]%
+ \!!countc=\realpageno \advance\!!countc by -2
+ \!!countd=\realpageno \advance\!!countd by 2
+ \!!countf=0
+ \for\teller=\firstsubpage\to\lastsubpage\step1\do
+ {\!!doneafalse
+ \advance\!!countf by 1
+ \ifnum\teller=\firstsubpage\relax \!!doneatrue \fi
+ \ifnum\teller=\lastsubpage\relax \!!doneatrue \fi
+ \ifnum\teller>\!!countc \ifnum\teller<\!!countd \!!doneatrue \fi\fi
+ \if!!donea
+ \ifnum\teller<\realpageno
+ \gotox0%
+ \else\ifnum\teller>\realpageno
+ \gotox4%
+ \else
+ \gotox8%
+ \fi\fi
+ \else\ifnum\!!countf=\!!countb
+ \ifnum\teller<\realpageno
+ \gotox2%
+ \else\ifnum\teller>\realpageno
+ \gotox6%
+ \else
+ \gotox4%
+ \fi\fi
+ \fi\fi}%
+ \unskip
+ \stopcolor
+ \egroup
+ \fi
+ \fi\fi}
+
+\def\interactiebalkb%
+ {\ifnum\lastpage>\firstpage\relax
+ \interactiebuttons
+ [\v!eerstepagina,
+ \v!vorigepagina,
+ \v!volgendepagina,
+ \v!laatstepagina]%
+ \fi}
+
+\def\interactiebalkg%
+ {\ifnum\lastsubpage>\firstsubpage\relax
+ \interactiebuttons
+ [\v!eerstesubpagina,
+ \v!vorigesubpagina,
+ \v!volgendesubpagina,
+ \v!laatstesubpagina]%
+ \fi}
+
+\def\checkinteractiebalk#1#2%
+ {\doifnothing{\@@ibhoogte}{\def\@@ibhoogte{#1}}%
+ \doifnothing{\@@ibdiepte}{\def\@@ibdiepte{#2}}}
+
+\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]
+ [ c=>\checkinteractiebalk\v!max\v!max,
+ d=>\checkinteractiebalk{.5em}\!!zeropoint,
+ e=>\checkinteractiebalk{.5em}\!!zeropoint,
+ f=>\checkinteractiebalk{.5em}\!!zeropoint,
+ \s!default=>\checkinteractiebalk\v!ruim\!!zeropoint,
+ \s!unknown=>\checkinteractiebalk\v!ruim\!!zeropoint]%
+ \doifelse{\@@ibsymbool}{\v!ja}
+ {\balksymbooltrue}{\balksymboolfalse}%
+ \getvalue{interactiebalk\@@ibvariant}%
+ \stopinteractie}%
+ \fi
+ \egroup}}
+
+\definecomplexorsimpleempty\interactiebalk
+
+\def\stelinteractiebalkin%
+ {\dodoubleargument\getparameters[\??ib]}
+
+%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.
+
+% TZT initialisatie!
+
+\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
+ {\dostartgoto
+ \data
+ {\dolocationattributes\??ia\c!letter\c!kleur{#1\presetgoto}}%
+ \start
+ \dostartgotoprofile
+ {\number\buttonwidth}{\number\buttonheight}
+ {#2}%
+ \stop
+ \dostopgotoprofile
+ \dostopgoto}%
+ \else
+ {#1}%
+ \fi}
+
+\def\volgprofiel#1[#2]%
+ {\iflocation
+ \doif{\@@pfoptie}{\v!test}{\pagereference[\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
+%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}}
+
+\definecomplexorsimpleempty\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]}
+
+\newcounter\currentpagetransition
+
+\newif\ifrandomtransitions
+
+\def\stelpaginaovergangenin%
+ {\dosingleempty\dostelpaginaovergangenin}
+
+\def\dostelpaginaovergangenin[#1]%
+ {\doglobal\newcounter\currentpagetransition
+ \doifelse{#1}{\v!reset}
+ {\let\setpagetransition\relax}
+ {\let\setpagetransition\setsomepagetransition
+ \doifinsetelse{\v!willekeurig}{#1}
+ {\randomtransitionstrue}{\randomtransitionsfalse}%
+ \edef\userpagetransitions{#1}%
+ \@EA\removefromcommalist\@EA{\v!willekeurig}\userpagetransitions
+ \ifx\userpagetransitions\empty
+ \let\userpagetransitions\pagetransitions
+ \fi}}
+
+\def\setsomepagetransition%
+ {\iflocation
+ \ifrandomtransitions
+ \expanded{\getcommalistsize[\userpagetransitions]}%
+ \getrandomnumber{\currentpagetransition}{1}{\commalistsize}%
+ \else
+ \doglobal\increment\currentpagetransition
+ \fi
+ \expanded{\getfromcommalist[\userpagetransitions][\currentpagetransition]}%
+ \doifnumberelse{\commalistelement}
+ {\expanded{\getfromcommalist[\pagetransitions][\commalistelement]}}
+ {}%
+ \ifx\commalistelement\empty
+ \doglobal\newcounter\currentpagetransition
+ \setsomepagetransition
+ \else
+ \expanded{\dosetpagetransition{\commalistelement}}%
+ \fi
+ \fi}
+
+\prependtoks \setpagetransition \to \everyshipout
+
+% temporary here
+
+%D \startbuffer
+%D \dorecurse{10}
+%D {\horizontalpositionbar
+%D \pos\recurselevel \min1 \max10
+%D \token\framed{\recurselevel}%
+%D \\}
+%D
+%D \hbox to 15em
+%D {\hss
+%D \dorecurse{10}
+%D {\verticalpositionbar\pos\recurselevel\min1\max10\token\blokje\\
+%D \hss}}
+%D \stopbuffer
+
+\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}}
+
+\newbox\commentbox
+
+\def\flushcomments%
+ {\ifvoid\commentbox\else
+ \inmarge{\hbox{\raise\ht\strutbox\box\commentbox}}%
+ \fi}
+
+\def\stelcommentaarin%
+ {\dodoubleargument\getparameters[\??cc]}
+
+\setvalue{\e!start\e!commentaar}% the dummy triple gobbles trailing spaces
+ {\dotripleempty\dostartcommentaar}
+
+\def\dostartcommentaar[#1][#2][#3]%
+ {\bgroup
+ \obeylines
+ \long\def\docommando##1%
+ {\egroup
+ \global\setbox\commentbox=\hbox
+ {\getparameters[\??cc][#2]%
+ \!!widtha=\@@ccbreedte
+ \!!heighta=\@@cchoogte
+ \doinsertcomment
+ {#1}{\number\!!widtha}{\number\!!heighta}{\@@cckleur}{0}{##1}%
+ \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi
+ \box\commentbox}}%
+ \grabuntil{\e!stop\e!commentaar}\docommando}
+
+\def\commentaar%
+ {\dodoubleempty\docommentaar}
+
+\def\docommentaar[#1][#2]#3%
+ {\bgroup
+ \getparameters[\??cc][#2]%
+ \!!widtha=\@@ccbreedte
+ \!!heighta=\@@cchoogte
+ \hbox to \!!zeropoint
+ {\hskip-\@@ccmarge
+ \raise\ht\strutbox\hbox
+ {\doPDFinsertcomment
+ {#1}{\number\!!widtha}{\number\!!heighta}{\@@cckleur}{0}{#3}}}%
+ \egroup
+ \ignorespaces}
+
+% \startcommentaar
+% hello beautiful\\world
+% \stopcommentaar
+%
+% \startcommentaar[hallo]
+% hello \<< \'e\'erste \>>
+% beautiful
+% world
+% \stopcommentaar
+%
+% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
+% hello \<< \'e\'erste \>>
+% beautiful
+% world
+% \stopcommentaar
+%
+% \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
+% hello \<< \'e\'erste \>>
+%
+% beautiful
+%
+% world
+% \stopcommentaar
+
+\definieerinteractiemenu
+ [\v!rechts]
+ [\v!rechts]
+ [\c!voor=,
+ \c!na=\vfil,
+ \c!tussen=\blanko,
+ \c!afstand=\bodyfontsize, % 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=\bodyfontsize, % 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=\bodyfontsize, % 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=\bodyfontsize, % 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!contrastkleur=\@@iacontrastkleur,
+ \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]}
+\def\plaatsboventekstblok {\interactiemenus[\v!boven]}
+\def\plaatsondertekstblok {\interactiemenus[\v!onder]}
+
+\def\plaatsboventekstblok%
+ {\vbox to \bovenhoogte
+ {\getvalue{\??tk\v!boven\v!tekst\c!voor}
+ \interactiemenus[\v!boven]
+ \getvalue{\??tk\v!boven\v!tekst\c!na}
+ \kern\!!zeropoint}}
+
+\def\plaatsondertekstblok%
+ {\vbox to \onderhoogte
+ {\getvalue{\??tk\v!onder\v!tekst\c!voor}
+ \interactiemenus[\v!onder]
+ \getvalue{\??tk\v!onder\v!tekst\c!na}
+ \kern\!!zeropoint}}
+
+\stelinteractieschermin
+ [\c!breedte=\printpapierbreedte,
+ \c!hoogte=\printpapierhoogte,
+ \c!rugoffset=\!!zeropoint,
+ \c!kopoffset=\!!zeropoint,
+ \c!rugwit=\rugwit,
+ \c!kopwit=\kopwit,
+ \c!optie=\c!min]
+
+\stelbuttonsin
+ [\c!status=\v!start,
+ \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=, % these are taken care
+ \c!diepte=, % of at calling time
+ \c!afstand=.5em, % beter relateren aan breedte
+ \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]
+
+\stelprofielenin
+ [\c!optie=]
+
+\stelprogrammasin
+ [\c!gebied=]
+
+\stelpaginaovergangenin
+ [\v!reset]
+
+\stelcommentaarin
+ [\c!marge=2.5em,
+ \c!afstand=1em,
+ \c!breedte=.3\tekstbreedte,
+ \c!hoogte=.2\teksthoogte,
+ \c!kleur=\@@iakleur]
+
+\stelversiesin % beware, @ is made active here,
+ [\c!nummer=1, % therefore we set this one at the end
+ \c!letter=\ss,
+ \c!kleur=]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-01e.tex b/tex/context/base/core-01e.tex
index 70487ec8b..33d54d575 100644
--- a/tex/context/base/core-01e.tex
+++ b/tex/context/base/core-01e.tex
@@ -1,423 +1,422 @@
-%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
+%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% instelbaar maken en slimmer ivm breedte regelnummer !!!!!
+ {\processpreviousparagraphstrue
+ \def\dosetparagraph%
+ {\bgroup
+ \resetparagraphlines
+ \EveryPar
+ {\strut\inlinkermarge{\tf{\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]% tzt snelle \..command.. testen
+ \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
diff --git a/tex/context/base/core-02a.tex b/tex/context/base/core-02a.tex
index a79681138..5340e96a1 100644
--- a/tex/context/base/core-02a.tex
+++ b/tex/context/base/core-02a.tex
@@ -1,191 +1,191 @@
-%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
-
-\let\doemetkontakt=\gobbleoneargument
-
-\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
+%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
+
+\let\doemetkontakt=\gobbleoneargument
+
+\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
diff --git a/tex/context/base/core-02b.tex b/tex/context/base/core-02b.tex
index 7931ae3c2..ea4aa7021 100644
--- a/tex/context/base/core-02b.tex
+++ b/tex/context/base/core-02b.tex
@@ -1,172 +1,171 @@
-%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
+%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
diff --git a/tex/context/base/core-02d.tex b/tex/context/base/core-02d.tex
index 31ab3d236..caa1f7e83 100644
--- a/tex/context/base/core-02d.tex
+++ b/tex/context/base/core-02d.tex
@@ -1,50 +1,49 @@
-%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
+%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
diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex
index 68caa4e04..d64cec8bc 100644
--- a/tex/context/base/core-con.tex
+++ b/tex/context/base/core-con.tex
@@ -1,508 +1,639 @@
-%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
- \let\labellanguage=\currentlanguage
- \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{\setsmallbodyfont\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
-
-\endinput
- \ No newline at end of file
+%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\unknowncharacter{-} % else in lists \relax
+
+\def\character#1%
+ {\ifcase#1\unknowncharacter
+ \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
+ \unknowncharacter
+ \fi}
+
+\def\Character#1%
+ {\ifcase#1\unknowncharacter
+ \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
+ \unknowncharacter
+ \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%
+ {\ifnum#2>26
+ \bgroup
+ \!!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
+ \egroup
+ \else
+ #1{#2}% pure expansion, used in references
+ \fi}
+
+\def\characters%
+ {\doconvertcharacters\character}
+
+\def\Characters%
+ {\doconvertcharacters\Character}
+
+%D \macros
+%D {greeknumerals,Greeknumerals}
+%D
+%D Why should we only honour the romans, and not the greek?
+
+\def\greeknumerals#1% watch the \normalxi
+ {\mathematics
+ {\ifcase#1\unknowncharacter\or
+ \alpha\or\beta\or\gamma\or\delta\or\varepsilon\or
+ \zeta\or\eta\or\theta\or\iota\or\kappa\or\lambda\or
+ \mu\or\nu\or\normalxi\or o\or\pi\or\varrho\or\sigma\or
+ \tau\or\upsilon\or\phi\or\chi\or\psi\or\omega
+ \else
+ \unknowncharacter
+ \fi}}
+
+\def\Greeknumerals#1%
+ {\mathematics
+ {\ifcase#1\unknowncharacter \or
+ A\or B\or\Gamma\or\Delta\or E\or Z\or H\or\Theta\or
+ I\or K\or\Lambda\or M\or N\or\Xi\or O\or\Pi\or P\or
+ \Sigma\or T\or\Upsilon\or\Phi\or X\or\Psi\or\Omega
+ \else
+ \unknowncharacter
+ \fi}}
+
+%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##1{##1}} % was \relax
+ %{\def\doconvertcharacters##1{\ifcase0##1 0\else##1\fi}} more save
+
+%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 {getdayoftheweek, 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:
+
+\newcount\normalweekday
+
+\def\getdayoftheweek#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
+ \@EA\egroup\@EA\normalweekday\the\!!counta\relax}
+
+\def\dayoftheweek#1#2#3%
+ {\getdayoftheweek{#1}{#2}{#3}\doconvertday{\normalweekday}}
+
+%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 friday: \dayoftheweek {1} {1} {2000}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \startvoorbeeld
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D \stopvoorbeeld
+%D
+%D The macro \type {\getdayoftheweek} can be used to calculate
+%D the number \type {\normalweekday}.
+
+%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 {doifleapyearelse,
+%D getdayspermonth}
+%D
+%D Sometimes we need to know if we're dealing with a
+%D leapyear, so here is a testmacro:
+%D
+%D \starttypen
+%D \doifleapyearelse{year}{yes}{no}
+%D \stoptypen
+%D
+%D An example of its use can be seen in the macro
+%D
+%D \starttypen
+%D \getdayspermonth{year}{month}
+%D \stoptypen
+%D
+%D The number of days is available in the macro \type
+%D {\numberofdays}.
+
+\def\doifleapyearelse#1#2#3%
+ {\bgroup
+ \!!doneafalse
+ \!!counta=#1%
+ \DoMod\!!counta by4to\!!countb
+ \ifnum\!!countb=0
+ \DoMod\!!counta by100to\!!countb
+ \ifnum\!!countb=0 \else \!!doneatrue \fi
+ \DoMod\!!counta by400to\!!countb
+ \ifnum\!!countb=0 \!!doneatrue \fi
+ \fi
+ \if!!donea
+ \egroup\def\next{#2}%
+ \else
+ \egroup\def\next{#3}%
+ \fi
+ \next}
+
+\def\getdayspermonth#1#2%
+ {\doifleapyearelse{#1}
+ {\def\numberofdays{29}}
+ {\def\numberofdays{28}}%
+ \edef\numberofdays%
+ {\ifcase#2 \or31\or\numberofdays\or31\or30\or
+ 31\or30\or31\or31\or30\or31\or30\or31\fi}}
+
+%D \macros
+%D {currentdate, date}
+%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}).
+%D
+%D \showsetup{\y!currentdate}
+%D
+%D \startbuffer
+%D \date
+%D \date[d=12,m=12,y=1998][weekdag]
+%D \date[d=12,m=12,y=1998]
+%D \stopbuffer
+%D
+%D We can also typeset arbitrary dates, using the previous
+%D command.
+%D
+%D \typebyffer
+%D
+%D The date is specified by one character keys. When no date
+%D is given, we get the current date.
+%D
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+
+\def\complexcurrentdate[#1]%
+ {\bgroup
+ \let\labellanguage=\currentlanguage
+ \def\betweendates{\let\betweendates\space}%
+ \processallactionsinset
+ [#1]
+ [ dd=>\ifnum\normalday>9 \else0\fi\the\normalday,
+ mm=>\ifnum\normalmonth>9 \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,
+ w=>\betweendates\dayoftheweek\normalday\normalmonth\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
+
+\def\dodate[#1][#2]%
+ {\bgroup
+ \iffirstargument
+ \getparameters[\??da][d=\normalday,m=\normalmonth,y=\normalyear,#1]%
+ \normalday =\@@dad\relax
+ \normalmonth=\@@dam\relax
+ \normalyear =\@@day\relax
+ \ifsecondargument
+ \currentdate[#2]%
+ \else
+ \currentdate
+ \fi
+ \else
+ \currentdate
+ \fi
+ \egroup}
+
+\def\date%
+ {\dodoubleempty\dodate}
+
+%D Because we're dealing with dates, we also introduce a few
+%D day loops:
+%D
+%D \starttypen
+%D \processmonth{year}{month}{command}
+%D \processyear{year}{command}{before}{after}
+%D \stoptypen
+%D
+%D The counters \type {\normalyear}, \type {\normalmonth} and
+%D \type{\normalday} can be used for for date manipulations.
+
+\long\def\processmonth#1#2#3% year month command
+ {\bgroup
+ \getdayspermonth{#1}{#2}%
+ \dostepwiserecurse{1}{\numberofdays}{1}
+ {\normalyear =#1\relax
+ \normalmonth=#2\relax
+ \normalday =\recurselevel\relax
+ #3}%
+ \egroup}
+
+\def\lastmonth{12} % can be set to e.g. 1 when testing
+
+\long\def\processyear#1#2#3#4% year command before after
+ {\bgroup
+ \dorecurse{\lastmonth}
+ {\normalyear =#1\relax
+ \normalmonth=\recurselevel\relax
+ #3\processmonth{\normalyear}{\normalmonth}{#2}#4}%
+ \egroup}
+
+%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}}
+
+\def\doifconversiondefinedelse#1%
+ {\doifdefinedelse{\??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. Symbols are implemented
+%D in another module.
+
+\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 [g] [\greeknumerals]
+\defineconversion [G] [\Greeknumerals]
+
+\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 [\v!grieks] [\greeknumerals]
+\defineconversion [\v!Grieks] [\Greeknumerals]
+
+% Some bonus ones:
+
+\defineconversion [\v!leeg] [\gobbleoneargument]
+\defineconversion [\v!geen] [\numbers]
+
+\defineconversion
+ [set 0]
+ [{\symbool[1]},{\symbool[2]},{\symbool[3]},{\symbool[4]},
+ {\symbool[5]},{\symbool[6]},{\symbool[7]},{\symbool[8]}]
+
+\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
+
+\endinput
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
new file mode 100644
index 000000000..517e5d7e3
--- /dev/null
+++ b/tex/context/base/core-fig.tex
@@ -0,0 +1,1295 @@
+% figurefilemode checken
+% zowieso alles checken
+% movie scanner
+
+%D \module
+%D [ file=core-fig,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Figure 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.
+
+\writestatus{loading}{Context Core Macros / Figure Inclusion}
+
+\unprotect
+
+%D Scanning for illustrations is automated to the max. Right
+%D from the beginning \CONTEXT\ supported figure inclusion
+%D using a dedicated figure directory file. Apart from the fact
+%D that such a file enables us to include graphics that cannot
+%D be parsed by \TEX\ for dimensions, by using this file we can
+%D also quite easily generate figure directories. Only when
+%D \PDFTEX\ started offering \PDF\ inclusion, I felt the need
+%D to automate dimension detection to a higher degree.
+%D Fortunately \TEXUTIL\ can scan more types now as well as
+%D that we can run \TEXUTIL\ from within \TEX.
+
+\startmessages dutch library: figures
+ title: figuren
+ 1: figuur -- is niet te vinden
+ 2: figuur -- wordt niet preset
+ 3: maten van figuur -- geleend van --
+ 4: maten van -- geladen uit figuurfile zelf
+ 5: maten van -- geladen uit figuurfile --
+ 6: maten van -- berekend door TeXUtil
+ 7: figuurfile -- moet opnieuw worden aangemaakt
+ 8: figuurobject -- wordt opnieuw gebruikt
+ 9: suffix -- bij figuur -- wordt niet afgehandeld
+\stopmessages
+
+\startmessages english library: figures
+ title: figures
+ 1: figure -- can not be found
+ 2: figure -- is not preset
+ 3: dimensions of figure -- borrowed from --
+ 4: dimensions of -- loaded from figurefile itself
+ 5: dimensions of -- loaded from figurefile --
+ 6: dimensions of -- calculated by TeXUtil
+ 7: you have to regenerate figure file --
+ 8: figureobject -- is reused
+ 9: suffix -- by figure -- is not handled
+\stopmessages
+
+% TOBIAS: watch my funny german extensions
+
+\startmessages german library: figures
+ title: figures
+ 1: Abbildung -- kann nicht gefunden werden
+ 2: Abbildung -- wird nicht erstellt
+ 3: Dimensionen von -- genomen von --
+ 4: Dimensionen von -- geladen von Abbildungsdatei selbst
+ 5: Dimensionen von -- geladen von Abbildungsdatei --
+ 6: Dimensionen von -- ausgerechnet durch TeXUtil
+ 7: Sie brauchen eine neu Abbildungsdatei -- zu erstellen
+ 8: Abbildungobject -- ist herbraucht
+ 9: suffix -- by figure -- is not handled
+\stopmessages
+
+%D Due to the mere fact that \DVI/\PDF\ drivers differ in their
+%D needs for figure dimensions, we have to provide the width,
+%D height, horizontal and vertical scale. Also we want to
+%D specify at the user level either width and/or height, scale,
+%D or a factor related to the current document bodyfont size.
+%D Even better: we can also specify isometric scaling and
+%D automatically let \CONTEXT\ calculate the maximum possible
+%D dimensions. Whatever we calculate, the results will come
+%D available in the next registers.
+
+\newcount \figxsca
+\newcount \figysca
+\newdimen \fighei
+\newdimen \figwid
+
+%D Because looking for dimensions can take many steps (locating
+%D the figure, maybe on more directories, scanning the figure
+%D on dimension, or when not found, trying to find them in the
+%D utility file, and again when not found, trying to generate
+%D such a file, and, as a last resort, trying to use the
+%D dimensions. Now when things do not work out the way we want,
+%D we can set a switch and get some information on what takes
+%D place.
+
+\newif\iftraceexternalfigures % \traceexternalfigurestrue
+
+\let\traceexternalfigures \traceexternalfigurestrue
+
+%D Another switch tells \CONTEXT\ to locate and calculate a
+%D figure, but does not actually insert it. Especially when we
+%D use \PDFTEX\ this saves a lot of time on trialruns. (Keep
+%D in mind that \PDFTEX\ is both a \TEX\ pre|| and postcessor.)
+
+\newif\ifskipexternalfigures % \skipexternalfigurestrue
+
+%D A last switch inhibits running \TEXUTIL. Lets do it when
+%D possible.
+
+\newif\ifrunutilityfile % \runutilityfiletrue
+
+%D When I ever decide to change the format of the figure
+%D directory file that \TEXUTIL\ produces, the next number
+%D needs to be changed.
+
+\edef\figureversion{1996.06.01}
+
+%D We keep track of the current state by setting a variable
+%D which value is related to the method that provided the
+%D dimensions.
+
+\chardef\figurefilemode=0
+
+%D The next values are set:
+%D
+%D \startopsomming[opelkaar]
+%D \sym 0 the dimensions are not found
+%D \sym 1 the dimensions are not preset at all
+%D \sym 2 the dimensions are taken from other
+%D \sym 3 the dimensions are taken from figure
+%D \sym 4 the dimensions are taken from texutil.tuf
+%D \sym 5 the dimensions are generated by texutil.tmp
+%D \stopopsomming
+%D
+%D In our search for the right file, that is, when no
+%D filetype is specified, we scan for the next set of files.
+%D As one can see, we prefer outlines over bitmaps.
+
+\def\figuretypes%
+ {\c!eps,\c!mps,\c!pdf,\c!png,\c!jpg,\c!tif} % ,\c!tex,\c!tmp} % \c!mov
+
+%D Instead of using a comma separated list, we could have use a
+%D faster alternative, but the current implementation is not
+%D that slow either.
+%D
+%D Sorry for those who want to understand every bit, but I
+%D will only sparse comment on the next macros. These macros
+%D evolved out of the original macros and thereby lost all of
+%D their beauty.
+%D
+%D We save the progess state in a macro. The main reason for
+%D this is that otherwise the log would end up intermingled
+%D with \TEX's hard coded file loading messages and launching
+%D \TEXUTIL.
+
+\def\@@eftrace#1%
+ {\iftraceexternalfigures
+ \edef\externalfigurelog{\externalfigurelog[#1]\space}%
+ \fi}
+
+\def\analyzefigurefiles%
+ {\let\externalfigurelog\empty
+ \let\@@efcurrenttype\empty
+ \let\@@efcurrentpath\empty
+ \let\@@efcurrentfile\empty
+ \doanalyzefigurefiles\doanalyzefigurefilesA
+ \doanalyzefigurefiles\doanalyzefigurefilesB
+ \doanalyzefigurefiles\doanalyzefigurefilesC}
+
+%D The previous macro suggests that there are three main
+%D methods applied. First we pass over all types and
+%D directories specified and as soon as we find a suitable
+%D candidate, we try to find its dimensions. When we cannot in
+%D any way find the dimensions, directly, using the utility
+%D file, or using \TEXUTIL\ directly, we revert to the second
+%D method, and make a pass over all utility files. The last
+%D method scans the utility files for files with the same name,
+%D but different type.
+
+\def\doanalyzefigurefiles#1%
+ {\let\dodododoanalyzefigurefiles=#1%
+ \processcommacommand[\@@eftype]\dodoanalyzefigurefiles}
+
+\def\dodoanalyzefigurefiles#1%
+ {\ifcase\figurestatus
+ \def\@@efcurrenttype{#1}%
+ \processcommacommand[\@@ex@@gebied]\dododoanalyzefigurefiles
+ \fi}
+
+\def\dododoanalyzefigurefiles#1%
+ {\ifcase\figurestatus
+ \def\@@efcurrentpath{#1}%
+ \doiffileinsertionsupportedelse{\@@efcurrenttype}
+ {\edef\@@efcurrentfile%
+ {\@@efcurrentpath/\@@effilename.\figureextension{\@@efcurrenttype}}%
+ \dodododoanalyzefigurefiles}
+ {}%
+ \fi}
+
+%D Here is our first method: we scan the file directly, parse
+%D the utility file next, and finaly run \TEXUTIL. The latter
+%D two of course only take place when the first scan fails.
+
+\def\doanalyzefigurefilesA%
+ {\doiffileelse{\@@efcurrentfile}
+ {\getfiguredimensionsA
+ \getfiguredimensionsB
+ \getfiguredimensionsC}
+ {}}
+
+%D It is possible to let \TEX\ determine the dimensions itself.
+%D The next macro shows how such a test is implemented. The
+%D special driver \type {supp-tpd} shows some more.
+
+%D The check on extension prevente problems when drivers are
+%D not loaded well, in which case the tex one comes first.
+
+\def\dogetfiguresizetex#1#2#3#4#5%
+ {\ifx\@@efextension\c!tex \else \ifx\@@efextension\c!tmp \else
+ \doifnumberelse{\@@efextension}
+ {\executedfalse}
+ {\ExpandBothAfter\doifinset{\@@efextension}{\figuretypes}
+ {\executedfalse}}%
+ \fi \fi
+ \ifexecuted
+ \global\setbox\foundexternalfigure=\vbox
+ {\forgetall
+ \startreadingfile
+ \readfile{#1}{}{}%
+ \stopreadingfile}%
+ \global\setbox\foundexternalfigure=\hbox
+ {\raise\dp\foundexternalfigure\box\foundexternalfigure}%
+ #2=\!!zeropoint
+ #3=\!!zeropoint
+ #4=\wd\foundexternalfigure
+ #5=\ht\foundexternalfigure
+ \fi}
+
+\let\dogetfiguresizetmp\dogetfiguresizetex
+
+%D Here we start scanning the other types:
+
+\def\getfiguredimensionsA%
+ {\ifcase\figurestatus
+ \@@eftrace{analyzing \@@efcurrentfile\space as \@@efcurrenttype}%
+ \!!widthb=\!!zeropoint
+ \executeifdefined{dogetfiguresize\@@efcurrenttype}\gobblefivearguments
+ {\@@efcurrentfile}{\!!widtha}{\!!heighta}{\!!widthb}{\!!heightb}%
+% new from here
+ \ifdim\!!widtha=\!!zeropoint\relax\ifdim\!!heighta=\!!zeropoint\relax
+ \ifdim\!!widthb=\!!zeropoint\relax\ifdim\!!heightb=\!!zeropoint\relax
+ \executedfalse % nothing decent found
+ \fi\fi
+ \fi\fi
+ \ifexecuted\ifx\@@efcurrenttype\c!mps\ifcase\EPScreator
+ \executedfalse % searching for mps, eps found, but no valid mps
+ \fi\fi\fi
+% until here
+ \ifexecuted
+ \chardef\figurestatus=3
+ \ifx\@@efcurrenttype\c!eps
+ \ifcase\EPScreator
+ \@@eftrace{found}%
+ \else
+ \let\@@efcurrenttype\c!mps
+ \@@eftrace{mps found}%
+ \fi
+ \else
+ \@@eftrace{found}%
+ \fi
+ \geteparameters % e !
+ [\??ep]
+ [\c!x=\the\!!widtha,\c!y=\the\!!heighta,
+ \c!w=\the\!!widthb,\c!h=\the\!!heightb]%
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile
+ \else
+ \@@eftrace{not found}%
+ \fi
+ \fi}
+
+\def\dogetfiguresizepdf{\dogetPDFmediabox}
+\def\dogetfiguresizeeps{\dogetEPSboundingbox}
+\def\dogetfiguresizemps{\dogetEPSboundingbox}
+
+\def\getfiguredimensionsB%
+ {\ifcase\figurestatus\ifcase\figurefilemode\else
+ \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ \edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
+ \pushendofline
+ \let\presetfigure=\presetfigureA
+ \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}%
+ \fi\fi}
+
+\def\presetfigureA[#1][#2]%
+ {\ifcase\figurestatus
+ \@EA\DOIF\@EA{\@@effilenametype}{#1} % hm, tzt ook nog eens met pad/naam
+ {\getparameters[\??ep][#2]%
+ \ExpandBothAfter\doif{\@@epe}{\@@efcurrenttype}
+ {\chardef\figurestatus=4
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile}}%
+ \else
+ \endinput
+ \fi}
+
+\def\getfiguredimensionsC%
+ {\ifcase\figurestatus\ifrunutilityfile\ifcase\figurefilemode\else
+ \doiffileelse{\@@efcurrentfile}
+ {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}%
+ \@@eftrace{running texutil on \@@effilenametype}%
+ \def\@@efloadname{\f!utilityfilename.\f!temporaryextension}%
+ \executesystemcommand
+ {texutil --fig --out=\@@efloadname\space\@@effilenametype}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
+ \pushendofline
+ \let\presetfigure=\presetfigureB
+ \readsetfile{.}{\@@efloadname}\relax\relax
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}}
+ {}%
+ \fi\fi\fi}
+
+\def\presetfigureB[#1][#2]%
+ {\getparameters[\??ep][#2]%
+ \chardef\figurestatus=6 % ??????????????????
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile}
+
+%D The second pass over types and directories uses the
+%D utilility files.
+
+\def\doanalyzefigurefilesB%
+ {\ifcase\figurestatus\ifcase\figurefilemode\else
+ \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ \edef\@@effilenametype{\@@effilename.\figureextension{\@@efcurrenttype}}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}%
+ \pushendofline
+ \let\presetfigure=\presetfigureC
+ \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}%
+ \fi\fi}
+
+\def\presetfigureC[#1][#2]%
+ {\ifcase\figurestatus
+ \@EA\DOIF\@EA{\@@effilenametype}{#1}
+ {\getparameters[\??ep][#2]%
+ \doif{\@@epe}{\@@efcurrenttype}
+ {\chardef\figurestatus=4
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile}}%
+ \else
+ \endinput
+ \fi}
+
+%D The last and third pass mainly differs from the second in
+%D being more tolerant.
+
+\def\doanalyzefigurefilesC%
+ {\ifcase\figurestatus\ifcase\figurefilemode\else
+ \def\@@efloadname{\@@efcurrentpath/\@@exfile}%
+ \@@eftrace{analyzing \@@efloadname\space on \@@effilename.* surrogate}%
+ \pushendofline
+ \let\presetfigure=\presetfigureD
+ \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}%
+ \fi\fi}
+
+\def\presetfigureD[#1][#2]%
+ {\ifcase\figurestatus
+ \@EA\DOIFINSTRINGELSE\@EA{\@@effilename.}{#1}
+ {\getparameters[\??ep][#2]%
+ \ExpandBothAfter\doifinsetelse{\@@epe}{\@@efcurrenttype}
+ {\chardef\figurestatus=4
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile}
+ {}}
+ {}%
+ \else
+ \endinput
+ \fi}
+
+%D While loading the utlity file (often \type {texutil.tuf})
+%D the next command (when present) aborts reading when the
+%D versions don't match.
+
+\def\thisisfigureversion#1%
+ {\doifnot{\figureversion}{#1}
+ {\showmessage{\m!figures}{7}{\@@efloadname}\endinput}}
+
+%D Some files, take for instance movies, cannot easilly be
+%D parsed on dimensions, that is, not yet. Although the current
+%D mechanism has no problems with this, as long as the user
+%D specified width and height reflect the right aspect ratio.
+%D Nevertheless, when one does not want any scanning done, one
+%D can disable \type{preset}. When no preset is needed, we only
+%D locate the file.
+
+\def\locatepresetfigurefiles%
+ {\processcommacommand[\@@eftype]\dolocatepresetfigurefiles}
+
+\def\dolocatepresetfigurefiles#1%
+ {\def\@@efcurrenttype{#1}%
+ \processcommacommand[\@@ex@@gebied]\dodolocatepresetfigurefiles}
+
+\def\dodolocatepresetfigurefiles#1%
+ {\ifcase\figurestatus
+ \doiffileinsertionsupportedelse{\@@efcurrenttype}
+ {\edef\@@efcurrentfile%
+ {#1/\@@effilename.\figureextension{\@@efcurrenttype}}%
+ \@@eftrace{only searching for \@@efcurrentfile}%
+ \doiffileelse{\@@efcurrentfile}
+ {\chardef\figurestatus=1
+ \let\@@eftype\@@efcurrenttype
+ \let\@@effullname\@@efcurrentfile}
+ {}}
+ {}%
+ \fi}
+
+%D All these macros are in some way called by the macro \type
+%D {\analyzefigurefiles}, which in turn is called by the next
+%D macro.
+
+% bools gebruiken
+
+\def\setnaturalfiguresize%
+ {\doifsomething{\@@efbreedte}
+ {\figwid=\@@efbreedte}%
+ \doifsomething{\@@efhoogte}
+ {\fighei=\@@efhoogte}%
+ \doifsomething{\@@efschaal}
+ {\figxsca=\@@efschaal
+ \figysca=\@@efschaal}}
+
+\def\setfactorfiguresize%
+ {\doifinsetelse{\@@effactor}{\v!max,\v!passend,\v!ruim}
+ {\doapplyfiguresize
+ \ifdim\@@epw>\@@eph\relax
+ \docalculatefigurenorm\figwid\@@effactor\@@efbreedte\hsize\@@efhsize
+ \docalculatefigurescales\figwid\@@epw\fighei\@@eph
+ \else
+ \docalculatefigurenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatefigurescales\fighei\@@eph\figwid\@@epw
+ \fi
+ \!!doneatrue}
+ {\doifinsetelse{\@@efhfactor}{\v!max,\v!passend,\v!ruim}
+ {\doapplyfiguresize
+ \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatefigurescales\fighei\@@eph\figwid\@@epw
+ \!!doneatrue}
+ {\doifinsetelse{\@@efbfactor}{\v!max,\v!passend,\v!ruim}
+ {\doapplyfiguresize
+ \docalculatefigurenorm\figwid\@@efbfactor\@@efbreedte\hsize\@@efhsize
+ \docalculatefigurescales\figwid\@@epw\fighei\@@eph
+ \!!doneatrue}
+ {\docalculatefigurenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize
+ \docalculatefigurenorm\figwid\@@efbfactor\@@efbreedte\hsize\hsize
+ \!!doneafalse}}}%
+ \if!!donea
+ \ifdim\figwid>\@@efhsize\relax
+ \global\fighei=\!!zeropoint\relax
+ \global\figwid=\@@efhsize\relax
+ \else\ifdim\fighei>\@@efvsize\relax
+ \global\fighei=\@@efvsize\relax
+ \global\figwid=\!!zeropoint\relax
+ \fi\fi
+ \fi}
+
+\def\setscalefiguresize%
+ {\doifsomething{\@@efschaal}
+ {\doapplyfigurescale\figwid\@@epw\figxsca
+ \doapplyfigurescale\fighei\@@eph\figysca
+ \global\figwid=\!!zeropoint
+ \global\fighei=\!!zeropoint
+ \doifelsenothing{\@@efbreedte}
+ {\doifsomething{\@@efhoogte}
+ {\ifdim\@@eph>\@@efhoogte
+ \global\fighei=\@@efhoogte
+ \fi}}
+ {\ifdim\@@epw>\@@efbreedte
+ \global\figwid=\@@efbreedte
+ \fi}}}
+
+\def\setdimensionfiguresize%
+ {\ifdim\figwid>\!!zeropoint\relax
+ \ifdim\fighei>\!!zeropoint\relax
+ \docalculatefigurescale\fighei\@@eph\figysca
+ \docalculatefigurescale\figwid\@@epw\figxsca
+ \else
+ \docalculatefigurescales\figwid\@@epw\fighei\@@eph
+ \fi
+ \else
+ \ifdim\fighei>\!!zeropoint\relax
+ \docalculatefigurescales\fighei\@@eph\figwid\@@epw
+ \else
+ \doapplyfigurescale\figwid\@@epw\figxsca
+ \doapplyfigurescale\fighei\@@eph\figysca
+ \fi
+ \fi}
+
+\def\setupexternalfigures%
+ {\dosingleempty\dosetupexternalfigures}
+
+\def\dosetupexternalfigures[#1]%
+ {\getparameters[\??ex][#1]%
+ \doifelsenothing{\@@explaats}
+ {\scratchcounter=3 }
+ {\doifelsenothing{\@@exfile}
+ {\scratchcounter=3 }
+ {\scratchcounter=0
+ \ExpandBothAfter\doifinset{\v!lokaal}{\@@explaats}
+ {\advance\scratchcounter by 1 }%
+ \ExpandBothAfter\doifinset{\v!globaal}{\@@explaats}
+ {\advance\scratchcounter by 2 }}}%
+ \chardef\figurefilemode=\scratchcounter}
+
+\def\docalculatefigurenorm#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\docalculatefigurescales#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\docalculatefigurescale#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\doapplyfigurescale#1#2#3%
+ {#1=#2\relax
+ \ifcase0\@@efschaal\relax#3=\!!thousand\else#3=\@@efschaal\fi\relax
+ \divide#1 by \!!thousand\relax
+ \multiply#1 by #3\relax}
+
+\def\doapplyfiguresize%
+ {\ifinner
+ \teksthoogte=\vsize
+ \scratchdimen=\teksthoogte
+ \else
+ \ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal<\pagegoal
+ \scratchdimen=\pagegoal
+ \advance\scratchdimen by -\pagetotal
+ \else
+ \scratchdimen=\teksthoogte
+ \fi
+ \else
+ \scratchdimen=\teksthoogte
+ \fi
+ \fi
+ \doifelsenothing{\@@efhoogte}
+ {\edef\@@efvsize{\the\scratchdimen}}
+ {\let\@@efvsize=\@@efhoogte}%
+ \doifelsenothing{\@@efbreedte}
+ {\edef\@@efhsize{\the\hsize}}
+ {\let\@@efhsize=\@@efbreedte}}
+
+\def\convertfigureinsertscale#1#2#3#4%
+ {\scratchdimen=#1\relax
+ %\advance\scratchdimen by .0005pt
+ \divide\scratchdimen by \!!thousand
+ \multiply\scratchdimen by #3\relax
+ \scratchdimen=-\scratchdimen % beter hier - dan in driver
+ \edef#2{\number\scratchdimen}%
+ \scratchdimen=#3pt
+ \divide\scratchdimen by \!!ten
+ \edef#4{\@EA\withoutpt\@EA{\the\scratchdimen}}}
+
+\newbox\foundexternalfigure
+
+\def\presetfiguremov%
+ {\let\@@eftype \c!mov
+ \let\@@efextension \c!mov
+ \let\@@efobject \v!nee
+ \let\@@efpreset \v!nee
+ \ifx\@@efbreedte\empty\def\@@breedte{4cm}\fi
+ \ifx\@@efhoogte \empty\def\@@hoogte {3cm}\fi}
+
+\def\calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
+ {\mindermeldingen
+ \global\setbox\foundexternalfigure=\box\voidb@x
+ \beforesplitstring#3\at.\to\@@effilename
+ \aftersplitstring #3\at.\to\@@efextension
+ \restorecatcodes % recently added; we presume local use
+ \def\@@eflabel{#2}%
+ \global\let\externalfigurelog\empty
+ \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!symbool=\v!nee,
+ \c!object=\@@exobject,\c!preset=\v!ja,\c!preview=\v!nee,
+ \c!schaal=,\c!breedte=,\c!hoogte=,
+ \c!factor=,\c!hfactor=,\c!bfactor=,
+ \c!achtergrond=,\c!achtergrondkleur=,\c!achtergrondraster=\@@rsraster,
+ \c!hoek=,\c!straal=.5\korpsgrootte,\c!kader=\v!uit]%
+ \ifx\@@efextension\c!mov \presetfiguremov \fi
+ #1[#4][#5][#6]%
+ \processaction
+ [\@@efextension]
+ [\c!tex=>\let\@@eftype\c!tex,
+ \c!tmp=>\let\@@eftype\c!tex,
+ \c!mov=>\presetfiguremov]%
+\edef\figuretypes{\c!tex,\figuretypes}%
+ \doifelse{\@@efobject}{\v!nee}
+ {\donefalse}
+ {\doifspecialavailableelse\dostartscaling
+ {\doifobjectssupportedelse
+ {\edef\@@efobjectname{#3-\@@eftype}%
+ \doifobjectfoundelse{FIG}{\@@efobjectname}{\donetrue}{\donefalse}}
+ {\donefalse}}
+ {\donefalse}}%
+ \ifx\@@effilename\jobname
+ \@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes
+ \let\@@efextension=\empty
+ \showmessage{\m!figures}{9}{\@@effilename,\jobsuffix}%
+ \donefalse
+ \fi
+ \ifdone
+ \getobjectdimensions{FIG}{\@@efobjectname}%
+ \geteparameters % e !
+ [\??ep]
+ [\c!x=\!!zeropoint,\c!y=\!!zeropoint,
+ \c!w=\objectwidth,\c!h=\objectheight]%
+ \chardef\figurestatus=5
+ \def\@@effullname{#3}%
+ \else
+ \doifelse{#2}{\s!figurepreset}
+ {\def\figureextension##1{\@@efextension}%
+ \edef\@@effullname{#3}}%
+ {\ifx\@@efextension\empty
+ \dogetcommacommandelement1\from\@@eftype\to\commalistelement
+ \edef\@@effullname{\@@effilename.\commalistelement}%
+ \def\figureextension##1{##1}%
+ \else
+ \@EA\doifnumberelse\@EA{\@@efextension}
+ {\def\@@eftype{\c!mps}}{}%
+ \edef\@@effullname{\@@effilename.\@@efextension}%
+ \def\figureextension##1{\@@efextension}%
+ \fi}%
+ \ifcase\figurefilemode
+ \def\@@ex@@gebied{.}%
+ \or
+ \def\@@ex@@gebied{.}%
+ \or
+ \let\@@ex@@gebied\@@exgebied
+ \or
+ \edef\@@ex@@gebied{.\ifx\@@exgebied\empty\else,\fi\@@exgebied}%
+ \fi
+ \doifelse{\@@efpreset}{\v!nee}
+ {\doifelse{\@@eftype}{\s!unknown}
+ {\chardef\figurestatus=0
+ \let\@@eftype=\figuretypes
+ \locatepresetfigurefiles}
+ {\chardef\figurestatus=1 }}
+ {\doifelse{\@@eftype}{\s!unknown}
+ {\let\@@eftype=\figuretypes}
+ {\@EA\removefromcommalist\@EA{\@@eftype}\figuretypes
+ \edef\@@eftype{\ifx\@@eftype\empty\else\@@eftype,\fi\figuretypes}}%
+ \ifx\@@efextension\empty\else
+ \ExpandBothAfter\doifinsetelse{\@@efextension}{\@@eftype}
+ {\@EA\removefromcommalist\@EA{\@@efextension}\@@eftype
+ \edef\@@eftype{\@@efextension,\@@eftype}}%
+ {}%
+ \fi
+ \doifelse{#2}{\s!figurepreset}
+ {\chardef\figurestatus=4
+ \def\@@efloadname{./\@@exfile}%
+ \let\@@eftype=\@@epe}
+ {\chardef\figurestatus=0
+ \analyzefigurefiles}}%
+ \let\@@epe=\@@eftype
+ \edef\@@efextension{\figureextension{\@@eftype}}% dirty trick
+ \figwid=\!!zeropoint \fighei=\!!zeropoint \figxsca=1 \figysca=1
+ \doif{\@@exoptie}{\v!kader}
+ {\let\@@efkader=\v!aan}%
+ \fi
+ \ifcase\figurestatus
+ \def\@@efkader{\v!aan}%
+ \showmessage{\m!figures}{1}{\@@effilename}%
+ \or
+ \showmessage{\m!figures}{2}{\@@effullname}%
+ \or
+ \showmessage{\m!figures}{3}{\@@effullname,\@@eflenttype}%
+ \or
+ \showmessage{\m!figures}{4}{\@@effullname}%
+ \or
+ \showmessage{\m!figures}{5}{\@@effullname,\@@efloadname}%
+ \or
+ \doifnot{\@@efsymbool}{\v!ja}
+ {\showmessage{\m!figures}{8}{\@@effullname}}%
+ \fi
+ \ifdim\@@epw=\!!zeropoint \chardef\figurestatus=1 \fi
+ \ifdim\@@eph=\!!zeropoint \chardef\figurestatus=1 \fi
+ \ifnum\figurestatus=1 % unknown dimensions, take width or height or scale
+ \setnaturalfiguresize
+ \let\@@efkader=\v!uit
+ \else
+ \setfactorfiguresize
+ \setscalefiguresize
+ \setdimensionfiguresize
+ \fi
+ \convertfigureinsertscale\@@epx\figx\figxsca\scax
+ \convertfigureinsertscale\@@epy\figy\figysca\scay
+ \iftraceexternalfigures
+ \message
+ {\externalfigurelog
+ [\@@effullname:
+ t={\@@eftype}\space m={\@@efmethode}\space l=\@@eflabel\space
+ w=\number\figwid\space h=\number\fighei\space
+ sx=\scax\space sy=\scay\space ox=\figx\space oy=\figy]}%
+ \fi
+ \doif{\@@exoptie}{\v!leeg}
+ {\skipexternalfigurestrue
+ \let\@@efkader=\v!uit}%
+ \doifelse{\@@efpreview}{\v!ja}
+ {\def\@@efpreview{1}}
+ {\def\@@efpreview{0}}%
+ \doifelse{\@@efobject}{\v!nee}
+ {\donefalse}
+ {\doifobjectssupportedelse
+ {\donetrue}{\donefalse}}%
+ \ifdone
+ \doifobjectfoundelse{FIG}{\@@efobjectname}
+ {}
+ {\bgroup
+ \figwid=\@@epw\fighei=\@@eph
+ \scratchdimen=\@@epx\scratchdimen=-\scratchdimen
+ \edef\@@epx{\number\scratchdimen}%
+ \scratchdimen=\@@epy\scratchdimen=-\scratchdimen
+ \edef\@@epy{\number\scratchdimen}%
+ \scratchdimen=\@@epw\edef\@@epw{\number\scratchdimen}%
+ \scratchdimen=\@@eph\edef\@@eph{\number\scratchdimen}%
+ \setbox0=\vbox to \fighei
+ {\vfill
+ \ifdim\wd\foundexternalfigure=\!!zeropoint
+ \doinsertfile
+ {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel}
+ {100}{100}
+ {\@@epx}{\@@epy}
+ {\@@epw}{\@@eph}
+ {\@@efpreview}%
+ \else\ifskipexternalfigures
+ \ruledhbox{\fakebox\foundexternalfigure}
+ \else
+ \box\foundexternalfigure
+ \fi\fi}%
+ \wd0=\figwid
+ \setobject{FIG}{\@@efobjectname}\vbox{\box0}%
+ \egroup}%
+ \fi
+ \global\setbox\foundexternalfigure=\vbox to \fighei
+ {\vfill
+ \hsize\figwid
+ \ifdone
+ \dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
+ \dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
+ \schaal[sx=\scax,sy=\scay]{\getobject{FIG}{\@@efobjectname}}%
+ \else
+ \ifdim\wd\foundexternalfigure=\!!zeropoint
+ \doinsertfile
+ {\@@eftype,\@@efmethode}{\@@effullname,\@@eflabel}
+ {\scax}{\scay}
+ {\figx}{\figy}
+ {\number\figwid}{\number\fighei}
+ {\@@efpreview}%
+ \else
+ \dimen0=\scax pt\divide\dimen0 by 100\edef\scax{\@EA\withoutpt\the\dimen0}%
+ \dimen0=\scay pt\divide\dimen0 by 100\edef\scay{\@EA\withoutpt\the\dimen0}%
+ \schaal[sx=\scax,sy=\scay]{\box\foundexternalfigure}%
+ \fi
+ \fi}}
+
+\let\figureheight=\!!zeropoint
+\let\figurewidth =\!!zeropoint
+
+\def\getfiguredimensions%
+ {\dodoubleempty\dogetfiguredimensions}
+
+\def\dogetfiguredimensions[#1][#2]%
+ {{\setbox0=\hbox{\externalfigure[#1][#2,\c!object=\v!nee]}}}
+
+\presetlocalframed[\??ef]
+
+% \def\doplaceexternalfigure#1[#2][#3][#4][#5]%
+% {\bgroup
+% \setupexternalfigures
+% \calculateexternalfigure#1[#2][#3][#4][#5]%
+% \xdef\figurewidth {\the\figwid}%
+% \xdef\figureheight{\the\fighei}%
+% \ifskipexternalfigures
+% \localframed
+% [\??ef]
+% [\c!breedte=\figwid,
+% \c!hoogte=\fighei,
+% \c!kader=\v!aan]
+% {\ttx name: #2 \\ file: #3 \\ skipped}%
+% \else\ifcase\figurestatus
+% \localframed
+% [\??ef]
+% [\c!breedte=\figwid,
+% \c!hoogte=\fighei,
+% \c!kader=\v!aan]
+% {\ttx name: #2 \\ file: #3 \\ unknown}%
+% \else
+% \localframed
+% [\??ef]
+% [\c!breedte=\figwid,
+% \c!hoogte=\fighei,
+% \c!offset=\v!overlay]
+% {\vfilll\box\foundexternalfigure}%
+% \fi\fi
+% \egroup}
+
+\def\doplaceexternalfigure% used direct and indirect
+ {\dosixtupleempty\dodoplaceexternalfigure}
+
+\def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]%
+ {\bgroup
+ \setupexternalfigures
+ \calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
+ \xdef\figurewidth {\the\figwid}%
+ \xdef\figureheight{\the\fighei}%
+ \ifskipexternalfigures
+ \localframed
+ [\??ef]
+ [\c!breedte=\figwid,
+ \c!hoogte=\fighei,
+ \c!kader=\v!aan]
+ {\ttx name: #2 \\ file: #3 \\ skipped}%
+ \else\ifcase\figurestatus
+ \localframed
+ [\??ef]
+ [\c!breedte=\figwid,
+ \c!hoogte=\fighei,
+ \c!kader=\v!aan]
+ {\ttx name: #2 \\ file: #3 \\ unknown}%
+ \else
+ \localframed
+ [\??ef]
+ [\c!breedte=\figwid,
+ \c!hoogte=\fighei,
+ \c!offset=\v!overlay]
+ {\vfilll\box\foundexternalfigure}%
+ \fi\fi
+ \egroup}
+
+\def\getexternalfigure#1%
+ {\getvalue{\??ef\??ef#1}}
+
+% \def\dopresetfigure[#1][#2]%
+% {\getparameters[\??ef][#1]%
+% \getparameters[\??ep][#2]}
+%
+% \def\doprecopfigure[#1][#2]%
+% {\def\doplaceexternalfigure##1[##2][##3][##4][##5]%
+% {\getparameters[\??ef][##4]%
+% \getparameters[\??ep][##5,#2]}%
+% \getvalue{\??ef\??ef#1}}
+
+\def\dopresetfigure[#1][#2][#3]%
+ {\getparameters[\??ef][#1,#3]%
+ \getparameters[\??ep][#2]}
+
+\def\doprecopfigure[#1][#2][#3]%
+ {\def\doplaceexternalfigure[##1][##2][##3][##4][##5]%
+ {\getparameters[\??ef][##4,#2,#3]%
+ \getparameters[\??ep][##5]}%
+ \getvalue{\??ef\??ef#1}}
+
+% \def\dosetuseexternalfigure[#1][#2][#3][#4]%
+% {\doifinstringelse{=}{#3}
+% {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure\dopresetfigure[#1][#2][#3][#4]}}
+% {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure\doprecopfigure[#1][#2][#3][#4]}}%
+% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} % upward compatible
+%
+% \def\douseexternalfigure[#1][#2][#3][#4]%
+% {\doifelsenothing{#1}
+% {\doifsomething{#2}
+% {\dosetuseexternalfigure[#2][#2][#3][#4]}}
+% {\doifelsenothing{#2}
+% {\dosetuseexternalfigure[#1][#1][#3][#4]}
+% {\dosetuseexternalfigure[#1][#2][#3][#4]}}}
+
+% \useexternalfigure[alpha][koe]
+% \useexternalfigure[beta] [koe] [breedte=1cm]
+% \useexternalfigure[gamma][koe][alpha]
+% \useexternalfigure[delta][koe][alpha][breedte=2cm]
+%
+% volle breedte: \externalfigure[koe] \par
+% 3cm breed: \externalfigure[koe] [breedte=3cm] \par
+% volle breedte: \externalfigure[alpha] \par
+% 1cm breed: \externalfigure[beta] \par
+% volle breedte: \externalfigure[gamma] \par
+% 2cm breed: \externalfigure[delta] \par
+% 4cm breed: \externalfigure[beta] [breedte=4cm] \par
+% 5cm breed: \externalfigure[gamma][breedte=5cm] \par
+
+\def\douseexternalfigure[#1][#2][#3][#4]%
+ {\doifelsenothing{#1}
+ {\doifsomething{#2}
+ {\dosetuseexternalfigure[#2][#2][#3][#4]}}
+ {\doifelsenothing{#2}
+ {\dosetuseexternalfigure[#1][#1][#3][#4]}
+ {\dosetuseexternalfigure[#1][#2][#3][#4]}}}
+
+\def\dosetuseexternalfigure[#1][#2][#3][#4]%
+ {\doifinstringelse{=}{#3}
+ {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\dopresetfigure][#1][#2][#3][#4]}}
+ {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\doprecopfigure][#1][#2][#3][#4]}}%
+ \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} % upward compatible
+
+\def\useexternalfigure%
+ {\doquadrupleempty\douseexternalfigure}
+
+% \def\doexternalfigure[#1][#2][#3]%
+% {\bgroup
+% \doifundefinedelse{\??ef\??ef#1}
+% {\useexternalfigure[\s!dummy][#1][#2][#3]%
+% \getexternalfigure{\s!dummy}}
+% {\getexternalfigure{#1}}%
+% \egroup}
+
+\def\doexternalfigure[#1][#2][#3]%
+ {\bgroup
+ \doifundefinedelse{\??ef\??ef#1}
+ {\useexternalfigure[\s!dummy][#1][#2][#3]%
+ \getexternalfigure{\s!dummy}[#3]}
+ {\getexternalfigure{#1}[#2]}%
+ \egroup}
+
+\unexpanded\def\externalfigure%
+ {\dotripleempty\doexternalfigure}
+
+%D Two alternatives, more settings needed.
+
+\def\showexternalfigurea%
+ {\bgroup
+ \setupcolors[\c!status=\v!start]% to prevent mps color conversion
+ \mindermeldingen
+ \def\presetfigure[##1][##2]%
+ {\useexternalfigure
+ [\s!figurepreset][##1]
+ [\c!kader=\v!aan,\c!breedte=6cm][##2]%
+ \getvalue{\e!start\v!figuur\e!tekst}[\v!links][]
+ {\v!geen}
+ {\hbox
+ {\getvalue{\s!figurepreset}%
+ \tfskip
+ \framed[\c!breedte=\figurewidth,\c!hoogte=\figureheight]{}}}%
+ {\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
+ \getvalue{\e!stop\v!figuur\e!tekst}}%
+ \pushendofline
+ \readjobfile{\@@exfile}{}{}% was \readlocfile
+ \popendofline
+ \egroup}
+
+\def\showexternalfigureb% instelbaar maken
+ {\bgroup
+ \def\total{5}%
+ \global\let\allfigures=\empty
+ \doglobal\newcounter\figurecounter
+ \setupcolors[\c!status=\v!start]% to prevent mps color conversion
+ \mindermeldingen
+ \def\docommando##1{##1&}%
+ \def\figurecaptions%
+ {\crcr
+ \noalign{\nobreak\vskip.5em}%
+ \@EA\globalprocesscommalist\@EA[\allfigures]\docommando
+ \global\let\allfigures=\empty
+ \crcr
+ \noalign{\vskip1em\goodbreak}}%
+ \def\presetfigure[##1][##2]%
+ {\vbox
+ {\divide\hsize by \total
+ \advance\hsize by -1em
+ \useexternalfigure
+ [\s!figurepreset][##1]
+ [\c!kader=\v!aan,\c!factor=\v!max,\c!breedte=\hsize][##2]%
+ \getvalue{\s!figurepreset}}%
+ \doglobal\addtocommalist{##1}\allfigures
+ \getvalue{\s!figurepreset}%
+ \doglobal\increment\figurecounter
+ \ifnum\figurecounter=\total
+ \doglobal\newcounter\figurecounter
+ \def\next{\figurecaptions}%
+ \else
+ \def\next{&}%
+ \fi
+ \next}%
+ \pushendofline
+ \tabskip=\!!zeropoint \!!plus 1fill
+ \halign to \hsize
+ {&\hss##\hss\cr\readjobfile{\@@exfile}{}{}\crcr % was \readlocfile
+ \figurecaptions}
+ \popendofline
+ \egroup}
+
+\def\doshowexternalfigures[#1]%
+ {\bgroup
+ \getparameters[\??ex][\c!variant=a,#1]%
+ \getvalue{showexternalfigure\@@exvariant}%
+ \egroup}
+
+\def\showexternalfigures%
+ {\dosingleempty\doshowexternalfigures}
+
+%D Still undocumented!
+
+\newcount\efreference
+\newdimen\efxsteps
+\newdimen\efysteps
+
+\def\calculateefsteps%
+ {\ifnum0\@@exxmax=0
+ \ifnum0\@@exymax=0
+ \def\@@exymax{24}%
+ \fi
+ \efysteps=\figureheight \divide\efysteps by \@@exymax
+ \efxsteps=\efysteps
+ \dimen0=\figurewidth
+ \advance\dimen0 by \efysteps
+ \divide\dimen0 by \efysteps
+ \edef\@@exxmax{\number\dimen0}%
+ \else
+ \efxsteps=\figurewidth \divide\efxsteps by \@@exxmax
+ \efysteps=\figureheight \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\effigure#1%
+ {\positioneer(0,0){\getvalue{#1}}}
+
+\def\efdoarea(#1,#2)#3#4% (h,b){kader}{tekst}
+ {\bgroup
+ \setnostrut
+ \framed
+ [\c!breedte=#1\efxsteps,
+ \c!hoogte=#2\efysteps,
+ \c!offset=\!!zeropoint,
+ \c!kader=#3]
+ {#4}%
+ \egroup}
+
+\def\efgoto(#1,#2)#3[#4]% (h,b)kader[ref]
+ {\setbox0=\vbox{\efdoarea(#1,#2)#3{}}%
+ \naarbox{\copy0}[#4]}
+
+\def\efmark(#1,#2)#3(#4,#5)#6[#7]%
+ {\advance\efreference by 1
+ \positioneer(#1,#2)
+ {\hbox{\the\efreference}}%
+ \positioneer(#1,#2)
+ {\gotosomeinternal
+ {\s!vwb}{#7}{\realfolio}
+ {\efdomarker(#4,#5){\v!aan}{\thisissomeinternal{\s!vwa}{#7}}}}}
+
+\def\eftext#1(#2,#3)#4(#5,#6)#7[#8]%
+ {\advance\efreference by 1
+ \hbox
+ {\quad
+ \thisissomeinternal{\s!vwb}{#8}%
+ \gotosomeinternal
+ {\s!vwa}{#8}{\realfolio}
+ {\hbox to 1.5em{\the\efreference\presetgoto\hfill}}%
+ \quad#1 (#2,#3) (#5,#6) [#8]\hfill}%
+ \endgraf}
+
+\def\efthisis(#1,#2)#3[#4]%
+ {\efdoarea(#1,#2){#3}{\pagereference[#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\placestartfigure[#1][#2][#3]#4\placestopfigure%
+ {\hbox
+ {\setbox0=\hbox
+ {\useexternalfigure[\s!dummy][#2][#3]%
+ \externalfigure[\s!dummy]}%
+ \calculateefsteps
+ \startpositioneren
+ \def\referring(##1,##2)##3(##4,##5)##6[##7]%
+ {\positioneer(##1,##2)
+ {\efgoto(##4,##5){\@@exhokjes}[##7]}}%
+ \def\marking(##1,##2)##3(##4,##5)##6[##7]%
+ {\positioneer(##1,##2)
+ {\efthisis(##4,##5){\@@exhokjes}[##7]}}%
+ \def\remark%
+ {\efnocomment}%
+ \def\colorbar##1[##2]%
+ {}%
+ \positioneer(0,0){\box0}%
+ \linewidth=1pt
+ \stelpositionerenin
+ [\c!eenheid=pt,
+ \c!xschaal=\withoutpt{\the\efxsteps},
+ \c!yschaal=\withoutpt{\the\efysteps},
+ \c!factor=1]%
+ \ignorespaces#4%
+ \def\referring(##1,##2)##3(##4,##5)##6[##7]%
+ {}%
+ \let\marking=\referring
+ \def\remark%
+ {\efcomment\v!nee}%
+ \def\colorbar##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\teststartfigure[#1][#2][#3]#4\teststopfigure%
+ {\begingroup
+ \setbox0=\hbox
+ {\useexternalfigure[\s!dummy][#2][\c!bfactor=\v!max]%
+ \externalfigure[\s!dummy]}%
+ \def\referring%
+ {\efmark}%
+ \def\marking%
+ {\efmark}%
+ \def\remark%
+ {\efcomment\v!ja}%
+ \def\colorbar##1[##2]%
+ {}%
+ \efreference=0
+ \setbox0=\vbox
+ {\hsize240pt
+ \startpositioneren
+ \calculateefsteps
+ \positioneer(0,0)
+ {\box0}%
+ \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\referring%
+ {\eftext{$\rightarrow$}}%
+ \def\marking%
+ {\eftext{$\leftarrow$}}%
+ \def\remark%
+ {\efnocomment}%
+ \def\colorbar##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\dodostartfigure[#1][#2][#3]#4\stopfigure%
+ {\doifelse{\@@exoptie}{\v!test}
+ {\teststartfigure[#1][#2][#3]#4\teststopfigure
+ \def\@@exhokjes{\v!aan}}
+ {\def\@@exhokjes{\v!uit}}%
+ \setvalue{\??ef\??ef#1}%
+ {\placestartfigure[#1][#2][#3]#4\placestopfigure}%
+ \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}}
+
+\long\def\dostartfigure#1%
+ {\dotripleargument\dodostartfigure#1\stopfigure}
+
+\def\startfigure%
+ {\grabuntil{\e!stop\v!figuur}\dostartfigure}
+
+\appendtoks \setupexternalfigures[\c!optie=\v!leeg] \to \everyfastmode
+\appendtoks \runMPgraphicsfalse \to \everyfastmode
+\appendtoks \insertMPgraphicsfalse \to \everyfastmode
+
+\setupexternalfigures
+ [\c!optie=,
+ \c!object=\v!ja,
+ \c!korps=\korpsgrootte,
+ \c!gebied=,
+ \c!file=\f!utilityfilename.\f!figureextension,
+ \c!straal=.5\korpsgrootte,
+ \c!hoek=\v!recht,
+ \c!kader=\v!uit,
+ \c!plaats={\v!lokaal,\v!globaal}]
+
+\setupexternalfigures
+ [\c!hokjes=\v!uit,
+ \c!ymax=24,
+ \c!xmax=]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 0f506f3c9..5fb702b07 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -1,127 +1,150 @@
-% NOT YET DOCUMENTED !!
-%
-% overal \normalinput
-
-
-%D \module
-%D [ file=core-fil,
-%D version=1997.11.15,
-%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
-
-%D \macros
-%D {definefilename}
-%D
-%D One of the problems with loading files is that their names
-%D can depend on the interface language. We therefore need a
-%D method to define filesynonyms. The actual synonyms are
-%D defined elsewhere, but look like:
-%D
-%D \starttypen
-%D \definefilesynonym [chemic] [chemie]
-%D \definefilesynonym [einheit] [eenheid]
-%D \definefilesynonym [unit] [eenheid]
-%D \stoptypen
-%D
-%D So we can say in english:
-%D
-%D \starttypen
-%D \usemodules[pictex,chemic,unit]
-%D \stoptypen
-%D
-%D and in dutch:
-%D
-%D \starttypen
-%D \usemodules[pictex,chemie,eenheid]
-%D \stoptypen
-
-\def\definefilesynonym%
- {\dodoubleempty\dodefinefilesynonym}
-
-%\def\dodefinefilesynonym[#1][#2]%
-% {\lowercase{\setevalue{\??fs#1}{#2}}}
-
-\def\dodefinefilesynonym[#1][#2]%
- {\lowercase{\edef\!!stringa{#2}}%
- \setevalue{\??fs#1}{\!!stringa}}
-
-%D \macros
-%D {truefilename}
-%D
-%D At the system level such a filename can be called upon by
-%D saying:
-%D
-%D \starttypen
-%D \truefilename{filename/filesynonym}
-%D \stoptypen
-
-\def\truefilename#1%
- {\ifundefined{\??fs#1}#1\else\getvalue{\??fs#1}\fi}
-
-%D \macros
-%D {makeshortfilename}
-%D
-%D To prevent cross platform problems with filenames, we
-%D lowercase them as well as only use the first 8~characters.
-
-\def\domakeshortfilename[#1#2#3#4#5#6#7#8#9]%
- {\lowercase{\edef\shortfilename{#1#2#3#4#5#6#7#8.}}%
- \expandafter\beforesplitstring\shortfilename\at.\to\shortfilename}
-
-\def\makeshortfilename[#1]%
- {\edef\fullfilename{#1.........}%
- \expanded{\domakeshortfilename[\fullfilename]}}
-
-%D \macros
-%D {usemodule}
-%D
-%D Most of \CONTEXT is preloaded in the format file. Some very
-%D domain specific typesetting topics are however dealt with in
-%D separate modules, e.g. typesettingof chemical structure
-%D formulas. These modules are loaded by:
-%D
-%D \showsetup{\y!usemodule}
-%D
-%D More information on the specific modules can be found in
-%D their dedicated manuals.
-
-\def\dododousemodules#1#2%
- {\makeshortfilename[#1\truefilename{#2}]%
- \doifundefinedelse{\shortfilename\v!aan}
- {\setgvalue{\shortfilename\v!aan}{}%
- \startreadingfile
- \readsysfile{\shortfilename}%
- {\showmessage{\m!systems}{5}{#2}}%
- {\showmessage{\m!systems}{6}{#2}}%
- \stopreadingfile}
- {\showmessage{\m!systems}{7}{#2}}}
-
-\def\dodousemodules#1%
- {\dododousemodules\f!moduleprefix{#1}%
- \dododousemodules\f!styleprefix {#1}}
-
-\def\dousemodules[#1]%
- {\doifsomething{#1}{\processcommalist[#1]\dodousemodules}}
-
-\def\usemodules%
- {\dosingleargument\dousemodules}
-
-%D We also support a singular call, which saves us for
-%D frustrations when we do a typo.
-
-\let\usemodule=\usemodules
-
-\protect
-
-\endinput
+% NOT YET DOCUMENTED !!
+%
+% overal \normalinput
+
+%D \module
+%D [ file=core-fil,
+%D version=1997.11.15,
+%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
+
+\startmessages dutch library: files
+ title: files
+ 1: file synoniem -- is al in gebruik voor --
+\stopmessages
+
+\startmessages english library: files
+ title: files
+ 1: file synonym -- is already used for --
+\stopmessages
+
+\startmessages german library: files
+ title: files
+ 1: Dateisynonym -- wird bereits fuer -- benutzt
+\stopmessages
+
+%D \macros
+%D {definefilesynonym}
+%D
+%D One of the problems with loading files is that their names
+%D can depend on the interface language. We therefore need a
+%D method to define filesynonyms. The actual synonyms are
+%D defined elsewhere, but look like:
+%D
+%D \starttypen
+%D \definefilesynonym [chemic] [chemie]
+%D \definefilesynonym [einheit] [eenheid]
+%D \definefilesynonym [unit] [eenheid]
+%D \stoptypen
+%D
+%D So we can say in english:
+%D
+%D \starttypen
+%D \usemodules[pictex,chemic,unit]
+%D \stoptypen
+%D
+%D and in dutch:
+%D
+%D \starttypen
+%D \usemodules[pictex,chemie,eenheid]
+%D \stoptypen
+
+\def\definefilesynonym%
+ {\dodoubleempty\dodefinefilesynonym}
+
+\def\dodefinefilesynonym[#1][#2]%
+ {\doifdefinedelse{\??fs#1}
+ {\showmessage{\m!systems}{1}{#1 (#2),\getvalue{\??fs#1}}} % alleen naar log
+ {\setevalue{\??fs#1}{#2}}}
+
+%D \macros
+%D {truefilename}
+%D
+%D At the system level such a filename can be called upon by
+%D saying:
+%D
+%D \starttypen
+%D \truefilename{filename/filesynonym}
+%D \stoptypen
+%D
+%D The implementation shows that nesting is supported.
+
+\def\truefilename#1%
+ {\ifundefined{\??fs#1}%
+ #1%
+ \else
+ \truefilename{\getvalue{\??fs#1}}%
+ \fi}
+
+%D \macros
+%D {makeshortfilename}
+%D
+%D To prevent cross platform problems with filenames, we
+%D lowercase them as well as only use the first 8~characters.
+
+\def\domakeshortfilename[#1#2#3#4#5#6#7#8#9]%
+ {\lowercase{\edef\shortfilename{#1#2#3#4#5#6#7#8.}}%
+ \expandafter\beforesplitstring\shortfilename\at.\to\shortfilename}
+
+\def\makeshortfilename[#1]%
+ {\edef\fullfilename{#1.........}%
+ \expanded{\domakeshortfilename[\fullfilename]}}
+
+%D \macros
+%D {usemodule}
+%D
+%D Most of \CONTEXT is preloaded in the format file. Some very
+%D domain specific typesetting topics are however dealt with in
+%D separate modules, e.g. typesettingof chemical structure
+%D formulas. These modules are loaded by:
+%D
+%D \showsetup{\y!usemodule}
+%D
+%D More information on the specific modules can be found in
+%D their dedicated manuals.
+
+\def\dododousemodules#1#2%
+ {\makeshortfilename[#1\truefilename{#2}]%
+ \doifundefinedelse{\shortfilename\v!aan}
+ {\setgvalue{\shortfilename\v!aan}{}%
+ \startreadingfile
+ \readsysfile{\shortfilename}%
+ {\showmessage{\m!systems}{5}{#1#2}}%
+ {\showmessage{\m!systems}{6}{#1#2}}%
+ \stopreadingfile}
+ {\showmessage{\m!systems}{7}{#2}}}
+
+\def\dodousemodules#1%
+ {\dododousemodules\f!moduleprefix {#1}%
+ \dododousemodules\f!styleprefix {#1}%
+ \dododousemodules\f!privateprefix{#1}}
+
+\def\dousemodules[#1]%
+ {\doifsomething{#1}{\processcommalist[#1]\dodousemodules}%
+ }% \enablelanguagespecifics[\currentmainlanguage]}
+
+\def\usemodules%
+ {\dosingleargument\dousemodules}
+
+%D We also support a singular call, which saves us for
+%D frustrations when we do a typo.
+
+\let\usemodule=\usemodules
+
+% %D The definition shows that the language specific settings
+% %D are activated after loading all the modules specified.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
new file mode 100644
index 000000000..614649b61
--- /dev/null
+++ b/tex/context/base/core-fld.tex
@@ -0,0 +1,857 @@
+%D \module
+%D [ file=core-fld,
+%D version=1997.05.18,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Fill||in fields,
+%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 Field Macros}
+
+% messages
+
+\unprotect
+
+%D Internal command, linked to \type{\definesymbol}.
+
+\def\dogetfieldsymbol#1%
+ {\getobject{SYM}{#1}}
+
+\def\dopresetfieldsymbol#1%
+ {\checkobjectreferences
+ \doifobjectfoundelse{SYM}{#1}
+ {}
+ {\setobject{SYM}{#1}\hbox{\symbol[#1]}%
+ \flushatshipout
+ {\setbox0=\hbox{\hskip-\maxdimen\getobject{SYM}{#1}}%
+ \smashbox0\box0}}}
+
+\def\presetfieldsymbols[#1]%
+ {\def\dopresetfieldsymbols##1%
+ {\processcommalist[##1]\dopresetfieldsymbol}%
+ \@EA\processcommalist\@EA[#1]\dopresetfieldsymbols}
+
+\def\definedefaultsymbols
+ {\definesymbol[defaultyes][$\times$]%
+ \definesymbol[defaultno][$\cdot$]}
+
+%D The interface to the specials. DEFAULT NOG ANDERS
+
+\def\presetlinefield%
+ {\dopresetlinefield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdn}
+ {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
+ {\@@fdoptie}
+ {\@@fduitlijnen}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presettextfield%
+ {\dopresettextfield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdn}
+ {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
+ {\@@fdoptie}
+ {\@@fduitlijnen}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetchoicefield%
+ {\dopresetchoicefield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
+ {\@@fdoptie}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetpopupfield%
+ {\dopresetpopupfield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
+ {\@@fdoptie}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetcombofield%
+ {\dopresetcombofield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdletter,\@@fdkleur,\@@fdveldachtergrondkleur,\@@fdveldkaderkleur}
+ {\@@fdoptie}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetcheckfield%
+ {\presetfieldsymbols[\@@FieldValues]%
+ \dopresetcheckfield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+% opties
+ {\@@fdoptie}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetpushfield%
+ {\presetfieldsymbols[\@@FieldValues]%
+ \dopresetpushfield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@FieldDefault}
+ {\@@fdoptie}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetradiofield%
+ {\presetfieldsymbols[\@@FieldValues]%
+ \dopresetradiofield
+ {\@@FieldName}
+ {\@@FieldWidth}
+ {\@@FieldHeight}
+ {\@@fdoptie}
+ {\@@FieldRoot}
+ {\@@FieldValues}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\presetradiorecord%
+ {\dopresetradiorecord
+ {\@@FieldName}
+ {\@@FieldDefault}
+ {\@@fdoptie}
+ {\@@FieldKids}
+ {\@@fdklikin,\@@fdklikuit,\@@fdgebiedin,\@@fdgebieduit,\@@fdnatoets,%
+ \@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
+
+\def\setfieldmodes#1#2#3%
+ {\xdef\@@FieldMode{#1}% % 0 1 2 3
+ \xdef\@@FieldFree{#2}% % 0 1
+ \xdef\@@FieldAuto{#3}} % 0 1
+
+\newevery\everysetfield\relax
+
+\def\setfield#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \doglobal\increment\numberoffields
+ \iftracefields
+ \doglobal\addtocommalist{#1}\collectedfields
+ \fi
+ \the\everysetfield
+ \setxvalue{fielddata#1}%
+ {\noexpand\dosetfield{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}%
+ \egroup}
+
+\def\dosetfield#1#2#3#4#5#6#7#8#9%
+ {\xdef\@@FieldName {#1}%
+ \xdef\@@FieldType {#2}%
+ \xdef\@@FieldRoot {#3}%
+ \xdef\@@FieldParent {#4}%
+ \xdef\@@FieldKids {#5}%
+ \xdef\@@FieldGroup {#6}%
+ \setfieldmodes #7%
+ \xdef\@@FieldValues {#8}%
+ \xdef\@@FieldDefault{#9}}
+
+\def\changefield#1%
+ {\setfield{#1}\@@FieldType\@@FieldRoot\@@FieldParent\@@FieldKids\@@FieldGroup
+ {\@@FieldMode\@@FieldFree\@@FieldAuto}\@@FieldValues\@@FieldDefault}
+
+\def\getfield#1% name
+ {\doifundefinedelse{fielddata#1}
+ {\dosetfield{#1}\empty\empty\empty\empty\empty{\empty00}\empty\empty}
+ {\getvalue{fielddata#1}}}
+
+\newif\iftracefields \tracefieldsfalse
+
+\let\tracefields\tracefieldstrue
+
+\def\doshowfields[#1]%
+ {\bgroup
+ \switchtobodyfont[8pt,tt]
+ \doifsomething{#1}{\def\collectedfields{#1}}
+ \ifx\collectedfields\empty
+ \par specify [fieldlist] or say \type{\tracefieldstrue} first\par
+ \else
+ \def\normalizedfieldmode##1##2##3%
+ {\ifcase0##2 \else\sl\fi
+ \ifcase0##1 loner\or parent\or clone\or copy\fi}
+ \def\dosetfield##1##2##3##4##5##6##7##8##9%
+ {##1&##2&##3&##4&##5&##6&\normalizedfieldmode##7&##8&##9\cr}
+ \halign
+ {&##\strut\hss\quad\cr
+ \noalign{\hrule}
+ NAME &TYPE &ROOT &
+ PARENT&KIDS &GROUP &
+ MODE &VALUES&DEFAULT\cr
+ \noalign{\hrule}
+ \@EA\globalprocesscommalist\@EA[\collectedfields]\getfield
+ \noalign{\hrule}}
+ \fi
+ \egroup}
+
+\def\showfields%
+ {\dosingleempty\doshowfields}
+
+\def\dologfields[#1]%
+ {\bgroup
+ \immediate\openout\scratchwrite=fields.log
+ \doifsomething{#1}{\def\collectedfields{#1}}
+ \ifx\colledtedfields\empty
+ \immediate\write\scratchwrite{use \tracefieldstrue}%
+ \else
+ \def\normalizedfieldmode##1##2##3%
+ {\edef\@@FieldMode%
+ {\ifcase##1 loner \or parent \or clone \or copy \fi
+ \ifcase##2 \else(done)\fi}}
+ \def\dosetfield##1##2##3##4##5##6##7##8##9%
+ {\normalizedfieldmode##7%
+ \immediate\write\scratchwrite
+ {N=##1 / T=##2 / R=##3 / P=##4 / K=##5 / G=##6 /
+ M=\@@FieldMode\space/ V=##8 / D=##9}}%
+ \processcommacommand[\collectedfields]\getfield
+ \fi
+ \immediate\closeout\scratchwrite
+ \egroup}
+
+\def\logfields%
+ {\dosingleempty\doLogFields}
+
+%D \starttypen
+%D \definefield [name] [type] [group] [values] [default]
+%D
+%D \definefield [WWWW] [text] [textsetup] [default text]
+%D \definefield [XXXX] [push] [pushsetup] [yes,no] [yes]
+%D \definefield [XXXX] [check] [checksetup] [yes,no] [yes]
+%D \definefield [YYYY] [combo] [combosetup] [a,b,c,d] [b]
+%D \definefield [ZZZZ] [radio] [radiosetup] [W,X,Y,Z] [Y]
+%D
+%D \definesubfield [W] [subsetup] [p,q]
+%D \definesubfield [X,Y] [subsetup] [p,r]
+%D \definesubfield [Z] [subsetup] [y,z]
+%D
+%D evt \definemainfield ... wanneer geplaatst voor subs gegeven
+%D
+%D \clonefield [XXXX] [XX,YY] [mysetup] [on,off]
+%D \clonefield [Z] [AA,BB] [somesetup] [true,false]
+%D \clonefield [Z] [CC,DD] [anothersetup]
+%D
+%D \copyfield [XXXX] [PP,QQ,RR]
+%D
+%D \field[XXXX]
+%D \fitfield[XXXX]
+%D \stoptypen
+
+\newif\ifdefinemainfield \definemainfieldfalse
+
+\def\getmainfieldkids#1%
+ {\let\@@FieldKids\empty
+ \ifdefinemainfield
+ \definetwopasslist{fld:#1}% defined by system
+ \doloop
+ {\gettwopassdata{fld:#1}%
+ \iftwopassdatafound
+ \addtocommalist\twopassdata\@@FieldKids
+ \else
+ \exitloop
+ \fi}%
+ \fi}
+
+\newcounter\nofmainfieldkids
+
+\def\setmainfieldkid#1#2%
+ {\doglobal\increment\nofmainfieldkids
+ \immediatewriteutilitycommand
+ {\twopassentry%
+ {fld:#1}%
+ {\nofmainfieldkids}%
+ {#2}}}
+
+\def\definemainfield%
+ {\definemainfieldtrue
+ \doquintupleempty\dodefinefield}
+
+\def\definefield%
+ {\definemainfieldfalse
+ \doquintupleempty\dodefinefield}
+
+\let\collectedfields=\empty
+\newcounter\numberoffields
+\newcounter\totalnumberoffields
+
+\def\savenumberoffields%
+ {\ifcase\numberoffields\relax\else
+ \savecurrentvalue\totalnumberoffields\numberoffields
+ \fi}
+
+\appendtoks \savenumberoffields \to \everylastshipout
+
+% \def\presetfieldreferences%
+% {\ifnum\totalnumberoffields>0
+% \definereference[AtOpenInitializeForm][\v!ResetForm]%
+% \fi}
+%
+% \definereference[AtOpenInitializeForm][\v!geen]
+%
+% \appendtoks \presetfieldreferences \to \everycheckreferences
+
+\def\dodefinefield[#1][#2][#3][#4][#5]%
+ {\ifsecondargument
+ \edef\currentfieldname{#1}% just in case we're inside a loop
+ \doifundefinedelse{define#2field}
+ {\writestatus{fields}{unknown field type #2}}
+ {\doifundefined{fielddata\currentfieldname}
+ {\getmainfieldkids{\currentfieldname}%
+ \ifdefinemainfield
+ \ifx\@@FieldKids\empty
+ \let\@@FieldMode=\fieldlonermode
+ \else
+ \let\@@FieldMode=\fieldparentmode
+ \fi
+ \def\@@FieldAuto{1}%
+ \else
+ \let\@@FieldMode=\fieldlonermode
+ \def\@@FieldAuto{0}%
+ \fi
+ \def\@@FieldFree{0}%
+ \getvalue{define#2field}{\currentfieldname}{#2}{#3}{#4}{#5}}}%
+ \else
+ \writestatus{fields}{pass fieldname and fieldtype}%
+ \fi}
+
+\def\definelinefield#1#2#3#4#5%
+ {\setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{#4}}
+
+\let\definetextfield =\definelinefield
+
+\def\definechoicefield#1#2#3#4#5%
+ {\doifelsenothing{#4}
+ {\def\@@FieldValues{yes,no}}
+ {\def\@@FieldValues{#4}}%
+ \doifelsenothing{#5}
+ {\dogetcommacommandelement2\from\@@FieldValues\to\@@FieldDefault
+ \dogetcommacommandelement1\from\@@FieldDefault\to\@@FieldDefault}
+ {\def\@@FieldDefault{#5}}%
+ \setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{\@@FieldValues}{\@@FieldDefault}}
+
+\let\definepopupfield=\definechoicefield
+\let\definecombofield=\definechoicefield
+
+\def\definecheckfield#1#2#3#4#5%
+ {\doifelsenothing{#4}
+ {\definedefaultsymbols
+ \def\@@FieldValues{defaultyes}}
+ {\def\@@FieldValues{#4}}%
+ \doifelsenothing{#5}
+ {\dogetcommacommandelement2\from\@@FieldValues\to\@@FieldDefault
+ \dogetcommacommandelement1\from\@@FieldDefault\to\@@FieldDefault}
+ {\def\@@FieldDefault{#5}}%
+ \setfield{#1}{#2}{}{}{\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{\@@FieldValues}{\@@FieldDefault}}
+
+\let\definepushfield=\definecheckfield
+
+\def\defineradiofield#1#2#3#4#5%
+ {\iffourthargument
+ \doifelsenothing{#5}
+ {\dogetcommacommandelement1\from#4\to\SavedFieldDefault
+ \dogetcommacommandelement1\from\SavedFieldDefault\to\SavedFieldDefault}
+ {\def\SavedFieldDefault{#5}}%
+ \ifx\@@FieldKids\empty
+ \setfield{#1}{#2}{}{}{#4}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\SavedFieldDefault}%
+ \else
+ \setfield{#1}{#2}{}{}{#4,\@@FieldKids}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\SavedFieldDefault}%
+ \fi
+ \def\docommando##1%
+ {\doifelse{##1}{\SavedFieldDefault}
+ {\def\@@FieldDefault{*}}
+ {\let\@@FieldDefault=\empty}%
+ \setfield{##1}{#2}{#1}{}{}{#3}{\@@FieldMode\@@FieldFree\@@FieldAuto}{}{\@@FieldDefault}}%
+ \processcommalist[#4]\docommando
+ \else
+ \writestatus{fields}{pass values too}%
+ \fi}
+
+\def\definesubfield%
+ {\dotripleempty\dodefinesubfield}
+
+\def\dodefinesubfield[#1][#2][#3]% for the moment only radio ones
+ {\ifsecondargument
+ \def\docommando##1%
+ {\getfield{##1}%
+ \ifx\@@FieldType\empty
+ \writestatus{fields}{unknown field ##1}%
+ \else
+ \doifsomething{#2}
+ {\edef\@@FieldGroup{#2}}%
+ \doifelsenothing{#3}
+ {\definedefaultsymbols
+ \def\@@FieldValues{defaultyes}}
+ {\def\@@FieldValues{#3}}%
+ \doifelse{\@@FieldDefault}{*}
+ {\@EA\dogetcommalistelement\@EA1\@EA\from\@@FieldValues\to\@@FieldDefault}
+ {\@EA\dogetcommalistelement\@EA2\@EA\from\@@FieldValues\to\@@FieldDefault}%
+ \@EA\dogetcommalistelement\@EA1\@EA\from\@@FieldDefault\to\@@FieldDefault
+ \changefield{##1}%
+ \fi}%
+ \processcommalist[#1]\docommando
+ \else
+ \writestatus{fields}{pass fieldname, setupgroup, values and default}%
+ \fi}
+
+\def\doclonefield[#1][#2][#3][#4]% parent children setupgroup values
+ {\ifsecondargument
+ \getfield{#1}%
+ \ifx\@@FieldType\empty
+ \writestatus{fields}{unknown field #1}%
+ \else
+ \let\@@FieldMode=\fieldparentmode
+ \def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ \processcommalist[#2]\docommando
+ \changefield{#1}%
+ \let\@@FieldAutoParent=\@@FieldAuto
+ \def\@@FieldParent{#1}%
+ \let\@@FieldKids=\empty
+ \let\@@FieldRoot=\empty
+ \let\@@FieldMode=\fieldchildmode
+ \def\@@FieldFree{0}%
+ \def\@@FieldAuto{0}%
+ \doifsomething{#3}{\edef\@@FieldGroup{#3}}%
+ \doifsomething{#4}{\edef\@@FieldValues{#4}}%
+ \def\docommando##1%
+ {\ifcase\@@FieldAutoParent\else
+ \setmainfieldkid{\@@FieldParent}{##1}%
+ \fi
+ \changefield{##1}}%
+ \processcommalist[#2]\docommando
+ \fi
+ \else
+ \writestatus{fields}{pass parent field and clones}%
+ \fi}
+
+\def\clonefield%
+ {\doquadrupleempty\doclonefield}
+
+\def\docopyfield[#1][#2]% parent children
+ {\ifsecondargument
+ \getfield{#1}%
+ \ifx\@@FieldType\empty
+ \writestatus{fields}{unknown field #1}%
+ \else
+ \let\@@FieldMode=\fieldparentmode
+ \def\docommando##1{\addtocommalist{##1}\@@FieldKids}%
+ \processcommalist[#2]\docommando
+ \changefield{#1}%
+ \let\@@FieldAutoParent=\@@FieldAuto
+ \def\@@FieldParent{#1}%
+ \let\@@FieldKids=\empty
+ \let\@@FieldRoot=\empty
+ \let\@@FieldMode=\fieldcopymode
+ \def\@@FieldFree{0}%
+ \def\@@FieldAuto{0}%
+ \def\docommando##1%
+ {\ifcase\@@FieldAutoParent\else
+ \setmainfieldkid{\@@FieldParent}{##1}%
+ \fi
+ \changefield{##1}}%
+ \processcommalist[#2]\docommando
+ \fi
+ \else
+ \writestatus{fields}{pass parent field and copies}%
+ \fi}
+
+\def\copyfield%
+ {\dodoubleempty\docopyfield}
+
+\unexpanded\def\field%
+ {\dotripleempty\dofield[\dohandlefield]}
+
+\unexpanded\def\fitfield%
+ {\dotripleempty\dofield[\dohandlefitfield]}
+
+\def\dofield[#1][#2][#3]%
+ {\iffirstargument
+ \bgroup
+ \getfield{#2}%
+ \ifsecondargument
+ \def\@@FieldLabel{#3}%
+ \else
+ \let\@@FieldLabel=\@@FieldName
+ \fi
+ \ifx\@@FieldType\empty
+ \writestatus{fields}{unknown field #2}%
+ \else\ifcase\@@FieldFree
+ \doifdefinedelse{setupfield\@@FieldGroup}
+ {\let\dosetupfield=#1\getvalue{setupfield\@@FieldGroup}}
+ {#1[\@@FieldName][\v!label,\v!kader,\v!horizontaal][][][]}%
+ \def\@@FieldFree{1}%
+ \changefield{#2}%
+ \else\ifcase\@@FieldAuto
+ \writestatus{fields}{field #2 already typeset}%
+ \else
+ \writestatus{fields}{field #2 automatically copied}%
+ \nextsystemfield
+ \copyfield[\@@FieldName][\currentsystemfield]%
+ \dotripleempty\dofield[#1][\currentsystemfield][#3]% get the if's right
+ \fi\fi\fi
+ \egroup
+ \fi}
+
+\def\typesetfield%
+ {\useJSscripts[fld]%
+ \ifx\@@FieldRoot\empty \else
+ \let\@@SavedFieldName=\@@FieldName
+ \getfield\@@FieldRoot
+ \ifcase\@@FieldFree
+ \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \iflocation\getvalue{preset\@@FieldType record}\fi
+ \def\@@FieldFree{1}%
+ \changefield\@@FieldName
+ \fi
+ \getfield\@@SavedFieldName
+ \fi
+ \ifx\@@FieldKids\empty
+ \donefalse
+ \else
+ \donetrue
+ \fi
+ \ifdone
+ \let\@@FieldParent=\@@FieldName
+ \addtocommalist\@@FieldParent\@@FieldKids
+ \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \iflocation\getvalue{preset\@@FieldType field}\fi
+ \let\@@FieldMode=\fieldchildmode
+ \fi
+ \dosetfieldstatus\@@FieldMode\@@FieldParent\@@FieldKids\@@FieldRoot
+ \iflocation\getvalue{preset\@@FieldType field}\fi}
+
+\def\dodefinethefieldset[#1][#2]%
+ {\dodefinefieldset{#1}{#2}}
+
+\def\definefieldset%
+ {\dodoubleargument\dodefinethefieldset}
+
+\def\normaldodosetupfield[#1][#2][#3][#4][#5]%
+ {\doifdefinedelse{setupfield#1}
+ {\pushmacro\dosetupfield
+ \def\dosetupfield[##1][##2][##3][##4][##5]%
+ {\setvalue{setupfield#1}{\dosetupfield[#1][##2,#2][##3,#3][##4,#4][##5,#5]}}%
+ \getvalue{setupfield#1}%
+ \popmacro\dosetupfield}
+ {\setvalue{setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}}}
+
+\let\dodosetupfield\normaldodosetupfield
+
+\def\donosetupfield[#1][#2][#3][#4][#5]%
+ {\setvalue{setupfield#1}{\dosetupfield[#1][#2][#3][#4][#5]}}
+
+\def\dosetupfield[#1][#2][#3][#4][#5]%
+ {\iffifthargument
+ \def\docommando##1{\dodosetupfield[##1][#2][#3][#4][#5]}%
+ \processcommalist[#1]\docommando
+ \else\ifthirdargument
+ \def\docommando##1{\dodosetupfield[##1][#2][][][#3]}%
+ \processcommalist[#1]\docommando
+ \else\ifsecondargument
+ \doifelse{#2}{\v!reset}
+ {\def\docommando##1{\donosetupfield[#1][][][][]}}
+ {\def\docommando##1{\dodosetupfield[##1][][][][#2]}}%
+ \processcommalist[#1]\docommando
+ \else\iffirstargument
+ \def\docommando##1{\dodosetupfield[##1][][][][]}%
+ \processcommalist[#1]\docommando
+ \else
+ \writestatus{fields}{provide either 1, 2, 3 or 5 arguments}%
+ \fi\fi\fi\fi}
+
+\def\setupfield%
+ {\doquintupleempty\dosetupfield}
+
+\def\dosetupfields[#1][#2][#3][#4]%
+ {\ifsecondargument
+ \def\dodosetupfield[##1][##2][##3][##4][##5]%
+ {\doifdefinedelse{setupfield##1}
+ {\def\dosetupfield[####1][####2][####3][####4][####5]%
+ {\setvalue{setupfield##1}{\dosetupfield[##1][#1,####2,##2][#2,####3,##3][#3,####4,##4][#4,####5,##5]}}%
+ \getvalue{setupfield##1}}
+ {\setvalue{setupfield##1}{\dosetupfield[##1][#1,##2][#2,##3][#3,##4][#4,##5]}}}%
+ \else\iffirstargument
+ \doifelse{#1}{\v!reset}
+ {\let\dodosetupfield\normaldodosetupfield}
+ {\setupfields[][][][#1]}% checken
+ \else
+ \writestatus{fields}{provide either 1 or 4 arguments}%
+ \fi\fi}
+
+\def\setupfields%
+ {\doquadrupleempty\dosetupfields}
+
+% opties: veld, label, kader, vertikaal/horizontaal
+
+\newif\ifShowFieldLabel
+\newif\ifShowFieldFrame
+\newif\ifVerticalField
+\newif\ifHorizontalField
+
+\def\dohandlefield[#1][#2][#3][#4][#5]%
+ {\presetlocalframed[\??fd]%
+ \processallactionsinset
+ [#2]
+ [ \v!label=>\ShowFieldLabeltrue,
+ \v!kader=>\ShowFieldFrametrue,
+ \v!horizontaal=>\HorizontalFieldtrue,
+ \v!vertikaal=>\VerticalFieldtrue]%
+ \ifVerticalField
+ \getparameters[\??fd]
+ [\c!afstand=\!!zeropoint,\c!tussen=\vskip\@@localoffset,
+ \c!uitlijnen=\v!rechts,\c!breedte=20em]%
+ \else\ifHorizontalField
+ \getparameters[\??fd]
+ [\c!afstand=\@@localoffset,\c!tussen=,\c!uitlijnen=\c!links,
+ \c!hoogte=10ex]%
+ \else
+ \getparameters[\??fd]
+ [\c!afstand=\!!zeropoint,\c!tussen=,\c!uitlijnen=\c!links]%
+ \fi\fi
+ \getparameters[\??fd]
+ [\c!n=,\c!voor=,\c!na=\vss,\c!letter=,\c!kleur=,#3]%
+ \reshapeframeboxfalse
+ \ifShowFieldFrame
+ \localframed[\??fd][\c!strut=\v!nee]\bgroup
+ \else
+ \vbox\bgroup
+ \fi
+ \mindermeldingen
+ \ifShowFieldLabel
+ \setbox0=\hbox
+ {\framed
+ [\c!letter=,\c!kleur=,\c!uitlijnen=\c!rechts,#4]
+ {\@@FieldLabel}}%
+ \fi
+ \setbox2=\hbox
+ {\ifVerticalField
+ \setupframed[\c!hoogte=6ex,\c!breedte=\hsize]%
+ \else\ifHorizontalField
+ \setupframed[\c!hoogte=\vsize,\c!breedte=20em]%
+ \else
+ \setupframed[\c!hoogte=2cm,\c!breedte=2cm]%
+ \fi\fi
+ \framed
+ [\c!uitlijnen=\v!rechts,\c!strut=\v!nee,#5]
+ {\getparameters
+ [\??fd]
+ [\c!kleur=,\v!letter=,\c!uitlijnen=\v!rechts,\c!optie=,
+ \c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
+ \c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
+ \c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
+ \c!veldkaderkleur=,#5]%
+ \dimen0=\framedwidth \edef\@@FieldWidth {\number\dimen0}%
+ \dimen0=\framedheight\edef\@@FieldHeight{\number\dimen0}%
+ \vfill
+ \hbox{\lower\@@fdveldoffset\hbox{\typesetfield}}
+ \vss}}%
+ \ifShowFieldLabel
+ \ifVerticalField
+ \copy0
+ \@@fdtussen
+ \else
+ \hbox
+ {\vbox \ifdim\ht2>\ht0 to \ht2 \fi
+ {\@@fdvoor
+ \copy0
+ \@@fdna}%
+ \hskip\@@fdafstand
+ \vbox \ifdim\ht0>\ht2 to \ht0 \fi
+ {\@@fdvoor
+ \box2
+ \@@fdna}}%
+ \fi
+ \else
+ \box2
+ \fi
+ \egroup}
+
+\def\dohandlefitfield[#1][#2][#3][#4][#5]% alleen check
+ {\presetlocalframed[\??fd]%
+ \localframed
+ [\??fd]
+ [\c!strut=\v!nee,\c!kleur=,\v!letter=,\c!optie=,
+ \c!klikin=,\c!klikuit=,\c!gebiedin=,\c!gebieduit=,
+ \c!natoets=,\c!formatteer=,\c!valideer=,\c!bereken=,
+ \c!veldoffset=\!!zeropoint,\c!veldachtergrondkleur=,
+ \c!veldkaderkleur=,#5,\c!uitlijnen=]
+ {\dogetcommacommandelement1\from\@@FieldValues\to\@@FieldValue
+ \ifx\@@FieldValue\empty
+ \let\@@FieldValue\@@FieldDefault
+ \fi
+ \dopresetfieldsymbol\@@FieldValue
+ \setbox0=\hbox{\dogetfieldsymbol{\@@FieldValue}}%
+ \dimen0=\wd0 \edef\@@FieldWidth {\number\dimen0}%
+ \dimen0=\ht0 \edef\@@FieldHeight{\number\dimen0}%
+ \vbox to \ht0
+ {\vfill\hbox to \wd0{\typesetfield\hfill}\vss}}}
+
+%D Common stuff
+
+\newcounter\nofsystemfields
+
+\def\nextsystemfield%
+ {\doglobal\increment\nofsystemfields
+ \def\currentsystemfield{sys::\nofsystemfields}}
+
+%D An example:
+
+\def\fillinfield%
+ {\dosingleempty\dofillinfield}
+
+\def\dofillinfield[#1]#2%
+ {\leavevmode
+ \hbox
+ {\forgetall
+ \setupfields[\v!reset]%
+ \nextsystemfield
+ \useJSscripts[ans]%
+ \doifelsenothing{#1}
+ {\def\therightanswer{#2}}
+ {\def\therightanswer{#1}}%
+ \setbox0=\hbox{#2}%
+ \setbox2=\hbox{\therightanswer}%
+ \dimen0=\ifdim\wd0>\wd2 \wd0 \else \wd2 \fi
+ \advance\dimen0 by .2em
+ \definefield
+ [\currentsystemfield][line][systemfield]%
+ \setupfield
+ [systemfield]
+ [\c!n=100,\c!plaats=\v!laag,\c!strut=\v!ja,\c!veldoffset=0pt,
+ \c!hoogte=1.2\openlineheight,\c!breedte=\dimen0,\c!offset=\v!overlay,
+ \c!letter=,\c!uitlijnen=\v!midden,\c!kader=\v!uit,
+ \c!kleur=red,\c!veldachtergrondkleur=white,\c!veldkaderkleur=blue,
+ \c!valideer=JS(Check_Answer{\currentsystemfield,\therightanswer})]%
+ \switchtobodyfont
+ [\c!klein]%
+ \hbox to \wd0
+ {\copy0\hskip-\wd0\hss\field[\currentsystemfield]\hss}}}
+
+%D and another one:
+
+\def\tooltip%
+ {\dosingleempty\dotooltip}
+
+\def\dotooltip[#1]#2#3%
+ {\bgroup
+ \setupfields[\v!reset]%
+ \useJSscripts[fld]%
+ \setbox0=\hbox
+ {\mindermeldingen
+ \nextsystemfield
+ \setbox0=\hbox{#2}%
+ \definesymbol
+ [\currentsystemfield:txt]
+ [{\inframed[\c!kader=\v!uit,\c!achtergrond=\v!raster]{#3}}]%
+ \setbox2=\hbox{\symbol[\currentsystemfield:txt]}%
+ \definefield
+ [\currentsystemfield:txt][check]
+ [dummy][\currentsystemfield:txt][\currentsystemfield:txt]%
+ \setupfield
+ [dummy]
+ [\c!kader=\v!uit,\c!optie=\v!verborgen]%
+ \hbox to \!!zeropoint
+ {\dimen0=\wd2\advance\dimen0 by -\wd0
+ \doifelse{#1}{\v!links}
+ {\hskip-\dimen0}
+ {\doif{#1}{\v!midden}
+ {\hskip-.5\dimen0}}%
+ \lower\openlineheight\hbox to \!!zeropoint
+ {\fitfield[\currentsystemfield:txt]}}%
+ \dimen0=\ifdim\wd0=\!!zeropoint 3em\else\wd0\fi
+ \definesymbol
+ [\currentsystemfield:but]
+ [{\framed[\c!hoogte=2ex,\c!breedte=\dimen0,\c!kader=\v!uit]{}}]%
+ \definefield
+ [\currentsystemfield:but][push]
+ [dummy][\currentsystemfield:but][\currentsystemfield:but]%
+ \setupfield
+ [dummy]
+ [\c!kader=\v!uit,
+ \c!optie=,
+ \c!gebiedin=JS(Vide_Field{\currentsystemfield:txt}),
+ \c!gebieduit=JS(Hide_Field{\currentsystemfield:txt})]%
+ \lower2ex\hbox to \!!zeropoint
+ {\fitfield[\currentsystemfield:but]}%
+ #2}%
+ \ht0=\ht\strutbox\dp0=\dp\strutbox\box0
+ \egroup}
+
+%D And one more:
+
+\def\definefieldstack%
+ {\dotripleargument\dodefinefieldstack}
+
+\def\dodefinefieldstack[#1][#2][#3]% name, symbols, settings
+ {\doifundefined{fieldstack:#1}
+ {\setgvalue{fieldstack:#1}{\dodofieldstack[#1][#2][#3]}}}
+
+\def\dodofieldstack[#1][#2][#3]%
+ {\bgroup
+ \setupfields[\v!reset]%
+ \definesymbol[\v!leeg][]%
+ \useJSscripts[fld]%
+ \newcounter\stackedfieldnumber
+ \def\dododofieldstack##1%
+ {\increment\stackedfieldnumber
+ \ifnum\stackedfieldnumber=1
+ \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][##1]%
+ \else
+ \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][\v!leeg]%
+ \fi}%
+ \processcommalist[#2]\dododofieldstack
+ \setupfield[#1][#3,\c!optie=\v!alleenleesbaar]%
+ \newcounter\stackedfieldnumber
+ \def\dododofieldstack##1%
+ {\doglobal\increment\stackedfieldnumber
+ \fitfield[#1:\stackedfieldnumber]\egroup\bgroup}%
+ \startoverlay
+ \bgroup
+ \globalprocesscommalist[#2]\dododofieldstack
+ \egroup
+ \stopoverlay
+ \egroup}
+
+\def\dofieldstack[#1][#2][#3]%
+ {\ifsecondargument
+ \dodefinefieldstack[#1][#2][#3]\fieldstack[#1]%
+ \else
+ \getvalue{fieldstack:#1}\setgvalue{fieldstack:#1}{[#1]}%
+ \fi}
+
+\def\fieldstack%
+ {\dotripleempty\dofieldstack}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex
index 4df92a5a4..cdafdf605 100644
--- a/tex/context/base/core-fnt.tex
+++ b/tex/context/base/core-fnt.tex
@@ -1,331 +1,434 @@
-%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\dokap%
- {\ifx\next\bgroup
- \expandafter\dodokap\expandafter\relax
- \else
- \expandafter\dodokap
- \fi}
-
-\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
-\newbox\underbarbox
-
-\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\dodounderbar#1#2#3%
- {\bmath
- \setbox0=\hbox{#3}%
- \setbox2=\getvalue{underbarmethod\@@onvariant}{\wd0}{#1}{#2}%
- \wd0=\!!zeropoint
- \box0\box2
- \emath}
-
-\unexpanded\def\dounderbar#1%
- {\bgroup
- \increment\underbarlevel
- \dimen0=1.5\normallineskip % was \dimen0=1.5\lineskip
- \dimen0=\underbarlevel\dimen0
- \dimen2=\dimen0
- \advance\dimen2 by \@@onlijndikte
- \dodounderbar{-\dimen0}{\dimen2}{#1}%
- \egroup}
-
-\unexpanded\def\underbar#1%
- {\bgroup
- \setbox\underbarbox=\hbox
- {\dounderbar{\hskip\fontdimen2\font}}%
- \def\betweenisolatedwords%
- {\nobreak
- \hskip\!!zeropoint\!!minus\fontdimen4\font
- \discretionary{}{}{\copy\underbarbox}}%
- \processisolatedwords{#1}\dounderbar
- \egroup}
-
-\unexpanded\def\underbars#1%
- {\processisolatedwords{#1}\dounderbar}
-
-\unexpanded\def\dooverstrike#1%
- {\bgroup
- \dimen0=2.5\lineskip
- \dimen2=\dimen0
- \advance\dimen2 by \@@onlijndikte
- \dodounderbar{\dimen2}{-\dimen0}{#1}%
- \egroup}
-
-\unexpanded\def\overstrike#1%
- {\bgroup
- \setbox\underbarbox=\hbox
- {\dooverstrike{\hskip\fontdimen2\font}}%
- \def\betweenisolatedwords%
- {\nobreak
- \hskip\!!zeropoint\!!minus\fontdimen4\font
- \discretionary{}{}{\copy\underbarbox}}%
- \processisolatedwords{#1}\dooverstrike
- \egroup}
-
-\unexpanded\def\overstrikes#1%
- {\processisolatedwords{#1}\dooverstrike}
-
-\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
+%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,userealcaps,usepseudocaps}
+%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}
+%D
+%D The difference between pseudo and real caps is demonstrated
+%D below:
+%D
+%D \startbuffer
+%D \usepseudocaps \kap{Hans Hagen}
+%D \userealcaps \kap{Hans Hagen}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D The \type {\bgroup} trickery below is needed because of
+%D \type {\groupedcommand}.
+
+\def\usepseudocaps%
+ {\def\cap@@uppercase{\the\everyuppercase\uppercase}%
+ \def\cap@@lowercase{\the\everylowercase\lowercase}%
+ \def\cap@@visualize{\tx}}
+
+\def\userealcaps%
+ {\let\cap@@uppercase=\relax
+ %\let\cap@@lowercase=\relax % Definitely not!
+ \def\cap@@visualize{\sc}}
+
+\usepseudocaps
+
+\def\dodokap#1#2%
+ {\ifmmode\hbox\fi
+ \bgroup
+ \cap@@visualize
+ \cap@@uppercase{#1{#2}}%
+ \egroup}
+
+\def\nokap#1%
+ {\cap@@lowercase{#1}}
+
+\unexpanded\def\kap%
+ {\futurelet\next\dokap}
+
+\def\dokap%
+ {\ifx\next\bgroup
+ \expandafter\dodokap\expandafter\relax
+ \else
+ \expandafter\dodokap
+ \fi}
+
+\unexpanded\def\KAP#1%
+ {{\def\\##1{\kap{##1}}#1}}
+
+\unexpanded\def\Kap#1%
+ {\KAP{\\#1}}
+
+\unexpanded\def\Kaps%
+ {\let\processword=\Kap
+ \processwords}
+
+%D Sure:
+
+\let\normalkap\kap
+
+%D Some precautions for a \PLAIN\ \TEX\ definition.
+
+\let\normalcap\cap
+
+\def\cap%
+ {\ifmmode
+ \expandafter\normalcap
+ \else
+ \expandafter\kap
+ \fi}
+
+%D \macros
+%D {setupcapitals}
+%D
+%D By default we use pseudo small caps in titles. This can be
+%D set up with:
+%D
+%D \showsetup{setupcapitals}
+
+\def\setupcapitals%
+ {\dosingleempty\dosetupcapitals}
+
+\def\dosetupcapitals[#1]%
+ {\getparameters[\??kk][#1]%
+ \doifelse{\@@kktitel}{\v!ja}
+ {\definealternativestyle[\v!kapitaal][\normalkap][\normalkap]%
+ \definealternativestyle[\v!smallcaps][\sc][\sc]%
+ \let\kap\normalkap}
+ {\definealternativestyle[\v!kapitaal][\normalkap][\uppercase]%
+ \definealternativestyle[\v!smallcaps][\sc][\uppercase]%
+ \def\kap{\doconvertfont{\v!kapitaal}}}%
+ \doifelse{\@@kksc}{\v!ja}
+ {\userealcaps}
+ {\usepseudocaps}}
+
+\setupcapitals
+ [\c!titel=\v!ja,
+ \c!sc=\v!nee]
+
+%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
+ \the\everyuppercase
+ \def\kap#1{#1}%
+ \edef\next{#1}%
+ \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,
+%D overbar,overbars,
+%D overstrike,overstrikes,
+%D 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} but
+%D sometimes even \overbar{top lines} come into view.}
+%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!overbar}
+%D \showsetup{\y!overbars}
+%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]\underbar{alternative a},
+%D {\setupunderbar [variant=b]\underbar{alternative b},
+%D {\setupunderbar [variant=c]\underbar{alternative c}
+%D and
+%D {\setupunderbar [lijndikte=1pt]\underbar{1pt width},
+%D {\setupunderbar [lijndikte=2pt]\underbar{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
+ {\dimen4=#3
+ \advance\dimen4 by .2ex
+ \hskip-.25em
+ \xleaders
+ \hbox{\hskip.25em\lower\dimen4\hbox{.}}
+ \hfil}}
+
+\def\dododounderbar#1#2#3%
+ {\startmathmode
+ \setbox0=\hbox{#3}%
+ \setbox2=\getvalue{underbarmethod\@@onvariant}{\wd0}{#1}{#2}%
+ \wd0=\!!zeropoint
+ \ht2=\ht0
+ \dp2=\dp0
+ \box0\box2
+ \stopmathmode}
+
+\unexpanded\def\dodounderbar#1%
+ {\bgroup
+ \dimen0=1.5\normallineskip
+ \dimen0=\underbarlevel\dimen0
+ \ifdone \else
+ \advance\dimen0 by -\normallineskip
+ \advance\dimen0 by -\ht\strutbox
+ \fi
+ \dimen2=\dimen0
+ \advance\dimen2 by \@@onlijndikte
+ \dododounderbar{-\dimen0}{\dimen2}{#1}%
+ \egroup}
+
+\def\betweenunderbarwords%
+ {\bgroup
+ \setbox0=\hbox
+ {\dodounderbar{\hskip\fontdimen2\font}}%
+ \nobreak
+ \hskip\!!zeropoint\!!minus\fontdimen4\font
+ \discretionary{}{}{\box0}%
+ \egroup}
+
+\def\betweenunderbarspaces%
+ {\hskip\currentspaceskip}
+
+\unexpanded\def\dounderbar#1#2%
+ {\let\betweenisolatedwords#1%
+ \processisolatedwords{#2}\dodounderbar
+ \egroup}
+
+\unexpanded\def\underbar%
+ {\bgroup
+ \increment\underbarlevel
+ \donetrue
+ \dounderbar\betweenunderbarwords}
+
+\unexpanded\def\underbars%
+ {\bgroup
+ \increment\underbarlevel
+ \donetrue
+ \dounderbar\betweenunderbarspaces}
+
+\unexpanded\def\overbar%
+ {\bgroup
+ \decrement\underbarlevel
+ \donefalse
+ \dounderbar\betweenunderbarwords}
+
+\unexpanded\def\overbars%
+ {\bgroup
+ \decrement\underbarlevel
+ \donefalse
+ \dounderbar\betweenunderbarspaces}
+
+\def\dooverstrike#1%
+ {\bgroup
+ \dimen0=2.5\normallineskip
+ \dimen2=\dimen0
+ \advance\dimen2 by \@@onlijndikte
+ \dododounderbar{\dimen2}{-\dimen0}{#1}%
+ \egroup}
+
+\def\betweenoverstrikewords%
+ {\bgroup
+ \setbox0=\hbox
+ {\dooverstrike{\hskip\fontdimen2\font}}%
+ \nobreak
+ \hskip\!!zeropoint\!!minus\fontdimen4\font
+ \discretionary{}{}{\box0}%
+ \egroup}
+
+\unexpanded\def\overstrike#1%
+ {\bgroup
+ \let\betweenisolatedwords\betweenoverstrikewords
+ \processisolatedwords{#1}\dooverstrike
+ \egroup}
+
+\unexpanded\def\overstrikes#1%
+ {\bgroup
+ \processisolatedwords{#1}\dooverstrike
+ \egroup}
+
+\def\setupunderbar%
+ {\dodoubleargument\getparameters[\??on]}
+
+%D This module has only a few setups:
+
+\setupunderbar
+ [\c!variant=a,
+ \c!lijndikte=\linewidth]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-gen.tex b/tex/context/base/core-gen.tex
index 990d857bc..e3a55839c 100644
--- a/tex/context/base/core-gen.tex
+++ b/tex/context/base/core-gen.tex
@@ -1,179 +1,175 @@
-%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#4%
- {\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 #4}}%
- {#1=#2}}}%
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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 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 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 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#4%
+ {\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 #4}}%
+ {#1=#2}}}%
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 548a1408e..6a18bf6a2 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -1,565 +1,635 @@
-%D \module
-%D [ file=core-grd,
-%D version=1998.03.10,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Grid Snapping (Experimental),
-%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 / Grid Snapping}
-
-\unprotect
-
-%D Moved from supp-box:
-
-%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}
-
-\let\stopbaselinecorrection=\relax
-
-\def\offbaselinecorrection% Can be used inside correction.
- {\def\startbaselinecorrection%
- {\bgroup
- \let\stopbaselinecorrection=\egroup}}
-
-%D \macros
-%D {topbaselinecorrection,botbaselinecorrection}
-%D
-%D The actual top and bottom corrections are implemented as:
-
-\def\topbaselinecorrection%
- {\ifvmode
- \bgroup
- \setbaselinecorrections
- \ifdim\pagegoal<\maxdimen
- \ifdim\pagetotal<\pagegoal
- \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 definitely
- \penalty\outputpenalty % be improved
- \else
- % % should be supp-control
- % \vfill\eject % old
- %
- \nobreak % needed for headings
- \vskip\parskip % cross your fingers
- \vskip\dimen2 % anyhow
- \penalty\outputpenalty
- \vskip-\dimen2
- \fi
- \fi
- \else % probably a preceding
- \witruimte % one-liner
- \nointerlineskip
- \dotopbaselinecorrection
- \fi
- \fi
- \egroup
- \fi}
-
-\def\botbaselinecorrection%
- {\ifvmode
- \bgroup
- \setbaselinecorrections
- \dobotbaselinecorrection
- \prevdepth\dp\strutbox
- \egroup
- \fi}
-
-%D An old one, still to be translated:
-%D
-%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
-\newdimen\noflinesheight
-
-\def\getnoflines#1%
- {\noflinesheight=#1\relax
- \ifdim\noflinesheight=\!!zeropoint\relax
- \noflines=0
- \else
- \divide\noflinesheight by \openlineheight
- \noflines=\noflinesheight
- \ifdim\noflines\openlineheight=#1\relax \else
- \advance\noflines by 1
- \fi
- \fi}
-
-%D Still very experimental and therefore undocumented.
-
-\newif\ifgridsnapping % UNDER DEVELOPMENT, USE WITH CARE
-
-\def\positiveextrasnap {\gdef\extrasnapsign{+}}
-\def\negativeextrasnap {\gdef\extrasnapsign{-}}
-
-\def\extrasnapreset {\global\chardef\@@extrasnap=0
- \positiveextrasnap}
-\def\extrasnapbefore {\global\chardef\@@extrasnap=1 }
-\def\extrasnaparound {\global\chardef\@@extrasnap=2 }
-\def\extrasnapafter {\global\chardef\@@extrasnap=3 }
-
-\def\enablepresnapcorrection {\global\chardef\@@presnap=0 }
-\def\disablepresnapcorrection {\global\chardef\@@presnap=1 }
-
-\extrasnapreset \enablepresnapcorrection
-
-\newif\iftracegridsnapping
-
-\def\snaptogrid#1% #1 == \hbox or \vbox
- {\ifgridsnapping\expandafter\dosnaptogrid\expandafter#1\fi}
-
-\def\tracesnapping%
- {\iftracegridsnapping
- \llap
- {\infofont
- \doglobal\increment\currentsnap
- \color[red]{\vl\presnapskip
- \vl\presnap
- \vl\postsnap
- \vl\ifcase\@@extrasnap
- 00\or
- \extrasnapsign0\or
- \extrasnapsign\extrasnapsign\or
- 0\extrasnapsign\fi
- \vl\currentsnap\vl}}%
- \fi}
-
-\def\dosnaptogrid%
- {\dowithnextbox
- {\bgroup
- \forgetall
- \par
- \ifvbox\nextbox
- \setbox\nextbox=\hbox{\box\nextbox}% don't ask
- \fi
- \scratchskip=\lastskip
- \edef\presnapskip{\the\lastskip}%
- \vbox{\strut}\nobreak\vskip-\openlineheight
- \ifdim\ht\nextbox>\ht\strutbox
- \scratchdimen=\ht\nextbox
- \ifcase\@@presnap
- \ifdim\scratchskip>\!!zeropoint\relax
- \scratchcounter=\scratchskip
- \advance\scratchcounter by -\openlineheight
- \ifnum\scratchcounter<0
- \scratchcounter=-\scratchcounter
- \fi
- \ifnum\scratchcounter<10 % \lastkip is about \openlineheight
- \advance\scratchdimen by -\openstrutdepth
- \edef\presnapskip{*\presnapskip}%
- \else\ifdim\scratchskip>\openlineheight
- %<\openlineheight \else
- \advance\scratchdimen by -\openstrutdepth
- \edef\presnapskip{*\presnapskip}%
- \fi\fi
- \fi
- \fi
- \getnoflines\scratchdimen
- \advance\noflines by -1
- \ifnum\noflines>0
- \scratchdimen=\noflines\lineheight
- \else
- \scratchdimen=\!!zeropoint
- \fi
- \else
- \scratchdimen=\!!zeropoint
- \fi
- \ifnum\@@extrasnap=1 \advance\scratchdimen by \extrasnapsign\lineheight \fi
- \ifnum\@@extrasnap=2 \advance\scratchdimen by \extrasnapsign.5\lineheight \fi
- \edef\presnap{\the\scratchdimen}%
- \ifdim\scratchdimen=\!!zeropoint\else\vskip\scratchdimen\fi
- \ifdim\dp\nextbox>\dp\strutbox
- \getnoflines{\dp\nextbox}%
- \advance\noflines by -1
- \ifnum\noflines>0
- \scratchdimen=\noflines\lineheight
- \else
- \scratchdimen=\!!zeropoint
- \fi
- \else
- \scratchdimen=\!!zeropoint
- \fi
- \ifnum\@@extrasnap=2 \advance\scratchdimen by \extrasnapsign.5\lineheight \fi
- \ifnum\@@extrasnap=3 \advance\scratchdimen by \extrasnapsign\lineheight \fi
- \edef\postsnap{\the\scratchdimen}%
- \ht\nextbox=\ht\strutbox
- \dp\nextbox=\dp\strutbox
- \hbox{\tracesnapping\box\nextbox}%
- \ifdim\scratchdimen=\!!zeropoint\else\vskip\scratchdimen\fi
- \extrasnapreset
- \enablepresnapcorrection
- \egroup}}
-
-\def\snaptomathgrid%
- {\ifgridsnapping
- \dowithnextbox
- {\blanko[\v!regel]
- \snaptogrid\vbox{\box\nextbox}
- \blanko[\v!regel]}
- \vbox\bgroup
- \let\setdisplayskips=\relax
- \abovedisplayskip=\!!zeropoint
- \abovedisplayshortskip=\!!zeropoint
- \belowdisplayskip=\!!zeropoint
- \belowdisplayshortskip=\!!zeropoint
- \@EA\let\@EA\next
- \fi}
-
-\def\topsnaptogrid%
- {\ifgridsnapping
- \dowithnextbox
- {\scratchdimen=\ht\nextbox
- \advance\scratchdimen by -\ht\strutbox
- \advance\scratchdimen by \topskip
- \ht\nextbox=\scratchdimen
- \dp\nextbox=\!!zeropoint
- \box\nextbox
- \kern\lineheight
- \kern-\topskip
- \nointerlineskip}
- \hbox
- \fi}
-
-\def\centertogrid%
- {\ifgridsnapping
- \dowithnextbox
- {\bgroup
- \par
- \scratchdimen=\ht\nextbox
- \advance\scratchdimen by \dp\nextbox
- \getnoflines\scratchdimen
- \setbox\nextbox=\vbox to \noflines\lineheight
- {\forgetall
- \vskip\!!zeropoint plus \ht\nextbox
- \copy\nextbox
- \kern.5\dp\strutbox % VOORLOPIGE WAARDE
- \vskip\!!zeropoint plus \dp\nextbox}
- \noindent\snaptogrid\vbox{\box\nextbox}%
- \egroup}
- \hbox
- \fi}
-
-\ifx\startbaselinecorrection\undefined \wait \fi % change order
-
-\let\normalstartbaselinecorrection=\startbaselinecorrection
-
-\def\startbaselinecorrection%
- {\ifgridsnapping
- \centertogrid\bgroup
- \let\stopbaselinecorrection=\egroup
- \else
- \normalstartbaselinecorrection
- \fi}
-
-\def\setgridbox#1#2#3%
- {\setbox#1=\ruledvbox to #3
- {\forgetall
- \offinterlineskip
- \hsize=#2
- \getnoflines{#3}%
- \vskip\topskip
- \vskip-\ht\strutbox
- \scratchdimen=#2\advance\scratchdimen by \lineheight
- \dorecurse
- {\noflines}
- {\strut
- \hskip-.5\lineheight
- \rlap
- {\hskip\scratchdimen\hskip2pt\infofont
- \hbox to 1em{\hss\recurselevel}}%
- \vrule
- \!!height .5\testrulewidth
- \!!depth .5\testrulewidth
- \!!width \scratchdimen
- \par}
- \vfill}}
-
-%D Some intervention macros:
-
-\def\doverplaatsopgrid[#1]%
- {\processaction
- [#1]
- [ \v!boven=>\positiveextrasnap\extrasnapbefore,
- \v!onder=>\positiveextrasnap\extrasnapafter,
- \v!beide=>\positiveextrasnap\extrasnaparound,
- -\v!boven=>\negativeextrasnap\extrasnapbefore,
- -\v!onder=>\negativeextrasnap\extrasnapafter,
- -\v!beide=>\negativeextrasnap\extrasnaparound,
- \s!default=>\positiveextrasnap\extrasnaparound,
- \s!unknown=>\positiveextrasnap\extrasnapreset]}
-
-\def\verplaatsopgrid%
- {\dosingleempty\doverplaatsopgrid}
-
-\def\doplaatsopgrid[#1]%
- {\doverplaatsopgrid[#1]\snaptogrid\vbox}
-
-\def\plaatsopgrid%
- {\dosingleempty\doplaatsopgrid}
-
-%D Snapping is rather robust as long as we use whole lines.
-%D Half lines of white space can however be handled when they
-%D come in pairs. The corrections needed when crossing page
-%D boundaries in the middle of such a pair, are handled by
-%D macros that are (named) sort of fuzzy. This fuzzy mechanism
-%D was written as an extension to the grid typesetting needed
-%D for typesetting (part of) the \MAPS.
-%D
-%D \starttypen
-%D \setuptyping
-%D [before={\blank[halfline]},
-%D after={\blank[halfline]}]
-%D \stoptypen
-
-\newif\iffuzzysnapdone
-\newif\iffuzzysnapping
-\newif\iffuzzysnapped
-
-\newsignal\fuzzysnapbegin
-\newsignal\fuzzysnapend
-
-\chardef\fuzzysnappedleft=0 % =1 when fuzzybegin still open
-
-\def\beginfuzzysnapping%
- {\ifgridsnapping
- \global\fuzzysnappingtrue
- \iffuzzysnapping
- \kern\fuzzysnapbegin
- \kern-\fuzzysnapbegin
- \fi
- \fi}
-
-\def\endfuzzysnapping%
- {\ifgridsnapping
- \global\fuzzysnappingtrue
- \iffuzzysnapping
- \kern\fuzzysnapend
- \kern-\fuzzysnapend
- \fi
- \fi}
-
-\def\fuzzyvskip#1%
- {\iffuzzysnapdone
- \vskip#1\relax
- \endfuzzysnapping
- \global\fuzzysnapdonefalse
- \else
- \beginfuzzysnapping
- \vskip#1\relax
- \global\fuzzysnapdonetrue
- \fi}
-
-\def\removelastfuzzyvskip%
- {\ifgridsnapping
- \iffuzzysnapping
- \ifdim\lastskip<\openlineheight
- \else
- \removelastskip
- \fi
- \else
- \removelastskip
- \fi
- \else
- \removelastskip
- \fi}
-
-\def\dodocheckfuzzysnap%
- {\ifdim\shapekern=\fuzzysnapbegin
- \ifcase\fuzzysnappedleft
- \global\chardef\fuzzysnappedleft=1
- \fi
- \global\fuzzysnappedfalse
- \else\ifdim\shapekern=\fuzzysnapend
- \ifcase\fuzzysnappedleft
- \global\chardef\fuzzysnappedleft=2
- \fi
- \global\fuzzysnappedtrue
- \fi\fi}
-
-\def\docheckfuzzysnap#1%
- {\beginofshapebox
- \unvcopy#1\relax
- \endofshapebox
- \global\fuzzysnappedfalse
- \global\chardef\fuzzysnappedleft=0
- \doreshapebox{}{}{\dodocheckfuzzysnap}{}}
-
-\def\getfuzzysnapcorrection#1%
- {\global\let\presnapcorrection =\relax
- \global\let\postsnapcorrection=\relax
- \ifgridsnapping\iffuzzysnapping
- \docheckfuzzysnap{#1}%
- \iffuzzysnapped
- \iftracegridsnapping
- \gdef\presnapcorrection{\color[red]{\hrule\!!height.5\openlineheight}}%
- \else
- \gdef\presnapcorrection{\kern.5\openlineheight}%
- \fi
- \gdef\postsnapcorrection{\kern.5\openlineheight}%
- \fi
- \fi\fi}
-
-\def\fuzzysnappedbox#1#2% \box<n> \unvbox<n>
- {\getfuzzysnapcorrection{#2}%
- \presnapcorrection
- #1#2%
- \postsnapcorrection}
-
-\def\adaptfuzzypagegoal%
- {\ifgridsnapping\iffuzzysnapping\ifcase\fuzzysnappedleft\or % see dopagecontents
- \scratchdimen=\pagegoal
- \advance\scratchdimen by -.5\openlineheight
- \global\pagegoal=\scratchdimen
- \global\advance\vsize by -.5\openlineheight
- \global\chardef\fuzzysnappedleft=0
- \fi\fi\fi}
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=core-grd,
+%D version=1998.03.10,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Grid Snapping (Experimental),
+%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 / Grid Snapping}
+
+\unprotect
+
+%D Moved from supp-box:
+
+%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}
+
+\let\stopbaselinecorrection=\relax
+
+\def\offbaselinecorrection% Can be used inside correction.
+ {\def\startbaselinecorrection%
+ {\bgroup
+ \let\stopbaselinecorrection=\egroup}}
+
+%D \macros
+%D {topbaselinecorrection,botbaselinecorrection}
+%D
+%D The actual top and bottom corrections are implemented as:
+
+\def\topbaselinecorrection%
+ {\ifvmode
+ \bgroup
+ \setbaselinecorrections
+ \ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal<\pagegoal
+ \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 % does more harm than good
+ \witruimte
+ \nointerlineskip
+ \dotopbaselinecorrection
+% \else
+% \ifbinnenkolommen
+% % \vskip\dimen2 % this could definitely
+% % \penalty\outputpenalty % be improved
+% \else
+% % %
+% % \vfill\eject % pretty old and wrong
+% %
+% % \nobreak % needed for headings
+% % \vskip\parskip % but often splits
+% % \vskip\dimen2 % normal paragraphs
+% % \penalty\outputpenalty % and therefore
+% % \vskip-\dimen2 % obsolete
+% %
+% % do nothing, sub optimal spacing after headings
+% % still to be sorted out; use manuals as test case
+% \fi
+% \fi
+ \else % probably a preceding
+ \witruimte % one-liner
+ \nointerlineskip
+ \dotopbaselinecorrection
+ \fi
+ \fi
+ \egroup
+ \fi}
+
+\def\botbaselinecorrection%
+ {\ifvmode
+ \bgroup
+ \setbaselinecorrections
+ \dobotbaselinecorrection
+ \allowbreak % new, otherwise problems when many in a row
+ \prevdepth\dp\strutbox
+ \egroup
+ \fi}
+
+%D An old one, still to be translated:
+%D
+%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
+\newdimen\noflinesheight
+
+\def\getnoflines#1%
+ {\noflinesheight=#1\relax
+ \ifdim\noflinesheight=\!!zeropoint\relax
+ \noflines=0
+ \else
+ \divide\noflinesheight by \openlineheight
+ \noflines=\noflinesheight
+ \ifdim\noflines\openlineheight=#1\relax \else
+ \advance\noflines by 1
+ \fi
+ \fi}
+
+%D Still very experimental and therefore undocumented.
+
+\newif\ifgridsnapping % UNDER DEVELOPMENT, USE WITH CARE
+\newif\ifforcepresnap \forcepresnaptrue % false in mixed single/double
+\newif\ifstrutsnapping \strutsnappingtrue % sometimes handy to be false
+
+\def\positiveextrasnap {\gdef\extrasnapsign{+}}
+\def\negativeextrasnap {\gdef\extrasnapsign{-}}
+
+\def\extrasnapreset {\global\chardef\@@extrasnap=0
+ \positiveextrasnap}
+\def\extrasnapbefore {\global\chardef\@@extrasnap=1 }
+\def\extrasnaparound {\global\chardef\@@extrasnap=2 }
+\def\extrasnapafter {\global\chardef\@@extrasnap=3 }
+
+\def\enablepresnapcorrection {\global\chardef\@@presnap=0 }
+\def\disablepresnapcorrection {\global\chardef\@@presnap=1 }
+
+\extrasnapreset \enablepresnapcorrection
+
+\newif\iftracegridsnapping
+\newif\ifshowfuzzyskips
+
+\def\snaptogrid#1% #1 == \hbox or \vbox
+ {\ifgridsnapping\expandafter\dosnaptogrid\expandafter#1\fi}
+
+\def\tracesnapping%
+ {\iftracegridsnapping
+ \llap
+ {\infofont
+ \doglobal\increment\currentsnap
+ \color[red]{\vl\presnapskip
+ \vl\presnap
+ \vl\postsnap
+ \vl\ifcase\@@extrasnap
+ 00\or
+ \extrasnapsign0\or
+ \extrasnapsign\extrasnapsign\or
+ 0\extrasnapsign\fi
+ \vl\currentsnap\vl}}%
+ \fi}
+
+\def\dosnaptogrid%
+ {\dowithnextbox
+ {\bgroup
+ \forgetall
+ \par
+ \ifvbox\nextbox
+ \setbox\nextbox=\hbox{\box\nextbox}% don't ask
+ \fi
+ \scratchskip=\lastskip
+ \edef\presnapskip{\the\lastskip}%
+ % mixing single/double columns sometimes goes wrong,
+ % check 'som' document
+ \ifbinnenkolommen
+ \forcepresnaptrue
+ \fi
+ \ifforcepresnap
+ \vbox{\strut}\nobreak\vskip-\openlineheight
+ \fi
+ %
+ \ifdim\ht\nextbox>\ht\strutbox
+ \scratchdimen=\ht\nextbox
+ \ifcase\@@presnap
+ \ifdim\scratchskip>\!!zeropoint\relax
+ \scratchcounter=\scratchskip
+ \advance\scratchcounter by -\openlineheight
+ \ifnum\scratchcounter<0
+ \scratchcounter=-\scratchcounter
+ \fi
+ \ifnum\scratchcounter<10 % \lastkip is about \openlineheight
+ \advance\scratchdimen by -\openstrutdepth
+ \edef\presnapskip{*\presnapskip}%
+ \else\ifdim\scratchskip>\openlineheight
+ %<\openlineheight \else
+ \advance\scratchdimen by -\openstrutdepth
+ \edef\presnapskip{*\presnapskip}%
+ \fi\fi
+ \fi
+ \fi
+ \getnoflines\scratchdimen
+ \advance\noflines by -1
+ \ifnum\noflines>0
+ \scratchdimen=\noflines\lineheight
+ \else
+ \scratchdimen=\!!zeropoint
+ \fi
+ \else
+ \scratchdimen=\!!zeropoint
+ \fi
+ \ifnum\@@extrasnap=1 \advance\scratchdimen by \extrasnapsign\lineheight \fi
+ \ifnum\@@extrasnap=2 \advance\scratchdimen by \extrasnapsign.5\lineheight \fi
+ \edef\presnap{\the\scratchdimen}%
+ \ifstrutsnapping
+ \ifdim\scratchdimen=\!!zeropoint\else\vskip\scratchdimen\fi
+ \fi
+ \ifdim\dp\nextbox>\dp\strutbox
+ \getnoflines{\dp\nextbox}%
+ \advance\noflines by -1
+ \ifnum\noflines>0
+ \scratchdimen=\noflines\lineheight
+ \else
+ \scratchdimen=\!!zeropoint
+ \fi
+ \else
+ \scratchdimen=\!!zeropoint
+ \fi
+ \ifnum\@@extrasnap=2 \advance\scratchdimen by \extrasnapsign.5\lineheight \fi
+ \ifnum\@@extrasnap=3 \advance\scratchdimen by \extrasnapsign\lineheight \fi
+ \edef\postsnap{\the\scratchdimen}%
+ \ifstrutsnapping
+ \ht\nextbox=\ht\strutbox
+ \dp\nextbox=\dp\strutbox
+ \else
+ \scratchdimen=\presnap
+ \advance\scratchdimen by \ht\strutbox
+ \ht\nextbox=\scratchdimen
+ \scratchdimen=\postsnap
+ \advance\scratchdimen by \dp\strutbox
+ \dp\nextbox=\scratchdimen
+ \fi
+ \hbox{\tracesnapping\box\nextbox}%
+ \ifstrutsnapping
+ \ifdim\scratchdimen=\!!zeropoint\else\vskip\scratchdimen\fi
+ \fi
+ \extrasnapreset
+ \enablepresnapcorrection
+ \egroup}}
+
+\def\snaptomathgrid% probably not working ok
+ {\ifgridsnapping
+ \dowithnextbox
+ {\blanko[\v!regel]
+ \snaptogrid\vbox{\box\nextbox}
+ \blanko[\v!regel]}
+ \vbox\bgroup
+ \let\setdisplayskips=\relax
+ \abovedisplayskip=\!!zeropoint
+ \abovedisplayshortskip=\!!zeropoint
+ \belowdisplayskip=\!!zeropoint
+ \belowdisplayshortskip=\!!zeropoint
+ \@EA\let\@EA\next
+ \fi}
+
+\def\topsnaptogrid%
+ {\ifgridsnapping
+ \dowithnextbox
+ {\scratchdimen=\ht\nextbox
+ \advance\scratchdimen by -\ht\strutbox
+ \advance\scratchdimen by \topskip
+ \ht\nextbox=\scratchdimen
+ \dp\nextbox=\!!zeropoint
+ \box\nextbox
+ \kern\lineheight
+ \kern-\topskip
+ \nointerlineskip}
+ \hbox
+ \fi}
+
+\def\centertogrid%
+ {\ifgridsnapping
+ \dowithnextbox
+ {\bgroup
+ \par
+ \scratchdimen=\ht\nextbox
+ \advance\scratchdimen by \dp\nextbox
+ \getnoflines\scratchdimen
+ \setbox\nextbox=\vbox to \noflines\lineheight
+ {\forgetall
+ \vskip\!!zeropoint plus \ht\nextbox
+ \copy\nextbox
+ \kern.5\dp\strutbox % VOORLOPIGE WAARDE
+ \vskip\!!zeropoint plus \dp\nextbox}
+ \noindent\snaptogrid\vbox{\box\nextbox}%
+ \egroup}
+ \hbox
+ \fi}
+
+\ifx\startbaselinecorrection\undefined \wait \fi % change order
+
+\let\normalstartbaselinecorrection=\startbaselinecorrection
+
+\def\startbaselinecorrection%
+ {\ifgridsnapping
+ \centertogrid\bgroup
+ \let\stopbaselinecorrection=\egroup
+ \else
+ \normalstartbaselinecorrection
+ \fi}
+
+\def\setgridbox#1#2#3%
+ {\setbox#1=\ruledvbox to #3
+ {\forgetall
+ \offinterlineskip
+ \hsize=#2
+ \getnoflines{#3}%
+ \vskip\topskip
+ \vskip-\ht\strutbox
+ \scratchdimen=#2\advance\scratchdimen by \lineheight
+ \dorecurse
+ {\noflines}
+ {\strut
+ \hskip-.5\lineheight
+ \rlap
+ {\hskip\scratchdimen\hskip2pt\infofont
+ \hbox to 1em{\hss\recurselevel}}%
+ \vrule
+ \!!height .5\testrulewidth
+ \!!depth .5\testrulewidth
+ \!!width \scratchdimen
+ \par}
+ \vfill}}
+
+%D Some intervention macros:
+
+\def\gridwarning#1{\message{[beware of #1 extra snap]}}
+
+\def\doverplaatsopgrid[#1]%
+ {\ifgridsnapping
+ \processaction
+ [#1]
+ [ \v!boven=>\gridwarning+\positiveextrasnap\extrasnapbefore,
+ \v!onder=>\gridwarning+\positiveextrasnap\extrasnapafter,
+ \v!beide=>\positiveextrasnap\extrasnaparound,
+ -\v!boven=>\gridwarning-\negativeextrasnap\extrasnapbefore,
+ -\v!onder=>\gridwarning-\negativeextrasnap\extrasnapafter,
+ -\v!beide=>\negativeextrasnap\extrasnaparound,
+ \s!default=>\positiveextrasnap\extrasnaparound,
+ \s!unknown=>\positiveextrasnap\extrasnapreset]%
+ \fi}
+
+\def\verplaatsopgrid%
+ {\dosingleempty\doverplaatsopgrid}
+
+\def\doplaatsopgrid[#1]%
+ {\doverplaatsopgrid[#1]\snaptogrid\vbox}
+
+\def\plaatsopgrid%
+ {\dosingleempty\doplaatsopgrid}
+
+%D Snapping is rather robust as long as we use whole lines.
+%D Half lines of white space can however be handled when they
+%D come in pairs. The corrections needed when crossing page
+%D boundaries in the middle of such a pair, are handled by
+%D macros that are (named) sort of fuzzy. This fuzzy mechanism
+%D was written as an extension to the grid typesetting needed
+%D for typesetting (part of) the \MAPS.
+%D
+%D \starttypen
+%D \setuptyping
+%D [before={\blank[halfline]},
+%D after={\blank[halfline]}]
+%D \stoptypen
+
+\newif\iffuzzysnapdone
+\newif\iffuzzysnapping
+\newif\iffuzzysnapped
+
+\chardef\fuzzysnappedleft=0 % ==1 when fuzzybegin still open
+
+\newpersistentmark\fuzzymark % (!)
+\newcount\fuzzymarker
+\newbox\fuzzysnapbox
+\newbox\fuzzysnapsplit
+
+\def\dosyncfuzzyvskip%
+ {\ifvmode\ifdim\lastskip<\lineheight\ifdim\lastskip>\!!zeropoint
+ \hbox{\strut}
+% \nobreak
+ \kern-2\lineheight
+ \nobreak
+ \vskip\lineheight % on behalf of testing
+ \fi\fi\fi}
+
+\def\fuzzyvskip#1%
+ {\iffuzzysnapdone
+ \endfuzzysnapping
+ \vskip#1\relax
+ \dosyncfuzzyvskip % NEW
+ \global\fuzzysnapdonefalse
+ \else
+ \vskip#1\relax
+ \beginfuzzysnapping
+ \global\fuzzysnapdonetrue
+ \fi}
+
+\def\setfuzzymark#1#2#3% #1/#2 => error recovery
+ {\ifgridsnapping
+ \global\fuzzysnappingtrue
+ \global\advance\fuzzymarker by \ifodd\fuzzymarker#1\else#2\fi
+ \nobreak
+ \ifshowfuzzyskips
+ \hbox{\color[blue]
+ {\llap{\infofont#3\vl\the\fuzzymarker}\nobreak
+ \vrule\!!width\hsize\!!height.1\lineheight}}
+ \nobreak
+ \fi
+ %[\the\fuzzymarker]
+ %\expandafter\fuzzymark\expandafter{\the\fuzzymarker}%
+ \expandafter\setmark\expandafter\fuzzymark\expandafter{\the\fuzzymarker}%
+ \nobreak
+ \fi}
+
+\def\beginfuzzysnapping% odd
+ {\setfuzzymark21\v!start}
+
+\def\endfuzzysnapping% even
+ {\setfuzzymark12\v!stop}
+
+\def\removelastfuzzyvskip%
+ {\ifgridsnapping
+ \iffuzzysnapping
+ \ifdim\lastskip<\openlineheight
+ \else
+ \removelastskip
+ \fi
+ \else
+ \removelastskip
+ \fi
+ \else
+ \removelastskip
+ \fi}
+
+\def\docheckfuzzysnap#1%
+ {\bgroup
+ \mindermeldingen
+ \setbox\fuzzysnapbox=\copy#1\relax
+ \setbox\fuzzysnapsplit=\vsplit\fuzzysnapbox to 1\lineheight
+ \let\topfuzzymark=\empty % indeed here ... no real mark
+ \getsplitmarks\fuzzymark
+% \ifcase0\topfuzzymark
+ \ifcase0\getsplittopmark\fuzzymark
+ \global\chardef\fuzzysnappedleft=0
+ \global\fuzzysnappedfalse
+% \else\ifodd\topfuzzymark
+ \else\ifodd\getsplittopmark\fuzzymark
+ \global\chardef\fuzzysnappedleft=1
+ \global\fuzzysnappedtrue
+ \else
+ \global\chardef\fuzzysnappedleft=2
+ \global\fuzzysnappedtrue
+ \fi\fi
+ \iffuzzysnapped \else
+ \doloop
+ {\ifvoid\fuzzysnapbox
+ \exitloop
+ \else
+ \setbox\fuzzysnapsplit=\vsplit\fuzzysnapbox to \lineheight
+ %\let\topfuzzymark=\empty % ... but not here
+ \getsplitmarks\fuzzymark
+% \ifcase0\topfuzzymark
+ \ifcase0\getsplittopmark\fuzzymark
+ % continue
+% \else\ifodd\topfuzzymark
+ \else\ifodd\getsplittopmark\fuzzymark
+ \exitloop
+ \else
+ \global\chardef\fuzzysnappedleft=1
+ \global\fuzzysnappedtrue
+ \exitloop
+ \fi\fi
+ \fi}%
+ \fi
+ \egroup}
+
+\def\getfuzzysnapcorrection#1%
+ {\global\let\presnapcorrection =\relax
+ \global\let\postsnapcorrection=\relax
+ \ifgridsnapping\iffuzzysnapping
+ \docheckfuzzysnap{#1}%
+ \iffuzzysnapped
+ \iftracegridsnapping
+ \gdef\presnapcorrection%
+ {\color[red]{\hrule\!!height.5\openlineheight\!!width\hsize}}%
+ \else
+ \gdef\presnapcorrection{\kern.5\openlineheight}%
+ \fi
+ \gdef\postsnapcorrection{\kern-.5\openlineheight}% get the height ok
+ \fi
+ \fi\fi}
+
+\def\fuzzysnappedbox#1#2% \box<n> \unvbox<n>
+ {\getfuzzysnapcorrection{#2}%
+ \presnapcorrection
+ #1#2%
+ \postsnapcorrection}
+
+\def\adaptfuzzypagegoal%
+ {\ifgridsnapping\iffuzzysnapping\ifcase\fuzzysnappedleft\or % see dopagecontents
+ \scratchdimen=\pagegoal
+ \advance\scratchdimen by -.5\openlineheight
+ \global\pagegoal=\scratchdimen
+ \global\advance\vsize by -.5\openlineheight
+ \global\chardef\fuzzysnappedleft=0
+ \fi\fi\fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 347e22ae3..2211c8a7d 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -1,214 +1,212 @@
-%D \module
-%D [ file=core-int,
-%D version=1995.1.1,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Interaction,
-%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 Still to be done properly.
-
-\writestatus{loading}{Context Core Macros / Interaction}
-
-\unprotect
-
-\definesystemconstant {link}
-
-\definesystemvariable {lk}
-
-% \expand vs \expanded
-
-% linked registers implementeren als een koppeling == mooier
-
-\presetlocalframed[\??lk]
-
-\newcounter\numberoflinks
-
-\def\stelkoppelingenin%
- {\dodoubleargument\getparameters[\??lk]}
-
-\def\definieerkoppeling[#1]% % local loading !
- {\doifundefined{\s!link:#1:\s!list}
- {\expanded{\definetwopasslist{\s!link:#1}}%
- \expanded{\doloadtwopassdata{\s!link:#1}}%
- \getfirsttwopassdata{\s!link:#1}%
- \setxvalue{\s!link:#1:f}{\twopassdata}%
- \getlasttwopassdata{\s!link:#1}%
- \setxvalue{\s!link:#1:l}{\twopassdata}%
- \setxvalue{\s!link:#1:s}{\noftwopassitems}%
- \gettwopassdata{\s!link:#1}%
- \setxvalue{\s!link:#1:c}{\twopassdata}%
- \setxvalue{\s!link:#1:n}{\twopassdata}}}
-
-\def\koppeling[#1]#2%
- {\bgroup
- \definieerkoppeling[#1]%
- \doglobal\increment\numberoflinks
- \gettwopassdata{\s!link:#1}%
- \edef\numberoflinks {0\getvalue{\s!link:#1:s}}%
- \edef\firstlink {0\getvalue{\s!link:#1:f}}%
- \edef\lastlink {0\getvalue{\s!link:#1:l}}%
- \edef\currentlink {0\getvalue{\s!link:#1:n}}%
- \edef\prevlink {0\getvalue{\s!link:#1:c}}%
- \iftwopassdatafound
- \edef\nextlink {0\twopassdata}%
- \setxvalue{\s!link:#1:n}{\nextlink}%
- \setxvalue{\s!link:#1:c}{\currentlink}%
- \else
- \edef\nextlink {0\getvalue{\s!link:#1:l}}%
- \fi
- \edef\writelink%
- {\writeutilitycommand%
- {\twopassentry%
- {\s!link:#1}%
- {\numberoflinks}%
- {\noexpand\realfolio}}}%
- \writelink
- \ifnum\noflinks<2
- \locationfalse
- \fi
- \iflocation
- \hbox
- {\stelinteractiein[\c!breedte=\!!zeropoint]%
- \def\goto##1##2%
- {\doganaarpagina
- {}%
- {\localframed
- [\??lk]
- {$\ifgoingtopage
- \ifnum##2=\realpageno\relax
- ##1%
- \else
- \color[\locationcolor\@@lkkleur]{##1}%
- \fi
- \else
- ##1%
- \fi$}}%
- [##2]}%
- \goto {\gotobegincharacter} \firstlink\hss
- \ifnum\noflinks>2
- \hskip\@@lkafstand
- \goto {\gobackwardcharacter}\prevlink\hss
- \fi
- \hskip\@@lkafstand
- #2\relax
- \hskip\@@lkafstand
- \ifnum\noflinks>2
- \goto {\goforwardcharacter} \nextlink\hss
- \hskip\@@lkafstand
- \fi
- \goto {\gotoendcharacter} \lastlink}%
- \else
- \hbox{#2}%
- \fi
- \egroup}
-
-\def\definieerkoppeling[#1]% % local loading !
- {\doifundefined{\s!link:#1:\s!list}
- {\expanded{\definetwopasslist{\s!link:#1}}%
- \expanded{\doloadtwopassdata{\s!link:#1}}%
- \getfirsttwopassdata{\s!link:#1}%
- \let\firstlink=\twopassdata
- \getlasttwopassdata{\s!link:#1}%
- \let\lastlink=\twopassdata
- \let\noflinks=\noftwopassitems
- \gettwopassdata{\s!link:#1}%
- \let\currentlink=\twopassdata
- \let\nextlink=\twopassdata
- \setxvalue{\s!link:#1:}%
- {\firstlink:\lastlink:\noflinks:\currentlink:\nextlink}}}
-
-\def\koppeling[#1]#2%
- {\bgroup
- \definieerkoppeling[#1]%
- \doglobal\increment\numberoflinks
- \gettwopassdata{\s!link:#1}%
- \def\next[##1:##2:##3:##4:##5]%
- {\edef\firstlink {0##1}%
- \edef\lastlink {0##2}%
- \edef\noflinks {0##3}%
- \edef\prevlink {0##4}%
- \edef\currentlink{0##5}}%
- \expanded{\next[\getvalue{\s!link:#1:}]}%
- \edef\nextlink%
- {0\iftwopassdatafound\twopassdata\else\lastlink\fi}%
- \setxvalue{\s!link:#1:}%
- {\firstlink:\lastlink:\noflinks:\currentlink:\nextlink}%
- \edef\writelink%
- {\writeutilitycommand%
- {\twopassentry%
- {\s!link:#1}%
- {\numberoflinks}%
- {\noexpand\realfolio}}}%
- \writelink
- \ifnum\noflinks<2
- \locationfalse
- \fi
- \iflocation
- \hbox
- {\stelinteractiein[\c!breedte=\!!zeropoint]%
- \def\goto##1##2%
- {\doganaarpagina
- {}%
- {\localframed
- [\??lk]
- {$\ifgoingtopage
- \ifnum##2=\realpageno\relax
- ##1%
- \else
- \color[\locationcolor\@@lkkleur]{##1}%
- \fi
- \else
- ##1%
- \fi$}}%
- [##2]}%
-% \goto {\gotobegincharacter} \firstlink\hss
-% \ifnum\noflinks>2
-% \hskip\@@lkafstand
-% \goto {\gobackwardcharacter}\prevlink\hss
-% \fi
-% \hskip\@@lkafstand
-% #2\relax
-% \hskip\@@lkafstand
-% \ifnum\noflinks>2
-% \goto {\goforwardcharacter} \nextlink\hss
-% \hskip\@@lkafstand
-% \fi
-% \goto {\gotoendcharacter} \lastlink}%
-%
- #2\relax
- \hskip\@@lkafstand
- \goto {\gotobegincharacter} \firstlink\hss
- \ifnum\noflinks>2
- \goto {\gobackwardcharacter}\prevlink\hss
- \fi
- \ifnum\noflinks>2
- \goto {\goforwardcharacter} \nextlink\hss
- \hskip\@@lkafstand
- \fi
- \goto {\gotoendcharacter} \lastlink}%
-%
- \else
- \hbox{#2}%
- \fi
- \egroup}
-
-\stelkoppelingenin
- [\c!afstand=.25em,
- \c!breedte=\v!passend,
- \c!plaats=\v!laag,
- \c!kleur=\@@iakleur,
- \c!kader=\v!uit,
- \c!achtergrond=,
- \c!achtergrondraster=\@@rsraster,
- \c!achtergrondkleur=]
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=core-int,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Interaction,
+%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 Still to be done properly.
+
+\writestatus{loading}{Context Core Macros / Interaction}
+
+\unprotect
+
+\definesystemconstant {link}
+
+\definesystemvariable {lk}
+
+% \expand vs \expanded
+
+% linked registers implementeren als een koppeling == mooier
+
+\presetlocalframed[\??lk]
+
+\newcounter\numberoflinks
+
+\def\stelkoppelingenin%
+ {\dodoubleargument\getparameters[\??lk]}
+
+\def\definieerkoppeling[#1]% % local loading !
+ {\doifundefined{\s!link:#1:\s!list}
+ {\expanded{\definetwopasslist{\s!link:#1}}%
+ \expanded{\doloadtwopassdata{\s!link:#1}}%
+ \getfirsttwopassdata{\s!link:#1}%
+ \setxvalue{\s!link:#1:f}{\twopassdata}%
+ \getlasttwopassdata{\s!link:#1}%
+ \setxvalue{\s!link:#1:l}{\twopassdata}%
+ \setxvalue{\s!link:#1:s}{\noftwopassitems}%
+ \gettwopassdata{\s!link:#1}%
+ \setxvalue{\s!link:#1:c}{\twopassdata}%
+ \setxvalue{\s!link:#1:n}{\twopassdata}}}
+
+\def\koppeling[#1]#2%
+ {\bgroup
+ \definieerkoppeling[#1]%
+ \doglobal\increment\numberoflinks
+ \gettwopassdata{\s!link:#1}%
+ \edef\numberoflinks {0\getvalue{\s!link:#1:s}}%
+ \edef\firstlink {0\getvalue{\s!link:#1:f}}%
+ \edef\lastlink {0\getvalue{\s!link:#1:l}}%
+ \edef\currentlink {0\getvalue{\s!link:#1:n}}%
+ \edef\prevlink {0\getvalue{\s!link:#1:c}}%
+ \iftwopassdatafound
+ \edef\nextlink {0\twopassdata}%
+ \setxvalue{\s!link:#1:n}{\nextlink}%
+ \setxvalue{\s!link:#1:c}{\currentlink}%
+ \else
+ \edef\nextlink {0\getvalue{\s!link:#1:l}}%
+ \fi
+ \edef\writelink%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!link:#1}%
+ {\numberoflinks}%
+ {\noexpand\realfolio}}}%
+ \writelink
+ \ifnum\noflinks<2
+ \locationfalse
+ \fi
+ \iflocation
+ \hbox
+ {\stelinteractiein[\c!breedte=\!!zeropoint]%
+ \def\goto##1##2%
+ {\doganaarpagina
+ {}%
+ {\localframed
+ [\??lk]
+ {$\ifgoingtopage
+ \ifnum##2=\realpageno\relax
+ ##1%
+ \else
+ \color[\locationcolor\@@lkkleur]{##1}%
+ \fi
+ \else
+ ##1%
+ \fi$}}%
+ [##2]}%
+ \goto {\gotobegincharacter} \firstlink\hss
+ \ifnum\noflinks>2
+ \hskip\@@lkafstand
+ \goto {\gobackwardcharacter}\prevlink\hss
+ \fi
+ \hskip\@@lkafstand
+ #2\relax
+ \hskip\@@lkafstand
+ \ifnum\noflinks>2
+ \goto {\goforwardcharacter} \nextlink\hss
+ \hskip\@@lkafstand
+ \fi
+ \goto {\gotoendcharacter} \lastlink}%
+ \else
+ \hbox{#2}%
+ \fi
+ \egroup}
+
+\def\definieerkoppeling[#1]% % local loading !
+ {\doifundefined{\s!link:#1:\s!list}
+ {\expanded{\definetwopasslist{\s!link:#1}}% \expanded{\doloadtwopassdata{\s!link:#1}}%
+ \getfirsttwopassdata{\s!link:#1}%
+ \let\firstlink=\twopassdata
+ \getlasttwopassdata{\s!link:#1}%
+ \let\lastlink=\twopassdata
+ \let\noflinks=\noftwopassitems
+ \gettwopassdata{\s!link:#1}%
+ \let\currentlink=\twopassdata
+ \let\nextlink=\twopassdata
+ \setxvalue{\s!link:#1:}%
+ {\firstlink:\lastlink:\noflinks:\currentlink:\nextlink}}}
+
+\def\koppeling[#1]#2%
+ {\bgroup
+ \definieerkoppeling[#1]%
+ \doglobal\increment\numberoflinks
+ \gettwopassdata{\s!link:#1}%
+ \def\next[##1:##2:##3:##4:##5]%
+ {\edef\firstlink {0##1}%
+ \edef\lastlink {0##2}%
+ \edef\noflinks {0##3}%
+ \edef\prevlink {0##4}%
+ \edef\currentlink{0##5}}%
+ \expanded{\next[\getvalue{\s!link:#1:}]}%
+ \edef\nextlink%
+ {0\iftwopassdatafound\twopassdata\else\lastlink\fi}%
+ \setxvalue{\s!link:#1:}%
+ {\firstlink:\lastlink:\noflinks:\currentlink:\nextlink}%
+ \edef\writelink%
+ {\writeutilitycommand%
+ {\twopassentry%
+ {\s!link:#1}%
+ {\numberoflinks}%
+ {\noexpand\realfolio}}}%
+ \writelink
+ \ifnum\noflinks<2
+ \locationfalse
+ \fi
+ \iflocation
+ \hbox
+ {\stelinteractiein[\c!breedte=\!!zeropoint]%
+ \def\goto##1##2%
+ {\doganaarpagina
+ {}%
+ {\localframed
+ [\??lk]
+ {$\ifgoingtopage
+ \ifnum##2=\realpageno\relax
+ ##1%
+ \else
+ \color[\locationcolor\@@lkkleur]{##1}%
+ \fi
+ \else
+ ##1%
+ \fi$}}%
+ [##2]}%
+% \goto {\gotobegincharacter} \firstlink\hss
+% \ifnum\noflinks>2
+% \hskip\@@lkafstand
+% \goto {\gobackwardcharacter}\prevlink\hss
+% \fi
+% \hskip\@@lkafstand
+% #2\relax
+% \hskip\@@lkafstand
+% \ifnum\noflinks>2
+% \goto {\goforwardcharacter} \nextlink\hss
+% \hskip\@@lkafstand
+% \fi
+% \goto {\gotoendcharacter} \lastlink}%
+%
+ #2\relax
+ \hskip\@@lkafstand
+ \goto {\gotobegincharacter} \firstlink\hss
+ \ifnum\noflinks>2
+ \goto {\gobackwardcharacter}\prevlink\hss
+ \fi
+ \ifnum\noflinks>2
+ \goto {\goforwardcharacter} \nextlink\hss
+ \hskip\@@lkafstand
+ \fi
+ \goto {\gotoendcharacter} \lastlink}%
+%
+ \else
+ \hbox{#2}%
+ \fi
+ \egroup}
+
+\stelkoppelingenin
+ [\c!afstand=.25em,
+ \c!breedte=\v!passend,
+ \c!plaats=\v!laag,
+ \c!kleur=\@@iakleur,
+ \c!kader=\v!uit,
+ \c!achtergrond=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-mak.tex b/tex/context/base/core-mak.tex
index 0c129345e..c1e012c17 100644
--- a/tex/context/base/core-mak.tex
+++ b/tex/context/base/core-mak.tex
@@ -1,62 +1,61 @@
-%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 Core 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
+%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 Core 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
diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex
new file mode 100644
index 000000000..ca6497481
--- /dev/null
+++ b/tex/context/base/core-mat.tex
@@ -0,0 +1,147 @@
+%D \module
+%D [ file=core-mat,
+%D version=1998.12.07,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Math Fundsmentals,
+%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 / Math Fundamentals}
+
+\unprotect
+
+%D \macros
+%D {big..}
+%D
+%D Because they are related to the bodyfontsize, we redefine
+%D some \PLAIN\ macros.
+
+\def\@@dobig#1#2%
+ {{\hbox{$\left#2\vbox\!!to#1\bodyfontsize{}\right.\n@space$}}}
+
+\def\big {\@@dobig{0.85}}
+\def\Big {\@@dobig{1.15}}
+\def\bigg{\@@dobig{1.45}}
+\def\Bigg{\@@dobig{1.75}}
+
+%D \macros
+%D {bordermatrix}
+%D
+%D We already redefined \type {\bordermatrix} in \type
+%D {font-ini}.
+
+%D \macros
+%D {super, sub}
+%D
+%D \TEX\ uses \type{^} and \type{_} for entering super- and
+%D subscript mode. We want however a bit more control than
+%D normally provided, and therefore provide \type {\super}
+%D and \type{sub}.
+
+\global\let\normalsuper=^
+\global\let\normalsub =_
+
+\newcount\supersubmode
+
+\newevery\everysupersub \EverySuperSub
+
+\appendtoks \advance\supersubmode by 1 \to \everysupersub
+
+% \def\dodosuper#1{\normalsuper{\the\everysupersub#1}}
+% \def\dodosub #1{\normalsub {\the\everysupersub#1}}
+%
+% \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi}
+% \def\dosub {\ifx\next\bgroup\expandafter\dodosub \else\normalsub \fi}
+%
+% \def\super {\futurelet\next\dosuper}
+% \def\sub {\futurelet\next\dosub }
+
+\def\super#1{\normalsuper{\the\everysupersub#1}}
+\def\sub #1{\normalsub {\the\everysupersub#1}}
+
+%D \macros
+%D {enablesupersub}
+%D
+%D We can let \type {^} and \type {_} act like \type {\super}
+%D and \type {\sub} by saying \type {\enablesupersub}.
+
+\bgroup
+\catcode`\^=\@@active
+\catcode`\_=\@@active
+\gdef\enablesupersub%
+ {\catcode`\^=\@@active
+ \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
+ \catcode`\_=\@@active
+ \def_{\ifmmode\expandafter\sub \else\expandafter\normalsub \fi}}
+\egroup
+
+%D \macro
+%D {restoremathstyle}
+%D
+%D We can pick up the current math style by calling \type
+%D {\restoremathstyle}.
+
+\def\restoremathstyle%
+ {\ifmmode
+ \ifcase\supersubmode
+ \textstyle
+ \or
+ \scriptstyle
+ \else
+ \scriptscriptstyle
+ \fi
+ \fi}
+
+%D \macros
+%D {mathstyle}
+%D
+%D If one want to be sure that something is typeset in the
+%D appropriate style, \type {\mathstyle} can be used:
+%D
+%D \starttypen
+%D \mathstyle{something}
+%D \stoptypen
+
+\def\mathstyle#1%
+ {\mathchoice
+ {\displaystyle #1}%
+ {\textstyle #1}%
+ {\scriptstyle #1}%
+ {\scriptscriptstyle#1}}
+
+%D \macros
+%D {frac}
+%D
+%D This is another one Tobias asked for. It replaces the
+%D primitive \type {\over}. We also take the opportunity to
+%D handle math style restorin, which makes sure units and
+%D chemicals come out ok.
+
+\def\frac#1#2%
+ {{{\mathstyle{#1}}\over{\mathstyle{#2}}}}
+
+%D The next macro, \type {\ch}, is \PPCHTEX\ aware. In
+%D formulas one can therefore best use \type {\ch} instead of
+%D \type {\chemical}, especially in fractions.
+
+\ifx\mathstyle\undefined
+ \let\mathstyle\relax
+\fi
+
+\def\ch#1%
+ {\ifx\@@chemicalletter\undefined
+ \mathstyle{\rm#1}%
+ \else
+ \dosetsubscripts
+ \mathstyle{\@@chemicalletter{#1}}%
+ \doresetsubscripts
+ \fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
new file mode 100644
index 000000000..daf382d22
--- /dev/null
+++ b/tex/context/base/core-mis.tex
@@ -0,0 +1,40 @@
+%D \module
+%D [ file=core-01a,
+%D version=1998.01.29,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Miscelaneous,
+%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 / Misc Commands}
+
+\unprotect
+
+%D \macros
+%D {simplifiedcommands, simplifycommands}
+%D
+%D I first needed this simplification in bookmarks. Users can
+%D add their own if needed.
+
+\newtoks\simplifiedcommands
+
+\def\simplifycommands{\the\simplifiedcommands}
+
+%D A possibly growing list:
+
+\appendtoks \def\executesynonym#1#2#3#4{#3}\to\simplifiedcommands
+\appendtoks \def\ { }\to\simplifiedcommands
+\appendtoks\def\type#1{\string\\\strippedcsname#1}\to\simplifiedcommands
+\appendtoks \def\TeX{TeX}\to\simplifiedcommands
+\appendtoks \def\MetaPost{MetaPost}\to\simplifiedcommands
+\appendtoks \def\MetaPost{MetaFont}\to\simplifiedcommands
+\appendtoks \def||{-}\to\simplifiedcommands
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-mul.tex b/tex/context/base/core-mul.tex
index d814e8deb..e2d411ee9 100644
--- a/tex/context/base/core-mul.tex
+++ b/tex/context/base/core-mul.tex
@@ -1,1404 +1,1440 @@
-%D \module
-%D [ file=supp-mul,
-%D version=1998.03.15,
-%D title=\CONTEXT\ Core 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 Core Macros / Multi Column Output}
-
-\unprotect
-
-%D This one will become core-mul.tex!
-
-%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[opelkaar]
-%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{action}{box}} \\
-%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 baseline \\
-%D \interface \type{\ifnormalbottom} \\
-%D put the bottom line at the baseline \\
-%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{\bodyfontsize} \\
-%D the (local) bodyfontsize \\
-%D \interface \type{\openlineheight} \\
-%D the lineheight (including \type{\spacing}) \\
-%D
-%D \interface \type{\Everybodyfont} \\
-%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.
-
-%D A lot of footnote stuff added!
-
-\def\columntextwidth {\zetbreedte}
-\def\columntextheight {\teksthoogte}
-\def\usercolumnwidth {\tekstbreedte}
-
-\def\fixedcolumnheight {\teksthoogte}
-\def\betweencolumns {\hskip\bodyfontsize}
-
-\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% % pas op: geen \teksthoogte, anders steeds smaller
- {\def\columntextwidth{\zetbreedte}}
-
-%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
-\newbox\restofpage
-
-\newbox\savedfloatlist
-
-\newdimen\intercolumnwidth
-\newdimen\localcolumnwidth
-\newdimen\partialpageheight
-\newdimen\savedpagetotal
-
-\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\unvbox\normalpagebox}
-
-%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
- \ifcleverfootnotes
- \doaddinsertionheight\savedfootins
- \else
- \doaddinsertionheight\footins
- \fi}
-
-%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 bodyfont 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
-\ifgridsnapping % evt altijd, nog testen
- \getnoflines\vsize
- \vsize=\noflines\openlineheight
- \advance\vsize by .5\openlineheight % collect enough data
-\fi
- \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
- \flushfootnotes
- \begingroup
- \dontshowcomposition
- \setcolumntextwidth\relax
- \setcolumntextheight\relax
- \widowpenalty=0 % is gewoon beter
- \clubpenalty=0 % zeker bij grids
- \ifsomefloatwaiting
- \showmessage{\m!columns}{6}{\the\savednoffloats}%
- \global\setbox\savedfloatlist=\box\floatlist
- \xdef\restoresavedfloats%
- {\global\savednoffloats=\the\savednoffloats
- \global\setbox\floatlist=\box\savedfloatlist
- \global\noexpand\somefloatwaitingtrue}%
- \global\savednoffloats=0
- \global\somefloatwaitingfalse
- \else
- \global\let\restoresavedfloats=\relax
- \fi
- \dimen0=\pagetotal
- \advance\dimen0 by \parskip
- \advance\dimen0 by \openlineheight
- \ifdim\dimen0<\pagegoal
- \allowbreak
- \else
- % \break Werkt in veel gevallen averechts!
- \fi
- \appendtoks\topskip=1\topskip\to\everybodyfont
- \the\everybodyfont
- \initializemulticolumns\nofcolumns
- \setcolumninserts
- \hangafter=0
- \hangindent=\!!zeropoint
- \everypar{}%
- \ifdim\pagetotal=\!!zeropoint \else
- \vbox{\strut}%
- \vskip-\openlineheight
- \fi
- \global\savedpagetotal=\pagetotal
- \global\singlecolumnout=\output
- \global\output={\global\setbox\partialpage=\vbox{\unvbox\normalpagebox}}%
- \eject
- \global\partialpageheight=\ht\partialpage
- \global\output={\continuousmulticolumnsout}%
- \setcolumnfloats
- \dohandleallcolumns
- {\global\setbox\currenttopcolumnbox=\box\voidb@x}%
- \checkbegincolumnfootnotes
- \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
- \endgroup % here
- \nofcolumns=1
- \setvsize % the outer one!
- \checkendcolumnfootnotes
- \dosomebreak\allowbreak
- \restoresavedfloats}
-
-%D NEW: still to be documented!
-
-\newinsert\savedfootins
-
-\def\checkbegincolumnfootnotes%
- {\ifcleverfootnotes
- \doflushfootnotes
- \ifdim\ht\footins>\!!zeropoint
- \global\setbox\savedfootins=\box\footins
- \else
- \global\setbox\savedfootins=\box\voidb@x
- \fi
- \global\skip\savedfootins=\skip\footins
- \global\count\savedfootins=\count\footins
- \setupfootnotes
- \else
- \global\skip\savedfootins=\skip\footins
- \global\setbox\savedfootins=\box\voidb@x
- \global\count\savedfootins=\count\footins
- \setupfootnotes
-\global\multiply\count\footins by \nofcolumns % gaat mis bij lokale
- \fi}
-
-\def\checkendcolumnfootnotes%
- {\ifcleverfootnotes\ifvoid\savedfootins\else
- \global\setbox\footins=\box\savedfootins
- \fi\fi
- \global\skip\footins=\skip\savedfootins
- \global\count\footins=\count\savedfootins}
-
-%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
- \forgetall
- \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
- \overlaycolumnfootnotes
- \setbox0=\vbox
- {\hbox to \globalcolumnwidth
- {\dohandleallcolumns
- {\finishcolumnbox{\hbox{\box\currentcolumnbox}}%
- \ifnum\currentcolumn<\nofcolumns
- \hfil\betweencolumns\hfil
- \fi}}}%
- \dohandleallcolumns
- {\global\setbox\currenttopcolumnbox=\box\voidb@x}%
- \ifvoid\partialpage \else
- \ifgridsnapping % do you believe this junk?
- \scratchdimen=\savedpagetotal
- \advance\scratchdimen by -\ht\partialpage
- \advance\scratchdimen by -\dp\partialpage
- \advance\scratchdimen by -\topskip
- \box\partialpage
- \kern\scratchdimen
- \else
- \unvbox\partialpage
- \fi
- \fi
- \global\partialpageheight=\!!zeropoint
- \setvsize
- \dosomebreak\nobreak
- \dp0=\!!zeropoint
- \prevdepth\openstrutdepth % \dp\strutbox
- \nointerlineskip
- \box0
- \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\splitcolumn#1from \box#2to \dimen#3 top \box#4%
-% {\bgroup
-% \ifdim\ht#4>\!!zeropoint
-% \dimen0=\dimen#3\relax
-% \dimen2=\dimen2
-% \advance\dimen0 by -\ht#4%
-% \columnfootnotecorrection{#1}{\dimen0}%
-% \setbox0=\vsplit#2 to \dimen0
-% \global\setbox#1=\vbox to \dimen2
-% {\ifgridsnapping
-% \dimen0=-\openstrutheight\advance\dimen0 by \topskip
-% \vskip\dimen0\copy#4\vskip-\dimen0
-% \else
-% \unvcopy#4%
-% \fi
-% \unvbox0
-% \fakecolumnfootnotes{#1}}%
-% \else
-% \ifcleverfootnotes
-% \columnfootnotecorrection{#1}{\dimen#3}%
-% \setbox0=\vsplit#2 to \dimen#3%
-% \global\setbox#1=\vbox to \dimen#3%
-% {\unvbox0
-% \fakecolumnfootnotes{#1}}%
-% \else
-% \global\setbox#1=\vsplit#2 to \dimen#3%
-% \fi
-% \fi
-% \egroup}
-
-\def\splitcolumn#1from \box#2to \dimen#3 top \box#4%
- {\bgroup
- \ifdim\ht#4>\!!zeropoint
- \dimen0=\dimen#3\relax
- \dimen2=\dimen2
- \advance\dimen0 by -\ht#4%
- \columnfootnotecorrection{#1}{\dimen0}%
- \setbox0=\vsplit#2 to \dimen0
- \global\setbox#1=\vbox to \dimen2
- {\ifgridsnapping
- \dimen0=-\openstrutheight\advance\dimen0 by \topskip
- \vskip\dimen0\copy#4\vskip-\dimen0
- \else
- \unvcopy#4%
- \fi
- \fuzzysnappedbox\unvbox0
- \fakecolumnfootnotes{#1}}%
- \else
- \ifcleverfootnotes
- \columnfootnotecorrection{#1}{\dimen#3}%
- \setbox0=\vsplit#2 to \dimen#3%
- \global\setbox#1=\vbox to \dimen#3%
- {\fuzzysnappedbox\unvbox0
- \fakecolumnfootnotes{#1}}%
- \else
- \global\setbox#1=\vsplit#2 to \dimen#3%
- \global\setbox#1=\vbox
- {\fuzzysnappedbox\unvbox{#1}}% % or \box ?
- \fi
- \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}}
-
-% \def\splitlastcolumn from \box#1to \dimen#2%
-% {\global\setbox\lastcolumnbox=\vbox
-% {\unvcopy\lasttopcolumnbox
-% \unvbox#1
-% \fakecolumnfootnotes\lastcolumnbox}}
-
-\def\splitlastcolumn from \box#1to \dimen#2%
- {\global\setbox\lastcolumnbox=\vbox
- {\unvcopy\lasttopcolumnbox
- \fuzzysnappedbox\unvbox{#1}%
- \fakecolumnfootnotes\lastcolumnbox}}
-
-%D NEW: still to be documented.
-
-\def\fakecolumnfootnotes#1%
- {\relax
- \ifcleverfootnotes
- \ifnum#1=\lastcolumnbox
- \ifdim\ht\footins>\!!zeropoint
- \vskip\skip\footins
- \vskip\ht\footins
- \fi
- \fi
- \fi}
-
-\def\columnfootnotecorrection#1#2%
- {\relax
- \ifcleverfootnotes
- \ifnum#1=\lastcolumnbox\relax
- \ifdim\ht\footins>\!!zeropoint
- \advance#2 by -\ht\footins
- \advance#2 by -\skip\footins
- \fi
- \fi
- \fi}
-
-\def\overlaycolumnfootnotes% VERVANGEN !!!
- {\relax
- \ifcleverfootnotes\ifdim\ht\footins>\!!zeropoint
- \bgroup
- %\ifgridsnapping
- \scratchdimen=\ht\firstcolumnbox
- \advance\scratchdimen by -\openstrutdepth % \dp\strutbox
- \getnoflines\scratchdimen
- \advance\noflines by -2
- \scratchdimen=\noflines\lineheight
- \advance\scratchdimen by \topskip
- \setbox0=\hbox
- {\lower\scratchdimen\vbox{\placefootnoteinserts}}%
- \ht0=\openstrutheight % \ht\strutbox
- \dp0=\openstrutdepth % \dp\strutbox
- \scratchdimen=\ht\lastcolumnbox
- \global\setbox\lastcolumnbox=\vbox to \scratchdimen
- {\box\lastcolumnbox
- \vskip-\scratchdimen
- \box0}%
- %\else
- % \setbox0=\vbox to \ht\lastcolumnbox
- % {\vfill\placefootnoteinserts}%
- % \scratchdimen=\wd\lastcolumnbox
- % \wd0=\wd\lastcolumnbox
- % \wd\lastcolumnbox=\!!zeropoint
- % \global\setbox\lastcolumnbox=\hbox
- % {\box\lastcolumnbox\box0}%
- %\fi
- \egroup
- \fi\fi}
-
-
-%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 -\partialpageheight
-% \getinsertionheights\to\dimen2\\% toegevoegd ivm voetnoten
-% \ifgridsnapping
-% \getnoflines{\dimen2}%
-% \advance\dimen0 by -\noflines\openlineheight
-%\getnoflines{\dimen0}\dimen0=\noflines\openlineheight
-% \else
-% \advance\dimen0 by -\dimen2
-% \fi
-%
- \dimen0=\columntextheight
- \getinsertionheights\to\dimen2\\% toegevoegd ivm voetnoten
- \advance\dimen2 by \partialpageheight
- \ifgridsnapping
- \getnoflines{\dimen2}%
- \advance\dimen0 by -\noflines\openlineheight
- \getnoflines{\dimen0}%
- \dimen0=\noflines\openlineheight
- \else
- \advance\dimen0 by -\dimen2
- \fi
-%
- \dohandleallcolumns
- {\splitcurrentcolumn from \box\normalpagebox to \dimen0}
- \setbox\restofpage=\vbox{\unvbox\normalpagebox}%
- \ifinheritcolumns
- \ifr@ggedbottom
- \dohandleallcolumns
- {\global\setbox\currentcolumnbox=\vbox to \dimen0
- {\dimen0=\dp\currentcolumnbox
- \unvbox\currentcolumnbox
- \vskip-\dimen0
- \vskip\openstrutdepth % \dp\strutbox
- \prevdepth\openstrutdepth % \dp\strutbox
- \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
- \setbox\partialpage=\vbox{\flushcolumnedpage}%
- \finaloutput\box\partialpage
- \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{\unvbox\normalpagebox}%
- \ifdim\ht0>\openlineheight
- \dimen0=\ht0
- \advance\dimen0 by \topskip
- \advance\dimen0 by -\baselineskip
- \divide\dimen0 by \nofcolumns
- \vbadness=\!!tenthousand\relax
- \count255=0
- \bgroup
- \ifgridsnapping
- \dimen2=\lineheight
- \else
- \dimen2=\!!onepoint % RUBISH
- \dimen2=\spacingfactor\dimen2
- \fi
- \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}%
- \ifnum\count255>100\relax
- \donefalse
- \else\ifdim\dimen4>\ht2
- \donetrue
- \else
- \donefalse
- \fi\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
- \allowbreak
- \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={\flushfootnotes\flushcolumnfloat\flushmargincontents\checkindentation}
- \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=\pagetotal
- \else
- \dimen0=\!!zeropoint
- \fi
- \dimen2=\!!zeropoint
- \count255=0
- \dimen8=\columntextheight
- \advance\dimen8 by -\partialpageheight
- \def\dogetcolumnstatus%
- {\advance\count255 by 1
- \advance\dimen2 by \ht\currenttopcolumnbox
- \advance\dimen2 by \dp\currenttopcolumnbox
- \dimen4=\dimen2
- \advance\dimen4 by \dimen0
- \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
- \bgroup
- \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
-\ifgridsnapping\ifnum\count255=\nofcolumns\ifvoid\footins\else
- \advance\dimen0 by 1.5\openlineheight % nog nodig ?
-\fi\fi\fi
- \setbox\scratchbox=\vbox
- {\blanko[\@@bkvoorwit]
- \snaptogrid\vbox{\copy\floatbox}}
- \advance\dimen0 by \ht\scratchbox
- \advance\dimen0 by .5\lineheight % needed because goal a bit higher
- \ifdim\dimen0>\dimen2
- \global\roomforfloatfalse
- \else
- \global\roomforfloattrue
- \fi
- \egroup
- \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)!
-
-\newif\ifflushingcolumnfloats \flushingcolumnfloatstrue
-
-\def\doflushcolumnfloat%
- {\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting
- \bgroup
- \forgetall
- \let\doflushcolumnfloat=\relax
- \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
- \ifdim\dimen0>\!!zeropoint
- \dogetfloat
- \ifdim\wd\floatbox>\hsize
- \doresavefloat
- \else
- \setbox2=\vbox
- {\blanko[\@@bkvoorwit]
- \snaptogrid\vbox{\copy\floatbox}%
- \blanko[\@@bknawit]}%
- \advance\dimen0 by \ht2
- \ifdim\dimen0>\dimen2
- \showmessage{\m!columns}{12}{}%
- \ifnum\count255<\nofcolumns
- \advance\count255 by 1
- \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}%
- \ifdim\ht\currenttopcolumnbox=\!!zeropoint
- \global\setbox\currenttopcolumnbox=\vbox
- {\snaptogrid\vbox{\copy\floatbox}
- \witruimte % nodig ?
- \blanko[\@@bknawit]}%
- \dimen4=\ht\currenttopcolumnbox
- \advance\dimen4 by \dp\currenttopcolumnbox
- \global\advance\vsize by -\dimen4
- \advance\dimen4 by -\pagegoal
- \global\pagegoal=-\dimen4
- \else
- \doresavefloat
- \fi
- \else
- \doresavefloat
- \fi
- \else
- \ifhmode{\setbox0=\lastbox}\fi% waar is die er in geslopen
- \par
- \ifdim\prevdepth<\!!zeropoint\relax % anders bovenaan kolom witruimte
- \else
- \blanko[\@@bkvoorwit]
- \fi
- \flushfloatbox
- \blanko[\@@bknawit]
- \fi
- \fi
- \fi
- \egroup
- \fi\fi\fi}
-
-%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
- \forgetall
-% \ifnum\savednoffloats>1\relax % no \ifsomefloatwaiting
-% \ifnum\savednoffloats>0\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
- {\snaptogrid\hbox{\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
- \count0=0
- \else
- \dimen0=\count0\hsize
- \advance\dimen0 by \count0\intercolumnwidth
- \advance\dimen0 by -\intercolumnwidth
- \global\setbox\floatbox=\hbox to \dimen0
- {\hss\hbox{\copy\floatbox}\hss}%
- \fi
- \showmessage{\m!columns}{13}{}%
- \else
- % \showmessage{\m!columns}{13}{}%
- \fi
- \ifdim\ht\floatbox>\!!zeropoint\relax
- \global\setbox\currenttopcolumnbox=\vbox
- {\snaptogrid\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
+%D \module
+%D [ file=core-mul,
+%D version=1998.03.15,
+%D title=\CONTEXT\ Core 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 Core Macros / Multi Column Output}
+
+\unprotect
+
+%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[opelkaar]
+%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{action}{box}} \\
+%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 baseline \\
+%D \interface \type{\ifnormalbottom} \\
+%D put the bottom line at the baseline \\
+%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{\bodyfontsize} \\
+%D the (local) bodyfontsize \\
+%D \interface \type{\openlineheight} \\
+%D the lineheight (including \type{\spacing}) \\
+%D
+%D \interface \type{\Everybodyfont} \\
+%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{\postprocesscolumnbox} \\
+%D do something with each columnbox (also 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.
+
+%D A lot of footnote stuff added!
+
+\def\finalcolumntextwidth {\zetbreedte}
+\def\finalcolumntextheight {\teksthoogte}
+\def\columntextwidth {\zetbreedte}
+\def\columntextheight {\teksthoogte}
+\def\usercolumnwidth {\tekstbreedte}
+\def\columntextoffset {\!!zeropoint}
+
+\def\fixedcolumnheight {\teksthoogte}
+\def\betweencolumns {\hskip\bodyfontsize}
+
+\def\setcolumnwarnings {\dontcomplaincolumnboxes}
+\def\setcolumninserts {\dontpermitcolumninserts}
+
+\let\setcolumnfloats \relax % in CONTEXT used for floats
+\let\flushcolumnfloats \relax % in CONTEXT used for floats
+\let\flushcolumnfloat \relax % in CONTEXT used for floats
+\let\finishcolumnbox \relax % in CONTEXT used for backgrounds
+
+% %D In fact, the column height and width are set by means of
+% %D two macro's. One can change their meaning if needed:
+%
+% \def\setcolumntextheight%
+% {\def\columntextheight{\teksthoogte}}
+%
+% \def\setcolumntextwidth%
+% {\def\columntextwidth{\zetbreedte}}
+
+%D Both macros are redefined in \CONTEXT\ when backgrounds
+%D are applied to columns. The final values are used when
+%D flushing the 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
+\newbox\restofpage
+
+\newbox\savedfloatlist
+
+\newdimen\intercolumnwidth
+\newdimen\localcolumnwidth
+\newdimen\partialpageheight
+\newdimen\savedpagetotal
+
+\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\unvbox\normalpagebox}
+
+%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
+ \ifcleverfootnotes
+ \doaddinsertionheight\savedfootins
+ \else
+ \doaddinsertionheight\footins
+ \fi}
+
+%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
+ \advance\localcolumnwidth by -\leftskip
+ \advance\localcolumnwidth by -\rightskip
+ \advance\localcolumnwidth by -\nofcolumns\intercolumnwidth
+ \advance\localcolumnwidth by \intercolumnwidth
+ \divide\localcolumnwidth by \nofcolumns
+\dimen0=\columntextoffset
+\multiply\dimen0 by 2
+\advance\localcolumnwidth by -\dimen0
+ \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 bodyfont switches inside
+%D multi||column mode.
+
+\def\setcolumnvsize%
+ {%\global\vsize=\columntextheight
+\global\vsize=-\columntextoffset
+\global\multiply\vsize by 2
+\global\advance\vsize by \columntextheight
+ \ifdim\partialpageheight>\!!zeropoint
+ \global\advance\vsize by -\partialpageheight
+ \fi
+ \getinsertionheights\to\dimen0\\%
+ \global\advance\vsize by -\dimen0
+ \ifgridsnapping % evt altijd, nog testen
+ \getnoflines\vsize
+ \vsize=\noflines\openlineheight
+ \advance\vsize by .5\openlineheight % collect enough data
+ \fi
+ \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
+ \flushfootnotes
+ \xdef\precolumndepth{\the\prevdepth}%
+ \begingroup
+ \dontshowcomposition
+ %\setcolumntextwidth\relax
+ %\setcolumntextheight\relax
+ \widowpenalty=0 % is gewoon beter
+ \clubpenalty=0 % zeker bij grids
+ \ifsomefloatwaiting
+ \showmessage{\m!columns}{6}{\the\savednoffloats}%
+ \global\setbox\savedfloatlist=\box\floatlist
+ \xdef\restoresavedfloats%
+ {\global\savednoffloats=\the\savednoffloats
+ \global\setbox\floatlist=\box\savedfloatlist
+ \global\noexpand\somefloatwaitingtrue}%
+ \global\savednoffloats=0
+ \global\somefloatwaitingfalse
+ \else
+ \global\let\restoresavedfloats=\relax
+ \fi
+ \dimen0=\pagetotal
+ \advance\dimen0 by \parskip
+ \advance\dimen0 by \openlineheight
+ \ifdim\dimen0<\pagegoal
+ \allowbreak
+ \else
+ \break % Sometimes fails
+ \fi
+ \appendtoks\topskip=1\topskip\to\everybodyfont
+ \the\everybodyfont
+ \initializemulticolumns\nofcolumns
+ \setcolumninserts
+ \hangafter=0
+ \hangindent=\!!zeropoint
+ \everypar{}%
+ \ifdim\pagetotal=\!!zeropoint \else
+ \vbox{\forgetall\strut}%
+ \vskip-\openlineheight
+ \fi
+ \global\savedpagetotal=\pagetotal
+ \global\singlecolumnout=\output
+ \global\output={\global\setbox\partialpage=\vbox{\unvbox\normalpagebox}}%
+ \bgroup
+ \holdinginserts=1
+ \eject
+ \egroup
+% \holdinginserts=0
+ \global\partialpageheight=\ht\partialpage
+ \global\output={\continuousmulticolumnsout}%
+ \setcolumnfloats
+ \dohandleallcolumns
+ {\global\setbox\currenttopcolumnbox=\box\voidb@x}%
+ \checkbegincolumnfootnotes
+ \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 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%
+ {%\par
+ \vskip\lineheight\vskip-\lineheight % take footnotes into account
+ \dontshowcomposition
+ \doflushcolumnfloats % added recently
+ \flushfootnotes
+ \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
+ \endgroup % here
+ \nofcolumns=1
+ \setvsize % the outer one!
+ \checkendcolumnfootnotes
+ \dosomebreak\allowbreak
+ \restoresavedfloats}
+
+%D NEW: still to be documented!
+
+\newinsert\savedfootins
+
+\def\checkbegincolumnfootnotes%
+ {\ifcleverfootnotes
+ \doflushfootnotes
+ \ifdim\ht\footins>\!!zeropoint
+ \global\setbox\savedfootins=\box\footins
+ \else
+ \global\setbox\savedfootins=\box\voidb@x
+ \fi
+ \global\skip\savedfootins=\skip\footins
+ \global\count\savedfootins=\count\footins
+ \setupfootnotes
+ \else
+ \global\skip\savedfootins=\skip\footins
+ \global\setbox\savedfootins=\box\voidb@x
+ \global\count\savedfootins=\count\footins
+ \setupfootnotes
+ \fi}
+
+\def\checkendcolumnfootnotes%
+ {\ifcleverfootnotes\ifvoid\savedfootins\else
+ \global\setbox\footins=\box\savedfootins
+ \fi\fi
+ \global\skip\footins=\skip\savedfootins
+ \global\count\footins=\count\savedfootins}
+
+%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 % dangerous
+ \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
+ \forgetall
+ \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
+ \overlaycolumnfootnotes
+ \setbox0=\vbox
+ {\hbox to \finalcolumntextwidth
+ {\dohandleallcolumns
+ {\finishcolumnbox{\hbox
+ {\ifx\finishcolumnbox\relax\else\strut\fi
+ \box\currentcolumnbox}}%
+ \ifnum\currentcolumn<\nofcolumns
+ \hfil
+ \fi}}}%
+ \scratchdimen=\!!zeropoint
+ \dohandleallcolumns
+ {\ifdim-\ht\currenttopcolumnbox<\scratchdimen
+ \scratchdimen=-\ht\currenttopcolumnbox
+ \fi
+ \global\setbox\currenttopcolumnbox=\box\voidb@x}%
+ \advance\scratchdimen by \ht0
+ \setbox2=\hbox to \columntextwidth
+ {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0
+ \dostepwiserecurse{2}{\nofcolumns}{1}{\hfil\betweencolumns}\hfil}%
+ \setbox0=\hbox
+ {\box0\hskip-\columntextwidth\color[black]{\box2}}%
+ \ifvoid\partialpage \else
+ \ifgridsnapping % do you believe this junk?
+ \scratchdimen=\savedpagetotal
+ \advance\scratchdimen by -\ht\partialpage
+ \advance\scratchdimen by -\dp\partialpage
+ \advance\scratchdimen by -\topskip
+ \box\partialpage
+ \kern\scratchdimen
+ \else
+ \unvbox\partialpage
+ \fi
+ \fi
+ \global\partialpageheight=\!!zeropoint
+ \setvsize
+ \dosomebreak\nobreak
+ \ifgridsnapping \else
+ \dimen0=\topskip
+ \advance\dimen0 by -\openstrutheight
+ \nointerlineskip
+ \vskip-\dimen0
+ \fi
+ \prevdepth\openstrutdepth
+ \nointerlineskip
+ \dp0=\!!zeropoint
+ \box0
+ \egroup}
+
+%D In case one didn't notice, finaly \type{\finishcolumnbox} is
+%D applied to all boxes. One can use these hooks 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% or \postprocesscolumnbox
+%D {\ruledhbox{\box#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\unhbox#1\relax
+%D \else
+%D \relax\unhbox#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%
+ {\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\shapebox}%
+ \ht\shapebox=\dimen0
+ \dp\shapebox=\dimen2
+ \box\shapebox}%
+ \flushshapebox
+ \everypar{}\parskip\!!zeropoint % = \forgetall
+ \strut\endgraf
+ \vskip-\lineheight
+ \vfil}}%
+ \fi
+ \ifx\postprocesscolumnbox\undefined \else
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\hbox
+ {\postprocesscolumnbox\currentcolumnbox}}
+ \fi}
+
+%D We default to doing nothing!
+
+\let\postprocesscolumnline=\undefined
+\let\postprocesscolumnbox =\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\splitcolumn#1from \box#2to \dimen#3 top \box#4%
+% {\bgroup
+% \ifdim\ht#4>\!!zeropoint
+% \dimen0=\dimen#3\relax
+% \dimen2=\dimen2
+% \advance\dimen0 by -\ht#4%
+% \columnfootnotecorrection{#1}{\dimen0}%
+% \setbox0=\vsplit#2 to \dimen0
+% \global\setbox#1=\vbox to \dimen2
+% {\ifgridsnapping
+% \dimen0=-\openstrutheight\advance\dimen0 by \topskip
+% \vskip\dimen0\copy#4\vskip-\dimen0
+% \else
+% \unvcopy#4%
+% \fi
+% \unvbox0
+% \fakecolumnfootnotes{#1}}%
+% \else
+% \ifcleverfootnotes
+% \columnfootnotecorrection{#1}{\dimen#3}%
+% \setbox0=\vsplit#2 to \dimen#3%
+% \global\setbox#1=\vbox to \dimen#3%
+% {\unvbox0
+% \fakecolumnfootnotes{#1}}%
+% \else
+% \global\setbox#1=\vsplit#2 to \dimen#3%
+% \fi
+% \fi
+% \egroup}
+
+\def\splitcolumn#1from \box#2to \dimen#3 top \box#4%
+ {\bgroup
+ \ifdim\ht#4>\!!zeropoint
+ \dimen0=\dimen#3\relax
+ \dimen2=\dimen0
+ \advance\dimen0 by -\ht#4%
+ \columnfootnotecorrection{#1}{\dimen0}%
+ \setbox0=\vsplit#2 to \dimen0
+ \global\setbox#1=\vbox to \dimen2
+ {\ifgridsnapping
+ \dimen0=-\openstrutheight\advance\dimen0 by \topskip
+ \vskip\dimen0\copy#4\vskip-\dimen0
+ \else
+ \unvcopy#4%
+ \fi
+ \fuzzysnappedbox\unvbox0
+ \fakecolumnfootnotes{#1}}%
+ \else
+ \ifcleverfootnotes
+ \columnfootnotecorrection{#1}{\dimen#3}%
+ \setbox0=\vsplit#2 to \dimen#3%
+ \global\setbox#1=\vbox to \dimen#3%
+ {\fuzzysnappedbox\unvbox0
+ \fakecolumnfootnotes{#1}}%
+ \else
+ \global\setbox#1=\vsplit#2 to \dimen#3%
+ \global\setbox#1=\vbox
+ {\fuzzysnappedbox\unvbox{#1}}% % or \box ?
+ \fi
+ \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}}
+
+% \def\splitlastcolumn from \box#1to \dimen#2%
+% {\global\setbox\lastcolumnbox=\vbox
+% {\unvcopy\lasttopcolumnbox
+% \unvbox#1
+% \fakecolumnfootnotes\lastcolumnbox}}
+
+\def\splitlastcolumn from \box#1to \dimen#2%
+ {\global\setbox\lastcolumnbox=\vbox
+ {\unvcopy\lasttopcolumnbox
+ \fuzzysnappedbox\unvbox{#1}%
+ \fakecolumnfootnotes\lastcolumnbox}}
+
+%D NEW: still to be documented.
+
+\def\fakecolumnfootnotes#1%
+ {\relax
+ \ifcleverfootnotes
+ \ifnum#1=\lastcolumnbox
+ \ifdim\ht\footins>\!!zeropoint
+ \vskip\skip\footins
+ \vskip\ht\footins
+ \fi
+ \fi
+ \fi}
+
+\def\columnfootnotecorrection#1#2%
+ {\relax
+ \ifcleverfootnotes
+ \ifnum#1=\lastcolumnbox\relax
+ \ifdim\ht\footins>\!!zeropoint
+ \advance#2 by -\ht\footins
+ \advance#2 by -\skip\footins
+ \fi
+ \fi
+ \fi}
+
+\def\overlaycolumnfootnotes% VERVANGEN !!!
+ {\relax
+ \ifcleverfootnotes\ifdim\ht\footins>\!!zeropoint
+ \bgroup
+ \scratchdimen=\ht\firstcolumnbox
+ \advance\scratchdimen by -\openstrutdepth % \dp\strutbox
+ \getnoflines\scratchdimen
+ \advance\noflines by -2
+ \scratchdimen=\noflines\lineheight
+ \advance\scratchdimen by \topskip
+ \setbox0=\hbox
+ {\lower\scratchdimen\vbox{\placefootnoteinserts}}%
+ \ht0=\openstrutheight % \ht\strutbox
+ \dp0=\openstrutdepth % \dp\strutbox
+ \scratchdimen=\ht\lastcolumnbox
+ \global\setbox\lastcolumnbox=\vbox to \scratchdimen
+ {\box\lastcolumnbox
+ \vskip-\scratchdimen
+ \color[black]{\box0}}%
+ \egroup
+ \fi\fi}
+
+%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
+\forgetall
+ \setmulticolumnsout
+ \dontshowcomposition
+ \dimen0=\columntextheight
+ \getinsertionheights\to\dimen2\\% toegevoegd ivm voetnoten
+ \advance\dimen2 by \partialpageheight
+ \dimen0=\columntextheight
+ \advance\dimen0 by -\partialpageheight
+ \getinsertionheights\to\dimen2\\%
+ \advance\dimen0 by -\dimen2
+ \ifgridsnapping % evt altijd, nog testen
+ \getnoflines{\dimen0}
+ \dimen0=\noflines\openlineheight
+ \fi
+ \dohandleallcolumns
+ {\splitcurrentcolumn from \box\normalpagebox to \dimen0}
+ \setbox\restofpage=\vbox{\unvbox\normalpagebox}%
+ \ifinheritcolumns
+ \ifr@ggedbottom
+ \dohandleallcolumns
+ {\global\setbox\currentcolumnbox=\vbox to \dimen0
+ {\dimen0=\dp\currentcolumnbox
+ \unvbox\currentcolumnbox
+ \vskip-\dimen0
+ \vskip\openstrutdepth % \dp\strutbox
+ \prevdepth\openstrutdepth % \dp\strutbox
+ \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
+ \setbox\partialpage=\vbox{\flushcolumnedpage}%
+ \finaloutput\box\partialpage
+ \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{\unvbox\normalpagebox}%
+ \ifdim\ht0>\openlineheight
+ \dimen0=\ht0
+ \advance\dimen0 by \topskip
+ \advance\dimen0 by -\baselineskip
+ \dohandleallcolumns
+ {\advance\dimen0 by \ht\currenttopcolumnbox}%
+ \divide\dimen0 by \nofcolumns
+ \vbadness=\!!tenthousand\relax
+ \count255=0
+ \bgroup
+ \ifgridsnapping
+ \dimen2=\lineheight
+ \else
+ \dimen2=\!!onepoint % RUBISH
+ \dimen2=\spacingfactor\dimen2
+ \fi
+ \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
+% rather new, test this on pdftex-z.tex
+\unpenalty\unskip\unpenalty\unskip}% maybe better in main splitter
+%\writestatus{balance}{\the\currentcolumnbox: \the\ht4}%
+ \dimen6=\ht4
+ \ifdim\dimen6>\dimen4 \dimen4=\dimen6 \fi}%
+ \ifnum\count255>100\relax
+ \donefalse
+ \else\ifdim\dimen4>\ht2
+ \donetrue
+ \else
+ \donefalse
+ \fi\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
+ \allowbreak
+ \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={\flushfootnotes\flushcolumnfloat\flushmargincontents\checkindentation}
+ \let\flushcolumnfloat=\doflushcolumnfloat
+ \let\doroomfloat=\docolumnroomfloat
+ \let\flushcolumnfloats=\doflushcolumnfloats
+\let\doflushfloats\doflushcolumnfloats % new
+ \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=\pagetotal
+ \else
+ \dimen0=\!!zeropoint
+ \fi
+ \dimen2=\!!zeropoint
+ \count255=0
+ \dimen8=\columntextheight
+ \advance\dimen8 by -\partialpageheight
+ \def\dogetcolumnstatus%
+ {\advance\count255 by 1
+ \advance\dimen2 by \ht\currenttopcolumnbox
+ \advance\dimen2 by \dp\currenttopcolumnbox
+ \dimen4=\dimen2
+ \advance\dimen4 by \dimen0
+ \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\getinsertionheight%
+ {\ifdim\pagegoal<\maxdimen
+ \bgroup
+ \dimen0=\columntextheight
+ \advance\dimen0 by -\pagegoal
+ \xdef\insertionheight{\the\dimen0}%
+ \egroup
+ \else
+ \global\let\insertionheight=\!!zeropoint
+ \fi}
+
+\def\docolumnroomfloat%
+ {\ifnofloatpermitted
+ \global\roomforfloatfalse
+ \else
+ \bgroup
+ \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+ \advance\dimen0 by 2\openlineheight % nog nodig ?
+%\ifnum\count255=\nofcolumns
+% \getinsertionheight
+% %\message{\insertionheight}\wait
+% \advance\dimen0 by \insertionheight
+%\fi
+ \setbox\scratchbox=\vbox
+ {\blanko[\@@bkvoorwit]
+ \snaptogrid\vbox{\copy\floatbox}}%
+ \advance\dimen0 by \ht\scratchbox
+ \advance\dimen0 by .5\lineheight % needed because goal a bit higher
+ %\message{column: \the\count255; total: \the\dimen0; goal: \the\dimen2}\wait
+ \ifdim\dimen0>\dimen2
+ \global\roomforfloatfalse
+ \else
+ \global\roomforfloattrue
+ \fi
+ \ifdim\wd\floatbox>\hsize
+ \showmessage{\m!columns}{11}{}%
+ \global\roomforfloatfalse
+ \fi
+ \egroup
+ \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)!
+
+\newif\ifflushingcolumnfloats \flushingcolumnfloatstrue
+
+\def\doflushcolumnfloat%
+ {\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting
+ \bgroup
+ \forgetall
+ \let\doflushcolumnfloat=\relax
+ \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\%
+ \ifdim\dimen0>\!!zeropoint
+ \dogetfloat
+ \ifdim\wd\floatbox>\hsize
+ \doresavefloat
+ \else
+ \setbox2=\vbox
+ {\blanko[\@@bkvoorwit]
+ \snaptogrid\vbox{\copy\floatbox}%
+ \blanko[\@@bknawit]}%
+ \advance\dimen0 by \ht2
+ \ifdim\dimen0>\dimen2
+ \ifnum\count255<\nofcolumns
+ \advance\count255 by 1
+ \edef\currenttopcolumnbox{\getvalue{\@@topcol\the\count255}}%
+ \ifdim\ht\currenttopcolumnbox=\!!zeropoint
+ \global\setbox\currenttopcolumnbox=\vbox
+ {\snaptogrid\vbox{\copy\floatbox}
+ \witruimte % nodig ?
+ \blanko[\@@bknawit]}%
+ \dimen4=\ht\currenttopcolumnbox
+ \advance\dimen4 by \dp\currenttopcolumnbox
+ \global\advance\vsize by -\dimen4
+ \advance\dimen4 by -\pagegoal
+ \global\pagegoal=-\dimen4
+ \showmessage{\m!columns}{12}{a}%
+ \else
+ \showmessage{\m!columns}{12}{b}%
+ \doresavefloat
+ \fi
+ \else
+ \showmessage{\m!columns}{12}{c}%
+ \doresavefloat
+ \fi
+ \else
+ \ifhmode{\setbox0=\lastbox}\fi% waar is die er in geslopen
+ \par
+ \ifdim\prevdepth<\!!zeropoint\relax % anders bovenaan kolom witruimte
+ \else
+ \blanko[\@@bkvoorwit]
+ \fi
+ \flushfloatbox
+ \blanko[\@@bknawit]
+ \fi
+ \fi
+ \fi
+ \egroup
+ \fi\fi\fi}
+
+%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
+ \forgetall
+ \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
+ {\snaptogrid\vbox
+ {\copy\currenttopcolumnbox
+ \hbox{\vphantom{\copy\floatbox}}}
+ \witruimte % nodig ?
+ \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
+ \count0=0
+ \else
+ \dimen0=\count0\hsize
+ \advance\dimen0 by \count0\intercolumnwidth
+ \advance\dimen0 by -\intercolumnwidth
+ \global\setbox\floatbox=\hbox to \dimen0
+ {\hss\hbox{\copy\floatbox}\hss}%
+ \fi
+ \showmessage{\m!columns}{13}{}%
+ \else
+ % \showmessage{\m!columns}{13}{}%
+ \fi
+ \ifdim\ht\floatbox>\!!zeropoint\relax
+ \global\setbox\currenttopcolumnbox=\vbox
+ {\snaptogrid\vbox
+ {\copy\currenttopcolumnbox
+ \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 }%
+ \setvsize
+ \global\advance\vsize by -\dimen8
+ \global\pagegoal=\vsize
+ \else
+ %\doflushfloats % does not snap!
+ \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
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 60b843af4..c3b9828e0 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -1,360 +1,318 @@
-%D \module
-%D [ file=core-nav,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Navigation,
-%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 / Navigation}
-
-\unprotect
-
-%D Support for interactive document is very present in
-%D \CONTEXT\ and interwoven in many modules. This means that in
-%D this module, where we deal with some common navigational
-%D features, there will be quite some forward references.
-%D
-%D When I started implementing hypertext support, the macros
-%D were mostly dealing with things related to locations, that
-%D is click in this location and goto that one. The
-%D functionality of many macro depends on the output medium:
-%D paper or screen. The next boolean holds the state:
-
-\newif\iflocation
-
-%D We also allocate a scratchbox:
-
-\newbox\locationbox
-
-%D There is no interaction at all unless enabled by saying:
-%D
-%D \starttypen
-%D \setupinteraction[state=start]
-%D \stoptypen
-%D
-%D The other settings are:
-%D
-%D \showsetup{\y!stelinteractiein}
-%D
-%D In the special driver modules we introduced a switch that
-%D forces page destinations (instead of named ones). We set
-%D this switch here.
-
-\def\stelinteractiein%
- {\dosingleargument\dostelinteractiein}
-
-\def\dostelinteractiein[#1]%
- {\getparameters[\??ia][#1]%
- \doifelse{\@@iastatus}{\v!start}
- {\iflocation\else
- \showmessage{\m!interactions}{2}{\ifusepagedestinations\space(PAGE)\fi}%
- \global\locationtrue
- \fi}
- {\iflocation
- \showmessage{\m!interactions}{3}{\ifusepagedestinations\space(PAGE)\fi}%
- \global\locationfalse
- \fi}%
- \doifelse{\@@iastrut}{\v!ja}
- {\locationstruttrue}
- {\locationstrutfalse}%
- \doifelse{\@@iapagina}{\v!ja}
- {\global\usepagedestinationstrue}
- {\global\usepagedestinationsfalse}}
-
-%D We have to make sure of some settings:
-
-\def\dolocationstartup%
- {\iflocation
- \dosetupinteraction
- \setupinteractionscreens
- \global\let\dolocationstartup=\relax
- \fi}
-
-\appendtoks \dolocationstartup \to \everyshipout
-
-%D The next few macros are really horrible. For proper
-%D navigation a in||line hypertext fragment must have
-%D comfortable properties, so we must force some minimal
-%D dimensions. On the other hand button, and here I mean those
-%D pieces of text with fancy outlines and/or backgrounds, often
-%D have fixed, preset dimensions.
-%D
-%D To make things even worse, if we choose to let the optimal
-%D dimensions depend on the height and depth of a strut, a not
-%D too uncommon practice in \TEX, we have to deal with the fact
-%D that such a strut, set inside a box, is unknown too the
-%D outside world.
-%D
-%D The solution lays in passing the strut characteristics in
-%D a proper way, in our case by applying \type{\presetgoto}:
-%D
-%D \starttypen
-%D {some piece of text \presetgoto}
-%D \stoptypen
-%D
-%D This macro stores the current strut values.
-
-\newif\iflocationstrut
-
-\def\resetgoto%
- {\global\let\@@ia@@hoogte=\!!zeropoint
- \global\let\@@ia@@diepte=\!!zeropoint}
-
-\resetgoto
-
-\def\presetgoto%
- {\iflocationstrut
- \setstrut
- \xdef\@@ia@@hoogte{\the\ht\strutbox}%
- \xdef\@@ia@@diepte{\the\dp\strutbox}%
- \else
- \global\let\@@ia@@hoogte=\@@iahoogte
- \global\let\@@ia@@diepte=\@@iadiepte
- \fi}
-
-%D In the macros that deal with making areas into hyperlinks,
-%D we use:
-
-\def\dostartgoto\data#1\start#2\stop#3\dostopgoto%
- {\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}}%
- \ifreversegoto
- \dimen0=\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0
- \else
- \smashbox2\box2\box0
- \fi
- \resetgoto}}
-
-%D The width of the active area depends on the dimensions
-%D preset, the actual dimens and/or the height and depth of the
-%D strut.
-%D
-%D Normally the hyper active area is laid on top of the text.
-%D This enables stacking hyperlinks on top of each other. When,
-%D for some reason the opposite is prefered, one can use the
-%D next boolean to signal this wish.
-
-\newif\ifreversegoto \reversegotofalse
-
-%D As long as there a natural feeling of what can be considered
-%D hyper active or not, we have to tell users where they can
-%D possibly click. We've already seen a few macros that deal
-%D with this visualization, something we definitely do not let
-%D up to the viewer. One way of telling is using a distinctive
-%D typeface, another way is using color.
-%D
-%D There are two colors involved: one for normal hyperlinks,
-%D and one for those that point to the currentpage, the
-%D contrast color.
-
-\definecolor [interactioncolor] [r=0, g=.6, b=0]
-\definecolor [interactioncontrastcolor] [r=.8, g=0, b=0]
-
-\definecolor [interactiekleur] [interactioncolor]
-\definecolor [interactiecontrastkleur] [interactioncontrastcolor]
-
-%D The next few macros are responsible for highlighting hyper
-%D links. The first one, \type{\showlocation}, is used in those
-%D situations where the typeface is handled by the calling
-%D macro.
-
-%D CHECK WHERE USED / CONSISTENCY
-
-\def\showlocation#1%
- {\iflocation\color[\@@iakleur]{#1\presetgoto}\else#1\fi}
-
-%D When local color settings are to be used, we can use the
-%D next macro, where \type{#1} is a tag like \type{\??tg} and
-%D \type{#2} some text.
-
-\def\showcoloredlocation#1#2%
- {\iflocation
- \color[\getvalue{#1\c!kleur}]{#2\presetgoto}%
- \else
- #2%
- \fi}
-
-%D When we're dealing with pure page references, contrast
-%D colors are used when we are already at the page mentioned.
-
-\def\showcontrastlocation#1#2#3% the \@EA is needed
- {\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}
-
-%D The next simple macro can be used in color specifications,
-%D like \type{\color[\locationcolor{green}]}.
-
-\def\locationcolor#1%
- {\iflocation#1\fi}
-
-%D More tokens are spend when we want both typeface and color
-%D highlighting.
-
-\def\dolocationattributes#1#2%
- {\bgroup
- \iflocation
- \doifdefinedelse{#1\c!kleur}
- {\edef\colorattribute{\getvalue{#1\c!kleur}}}
- {\let\colorattribute\empty}%
- \else
- \let\colorattribute\empty
- \fi
- \doifdefinedelse{#1\c!letter}
- {\edef\fontattribute{\getvalue{#1\c!letter}}}
- {\let\fontattribute\empty}%
- \startcolor[\colorattribute]%
- \doconvertfont{\fontattribute}{#2}%
- \stopcolor
- \egroup}
-
-%D Special hyperlinks, namely those to pages or navigational
-%D properties, are associated with symbols.
-
-\definesymbol [\v!eerste\v!pagina] [\gotobegincharacter]
-\definesymbol [\v!vorige\v!pagina] [\gobackwardcharacter]
-\definesymbol [\v!volgende\v!pagina] [\goforwardcharacter]
-\definesymbol [\v!laatste\v!pagina] [\gotoendcharacter]
-\definesymbol [\v!eerste\v!sub\v!pagina] [\gotobegincharacter]
-\definesymbol [\v!vorige\v!sub\v!pagina] [\gobackwardcharacter]
-\definesymbol [\v!volgende\v!sub\v!pagina] [\goforwardcharacter]
-\definesymbol [\v!laatste\v!sub\v!pagina] [\gotoendcharacter]
-\definesymbol [\v!PreviousJump] [\gobackjumpcharacter]
-\definesymbol [\v!NextJump] [\goforjumpcharacter]
-\definesymbol [\v!CloseDocument] [\closecharacter]
-
-%D These symbols are taken from the Computer Moders Roman
-%D symbol set or, when present, from the additional symbols of
-%D the American Mathematical Society. Of course one can use
-%D his or her own symbols by redefining them.
-
-\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\gonowherecharacter%
- {\mathematics{\bullet}}
-
-\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}}
-
-%D We have already seen some of the next values in action,
-%D others will be applied in other modules.
-
-%D Although not decently supported in current viewers, a
-%D provisory hiding mechanims is implemented. Areas marked as
-%D such, are visible on screen, but invisible on paper. Don't
-%D trust this mechanism yet!
-
-\def\dostartinteractie%
- {\bgroup
- \let\stopinteractie=\egroup
- \dowithnextbox{\dostarthide\box\nextbox\dostophide\egroup}\hbox}
-
-\let\startinteractie = \relax
-\let\stopinteractie = \relax
-
-% in the future:
-%
-% 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!
-
-\def\@@iatimestamp%
- {\the\normalyear
- \ifnum\normalmonth<10 0\fi\the\normalmonth
- \ifnum\normalday <10 0\fi\the\normalday}
-
-\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=\@@iatimestamp]
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=core-nav,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Navigation,
+%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 / Navigation}
+
+\unprotect
+
+%D Support for interactive document is very present in
+%D \CONTEXT\ and interwoven in many modules. This means that in
+%D this module, where we deal with some common navigational
+%D features, there will be quite some forward references.
+%D
+%D When I started implementing hypertext support, the macros
+%D were mostly dealing with things related to locations, that
+%D is click in this location and goto that one. The
+%D functionality of many macro depends on the output medium:
+%D paper or screen. The next boolean holds the state:
+
+\newif\iflocation
+
+%D We also allocate a scratchbox:
+
+\newbox\locationbox
+
+%D There is no interaction at all unless enabled by saying:
+%D
+%D \starttypen
+%D \setupinteraction[state=start]
+%D \stoptypen
+%D
+%D The other settings are:
+%D
+%D \showsetup{\y!stelinteractiein}
+%D
+%D In the special driver modules we introduced a switch that
+%D forces page destinations (instead of named ones). We set
+%D this switch here.
+
+\def\stelinteractiein%
+ {\dosingleargument\dostelinteractiein}
+
+\def\dostelinteractiein[#1]%
+ {\getparameters[\??ia][#1]%
+ \dosetuppageview{\@@iascherm}%
+ \doifelse{\@@iastatus}{\v!start}
+ {\iflocation\else
+ \showmessage{\m!interactions}{2}{\ifusepagedestinations\space(PAGE)\fi}%
+ \global\locationtrue
+ \fi}
+ {\iflocation
+ \showmessage{\m!interactions}{3}{\ifusepagedestinations\space(PAGE)\fi}%
+ \global\locationfalse
+ \fi}%
+ \doifelse{\@@iastrut}{\v!ja}
+ {\locationstruttrue}
+ {\locationstrutfalse}%
+ \doifelse{\@@iapagina}{\v!ja}
+ {\global\usepagedestinationstrue}
+ {\global\usepagedestinationsfalse}}
+
+%D We have to make sure of some settings:
+
+\def\dolocationstartup%
+ {\iflocation
+ \dosetupinteraction
+ \handlereferenceactions\@@iaopenactie\dosetupopenaction
+ \handlereferenceactions\@@iasluitactie\dosetupcloseaction
+ \setupinteractionscreens
+ \global\let\dolocationstartup=\relax
+ \fi}
+
+\appendtoks \dolocationstartup \to \everyshipout
+
+%D The next few macros are really horrible. For proper
+%D navigation a in||line hypertext fragment must have
+%D comfortable properties, so we must force some minimal
+%D dimensions. On the other hand button, and here I mean those
+%D pieces of text with fancy outlines and/or backgrounds, often
+%D have fixed, preset dimensions.
+%D
+%D To make things even worse, if we choose to let the optimal
+%D dimensions depend on the height and depth of a strut, a not
+%D too uncommon practice in \TEX, we have to deal with the fact
+%D that such a strut, set inside a box, is unknown too the
+%D outside world.
+%D
+%D The solution lays in passing the strut characteristics in
+%D a proper way, in our case by applying \type{\presetgoto}:
+%D
+%D \starttypen
+%D {some piece of text \presetgoto}
+%D \stoptypen
+%D
+%D This macro stores the current strut values.
+
+\newif\iflocationstrut
+
+\def\resetgoto%
+ {\global\let\@@ia@@hoogte=\!!zeropoint
+ \global\let\@@ia@@diepte=\!!zeropoint}
+
+\resetgoto
+
+\def\presetgoto%
+ {\iflocationstrut
+ \setstrut
+ \xdef\@@ia@@hoogte{\the\ht\strutbox}%
+ \xdef\@@ia@@diepte{\the\dp\strutbox}%
+ \else
+ \global\let\@@ia@@hoogte=\@@iahoogte
+ \global\let\@@ia@@diepte=\@@iadiepte
+ \fi}
+
+%D In the macros that deal with making areas into hyperlinks,
+%D we use:
+
+\def\dostartgoto\data#1\start#2\stop#3\dostopgoto%
+ {\ifsecondaryreference
+ \bgroup\setbox0=\hbox{#2#3}\egroup
+ \else
+ \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 % direct skipping is faster of course
+ \advance\dimen0 by -.5\buttonwidth % buts this is nicer
+ \hskip\dimen0#2#3}}% when visualizing things
+ \ifreversegoto
+ \dimen0=\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0
+ \else
+ \smashbox2\box2\box0
+ \fi
+ \resetgoto}%
+ \fi}
+
+%D The secondary references are processed but not typeset. The
+%D special driver must collect the data needed.
+
+%D The width of the active area depends on the dimensions
+%D preset, the actual dimens and/or the height and depth of the
+%D strut.
+%D
+%D Normally the hyper active area is laid on top of the text.
+%D This enables stacking hyperlinks on top of each other. When,
+%D for some reason the opposite is prefered, one can use the
+%D next boolean to signal this wish.
+
+\newif\ifreversegoto \reversegotofalse
+
+%D As long as there a natural feeling of what can be considered
+%D hyper active or not, we have to tell users where they can
+%D possibly click. We've already seen a few macros that deal
+%D with this visualization, something we definitely do not let
+%D up to the viewer. One way of telling is using a distinctive
+%D typeface, another way is using color.
+%D
+%D There are two colors involved: one for normal hyperlinks,
+%D and one for those that point to the currentpage, the
+%D contrast color.
+
+\definecolor [interactioncolor] [r=0, g=.6, b=0]
+\definecolor [interactioncontrastcolor] [r=.8, g=0, b=0]
+
+\definecolor [interactiekleur] [interactioncolor]
+\definecolor [interactiecontrastkleur] [interactioncontrastcolor]
+
+%D The next few macros are responsible for highlighting hyper
+%D links. The first one, \type{\showlocation}, is used in those
+%D situations where the typeface is handled by the calling
+%D macro.
+
+\def\interactioncolor%
+ {\iflocation
+ \ifrealreferencepage
+ \@@iacontrastkleur
+ \else
+ \@@iakleur
+ \fi
+ \fi}
+
+%D CHECK WHERE USED / CONSISTENCY
+
+\def\showlocation#1%
+ {\iflocation\color[\@@iakleur]{#1\presetgoto}\else#1\fi}
+
+%D When local color settings are to be used, we can use the
+%D next macro, where \type{#1} is a tag like \type{\??tg} and
+%D \type{#2} some text.
+
+\def\showcoloredlocation#1#2%
+ {\iflocation
+ \color[\getvalue{#1\c!kleur}]{#2\presetgoto}%
+ \else
+ #2%
+ \fi}
+
+%D When we're dealing with pure page references, contrast
+%D colors are used when we are already at the page mentioned.
+
+\def\showcontrastlocation#1#2#3% the \@EA is needed
+ {\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}
+
+%D The next simple macro can be used in color specifications,
+%D like \type{\color[\locationcolor{green}]}.
+
+\def\locationcolor#1%
+ {\iflocation#1\fi}
+
+%D More tokens are spend when we want both typeface and color
+%D highlighting.
+
+\def\dolocationattributes#1#2#3#4%
+ {\bgroup
+ \doifdefinedelse{#1#2}
+ {\def\fontattribute{\getvalue{#1#2}}}
+ {\let\fontattribute\empty}%
+ \iflocation
+ \doifdefinedelse{#1#3}
+ {\def\colorattribute{\getvalue{#1#3}}}
+ {\let\colorattribute\empty}%
+ \else
+ \let\colorattribute\empty
+ \fi
+ \startcolor[\colorattribute]%
+ \@EA\doconvertfont\@EA{\fontattribute}{#4}% no \edef, but \@EA here
+ \stopcolor
+ \egroup}
+
+%D Although not decently supported in current viewers, a
+%D provisory hiding mechanims is implemented. Areas marked as
+%D such, are visible on screen, but invisible on paper. Don't
+%D trust this mechanism yet!
+
+\def\dostartinteractie%
+ {\bgroup
+ \let\stopinteractie=\egroup
+ \dowithnextbox{\dostarthide\box\nextbox\dostophide\egroup}\hbox}
+
+\let\startinteractie = \relax
+\let\stopinteractie = \relax
+
+% in the future:
+%
+% 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!
+
+\def\@@iatimestamp%
+ {\the\normalyear
+ \ifnum\normalmonth<10 0\fi\the\normalmonth
+ \ifnum\normalday <10 0\fi\the\normalday}
+
+% happens in core-fld
+%
+% \definereference [AtOpenInitializeForm] [\v!geen]
+
+\stelinteractiein % start fit page and reset form
+ [\c!status=\v!stop,
+ \c!pagina=\v!nee,
+ %\c!openactie={\v!eerstepagina,AtOpenInitializeForm},
+ \c!openactie={\v!eerstepagina,\v!ResetForm},
+ \c!sluitactie=,
+ \c!scherm=\v!passend,
+ \c!menu=\v!uit,
+ \c!letter=\v!vet,
+ \c!strut=\v!ja,
+ \c!kleur=interactioncolor,
+ \c!contrastkleur=interactioncontrastcolor,
+ \c!symboolset=,
+ \c!breedte=1em,
+ \c!hoogte=\!!zeropoint,
+ \c!diepte=\!!zeropoint,
+ \c!titel=,
+ \c!subtitel=,
+ \c!auteur=,
+ \c!datum=\@@iatimestamp]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 5bcf5afa4..c8e4abb85 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -1,48 +1,74 @@
-%D \module
-%D [ file=core-nav,
-%D version=1995.1.1,
-%D title=\CONTEXT\ Core 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.
-
-%D To be placed elsewhere.
-
-\writestatus{loading}{Context Core Macros / New Ones}
-
-\unprotect
-
-% Some kind of new feature, for the moment a private one.
-%
-% \enablemode[screen,paper,bound]
-%
-% \doifmodeelse {paper} {this} {that}
-% \doifmode {paper,screen} {this}
-% \doifnotmode {paper,bound} {that}
-
-\let\currentmode=\empty
-
-\def\enablemode[#1]%
- {\addtocommalist{#1}\currentmode}
-
-\def\disablemode[#1]%
- {\removefromcommalist{#1}\currentmode}
-
-\long\def\doifmodeelse#1#2#3%
- {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{#2}{#3}}
-
-\long\def\doifmode#1#2%
- {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{#2}{}}
-
-\long\def\doifnotmode#1#2%
- {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{}{#2}}
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=core-nav,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Core 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.
+
+%D To be placed elsewhere.
+
+\writestatus{loading}{Context Core Macros / New Ones}
+
+\unprotect
+
+% Some kind of new feature, for the moment a private one.
+%
+% \enablemode[screen,paper,bound]
+%
+% \doifmodeelse {paper} {this} {that}
+% \doifmode {paper,screen} {this}
+% \doifnotmode {paper,bound} {that}
+%
+% \startmode [list]
+% \stopmode
+%
+% \startnotmode [list]
+% \stopnotmode
+
+\let\currentmode=\empty
+
+\def\enablemode[#1]%
+ {\expandafter\addtocommalist\expandafter{#1}\currentmode}
+
+\def\disablemode[#1]%
+ {\expandafter\removefromcommalist\expandafter{#1}\currentmode}
+
+\def\doifmodeelse%
+ {\unprotect\dodoifmodeelse}
+
+\long\def\dodoifmodeelse#1#2#3%
+ {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{#3}}
+
+\def\doifmode%
+ {\unprotect\dodoifmode}
+
+\long\def\dodoifmode#1#2%
+ {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{}}
+
+\def\doifnotmode%
+ {\unprotect\dodoifnotmode}
+
+\long\def\dodoifnotmode#1#2%
+ {\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{}{#2}}
+
+\def\startmode%
+ {\unprotect\dostartmode}
+
+\long\def\dostartmode[#1]#2\stopmode%
+ {\dodoifmode{#1}{#2}}
+
+\def\startnotmode%
+ {\unprotect\dostartnotmode}
+
+\long\def\dostartnotmode[#1]#2\stopnotmode%
+ {\dodoifnotmode{#1}{#2}}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 75775323c..f5f6b49e9 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -1,629 +1,647 @@
-%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,setupfootnotedefinition}
-%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
-
-%D The footnoterule can be a graphic and therefore calling this
-%D setup macro at every skipswitch is tricky (many many MP
-%D runs). Let's just reserve a few points, that probably match
-%D those of the stretch component.
-
-\def\setupfootnotedefinition%
- {\steldoordefinierenin[\??vn\??vn]}
-
-\doordefinieren
- [\??vn\??vn]
- [\c!plaats=\v!inlinker,
- \c!breedte=\v!passend,
- \c!kopletter=\@@vnletter,
- \c!kopkleur=\@@vnkleur,
- \c!voor=,
- \c!na=]
-
-\presetlocalframed
- [\??vn]
-
-%D The previous definitions indicate that we can frame
-%D the footnote area. The footnotes themselves are treated as
-%D definitions.
-%D
-%D \showsetup{\y!setupfootnotes}
-
-\newif\ifcleverfootnotes % being [plaats=kolommen]
-
-\def\setupfootnotes%
- {\dosingleempty\dosetupfootnotes}
-
-\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]%
- \setbox0=\vbox
- {\forgetall
- \@@vnvoor
- \footnoterule
- \@@vnna}%
- \skip\footins=\ht0
- \count\footins=1000
- \setbox0=\box\voidb@x % \somehow \box0 is used
- \doifelse{\@@vnplaats}{\v!kolommen}
- {\cleverfootnotestrue % global ?
- \ifnum\@@kln=0
- \scratchcounter=1
- \else
- \scratchcounter=\@@vnn\relax
- \divide\count\footins by \scratchcounter
- \fi
- \global\endnotesfalse
- \setcleverfootnotes}
- {\cleverfootnotesfalse
- \ifnum\@@vnn=0
- \settextfootnotes
- \scratchcounter=1
- \else
- \setcolumnfootnotes
- \scratchcounter=\@@vnn\relax
- \divide\count\footins by \scratchcounter
- \fi
- \doifelse{\@@vnplaats}{\v!pagina}
- {\global\endnotesfalse}
- {\global\endnotestrue
- \postponefootnotes}}%
- \dimen\footins=\@@vnhoogte
- \multiply\dimen\footins by \scratchcounter}
-
-\def\setcleverfootnotes%
- {\def\startpushfootnote {\getvalue{\e!start\??vn\??vn}}%
- \def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}}%
- \def\startpopfootnotes {}%
- \def\stoppopfootnotes {}}
-
-\def\setcolumnfootnotes%
- {\def\startpushfootnote {\setrigidcolumnhsize\@@vnbreedte\@@vnkolomafstand\@@vnn
- \getvalue{\e!start\??vn\??vn}}%
- \def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}}%
- \def\startpopfootnotes {\setbox0=\vbox\bgroup}%
- \def\stoppopfootnotes {\egroup\rigidcolumnbalance0\@@vnn}}
-
-\def\settextfootnotes%
- {\def\startpushfootnote {\startvboxtohbox
- \dostartattributes\??vn\relax}%
- \def\stoppushfootnote {\hskip\@@vnkolomafstand % plus.5em minus.5em
- \dostopattributes
- \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}%
- \let\footnotenumber=\hetnummer}%
- \expandafter\dostartfootnote
- \else
- \expandafter\gobbleoneargument
- \fi}
-
-%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, hack !
- \fi
- \ignorespaces
- \doglobal\increment\internalfootreference
- \nobreak
- \iflocation
- \naarbox{\hoog{\footnotenumber}}[\s!fnt:t:\internalfootreference]%
- \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
- \else
- \hoog{\footnotenumber}%
- \fi
- \localfootinsert\footins\bgroup
- \forgetall
- \setfootnotebodyfont
- \redoconvertfont % to undo \undo calls in in headings etc
- \interlinepenalty=\interfootnotelinepenalty
- \splittopskip\ht\strutbox % not actually needed here
- \splitmaxdepth\dp\strutbox % not actually needed here
- \def\linkermargeafstand{\@@vnmargeafstand}%
- \def\rechtermargeafstand{\@@vnmargeafstand}%
- \startpushfootnote
- {\ifx\footnotenumber\empty \else
- \iflocation
- \naarbox{\@@vnnummercommando\footnotenumber}[\s!fnt:f:\internalfootreference]%
- \else
- \@@vnnummercommando\footnotenumber
- \fi
- \fi
- \iflocation
- \rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}%
- \fi}%
- \bgroup
- \aftergroup\dostopfootnote
- \begstrut
- \let\next}
-
-\def\dostopfootnote%
- {\endstrut
- \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
- \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 % unsafe, strange
- \ifdim\ht\footins>\!!zeropoint\relax
- \ifendnotes \else
- \@@vnvoor
- \footnoterule % alleen in ..mode
- \bgroup
- \setfootnotebodyfont
- \localframed
- [\??vn]
- [\c!breedte=\v!passend,
- \c!hoogte=\v!passend,
- \c!strut=\v!nee,
- \c!offset=\v!overlay]
- {\startpopfootnotes % == \vbox
- \ifdim\dp\footins=\!!zeropoint % this hack is needed because \vadjust
- \hbox{\lower\dp\strutbox\box\footins}% % in margin number placement
- \else % hides the (always) present depth
- \box\footins
- \fi
- \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\doflushfootnotes%
- {\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}
-
-\def\flushfootnotes%
- {\ifinpagebody \else \ifinner \else
- \ifendnotes \else \ifvoid\postponedfootnotes \else
- %\ifvmode % less interference, but also less secure
- \doflushfootnotes
- %\fi
- \fi\fi
- \fi\fi}
-
-\def\placefootnotesintext#1%
- {\par
- \witruimte
- \@@vnvoor
- \snaptogrid\hbox
- {\setfootnotebodyfont
- \setbox0=\hbox
- {\startpopfootnotes
- \unvbox#1\par\relax
- \stoppopfootnotes}%
- \localframed
- [\??vn]
- [\c!breedte=\v!passend,
- \c!hoogte=\v!passend,
- \c!strut=\v!nee,
- \c!offset=\v!overlay]
- {\ifdim\dp0=\!!zeropoint % this hack is needed because \vadjust
- \hbox{\lower\dp\strutbox\box0}% % in margin number placement
- \else % hides the (always) present depth
- \box0
- \fi}}%
- \@@vnna}
-
-%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
- \let\@@vnhoogte=\teksthoogte
- \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 bodyfont size, which is in most cases derived
-%D from the global document bodyfont size. In the previous macros
-%D we already used a footnote specific font setting macro.
-
-\def\setfootnotebodyfont%
- {\restoreglobalbodyfont
- \switchtobodyfont[\@@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!kleur=,
- \c!na=,
- \c!kader=\v!uit,
- \c!margeafstand=.5em,
- \c!kolomafstand=1em,
- \c!afstand=.125em,
- \c!breedte=\zetbreedte,
- \c!hoogte=\teksthoogte,
- \c!nummercommando=\hoog,
- \c!n=1]
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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,setupfootnotedefinition}
+%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
+
+%D The footnoterule can be a graphic and therefore calling this
+%D setup macro at every skipswitch is tricky (many many MP
+%D runs). Let's just reserve a few points, that probably match
+%D those of the stretch component.
+
+\def\setupfootnotedefinition%
+ {\steldoordefinierenin[\??vn\??vn]}
+
+\doordefinieren
+ [\??vn\??vn]
+ [\c!plaats=\v!inlinker,
+ \c!breedte=\v!passend,
+ \c!kopletter=\@@vnletter,
+ \c!kopkleur=\@@vnkleur,
+ \c!voor=,
+ \c!na=]
+
+\presetlocalframed
+ [\??vn]
+
+%D The previous definitions indicate that we can frame
+%D the footnote area. The footnotes themselves are treated as
+%D definitions.
+%D
+%D \showsetup{\y!setupfootnotes}
+
+\newif\ifcleverfootnotes % being [plaats=kolommen]
+
+\def\setupfootnotes%
+ {\dosingleempty\dosetupfootnotes}
+
+\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]%
+ \setbox0=\vbox
+ {\forgetall
+ \@@vnvoor
+ \footnoterule
+ \@@vnna}%
+ \skip\footins=\ht0
+ \count\footins=1000
+ \setbox0=\box\voidb@x % \somehow \box0 is used
+ \doifelse{\@@vnplaats}{\v!kolommen}
+ {\cleverfootnotestrue % global ?
+ \ifnum\@@kln=0
+ \scratchcounter=1
+ \else
+ \scratchcounter=\@@vnn\relax
+ %\divide\count\footins by \scratchcounter
+ \fi
+ \global\endnotesfalse
+ \setcleverfootnotes}
+ {\cleverfootnotesfalse
+ \ifnum\@@vnn=0
+ \settextfootnotes
+ \scratchcounter=1
+ \else
+ \setcolumnfootnotes
+ \scratchcounter=\@@vnn\relax
+ \divide\count\footins by \scratchcounter
+ \fi
+ \doifelse{\@@vnplaats}{\v!pagina}
+ {\global\endnotesfalse}
+ {\global\endnotestrue
+ \postponefootnotes}}%
+ \dimen\footins=\@@vnhoogte
+ \multiply\dimen\footins by \scratchcounter}
+
+\def\setcleverfootnotes%
+ {\def\startpushfootnote {\bgroup % wellicht ooit kopuitlijnen
+ \stelinmargein[\c!uitlijnen=\v!links]%
+ \getvalue{\e!start\??vn\??vn}}%
+ \def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}%
+ \egroup}%
+ \def\startpopfootnotes {}%
+ \def\stoppopfootnotes {}}
+
+\def\setcolumnfootnotes%
+ {\def\startpushfootnote {\setrigidcolumnhsize\@@vnbreedte\@@vnkolomafstand\@@vnn
+ \bgroup
+ \stelinmargein[\c!uitlijnen=\v!links]%
+ \getvalue{\e!start\??vn\??vn}}%
+ \def\stoppushfootnote {\getvalue{\e!stop\??vn\??vn}%
+ \egroup}%
+ \def\startpopfootnotes {\setbox0=\vbox\bgroup}%
+ \def\stoppopfootnotes {\egroup\rigidcolumnbalance0}}
+
+\def\settextfootnotes%
+ {\def\startpushfootnote {\startvboxtohbox
+ \dostartattributes\??vn\c!letter\c!kleur{}}%
+ \def\stoppushfootnote {\hskip\@@vnkolomafstand % plus.5em minus.5em
+ \dostopattributes
+ \stopvboxtohbox}%
+ \def\startpopfootnotes {\vbox\bgroup % \doifdimenelse
+ \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}
+ {\hsize=\@@vnbreedte}}%
+ \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}%
+ \let\footnotenumber=\hetnummer}%
+ \expandafter\dostartfootnote
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+%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, hack !
+ \fi
+ \ignorespaces
+ \doglobal\increment\internalfootreference
+ \nobreak
+ \iflocation
+ \naarbox{\hoog{\footnotenumber}}[\s!fnt:t:\internalfootreference]%
+ \rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
+ \else
+ \hoog{\footnotenumber}%
+ \fi
+ \localfootinsert\footins\bgroup
+ \forgetall
+ \setfootnotebodyfont
+ \redoconvertfont % to undo \undo calls in in headings etc
+ \interlinepenalty=\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % not actually needed here
+ \splitmaxdepth\dp\strutbox % not actually needed here
+ \def\linkermargeafstand{\@@vnmargeafstand}%
+ \def\rechtermargeafstand{\@@vnmargeafstand}%
+ \startpushfootnote
+ {\ifx\footnotenumber\empty \else
+ \iflocation
+ \naarbox{\@@vnnummercommando\footnotenumber}[\s!fnt:f:\internalfootreference]%
+ \else
+ \@@vnnummercommando\footnotenumber
+ \fi
+ \fi
+ \iflocation
+ \rawreference{\s!fnt}{\s!fnt:t:\internalfootreference}{}%
+ \fi}%
+ \bgroup
+ \aftergroup\dostopfootnote
+ \begstrut
+ \let\next}
+
+\def\dostopfootnote%
+ {\endstrut
+ \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
+ \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 % unsafe, strange
+ \ifdim\ht\footins>\!!zeropoint\relax
+ \ifendnotes \else
+ \@@vnvoor
+ \footnoterule % alleen in ..mode
+ \bgroup
+ \setfootnotebodyfont
+ \localframed
+ [\??vn]
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!strut=\v!nee,
+ \c!offset=\v!overlay]
+ {\startpopfootnotes % == \vbox
+ \ifdim\dp\footins=\!!zeropoint % this hack is needed because \vadjust
+ \hbox{\lower\dp\strutbox\box\footins}% % in margin number placement
+ \else % hides the (always) present depth
+ \box\footins
+ \fi
+ \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\doflushfootnotes%
+ {\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}
+
+\def\flushfootnotes%
+ {\ifinpagebody \else \ifinner \else
+ \ifendnotes \else \ifvoid\postponedfootnotes \else
+ %\ifvmode % less interference, but also less secure
+ \doflushfootnotes
+ %\fi
+ \fi\fi
+ \fi\fi}
+
+\def\placefootnotesintext#1%
+ {\endgraf
+ \ifvmode
+ \witruimte
+ \@@vnvoor
+ \fi
+ \snaptogrid\hbox
+ {\setfootnotebodyfont
+ \setbox0=\hbox
+ {\startpopfootnotes
+ \unvbox#1\endgraf\relax
+ \stoppopfootnotes}%
+ \doif{\@@vnbreedte}{\v!passend} % new, auto width
+ {\setbox0=\hbox % uggly but ok.
+ {\beginofshapebox
+ \unhbox0\setbox0=\lastbox\unvbox0
+ \endofshapebox
+ \reshapebox{\hbox{\unhbox\shapebox}}%
+ \vbox{\flushshapebox}}}%
+ \localframed
+ [\??vn]
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!strut=\v!nee,
+ \c!offset=\v!overlay]
+ {\ifdim\dp0=\!!zeropoint % this hack is needed because \vadjust
+ \hbox{\lower\dp\strutbox\box0}% % in margin number placement
+ \else % hides the (always) present depth
+ \box0
+ \fi}}%
+ \ifvmode
+ \@@vnna
+ \fi}
+
+%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
+ \let\@@vnhoogte=\teksthoogte
+ \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 bodyfont size, which is in most cases derived
+%D from the global document bodyfont size. In the previous macros
+%D we already used a footnote specific font setting macro.
+
+\def\setfootnotebodyfont%
+ {\restoreglobalbodyfont
+ \switchtobodyfont[\@@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!kleur=,
+ \c!na=,
+ \c!kader=\v!uit,
+ \c!margeafstand=.5em,
+ \c!kolomafstand=1em,
+ \c!afstand=.125em,
+ \c!breedte=\zetbreedte,
+ \c!hoogte=\teksthoogte,
+ \c!nummercommando=\hoog,
+ \c!n=1]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex
index 73902f265..4b01f9aa3 100644
--- a/tex/context/base/core-obj.tex
+++ b/tex/context/base/core-obj.tex
@@ -1,106 +1,233 @@
-%D \module
-%D [ file=core-obj,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Object 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 / Object Handling}
-
-\unprotect
-
-\startmessages dutch library: references
- 30: onbekend object --
-\stopmessages
-
-\startmessages english library: references
- 30: unknown object --
-\stopmessages
-
-\startmessages german library: references
- 30: unbekanntes Object --
-\stopmessages
-
-%D Boxes can be considered reuable objects. Unfortunaltely once
-%D passed to the \DVI\ file, such objects cannot be reused. In
-%D \PDF\ however, reusing is possible and sometimes even a
-%D necessity. Therefore, \CONTEXT\ supports reusable objects.
-%D
-%D During the \TEX\ processing run, boxes can serve the purpose
-%D of objects, and the \DVI\ driver module implements objects
-%D using boxes. Only when \ETEX\ is widespread, and therefore
-%D the limit on 256 boxes is removed, this becomes useful.
-%D
-%D The \PDF\ and \PDFTEX\ driver modules implement objects
-%D using \PDF\ forms. There is no (real) restriction on the
-%D number of objects there.
-%D
-%D The first application of objects in \CONTEXT\ concerned
-%D \METAPOST\ graphics and fill||in form fields. The first
-%D application can save lots of bytes, while the latter use is
-%D more a necessity than byte saving.
-%D
-%D \starttypen
-%D \setobject{name}=\somebox{}
-%D \getobject{name}
-%D \stoptypen
-%D
-%D Here \type{\somebox} can be whatever box specification
-%D suits \TEX.
-
-\def\setobject#1%
- {\dosetuppaper{\papierformaat}{\the\papierbreedte}{\the\papierhoogte}%
- \dowithnextbox
- {\setxvalue{\r!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{\r!object#1}}
-
-%D We keep track of object references by means of the cross
-%D reference mechanism. Normally, objects are defined before
-%D they are used, but forward referencing sometimes occurs.
-%D
-%D \starttypen
-%D \dosetobjectreference {identifier} {reference value}
-%D \dogetobjectreference {identifier} \csname
-%D \stoptypen
-
-\def\dosetobjectreference#1#2%
- {\checkreferences
- \bgroup
- \locationfalse % we don't want this to be a location
- \textreference[\r!driver#1]{#2}%
- \egroup
- \setxvalue{\r!cross\r!driver#1}{\rt!cross{}{0}{#2}{0}}}
-
-\def\dogetobjectreference#1#2%
- {\doifrawreferencefoundelse{\r!driver#1}
- {\global\let#2=\currenttextreference}
- {\showmessage{\m!references}{30}{[#1]}%
- \global\def#2{0}}}
-
-\protect
-
-\endinput
+%D \module
+%D [ file=core-obj,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Object 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 / Object Handling}
+
+\unprotect
+
+\startmessages dutch library: references
+ 30: onbekend object --
+ 31: dubbel object --
+\stopmessages
+
+\startmessages english library: references
+ 30: unknown object --
+ 31: duplicate object --
+\stopmessages
+
+\startmessages german library: references
+ 30: unbekanntes Object --
+ 31: doppeltes Object --
+\stopmessages
+
+%D Boxes can be considered reuable objects. Unfortunaltely once
+%D passed to the \DVI\ file, such objects cannot be reused. In
+%D \PDF\ however, reusing is possible and sometimes even a
+%D necessity. Therefore, \CONTEXT\ supports reusable objects.
+%D
+%D During the \TEX\ processing run, boxes can serve the purpose
+%D of objects, and the \DVI\ driver module implements objects
+%D using boxes. Only when \ETEX\ is widespread, and therefore
+%D the limit on 256 boxes is removed, this becomes useful.
+%D
+%D The \PDF\ and \PDFTEX\ driver modules implement objects
+%D using \PDF\ forms. There is no (real) restriction on the
+%D number of objects there.
+%D
+%D The first application of objects in \CONTEXT\ concerned
+%D \METAPOST\ graphics and fill||in form fields. The first
+%D application can save lots of bytes, while the latter use is
+%D more a necessity than byte saving.
+%D
+%D \starttypen
+%D \setobject{class}{name}\somebox{}
+%D \getobject{class}{name}
+%D \stoptypen
+%D
+%D Here \type{\somebox} can be whatever box specification
+%D suits \TEX.
+
+\def\presetobject#1#2%
+ {\doifundefined{\r!object#1::#2}
+ {\setxvalue{\r!object#1::#2}{NOT YET FLUSHED}}}
+
+\def\setobject#1#2% evt \initializepaper naar \everyshipout
+ {\initializepaper
+ \ifundefined{\r!object#1::#2}%
+ \expandafter\dosetobject
+ \else
+ \expandafter\gobblefourarguments
+ \fi
+ {#1}{#2}}
+
+\def\dosetobject#1#2%
+ {\dowithnextbox
+ {\bgroup
+ \dontshowcomposition % rather fuzzy in \setxvalue ... \hbox
+ \setxvalue{\r!object#1::#2}%
+ {\noexpand\dohandleobject{#1}{#2}
+ {\ifhbox\nextbox\hbox\else\vbox\fi}
+ {\the\wd\nextbox}{\the\ht\nextbox}{\the\dp\nextbox}}%
+ \dostartobject{#1}{#2}
+ {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}%
+ \box\nextbox
+ \dostopobject
+ \egroup}}
+
+\def\dogetobject#1#2#3#4#5#6%
+ {\initializepaper
+ \bgroup
+ \dontshowcomposition
+ \setbox0=\vbox to #5{\vfill\doinsertobject{#1}{#2}}%
+ \setbox0=#3{\box0}%
+ \wd0=#4\ht0=#5\dp0=#6\relax
+ \box0
+ \egroup}
+
+\def\getobject#1#2%
+ {\let\dohandleobject\dogetobject
+ \getvalue{\r!object#1::#2}}
+
+%D If needed one can ask for the dimensions of an object with:
+%D
+%D \starttypen
+%D \getobjectdimensions{class}{name}
+%D \stoptypen
+%D
+%D The results are reproted in \type {\objectwidth}, \type
+%D {\objectheight} and \type {\objectdepth}.
+
+\def\dogetobjectdimensions#1#2#3#4#5#6%
+ {\def\objectwidth {#4}%
+ \def\objectheight{#5}%
+ \def\objectdepth {#6}}
+
+\def\getobjectdimensions#1#2%
+ {\let\dohandleobject\dogetobjectdimensions
+ \let\objectwidth \!!zeropoint
+ \let\objectheight\!!zeropoint
+ \let\objectdepth \!!zeropoint
+ \getvalue{\r!object#1::#2}}
+
+%D We keep track of object references by means of the cross
+%D reference mechanism. Normally, objects are defined before
+%D they are used, but forward referencing sometimes occurs.
+%D
+%D \starttypen
+%D \dosetobjectreference {class} {identifier} {reference value}
+%D \dogetobjectreference {class} {identifier} \csname
+%D \stoptypen
+%D
+%D These commands are to be called by the \type{\startobject},
+%D \type{\stopobject} and \type{\insertobject} specials.
+
+\newif\ifobjectreferencing \objectreferencingtrue
+
+\def\checkobjectreferences%
+ {\bgroup
+ \setbox0=\hbox
+ {\doutilities{objectreferences}{\jobname}{}{}{}}%
+ \global\let\checkobjectreferences=\relax
+ \egroup}
+
+\def\setobjectreferences%
+ {\def\objectreference##1##2##3%
+ {\doifundefinedelse{\r!driver##1::##2}
+ {\setxvalue{\r!driver##1::##2}{##3}}
+ {\showmessage{\m!references}{31}{[##1 ##2=>##3]}}}}
+
+\def\resetobjectreferences%
+ {\let\objectreference=\gobblethreearguments}
+
+\resetobjectreferences
+
+\def\dosetobjectreference#1#2#3%
+ {\checkobjectreferences
+ \ifobjectreferencing
+ \bgroup
+ \edef\dowritereference%
+ {\writeutilitycommand{\objectreference{#1}{#2}{#3}}}%
+ \dowritereference
+ \egroup
+ \else
+ \global\objectreferencingtrue
+ \fi
+ \setxvalue{\r!driver#1::#2}{#3}}
+
+\def\defaultobjectreference#1#2{0}
+
+\def\dogetobjectreference#1#2#3%
+ {\checkobjectreferences
+ \doifdefinedelse{\r!driver#1::#2}
+ {\@EA\xdef\@EA#3\@EA{\csname\r!driver#1::#2\endcsname}}
+ {\showmessage{\m!references}{30}{[#1 #2=>\defaultobjectreference{#1}{#2}]}%
+ \xdef#3{\defaultobjectreference{#1}{#2}}}}
+
+\let\normalsetobject=\setobject
+
+\def\setobject%
+ {\global\objectreferencingfalse\normalsetobject}
+
+\def\setreferenceobject%
+ {\global\objectreferencingtrue\normalsetobject}
+
+%D \macro
+%D {doifobjectfoundelse,doifobjectreferencefoundelse}
+%D
+%D To prevent redundant definition of objects, one can use
+%D the next tests:
+%D
+%D \starttypen
+%D \doifobjectfoundelse{class}{object}{do then}{do else}
+%D \doifobjectreferencefoundelse{class}{object}{do then}{do else}
+%D \stoptypen
+
+\def\doifobjectfoundelse#1#2#3#4%
+ {\doifundefinedelse{\r!object#1::#2}{#4}{#3}}
+
+\def\doifobjectreferencefoundelse#1#2#3#4%
+ {\checkobjectreferences
+ \doifundefinedelse{\r!driver#1::#2}{#4}{#3}}
+
+%D \macro
+%D {doifobjectssupportedelse}
+%D
+%D Starting with reuse of graphics, we will implement object
+%D reuse when possible. To enable mechanisms to determine
+%D what method to use, we provide:
+%D
+%D \starttypen
+%D \doifobjectssupportedelse{true action}{false action}
+%D \stoptypen
+%D
+%D As we can see, currently objects depend on the special
+%D driver.
+
+\newif\ifobjectssupported \objectssupportedtrue
+
+\def\doifobjectssupportedelse#1#2%
+ {\ifobjectssupported
+ \doifspecialavailableelse\doinsertobject{#1}{#2}%
+ \else
+ #2%
+ \fi}
+
+%D There is a conceptual problem here. Objects are not possible
+%D in \DVI, unless faked like in \type {spec-dvi}. This means
+%D that we must be careful in loading special drivers that do
+%D support objects while we still want to be able to use the
+%D \DVI\ output.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-pag.tex b/tex/context/base/core-pag.tex
index d8b4c2f5e..0197e5454 100644
--- a/tex/context/base/core-pag.tex
+++ b/tex/context/base/core-pag.tex
@@ -1,284 +1,284 @@
-%D \module
-%D [ file=core-pag,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Pagebody Building,
-%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 / Pagebody Building}
-
-\unprotect
-
-\newbox\arrangedpageA
-\newbox\arrangedpageB
-
-\newif\ifswaparranged
-\newif\ifnegatearranged
-\newif\ifmirrorarranged
-\newif\ifdoublearranged
-
-\def\arrangedrotationO{0}
-\def\arrangedrotationE{0}
-
-\newcounter\arrangedpageN
-\chardef\arrangedpageT=1
-
-\def\stelarrangerenin[#1]%
- {\global\negatearrangedfalse
- \global\mirrorarrangedfalse
- \global\doublearrangedfalse
- \gdef\arrangedrotationO{0}%
- \gdef\arrangedrotationE{180}%
- \global\arrangingpagestrue
- \processallactionsinset
- [#1]
- [ \v!gespiegeld=>\global\mirrorarrangedtrue,
- \v!dubbelzijdig=>\global\doublearrangedtrue,
- \v!negatief=>\global\negatearrangedtrue,
- \v!geroteerd=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
- 90=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
- 180=>\gdef\arrangedrotationO{180}\gdef\arrangedrotationE{0},
- 270=>\gdef\arrangedrotationO{270}\gdef\arrangedrotationE{90},
- 2*8=>\global\chardef\arrangedpageX=4
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=8
- \global\chardef\horizontalcutmarks=5
- \global\chardef\verticalcutmarks=3
- \global\let\pusharrangedpage=\pusharrangedpageSIXTEEN
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2*4=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=3
- \global\let\pusharrangedpage=\pusharrangedpageEIGHT
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2*2=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=1
- \global\chardef\arrangedpageT=2
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=2
- \global\let\pusharrangedpage=\pusharrangedpageFOUR
- \global\let\poparrangedpages=\poparrangedpagesAB,
- 2UP=>\global\chardef\arrangedpageX=2
- \global\chardef\arrangedpageY=1
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=3
- \global\chardef\verticalcutmarks=2
- \global\let\handlearrangedpage=\handlearrangedpageTWOUP
- \global\let\pusharrangedpage=\pusharrangedpageTWO
- \global\let\poparrangedpages=\poparrangedpagesTWO,
- 2DOWN=>\global\chardef\arrangedpageX=1
- \global\chardef\arrangedpageY=2
- \global\chardef\arrangedpageT=4
- \global\chardef\horizontalcutmarks=2
- \global\chardef\verticalcutmarks=3
- \global\let\handlearrangedpage=\handlearrangedpageTWODOWN
- \global\let\pusharrangedpage=\pusharrangedpageTWO
- \global\let\poparrangedpages=\poparrangedpagesTWO,
- \s!reset=>\global\arrangingpagesfalse,
- \s!unknown=>\global\arrangingpagesfalse,
- \s!default=>\global\arrangingpagesfalse]%
- \doifcommonelse{#1}{90,270}
- {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution
- \ifarrangingpages
- \abortutilitygeneration
- \fi}
-
-\def\filluparrangedpages% beware: \realpageno is 1 ahead
- {\ifarrangingpages
- \scratchcounter=-\realpageno
- \divide\scratchcounter by \arrangedpageT
- \multiply\scratchcounter by \arrangedpageT
- \advance\scratchcounter by \realpageno
- \advance\scratchcounter by -1
- \dorecurse{\scratchcounter}
- {\geenhoofdenvoetregels
- \insertdummypage}
- \fi}
-
-\def\handlearrangedpageXY#1#2#3#4#5%
- {\global\setbox#5=\hbox to \arrangedpageX\papierbreedte
- {\setbox\scratchbox=\vbox to \arrangedpageY\papierhoogte
- {\forgetall
- \offinterlineskip
- \mindermeldingen
- \vskip#4\papierhoogte
- \hskip#3\papierbreedte
- \dorotatebox{#2}\hbox{\box#1}%
- \vfill}%
- \wd\scratchbox=\!!zeropoint
- \box\scratchbox\box#5\hss}}
-
-\def\gotonextarrangepage%
- {\global\advance\arrangeno by 1
- \def\pagecutmarksymbol%
- {\the\arrangeno}}
-
-\def\outputarrangedbox#1%
- {\bgroup
- \gotonextarrangepage
- \ifnum\arrangedrotationO\arrangedrotationE>0
- \ifdoublearranged
- \ifodd\arrangeno
- \setbox#1=\vbox{\dorotatebox\arrangedrotationO\hbox{\box#1}}%
- \else
- \setbox#1=\vbox{\dorotatebox\arrangedrotationE\hbox{\box#1}}%
- \fi
- \else
- \setbox#1=\vbox{\dorotatebox\arrangedrotationO\hbox{\box#1}}%
- \fi
- \fi
- \ifmirrorarranged
- \setbox#1=\vbox{\domirrorbox\vbox{\box#1}}%
- \fi
- \ifnegatearranged
- \negatecolorbox{#1}%
- \fi
- \finishpagebox#1
- \actualshipout{\box#1}%
- \egroup}
-
-% 16/8/4
-
-\def\poparrangedpagesAB%
- {\ifnum\arrangedpageN>0
- \mindermeldingen
- \papierbreedte=\arrangedpageX\papierbreedte
- \papierhoogte=\arrangedpageY\papierhoogte
- \outputarrangedbox\arrangedpageA
- \outputarrangedbox\arrangedpageB
- \doglobal\newcounter\arrangedpageN
- \fi}
-
-\def\pusharrangedpageSIXTEEN#1%
- {\doglobal\increment\arrangedpageN
- \reportarrangedpage\arrangedpageN
- \ifcase\arrangedpageN
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
- \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageB % 2
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 3
- \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageA % 4
- \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageA % 5
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 6
- \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageB % 7
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 8
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 9
- \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageB % 10
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 11
- \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageA % 12
- \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageA % 13
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 14
- \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageB % 15
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 16
- \poparrangedpages
- \fi}
-
-\def\pusharrangedpageEIGHT#1%
- {\doglobal\increment\arrangedpageN
- \reportarrangedpage\arrangedpageN
- \ifcase\arrangedpageN
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 2
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 3
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 4
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 5
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 6
- \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 7
- \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 8
- \poparrangedpages
- \fi}
-
-\def\pusharrangedpageFOUR#1%
- {\doglobal\increment\arrangedpageN
- \reportarrangedpage\arrangedpageN
- \ifcase\arrangedpageN
- \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 1
- \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageB % 2
- \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageB % 3
- \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 4
- \poparrangedpages
- \fi}
-
-% 2UP/2DOWN / 1pt prevents overflow
-
-\def\splitoffarrangedpagesTWO%
- {\splittopskip\!!zeropoint
- \global\setbox\arrangedpageA=\vsplit\arrangedpageB to \!!onepoint
- \scratchdimen=\ht\arrangedpageB
- \advance\scratchdimen by -\!!onepoint
- \ifdim\scratchdimen>\!!onepoint
- \setbox\scratchbox=\vsplit\arrangedpageB to \scratchdimen
- \fi}
-
-\def\handlearrangedpageTWOUP%
- {\splitoffarrangedpagesTWO
- \ifswaparranged
- \global\setbox\arrangedpageA=\hbox
- {\box\arrangedpageA\box\arrangedpageB}%
- \swaparrangedfalse
- \else
- \global\setbox\arrangedpageA=\hbox
- {\box\arrangedpageB\box\arrangedpageA}%
- \swaparrangedtrue
- \fi
- \global\ht\arrangedpageA=\papierhoogte
- \global\setbox\arrangedpageB=\box\scratchbox}
-
-\def\handlearrangedpageTWODOWN%
- {\splitoffarrangedpagesTWO
- \global\ht\arrangedpageA=\papierhoogte
- \global\ht\arrangedpageB=\papierhoogte
- \ifswaparranged
- \global\setbox\arrangedpageA=\vbox
- {\forgetall\offinterlineskip\vskip\papierhoogte
- \box\arrangedpageA\box\arrangedpageB}%
- \swaparrangedfalse
- \else
- \global\setbox\arrangedpageA=\vbox
- {\forgetall\offinterlineskip\vskip\papierhoogte
- \box\arrangedpageB\box\arrangedpageA}%
- \swaparrangedtrue
- \fi
- \global\setbox\arrangedpageB=\box\scratchbox}
-
-\def\poparrangedpagesTWO%
- {\ifnum\arrangedpageN>0
- \mindermeldingen
- \swaparrangedfalse
- \doloop
- {\handlearrangedpage
- \bgroup
- \papierbreedte=\arrangedpageX\papierbreedte
- \papierhoogte=\arrangedpageY\papierhoogte
- \ht\arrangedpageA=\papierhoogte
- \wd\arrangedpageA=\papierbreedte
- \outputarrangedbox\arrangedpageA
- \egroup
- \ifdim\ht\arrangedpageB=\!!zeropoint
- \exitloop
- \fi}%
- \doglobal\newcounter\arrangedpageN
- \fi}
-
-\def\pusharrangedpageTWO#1%
- {\doglobal\increment\arrangedpageN
- \reportarrangedpage\arrangedpageN
- \global\setbox\arrangedpageB=\vbox
- {\forgetall
- \offinterlineskip
- \unvbox\arrangedpageB
- \allowbreak
- \ht#1=\!!onepoint
- \dp#1=\!!zeropoint
- \vbox{\box#1}}}
-
-\protect
-
-\endinput
+%D \module
+%D [ file=core-pag,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Pagebody Building,
+%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 / Pagebody Building}
+
+\unprotect
+
+\newbox\arrangedpageA
+\newbox\arrangedpageB
+
+\newif\ifswaparranged
+\newif\ifnegatearranged
+\newif\ifmirrorarranged
+\newif\ifdoublearranged
+
+\def\arrangedrotationO{0}
+\def\arrangedrotationE{0}
+
+\newcounter\arrangedpageN
+\chardef\arrangedpageT=1
+
+\def\stelarrangerenin[#1]%
+ {\global\negatearrangedfalse
+ \global\mirrorarrangedfalse
+ \global\doublearrangedfalse
+ \gdef\arrangedrotationO{0}%
+ \gdef\arrangedrotationE{180}%
+ \global\arrangingpagestrue
+ \processallactionsinset
+ [#1]
+ [ \v!gespiegeld=>\global\mirrorarrangedtrue,
+ \v!dubbelzijdig=>\global\doublearrangedtrue,
+ \v!negatief=>\global\negatearrangedtrue,
+ \v!geroteerd=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
+ 90=>\gdef\arrangedrotationO{90}\gdef\arrangedrotationE{270},
+ 180=>\gdef\arrangedrotationO{180}\gdef\arrangedrotationE{0},
+ 270=>\gdef\arrangedrotationO{270}\gdef\arrangedrotationE{90},
+ 2*8=>\global\chardef\arrangedpageX=4
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=8
+ \global\chardef\horizontalcutmarks=5
+ \global\chardef\verticalcutmarks=3
+ \global\let\pusharrangedpage=\pusharrangedpageSIXTEEN
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2*4=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=3
+ \global\let\pusharrangedpage=\pusharrangedpageEIGHT
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2*2=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=1
+ \global\chardef\arrangedpageT=2
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=2
+ \global\let\pusharrangedpage=\pusharrangedpageFOUR
+ \global\let\poparrangedpages=\poparrangedpagesAB,
+ 2UP=>\global\chardef\arrangedpageX=2
+ \global\chardef\arrangedpageY=1
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=3
+ \global\chardef\verticalcutmarks=2
+ \global\let\handlearrangedpage=\handlearrangedpageTWOUP
+ \global\let\pusharrangedpage=\pusharrangedpageTWO
+ \global\let\poparrangedpages=\poparrangedpagesTWO,
+ 2DOWN=>\global\chardef\arrangedpageX=1
+ \global\chardef\arrangedpageY=2
+ \global\chardef\arrangedpageT=4
+ \global\chardef\horizontalcutmarks=2
+ \global\chardef\verticalcutmarks=3
+ \global\let\handlearrangedpage=\handlearrangedpageTWODOWN
+ \global\let\pusharrangedpage=\pusharrangedpageTWO
+ \global\let\poparrangedpages=\poparrangedpagesTWO,
+ \s!reset=>\global\arrangingpagesfalse,
+ \s!unknown=>\global\arrangingpagesfalse,
+ \s!default=>\global\arrangingpagesfalse]%
+ \doifcommonelse{#1}{90,270,\v!geroteerd}
+ {\swapmacros\horizontalcutmarks\verticalcutmarks}{}% ugly solution
+ \ifarrangingpages
+ \abortutilitygeneration
+ \fi}
+
+\def\filluparrangedpages% beware: \realpageno is 1 ahead
+ {\ifarrangingpages
+ \scratchcounter=-\realpageno
+ \divide\scratchcounter by \arrangedpageT
+ \multiply\scratchcounter by \arrangedpageT
+ \advance\scratchcounter by \realpageno
+ \advance\scratchcounter by -1
+ \dorecurse{\scratchcounter}
+ {\geenhoofdenvoetregels
+ \insertdummypage}
+ \fi}
+
+\def\handlearrangedpageXY#1#2#3#4#5%
+ {\global\setbox#5=\hbox to \arrangedpageX\papierbreedte
+ {\setbox\scratchbox=\vbox to \arrangedpageY\papierhoogte
+ {\forgetall
+ \offinterlineskip
+ \mindermeldingen
+ \vskip#4\papierhoogte
+ \hskip#3\papierbreedte
+ \dorotatebox{#2}\hbox{\box#1}%
+ \vfill}%
+ \wd\scratchbox=\!!zeropoint
+ \box\scratchbox\box#5\hss}}
+
+\def\gotonextarrangepage%
+ {\global\advance\arrangeno by 1
+ \def\pagecutmarksymbol%
+ {\the\arrangeno}}
+
+\def\outputarrangedbox#1%
+ {\bgroup
+ \gotonextarrangepage
+ \ifnum\arrangedrotationO\arrangedrotationE>0
+ \ifdoublearranged
+ \ifodd\arrangeno
+ \setbox#1=\vbox{\dorotatebox\arrangedrotationO\hbox{\box#1}}%
+ \else
+ \setbox#1=\vbox{\dorotatebox\arrangedrotationE\hbox{\box#1}}%
+ \fi
+ \else
+ \setbox#1=\vbox{\dorotatebox\arrangedrotationO\hbox{\box#1}}%
+ \fi
+ \fi
+ \ifmirrorarranged
+ \setbox#1=\vbox{\domirrorbox\vbox{\box#1}}%
+ \fi
+ \ifnegatearranged
+ \negatecolorbox{#1}%
+ \fi
+ \finishpagebox#1
+ \actualshipout{\box#1}%
+ \egroup}
+
+% 16/8/4
+
+\def\poparrangedpagesAB%
+ {\ifnum\arrangedpageN>0
+ \mindermeldingen
+ \papierbreedte=\arrangedpageX\papierbreedte
+ \papierhoogte=\arrangedpageY\papierhoogte
+ \outputarrangedbox\arrangedpageA
+ \outputarrangedbox\arrangedpageB
+ \doglobal\newcounter\arrangedpageN
+ \fi}
+
+\def\pusharrangedpageSIXTEEN#1%
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1}{180}{3}{1}\arrangedpageA % 4
+ \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageA % 5
+ \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 6
+ \or \handlearrangedpageXY{#1} {0}{3}{0}\arrangedpageB % 7
+ \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 8
+ \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 9
+ \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageB % 10
+ \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 11
+ \or \handlearrangedpageXY{#1} {0}{2}{0}\arrangedpageA % 12
+ \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageA % 13
+ \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 14
+ \or \handlearrangedpageXY{#1}{180}{2}{1}\arrangedpageB % 15
+ \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 16
+ \poparrangedpages
+ \fi}
+
+\def\pusharrangedpageEIGHT#1%
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 4
+ \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 5
+ \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageB % 6
+ \or \handlearrangedpageXY{#1}{180}{0}{1}\arrangedpageB % 7
+ \or \handlearrangedpageXY{#1}{180}{1}{1}\arrangedpageA % 8
+ \poparrangedpages
+ \fi}
+
+\def\pusharrangedpageFOUR#1%
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \ifcase\arrangedpageN
+ \or \handlearrangedpageXY{#1} {0}{1}{0}\arrangedpageA % 1
+ \or \handlearrangedpageXY{#1}{180}{0}{0}\arrangedpageB % 2
+ \or \handlearrangedpageXY{#1}{180}{1}{0}\arrangedpageB % 3
+ \or \handlearrangedpageXY{#1} {0}{0}{0}\arrangedpageA % 4
+ \poparrangedpages
+ \fi}
+
+% 2UP/2DOWN / 1pt prevents overflow
+
+\def\splitoffarrangedpagesTWO%
+ {\splittopskip\!!zeropoint
+ \global\setbox\arrangedpageA=\vsplit\arrangedpageB to \!!onepoint
+ \scratchdimen=\ht\arrangedpageB
+ \advance\scratchdimen by -\!!onepoint
+ \ifdim\scratchdimen>\!!onepoint
+ \setbox\scratchbox=\vsplit\arrangedpageB to \scratchdimen
+ \fi}
+
+\def\handlearrangedpageTWOUP%
+ {\splitoffarrangedpagesTWO
+ \ifswaparranged
+ \global\setbox\arrangedpageA=\hbox
+ {\box\arrangedpageA\box\arrangedpageB}%
+ \swaparrangedfalse
+ \else
+ \global\setbox\arrangedpageA=\hbox
+ {\box\arrangedpageB\box\arrangedpageA}%
+ \swaparrangedtrue
+ \fi
+ \global\ht\arrangedpageA=\papierhoogte
+ \global\setbox\arrangedpageB=\box\scratchbox}
+
+\def\handlearrangedpageTWODOWN%
+ {\splitoffarrangedpagesTWO
+ \global\ht\arrangedpageA=\papierhoogte
+ \global\ht\arrangedpageB=\papierhoogte
+ \ifswaparranged
+ \global\setbox\arrangedpageA=\vbox
+ {\forgetall\offinterlineskip\vskip\papierhoogte
+ \box\arrangedpageA\box\arrangedpageB}%
+ \swaparrangedfalse
+ \else
+ \global\setbox\arrangedpageA=\vbox
+ {\forgetall\offinterlineskip\vskip\papierhoogte
+ \box\arrangedpageB\box\arrangedpageA}%
+ \swaparrangedtrue
+ \fi
+ \global\setbox\arrangedpageB=\box\scratchbox}
+
+\def\poparrangedpagesTWO%
+ {\ifnum\arrangedpageN>0
+ \mindermeldingen
+ \swaparrangedfalse
+ \doloop
+ {\handlearrangedpage
+ \bgroup
+ \papierbreedte=\arrangedpageX\papierbreedte
+ \papierhoogte=\arrangedpageY\papierhoogte
+ \ht\arrangedpageA=\papierhoogte
+ \wd\arrangedpageA=\papierbreedte
+ \outputarrangedbox\arrangedpageA
+ \egroup
+ \ifdim\ht\arrangedpageB=\!!zeropoint
+ \exitloop
+ \fi}%
+ \doglobal\newcounter\arrangedpageN
+ \fi}
+
+\def\pusharrangedpageTWO#1%
+ {\doglobal\increment\arrangedpageN
+ \reportarrangedpage\arrangedpageN
+ \global\setbox\arrangedpageB=\vbox
+ {\forgetall
+ \offinterlineskip
+ \unvbox\arrangedpageB
+ \allowbreak
+ \ht#1=\!!onepoint
+ \dp#1=\!!zeropoint
+ \vbox{\box#1}}}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 57a844ffb..078075652 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -1,1869 +1,2685 @@
-% DUE TO NEW/FUTURE FEATURES THIS MODULE IS UNDER RECONSTRUCTION !
-%
-% uitprinten
-% engels maken
-% rommel voorlopig naar core-01d
-% programma, profiel etc als methode
-
-%D \module
-%D [ file=core-ref,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Cross Referencing,
-%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 / Cross Referencing}
-
-\unprotect
-
-\startmessages dutch library: references
- title: verwijzingen
- 1: onbekende verwijzing --
- 2: dubbele verwijzing -- op pagina --
- 3: type verwijzing -- onbekend
- 21: document -- geladen
- 22: document -- is niet interactief
- 23: onduidelijke verwijzing -- (prefix=--)
-\stopmessages
-
-\startmessages english library: references
- title: references
- 1: unknown reference --
- 2: duplicate reference -- on page --
- 3: unknown reference type --
- 21: document -- loaded
- 22: document -- is not interactive
- 23: obscure reference -- (prefix=--)
-\stopmessages
-
-\startmessages german library: references
- title: referenzen
- 1: unbekannte Referenz --
- 2: doppelte Referenz -- auf Seite --
- 3: unbekannte Referenz Typ --
- 21: Dokument -- geladen
- 22: Dokument -- ist nicht aktiv
- 23: Obskure Referenz -- (Prefix=--)
-\stopmessages
-
-%D This module deals with referencing. In \CONTEXT\ referencing
-%D is one of the core features, although at a first glance
-%D probably nobody will notice. This is good, because
-%D referencing should be as hidden as possible.
-%D
-%D In paper documents, referencing comes down to cross
-%D referencing, but in their interactive counterparts, is also
-%D involves navigation. Many features implemented here are
-%D therefore closely related to navigation.
-%D
-%D Many \CONTEXT\ commands can optionally be fed with a
-%D reference. Such a reference, when called upon, returns the
-%D number of a figure, table, chapter etc, a piece of text, or
-%D a pagenumber.
-%D
-%D There are three ways of defining a reference:
-%D
-%D \starttypen
-%D \pagereference[here]
-%D \textreference[here]{some text}
-%D \stoptypen
-%D
-%D the third alternative combines them in:
-%D
-%D \starttypen
-%D \reference[here]{some text}
-%D \stoptypen
-
-\def\textreference {\dosingleargument\dotextreference}
-\def\pagereference {\dosingleargument\dopagereference}
-\def\reference {\dosingleargument\doreference}
-
-%D These are implemented in a low level form as:
-
-\def\dotextreference[#1]#2{\rawtextreference{\s!txt}{#1}{#2}}
-\def\dopagereference [#1]{\rawpagereference{\s!pag}{#1}}
-\def\doreference [#1]#2{\rawreference {\s!ref}{#1}{#2}}
-
-%D Actually there is not much difference between a text and a
-%D full reference, but it's the concept that counts. The low
-%D level implementation is:
-
-\def\rawpagereference#1#2%
- {\makesectionformat
- \writereference{#2}
- {\sectionformat::\noexpand\pagenumber}
- {\noexpand\realfolio}
- {}}
-
-\def\rawtextreference#1#2#3%
- {\writereference{#2}
- {}
- {}
- {#3}}
-
-\def\rawreference#1#2#3%
- {\makesectionformat
- \writereference{#2}
- {\sectionformat::\noexpand\pagenumber}
- {\noexpand\realfolio}
- {#3}}
-
-%D As we can see, these macros depend on three other ones,
-%D \type {\makesectionformat}, that generated \type
-%D {\sectionformat}, \type {\pagenumber}. The not yet used
-%D argument \type{#1} is a tag that specifies the type of
-%D reference.
-%D
-%D Why do we have to write down references? \TEX, and therefore
-%D \CONTEXT\ is a batch processing system. During the
-%D typesetting process, pages are shipped out, which means that
-%D especially forward references are not yet known when the
-%D page is typeset. That's why we always need a second (and
-%D sometimes even a third) pass to get the cross references
-%D right. The same goes for lists and other pagenumber
-%D dependant data.
-%D
-%D Therefore, during a pass, \CONTEXT\ writes the references to
-%D a the utility file. The next macro does the job and
-%D generates entries like:
-%D
-%D \starttypen
-%D \mainreference{prefix}{reference}{page}{realpage}{text}
-%D \stoptypen
-%D
-%D We did not yet discuss prefixing. Especially in interactive
-%D documents, it's not always easy to keep track of duplicate
-%D references. The prefix mechanism, which we will describe
-%D later on, solves this problem. By (automatically) adding a
-%D prefix one keeps references local, but the global ones in
-%D view. To enable this feature, we explictly split the prefix
-%D from the reference.
-%D
-%D A former implementation used \type{\removesubstring} to get
-%D rid of the don't||use||a||prefix signal (\type{-:}), but the
-%D next one proved to be more than twice as fast.
-
-\let\referenceprefix=\empty
-\let\lastreference =\empty
-
-%D The last reference is saved in a macro named \type
-%D {\lastreference} (indeed). To keep track of the order of
-%D references, later we will see for what purpose, we maintain
-%D a counter.
-
-\newcount\crossreferencenumber \crossreferencenumber=1
-
-\def\writereference#1#2#3#4%
- {\ifreferencing
- \doifsomething{#1}
- {\def\dowritereference##1%
- {\xdef\lastreference{##1}%
- \@EA\dodowritereference\lastreference\empty\empty\end
- {#2}{#3}{#4}}%
- \processcommalist[#1]\dowritereference}%
- \fi}
-
-\def\dodowritereference#1#2#3\end#4#5#6%
- {\bgroup
- \global\advance\crossreferencenumber by 1
- \if#1-\if#2:%
- \let\referenceprefix=\empty
- \xdef\lastreference{#3}%
- \else
- \xdef\lastreference{#1#2#3}%
- \fi\else
- \xdef\lastreference{#1#2#3}%
- \fi
- \ifx\lastreference\empty \else
- \doiffirstreferenceoccurance{\lastreference}
- {\thisisdestination{\referenceprefix\lastreference}}%
- \@EA\referentieinfo\@EA>\@EA{\lastreference}%
- \edef\dododowritereference%
- {\writeutilitycommand
- {\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
- \dododowritereference
- \fi
- \egroup}
-
-%D We will implement \type {\doiffirstreferenceoccurance}
-%D later on.
-
-%D When (during a second pass over the document) references are
-%D loaded, they are saved in a macro, one for each reference.
-%D In practice this comes to giving \type {\mainreference} a
-%D appropriate meaning and loading the utility file.
-
-%\def\setreferences%
-% {\def\mainreference##1##2##3##4##5%
-% {\doifundefinedelse{\r!cross\fileprefix##1##2}
-% {\setglobalcrossreference{##1##2}{##3}{##4}{##5}}
-% {\showmessage{\m!references}{2}{[##1][##2],##4}}}}
-
-\def\setreferences%
- {\def\mainreference##1##2##3##4##5%
- {\doifundefinedelse{\r!cross\fileprefix##1##2}
- {\setglobalcrossreference{##1##2}{##3}{##4}{##5}}
- {\ifcase0##4\else\showmessage{\m!references}{2}{[##1][##2],##4}\fi}}}
-
-\def\resetreferences%
- {\let\mainreference=\gobblefivearguments}
-
-\resetreferences
-
-%D Here we see another kind of prefix surface: \type
-%D {\fileprefix}. This prefix enables us to use references from
-%D different files in one document. This is no really useful in
-%D paper documents, but many interactive ones cannot do
-%D without.
-
-\let\fileprefix=\empty
-
-%D Loading references is done using the normal utility file
-%D handling macros. The \type{\hbox} trick prevents spaces
-%D creeping in (references are set globally anyway).
-
-\def\usereferences[#1]%
- {\bgroup
- \setbox0=\hbox
- {\doonlyonce{references:#1}{\doutilities{references}{#1}{}{}{}}}%
- \egroup}
-
-\def\checkreferences%
- {\usereferences[\jobname]%
- \checkrealpage
- \global\let\checkreferences=\relax}
-
-%D As mentioned we will also use the cross reference mechanism
-%D for navigational purposes. The main reason for this is that
-%D we want to treat both categories alike:
-%D
-%D \starttypen
-%D \goto{go back}[PreviousJump]
-%D \goto{colofon}[colofon page]
-%D \stoptypen
-%D
-%D Here \type{PreviousJump} is handled by the viewer, while the
-%D \type{colofon page} reference is, apart from hyperlinking, a
-%D rather normal reference.
-%D
-%D We already saw that cross refences are written to and read
-%D from a file. The pure navigational ones don't need to be
-%D written to file, but both for fast processing and
-%D transparant integration, they are saved internally as a sort
-%D of reference. We can easily distinguish such system
-%D references from real cross reference ones by their tag:
-
-\chardef\rt!cross=0
-\chardef\rt!done =1
-\chardef\rt!page =2
-\chardef\rt!exec =3
-\chardef\rt!list =4
-
-%D Here the \type{\rt!exec} tags a viewer specific navigational
-%D reference, while for instance \type{\rt!page} gives fast
-%D access to for instance the previous or next page. The
-%D counter serves a purpose to be explained later.
-
-\newcount\crossreferenceorder
-
-\def\setlocalcrossreference#1#2#3#4%
- {\setevalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{#4}{0}}}
-
-\def\setglobalcrossreference#1#2#3#4%
- {\global\advance\crossreferenceorder by 1
- \setxvalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{#4}{\the\crossreferenceorder}}}
-
-\def\setlocalsystemreference#1#2#3%
- {\setevalue{\r!cross\fileprefix#2}{#1{#3}}}
-
-\def\setglobalsystemreference#1#2#3%
- {\setxvalue{\r!cross\fileprefix#2}{#1{#3}}}
-
-%D References from other files are defined globally without
-%D ordering data. The first definition, the one without
-%D \type{#1}, is used as a signal that references are defined.
-
-\def\setoutercrossreference#1#2#3#4%
- {\setxvalue{\r!cross\fileprefix}{\rt!cross{}{}{1}{0}}%
- \setxvalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{#4}{0}}}
-
-%D In practice accessing a reference comes down to:
-%D
-%D \startopsomming[opelkaar]
-%D \som checking the validity
-%D \som determining the type
-%D \som filtering the content
-%D \stopopsomming
-%D
-%D We'll deal with the last two steps first. References are
-%D saved in the general format:
-%D
-%D \starttypen
-%D {\referenceclass{realpage}{page}{text}}
-%D {\referenceclass{type}{data}}
-%D \stoptypen
-%D
-%D When we filter the content, next macros are set when we
-%D meet a normal cross reference:
-
-\let\currentrealreference=\empty
-\let\currentpagereference=\empty
-\let\currenttextreference=\empty
-
-%D System references only have one component:
-
-\let\currentdatareference=\empty
-
-%D Because internally a reference comes in two disguises, one
-%D with four arguments and one with only two, we need a two
-%D step filter.
-
-\def\getreferenceelements#1%
- {\edef\referenceelements{\getvalue{\r!cross\referenceprefix#1}}%
- \expandafter\dogetreferenceelements\referenceelements{}{}{}{}}
-
-%D In the following step, the \type{\ifx#1} test is needed
-%D because we can access this macro directly, and therefore
-%D \type{#1} can be an undefined reference (in fact, this hack
-%D was needed for the line numbering mechanism).
-%D
-%D We already introduced a few counters. Here we see why we
-%D needed those. The discrancy between the cross reference
-%D definition order (determined by the utility file) and the
-%D moment the reference is defined in the text, is a measure
-%D for it's forward character. This enables references like
-%D {\em as we will see later on}.
-
-\chardef\currentreferencetype=0
-
-\newif\ifforwardreference
-
-\def\dogetreferenceelements#1#2#3#4#5%
- {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
- \ifnum\currentreferencetype<2
- \def\currentpagereference{\referencepagenumber[#2]}%
- \edef\currentrealreference{#3}%
- \def\currenttextreference{#4}%
- \ifnum0#5>\crossreferencenumber
- \forwardreferencetrue
- \else
- \forwardreferencefalse
- \fi
- \else
- \def\currentdatareference{#2}%
- \edef\currentrealreference{#3}%
- \def\currenttextreference{#4}%
- \forwardreferencefalse
- \fi}
-
-%D When inside this tetsing macro we can savely use:
-
-\def\doifforwardreferenceelse#1#2%
- {\ifforwardreference#1\else#2\fi}
-
-%D Duplicate references are reported while loading the utility
-%D file. To prevent problems with document viewers cq.
-%D preprocessors, one can enable a (bit time consuming) check.
-
-\newif\ifcheckduplicatereferences
-
-%D The next rather dirty trick is needed to preserve the
-%D meaning of the original cross reference. In fact,
-%D \type{\rt!cross} is toggled to \type{\rt!done}.
-
-\def\doiffirstreferenceoccurance#1#2%
- {\ifcheckduplicatereferences
- \doifundefinedelse{\r!cross\referenceprefix#1}
- {#2}
- {\getreferenceelements{#1}%
- \ifnum\currentreferencetype=\rt!cross
- #2%
- \bgroup
- \def\rt!cross##1##2##3##4%
- {\setgvalue{\r!cross\referenceprefix#1}%
- {\rt!done{##1}{##2}{##3}{##4}}}%
- \getvalue{\r!cross\referenceprefix#1}%
- \egroup
- \fi}%
- \else
- #2%
- \fi}
-
-%D We still have to test for the existence of a reference, but
-%D before we come to that, we first look into the way a
-%D reference can be accessed. It will be no surprise that
-%D references can come in several forms.
-%D
-%D Cross references appear as numbers (figure~1.1, chapter~2)
-%D or pagenumbers (page~2, page 3--2), and are called with
-%D \type{\in} and \type{\at}. In interactive documents we also
-%D have \type{\goto}, \type{\button} and alike. These are more
-%D versatile and look like:
-%D
-%D \starttypen
-%D \goto[reference]
-%D \goto[outer reference::]
-%D \goto[outer reference::inner reference]
-%D \goto[operation(argument)]
-%D \goto[operation(action{argument,argument})]
-%D \stoptypen
-%D
-%D The first one is a normal reference, the second and third
-%D are references to a file or \URL. The brace delimited
-%D references for instance refer to a \JAVASCRIPT. The last
-%D example shows that we can pass arguments to the actions.
-%D
-%D When we split off the components of such a reference, the
-%D results are available in:
-%D
-%D \starttypen
-%D \currentreferencespecial
-%D \currentreferenceoperation
-%D \currentreferencearguments
-%D \currentinnerreference
-%D \currentouterreference
-%D \currentfullreference
-%D \stoptypen
-%D
-%D Splitting a reference is done by:
-%D
-%D \starttypen
-%D \splitofffullreference {reference}
-%D \splitoffreference {reference}
-%D \stoptypen
-%D
-%D The second alternative can be used in a second stage
-%D splitoff and only handles \type{::}.
-
-\newif\ifreferencefound
-
-\let\currentfullreference =\empty
-\let\currentreferencespecial =\empty
-\let\currentreferenceoperation=\empty
-\let\currentreferencearguments=\empty
-\let\currentouterreference =\empty
-\let\currentinnerreference =\empty
-
-\def\splitofffullreference#1%
- {\edef\currentfullreference{#1}%
- \@EA\dosplitofffullreference\currentfullreference\empty(\relax)\empty\end}
-
-\def\dosplitofffullreference#1(#2#3)#4#5\end
- {\ifx#2)%
- \let\currentreferenceoperation=\empty
- \let\currentreferencearguments=\empty
- \let\currentinnerreference=\empty
- \dodosplitofffullreference#1::::\empty\end
- \currentouterreference\currentreferencespecial
- \else\ifx#2\relax
- \let\currentreferencespecial=\empty
- \let\currentreferenceoperation=\empty
- \let\currentreferencearguments=\empty
- \dodosplitofffullreference#1::::\empty\end
- \currentouterreference\currentinnerreference
- \else
- \dosplitoffreferenceoperation#2#3{}\end
- \let\currentinnerreference=\empty
- \dodosplitofffullreference#1::::\empty\end
- \currentouterreference\currentreferencespecial
- \fi\fi}
-
-\def\dosplitoffreferenceoperation#1#%
- {\def\currentreferenceoperation{#1}%
- \dodosplitoffreferenceoperation}
-
-\def\dodosplitoffreferenceoperation#1#2\end
- {\def\currentreferencearguments{#1}}
-
-\def\dodosplitofffullreference#1::#2::#3#4\end#5#6%
- {\if#3:%
- \edef#5{#1}\edef#6{#2}%
- \else
- \let#5=\empty\edef#6{#1}%
- \fi}
-
-\def\splitoffreference#1%
- {\expandafter\dodosplitofffullreference#1::::\empty\end
- \currentouterreference\currentinnerreference}
-
-%D Although the previous split macros have a multistep
-%D character, there performance is quite reasonable.
-%D
-%D For debugging purposes we provide a showcase macro:
-
-\def\showcurrentreference%
- {\bgroup\tttf
- /ful/\convertcommand\currentfullreference \to\ascii\ascii/\par
- /spe/\convertcommand\currentreferencespecial \to\ascii\ascii/\par
- /ope/\convertcommand\currentreferenceoperation\to\ascii\ascii/\par
- /arg/\convertcommand\currentreferencearguments\to\ascii\ascii/\par
- /out/\convertcommand\currentouterreference \to\ascii\ascii/\par
- /inn/\convertcommand\currentinnerreference \to\ascii\ascii/\par
- \egroup}
-
-%D We use this visualizer to demonstrate the way references are
-%D split.
-%D
-%D \hbox{\splitofffullreference{rr}\showcurrentreference}
-%D \hbox{\splitofffullreference{pp(qq)}\showcurrentreference}
-%D \hbox{\splitofffullreference{pp(qq{aa,bb})}\showcurrentreference}
-%D \hbox{\splitofffullreference{ff::}\showcurrentreference}
-%D \hbox{\splitofffullreference{ff::rr}\showcurrentreference}
-%D \hbox{\splitofffullreference{ff::pp()}\showcurrentreference}
-%D \hbox{\splitofffullreference{ff::pp(qq)}\showcurrentreference}
-%D \hbox{\splitofffullreference{ff::pp(qq{aa})}\showcurrentreference}
-
-%D Finaly we've come to the promissed testing step. As we can
-%D see, this macro does bit more than testing: it also resolves
-%D the reference. This means that whenever we test for the
-%D existance of a reference at an outer level, we have all the
-%D relevant properties of that reference avaliable inside the
-%D true branche~(\type{#2}).
-%D
-%D The prefix has to do with localizing references. When a
-%D prefix is set, looking for a reference comes to looking for
-%D the prefixed one, and when not found, looking for the non
-%D prefixed one. Consider for instance the prefix set to
-%D \type{sidetrack}.
-%D
-%D \starttypen
-%D \pagereference[important]
-%D \pagereference[unimportant]
-%D \setupreferencing[prefix=sidetrack]
-%D \pagereference[important]
-%D \stoptypen
-%D
-%D results in saving (writing) the references
-%D
-%D \starttypen
-%D ...{}{important}
-%D ...{}{unimportant}
-%D ...{sidetrack}{important}...
-%D \stoptypen
-%D
-%D Now when we call for \type{unimportant}, we will indeed get
-%D the pagenumber associated to this reference. But when we
-%D call for \type{important}, while the prefix is still set, we
-%D will get the pagenumber bound to the prefixed one.
-%D
-%D {\em Some day, when processing time and memory are no longer
-%D performance factors, we will introduce multi||level
-%D prefixes.}
-
-% \def\doifreferencefoundelse#1#2#3%
-% {\checkreferences
-% \bgroup
-% \let\unharmedreferenceprefix=\referenceprefix
-% \bgroup
-% \splitofffullreference{#1}%
-% \ifx\currentreferencespecial\empty
-% \ifx\currentouterreference\empty
-% \doifdefinedelse{\r!cross\referenceprefix\currentfullreference}
-% {\global\referencefoundtrue}
-% {\let\referenceprefix=\empty
-% \doifdefinedelse{\r!cross\currentfullreference}
-% {\global\referencefoundtrue}
-% {\global\referencefoundfalse}}%
-% \else
-% \global\referencefoundtrue
-% \fi
-% \doifpredefinedreferenceelse{\currentfullreference} % no \referenceprefix
-% {\global\referencefoundfalse}{}%
-% \ifreferencefound
-% \getreferenceelements{\currentfullreference}%
-% \fi
-% \else
-% \let\referenceprefix=\empty
-% \let\unharmedreferenceprefix=\empty
-% \doifdefinedelse{\s!do\v!test\currentreferencespecial}
-% {\getvalue{\s!do\v!test\currentreferencespecial}
-% {\global\referencefoundtrue}{\global\referencefoundfalse}}
-% {\global\referencefoundtrue}%
-% \fi
-% \ifreferencefound
-% #2%
-% \egroup
-% \else
-% #3%
-% \egroup
-% \predefinereference{#1}% no \referenceprefix
-% \fi
-% \egroup}
-
-%D FILEPREFIX WEEDEN
-
-\def\doifreferencefoundelse#1#2#3% opsplitsen in inner/outer/special
- {\checkreferences
- \bgroup
- \let\unharmedreferenceprefix=\referenceprefix
- \bgroup
- \splitofffullreference{#1}%
- \ifx\currentreferencespecial\empty
- \ifx\currentouterreference\empty
- \docheckinnerreference
- \else
- \docheckouterreference
- \fi
- \ifreferencefound
- \getreferenceelements\currentfullreference
- \fi
- \else
- \docheckspecialreference
- \fi
- \ifreferencefound
- #2\egroup
- \else
- #3\egroup
- \fi
- \egroup}
-
-%D The next fast one permits rather raw references with
-%D \type{()}'s and is used in the object reference mechanism.
-
-\def\doifrawreferencefoundelse#1#2#3%
- {\checkreferences
- \bgroup
- \edef\currentfullreference{#1}%
- \doifdefinedelse{\r!cross\currentfullreference}
- {\getreferenceelements\currentfullreference
- \global\referencefoundtrue #2}
- {\global\referencefoundfalse #3}%
- \egroup}
-
-%D The inner case is simple. Only two cases have to be taken
-%D care of:
-%D
-%D \starttypen
-%D \naar{some text}[reference]
-%D \naar{some text}[prefix:reference]
-%D \stoptypen
-
-\def\docheckinnerreference%
- {\global\let\predefinedreference=\currentinnerreference
- \doifdefinedelse{\r!cross\referenceprefix\currentfullreference}
- {\global\referencefoundtrue}
- {\let\referenceprefix=\empty
- \doifdefinedelse{\r!cross\currentfullreference}
- {\global\referencefoundtrue}
- {\global\referencefoundfalse}}%
- \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
-
-%D References to other files however are treated strict or
-%D tolerant, depending on their loading and availability:
-%D
-%D \starttypen
-%D \useexternaldocument[somefile][filename][a nice description]
-%D
-%D \goto{checked reference}[somefile::reference]
-%D \goto{unchecked reference}[somefile::]
-%D \goto{unchecked reference}[anotherfile::reference]
-%D \stoptypen
-%D
-%D Here we use the dummy reference \type{somefile::} set in
-%D \type{\setouterreference} as a signal that indeed references
-%D are defined for the outer file.
-
-\def\docheckouterreference%
- {\let\referenceprefix=\empty
- \let\unharmedreferenceprefix=\empty
- \xdef\predefinedreference%
- {\currentouterreference::\currentinnerreference}%
- \ifx\innerreference\empty
- \global\referencefoundtrue % no checking done
- \else
- \doifdefinedelse{\r!cross\currentouterreference::}
- {\doifdefinedelse{\r!cross\currentfullreference}
- {\global\referencefoundtrue}
- {\global\referencefoundfalse}}
- {\global\referencefoundtrue}% no checking done
- \fi
- \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
-
-%D Special references are only tested when some test routine is
-%D defined.
-
-\def\docheckspecialreference%
- {\let\referenceprefix=\empty
- \let\unharmedreferenceprefix=\empty
- \xdef\predefinedreference%
- {\currentreferencespecial::\currentreferenceoperation}%
- \doifdefinedelse{\s!do\v!test\currentreferencespecial}
- {\getvalue{\s!do\v!test\currentreferencespecial}
- {\global\referencefoundtrue}
- {\global\referencefoundfalse}}
- {\global\referencefoundtrue}%
- \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
-
-%D An unknown reference is reported on the screen, in the log
-%D file and, when enabled, in the left margin of the text.
-
-\def\unknownreference#1%
- {\ifvoorlopig
- \doifsomething{#1}
- {\inlinker
- {\infofont
- \dimen0=\linkermargebreedte
- \advance\dimen0 by -2em
- \doboundtext{#1}{\dimen0}{..}->}}%
- \fi
- \doifpredefinedreferenceelse
- {}
- {\predefinereference
- \showmessage{\m!references}{1}{[\unharmedreferenceprefix][#1]}}}
-
-%D Although not actually needed, we default the unharmed
-%D reference prefix to the normal one.
-
-\def\unharmedreferenceprefix%
- {\referenceprefix}
-
-%D When a reference is not found, we typeset a placeholder
-%D (two glyphs are often enough to represent the reference
-%D text).
-
-
-\def\dummyreference%
- {{\tttf ??}}
-
-%D To prevent repetitive messages concerning a reference
-%D being defined, we set such an unknown reference to an empty
-%D one after the first encounter.
-
-\let\predefinedreference=\s!unknown
-
-\def\predefinereference%
- {\setxvalue{\r!cross\predefinedreference}{\rt!cross{}{}{}{}}}
-
-%D Testing on existance then becomes:
-
-\def\doifpredefinedreferenceelse%
- {\doifelsevalue{\r!cross\predefinedreference}{\rt!cross{}{}{}{}}}
-
-%D Apart from cross references supplied by the user, \CONTEXT\
-%D generates cross references itself. Most of them are not
-%D saved as a reference, but stored with their source, for
-%D instance a list or an index entry. Such automatically
-%D generated, for the user invisible, references are called
-%D {\em internal references}. The user supplied ones are
-%D labeled as {\em external references}.
-%D
-%D A second important characteristic is that when we want to
-%D support different backends (viewers), we need to support
-%D named destinations as well as page numbers. I invite readers
-%D to take a glance at the special driver modules to understand
-%D the fine points of this. As a result we will deal with {\em
-%D locations} as well as {\em real page numbers}. We explictly
-%D call this pagenumber a real one, because it is independant
-%D of the page numbering scheme used in the document.
-%D
-%D One of the reasons for \CONTEXT\ being the first \TEX\ base
-%D macropackage to support sophisticated interactive \PDF\
-%D files, lays in the mere fact that real page numbers are
-%D available in most two pass data, like references, list data
-%D and index entries.
-%D
-%D We will speak of \type{thisis...} when we are marking a
-%D location, and \type{goto...} when we point to such a
-%D location. The latter one can be seen as a hyperlink to the
-%D former one. In the next macros one we use constructs like:
-%D
-%D \starttypen
-%D \dostart...
-%D \dostop...
-%D \stoptypen
-%D
-%D Such macros are used to invoke the relevant specials from
-%D the special driver modules (see \type{spec-ini}). The flag
-%D \type{\iflocation} signals if we're in interactive mode.
-
-\def\thisisdestination#1% destination
- {\iflocation
- \ifusepagedestinations \else
- \dostartthisislocation{#1}%
- \dostopthisislocation
- \fi
- \fi}
-
-\def\thisisrealpage#1% pagenumber
- {\iflocation
- \dostartthisisrealpage{#1}%
- \dostopthisisrealpage
- \fi}
-
-%D The previous tho macros were easy ones, opposite to their
-%D counterparts. A common component in these is:
-%D
-%D \starttypen
-%D \dostartgoto
-%D \data {..}
-%D \start {..}
-%D \stop {..}
-%D \dostopgoto
-%D \stoptypen
-%D
-%D Here data can be whatever needs highlighting, e.g. {\em
-%D figure 2.4}, and the start and stop entries handle the
-%D specials. The two \DIMENSIONS\ \type{\buttonwidth} and
-%D \type{\buttonheight} have to be set when handling the
-%D data~(\type{#2}).
-
-\ifx\buttonheight\undefined \newdimen\buttonheight \fi
-\ifx\buttonwidth \undefined \newdimen\buttonwidth \fi
-
-\def\gotodestination#1#2#3#4#5% url file destination page data
- {\iflocation
- \ifusepagedestinations
- \gotorealpage{#1}{#2}{#4}{#5}%
- \else
- \dostartgoto
- \data
- {#5}%
- \start
- \dostartgotolocation
- {\number\buttonwidth}{\number\buttonheight}
- {#1}{#2}{#3}{#4}%
- \stop
- \dostopgotolocation
- \dostopgoto
- \fi
- \else
- {#5}%
- \fi}
-
-\def\gotorealpage#1#2#3#4% url file page data
- {\iflocation
- \dostartgoto
- \data
- {#4}%
- \start
- \dostartgotorealpage
- {\number\buttonwidth}{\number\buttonheight}
- {#1}{#2}{#3}%
- \stop
- \dostopgotorealpage
- \dostopgoto
- \else
- {#4}%
- \fi}
-
-%D Internal references can best be set using the next few
-%D macros. Setting such references to unique values is
-%D completely up to the macros that call them.
-%D
-%D \starttypen
-%D \thisissomeinternal{tag}{identifier}
-%D \gotosomeinternal {tag}{identifier}{pagenumber}{text}
-%D \stoptypen
-
-\def\thisissomeinternal#1#2% tag reference
- {\doifsomething{#2}{\thisisdestination{#1:#2}}}
-
-\def\gotosomeinternal#1#2#3#4%
- {\gotodestination{}{}{#1:#2}{#3}{#4}}
-
-%D An automatic mechanism is provided too:
-%D
-%D \starttypen
-%D \thisisnextinternal{tag}
-%D \gotonextinternal {tag}{number}{pagenumber}{text}
-%D \stoptypen
-%D
-%D The first macro increments a counter. The value of this
-%D counter is available in the macro \type{\nextinternalreference}
-%D and should be saved somewhere (for instance in a file) for
-%D future reference. The second argument of
-%D \type {\gotonextinternal} takes such a saved number. One can
-%D turn on tracing these references, in which case the
-%D references are a bit more verbose.
-
-\newcount\locationcount
-
-\newif\iftraceinternalreferences
-
-\def\nextinternalreference%
- {\the\locationcount}
-
-\def\thisisnextinternal#1%
- {\global\advance\locationcount by 1
- \thisisdestination{\s!aut\iftraceinternalreferences:#1\fi:\nextinternalreference}}
-
-\def\gotonextinternal#1#2#3#4%
- {\gotodestination{}{}{\s!aut\iftraceinternalreferences:#1\fi:#2}{#3}{#4}}
-
-%D We already went through a lot of problems to sort out what
-%D kind of reference we're dealing with. Sorting out the user
-%D supplied cross references (show/goto this or that) as well
-%D as user supplied system references (invoke this or that) is
-%D already taken care of in the test routine, but we still have
-%D to direct the request to the right routine.
-
-\def\gotolocation#1#2%
- {\ifx\currentreferencespecial\empty
- \ifx\currentouterreference\empty
- \ifnum\currentreferencetype<2
- \gotoinnerlocation{#1}{#2}%
- \else
- \gotosystemlocation{#1}{#2}%
- \fi
- \else
- \gotoouterlocation{#1}{#2}%
- \fi
- \else
- \gotospeciallocation{#1}{#2}%
- \fi}
-
-%D An inner reference refers to some place in the document
-%D itself.
-
-\def\gotoinnerlocation#1#2%
- {\gotodestination
- {}{}
- {\referenceprefix#1}{\currentrealreference}
- {#2}}
-
-%D The outer location refers to another document, specified as
-%D file or \URL.
-
-\def\gotoouterlocation#1#2% % page checken!
- {\bgroup
- \let\referenceprefix=\empty
- \setouterlocation{\currentouterreference}%
- \ifx\currentinnerreference\empty
- \gotorealpage
- {\otherURL}{\otherfile}{1}
- {#2}%
- \else
- \gotodestination
- {\otherURL}{\otherfile}{\currentinnerreference}{\currentrealreference}
- {#2}%
- \fi
- \egroup}
-
-%D Special locations are those that are accessed by saying
-%D things like:
-%D
-%D \starttypen
-%D \goto{calculate total}[JS(summarize{10,23,56}]
-%D \stoptypen
-%D
-%D After several intermediate steps this finally arrives at
-%D the next macro and expands into (simplified):
-%D
-%D \starttypen
-%D \gotoJSlocation{total{summarize{10,23,56}}}{calculate total}
-%D \stoptypen
-%D
-%D The first argument is the full reference, the second one
-%D is the text, in some kind of manipulated form. In practice
-%D we split references, so we get:
-%D
-%D \starttypen
-%D \gotoJSlocation{summarize{10,23,56}}{calculate}
-%D \gotoJSlocation{summarize{10,23,56}}{total}
-%D \stoptypen
-%D
-%D where \type{calculate} and \type{total} are colored, boxed
-%D or whatever \type{\goto} is told to do.
-%D
-%D The macro \type{\gotoJSlocation} can use \type
-%D {\currentreferenceoperation} (in our example
-%D \type{summarize}) and \type{\currentreference} (here
-%D being \type {10,23,56}) to perform its task.
-
-\def\gotospeciallocation%
- {\executeifdefined
- {goto\currentreferencespecial location}\gobbleoneargument}
-
-%D Such special macros can be defined by:
-
-\def\definespeciallocation#1%
- {\setvalue{goto#1location}}
-
-%D The associated test is to be defined by:
-
-\def\definespecialtest#1%
- {\setvalue{\s!do\v!test#1}}
-
-%D This \type{\def} alike macro is to be used as:
-%D
-%D \starttypen
-%D \definespeciallocation{JS}#1#2{... #1 ... #2 ...}
-%D \stoptypen
-%D
-%D In module \type {core-jav} one can see that \type
-%D {\gotoJSlocation} looks much like the previous goto
-%D definitions.
-
-%D A system location is not always a location, but for the
-%D consistency we also consider actions as such.
-
-\def\gotosystemlocation%
- {\getvalue{\r!syst\the\currentreferencetype}}
-
-\def\definesystemreferencehandler#1#2%
- {\setgvalue{\r!syst\the#1}{#2}}
-
-%D In this module we define three system references: one for
-%D handling navigational, viewer specific, commands, another
-%D for jumping to special pages, like the first or last one,
-%D and a third reference for linking tree like lists, like
-%D tables of contents. The latter two adapt themselves to the
-%D current state.
-
-\definesystemreferencehandler \rt!exec \handleexecreference
-\definesystemreferencehandler \rt!page \handlepagereference
-\definesystemreferencehandler \rt!list \handlelistreference
-
-\def\handleexecreference#1%
- {\executecommand{\currentdatareference}}
-
-\def\handlepagereference#1%
- {\gotorealpage{}{}{\currentdatareference}}
-
-\def\handlelistreference#1%
- {\gotodestination{}{}{\currentdatareference}{\getvalue{\currentdatareference}}}
-
-%D (in dutch, egnlish, german of whateverinterface language)
-%D are translated into a bit shorter reference (\type{close})
-%D and passed to the special driver (using \type
-%D {\executecommand}).
-
-\setglobalsystemreference \rt!exec \v!CloseDocument {close}
-\setglobalsystemreference \rt!exec \v!ExitViewer {exit}
-\setglobalsystemreference \rt!exec \v!FirstPage {first}
-\setglobalsystemreference \rt!exec \v!LastPage {last}
-\setglobalsystemreference \rt!exec \v!NextJump {forward}
-\setglobalsystemreference \rt!exec \v!NextPage {next}
-\setglobalsystemreference \rt!exec \v!PauseMovie {pause}
-\setglobalsystemreference \rt!exec \v!PreviousJump {backward}
-\setglobalsystemreference \rt!exec \v!PreviousPage {previous}
-\setglobalsystemreference \rt!exec \v!PrintDocument {print}
-\setglobalsystemreference \rt!exec \v!ResetForm {reset}
-\setglobalsystemreference \rt!exec \v!ResumeMovie {resume}
-\setglobalsystemreference \rt!exec \v!SaveDocument {save}
-\setglobalsystemreference \rt!exec \v!SearchAgain {searchagain}
-\setglobalsystemreference \rt!exec \v!SearchDocument {search}
-\setglobalsystemreference \rt!exec \v!StartMovie {start}
-\setglobalsystemreference \rt!exec \v!StopMovie {stop}
-\setglobalsystemreference \rt!exec \v!SubmitForm {submit}
-\setglobalsystemreference \rt!exec \v!SwapViewer {swap}
-\setglobalsystemreference \rt!exec \v!ViewerHelp {help}
-
-%D Executing the command looks alike the previous goto macros.
-
-\def\executecommand#1#2%
- {\iflocation
- \dostartgoto
- \data
- {#2}%
- \start
- \dostartexecutecommand
- {\number\buttonwidth}{\number\buttonheight}
- {#1}{}%
- \stop
- \dostopexecutecommand
- \dostopgoto
- \else
- {#2}%
- \fi}
-
-%D We could have done without the short tags and thereby saving
-%D some tokens, but the current approach leaves room for future
-%D extensions.
-
-%D It is possible to disable the writing of references to the
-%D utility file by setting:
-
-\newif\ifreferencing \referencingtrue
-
-%D One can also activate an automatic prefix mechanism. By
-%D setting the \type{\prefix} variable to \type{+}, the prefix
-%D is incremented, when set to \type{-} or empty, the prefix is
-%D reset. Other values become the prefix.
-
-\newcount\prefixcounter
-
-%D These settings are accomplished by:
-%D
-%D \showsetup{\y!setupreferencing}
-%D
-%D In interactive documents verbose references don't always
-%D make sense (what is a page number in an unnumbered
-%D document). By setting the \type{interaction} variable, one
-%D can influences the way interactive references are set.
-
-\def\setupreferencing%
- {\dosingleargument\dosetupreferencing}
-
-\def\dosetupreferencing[#1]%
- {\getparameters
- [\??rf]
- [\c!prefix=\s!unknown,#1]%
- \processaction
- [\@@rfstatus]
- [ \v!stop=>\referencingfalse,
- \v!start=>\referencingtrue]%
- \processaction
- [\@@rfinteractie]
- [ \v!alles=>\let\dowantedreference=\docompletereference,
- \v!label=>\let\dowantedreference=\dolabelonlyreference,
- \v!tekst=>\let\dowantedreference=\dotextonlyreference,
- \v!symbool=>\let\dowantedreference=\dosymbolreference]%
- \ifx\@@rfprefix\s!unknown
- % retain the current value
- \else\ifx\@@rfprefix\empty
- \let\referenceprefix=\empty
- \else\ifx\@@rfprefix\incrementreferenceprefix
- \advance\prefixcounter by 1
- \edef\referenceprefix{\the\prefixcounter:}%
- \else\ifx\@@rfprefix\decrementreferenceprefix
- \let\referenceprefix=\empty
- \else
- \edef\referenceprefix{\@@rfprefix:}%
- \fi\fi\fi\fi}
-
-\def\incrementreferenceprefix{+}
-\def\decrementreferenceprefix{-}
-
-%D We can typeset a reference using \type{\in} and \type{\at}
-%D and goto specific locations using \type{\goto}. The last one
-%D does not make that much sense in a paper document. To
-%D complicate things, \PLAIN\ \TEX\ also implements an \type
-%D {\in} but fortunately that one only makes sense in math
-%D mode.
-
-%D --- VANAF HIER NOG VERENGELSEN ---
-
-\let\donormalin=\in
-
-\def\in%
- {\ifmmode
- \expandafter\donormalin
- \else
- \expandafter\doinatreference\expandafter\currenttextreference
- \fi}
-
-\def\op%
- {\doinatreference\currentpagereference}
-
-%D Typesetting the reference is a bit more complicated than one
-%D would at first sight expect. This is due to the fact that we
-%D distinguish three (five) alternative calls:
-%D
-%D \plaatsfiguur
-%D [hier][three calls]
-%D {Three alternatives reference calls.}
-%D \startcombinatie[1*3]
-%D {\framed{\type{ \in }}} {a}
-%D {\framed{\type{ \at }}} {b}
-%D {\framed{\type{\goto}}} {c}
-%D \stopcombinatie
-%D
-%D \startbuffer
-%D \in figure[fig:three calls]
-%D \in{figure}[fig:three calls]
-%D \in figure a[fig:three calls]
-%D \in{figure}{a}[fig:three calls]
-%D figure~\in[fig:three calls]
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This turns up as:
-%D
-%D \startregels
-%D \haalbuffer
-%D \stopregels
-%D
-%D The dual \type{{}} results in a split reference. In a
-%D document meant for paper, one is tempted to use the last
-%D (most straightforward) alternative. When a document is also
-%D meant voor electronic distribution, the former alternatives
-%D have preference, because everything between the \type{\in}
-%D and~\type{[} becomes active (and when asked for, typeset
-%D in a different color and typeface).
-
-\def\doinatreference#1%
- {\doifnextcharelse{[}
- {\dodoinatreference{#1}{}}
- {\dodoinatreference{#1}}}
-
-\def\dodoinatreference#1%
- {\def\dododoinatreference{\dodododoinatreference{#1}}%
- \futurelet\next\dododoinatreference}
-
-\def\dodododoinatreference#1#2#3[#4]%
- {\ifx\next\bgroup
- \dododododoinatreference{#1#3}{#2}[#4]%
- \else
- \dododododoinatreference{#1}{#2#3}[#4]%
- \fi}
-
-%D We arrived at the last step. Before we do the typesetting,
-%D we forget all previous (paragraph bound) settings and make
-%D sure that we remain in horizontal mode. Next we choose
-%D among the several representations.
-
-\def\dododododoinatreference#1#2[#3]%
- {\bgroup
- \forgetall
- \leaveoutervmode
- \doifreferencefoundelse{#3}
- {\doifelsenothing{#1}
- {\dosymbolreference{#1}{#2}[#3]}
- {\dowantedreference{#1}{#2}[#3]}}
- {\dounknownreference{#1}{#2}[#3]}%
- \referentieinfo{<}{#3}%
- \egroup}
-
-%D The previously discussed setup macro lets us specify the
-%D representation of references. A symbol reference does not
-%D show the specific data, like the number of a figure, but
-%D shows one of: \hbox {$^\goforwardcharacter$
-%D $^\gobackwardcharacter$ $^\gonowherecharacter$}, depending
-%D on the direction to go.
-
-\def\dosymbolreference#1#2[#3]%
- {\bgroup
- \ifhmode\unskip\fi
- \ifx\currentreferencespecial\empty
- \ifx\currentouterreference\empty
- \ifnum0\currentrealreference=0
- \ifhmode\strut$^\gonowherecharacter$\fi
- \else\ifnum0\currentrealreference>\realpageno
- \dodosymbolreference{#2}{$^\goforwardcharacter$}%
- \else\ifnum0\currentrealreference<\realpageno
- \dodosymbolreference{#2}{$^\gobackwardcharacter$}%
- \else
- \ifhmode\strut$^\gonowherecharacter$\fi
- \fi\fi\fi
- \else
- \gotoouterlocation{#3}{\showlocation{$^\gotosomewherecharacter$}}%
- \fi
- \else
- \gotospeciallocation{#3}{\showlocation{$^\gotosomewherecharacter$}}%
- \fi
- \egroup}
-
-\def\dodosymbolreference#1#2%
- {#1\hbox{\gotorealpage{}{}{\currentrealreference}
- {\dolocationattributes{\??ia}{#2}}}}
-
-%D The other alternatives just conform their names: only the
-%D label, only the text, or the label and the text.
-
-\def\dounknownreference#1#2[#3]%
- {\unknownreference{#3}\dotextprefix{#2}\dummyreference}%
-
-\def\docompletereference#1#2[#3]%
- {\doifsomespaceelse{#2}
- {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]}
- {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
-
-\def\dolabelonlyreference#1#2[#3]%
- {\doifsomespaceelse{#2}
- {\doifsomething{#2}{\donaarspace{#2}[#3]}}
- {\donaarfixed{\dotextprefix{#2}}[#3]}}
-
-\def\dotextonlyreference#1#2[#3]%
- {\dotextprefix{#2}\donaarfixed{#1}[#3]}
-
-\let\dowantedreference=\docompletereference
-
-%D --- OF MEER, OF ANDERS: ---
-
-\def\dotextprefix#1%
- {\ConvertToConstant\doifnot{#1}{}{#1~}}
-
-%D In interactive documents going to a specific location is not
-%D bound to cross references. The \type{\goto} commands can be
-%D used to let users access another part of the document. In
-%D this respect, interactive tables of contents and registers
-%D can be considered goto's. Because in fact a \type{\goto} is
-%D just a reference without reference specific data, the
-%D previous macros are implemented using the goto
-%D functionality.
-%D
-%D \showsetup{\y!naar}
-%D
-%D One important chaacteristic is that the first argument of
-%D \type{\goto} (and therefore \type{\at} and \type{\in} is
-%D split at spaces. This means that, although hyphenation is
-%D prevented, long references can cross line endings.
-
-\unexpanded\def\naar#1[#2]%
- {\leaveoutervmode
- \doifreferencefoundelse{#2}
- {\doifelsenothing{#1}
- {\dosymbolreference{}{}[#2]}
- {\donaarspace{#1}[#2]}}
- {\unknownreference{#2}#1}%
- \referentieinfo{<}{#2}}
-
-\def\donaarspace#1[#2]%
- {{\iflocation
- \def\processisolatedword##1%
- {\hbox{\gotolocation{#2}{##1\presetgoto}}}%
- \doattributes{\??ia}
- {\processisolatedwords{#1}\processisolatedword}%
- \else
- #1\relax % \relax prevents #1's next macros from gobbling \fi
- \fi}}
-
-\def\donaarfixed#1[#2]%
- {{\iflocation
- \hbox{\gotolocation{#2}{\doattributes{\??ia}{#1\presetgoto}}}%
- \else
- #1%
- \fi}}
-
-%D In case the auto split feature is not needed or even not
-%D even wanted, \type{\gotobox} can be used.
-
-%D --- NOG IN HANDLEIDING ---
-
-\unexpanded\def\naarbox#1[#2]%
- {\bgroup
- \locationstrutfalse
- \leaveoutervmode
- \doifreferencefoundelse{#2}
- {\donaarfixed{#1}[#2]}
- {\unknownreference{#2}#1}%
- \referentieinfo{<}{#2}%
- \egroup}
-
-%D An reference to another document can be specified as a file
-%D or as an \URL. Both are handled by the same mechanism and
-%D can be issued by saying something like:
-%D
-%D \starttypen
-%D \goto[dictionary::the letter a]
-%D \stoptypen
-%D
-%D The macros that are responsible for handling these
-%D references, use the next six variables:
-
-\let\otherlabel = \empty
-\let\fileprefix = \empty
-\def\otherfile {\jobname}
-\let\otherURL = \empty
-\let\otherprefix = \empty
-\let\dowithdocdes = \empty
-
-%D One can imagine that many references to such a dictionary
-%D are made, so in most cases such a document reference in an
-%D indirect one.
-%D
-%D \showsetup{\y!gebruikexterndocument}
-%D
-%D For example:
-%D
-%D \starttypen
-%D \useexternaldocument
-%D [dictionary][engldict]
-%D [The Famous English Dictionary]
-%D \stoptypen
-%D
-%D The next macro implements these relations, and also take
-%D care of loading the document specific references.
-
-\def\gebruikexterndocument%
- {\dotripleargument\dogebruikexterndocument}
-
-\def\dogebruikexterndocument[#1][#2][#3]%
- {\bgroup
- \doifelsenothing{#1}
- {\dogebruikexterndocument[#2][#2][#3]}
- {\doifelsenothing{#3}
- {\dogebruikexterndocument[#1][#2][#2]}
- {\doifsomething{#2}
- {\setgvalue{\v!file:::#1}{\doexternaldocument{}{#2}{#3}}%
- \doifparentfileelse{#2}
- {\showmessage{\m!references}{21}{#2}}
- {\bgroup % prevents wrong loading of \jobname
- \def\fileprefix{#1::}%
- \let\setglobalcrossreference=\setoutercrossreference
- \usereferences[#2]%
- \egroup % when called nested
- \showmessage{\m!references}{21}{#2}}}}}%
- \egroup}
-
-%D The \URL\ alternative takes four arguments:
-%D
-%D \showsetup{\y!gebruikURL}
-%D
-%D like:
-%D
-%D \starttypen
-%D \useURL
-%D [dictionary][http://www.publisher.com/public][engldict]
-%D [The Famous English Dictionary]
-%D \stoptypen
-%D
-%D This time we don't load the references when no file is
-%D specified. This is logical when one keeps in mind that a
-%D valid \URL\ can also be a mail address.
-
-\def\gebruikURL%
- {\doquadrupleargument\dogebruikURL}
-
-\def\dogebruikURL[#1][#2][#3][#4]%
- {\doifelsenothing{#4}
- {\dogebruikexterndocument[#1][#2][#3][#3]}
- {\doifsomething{#1}
- {\setgvalue{\v!file:::#1}{\doexternaldocument{#2}{#3}{#4}}}}}
-
-%D Many macro definitions ago we called for the auxiliary macro
-%D \type{\setouterlocation} and now is the time to define this
-%D one.
-
-\def\setouterlocation#1%
- {\doifdefinedelse{\v!file:::#1}
- {\def\doexternaldocument##1##2##3%
- {\edef\otherURL{##1}%
- \edef\otherfile{##2}}%
- \getvalue{\v!file:::#1}}
- {\let\otherURL=\empty
- \edef\otherfile{#1}}%
- \doifparentfileelse{\otherfile}
- {\let\otherURL=\empty
- \let\otherfile=\empty
- \global\let\otherlabel=\empty
- \let\otherprefix=\empty}
- {\xdef\otherlabel{#1}%
- \edef\otherprefix{#1::}}}
-
-%D When defining the external source of information, one can
-%D also specify a suitable name (the last argument). This name
-%D can be called upon with:
-%D
-%D \showsetup{\y!uit}
-%D
-%D As can be expected, this macro used \type{\goto} to
-%D perform its task.
-
-\definecomplexorsimple\uit
-
-\def\simpleuit%
- {\bgroup
- \doifdefinedelse{\v!file:::\otherlabel}
- {\def\doexternaldocument##1##2##3{##3}%
- \getvalue{\v!file:::\otherlabel}}
- {\tttf[\otherlabel]}%
- \egroup}
-
-\def\complexuit[#1]%
- {\doifinstringelse{::}{#1}
- {\docomplexuit[#1]}
- {\docomplexuit[#1::]}}
-
-\def\docomplexuit[#1::#2]%
- {\bgroup
- \doifdefinedelse{\v!file:::#1}
- {\def\doexternaldocument##1##2##3%
- {\naar{##3}[#1::#2]}%
- \getvalue{\v!file:::#1}}
- {\tttf[#1]}%
- \egroup}
-
-%D We also support:
-%D
-%D \starttypen
-%D \goto{some text}[file(identifier{location}]
-%D \stoptypen
-%D
-%D which is completely equivalent with
-%D
-%D \starttypen
-%D \goto{some text}[identifier::location]
-%D \stoptypen
-%D
-%D The fastest implementation would be:
-
-\definespecialtest\v!file {\handlespecialFILEandURL}
-\definespecialtest\v!URL {\handlespecialFILEandURL}
-
-\definespeciallocation\v!file {\handlespecialallocationFILEandURL}
-\definespeciallocation\v!URL {\handlespecialallocationFILEandURL}
-
-\def\handlespecialFILEandURL%
- {\doifreferencefoundelse
- {\currentreferenceoperation::\currentreferencearguments}}
-
-\def\handlespecialallocationFILEandURL%
- {\let\currentouterreference=\currentreferenceoperation
- \let\currentinnerreference=\currentreferencearguments
- \let\currentreferenceoperation=\empty
- \let\currentreferencearguments=\empty
- \gotoouterlocation}
-
-%D Now we have file references as special ones, it's rather
-%D logical to have the viewer specific ones available in a dual
-%D way too. At first glance we could do with:
-%D
-%D \starttypen
-%D \definespeciallocation\v!actie
-%D {\getreferenceelements\currentreferenceoperation
-%D \handleexecreference}
-%D \stoptypen
-%D
-%D An better alternative, slower but error aware, is
-
-\definespecialtest\v!actie%
- {\doifreferencefoundelse\currentreferenceoperation}
-
-\definespeciallocation\v!actie
- {\handleexecreference}
-
-%D So now we can say:
-%D
-%D \starttypen
-%D \goto{some action}[PreviousJump]
-%D \stoptypen
-%D
-%D as well as:
-%D
-%D \starttypen
-%D \goto{some text}[action(PreviousJump]
-%D \stoptypen
-
-%D A special case of references are those to programs. These,
-%D very system dependant references are implemented by abusing
-%D some of the previous macros.
-%D
-%D \showsetup{\y!stelprogrammasin}
-%D \showsetup{\y!definieerprogramma}
-%D \showsetup{\y!programma}
-%D
-%D The latter gives access to the description of the program,
-%D being the last argument to the definition command.
-
-\def\stelprogrammasin%
- {\dodoubleargument\getparameters[\??pr]}
-
-\def\dodefinieerprogramma[#1][#2][#3]%
- {\setgvalue{\v!programma:::#1}{\doprogramma{#2}{#3}}}
-
-\def\definieerprogramma%
- {\dotripleargument\dodefinieerprogramma}
-
-\def\programma#1[#2]%
- {\bgroup
- \doifdefinedelse{\v!programma:::#2}
- {\def\doprogramma##1##2%
- {\doifelsenothing{#1}
- {\naar{##2}[\v!programma(#2)]}
- {\naar{#1}[\v!programma(#2)]}}%
- \getvalue{\v!programma:::#2}}
- {\tttf[#2]}%
- \egroup}
-
-\definespeciallocation\v!programma#1#2%
- {\bgroup
- \iflocation
- \doifdefinedelse{\v!programma:::\currentreferenceoperation}
- {\def\doprogramma##1##2{\def\@@programfile{##1}}%
- \getvalue{\v!programma:::\currentreferenceoperation}}
- {\let\@@programfile=\currentreferenceoperation}%
- \convertcommand\@@programfile\to\ascii
- \dostartgoto
- \data
- {#2}%
- \start
- \dostartrunprogram
- {\number\buttonwidth}{\number\buttonheight}
- {\@@prgebied\ascii\space\currentreferencearguments}%
- \stop
- \dostoprunprogram
- \dostopgoto
- \else
- {#2}%
- \fi
- \egroup}
-
-%D As we can see, we directly use the special reference
-%D mechanism, which means that
-%D
-%D \starttypen
-%D \goto{some text}[program(name{args})]
-%D \stoptypen
-%D
-%D is valid.
-
-%D The next macro provides access to the actual pagenumbers.
-%D When documenting and sanitizing the original reference
-%D macros, I decided to keep the present meaning as well as to
-%D make this meaning available as a special reference method.
-%D So now one can use:
-%D
-%D \starttypen
-%D \gotopage{some text}[location]
-%D \gotopage{some text}[number]
-%D \gotopage{some text}[file::number]
-%D \stoptypen
-%D
-%D as well as:
-%D
-%D \starttypen
-%D \goto{some text}[page(location)]
-%D \goto{some text}[page(number)]
-%D \goto{some text}[file::page(number)]
-%D \stoptypen
-%D
-%D Here location is a keyword like \type{nextpage}.
-%D
-% \showsetup{\y!ganaarpagina}
-
-\def\dodefinieerpagina[#1][#2]%
- {\setvalue{\v!pagina:::#1}{#2}}
-
-\def\definieerpagina%
- {\dodoubleargument\dodefinieerpagina}
-
-\definieerpagina [\v!eerste\v!pagina] [\firstpage]
-\definieerpagina [\v!vorige\v!pagina] [\prevpage]
-\definieerpagina [\v!volgende\v!pagina] [\nextpage]
-\definieerpagina [\v!laatste\v!pagina] [\lastpage]
-\definieerpagina [\v!eerste\v!sub\v!pagina] [\firstsubpage]
-\definieerpagina [\v!vorige\v!sub\v!pagina] [\prevsubpage]
-\definieerpagina [\v!volgende\v!sub\v!pagina] [\nextsubpage]
-\definieerpagina [\v!laatste\v!sub\v!pagina] [\lastsubpage]
-\definieerpagina [\v!eerste] [\firstpage]
-\definieerpagina [\v!vorige] [\prevpage]
-\definieerpagina [\v!volgende] [\nextpage]
-\definieerpagina [\v!laatste] [\lastpage]
-\definieerpagina [\v!eerste\v!sub] [\firstsubpage]
-\definieerpagina [\v!vorige\v!sub] [\prevsubpage]
-\definieerpagina [\v!volgende\v!sub] [\nextsubpage]
-\definieerpagina [\v!laatste\v!sub] [\lastsubpage]
-
-%D Because we combine both methods, we have to take care of
-%D the \type{file::page(n)} as well as \type{page(file::n)}.
-
-\definespeciallocation\v!pagina#1#2%
- {\iflocation
- \ifx\currentouterreference\empty
- \splitoffreference\currentreferenceoperation
- \else
- \let\currentinnerreference=\currentreferenceoperation
- \fi
- \ifx\currentouterreference\empty
- \doifnonzeropositiveelse{\currentinnerreference}
- {}
- {\edef\currentinnerreference{1}}%
- \gotorealpage{}{}{\currentinnerreference}{#2}%
- \else
- \setouterlocation\currentouterreference
- \doifnonzeropositiveelse{\currentinnerreference}
- {}
- {\doifdefinedelse{\v!pagina:::\currentinnerreference}
- {\edef\currentinnerreference{\getvalue{\v!pagina:::\currentinnerreference}}}
- {\edef\currentinnerreference{1}}}%
- \gotorealpage{\otherURL}{\otherfile}{\currentinnerreference}{#2}%
- \fi
- \else
- {#2}%
- \fi}
-
-\def\naarpagina#1[#2]%
- {\naar{#1}[\v!pagina(#2)]}
-
-\let\ganaarpagina=\naarpagina
-
-%D A still very rudimentary|/|experimental forward|/|backward
-%D reference mechanism is provided by the macro \type{\atpage}:
-%D
-%D \starttypen
-%D ... \somewhere{backward text}{forward text}[someref] ...
-%D ... \oppagina[someref] ...
-%D \stoptypen
-%D
-%D In future versions there will be more sophisticated
-
-%D !!!!! \ergens documenteren in handleiding !!!!!
-
-%D support, also suitable for refreences to floating bodies.
-
-\unexpanded\def\ergens#1#2[#3]%
- {\leaveoutervmode
- \doifreferencefoundelse{#3}
- {\ifforwardreference
- \doifelsenothing{#1}
- {\dosymbolreference{}{}[#3]}
- {\donaarspace{#1}[#3]}%
- \else
- \doifelsenothing{#2}
- {\dosymbolreference{}{}[#3]}
- {\donaarspace{#2}[#3]}%
- \fi}
- {\unknownreference{#3}#1/#2}%
- \referentieinfo{<}{#3}}
-
-\unexpanded\def\oppagina[#1]%
- {\leaveoutervmode
- \doifreferencefoundelse{#1}
- {\doifelse{\realfolio}{\currentrealreference}
- {\ifforwardreference
- \donaarfixed{\labeltext{\v!hier\v!boven}}[#1]%
- \else
- \donaarfixed{\labeltext{\v!hier\v!onder}}[#1]%
- \fi}
- {\donaarfixed{\labeltext{\v!op\v!pagina}~\currentpagereference}[#1]}}
- {\unknownreference{#1}%
- \v!pagina~\dummyreference}%
- \referentieinfo{<}{#1}}
-
-%D --- STRANGE HERE, BETTER IN CORE-NAV ---
-
-\def\checkcontrastreference#1%
- {\ifnum\currentreferencetype=\rt!page\ifnum\currentdatareference=\realpageno
- \doifdefined{#1\c!contrastkleur}
- {\setevalue{#1\c!kleur}{\getvalue{#1\c!contrastkleur}}}%
- \fi\fi}
-
-%D Buttons are just what their names says: things that can be
-%D clicked (pushed) on. They are similar to \type{\goto},
-%D except that the text argument is not interpreted.
-%D Furthermore one can apply anything to them that can be done
-%D with \type{\framed}.
-%D
-%D \startbuffer
-%D \button[width=3cm,height=1.5cm]{Exit}[ExitViewer]
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D gives
-%D
-%D \haalbuffer
-%D
-%D This command is formally specified as:
-%D
-%D \showsetup{\y!button}
-%D
-%D The characteristics can be set with:
-%D
-%D \showsetup{\y!stelbuttonsin}
-
-\def\dostelbuttonsin[#1]%
- {\getparameters[\??bt][#1]%
- \dododostelinteractiemenuin{\??bt\c!onbekendeverwijzing}%
- \dododostelinteractiemenuin{\??bt\c!zelfdepagina}}
-
-\def\stelbuttonsin%
- {\dosingleargument\dostelbuttonsin}
-
-\definecomplexorsimpleempty\button
-
-\def\complexbutton%
- {\docomplexbutton\??bt}
-
-\presetlocalframed[\??bt]
-
-\def\docomplexbutton#1[#2]#3[#4]%
- {\bgroup
- \resetgoto
- \ConvertConstantAfter\doifelse{#3}{\v!geen}
- {\!!doneafalse}
- {\!!doneatrue}%
- \doifreferencefoundelse{#4}
- {\setbox0=\if!!donea\hbox\else\hphantom\fi
- {\localframed[#1][#2]
- {\checkcontrastreference{#1}%
- \dolocationattributes{#1}{\ignorespaces#3}}}%
- \startinteractie
- \hbox{\gotolocation{#4}{\copy0}}%
- \stopinteractie}
- {\unknownreference{#4}%
- \if!!donea\hbox\else\hphantom\fi
- {\localframed[#1][#2]
- {\ignorespaces#3}}}%
- \egroup}
-
-%D Interaction buttons, in fact a row of tiny buttons, are
-%D typically only used for navigational purposed. The next
-%D macro builds such a row based on a specification list.
-%D
-%D \startbuffer
-%D \interactiebuttons
-%D [breedte=\hsize][pagina,VorigeSprong,VerlaatViewer]
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D gives
-%D
-%D \haalbuffer
-%D
-%D Apart from individual entries, one can use \type{page} and
-%D \type {subpage} as shortcuts to their four associated buttons.
-%D The symbols are derived from the symbols linked to the
-%D entries.
-
-\def\interactiebuttons%
- {\dodoubleempty\dointeractiebuttons}
-
-\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
- \!!counta=1
- \processallactionsinset
- [#2]
- [ \v!pagina=>\advance\!!counta by 4,
- \v!sub\v!pagina=>\advance\!!counta by 4,
- \s!unknown=>\advance\!!counta by 1]%
- \divide\!!widtha by \!!counta
- \def\goto##1%
- {\setnostrut
- \edef\localreference{##1}%
- \docomplexbutton\??ib
- [\c!hoogte=\!!heighta,\c!breedte=\!!widtha]%
- {\dontleavehmode\symbol[\localreference]}%
- [\localreference]%
- \hss}%
- \hbox to \@@ibbreedte
- {\processallactionsinset
- [#2]
- [ \v!pagina=>\goto{\v!eerste\v!pagina}%
- \goto{\v!volgende\v!pagina}%
- \goto{\v!vorige\v!pagina}%
- \goto{\v!laatste\v!pagina},
- \v!sub\v!pagina=>\goto{\v!eerste\v!sub\v!pagina}%
- \goto{\v!volgende\v!sub\v!pagina}%
- \goto{\v!vorige\v!sub\v!pagina}%
- \goto{\v!laatste\v!sub\v!pagina},
- \s!unknown=>\goto\commalistelement]%
- \unskip}%
- \egroup
- \else
- \interactiebuttons[][#1]%
- \fi
- \fi}
-
-%D In the next settings we see some variables that were not
-%D used here and that concern the way the pagenumbers refered
-%D to are typeset.
-
-\setupreferencing
- [\c!status=\v!start,
- \v!deel\c!nummer=\v!ja,
- \v!hoofdstuk\c!nummer=\v!nee,
- \c!interactie=\v!alles,
- \c!prefix=]
-
-\protect
-
-\endinput
+% DUE TO NEW/FUTURE FEATURES THIS MODULE IS UNDER RECONSTRUCTION !
+%
+% uitprinten
+% engels maken
+% rommel voorlopig naar core-01d
+% programma, profiel etc als methode
+% \macro toevoegen
+
+% Makes more sense to build action data first, especially now
+% openaction etc are supported.
+%
+% \definespecial\doexecuteactionchain w h
+% \definespecial\dosetgotolocation
+% \definespecial\dosetexecuteJScode
+% ...
+%
+% complication: what when direct? Two calls!
+
+% I considered to change / simplify
+%
+% rt!page -> \definereference
+% rt!list -> \definereference
+% rt!exec -> \definereference
+%
+% not, because the current implementation permits to
+% determine the page state and is more efficient.
+
+%D \module
+%D [ file=core-ref,
+%D version=1998.01.15,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Cross Referencing,
+%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 / Cross Referencing}
+
+\unprotect
+
+\startmessages dutch library: references
+ title: verwijzingen
+ 1: onbekende verwijzing --
+ 2: dubbele verwijzing -- op pagina --
+ 3: type verwijzing -- onbekend
+ 4: verboden verwijzing --
+ 21: document -- geladen
+ 22: document -- is niet interactief
+ 23: onduidelijke verwijzing -- (prefix=--)
+\stopmessages
+
+\startmessages english library: references
+ title: references
+ 1: unknown reference --
+ 2: duplicate reference -- on page --
+ 3: unknown reference type --
+ 4: illegal reference --
+ 21: document -- loaded
+ 22: document -- is not interactive
+ 23: obscure reference -- (prefix=--)
+\stopmessages
+
+\startmessages german library: references
+ title: referenzen
+ 1: unbekannte Referenz --
+ 2: doppelte Referenz -- auf Seite --
+ 3: unbekannte Referenz Typ --
+ 4: illegale Referenz --
+ 21: Dokument -- geladen
+ 22: Dokument -- ist nicht aktiv
+ 23: Obskure Referenz -- (Prefix=--)
+\stopmessages
+
+%D This module deals with referencing. In \CONTEXT\ referencing
+%D is one of the core features, although at a first glance
+%D probably nobody will notice. This is good, because
+%D referencing should be as hidden as possible.
+%D
+%D In paper documents, referencing comes down to cross
+%D referencing, but in their interactive counterparts, is also
+%D involves navigation. Many features implemented here are
+%D therefore closely related to navigation.
+%D
+%D Many \CONTEXT\ commands can optionally be fed with a
+%D reference. Such a reference, when called upon, returns the
+%D number of a figure, table, chapter etc, a piece of text, or
+%D a pagenumber.
+%D
+%D There are three ways of defining a reference:
+%D
+%D \starttypen
+%D \pagereference[here]
+%D \textreference[here]{some text}
+%D \stoptypen
+%D
+%D the third alternative combines them in:
+%D
+%D \starttypen
+%D \reference[here]{some text}
+%D \stoptypen
+
+\def\textreference {\dosingleargument\dotextreference}
+\def\pagereference {\dosingleargument\dopagereference}
+\def\reference {\dosingleargument\doreference}
+
+%D These are implemented in a low level form as:
+
+\def\dotextreference[#1]#2{\rawtextreference{\s!txt}{#1}{#2}}
+\def\dopagereference [#1]{\rawpagereference{\s!pag}{#1}}
+\def\doreference [#1]#2{\rawreference {\s!ref}{#1}{#2}}
+
+%D Actually there is not much difference between a text and a
+%D full reference, but it's the concept that counts. The low
+%D level implementation is:
+
+\def\rawpagereference#1#2%
+ {\bgroup
+ \the\everyreference
+ \makesectionformat
+ \writereference{#2}
+ {\sectionformat::\noexpand\pagenumber}
+ {\noexpand\realfolio}
+ {}%
+ \egroup}
+
+\def\rawtextreference#1#2#3%
+ {\bgroup
+ \the\everyreference
+ \writereference{#2}
+ {}
+ {\noexpand\realfolio}
+ {#3}%
+ \egroup}
+
+\def\rawreference#1#2#3%
+ {\bgroup
+ \the\everyreference
+ \makesectionformat
+ \writereference{#2}
+ {\sectionformat::\noexpand\pagenumber}
+ {\noexpand\realfolio}
+ {#3}%
+ \egroup}
+
+%D As we can see, these macros depend on three other ones,
+%D \type {\makesectionformat}, that generated \type
+%D {\sectionformat}, \type {\pagenumber}. The not yet used
+%D argument \type{#1} is a tag that specifies the type of
+%D reference.
+
+%D \macros
+%D {everyreference}
+%D
+%D For rather tricky purposes, one can assign sanitizing
+%D macros to \type{\everyreference}.
+
+\newevery \everyreference \relax
+
+%D Why do we have to write down references? \TEX, and therefore
+%D \CONTEXT\ is a batch processing system. During the
+%D typesetting process, pages are shipped out, which means that
+%D especially forward references are not yet known when the
+%D page is typeset. That's why we always need a second (and
+%D sometimes even a third) pass to get the cross references
+%D right. The same goes for lists and other pagenumber
+%D dependant data.
+%D
+%D Therefore, during a pass, \CONTEXT\ writes the references to
+%D a the utility file. The next macro does the job and
+%D generates entries like:
+%D
+%D \starttypen
+%D \mainreference{prefix}{reference}{page}{realpage}{text}
+%D \stoptypen
+%D
+%D We did not yet discuss prefixing. Especially in interactive
+%D documents, it's not always easy to keep track of duplicate
+%D references. The prefix mechanism, which we will describe
+%D later on, solves this problem. By (automatically) adding a
+%D prefix one keeps references local, but the global ones in
+%D view. To enable this feature, we explictly split the prefix
+%D from the reference.
+%D
+%D A former implementation used \type{\removesubstring} to get
+%D rid of the don't||use||a||prefix signal (\type{-:}), but the
+%D next one proved to be more than twice as fast.
+
+\let\referenceprefix=\empty
+\let\lastreference =\empty
+
+%D The last reference is saved in a macro named \type
+%D {\lastreference} (indeed). To keep track of the order of
+%D references, later we will see for what purpose, we maintain
+%D a counter.
+
+\newcount\crossreferencenumber \crossreferencenumber=1
+
+\def\writereference#1#2#3#4%
+ {\ifreferencing
+ \doifsomething{#1}
+ {\def\dowritereference##1%
+ {\xdef\lastreference{##1}%
+ \@EA\dodowritereference\lastreference\empty\empty\end
+ {#2}{#3}{#4}}%
+ \processcommalist[#1]\dowritereference}%
+ \fi}
+
+\def\dodowritereference#1#2#3\end#4#5#6%
+ {\bgroup
+ \global\advance\crossreferencenumber by 1
+ \if#1-\if#2:%
+ \let\referenceprefix=\empty
+ \xdef\lastreference{#3}%
+ \else
+ \xdef\lastreference{#1#2#3}%
+ \fi\else
+ \xdef\lastreference{#1#2#3}%
+ \fi
+ \ifx\lastreference\empty \else
+ \doiffirstreferenceoccurance{\lastreference}
+ {\thisisdestination{\referenceprefix\lastreference}}%
+ \@EA\referentieinfo\@EA>\@EA{\lastreference}%
+ \edef\dododowritereference%
+ {\writeutilitycommand
+ {\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
+ \dododowritereference
+ \fi
+ \egroup}
+
+%D We will implement \type {\doiffirstreferenceoccurance}
+%D later on.
+
+%D When (during a second pass over the document) references are
+%D loaded, they are saved in a macro, one for each reference.
+%D In practice this comes to giving \type {\mainreference} a
+%D appropriate meaning and loading the utility file.
+
+%\def\setreferences%
+% {\def\mainreference##1##2##3##4##5%
+% {\doifundefinedelse{\r!cross\fileprefix##1##2}
+% {\setglobalcrossreference{##1##2}{##3}{##4}{##5}}
+% {\showmessage{\m!references}{2}{[##1][##2],##4}}}}
+
+\def\setreferences%
+ {\the\everyreference % we're grouped anyway
+ \def\mainreference##1##2##3##4##5%
+ {\doifundefinedelse{\r!cross\fileprefix##1##2}
+ {\setglobalcrossreference{##1##2}{##3}{##4}{##5}}
+ {\ifcase0##4\else\showmessage{\m!references}{2}{[##1][##2],##4}\fi}}}
+
+\def\resetreferences%
+ {\let\mainreference=\gobblefivearguments}
+
+\resetreferences
+
+%D Here we see another kind of prefix surface: \type
+%D {\fileprefix}. This prefix enables us to use references from
+%D different files in one document. This is no really useful in
+%D paper documents, but many interactive ones cannot do
+%D without.
+
+\let\fileprefix=\empty
+
+%D Loading references is done using the normal utility file
+%D handling macros. The \type{\hbox} trick prevents spaces
+%D creeping in (references are set globally anyway).
+
+\newtoks\everycheckreferences
+
+%D This token list is expanded after the references are loaded.
+%D This hook can be used to initialize mechanisms that depend
+%D on the reference mechsnism. An example can be found in the
+%D field module.
+
+\def\checkreferences%
+ {\bgroup
+ \let\fileprefix\empty
+ \global\let\checkreferences\relax
+ \usereferences[\jobname]%
+ \checkrealpage
+ \egroup
+ \the\everycheckreferences}
+
+\def\usereferences[#1]%
+ {\bgroup
+ \checkreferences
+ \setbox0=\hbox
+ {\doonlyonce{references:#1}{\doutilities{references}{#1}{}{}{}}}%
+ \egroup}
+
+%D As mentioned we will also use the cross reference mechanism
+%D for navigational purposes. The main reason for this is that
+%D we want to treat both categories alike:
+%D
+%D \starttypen
+%D \goto{go back}[PreviousJump]
+%D \goto{colofon}[colofon page]
+%D \stoptypen
+%D
+%D Here \type{PreviousJump} is handled by the viewer, while the
+%D \type{colofon page} reference is, apart from hyperlinking, a
+%D rather normal reference.
+%D
+%D We already saw that cross refences are written to and read
+%D from a file. The pure navigational ones don't need to be
+%D written to file, but both for fast processing and
+%D transparant integration, they are saved internally as a sort
+%D of reference. We can easily distinguish such system
+%D references from real cross reference ones by their tag:
+
+\chardef\rt!cross=0 % even means possible page reference
+\chardef\rt!done =1
+\chardef\rt!page =2 % and is used in \checkrealreferencepage
+\chardef\rt!exec =3
+\chardef\rt!list =4 % to determine the page state
+
+%D We also use the odd/even characteristic to determine the
+%D page state.
+
+%D Here the \type{\rt!exec} tags a viewer specific navigational
+%D reference, while for instance \type{\rt!page} gives fast
+%D access to for instance the previous or next page. The
+%D counter serves a purpose to be explained later. We use a
+%D token register to prevent expansion of the text component,
+%D which can contain all kind of \TEX\ commands.
+
+\newcount\crossreferenceorder
+
+\def\setlocalcrossreference#1#2#3#4%
+ {\toks0={#4}%
+ \setevalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{\the\toks0}{0}}}
+
+\def\setglobalcrossreference#1#2#3#4%
+ {\toks0={#4}%
+ \global\advance\crossreferenceorder by 1
+ \setxvalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{\the\toks0}{\the\crossreferenceorder}}}
+
+\def\setlocalsystemreference#1#2#3%
+ {\setevalue{\r!cross\fileprefix#2}{#1{#3}}}
+
+\def\setglobalsystemreference#1#2#3%
+ {\setxvalue{\r!cross\fileprefix#2}{#1{#3}}}
+
+% Maybe I need this some day.
+
+% \def\copycrossreference#1#2#3% file from to
+% {\bgroup
+% \def\fileprefix{#1::}%
+% \def\rt!cross##1##2##3##4%
+% {\setxvalue{\r!cross\fileprefix#3}%
+% {\noexpand\rt!cross{##1}{##2}{##3}{##4}}}%
+% \getvalue{\r!cross\fileprefix#2}%
+% \egroup}
+
+\def\copycrossreference#1#2#3% file from to
+ {\bgroup
+ \doifelse{#1}{}
+ {\let\fileprefix\empty}
+ {\def\fileprefix{#1::}}%
+ \def\rt!cross##1##2##3##4%
+ {\setxvalue{\r!cross\fileprefix#3}%
+ {\noexpand\rt!cross{##1}{##2}{##3}{##4}}}%
+ \getvalue{\r!cross\fileprefix#2}%
+ \egroup}
+
+%D References from other files are defined globally without
+%D ordering data. The first definition, the one without
+%D \type{#1}, is used as a signal that references are defined.
+
+\def\setoutercrossreference#1#2#3#4%
+ {\toks0={#4}%
+ \setxvalue{\r!cross\fileprefix}{\rt!cross{}{}{1}{0}}%
+ \setxvalue{\r!cross\fileprefix#1}{\rt!cross{#2}{#3}{\the\toks0}{0}}}
+
+%D In practice accessing a reference comes down to:
+%D
+%D \startopsomming[opelkaar]
+%D \som checking the validity
+%D \som determining the type
+%D \som filtering the content
+%D \stopopsomming
+%D
+%D We'll deal with the last two steps first. References are
+%D saved in the general format:
+%D
+%D \starttypen
+%D {\referenceclass{realpage}{page}{text}}
+%D {\referenceclass{type}{data}}
+%D \stoptypen
+%D
+%D When we filter the content, next macros are set when we
+%D meet a normal cross reference:
+
+\let\currentrealreference=\empty
+\let\currentpagereference=\empty
+\let\currenttextreference=\empty
+\let\currentsubtextreference=\empty
+\let\currentsubsubtextreference=\empty
+
+%D System references only have one component:
+
+\let\currentdatareference=\empty
+
+%D Because internally a reference comes in two disguises, one
+%D with four arguments and one with only two, we need a two
+%D step filter.
+
+%\def\getreferenceelements#1%
+% {\edef\referenceelements{\getvalue{\r!cross\referenceprefix#1}}%
+% \expandafter\dogetreferenceelements\referenceelements{}{}{}{}}
+
+\def\getreferenceelements#1% only one level expansion permitted!
+ {\@EA\@EA\@EA\dogetreferenceelements\csname\r!cross\referenceprefix#1\endcsname{}{}{}{}}
+
+%D In the following step, the \type{\ifx#1} test is needed
+%D because we can access this macro directly, and therefore
+%D \type{#1} can be an undefined reference (in fact, this hack
+%D was needed for the line numbering mechanism).
+%D
+%D We already introduced a few counters. Here we see why we
+%D need those. The discrepancy between the cross reference
+%D definition order (determined by the utility file) and the
+%D moment the reference is defined in the text, is a measure
+%D for it's forward character. This enables references like
+%D {\em as we will see later on}.
+
+\chardef\currentreferencetype=0
+
+\newif\ifforwardreference
+
+%\def\dogetreferenceelements#1#2#3#4#5%
+% {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
+% \ifnum\currentreferencetype<2
+% \def\currentpagereference{\referencepagenumber[#2]}%
+% \edef\currentrealreference{#3}%
+% \def\currenttextreference{#4}%
+% \ifnum0#5>\crossreferencenumber
+% \forwardreferencetrue
+% \else
+% \forwardreferencefalse
+% \fi
+% \else
+% \def\currentdatareference{#2}%
+% \edef\currentrealreference{#3}%
+% \def\currenttextreference{#4}%
+% \forwardreferencefalse
+% \fi}
+
+\newif\ifrealreferencepage
+
+\def\docheckrealreferencepage#1%
+ {\doifnumberelse{#1}
+ {\ifnum#1=\realpageno
+ \realreferencepagetrue
+ \else
+ \realreferencepagefalse
+ \fi}
+ {\realreferencepagefalse}}
+
+\def\dogetreferenceelements#1#2#3#4#5%
+ {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
+ \ifnum\currentreferencetype<2
+ \def\currentpagereference{\referencepagenumber[#2]}%
+ \edef\currentrealreference{#3}%
+ \settextreferences#4\end
+ \ifnum0#5>\crossreferencenumber
+ \forwardreferencetrue
+ \else
+ \forwardreferencefalse
+ \fi
+ \else
+ \edef\currentrealreference{#3}%
+ \def\currentdatareference{#2}%
+ \settextreferences#4\end
+ \forwardreferencefalse
+ \fi
+ \ifodd\currentreferencetype
+ \realreferencepagefalse
+ \else
+ \docheckrealreferencepage\currentrealreference
+ \ifrealreferencepage \else
+ \docheckrealreferencepage\currentdatareference
+ \fi
+ \fi}
+
+%D Text references can contain more than one entry and
+%D therefore we check for
+%D
+%D \starttypen
+%D {entry}
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D {{entry}{entry}{entry}}
+%D \stoptypen
+%D
+%D and split accordingly.
+
+\def\settextreferences%
+ {\futurelet\next\dosettextreferences}
+
+\def\dosettextreferences%
+ {\ifx\next\bgroup
+ \expandafter\dotriplegroupempty\expandafter\dodosettextreferences
+ \else
+ \expandafter\donosettextreferences
+ \fi}
+
+\def\donosettextreferences#1\end
+ {\def\currenttextreference{#1}%
+ \let\currentsubtextreference\empty
+ \let\currentsubsubtextreference\empty}
+
+\def\dodosettextreferences#1#2#3#4\end%
+ {\def\currenttextreference{#1}%
+ \def\currentsubtextreference{#2}%
+ \def\currentsubsubtextreference{#3}}
+
+%D When inside this testing macro we can savely use:
+
+\def\doifforwardreferenceelse#1#2%
+ {\ifforwardreference#1\else#2\fi}
+
+%D Duplicate references are reported while loading the utility
+%D file. To prevent problems with document viewers cq.
+%D preprocessors, one can enable a (bit time consuming) check.
+
+\newif\ifcheckduplicatereferences
+
+%D The next rather dirty trick is needed to preserve the
+%D meaning of the original cross reference. In fact,
+%D \type{\rt!cross} is toggled to \type{\rt!done}.
+
+\def\doiffirstreferenceoccurance#1#2%
+ {\ifcheckduplicatereferences
+ \doifundefinedelse{\r!cross\referenceprefix#1}
+ {#2}
+ {\getreferenceelements{#1}%
+ \ifnum\currentreferencetype=\rt!cross
+ #2%
+ \bgroup
+ \def\rt!cross##1##2##3##4%
+ {\setgvalue{\r!cross\referenceprefix#1}%
+ {\rt!done{##1}{##2}{##3}{##4}}}%
+ \getvalue{\r!cross\referenceprefix#1}%
+ \egroup
+ \fi}%
+ \else
+ #2%
+ \fi}
+
+%D We still have to test for the existence of a reference, but
+%D before we come to that, we first look into the way a
+%D reference can be accessed. It will be no surprise that
+%D references can come in several forms.
+%D
+%D Cross references appear as numbers (figure~1.1, chapter~2)
+%D or pagenumbers (page~2, page 3--2), and are called with
+%D \type{\in} and \type{\at}. In interactive documents we also
+%D have \type{\goto}, \type{\button} and alike. These are more
+%D versatile and look like:
+%D
+%D \starttypen
+%D \goto[reference]
+%D \goto[outer reference::]
+%D \goto[outer reference::inner reference]
+%D \goto[operation(argument)]
+%D \goto[operation(action{argument,argument})]
+%D \goto[action]
+%D \goto[action{argument}]
+%D \stoptypen
+%D
+%D The first one is a normal reference, the second and third
+%D are references to a file or \URL. The brace delimited
+%D references for instance refer to a \JAVASCRIPT. The last
+%D example shows that we can pass arguments to the actions.
+%D
+%D When we split off the components of such a reference, the
+%D results are available in:
+%D
+%D \starttypen
+%D \currentreferencespecial
+%D \currentreferenceoperation
+%D \currentreferencearguments
+%D \currentinnerreference
+%D \currentouterreference
+%D \currentfullreference
+%D \stoptypen
+%D
+%D Splitting a reference is done by:
+%D
+%D \starttypen
+%D \splitofffullreference {reference}
+%D \splitoffreference {reference}
+%D \stoptypen
+%D
+%D The second alternative can be used in a second stage
+%D splitoff and only handles \type{::}.
+
+\newif\ifreferencefound
+
+\let\currentfullreference =\empty
+\let\currentreferencespecial =\empty
+\let\currentreferenceoperation=\empty
+\let\currentreferencearguments=\empty
+\let\currentouterreference =\empty
+\let\currentinnerreference =\empty
+
+\def\splitofffullreference#1%
+ {\edef\currentfullreference{#1}%
+ \@EA\dosplitofffullreference\currentfullreference\empty(\relax)\empty\end}
+
+\def\dosplitofffullreference#1(#2#3)#4#5\end
+ {\ifx#2)%
+ \let\currentreferenceoperation=\empty
+ \let\currentreferencearguments=\empty
+ \let\currentinnerreference=\empty
+ \dodosplitofffullreferenceA#1::::\empty\end
+ \currentouterreference\currentreferencespecial
+ \else\ifx#2\relax
+ \let\currentreferencespecial=\empty
+ \let\currentreferenceoperation=\empty
+ \let\currentreferencearguments=\empty
+ \dodosplitofffullreferenceA#1::::\empty\end
+ \currentouterreference\currentinnerreference
+ \else
+ \dosplitoffreferenceoperation#2#3{}\end
+ \let\currentinnerreference=\empty
+ \dodosplitofffullreferenceB#1::::\empty\end
+ \currentouterreference\currentreferencespecial
+ \fi\fi}
+
+\def\dosplitoffreferenceoperation#1#%
+ {\def\currentreferenceoperation{#1}%
+ \dodosplitoffreferenceoperation}
+
+\def\dodosplitoffreferenceoperation#1#2\end
+ {\def\currentreferencearguments{#1}}
+
+\def\dodosplitofffullreferenceA#1::#2::#3#4\end#5#6%
+ {\if#3:%
+ \dosetfullreferenceA#5#1{}\edef#6{#2}%
+ \else
+ \dosetfullreferenceA#6#1{}\let#5\empty
+ \fi}
+
+\def\dosetfullreferenceA#1#2#%
+ {\edef#1{#2}%
+ \def\currentreferencearguments}
+
+\def\dodosplitofffullreferenceB#1::#2::#3#4\end#5#6%
+ {\if#3:%
+ \edef#5{#1}\edef#6{#2}%
+ \else
+ \let#5\empty\edef#6{#1}%
+ \fi}
+
+\def\splitoffreference#1%
+ {\expandafter\dodosplitofffullreferenceB#1::::\empty\end
+ \currentouterreference\currentinnerreference}
+
+%D Although the previous split macros have a multistep
+%D character, there performance is quite reasonable.
+%D
+%D For debugging purposes we provide a showcase macro:
+
+\long\def\dodoshowcurrentreference#1\from#2\with#3%
+ {\convertcommand#2\to\ascii
+ \edef\currentreferenceshow{\currentreferenceshow/#1/\ascii/#3/}}
+
+\long\def\doshowcurrentreference#1%
+ {\edef\currentreferenceshow{/\ifreferencefound+\else-\fi/#1}%
+ \dodoshowcurrentreference ful\from\currentfullreference \with#1%
+ \dodoshowcurrentreference spe\from\currentreferencespecial \with#1%
+ \dodoshowcurrentreference ope\from\currentreferenceoperation\with#1%
+ \dodoshowcurrentreference arg\from\currentreferencearguments\with#1%
+ \dodoshowcurrentreference out\from\currentouterreference \with#1%
+ \dodoshowcurrentreference inn\from\currentinnerreference \with#1}
+
+\def\showcurrentreference%
+ {\bgroup\tttf\doshowcurrentreference\par\currentreferenceshow\egroup}
+
+%D We use this visualizer to demonstrate the way references are
+%D split.
+%D
+%D \hbox{\splitofffullreference{rr}\showcurrentreference}
+%D \hbox{\splitofffullreference{pp{rr}}\showcurrentreference}
+%D \hbox{\splitofffullreference{pp(qq)}\showcurrentreference}
+%D \hbox{\splitofffullreference{pp(qq{aa,bb})}\showcurrentreference}
+%D \hbox{\splitofffullreference{ff::}\showcurrentreference}
+%D \hbox{\splitofffullreference{ff::rr}\showcurrentreference}
+%D \hbox{\splitofffullreference{ff::pp()}\showcurrentreference}
+%D \hbox{\splitofffullreference{ff::pp(qq)}\showcurrentreference}
+%D \hbox{\splitofffullreference{ff::pp(qq{aa})}\showcurrentreference}
+
+%D Now we've come to the promissed testing step. As we can
+%D see, this macro does bit more than testing: it also resolves
+%D the reference. This means that whenever we test for the
+%D existance of a reference at an outer level, we have all the
+%D relevant properties of that reference avaliable inside the
+%D true branche~(\type{#2}).
+%D
+%D The prefix has to do with localizing references. When a
+%D prefix is set, looking for a reference comes to looking for
+%D the prefixed one, and when not found, looking for the non
+%D prefixed one. Consider for instance the prefix set to
+%D \type{sidetrack}.
+%D
+%D \starttypen
+%D \pagereference[important]
+%D \pagereference[unimportant]
+%D \setupreferencing[prefix=sidetrack]
+%D \pagereference[important]
+%D \stoptypen
+%D
+%D results in saving (writing) the references
+%D
+%D \starttypen
+%D ...{}{important}
+%D ...{}{unimportant}
+%D ...{sidetrack}{important}...
+%D \stoptypen
+%D
+%D Now when we call for \type{unimportant}, we will indeed get
+%D the pagenumber associated to this reference. But when we
+%D call for \type{important}, while the prefix is still set, we
+%D will get the pagenumber bound to the prefixed one.
+%D
+%D {\em Some day, when processing time and memory are no longer
+%D performance factors, we will introduce multi||level
+%D prefixes.}
+%D
+%D Before we start analyzing, I introduce a general
+%D definition macro. Consider:
+%D
+%D \starttypen
+%D \goto{do}[JS(My_Script{"test",123}),titlepage]
+%D \stoptypen
+%D
+%D This can also be achieved by:
+%D
+%D \starttypen
+%D \definereference[startup][JS(My_Script{"test",123}),titlepage]
+%D \goto{do}[REF(startup)]
+%D \stoptypen
+%D
+%D Now is this is a handy feature or not?
+%D
+%D \showsetup{\y!definereference}
+%D
+%D We can trace references by setting the next switch to
+%D true.
+
+\newif\iftracereferences
+
+\let\tracereferences\tracereferencestrue
+
+\def\specialREFidentifier{REF}
+
+\def\dodefinereference[#1][#2]%
+ {\ifsecondargument
+ \doifelsenothing{#2}
+ {\global\letbeundefined{\specialREFidentifier#1}}
+ {\setgvalue{\specialREFidentifier#1}{#2}}%
+ \else\iffirstargument
+ \global\letbeundefined{\specialREFidentifier#1}%
+ \fi\fi}
+
+\def\definereference%
+ {\dodoubleempty\dodefinereference}
+
+\beginTEX
+
+\def\dodoifreferencefoundelse#1#2#3%
+ {\checkreferences
+ \bgroup
+ \the\everyreference
+ \let\unharmedreferenceprefix=\referenceprefix
+ \bgroup
+ \splitofffullreference{#1}%
+ \ifx\currentreferencespecial\specialREFidentifier
+ \@EA\ifx\csname\specialREFidentifier\currentreferenceoperation\endcsname\relax
+ \global\referencefoundfalse
+ \else
+ \global\referencefoundtrue
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier\currentreferenceoperation\endcsname}%
+ \fi
+ \else
+ \global\referencefoundtrue
+ \fi
+ \ifreferencefound
+ \ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \docheckinnerreference
+ \else
+ \docheckouterreference
+ \fi
+ \ifreferencefound
+ \ifx\currentreferencearguments\empty
+ \getreferenceelements\currentfullreference
+ \else
+ \getreferenceelements\currentinnerreference
+ \fi
+ \fi
+ \else
+ \docheckspecialreference
+ \fi
+ \fi
+ \ifreferencefound \else
+ \let\referenceprefix=\empty
+ \@EA\ifx\csname\specialREFidentifier#1\endcsname\relax\else
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier#1\endcsname}%
+ \ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \docheckinnerreference
+ \else
+ \docheckouterreference
+ \fi
+ \ifreferencefound
+ \getreferenceelements\currentfullreference
+ \fi
+ \else
+ \docheckspecialreference
+ \fi
+ \fi
+ \fi
+% \ifx\currentfullreference\v!geen % DOCUMENT THIS ONE!
+% \global\referencefoundfalse
+% \fi
+ \iftracereferences
+ \doshowcurrentreference\space
+ \writestatus{\m!references}{\currentreferenceshow}%
+ \fi
+ \ifreferencefound#2\else#3\fi
+ \egroup
+ \egroup}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dodoifreferencefoundelse#1#2#3%
+ {\checkreferences
+ \bgroup
+ \the\everyreference
+ \let\unharmedreferenceprefix=\referenceprefix
+ \bgroup
+ \splitofffullreference{#1}%
+ \ifx\currentreferencespecial\specialREFidentifier
+ \ifcsname\specialREFidentifier\currentreferenceoperation\endcsname
+ \global\referencefoundtrue
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier\currentreferenceoperation\endcsname}%
+ \else
+ \global\referencefoundfalse
+ \fi
+ \else
+ \global\referencefoundtrue
+ \fi
+ \ifreferencefound
+ \ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \docheckinnerreference
+ \else
+ \docheckouterreference
+ \fi
+ \ifreferencefound
+ \ifx\currentreferencearguments\empty
+ \getreferenceelements\currentfullreference
+ \else
+ \getreferenceelements\currentinnerreference
+ \fi
+ \fi
+ \else
+ \docheckspecialreference
+ \fi
+ \fi
+ \ifreferencefound \else
+ \let\referenceprefix=\empty
+ \ifcsname\specialREFidentifier#1\endcsname
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier#1\endcsname}%
+ \ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \docheckinnerreference
+ \else
+ \docheckouterreference
+ \fi
+ \ifreferencefound
+ \getreferenceelements\currentfullreference
+ \fi
+ \else
+ \docheckspecialreference
+ \fi
+ \fi
+ \fi
+% \ifx\currentfullreference\v!geen % DOCUMENT THIS ONE!
+% \global\referencefoundfalse
+% \fi
+ \iftracereferences
+ \doshowcurrentreference\space
+ \writestatus{\m!references}{\currentreferenceshow}%
+ \fi
+ \ifreferencefound#2\else#3\fi
+ \egroup
+ \egroup}
+
+\endETEX
+
+%D For most situations, we could use:
+%D
+%D \starttypen
+%D \let\doifreferencefoundelse=\dodoifreferencefoundelse
+%D \stoptypen
+%D
+%D But when we also want to support chained references, we need
+%D some more. Such a chained reference is defined as:
+%D
+%D \starttypen
+%D \goto{somewhere}[JS(somescript),nextpage,JS(anotherscript)]
+%D \stoptypen
+%D
+%D Actually supporting chains is up to the special driver. Here
+%D we only provide the hooks.
+
+%D \macros
+%D {ifenablereferencechains}
+%D
+%D First we provide a switch to turn this mechanism off:
+
+\newif\ifenablereferencechains \enablereferencechainstrue
+
+%D We don't use the general commalist processing macros,
+%D because we don't want to pay a speed penalty.
+
+\newif\ifsecondaryreference
+\newcount\nofsecondaryreferences
+
+% Aanpassen: eerst alle refs scannen en componenten opslaan in
+% lijst, dan de chain doorlopen. Momenteel mag alleen laatste
+% laatste undefined zijn, eigenlijk moet dat overal kunnen met
+% 'geen' zonder melding. Is wel trager.
+
+\def\doifreferencefoundelse#1#2#3%
+ {\doresetgotowhereever
+ \global\secondaryreferencefalse
+ \xdef\primaryreference{#1}%
+ \global\nofsecondaryreferences=0
+ \def\dopreprocessreference##1,%
+ {\if]##1\else
+ \ifsecondaryreference
+ \ifenablereferencechains \iflocation
+ %\global\advance\nofsecondaryreferences by 1
+ \dodoifreferencefoundelse{##1}
+ {\global\advance\nofsecondaryreferences by 1
+ #2}
+ {%\global\advance\nofsecondaryreferences by -1
+ \dostartnoto#3\dostopnoto}% #3}%
+ \fi \fi
+ \else
+ \xdef\primaryreference{##1}%
+ \global\secondaryreferencetrue
+ \fi
+ \expandafter\dopreprocessreference
+ \fi}%
+ \dopreprocessreference#1,],%
+ \global\secondaryreferencefalse
+ \@EA\dodoifreferencefoundelse\@EA{\primaryreference}{#2}{#3}%
+ \doresetgotowhereever} % to prevent problems with direct goto's
+
+%D Somewhere else we will properly define \type {\dostartgoto};
+%D the noto alternative takes care of undefined references in
+%D a sequence
+
+\ifx\dostartnoto\undefined
+
+ \def\dostartnoto#1\dostopnoto%
+ {\ifsecondaryreference\else{#1}\fi}
+
+\fi
+
+\ifx\dostartgoto\undefined
+
+ \def\dostartgoto\data#1\start#2\stop#3\dostopgoto%
+ {\ifsecondaryreference\else{#1}\fi}
+
+\fi
+
+%D As one can see, while processing the references, the first
+%D one is handled last. While scanning the second and following
+%D ones, we increment a counter and set a boolean to true.
+
+%D The next fast one permits rather raw references with
+%D \type{()}'s and is used in the object reference mechanism.
+
+\def\doifrawreferencefoundelse#1#2#3%
+ {\checkreferences
+ \bgroup
+ \edef\currentfullreference{#1}%
+ \doifdefinedelse{\r!cross\currentfullreference}
+ {\getreferenceelements\currentfullreference
+ \global\referencefoundtrue #2}
+ {\global\referencefoundfalse #3}%
+ \egroup}
+
+%D The inner case is simple. Only two cases have to be taken
+%D care of:
+%D
+%D \starttypen
+%D \naar{some text}[reference]
+%D \naar{some text}[prefix:reference]
+%D \stoptypen
+
+\def\docheckinnerreference%
+ {\global\let\predefinedreference=\currentinnerreference
+ \ifx\currentreferencearguments\empty
+ \doifdefinedelse{\r!cross\referenceprefix\currentfullreference}
+ {\global\referencefoundtrue}
+ {\let\referenceprefix\empty
+ \doifdefinedelse{\r!cross\currentfullreference}
+ {\global\referencefoundtrue}
+ {\global\referencefoundfalse}}%
+ \else % [SomeThing{with,me}]
+ \let\referenceprefix\empty
+ \doifdefinedelse{\r!cross\currentinnerreference}
+ {\global\referencefoundtrue}
+ {\global\referencefoundfalse}%
+ \fi
+ \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
+
+%D References to other files however are treated strict or
+%D tolerant, depending on their loading and availability:
+%D
+%D \starttypen
+%D \useexternaldocument[somefile][filename][a nice description]
+%D
+%D \goto{checked reference}[somefile::reference]
+%D \goto{unchecked reference}[somefile::]
+%D \goto{unchecked reference}[anotherfile::reference]
+%D \stoptypen
+%D
+%D Here we use the dummy reference \type{somefile::} set in
+%D \type{\setouterreference} as a signal that indeed references
+%D are defined for the outer file.
+
+% \def\docheckouterreference%
+% {\let\referenceprefix=\empty
+% \let\unharmedreferenceprefix=\empty
+% \xdef\predefinedreference%
+% {\currentouterreference::\currentinnerreference}%
+% \ifx\innerreference\empty
+% \global\referencefoundtrue % no checking done
+% \else
+% \doifdefinedelse{\r!cross\currentouterreference::}
+% {\doifdefinedelse{\r!cross\currentfullreference}
+% {\global\referencefoundtrue}
+% {\global\referencefoundfalse}}
+% {\global\referencefoundtrue}% no checking done
+% \fi
+% \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
+
+\newif\ifstrictouterreferences \strictouterreferencesfalse
+
+\beginTEX
+
+\def\dodocheckouterreference%
+ {\@EA\ifx\csname\specialREFidentifier\currentfullreference\endcsname\relax
+ \ifstrictouterreferences
+ \global\referencefoundfalse
+ \else
+ % already \global\referencefoundtrue % no checking done
+ \fi
+ \else
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier\currentfullreference\endcsname}%
+ \docheckouterreference
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dodocheckouterreference%
+ {\ifcsname\specialREFidentifier\currentfullreference\endcsname
+ \@EA\@EA\@EA\splitofffullreference\@EA\@EA\@EA % 1 level
+ {\csname\specialREFidentifier\currentfullreference\endcsname}%
+ \docheckouterreference
+ \else\ifstrictouterreferences
+ \global\referencefoundfalse
+ \else
+ % already \global\referencefoundtrue % no checking done
+ \fi\fi}
+
+\endETEX
+
+\def\docheckouterreference%
+ {\let\referenceprefix=\empty
+ \let\unharmedreferenceprefix=\empty
+ \xdef\predefinedreference%
+ {\currentouterreference::\currentinnerreference}%
+ \ifx\innerreference\empty
+ \global\referencefoundtrue % no checking done
+ \else
+ \doifdefinedelse{\r!cross\currentouterreference::}
+ {\doifdefinedelse{\r!cross\currentfullreference}
+ {\global\referencefoundtrue}
+ {\dodocheckouterreference}}
+ {\ifstrictouterreferences
+ \global\referencefoundfalse
+ \else
+ \global\referencefoundtrue % no checking done
+ \fi}%
+ \fi
+ \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
+
+%D Special references are only tested when some test routine is
+%D defined.
+
+\def\docheckspecialreference%
+ {\let\referenceprefix=\empty
+ \let\unharmedreferenceprefix=\empty
+ \xdef\predefinedreference%
+ {\currentreferencespecial::\currentreferenceoperation}%
+ \doifdefinedelse{\s!do\v!test\currentreferencespecial}
+ {\getvalue{\s!do\v!test\currentreferencespecial}
+ {\global\referencefoundtrue}
+ {\global\referencefoundfalse}}
+ {\global\referencefoundtrue}%
+ \doifpredefinedreferenceelse{\global\referencefoundfalse}{}}
+
+%D An unknown reference is reported on the screen, in the log
+%D file and, when enabled, in the left margin of the text.
+
+\def\reportreferenceerror#1#2%
+ {\ifvoorlopig\ifinpagebody\else
+ \doifsomething{#2}
+ {\inlinker
+ {\infofont
+ \dimen0=\linkermargebreedte
+ \advance\dimen0 by -2em
+ \doboundtext{#2}{\dimen0}{..}->}}%
+ \fi\fi
+ \doifpredefinedreferenceelse
+ {}
+ {\predefinereference
+ \showmessage{\m!references}{#1}{[\unharmedreferenceprefix][#2]}}}
+
+\def\unknownreference%
+ {\reportreferenceerror1}
+
+\def\illegalreference%
+ {\reportreferenceerror4}
+
+%D Although not actually needed, we default the unharmed
+%D reference prefix to the normal one.
+
+\def\unharmedreferenceprefix%
+ {\referenceprefix}
+
+%D When a reference is not found, we typeset a placeholder
+%D (two glyphs are often enough to represent the reference
+%D text).
+
+\def\dummyreference%
+ {{\tttf ??}}
+
+%D To prevent repetitive messages concerning a reference
+%D being defined, we set such an unknown reference to an empty
+%D one after the first encounter.
+
+\let\predefinedreference=\s!unknown
+
+%\def\predefinereference%
+% {\setgvalue{\r!cross\predefinedreference}{\rt!cross{}{}{}{}}}
+
+%\def\predefinereference%
+% {\setgvalue{\r!cross\unharmedreferenceprefix\predefinedreference}{\rt!cross{}{}{}{}}}
+
+\def\predefinereference%
+ {\setgvalue{\r!cross\predefinedreference}{\rt!cross{}{}{}{}}%
+ \setgvalue{\r!cross\unharmedreferenceprefix\predefinedreference}{\rt!cross{}{}{}{}}}
+
+%D Testing on existance then becomes:
+
+\def\checkpredefinedreference#1#2#3#4% #3 can expand tricky
+ {{#1}{#2}{#4}}
+
+\def\doifpredefinedreferenceelse#1#2%
+ {\bgroup
+ \let\rt!cross\checkpredefinedreference
+ \doifelse{\getvalue{\r!cross\predefinedreference}}{{}{}{}}
+ {\egroup#1}{\egroup#2}}
+
+%D Sometimes we want to temporary put a reference out of
+%D order. An example can be found in the menu macros.
+%D
+%D \starttypen
+%D \doifreferencepermitedelse{reference}{set}{true}{false}
+%D \stoptypen
+%D
+%D The second argument can be a comma seperated list.
+
+\def\doifreferencepermitedelse#1#2#3#4% ref set found notfound
+ {\doifreferencefoundelse{#1}
+ {\ifx\currentinnerreference\empty
+ \ifx\currentouterreference\empty
+ #3%
+ \else
+ \doifinstringelse{\currentouterreference::}{#2}{#4}{#3}%
+ \fi
+ \else\ifx\currentouterreference\empty
+ \doifinstringelse{\currentinnerreference}{#2}{#4}{#3}%
+ \else
+ \doifinstringelse{\currentouterreference::\currentinnerreference}{#2}{#4}{#3}%
+ \fi\fi}
+ {#4\unknownreference{#1}}}
+
+%D Apart from cross references supplied by the user, \CONTEXT\
+%D generates cross references itself. Most of them are not
+%D saved as a reference, but stored with their source, for
+%D instance a list or an index entry. Such automatically
+%D generated, for the user invisible, references are called
+%D {\em internal references}. The user supplied ones are
+%D labeled as {\em external references}.
+%D
+%D A second important characteristic is that when we want to
+%D support different backends (viewers), we need to support
+%D named destinations as well as page numbers. I invite readers
+%D to take a glance at the special driver modules to understand
+%D the fine points of this. As a result we will deal with {\em
+%D locations} as well as {\em real page numbers}. We explictly
+%D call this pagenumber a real one, because it is independant
+%D of the page numbering scheme used in the document.
+%D
+%D One of the reasons for \CONTEXT\ being the first \TEX\ base
+%D macropackage to support sophisticated interactive \PDF\
+%D files, lays in the mere fact that real page numbers are
+%D available in most two pass data, like references, list data
+%D and index entries.
+%D
+%D We will speak of \type{thisis...} when we are marking a
+%D location, and \type{goto...} when we point to such a
+%D location. The latter one can be seen as a hyperlink to the
+%D former one. In the next macros one we use constructs like:
+%D
+%D \starttypen
+%D \dostart...
+%D \dostop...
+%D \stoptypen
+%D
+%D Such macros are used to invoke the relevant specials from
+%D the special driver modules (see \type{spec-ini}). The flag
+%D \type{\iflocation} signals if we're in interactive mode.
+
+\def\thisisdestination#1% destination
+ {\iflocation
+ \ifusepagedestinations \else
+ \dostartthisislocation{#1}%
+ \dostopthisislocation
+ \fi
+ \fi}
+
+\def\thisisrealpage#1% pagenumber
+ {\iflocation
+ \dostartthisisrealpage{#1}%
+ \dostopthisisrealpage
+ \fi}
+
+%D The previous tho macros were easy ones, opposite to their
+%D counterparts. A common component in these is:
+%D
+%D \starttypen
+%D \dostartgoto
+%D \data {..}
+%D \start {..}
+%D \stop {..}
+%D \dostopgoto
+%D \stoptypen
+%D
+%D Here data can be whatever needs highlighting, e.g. {\em
+%D figure 2.4}, and the start and stop entries handle the
+%D specials. The two \DIMENSIONS\ \type{\buttonwidth} and
+%D \type{\buttonheight} have to be set when handling the
+%D data~(\type{#2}).
+
+\ifx\buttonheight\undefined \newdimen\buttonheight \fi
+\ifx\buttonwidth \undefined \newdimen\buttonwidth \fi
+
+\def\gotodestination#1#2#3#4#5% url file destination page data
+ {\iflocation
+ \ifusepagedestinations
+ \gotorealpage{#1}{#2}{#4}{#5}%
+ \else
+ \dostartgoto
+ \data
+ {#5}%
+ \start
+ \dostartgotolocation
+ {\number\buttonwidth}{\number\buttonheight}
+ {#1}{#2}{#3}{#4}%
+ \stop
+ \dostopgotolocation
+ \dostopgoto
+ \fi
+ \else
+ {#5}%
+ \fi}
+
+\def\gotorealpage#1#2#3#4% url file page data
+ {\iflocation
+ \dostartgoto
+ \data
+ {#4}%
+ \start
+ \dostartgotorealpage
+ {\number\buttonwidth}{\number\buttonheight}
+ {#1}{#2}{#3}%
+ \stop
+ \dostopgotorealpage
+ \dostopgoto
+ \else
+ {#4}%
+ \fi}
+
+%D Internal references can best be set using the next few
+%D macros. Setting such references to unique values is
+%D completely up to the macros that call them.
+%D
+%D \starttypen
+%D \thisissomeinternal{tag}{identifier}
+%D \gotosomeinternal {tag}{identifier}{pagenumber}{text}
+%D \stoptypen
+
+\def\thisissomeinternal#1#2% tag reference
+ {\doifsomething{#2}{\thisisdestination{#1:#2}}}
+
+\def\gotosomeinternal#1#2#3#4%
+ {\gotodestination{}{}{#1:#2}{#3}{#4}}
+
+%D An automatic mechanism is provided too:
+%D
+%D \starttypen
+%D \thisisnextinternal{tag}
+%D \gotonextinternal {tag}{number}{pagenumber}{text}
+%D \stoptypen
+%D
+%D The first macro increments a counter. The value of this
+%D counter is available in the macro \type{\nextinternalreference}
+%D and should be saved somewhere (for instance in a file) for
+%D future reference. The second argument of
+%D \type {\gotonextinternal} takes such a saved number. One can
+%D turn on tracing these references, in which case the
+%D references are a bit more verbose.
+
+\newcount\locationcount
+
+\newif\iftraceinternalreferences
+
+\def\nextinternalreference%
+ {\the\locationcount}
+
+\def\thisisnextinternal#1%
+ {\global\advance\locationcount by 1
+ \thisisdestination{\s!aut\iftraceinternalreferences:#1\fi:\nextinternalreference}}
+
+\def\gotonextinternal#1#2#3#4%
+ {\gotodestination{}{}{\s!aut\iftraceinternalreferences:#1\fi:#2}{#3}{#4}}
+
+%D We already went through a lot of problems to sort out what
+%D kind of reference we're dealing with. Sorting out the user
+%D supplied cross references (show/goto this or that) as well
+%D as user supplied system references (invoke this or that) is
+%D already taken care of in the test routine, but we still have
+%D to direct the request to the right routine.
+
+\def\gotolocation#1#2%
+ {\ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \ifnum\currentreferencetype<2
+ \gotoinnerlocation{#1}{#2}%
+ \else
+ \gotosystemlocation{#1}{#2}%
+ \fi
+ \else
+ \gotoouterlocation{#1}{#2}%
+ \fi
+ \else
+ \gotospeciallocation{#1}{#2}%
+ \fi}
+
+%D An inner reference refers to some place in the document
+%D itself.
+
+\def\gotoinnerlocation#1#2%
+ {\gotodestination
+ {}{}
+ {\referenceprefix\currentinnerreference}{\currentrealreference}
+ {#2}}
+
+%D The outer location refers to another document, specified as
+%D file or \URL.
+
+\def\gotoouterlocation#1#2% % page checken!
+ {\bgroup
+ \let\referenceprefix=\empty
+ \setouterlocation{\currentouterreference}%
+ \ifx\currentinnerreference\empty
+ \gotorealpage
+ {\otherURL}{\otherfile}{1}
+ {#2}%
+ \else
+ \gotodestination
+ {\otherURL}{\otherfile}{\currentinnerreference}{\currentrealreference}
+ {#2}%
+ \fi
+ \egroup}
+
+%D Special locations are those that are accessed by saying
+%D things like:
+%D
+%D \starttypen
+%D \goto{calculate total}[JS(summarize{10,23,56}]
+%D \stoptypen
+%D
+%D After several intermediate steps this finally arrives at
+%D the next macro and expands into (simplified):
+%D
+%D \starttypen
+%D \gotoJSlocation{total{summarize{10,23,56}}}{calculate total}
+%D \stoptypen
+%D
+%D The first argument is the full reference, the second one
+%D is the text, in some kind of manipulated form. In practice
+%D we split references, so we get:
+%D
+%D \starttypen
+%D \gotoJSlocation{summarize{10,23,56}}{calculate}
+%D \gotoJSlocation{summarize{10,23,56}}{total}
+%D \stoptypen
+%D
+%D where \type{calculate} and \type{total} are colored, boxed
+%D or whatever \type{\goto} is told to do.
+%D
+%D The macro \type{\gotoJSlocation} can use \type
+%D {\currentreferenceoperation} (in our example
+%D \type{summarize}) and \type{\currentreference} (here
+%D being \type {10,23,56}) to perform its task.
+
+\def\gotospeciallocation%
+ {\executeifdefined
+ {goto\currentreferencespecial location}\gobbleoneargument}
+
+%D Such special macros can be defined by:
+
+\def\definespeciallocation#1%
+ {\setvalue{goto#1location}}
+
+%D The associated test is to be defined by:
+
+\def\definespecialtest#1%
+ {\setvalue{\s!do\v!test#1}}
+
+%D This \type{\def} alike macro is to be used as:
+%D
+%D \starttypen
+%D \definespeciallocation{JS}#1#2{... #1 ... #2 ...}
+%D \stoptypen
+%D
+%D In module \type {core-jav} one can see that \type
+%D {\gotoJSlocation} looks much like the previous goto
+%D definitions.
+
+%D A system location is not always a location, but for the
+%D consistency we also consider actions as such.
+
+\def\gotosystemlocation%
+ {\getvalue{\r!syst\the\currentreferencetype}}
+
+\def\definesystemreferencehandler#1#2%
+ {\setgvalue{\r!syst\the#1}{#2}}
+
+%D In this module we define three system references: one for
+%D handling navigational, viewer specific, commands, another
+%D for jumping to special pages, like the first or last one,
+%D and a third reference for linking tree like lists, like
+%D tables of contents. The latter two adapt themselves to the
+%D current state.
+
+\definesystemreferencehandler \rt!exec \handleexecreference
+\definesystemreferencehandler \rt!page \handlepagereference
+\definesystemreferencehandler \rt!list \handlelistreference
+
+\def\handleexecreference#1%
+ {\executecommand{\currentdatareference}{\currentreferencearguments}}
+
+\def\handlepagereference#1%
+ {\gotorealpage{}{}{\currentdatareference}}
+
+\def\handlelistreference#1% is deze nog echt nodig?
+ {\gotodestination{}{}{\currentdatareference}{\getvalue{\currentdatareference}}}
+
+%D Command references (in dutch, english, german of
+%D whatever interface language) are translated into a bit
+%D shorter reference (\type{close}) and passed to the
+%D special driver (using \type{\executecommand}).
+
+% better: [command(name)] and \definereference[name][command(name)]
+
+\setglobalsystemreference \rt!exec \v!CloseDocument {close}
+\setglobalsystemreference \rt!exec \v!ExitViewer {exit}
+\setglobalsystemreference \rt!exec \v!FirstPage {first}
+\setglobalsystemreference \rt!exec \v!LastPage {last}
+\setglobalsystemreference \rt!exec \v!NextJump {forward}
+\setglobalsystemreference \rt!exec \v!NextPage {next}
+\setglobalsystemreference \rt!exec \v!PauseMovie {pause}
+\setglobalsystemreference \rt!exec \v!PreviousJump {backward}
+\setglobalsystemreference \rt!exec \v!PreviousPage {previous}
+\setglobalsystemreference \rt!exec \v!PrintDocument {print}
+\setglobalsystemreference \rt!exec \v!SaveForm {export}
+\setglobalsystemreference \rt!exec \v!LoadForm {import}
+\setglobalsystemreference \rt!exec \v!ResetForm {reset}
+\setglobalsystemreference \rt!exec \v!ResumeMovie {resume}
+\setglobalsystemreference \rt!exec \v!SaveDocument {save}
+\setglobalsystemreference \rt!exec \v!SearchAgain {searchagain}
+\setglobalsystemreference \rt!exec \v!SearchDocument {search}
+\setglobalsystemreference \rt!exec \v!StartMovie {start}
+\setglobalsystemreference \rt!exec \v!StopMovie {stop}
+\setglobalsystemreference \rt!exec \v!SubmitForm {submit}
+\setglobalsystemreference \rt!exec \v!SwapViewer {swap}
+\setglobalsystemreference \rt!exec \v!ViewerHelp {help}
+\setglobalsystemreference \rt!exec \v!HideField {hide}
+\setglobalsystemreference \rt!exec \v!ShowField {show}
+
+%D Executing the command looks alike the previous goto macros.
+
+\def\executecommand#1#2#3%
+ {\iflocation
+ \dostartgoto
+ \data
+ {#3}%
+ \start
+ \dostartexecutecommand
+ {\number\buttonwidth}{\number\buttonheight}
+ {#1}{#2}%
+ \stop
+ \dostopexecutecommand
+ \dostopgoto
+ \else
+ {#3}%
+ \fi}
+
+%D We could have done without the short tags and thereby saving
+%D some tokens, but the current approach leaves room for future
+%D extensions.
+
+%D It is possible to disable the writing of references to the
+%D utility file by setting:
+
+\newif\ifreferencing \referencingtrue
+
+%D One can also activate an automatic prefix mechanism. By
+%D setting the \type{\prefix} variable to \type{+}, the prefix
+%D is incremented, when set to \type{-} or empty, the prefix is
+%D reset. Other values become the prefix.
+
+\newcount\prefixcounter
+
+%D These settings are accomplished by:
+%D
+%D \showsetup{\y!setupreferencing}
+%D
+%D In interactive documents verbose references don't always
+%D make sense (what is a page number in an unnumbered
+%D document). By setting the \type{interaction} variable, one
+%D can influences the way interactive references are set.
+
+\def\setupreferencing%
+ {\dosingleargument\dosetupreferencing}
+
+\def\dosetupreferencing[#1]%
+ {\getparameters
+ [\??rf]
+ [\c!prefix=\s!unknown,#1]%
+ \processaction
+ [\@@rfstatus]
+ [ \v!stop=>\referencingfalse,
+ \v!start=>\referencingtrue]%
+ \processaction
+ [\@@rfinteractie]
+ [ \v!alles=>\let\dowantedreference=\docompletereference,
+ \v!label=>\let\dowantedreference=\dolabelonlyreference,
+ \v!tekst=>\let\dowantedreference=\dotextonlyreference,
+ \v!symbool=>\let\dowantedreference=\dosymbolreference]%
+ \ifx\@@rfprefix\s!unknown
+ % retain the current value
+ \else\ifx\@@rfprefix\empty
+ \let\referenceprefix=\empty
+ \else\ifx\@@rfprefix\incrementreferenceprefix
+ \advance\prefixcounter by 1
+ \edef\referenceprefix{\the\prefixcounter:}%
+ \else\ifx\@@rfprefix\decrementreferenceprefix
+ \let\referenceprefix=\empty
+ \else
+ \edef\referenceprefix{\@@rfprefix:}%
+ \fi\fi\fi\fi}
+
+\def\incrementreferenceprefix{+}
+\def\decrementreferenceprefix{-}
+
+%D \macros
+%D {handlereferenceactions,
+%D collectreferenceactions}
+%D
+%D Sometimes we need to pass the actions connected to
+%D references to variables instead of rectangular areas on
+%D which one can click. The next macro collects the actions
+%D and passes them to a handle. This is a rather dreadfull
+%D hack!
+%D
+%D \starttypen
+%D \handlereferenceactions{references}\handle
+%D \stoptypen
+%D
+%D So, \type {\handle} does the final job, which in for
+%D instance the \PDF\ drivers comes down to doing something
+%D with \type {\lastPDFaction}.
+
+\newif\ifcollectreferenceactions
+
+\def\handlereferenceactions#1#2%
+ {\doifsomething{#1}
+ {\bgroup
+ \collectreferenceactionstrue
+ \@EA\doifreferencefoundelse\@EA{#1}
+ {\gotolocation{#1}{}\ifsecondaryreference\else#2\fi}
+ {\unknownreference{#1}}%
+ \egroup}}
+
+%D The most straightforward way of retrieving references is
+%D using \type{\ref}. Consider the reference:
+%D
+%D \startbuffer
+%D \reference[my ref]{{Look}{Here}{I am}}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D We can ask for upto five reference components:
+%D
+%D \startbuffer
+%D user page reference: \ref[p][my ref]
+%D text reference: \ref[t][my ref]
+%D real page reference: \ref[r][my ref]
+%D sub text reference: \ref[s][my ref]
+%D extra text reference: \ref[e][my ref]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D And get back:
+%D
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+
+\def\ref%
+ {\dodoubleargument\doref}
+
+\def\reftypep{\currentpagereference}
+\def\reftypet{\currenttextreference}
+\def\reftyper{\currentrealreference}
+\def\reftypes{\currentsubtextreference}
+\def\reftypee{\currentsubsubtextreference}
+
+\def\doref[#1][#2]%
+ {\ifsecondargument
+ \doifreferencefoundelse{#2}
+ {\doifundefinedelse{reftype#1}{\reftypep}{\getvalue{reftype#1}}}
+ {\unknownreference{#2}\dummyreference}%
+ \else
+ \dummyreference
+ \fi}
+
+%D We can typeset a reference using \type{\in}, \type{\at} and
+%D \type{\about} and goto specific locations using
+%D \type{\goto}. The last one does not make that much sense in
+%D a paper document. To complicate things, \PLAIN\ \TEX\ also
+%D implements an \type {\in} but fortunately that one only
+%D makes sense in math mode.
+
+%D --- VANAF HIER NOG VERENGELSEN ---
+
+\let\donormalin =\in
+\let\donormalover=\over % about/oppassen beter nederlands dan engels!
+
+\def\in%
+ {\ifmmode
+ \expandafter\donormalin
+ \else
+ \expandafter\doinatreference\expandafter\currenttextreference
+ \fi}
+
+\def\op%
+ {\doinatreference\currentpagereference}
+
+\def\over%
+ {\ifmmode
+ \expandafter\donormalover
+ \else
+ \expandafter\dospecialover
+ \fi}
+
+\unexpanded\def\dospecialover[#1]%
+ {\bgroup
+ \def\thecurrentsubtextreference%
+ {\limitatetext{\currentsubtextreference}{\@@rfbreedte}{...}}%
+ \leaveoutervmode
+ \@@rflinks
+ \doifreferencefoundelse{#1}
+ {\let\crlf\space
+ \let\\\space
+ \let\donaarfixed\donaarspace
+ \donaarspace{\thecurrentsubtextreference}[#1]}
+ {\unknownreference{#1}\dummyreference}%
+ \@@rfrechts
+ \referentieinfo{<}{#1}%
+ \egroup}
+
+%D Typesetting the reference is a bit more complicated than one
+%D would at first sight expect. This is due to the fact that we
+%D distinguish three (five) alternative calls:
+%D
+%D \plaatsfiguur
+%D [hier][three calls]
+%D {Three alternatives reference calls.}
+%D \startcombinatie[1*3]
+%D {\framed{\type{ \in }}} {a}
+%D {\framed{\type{ \at }}} {b}
+%D {\framed{\type{\goto}}} {c}
+%D \stopcombinatie
+%D
+%D \startbuffer
+%D \in figure[fig:three calls]
+%D \in{figure}[fig:three calls]
+%D \in figure a[fig:three calls]
+%D \in{figure}{a}[fig:three calls]
+%D figure~\in[fig:three calls]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This turns up as:
+%D
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+%D
+%D The dual \type{{}} results in a split reference. In a
+%D document meant for paper, one is tempted to use the last
+%D (most straightforward) alternative. When a document is also
+%D meant voor electronic distribution, the former alternatives
+%D have preference, because everything between the \type{\in}
+%D and~\type{[} becomes active (and when asked for, typeset
+%D in a different color and typeface).
+
+\def\doinatreference#1%
+ {\doifnextcharelse{[}
+ {\dodoinatreference{#1}{}}
+ {\dodoinatreference{#1}}}
+
+\def\dodoinatreference#1%
+ {\def\dododoinatreference{\dodododoinatreference{#1}}%
+ \futurelet\next\dododoinatreference}
+
+\def\dodododoinatreference#1#2#3[#4]%
+ {\ifx\next\bgroup
+ \dododododoinatreference{#1\ignorespaces#3}{#2}[#4]%
+ \else
+ \dododododoinatreference{#1}{#2#3}[#4]%
+ \fi}
+
+%D We arrived at the last step. Before we do the typesetting,
+%D we forget all previous (paragraph bound) settings and make
+%D sure that we remain in horizontal mode. Next we choose
+%D among the several representations.
+
+\def\dododododoinatreference#1#2[#3]%
+ {\bgroup
+ \forgetall
+ \leaveoutervmode
+ \doifreferencefoundelse{#3}
+ {\doifelsenothing{#1}
+ {\dosymbolreference{#1}{#2}[#3]}
+ {\dowantedreference{#1}{#2}[#3]}}
+ {\dounknownreference{#1}{#2}[#3]}%
+ \referentieinfo{<}{#3}%
+ \egroup}
+
+%D The previously discussed setup macro lets us specify the
+%D representation of references. A symbol reference does not
+%D show the specific data, like the number of a figure, but
+%D shows one of: \hbox {$^\goforwardcharacter$
+%D $^\gobackwardcharacter$ $^\gonowherecharacter$}, depending
+%D on the direction to go.
+
+\def\dosymbolreference#1#2[#3]%
+ {\bgroup
+ \setupsymbolset[\@@iasymboolset]%
+ \ifhmode\unskip\fi
+ \ifx\currentreferencespecial\empty
+ \ifx\currentouterreference\empty
+ \ifnum0\currentrealreference=0
+ \ifhmode\strut$^{\symbol[\v!nergens]}$\fi
+ \else\ifnum0\currentrealreference>\realpageno
+ \dodosymbolreference{#2}{$^{\symbol[\v!volgende]}$}%
+ \else\ifnum0\currentrealreference<\realpageno
+ \dodosymbolreference{#2}{$^{\symbol[\v!vorige]}$}%
+ \else
+ \ifhmode\strut$^{\symbol[\v!nergens]}$\fi
+ \fi\fi\fi
+ \else
+ \gotoouterlocation{#3}{\showlocation{$^{\symbol[\v!ergens]}$}}%
+ \fi
+ \else
+ \gotospeciallocation{#3}{\showlocation{$^{\symbol[\v!ergens]}$}}%
+ \fi
+ \egroup}
+
+\def\dodosymbolreference#1#2%
+ {#1\hbox{\gotorealpage{}{}{\currentrealreference}
+ {\dolocationattributes\??ia\c!letter\c!kleur{#2}}}}
+
+%D The other alternatives just conform their names: only the
+%D label, only the text, or the label and the text.
+
+\def\dounknownreference#1#2[#3]%
+ {\unknownreference{#3}\dotextprefix{#2}\dummyreference}%
+
+\def\docompletereference#1#2[#3]%
+ {\doifsomespaceelse{#2}
+ {\doifsomething{#2}{\donaarspace{#2}[#3]~}\donaarfixed{#1}[#3]}
+ {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
+
+% VEEL BETER:
+
+\def\docompletereference#1#2[#3]%
+ {\doifsomespaceelse{#2}
+ {\donaarspace{\dotextprefix{#2}#1}[#3]}
+ {\donaarfixed{\dotextprefix{#2}#1}[#3]}}
+
+\def\dolabelonlyreference#1#2[#3]%
+ {\doifsomespaceelse{#2}
+ {\doifsomething{#2}{\donaarspace{#2}[#3]}}
+ {\donaarfixed{\dotextprefix{#2}}[#3]}}
+
+\def\dotextonlyreference#1#2[#3]%
+ {\dotextprefix{#2}\donaarfixed{#1}[#3]}
+
+\let\dowantedreference=\docompletereference
+
+%D --- OF MEER, OF ANDERS: ---
+
+\def\dotextprefix#1%
+ {\ConvertToConstant\doifnot{#1}{}{#1~}}
+
+%D In interactive documents going to a specific location is not
+%D bound to cross references. The \type{\goto} commands can be
+%D used to let users access another part of the document. In
+%D this respect, interactive tables of contents and registers
+%D can be considered goto's. Because in fact a \type{\goto} is
+%D just a reference without reference specific data, the
+%D previous macros are implemented using the goto
+%D functionality.
+%D
+%D \showsetup{\y!naar}
+%D
+%D One important chaacteristic is that the first argument of
+%D \type{\goto} (and therefore \type{\at} and \type{\in} is
+%D split at spaces. This means that, although hyphenation is
+%D prevented, long references can cross line endings.
+
+%\unexpanded\def\naar#1[#2]%
+% {\leaveoutervmode
+% \doifreferencefoundelse{#2}
+% {\doifelsenothing{#1}
+% {\dosymbolreference{}{}[#2]}
+% {\donaarspace{#1}[#2]}}
+% {\unknownreference{#2}#1}%
+% \referentieinfo{<}{#2}}
+
+\def\donaar#1[#2]%
+ {\leaveoutervmode
+ \doifreferencefoundelse{#2}
+ {\doifelsenothing{#1}
+ {\dosymbolreference{}{}[#2]}
+ {\donaarspace{#1}[#2]}}
+ {\unknownreference{#2}#1}%
+ \referentieinfo{<}{#2}}
+
+\unexpanded\def\naar#1#2%
+ {\donaar{#1}#2}
+
+\newif\ifsharesimilarreferences \sharesimilarreferencestrue
+\newcount\similarreference % 0=noppes 1=create/refer 2,3,..=refer
+
+\def\donaarspace#1[#2]%
+ {\ifsecondaryreference\setbox0=\hbox\fi % due to space insertion
+ {\let\donaarspace=\donaarfixed
+ \iflocation
+ \def\processisolatedword##1%
+ {\ifisolatedwords\ifsharesimilarreferences
+ \global\advance\similarreference by 1
+ \fi\fi
+ \hbox{\gotolocation{#2}{##1\presetgoto}}}%
+ \doattributes\??ia\c!letter\c!kleur
+ {\processisolatedwords{#1}\processisolatedword}%
+ \global\similarreference=0
+ \else
+ #1\relax % \relax prevents #1's next macros from gobbling \fi
+ \fi}}
+
+\def\donaarfixed#1[#2]%
+ {{\iflocation
+ \hbox{\gotolocation{#2}{\doattributes\??ia\c!letter\c!kleur
+ {#1\presetgoto}}}%
+ \else
+ #1%
+ \fi}}
+
+%D In case the auto split feature is not needed or even not
+%D even wanted, \type{\gotobox} can be used.
+
+%D --- NOG IN HANDLEIDING ---
+
+\unexpanded\def\naarbox#1[#2]%
+ {\bgroup
+ \locationstrutfalse
+ \leaveoutervmode
+ \doifreferencefoundelse{#2}
+ {\donaarfixed{#1}[#2]}
+ {\hbox{\unknownreference{#2}#1}}%
+ \referentieinfo{<}{#2}%
+ \egroup}
+
+%D An reference to another document can be specified as a file
+%D or as an \URL. Both are handled by the same mechanism and
+%D can be issued by saying something like:
+%D
+%D \starttypen
+%D \goto[dictionary::the letter a]
+%D \stoptypen
+%D
+%D The macros that are responsible for handling these
+%D references, use the next six variables:
+
+\let\otherlabel = \empty
+\let\fileprefix = \empty
+\def\otherfile {\jobname}
+\let\otherURL = \empty
+\let\otherprefix = \empty
+\let\dowithdocdes = \empty
+
+%D One can imagine that many references to such a dictionary
+%D are made, so in most cases such a document reference in an
+%D indirect one.
+%D
+%D \showsetup{\y!gebruikexterndocument}
+%D
+%D For example:
+%D
+%D \starttypen
+%D \useexternaldocument
+%D [dictionary][engldict]
+%D [The Famous English Dictionary]
+%D \stoptypen
+%D
+%D The next macro implements these relations, and also take
+%D care of loading the document specific references.
+
+\def\gebruikexterndocument%
+ {\dotripleargument\dogebruikexterndocument}
+
+\def\dogebruikexterndocument[#1][#2][#3]%
+ {\bgroup
+ \doifelsenothing{#1}
+ {\dogebruikexterndocument[#2][#2][#3]}
+ {\doifelsenothing{#3}
+ {\dogebruikexterndocument[#1][#2][#2]}
+ {\doifsomething{#2}
+ {\setgvalue{\v!file:::#1}{\doexternaldocument[][#2][#3]}% just \do
+ \doifparentfileelse{#2}
+ {\showmessage{\m!references}{21}{#2}}
+ {\bgroup % prevents wrong loading of \jobname
+ \def\fileprefix{#1::}%
+ \let\setglobalcrossreference=\setoutercrossreference
+ \usereferences[#2]%
+ \egroup % when called nested
+ \showmessage{\m!references}{21}{#2}}}}}%
+ \egroup}
+
+%D The \URL\ alternative takes four arguments:
+%D
+%D \showsetup{\y!gebruikURL}
+%D
+%D like:
+%D
+%D \starttypen
+%D \useURL
+%D [dictionary][http://www.publisher.com/public][engldict]
+%D [The Famous English Dictionary]
+%D \stoptypen
+%D
+%D Several specifications are possible:
+%D
+%D \starttypen
+%D \useURL [id] [url] [file] [description]
+%D \useURL [id] [url] [file]
+%D \useURL [id] [url]
+%D \stoptypen
+%D
+%D This time we don't load the references when no file is
+%D specified. This is logical when one keeps in mind that a
+%D valid \URL\ can also be a mail address.
+
+\def\gebruikURL%
+ {\bgroup
+ \catcode`\#=12\catcode`\%=12
+ \catcode`\_=12\catcode`\~=12
+ \dodoubleempty\dogebruikURL}
+
+\def\dogebruikURL[#1][#2]%
+ {\egroup\doquadrupleempty\dodogebruikURL[#1][#2]}
+
+\def\dodogebruikURL[#1][#2][#3][#4]%
+ {\iffirstargument
+ \iffourthargument
+ \setgvalue{\v!file:::#1}{\doexternaldocument[#2][#3][#4]}%
+ \else\ifthirdargument
+ \setgvalue{\v!file:::#1}{\doexternaldocument[#2][#3][{\url[#1]}]}%
+ \else\ifsecondargument
+ \setgvalue{\v!file:::#1}{\doexternaldocument[#2][][{\url[#1]}]}%
+ \fi\fi\fi
+ \fi}
+
+\let\gebruikurl=\gebruikURL
+
+%D \macros
+%D {url,setupurl}
+%D
+%D We also have: \type{\url} for directly calling the
+%D description. So we can say:
+%D
+%D \starttypen
+%D \useURL [one] [http://www.test.nl]
+%D \useURL [two] [http://www.test.nl] [] [Some Site]
+%D
+%D \url[one] or \from[two] or \goto{Whatever Site}[URL(two)]
+%D \stoptypen
+%D
+%D An \URL\ can be set up with
+%D
+%D \showsetup{\y!setupurl}
+
+\def\setupurl%
+ {\dodoubleargument\getparameters[\??ur]}
+
+\unexpanded\def\url[#1]%
+ {\bgroup
+ \processaction
+% [\@@rfurlvariant]
+ [\@@urvariant]
+ [ \v!geen=>\chardef\urlsplitmode=0,
+ \v!beide=>\chardef\urlsplitmode=1,
+ \v!na=>\chardef\urlsplitmode=2,
+ \v!voor=>\chardef\urlsplitmode=3]%
+% \doifelse{\@@rfurlspatie}{\v!ja}
+ \doifelse{\@@urspatie}{\v!ja}
+ {\setbetweenisolatedwords%
+ {\scratchskip\currentspaceskip
+ \hskip\!!zeropoint\!!plus.2\scratchskip}}
+ {\setbetweenisolatedwords\allowbreak}%
+ \def\doexternaldocument[##1][##2][##3]{\hyphenatedurl{##1}}%
+ \dostartattributes\??ur\c!letter\c!kleur{}%
+ \getvalue{\v!file:::#1}%
+ \dostopattributes
+ \egroup}
+
+%D This macro is hooked into a support macro, and thereby
+%D \URL's break ok, according to the setting of a switch,
+%D
+%D \startbuffer
+%D \gebruikURL
+%D [test]
+%D [sentence_sentence%sentence#sentence~sentence/sentence//sentence:sentence.sentence]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Such an \URL\ is, depending on the settings, hyphenated as:
+%D
+%D \haalbuffer
+%D
+%D \startregelcorrectie
+%D \hbox to \hsize
+%D {\hss\en
+%D \stelrefererenin[urlvariant=beide]%
+%D \vbox{\hsize.25cm\hbox{\bf both}\prewordbreak\url[test]}%
+%D \hss
+%D \stelrefererenin[urlvariant=voor]%
+%D \vbox{\hsize.25cm\hbox{\bf before}\prewordbreak\url[test]}%
+%D \hss
+%D \stelrefererenin[urlvariant=na]%
+%D \vbox{\hsize.25cm\hbox{\bf after}\prewordbreak\url[test]}%
+%D \hss}
+%D \stopregelcorrectie
+%D
+%D By setting \type{urlspace=yes} one can get slightly better
+%D spacing when using very long \URL's.
+
+%D Many macro definitions ago we called for the auxiliary macro
+%D \type{\setouterlocation} and now is the time to define this
+%D one.
+
+\def\setouterlocation#1%
+ {\doifdefinedelse{\v!file:::#1}
+ {\def\doexternaldocument[##1][##2][##3]%
+ {\edef\otherURL{##1}%
+ \edef\otherfile{##2}}%
+ \getvalue{\v!file:::#1}}
+ {\let\otherURL=\empty
+ \edef\otherfile{#1}}%
+ \doifparentfileelse{\otherfile}
+ {\let\otherURL=\empty
+ \let\otherfile=\empty
+ \global\let\otherlabel=\empty
+ \let\otherprefix=\empty}
+ {\xdef\otherlabel{#1}%
+ \edef\otherprefix{#1::}}}
+
+%D When defining the external source of information, one can
+%D also specify a suitable name (the last argument). This name
+%D can be called upon with:
+%D
+%D \showsetup{\y!uit}
+%D
+%D As can be expected, this macro used \type{\goto} to
+%D perform its task.
+
+\definecomplexorsimple\uit
+
+\def\simpleuit%
+ {\bgroup
+ \doifdefinedelse{\v!file:::\otherlabel}
+ {\def\doexternaldocument[##1][##2][##3]{##3}%
+ \getvalue{\v!file:::\otherlabel}}
+ {\tttf[\otherlabel]}%
+ \egroup}
+
+\def\complexuit[#1]%
+ {\doifinstringelse{::}{#1}
+ {\docomplexuit[#1]}
+ {\docomplexuit[#1::]}}
+
+\def\docomplexuit[#1::#2]%
+ {\bgroup
+ \doifdefinedelse{\v!file:::#1}
+ {\def\doexternaldocument[##1][##2][##3]%
+ {\naar{##3}[#1::#2]}%
+ \getvalue{\v!file:::#1}}
+ {\tttf[#1]}%
+ \egroup}
+
+%D We also support:
+%D
+%D \starttypen
+%D \goto{some text}[file(identifier{location}]
+%D \stoptypen
+%D
+%D which is completely equivalent with
+%D
+%D \starttypen
+%D \goto{some text}[identifier::location]
+%D \stoptypen
+%D
+%D The fastest implementation would be:
+
+\definespecialtest\v!file {\handlespecialFILEandURL}
+\definespecialtest\v!URL {\handlespecialFILEandURL}
+\definespecialtest\v!url {\handlespecialFILEandURL}
+
+\definespeciallocation\v!file {\handlespecialallocationFILEandURL}
+\definespeciallocation\v!URL {\handlespecialallocationFILEandURL}
+\definespeciallocation\v!url {\handlespecialallocationFILEandURL}
+
+\def\handlespecialFILEandURL%
+ {\doifreferencefoundelse
+ {\currentreferenceoperation::\currentreferencearguments}}
+
+\def\handlespecialallocationFILEandURL%
+ {\let\currentouterreference=\currentreferenceoperation
+ \let\currentinnerreference=\currentreferencearguments
+ \let\currentreferenceoperation=\empty
+ \let\currentreferencearguments=\empty
+ \gotoouterlocation}
+
+%D Now we have file references as special ones, it's rather
+%D logical to have the viewer specific ones available in a dual
+%D way too. At first glance we could do with:
+%D
+%D \starttypen
+%D \definespeciallocation\v!actie
+%D {\getreferenceelements\currentreferenceoperation
+%D \handleexecreference}
+%D \stoptypen
+%D
+%D An better alternative, slower but error aware, is
+
+\definespecialtest\v!actie%
+ {\doifreferencefoundelse\currentreferenceoperation}
+
+\definespeciallocation\v!actie
+ {\handleexecreference}
+
+%D So now we can say:
+%D
+%D \starttypen
+%D \goto{some action}[PreviousJump]
+%D \stoptypen
+%D
+%D as well as:
+%D
+%D \starttypen
+%D \goto{some text}[action(PreviousJump]
+%D \stoptypen
+
+%D A special case of references are those to programs. These,
+%D very system dependant references are implemented by abusing
+%D some of the previous macros.
+%D
+%D \showsetup{\y!stelprogrammasin}
+%D \showsetup{\y!definieerprogramma}
+%D \showsetup{\y!programma}
+%D
+%D The latter gives access to the description of the program,
+%D being the last argument to the definition command.
+
+\def\stelprogrammasin%
+ {\dodoubleargument\getparameters[\??pr]}
+
+\def\dodefinieerprogramma[#1][#2][#3]%
+ {\setgvalue{\v!programma:::#1}{\doprogramma{#2}{#3}}}
+
+\def\definieerprogramma%
+ {\dotripleargument\dodefinieerprogramma}
+
+\def\programma#1[#2]%
+ {\bgroup
+ \doifdefinedelse{\v!programma:::#2}
+ {\def\doprogramma##1##2%
+ {\doifelsenothing{#1}
+ {\naar{##2}[\v!programma(#2)]}
+ {\naar{#1}[\v!programma(#2)]}}%
+ \getvalue{\v!programma:::#2}}
+ {\tttf[#2]}%
+ \egroup}
+
+\definespeciallocation\v!programma#1#2%
+ {\bgroup
+ \iflocation
+ \doifdefinedelse{\v!programma:::\currentreferenceoperation}
+ {\def\doprogramma##1##2{\def\@@programfile{##1}}%
+ \getvalue{\v!programma:::\currentreferenceoperation}}
+ {\let\@@programfile=\currentreferenceoperation}%
+ \convertcommand\@@programfile\to\ascii
+ \dostartgoto
+ \data
+ {#2}%
+ \start
+ \dostartrunprogram
+ {\number\buttonwidth}{\number\buttonheight}
+ {\@@prgebied\ascii\space\currentreferencearguments}%
+ \stop
+ \dostoprunprogram
+ \dostopgoto
+ \else
+ {#2}%
+ \fi
+ \egroup}
+
+%D As we can see, we directly use the special reference
+%D mechanism, which means that
+%D
+%D \starttypen
+%D \goto{some text}[program(name{args})]
+%D \stoptypen
+%D
+%D is valid.
+
+%D The next macro provides access to the actual pagenumbers.
+%D When documenting and sanitizing the original reference
+%D macros, I decided to keep the present meaning as well as to
+%D make this meaning available as a special reference method.
+%D So now one can use:
+%D
+%D \starttypen
+%D \gotopage{some text}[location]
+%D \gotopage{some text}[number]
+%D \gotopage{some text}[file::number]
+%D \stoptypen
+%D
+%D as well as:
+%D
+%D \starttypen
+%D \goto{some text}[page(location)]
+%D \goto{some text}[page(number)]
+%D \goto{some text}[file::page(number)]
+%D \stoptypen
+%D
+%D Here location is a keyword like \type{nextpage}.
+%D
+%D \showsetup{\y!ganaarpagina}
+
+\def\dodefinieerpagina[#1][#2]%
+ {\setvalue{\v!pagina:::#1}{#2}}
+
+\def\definieerpagina%
+ {\dodoubleargument\dodefinieerpagina}
+
+\definieerpagina [\v!eerstepagina] [\firstpage]
+\definieerpagina [\v!vorigepagina] [\prevpage]
+\definieerpagina [\v!volgendepagina] [\nextpage]
+\definieerpagina [\v!laatstepagina] [\lastpage]
+\definieerpagina [\v!eerstesubpagina] [\firstsubpage]
+\definieerpagina [\v!vorigesubpagina] [\prevsubpage]
+\definieerpagina [\v!volgendesubpagina] [\nextsubpage]
+\definieerpagina [\v!laatstesubpagina] [\lastsubpage]
+\definieerpagina [\v!eerste] [\firstpage]
+\definieerpagina [\v!vorige] [\prevpage]
+\definieerpagina [\v!volgende] [\nextpage]
+\definieerpagina [\v!laatste] [\lastpage]
+\definieerpagina [\v!eerste\v!sub] [\firstsubpage]
+\definieerpagina [\v!vorige\v!sub] [\prevsubpage]
+\definieerpagina [\v!volgende\v!sub] [\nextsubpage]
+\definieerpagina [\v!laatste\v!sub] [\lastsubpage]
+
+%D Because we combine both methods, we have to take care of
+%D the \type{file::page(n)} as well as \type{page(file::n)}.
+
+\definespeciallocation\v!pagina#1#2%
+ {\iflocation
+ \ifx\currentouterreference\empty
+ \splitoffreference\currentreferenceoperation
+ \else
+ \let\currentinnerreference=\currentreferenceoperation
+ \fi
+ \ifx\currentouterreference\empty
+ \doifnonzeropositiveelse{\currentinnerreference}
+ {}
+ {\edef\currentinnerreference{1}}%
+ \gotorealpage{}{}{\currentinnerreference}{#2}%
+ \else
+ \setouterlocation\currentouterreference
+ \doifnonzeropositiveelse{\currentinnerreference}
+ {}
+ {\doifdefinedelse{\v!pagina:::\currentinnerreference}
+ {\edef\currentinnerreference{\getvalue{\v!pagina:::\currentinnerreference}}}
+ {\edef\currentinnerreference{1}}}%
+ \gotorealpage{\otherURL}{\otherfile}{\currentinnerreference}{#2}%
+ \fi
+ \else
+ {#2}%
+ \fi}
+
+\def\naarpagina#1[#2]%
+ {\naar{#1}[\v!pagina(#2)]}
+
+\let\ganaarpagina=\naarpagina
+
+%D A still very rudimentary|/|experimental forward|/|backward
+%D reference mechanism is provided by the macro \type{\atpage}:
+%D
+%D \starttypen
+%D ... \somewhere{backward text}{forward text}[someref] ...
+%D ... \oppagina[someref] ...
+%D \stoptypen
+%D
+%D In future versions there will be more sophisticated
+
+%D support, also suitable for references to floating bodies.
+
+\unexpanded\def\dosomewhere#1#2#3[#4]% #3 gobbles space around #2
+ {\leaveoutervmode
+ \doifreferencefoundelse{#4}
+ {\ifforwardreference
+ \doifelsenothing{#1}
+ {\dosymbolreference{}{}[#4]}
+ {\donaarspace{#1}[#4]}%
+ \else
+ \doifelsenothing{#2}
+ {\dosymbolreference{}{}[#4]}
+ {\donaarspace{#2}[#4]}%
+ \fi}
+ {\unknownreference{#4}#1/#2}%
+ \referentieinfo{<}{#4}}
+
+\unexpanded\def\atpage[#1]%
+ {\leaveoutervmode
+ \doifreferencefoundelse{#1}
+ {\ifrealreferencepage
+ \ifforwardreference
+ \donaarfixed{\labeltext{\v!hierboven}}[#1]%
+ \else
+ \donaarfixed{\labeltext{\v!hieronder}}[#1]%
+ \fi
+ \else
+ \donaarfixed{\labeltext{\v!oppagina}~\currentpagereference}[#1]%
+ \fi}
+ {\unknownreference{#1}%
+ \v!pagina~\dummyreference}%
+ \referentieinfo{<}{#1}}
+
+%D We can cross link documents by using:
+%D
+%D \showsetup{\y!coupledocument}
+%D
+%D like:
+%D
+%D \starttypen
+%D \coupledocument[print][somefile][chapter,section]
+%D \stoptypen
+%D
+%D After which when applicable, we have available the
+%D references:
+%D
+%D \starttypen
+%D \goto{print version}[print::chapter]
+%D \stoptypen
+%D
+%D and alike. The title placement definition macros have a
+%D key \type{file}, which is interpreted as the file to jump
+%D to, that is, when one clicks on the title.
+
+\let\crossdocumentreferences\empty
+\let\crossdocumentelements\empty
+
+\newif\ifautocrossdocument
+
+\def\docoupledocument[#1][#2][#3][#4]%
+ {\ifthirdargument
+ \begingroup
+ \def\dolijstelement##1##2##3##4##5##6%
+ {\global\utilitydonetrue %{Watch the braces here below!}
+ %\setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{}{##6}}%
+ \setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{##6}{}}%
+ \def\usereferences[##1]%
+ {\setbox0=\vbox{\doutilities{#3}{##1}{#3}{}{}}}%
+ \dogebruikexterndocument[#1][#2][#4]%
+ \doglobal\addtocommalist{#1}\crossdocumentreferences
+ \def\docommando##1%
+ {\doglobal\addtocommalist{##1}\crossdocumentelements}%
+ \processcommalist[#3]\docommando
+ \ifutilitydone
+ \global\autocrossdocumenttrue
+ \fi
+ \endgroup
+ \fi}
+
+\def\coupledocument%
+ {\doquadrupleempty\docoupledocument}
+
+%D --- STRANGE HERE, BETTER IN CORE-NAV ---
+
+\def\checkcontrastreference#1%
+ {\ifnum\currentreferencetype=\rt!page\ifnum\currentdatareference=\realpageno
+ \doifdefined{#1\c!contrastkleur}
+ {\setevalue{#1\c!kleur}{\getvalue{#1\c!contrastkleur}}}%
+ \fi\fi}
+
+%D Buttons are just what their names says: things that can be
+%D clicked (pushed) on. They are similar to \type{\goto},
+%D except that the text argument is not interpreted.
+%D Furthermore one can apply anything to them that can be done
+%D with \type{\framed}.
+%D
+%D \startbuffer
+%D \button[width=3cm,height=1.5cm]{Exit}[ExitViewer]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \haalbuffer
+%D
+%D This command is formally specified as:
+%D
+%D \showsetup{\y!button}
+%D
+%D The characteristics can be set with:
+%D
+%D \showsetup{\y!stelbuttonsin}
+
+\def\dostelbuttonsin[#1]%
+ {\getparameters[\??bt][#1]%
+ \dododostelinteractiemenuin{\??bt\c!onbekendeverwijzing}%
+ \dododostelinteractiemenuin{\??bt\c!zelfdepagina}}
+
+\def\stelbuttonsin%
+ {\dosingleargument\dostelbuttonsin}
+
+\definecomplexorsimpleempty\button
+
+\def\complexbutton%
+ {\docomplexbutton\??bt}
+
+\presetlocalframed[\??bt]
+
+\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4]
+ {\dodocomplexbutton#1[#2]{#3}#4} % #4 == [
+
+\def\dodocomplexbutton#1[#2]#3[#4]%
+ {\bgroup
+ \doifvalue{#1\c!status}{\v!stop}{\locationfalse}%
+ \iflocation
+ \resetgoto
+ \ConvertConstantAfter\doifelse{#3}{\v!geen}
+ {\!!doneafalse}
+ {\!!doneatrue}%
+ \doifelsenothing{#4} % in handleiding, is soort dummy
+ {\if!!donea\hbox\else\hphantom\fi
+ {\localframed[#1][#2]{#3}}}%
+ {\doifreferencefoundelse{#4}
+ {\setbox0=\if!!donea\hbox\else\hphantom\fi
+ {\localframed[#1][#2]
+ {\checkcontrastreference{#1}%
+ \dolocationattributes{#1}\c!letter\c!kleur{\ignorespaces#3}}}%
+ \startinteractie
+ \hbox{\gotolocation{#4}{\copy0}}%
+ \stopinteractie}
+ {\unknownreference{#4}%
+ \if!!donea\hbox\else\hphantom\fi
+ {\localframed[#1][#2]
+ {\ignorespaces#3}}}}%
+ \fi
+ \egroup}
+
+%D Interaction buttons, in fact a row of tiny buttons, are
+%D typically only used for navigational purposed. The next
+%D macro builds such a row based on a specification list.
+%D
+%D \startbuffer
+%D \interactiebuttons
+%D [breedte=\hsize][pagina,VorigeSprong,VerlaatViewer]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D gives
+%D
+%D \haalbuffer
+%D
+%D Apart from individual entries, one can use \type{page} and
+%D \type {subpage} as shortcuts to their four associated buttons.
+%D The symbols are derived from the symbols linked to the
+%D entries.
+
+\def\interactiebuttons%
+ {\dodoubleempty\dointeractiebuttons}
+
+\def\dointeractiebuttons[#1][#2]% er is een verdeel macro \fractie
+ {\iflocation
+ \bgroup
+ \doif{\@@ibstatus}{\v!stop}{\locationfalse}%
+ \iflocation
+ \ifsecondargument
+ \checkinteractiebalk\v!ruim\!!zeropoint % brrrrr
+ \setbox2=\hbox
+ {\setupsymbolset[\@@iasymboolset]%
+ \localframed[\??ib][]{\symbol[\v!vorigepagina]}}%
+ \!!heighta=\ht2
+ \stelinteractiebalkin[#1,\c!strut=\v!nee]%
+ \stelinteractiein[\c!breedte=\!!zeropoint]%
+ %\!!counta=1
+ \!!counta=0 % new
+ \processallactionsinset
+ [#2]
+ [ \v!pagina=>\advance\!!counta by 4,
+ \v!sub\v!pagina=>\advance\!!counta by 4,
+ \s!unknown=>\advance\!!counta by 1]%
+ \ifdim\@@ibbreedte=\!!zeropoint
+ \!!widtha=2em
+ \advance\!!widtha by \@@ibafstand % new
+ \!!widthb=\!!counta\!!widtha
+ \advance\!!widthb by -\@@ibafstand % new
+ \else
+ \!!widtha=\@@ibbreedte
+ \!!widthb=\@@ibafstand % new
+ \multiply\!!widthb by \!!counta % new
+ \advance\!!widthb by -\@@ibafstand % new
+ \advance\!!widtha by -\!!widthb % new
+ \divide\!!widtha by \!!counta
+ \!!widthb=\@@ibbreedte
+ \fi
+ \def\goto##1%
+ {\setnostrut
+ \setupsymbolset[\@@iasymboolset]%
+ \edef\localreference{##1}%
+ \dodocomplexbutton\??ib
+ [\c!hoogte=\!!heighta,\c!breedte=\!!widtha]%
+ {\dontleavehmode\symbol[\localreference]}%
+ [\localreference]%
+ \hss}%
+ \hbox to \!!widthb
+ {\processallactionsinset
+ [#2]
+ [ \v!pagina=>\goto\v!eerstepagina
+ \goto\v!volgendepagina
+ \goto\v!vorigepagina
+ \goto\v!laatstepagina,
+ \v!sub\v!pagina=>\goto\v!eerstesubpagina
+ \goto\v!volgendesubpagina
+ \goto\v!vorigesubpagina
+ \goto\v!laatstesubpagina,
+ \s!unknown=>\goto\commalistelement]%
+ \unskip}%
+ \else
+ \interactiebuttons[][#1]%
+ \fi
+ \fi
+ \egroup
+ \fi}
+
+%D In the next settings we see some variables that were not
+%D used here and that concern the way the pagenumbers refered
+%D to are typeset.
+
+\setupreferencing
+ [\c!status=\v!start,
+ \v!deel\c!nummer=\v!ja,
+ \v!hoofdstuk\c!nummer=\v!nee,
+ \c!interactie=\v!alles,
+% \c!urlvariant=\v!beide,
+% \c!urlspatie=\v!nee,
+% \c!urlletter=,
+% \c!urlkleur=,
+ \c!prefix=,
+ \c!breedte=.75\zetbreedte,
+ \c!links=\citaat\bgroup,
+ \c!rechts=\egroup]
+
+\setupurl
+ [\c!variant=\v!beide,
+ \c!spatie=\v!nee,
+ \c!letter=\v!type,
+ \c!kleur=]
+
+%D We also set up buttons (not yet, this one calls a menu macro):
+
+% \stelbuttonsin
+% [\c!status=\v!start,
+% \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]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index 8fdcd1151..970fced48 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -1,2329 +1,2503 @@
-%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
-%D \width#1\height#2\depth#3\raster#4\corner#5\radius#6\\%
-%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
-%D \startbuffer
-%D \periodgraybox
-%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\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}%
-%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\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\bodyfontsize
- \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 \macros
-%D {defineoverlay,
-%D overlaywidth, overlayheight, overlaydepth,
-%D overlaycolor}
-%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.
-%D Multiple backgrounds are possible and are specified as:
-%D
-%D \starttypen
-%D \omlijnd[achtergrond={one,two,three}]{Three backgrounds!}
-%D \stoptypen
-%D
-%D Most drawing packages only know width and height. Therefore
-%D the dimensions have a slightly different meaning here:
-%D
-%D \startopsomming[opelkaar]
-%D \som \type{\overlaywidth }: width of the overlay
-%D \som \type{\overlayheight}: height plus depth of the overlay
-%D \som \type{\overlaydepth }: depth of the overlay
-%D \stopopsomming
-%D
-%D The resulting box is lowered to the right depth.
-
-\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%
- \advance\scratchdimen by #5%
- \edef\overlayheight{\the\scratchdimen}%
- \scratchdimen=#5%
- \edef\overlaydepth {\the\scratchdimen}%
- \edef\overlaycolor{#6}%
- %\writestatus
- % {overlay}
- % {#1\space w=\overlaywidth/h+d=\overlayheight/d=\overlaydepth]}%
- \setbox0=\hbox{\lower\overlaydepth\hbox{#2}}%
- \dimen0=\wd0 \advance\dimen0 by -\overlaywidth
- \dimen2=\ht0 \advance\dimen2 by -\overlayheight
- \wd0=\overlaywidth
- \ht0=\overlayheight
- \dp0=\overlaydepth
- \setbox0=\hbox{\hskip-.5\dimen0\raise-.5\dimen2\box0}%
- \wd0=\overlaywidth
- \ht0=\overlayheight
- \dp0=\overlaydepth
- \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\dodobackgroundbox#1#2#3#4#5#6%
- {\bgroup
- \setbox\extraframebox=\hbox
- {\executeifdefined{executeoverlay#1}\gobblesevenarguments
- {\dimen2}{\dimen4}{\dimen6}{#3}{#4}{#5}{#6}}%
- \setbox\extraframebox=\hbox
- {\vbox{\moveleft\dimen0\box\extraframebox}}%
- \wd\extraframebox=\wd#2%
- \ht\extraframebox=\ht#2%
- \dp\extraframebox=\dp#2%
- \box\extraframebox\hskip-\wd#2%
- \egroup}
-
-\def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner
- #6\radius#7\depth#8\\%
- {\vbox
- {\dimen0=#5\relax
- \dimen2=\wd#1\advance\dimen2 by 2\dimen0
- \dimen4=\ht#1\advance\dimen4 by \dimen0
- \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #8\relax
- \def\docommando##1%
- {\dodobackgroundbox{##1}{#1}{#3}{#4}{#6}{#7}}%
- \hbox
- {\expanded{\rawprocesscommalist[#2]\noexpand\docommando}%
- \box#1}}}
-
-%D We can specify overlays as a comma separated list of
-%D overlays, a sometimes handy feature.
-
-%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
- {\dimen0=#3\relax
- \dimen2=\wd#1\advance\dimen2 by 2\dimen0
- \dimen4=\ht#1\advance\dimen4 by \dimen0
- \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #6\relax
- \setbox\extraframebox=\hbox
- {\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
- \corner#4\radius#5\toggle#7\\}%
- \setbox\extraframebox=\hbox
- {\vbox{\moveleft#3\box\extraframebox}}%
- \wd\extraframebox=\wd#1%
- \ht\extraframebox=\ht#1%
- \dp\extraframebox=\dp#1%
- \hbox
- {\copy#1\hskip-\wd#1%
- \doifelsenothing{#2} % speeds up a little
- {\box\extraframebox}
- {\color[#2]{\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\bodyfontsize
- \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\\%
- {\bgroup
- \setbox0=\null\wd0=#1\ht0=#2\dp0=#3%
- \setbox2=\vbox
- {\getvalue{t\@@frame@@#4#7}%
- \hbox
- {\getvalue{l\@@frame@@#4#5}%
- \box0%
- \getvalue{r\@@frame@@#4#6}}
- \getvalue{b\@@frame@@#4#8}}%
- \wd2=#1\ht2=#2\dp2=#3%
- \box2
- \egroup}
-
-\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!leeg,
- \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!leeg}{\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!leeg} 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
-
-%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=,
- \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\bodyfontsize,
- \c!hoek=\v!recht,
- \c!achtergrond=,
- \c!achtergrondkleur=,
- \c!achtergrondraster=\@@rsraster,
- \c!regelcorrectie=\v!aan,
- #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]
- [ \v!links=>\letvalue{\??kd#1\c!links}=\relax
- \letvalue{\??kd#1\c!rechts}=\hfill,
- \v!rechts=>\letvalue{\??kd#1\c!links}=\hfill
- \letvalue{\??kd#1\c!rechts}=\relax,
- \v!midden=>\letvalue{\??kd#1\c!links}=\hfill
- \letvalue{\??kd#1\c!rechts}=\hfill]%
- \forgetparindent
- \setbox\framebox=\vbox
- \bgroup
- \expanded{\switchtobodyfont[\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}%
- \doplaats[\??kd#1][]{\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{\switchtobodyfont[\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 bodyfont switching:
-
-\def\starttextrule#1%
- {\bgroup
- \dotoptextrule{#1}
- \switchtobodyfont[\@@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
-
-%D \macros
-%D {copyright, registered}
-%D
-%D Some not so robust left||overs (borrowed from Knuth,
-%D \TEX Book\ page 356):
-
-\def\omcirkeld#1%
- {{\ooalign{\hfil\raise0.07ex\hbox{{\tx#1}}\hfil\crcr\mathhexbox20D}}}
-
-\def\copyright%
- {\omcirkeld{C}}
-
-\def\registered%
- {\omcirkeld{R}}
-
-% \setuprules
-% [\c!dikte=\v!middel]
-
-\setuplinewidth
- [\v!middel]
-
-\setupframed
- [\c!breedte=\v!passend,
- \c!hoogte=\v!ruim,
- \c!offset=0.25ex,
- \c!leeg=\v!nee,
- \c!kader=\v!aan,
- \c!bovenkader=,
- \c!onderkader=,
- \c!linkerkader=,
- \c!rechterkader=,
- \c!straal=.5\bodyfontsize,
- \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\bodyfontsize,
- \c!rechteroffset=\@@aglinkeroffset,
- \c!bovenoffset=\!!zeropoint,
- \c!onderoffset=\@@agbovenoffset,
- \c!status=\v!start,
- \c!straal=.5\bodyfontsize,
- \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
- \ No newline at end of file
+%D \module
+%D [ file=core-rul,
+%D version=1998.10.16,
+%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
+%D \width#1\height#2\depth#3\raster#4\corner#5\radius#6\\%
+%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
+%D \startbuffer
+%D \periodgraybox
+%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\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}%
+%D \width.5\hsize\height1cm\depth0cm\raster.85\corner\v!nee\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\bodyfontsize
+ \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!uit}{\v!aan}}
+
+\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!aan} % will be a macro that handles
+ {\def\ovalstr{1}} % start, stop, ja, nee, aan, uit
+ {\def\ovalstr{0}}% % and something \doif
+ \doifelse{#7}{\v!aan}
+ {\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 \macros
+%D {defineoverlay,
+%D overlaywidth, overlayheight, overlaydepth,
+%D overlaycolor}
+%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 [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.
+%D Multiple backgrounds are possible and are specified as:
+%D
+%D \starttypen
+%D \omlijnd[achtergrond={one,two,three}]{Three backgrounds!}
+%D \stoptypen
+%D
+%D Most drawing packages only know width and height. Therefore
+%D the dimensions have a slightly different meaning here:
+%D
+%D \startopsomming[opelkaar]
+%D \som \type{\overlaywidth }: width of the overlay
+%D \som \type{\overlayheight}: height plus depth of the overlay
+%D \som \type{\overlaydepth }: depth of the overlay
+%D \stopopsomming
+%D
+%D The resulting box is lowered to the right depth.
+
+\def\overlaywidth {\the\vsize} % We preset the variables
+\def\overlayheight{\the\hsize} % to some reasonable default
+\def\overlaydepth {\!!zeropoint} % values.
+
+\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%
+ \advance\scratchdimen by #5%
+ \edef\overlayheight{\the\scratchdimen}%
+ \scratchdimen=#5%
+ \edef\overlaydepth {\the\scratchdimen}%
+ \edef\overlaycolor{#6}%
+ %\writestatus
+ % {overlay}
+ % {#1\space w=\overlaywidth/h+d=\overlayheight/d=\overlaydepth]}%
+ \setbox0=\hbox{\lower\overlaydepth\hbox{#2}}%
+ \dimen0=\wd0 \advance\dimen0 by -\overlaywidth
+ \dimen2=\ht0 \advance\dimen2 by -#4% not \overlayheight
+ \wd0=\overlaywidth
+ \ht0=\overlayheight
+ \dp0=\overlaydepth
+ \setbox0=\hbox{\hskip-.5\dimen0\raise-.5\dimen2\box0}%
+ \wd0=\overlaywidth
+ \ht0=\overlayheight
+ \dp0=\overlaydepth
+ \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\dodobackgroundbox#1#2#3#4#5#6%
+ {\bgroup
+ \setbox\extraframebox=\hbox
+ {\executeifdefined{executeoverlay#1}\gobblesevenarguments
+ {\dimen2}{\dimen4}{\dimen6}{#3}{#4}{#5}{#6}}%
+ \setbox\extraframebox=\hbox
+ {\vbox{\moveleft\dimen0\box\extraframebox}}%
+ \wd\extraframebox=\wd#2%
+ \ht\extraframebox=\ht#2%
+ \dp\extraframebox=\dp#2%
+ \box\extraframebox\hskip-\wd#2%
+ \egroup}
+
+\def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner
+ #6\radius#7\depth#8\\%
+ {\vbox
+ {\forgetall\boxmaxdepth\maxdimen
+ \dimen0=#5\relax
+ \dimen2=\wd#1\advance\dimen2 by 2\dimen0
+ \dimen4=\ht#1\advance\dimen4 by \dimen0
+ \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #8\relax
+ \def\docommando##1%
+ {\dodobackgroundbox{##1}{#1}{#3}{#4}{#6}{#7}}%
+ \hbox
+ {\expanded{\rawprocesscommalist[#2]\noexpand\docommando}%
+ \box#1}}}
+
+%D We can specify overlays as a comma separated list of
+%D overlays, a sometimes handy feature.
+
+%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
+ {\dimen0=#3\relax
+ \dimen2=\wd#1\advance\dimen2 by 2\dimen0
+ \dimen4=\ht#1\advance\dimen4 by \dimen0
+ \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #6\relax
+ \setbox\extraframebox=\hbox
+ {\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
+ \corner#4\radius#5\toggle#7\\}%
+ \setbox\extraframebox=\hbox
+ {\vbox{\moveleft#3\box\extraframebox}}%
+ \wd\extraframebox=\wd#1%
+ \ht\extraframebox=\ht#1%
+ \dp\extraframebox=\dp#1%
+ \hbox
+ {\copy#1\hskip-\wd#1%
+ \doifelsenothing{#2} % speeds up a little
+ {\box\extraframebox}
+ {\color[#2]{\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\bodyfontsize
+ \ifdim\dimen0=\!!zeropoint
+ \dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\%
+ \else
+ \dostrokedroundbox\width#1\height#2\depth#3\radius#5\toggle#6\\%
+ \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 can 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\\%
+ {\bgroup
+ \setbox0=\null\wd0=#1\ht0=#2\dp0=#3%
+ \setbox2=\vbox
+ {\getvalue{t\@@frame@@#4#7}%
+ \hbox
+ {\getvalue{l\@@frame@@#4#5}%
+ \box0%
+ \getvalue{r\@@frame@@#4#6}}
+ \getvalue{b\@@frame@@#4#8}}%
+ \wd2=#1\ht2=#2\dp2=#3%
+ \box2
+ \egroup}
+
+\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\toggle#5\left#6\\%
+ {\doif{#5}{\v!aan}{\ovalbox{#1}{#2}{#3}{\linewidth}{#4}{\v!aan}{\v!uit}}}
+
+%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!leeg,
+ \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.
+
+%\let\backgroundcolor\empty
+%\let\framecolor \empty
+
+\def\startlocalframed[#1][#2]%
+ {\bgroup
+ \edef\@@framed{#1}%
+ \getparameters[\@@framed][#2]%
+ %\edef\backgroundcolor{\getvalue{\@@framed\c!achtergrondkleur}}%
+ %\edef\framecolor {\getvalue{\@@framed\c!kaderkleur}}%
+ \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=\pseudostrut % was: \relax
+ \let\localendstrut=\relax
+ \let\localstrut =\pseudostrut % was: \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}%
+ \edef\framedwidth % a new feature
+ {\ifdim\!!widtha >\!!zeropoint\the\!!widtha \else\!!zeropoint\fi}%
+ \edef\framedheight% a new feature
+ {\ifdim\!!heighta>\!!zeropoint\the\!!heighta\else\!!zeropoint\fi}%
+ \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 \macros
+%D {ifreshapeframebox}
+%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.
+
+\newif\ifreshapeframebox \reshapeframeboxtrue
+
+\def\stoplocalframed%
+ {\dontshowcomposition
+ \ifboxhasformat
+ \doif{\localwidth}{\v!passend}
+ {\ifreshapeframebox\doreshapeframedbox\fi
+ \boxhaswidthfalse}%
+ \fi
+ \ifboxhaswidth
+ \wd\framebox=\!!widtha
+ \fi
+ \ifboxhasheight
+ \ht\framebox=\!!heighta
+ \fi
+ \doifvalue{\@@framed\c!leeg}{\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}%
+ \doifelsevalue{\@@framed\c!plaats}{\v!laag}
+ {\doinlineframedbox}
+ {\doifvalue{\@@framed\c!plaats}{\v!diepte}
+ {\doloweredframedbox}}%
+ \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!leeg} 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 \macros
+%D {mframed, minframed}
+%D
+%D When Tobias asked how to frame mathematical elements in
+%D formulas, Taco's posted the next macro:
+%D
+%D \starttypen
+%D \def\mframed#1%
+%D {\relax
+%D \ifmmode
+%D \vcenter{\hbox{\framed{$\ifinner\else\displaystyle\fi#1$}}}%
+%D \else
+%D \framed{$#1$}%
+%D \fi}
+%D \stoptypen
+%D
+%D Because \type {\ifinner} does not (always) reports what
+%D one would expect, we move the test to the outer level. We
+%D also want to pass arguments,
+%D
+%D \starttypen
+%D \def\mframed%
+%D {\dosingleempty\domframed}
+%D
+%D \def\domframed[#1]#2% % tzt \dowithnextmathbox ?
+%D {\relax
+%D \ifmmode
+%D \ifinner
+%D \inframed[#1]{$#2$}%
+%D \else
+%D \vcenter{\hbox{\framed[#1]{$\displaystyle#2$}}}%
+%D \fi
+%D \else
+%D \inframed[#1]{$#2$}%
+%D \fi}
+%D \stoptypen
+%D
+%D Still better is the next alternative, if only because it
+%D takes care of setting the super- and subscripts styles
+
+\ifx\restoremathstyle\undefined \let\restoremathstyle\relax \fi
+
+\def\domframed[#1][#2]#3%
+ {\begingroup
+ \ifmmode
+ \ifinner
+ \let\mframedstyle\relax
+ \else
+ \let\mframedstyle\displaystyle
+ \fi
+ \else
+ \let\mframedstyle\relax
+ \fi
+ #1\ifdone
+ \def\normalstrut{$\mframedstyle\restoremathstyle\vphantom($}%
+ \framed
+ %[\c!kaderoffset=.25ex,\c!offset=\v!overlay,#2]
+ [\c!kaderoffset=\@@oioffset,\c!offset=\v!overlay,#2]
+ {$\mframedstyle\restoremathstyle#3$}%
+ \else
+ \inframed
+ [#2]
+ {$\mframedstyle\restoremathstyle#3$}%
+ \fi
+ \endgroup}
+
+\def\mframed%
+ {\dodoubleempty\domframed[\donetrue]}
+
+\def\minframed%
+ {\dodoubleempty\domframed[\donefalse]}
+
+%D So instead of the rather versatile \type {\framed}, we ue
+%D the \type {\mframed}.
+%D
+%D \startbuffer
+%D \startformule
+%D x \times \mframed{y} \times y^{z_z}
+%D \stopformule
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D However, we got into troubles when we want to nest sub- and
+%D superscripts, like in
+%D
+%D \startbuffer
+%D \startformule
+%D x \times \mframed{y} \times y^{\mframed{z}_{\mframed{z}}}
+%D \stopformule
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D Therefore, we can best use \type {\super} and \type {\sub}
+%D instead of \type {^} and \type {_}. Both commands take care
+%D of proper font switching.
+%D
+%D \startbuffer
+%D \startformule
+%D x \times \mframed{y} \times y\super{\mframed{z}\sub{\mframed{z}}}
+%D \stopformule
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D As usual, one can specify in what way the text should be
+%D framed. One should be aware of the fact that, inorder to
+%D preserve the proper spacing, the \type {offset} is set to
+%D \type {overlay} and \type {frameoffset} is used used
+%D instead.
+%D
+%D \startbuffer
+%D \startformule
+%D x \times y\super{\mframed[kaderkleur=rood]{z}\sub{z}}
+%D \stopformule
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D For inline use, we also provide the \type {\minframed}
+%D alternative: we want $x \times \minframed{y}$ in inline
+%D math, right?
+
+%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
+ {\strut\ifhbox\shapebox\unhbox\else\box\fi\shapebox}%
+ \ifdim\wd0>\@@globalwidth
+ \global\@@globalwidth=\wd0
+ \fi}%
+ \dosetraggedcommand{\localformat}%
+ \raggedcommand
+ \ifboxhasheight
+ \setbox\framebox=\vbox to \localheight
+ {\hsize\@@globalwidth
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}%
+ \beforeframedbox
+ \innerflushshapebox
+ \afterframedbox}%
+ \else
+ \setbox\framebox=\vbox
+ {\hsize\@@globalwidth
+ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}%
+ \innerflushshapebox}%
+ \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 also lower the box over the natural depth of the
+%D line.
+
+\def\doloweredframedbox%
+ {\getboxheight\dimen2\of\box\framebox
+ \advance\dimen2 by -\dp\strutbox
+ \ht\framebox\dimen2
+ \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
+
+%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=,
+ \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\bodyfontsize,
+ \c!hoek=\v!recht,
+ \c!achtergrond=,
+ \c!achtergrondkleur=,
+ \c!achtergrondraster=\@@rsraster,
+ \c!regelcorrectie=\v!aan,
+ #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]
+ [ \v!links=>\letvalue{\??kd#1\c!links}=\relax
+ \letvalue{\??kd#1\c!rechts}=\hfill,
+ \v!rechts=>\letvalue{\??kd#1\c!links}=\hfill
+ \letvalue{\??kd#1\c!rechts}=\relax,
+ \v!midden=>\letvalue{\??kd#1\c!links}=\hfill
+ \letvalue{\??kd#1\c!rechts}=\hfill]%
+ \forgetparindent
+ \setbox\framebox=\vbox
+ \bgroup
+ \expanded{\switchtobodyfont[\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\c!letter\c!kleur{}}
+
+\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}%
+ \doplaats[\??kd#1][]{\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{\switchtobodyfont[\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\c!letter\c!kleur{}%
+ \bgroup
+ \aftergroup\docloseframedtext
+ \let\next=}
+
+\def\docloseframedtext%
+ {\removelastskip
+ \dostopattributes
+ \egroup
+ \egroup}
+
+%D \macros
+%D {defineframed}
+%D
+%D One can also define simple framed texts, using:
+%D
+%D \showsetup{\y!defineframed}
+
+\def\defineframed%
+ {\dodoubleempty\dodefineframed}
+
+\def\dodefineframed[#1][#2]%
+ {\iffirstargument
+ \setvalue{#1}{\dodoubleempty\doframed[#2]}%
+ \fi}
+
+\def\doframed[#1][#2]%
+ {\framed[#1,#2]}
+
+%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\c!letter\c!kleur{#1}\hskip\linkermargeafstand}}
+ {\color[\@@tllijnkleur]
+ {\vrule\!!height\dimen4\!!depth\dimen6\!!width\@@tlbreedte}%
+ \hbox spread 2\dimen8
+ {\hss\doattributes\??tl\c!letter\c!kleur{\strut#1}\hss}}%
+ \fi
+ \color[\@@tllijnkleur]
+ {\leaders\hrule\!!height\dimen4\!!depth\dimen6\hfill}}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \noindent\box0
+ \egroup}
+
+\def\dotoptextrule#1%
+ {\pagina[\v!voorkeur]
+ \witruimte
+ \@@tlvoor
+ \docomplextextrule{#1}%
+ \geenwitruimte
+ \@@tltussen
+ \endgraf}
+
+\def\dodobottomtextrule#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
+
+\def\dobottomtextrule#1%
+ {\dodobottomtextrule{#1}%
+ \@@tlna
+ \pagina[\v!voorkeur]}
+
+\def\domiddletextrule#1%
+ {\dodobottomtextrule{#1}%
+ \@@tltussen
+ \pagina[\v!voorkeur]}
+
+\def\dounknowntextrule%
+ {\iffirstargument
+ \let\next=\dotoptextrule
+ \else
+ \def\next{\dobottomtextrule{}}%
+ \fi
+ \next}
+
+%D The grouped commands also supports bodyfont switching:
+
+\def\starttextrule#1%
+ {\bgroup
+ \def\dounknowntextrule{\domiddletextrule}
+ \dotoptextrule{#1}
+ \bgroup
+ \switchtobodyfont[\@@tlkorps]}
+
+\def\stoptextrule%
+ {\par
+ \egroup
+ \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\c!letter\c!kleur{\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\c!letter\c!kleur{#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
+
+%D \macros
+%D {copyright, registered}
+%D
+%D Some not so robust left||overs (borrowed from Knuth,
+%D \TEX Book\ page 356):
+
+\def\omcirkeld#1%
+ {{\ooalign{\hfil\raise0.07ex\hbox{{\tx#1}}\hfil\crcr\mathhexbox20D}}}
+
+\def\copyright%
+ {\omcirkeld{C}}
+
+\def\registered%
+ {\omcirkeld{R}}
+
+% \setuprules
+% [\c!dikte=\v!middel]
+
+\setuplinewidth
+ [\v!middel]
+
+\setupframed
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!ruim,
+ \c!offset=0.25ex,
+ \c!leeg=\v!nee,
+ \c!kader=\v!aan,
+ \c!bovenkader=,
+ \c!onderkader=,
+ \c!linkerkader=,
+ \c!rechterkader=,
+ \c!straal=.5\bodyfontsize,
+ \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\bodyfontsize,
+ \c!rechteroffset=\@@aglinkeroffset,
+ \c!bovenoffset=\!!zeropoint,
+ \c!onderoffset=\@@agbovenoffset,
+ \c!status=\v!start,
+ \c!straal=.5\bodyfontsize,
+ \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
index 3e2d842df..78ba384e2 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -1,2075 +1,2200 @@
-%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{starttable}
-
-\def\starttabel%
- {\bgroup
- \ifinsidefloat\else
- \startbaselinecorrection % \outer..
- \fi
- \postponefootnotes
- \firststagestartTABLE}
-
-\def\stoptabel%
- {\finishTABLE
- \ifinsidefloat\else
- \stopbaselinecorrection % \outer..
- \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{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
- \global\advance\TABLEmaxheight by -\dp\strutbox
- \ifdim\prevdepth<\maxdimen\ifdim\prevdepth>\!!zeropoint
- \global\advance\TABLEmaxheight by -\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
- \finishTABLErow
- \fi}
-
-\def\finishTABLErow%
- {\crcr
- \TABLEnoalign
- {\nobreak
- \setTABLEaction\TABLEunknown
- \setTABLEerror\TABLEunknown
- \global\let\checkTABLEautorow=\empty
- \global\let\chuckTABLEautorow=\empty
- \global\currentTABLEcolumn=0 }}
-
-\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 \macros
-%D {ifcheckTABLEcolums}
-%D
-%D
-%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). By default
-%D checking is off.
-
-\newif\ifcheckTABLEcolumns
-
-\let\beforeTABLEline=\empty
-\let\afterTABLEline =\empty
-
-\def\doendTABLErow#1#2#3%
- {\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}
-
-\def\endTABLErow#1#2#3%
- {\setTABLEaction#1%
- \ifTABLEgrayline
- \finishTABLErow
- \else
- \ifnum\currentTABLEcolumn>\maxTABLEcolumn
- \doendTABLErow{#1}{#2}{#3}%
- \else\ifcheckTABLEcolumns
- \setTABLEerror\TABLEmissingcolumn
- \handleTABLEerror
- \else
- \doendTABLErow{#1}{#2}{#3}%
- \fi\fi
- \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 1 % was 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 % silent recovery
- \setTABLEerror\TABLEmissingcolumn % some day warning
- \handleTABLEerror
- \else
- \global\currentTABLEcolumn=0 % nog check
- \normalTABLElineending
- \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
-
-% definieer: \BC \BL
-% herhaal: \BR
-% definieer: \CL \RL (eerste \CL[green] = hele row! / \CL[1,green])
-% dus: \CL en \RL mix tussen \HL en \BL
-
-\def\defineTABLEbackgrounds%
- {\let\BC =\TableBC
- \let\BL =\TableBL
- \let\BR =\TableBR
- \let\BACKGROUND=\TableBR
- \let\CL =\TableCL
- \let\RL =\TableRL
- \let\COLOR =\TableCOLOR
- \let\RASTER =\TableRASTER
- \global\let\lastTABLEc=\@@tiachtergrondkleur
- \global\let\lastTABLEr=\@@tiachtergrondraster
- \doifinsetelse{\@@tiachtergrond}{c,color}
- {\global\chardef\TABLEcr=1}
- {\global\chardef\TABLEcr=2}}
-
-\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\CL=\doTableCL
- \let\RL=\doTableRL
- \let\BC=\doTableBC
- \doTableBL}
-
-\def\doTableBL%
- {\complexorsimpleTable{BL}}
-
-\def\simpleTableBL%
- {\complexTableBL[,]}
-
-\def\complexTableBL[#1]%
- {\analyzeTABLEcr[#1]%
- \handleTABLEcr}
-
-\def\TableBR#1%
- {\TABLEnoalign
- {\global\let\nextTABLEgrayline=\executeTABLEgrayline
- \checkTABLEgrayline#1\BR
- \global\TABLEgraylinetrue}}
-
-\def\analyzeTABLEcr[#1]%
- {\doanalyzeTABLEcr[#1,,]}
-
-\def\doanalyzeTABLEcr[#1,#2,#3]%
- {\doifnumberelse{#1x}
- {\dodoanalyzeTABLEcr[#1,#2,#3]}
- {\dodoanalyzeTABLEcr[1,#1,#2]}}
-
-\def\dodoanalyzeTABLEcr[#1,#2,#3]%
- {\global\chardef\TABLEn=#1\relax
- \processaction
- [#2]
- [ c=>\global\chardef\TABLEcr=1,
- color=>\global\chardef\TABLEcr=1,
- r=>\global\chardef\TABLEcr=2,
- raster=>\global\chardef\TABLEcr=2]%
- \ifcase\TABLEcr \or
- \doifnot{#3}{}{\xdef\lastTABLEc{#3}}%
- \or
- \doifnot{#3}{}{\xdef\lastTABLEr{#3}}%
- \fi}
-
-\def\handleTABLEcr%
- {\relax % else funny side effect
- \ifcase\TABLEcr
- % Can't happen!
- \or
- \addtoTABLEgrayline{\complexTableCOLOR[\the\TABLEn,\lastTABLEc]}%
- \else
- \addtoTABLEgrayline{\complexTableRASTER[\the\TABLEn,\lastTABLEr]}%
- \fi
- \gobbleTableBCL}
-
-\def\analyzeTABLEcrl#1[#2]%
- {\doanalyzeTABLEcrl#1[#2,,]}
-
-\def\doanalyzeTABLEcrl#1[#2,#3,#4]%
- {\doifnumberelse{#2x}
- {\dodoanalyzeTABLEcr[#2,#1,#3]}
- {\dodoanalyzeTABLEcr[\ifTABLEgrayline1\else\maxTABLEcolumn\fi,#1,#2]}}
-
-\def\TableCL%
- {\TABLEnoalign\bgroup
- \global\let\nextTABLEgrayline=\executeTABLEgrayline
- \let\BL=\doTableBL
- \let\CL=\doTableCL
- \let\RL=\doTableRL
- \let\BC=\doTableBC
- \doTableCL}
-
-\def\doTableCL%
- {\complexorsimpleTable{CL}}
-
-\def\simpleTableCL% nog eens \"e\"en lijn van maken
- {\BL[\the\maxTABLEcolumn,c,\lastTABLEc]}
-
-\def\complexTableCL[#1]%
- {\analyzeTABLEcrl{c}[#1]%
- \handleTABLEcr}
-
-\def\TableRL%
- {\TABLEnoalign\bgroup
- \global\let\nextTABLEgrayline=\executeTABLEgrayline
- \let\BL=\doTableBL
- \let\CL=\doTableCL
- \let\RL=\doTableRL
- \let\BC=\doTableBC
- \doTableRL}
-
-\def\doTableRL%
- {\complexorsimpleTable{RL}}
-
-\def\simpleTableRL%
- {\BL[\the\maxTABLEcolumn,r,\lastTABLEr]}
-
-\def\complexTableRL[#1]%
- {\analyzeTABLEcrl{r}[#1]%
- \handleTABLEcr}
-
-\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\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}
-
-% kan simpeler
-
-\def\docomplexTableCOLOR[#1]%
- {\dodocomplexTableGL\localstartcolor\localstopcolor
- [#1,\lastTABLEc,,]}
-
-\gdef\docomplexTableRASTER[#1]%
- {\dodocomplexTableGL\localstartraster\localstopraster
- [#1,\lastTABLEr,,]}
-
-\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}
-
-\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\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{\switchtobodyfont[\@@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\bodyfontsize,
- \c!commandos=,
- \c!achtergrond=\v!raster,
- \c!achtergrondraster=\@@rsraster,
- \c!achtergrondkleur=]
-
-\def\ifintabel{\ifintable} % upward compatible
-
-\protect \endinput
+%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
+
+% BUG:
+%
+% \starttabel[|l|l|]
+% \HL
+% \RL\FR \VL Head 1 \VL Head 2 \VL\FR
+% \RL\LR \VL Head A \VL Head B \VL\LR % niet grijs ??
+% \HL
+% \VL 1 \VL 2 \VL\FR
+% \VL a \VL b \VL\LR
+% \HL
+% \stoptabel
+
+% 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, ifsplittables}
+%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
+
+\let\tracetables \tracetablestrue
+
+%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{starttable}
+
+\def\starttabel%
+ {\bgroup
+ \ifinsidefloat\else
+ \startbaselinecorrection % \outer..
+ \fi
+ \postponefootnotes
+ \firststagestartTABLE}
+
+\def\stoptabel%
+ {\TABLEtail
+ \global\let\TABLEhead\empty
+ \global\let\TABLEtail\empty
+ \finishTABLE
+ \ifinsidefloat\else
+ \stopbaselinecorrection % \outer..
+ \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}
+
+\def\dodefinetabletemplate[#1][#2][#3][#4]%
+ {\ifsecondargument
+ \setgvalue{\c!Table#1}%
+ {\gdef\TABLEhead{\getvalue{@@TABLEhead#3}}%
+ \gdef\TABLEtail{\getvalue{@@TABLEtail#4}}%
+ \complexsecondstagestartTABLE[#2]}%
+ \fi
+ \egroup}
+
+\def\definetabletemplate%
+ {\bgroup
+ \catcode`\|=\@@other
+ \doquadrupleempty\dodefinetabletemplate}
+
+%D The optional third and fourth arguments define which table
+%D head and tail to use.
+%D
+%D \starttype
+%D \definetabletemplate[test][|||][before][after]
+%D \stoptypen
+%D
+%D This also means that one can define table heads and tails
+%D by name!
+%D
+%D \starttablehead[before]
+%D \HL \VL first \VL second \VL \SR \HL
+%D \stoptablehead
+%D
+%D Templates defined this way get protected names, that cannot
+%D conflict with existing commands.
+%D
+%D \showsetup{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}
+
+\def\complexsecondstagestartTABLE#1[#2]%
+ {\convertargument|\to\asciiA
+ \convertargument#2\to\asciiB
+ \doifinstringelse{\asciiA}{\asciiB}
+ {\gdef\restartTABLE%
+ {\gdef\restartTABLE{\thirdstagestartTABLE{#2}}%
+ \prepareTABLEsplitting
+ \restartTABLE
+ \TABLEhead}}
+ {\doifdefinedelse{\c!Table#2}
+ {\gdef\restartTABLE%
+ {\getvalue{\c!Table#2}}}
+ {\gdef\restartTABLE%
+ {\gdef\restartTABLE{\getvalue{#2}}%
+ \prepareTABLEsplitting
+ \restartTABLE
+ \TABLEhead}}}%
+ \restartTABLE}
+
+%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}}}
+
+\let\@@TABLEhead\empty \def\TABLEhead{\@@TABLEhead}
+\let\@@TABLEtail\empty \def\TABLEtail{\@@TABLEtail}
+
+\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\setTABLEhead##1\noexpand\end}}
+
+\expanded
+ {\def\csname\e!start\e!tabelstaart\endcsname##1\csname\e!stop\e!tabelstaart\endcsname%
+ {\noexpand\setTABLEtail##1\noexpand\end}}
+
+% \def\setTABLEhead{\dosingleempty\dosetTABLEhead}
+% \def\setTABLEtail{\dosingleempty\dosetTABLEtail}
+
+% \def\dosetTABLEhead[#1]#2\end{\setvalue{@@TABLEhead#1}{#2}}
+% \def\dosetTABLEtail[#1]#2\end{\setvalue{@@TABLEtail#1}{#2}}
+
+%D The second argument is a dummy one, by scanning for it, we
+%D get rid of interfering spaces.
+
+\def\setTABLEhead{\dodoubleempty\dosetTABLEhead}
+\def\setTABLEtail{\dodoubleempty\dosetTABLEtail}
+
+\def\dosetTABLEhead[#1][#2]#3\end{\setvalue{@@TABLEhead#1}{#3}}
+\def\dosetTABLEtail[#1][#2]#3\end{\setvalue{@@TABLEtail#1}{#3}}
+
+%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
+ \global\advance\TABLEmaxheight by -\dp\strutbox
+ \ifdim\prevdepth<\maxdimen\ifdim\prevdepth>\!!zeropoint
+ \global\advance\TABLEmaxheight by -\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 next one is used in \type{\VL} cum suis and honours
+%D the next grouping.
+
+\def\docomplexorsimpleTable#1#2%
+ {\ifx\next\bgroup\@EA#2\else\@EA\dodocomplexorsimpleTable\@EA#1\@EA#2\fi}
+
+\def\dodocomplexorsimpleTable#1#2#3%
+ {\if[\noexpand#3\@EA#1\else\@EA#2\fi#3}
+
+%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
+ \finishTABLErow
+ \fi}
+
+\def\finishTABLErow%
+ {\crcr
+ \TABLEnoalign
+ {\nobreak
+ \setTABLEaction\TABLEunknown
+ \setTABLEerror\TABLEunknown
+ \global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty
+ \global\currentTABLEcolumn=0 }}
+
+\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 \macros
+%D {ifcheckTABLEcolums}
+%D
+%D
+%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). By default
+%D checking is off.
+
+\newif\ifcheckTABLEcolumns
+
+\let\beforeTABLEline=\empty
+\let\afterTABLEline =\empty
+
+\def\doendTABLErow#1#2#3%
+ {\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}
+
+\def\endTABLErow#1#2#3%
+ {\setTABLEaction#1%
+ \ifTABLEgrayline
+ \finishTABLErow
+ \else
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \doendTABLErow{#1}{#2}{#3}%
+ \else\ifcheckTABLEcolumns
+ \setTABLEerror\TABLEmissingcolumn
+ \handleTABLEerror
+ \else
+ \doendTABLErow{#1}{#2}{#3}%
+ \fi\fi
+ \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\relax
+ \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\doTableVL%
+ {\futurelet\next\dodoTableVL}
+
+\def\dodoTableVL%
+ {\docomplexorsimpleTable\complexTableVL\simpleTableVL}
+
+\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\doTableVC%
+ {\futurelet\next\dodoTableVC}
+
+\def\dodoTableVC%
+ {\docomplexorsimpleTable\complexTableVC\simpleTableVC}
+
+\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{\DV}} (\type{\VD})
+%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\DV=\TableDV
+ \let\VD=\TableDV
+ \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 1 % was 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\TableDV%
+ {\TableDCV\normalTABLEsimplebar}
+
+\def\TableDC%
+ {\TableDCV\normalTABLEquote}
+
+\def\TableDCV#1%
+ {\checkTABLEdivision
+ \checkTABLEautorow
+ \ifnum\currentTABLEcolumn>\maxTABLEcolumn
+ \setTABLEerror\TABLEmissingrow
+ \handleTABLEerror
+ \else
+ \global\advance\currentTABLEcolumn by 1
+ #1%
+ \fi}
+
+\def\TableDR%
+ {\ifnum\currentTABLEcolumn<\maxTABLEcolumn % silent recovery
+ \setTABLEerror\TABLEmissingcolumn % some day warning
+ \handleTABLEerror
+ \else
+ \global\currentTABLEcolumn=0 % nog check
+ \normalTABLElineending
+ \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
+
+% definieer: \BC \BL
+% herhaal: \BR
+% definieer: \CL \RL (eerste \CL[green] = hele row! / \CL[1,green])
+% dus: \CL en \RL mix tussen \HL en \BL
+
+\def\defineTABLEbackgrounds%
+ {\let\BC =\TableBC
+ \let\BL =\TableBL
+ \let\BR =\TableBR
+ \let\BACKGROUND=\TableBR
+ \let\CL =\TableCL
+ \let\RL =\TableRL
+ \let\COLOR =\TableCOLOR
+ \let\RASTER =\TableRASTER
+ \global\let\lastTABLEc=\@@tiachtergrondkleur
+ \global\let\lastTABLEr=\@@tiachtergrondraster
+ \doifinsetelse{\@@tiachtergrond}{c,color}
+ {\global\chardef\TABLEcr=1}
+ {\global\chardef\TABLEcr=2}}
+
+\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\CL=\doTableCL
+ \let\RL=\doTableRL
+ \let\BC=\doTableBC
+ \doTableBL}
+
+\def\doTableBL%
+ {\complexorsimpleTable{BL}}
+
+\def\simpleTableBL%
+ {\complexTableBL[,]}
+
+\def\complexTableBL[#1]%
+ {\analyzeTABLEcr[#1]%
+ \handleTABLEcr}
+
+\def\TableBR#1%
+ {\TABLEnoalign
+ {\global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \checkTABLEgrayline#1\BR
+ \global\TABLEgraylinetrue}}
+
+\def\analyzeTABLEcr[#1]%
+ {\doanalyzeTABLEcr[#1,,]}
+
+\def\doanalyzeTABLEcr[#1,#2,#3]%
+ {\doifnumberelse{#1x} % x ???????????????
+ {\dodoanalyzeTABLEcr[#1,#2,#3]}
+ {\dodoanalyzeTABLEcr[1,#1,#2]}}
+
+\def\dodoanalyzeTABLEcr[#1,#2,#3]%
+ {\global\chardef\TABLEn=#1\relax
+ \processaction
+ [#2]
+ [ c=>\global\chardef\TABLEcr=1,
+ color=>\global\chardef\TABLEcr=1,
+ r=>\global\chardef\TABLEcr=2,
+ raster=>\global\chardef\TABLEcr=2]%
+ \ifcase\TABLEcr \or
+ \doifnot{#3}{}{\xdef\lastTABLEc{#3}}%
+ \or
+ \doifnot{#3}{}{\xdef\lastTABLEr{#3}}%
+ \fi}
+
+\def\handleTABLEcr%
+ {\relax % else funny side effect
+ \ifcase\TABLEcr
+ % Can't happen!
+ \or
+ \addtoTABLEgrayline{\complexTableCOLOR[\the\TABLEn,\lastTABLEc]}%
+ \else
+ \addtoTABLEgrayline{\complexTableRASTER[\the\TABLEn,\lastTABLEr]}%
+ \fi
+ \gobbleTableBCL}
+
+\def\analyzeTABLEcrl#1[#2]%
+ {\doanalyzeTABLEcrl#1[#2,,]}
+
+\def\doanalyzeTABLEcrl#1[#2,#3,#4]%
+ {\doifnumberelse{#2x} % x ????????????????????
+ {\dodoanalyzeTABLEcr[#2,#1,#3]}
+ {\dodoanalyzeTABLEcr[\ifTABLEgrayline1\else\maxTABLEcolumn\fi,#1,#2]}}
+
+\def\TableCL%
+ {\TABLEnoalign\bgroup
+ \global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \let\BL=\doTableBL
+ \let\CL=\doTableCL
+ \let\RL=\doTableRL
+ \let\BC=\doTableBC
+ \doTableCL}
+
+\def\doTableCL%
+ {\complexorsimpleTable{CL}}
+
+\def\simpleTableCL% nog eens \"e\"en lijn van maken
+ {\BL[\the\maxTABLEcolumn,c,\lastTABLEc]}
+
+\def\complexTableCL[#1]%
+ {\analyzeTABLEcrl{c}[#1]%
+ \handleTABLEcr}
+
+\def\TableRL%
+ {\TABLEnoalign\bgroup
+ \global\let\nextTABLEgrayline=\executeTABLEgrayline
+ \let\BL=\doTableBL
+ \let\CL=\doTableCL
+ \let\RL=\doTableRL
+ \let\BC=\doTableBC
+ \doTableRL}
+
+\def\doTableRL%
+ {\complexorsimpleTable{RL}}
+
+\def\simpleTableRL%
+ {\BL[\the\maxTABLEcolumn,r,\lastTABLEr]}
+
+\def\complexTableRL[#1]%
+ {\analyzeTABLEcrl{r}[#1]%
+ \handleTABLEcr}
+
+\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\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}
+
+% kan simpeler
+
+\def\docomplexTableCOLOR[#1]%
+ {\dodocomplexTableGL\localstartcolor\localstopcolor
+ [#1,\lastTABLEc,,]}
+
+\gdef\docomplexTableRASTER[#1]%
+ {\dodocomplexTableGL\localstartraster\localstopraster
+ [#1,\lastTABLEr,,]}
+
+\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}
+
+\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\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{\switchtobodyfont[\@@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\bodyfontsize,
+ \c!commandos=,
+ \c!achtergrond=\v!raster,
+ \c!achtergrondraster=\@@rsraster,
+ \c!achtergrondkleur=]
+
+\def\ifintabel{\ifintable} % upward compatible
+
+\protect \endinput
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
new file mode 100644
index 000000000..f0692033f
--- /dev/null
+++ b/tex/context/base/core-tbl.tex
@@ -0,0 +1,638 @@
+%D \module
+%D [ file=core-tbl,
+%D version=1998.11.03,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Text Flow Tabulation,
+%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 / Tabulation}
+
+\unprotect
+
+% |p2|p3| 2:3
+% spanning
+
+% In-text tabbing environment
+%
+% \starttabulate[| separated template] % eg [|l|p|] or [|l|p|p|]
+% \NC ... \NC ... \NC\NR
+% \stoptabulate
+%
+% with: two pass auto width calculation when no p-width
+% specified, even with multiple p's, see examples.
+
+% TaBlE compatible specifications:
+%
+% l align column/paragraph left
+% r align column/paragraph right
+% c align column/paragraph center
+% p p(dimen) of automatisch als alleen p
+% w column width
+% f font#1
+% B bold
+% I italic
+% S slanted
+% T type
+% R roman
+% m math
+% M display math
+% h hook (inner level or par lines)
+% b before (may be command#1)
+% a after
+% i i<n> skip left of column
+% j i<n> skip right of column
+% k i<n> skip around column
+
+% Still to be done
+
+% nesting, push en pop gebruiken
+
+% N math numbers (best hook into existing digits mechanism)
+% n numbers (best hook into existing digits mechanism)
+% Q math numbers (best hook into existing digits mechanism)
+% q numbers (best hook into existing digits mechanism)
+% ~ \hskip.5em
+% | check
+
+% 10 evt auto stack; dan wel andere signal dan void nodig
+
+% present but not yet 100% ok
+%
+% \FL top hrule
+% \ML mid hrule (with auto split)
+% \LL bottom hrule
+% \HL
+
+% \VL as soon as needed
+% color as soon as needed
+
+% \EQ \RQ \HQ equal (raw, hook)
+% \NC \RC \HC normal (raw, hook)
+%
+% \NR
+
+% tricky: align scans ahead, over # and expands ones before
+% while doing
+
+\newtoks\tabulatepreamble
+\newtoks\tabulatebefore
+\newtoks\tabulateafter
+\newtoks\tabulatebmath
+\newtoks\tabulateemath
+\newtoks\tabulatefont
+\newtoks\tabulatesettings
+
+\newtoks\tabulatedummy
+
+\newcounter\nofautotabulate
+\newif \ifautotabulate
+\newbox \tabulatebox
+\newcounter\tabulatecolumns
+\newif \ifsplittabulate \splittabulatetrue
+\newdimen \tabulatepwidth
+\newdimen \tabulatewidth
+\newdimen \tabulateunit
+\newif \iftabulateequal
+
+\def\noftabcolumns{10} % quick and dirty stack
+
+\def\@@tabbox@@ {@@tabbox@}
+\def\@@tabhook@@{@@tabhook@}
+
+\dorecurse\noftabcolumns
+ {\@EA\newbox\csname\@@tabbox@@\recurselevel\endcsname}
+
+\def\checktabulatehook%
+ {\ifnum\tabulatetype<2
+ \let\tabulatehook\relax
+ \fi}
+
+\def\dodosettabulatepreamble#1#2%
+ {\ifdim\tabulatewidth=\!!zeropoint\relax
+ \ifcase\tabulatemodus\relax
+ \let\preamblebox\empty
+ \else
+ \def\preamblebox{\autotabulatetrue}%
+ \fi
+ \else
+ \ifcase\tabulatemodus\relax
+ \edef\preamblebox{\hbox to \the\tabulatewidth}%
+ \else
+ \edef\preamblebox{\hsize\the\tabulatewidth}%
+ \fi
+ \fi
+ % 0 = NC column next EQ equal column
+ % 1 = RC column raw RQ equal column raw
+ % 2 = HC column hook HQ equal column hook
+ \@EA\appendtoks \@EA&\@EA\hskip\pretabskip##&\to\!!toksa
+ \@EA\appendtoks\@EA\xdef\@EA\tabulatecolumn\@EA{\tabulatecolumns}\to\!!toksa
+ \@EA\appendtoks \preamblebox\to\!!toksa
+ \appendtoks \bgroup\bbskip\bgroup#1\to\!!toksa
+ \appendtoks \checktabulatehook\to\!!toksa
+ \appendtoks\ifnum\tabulatetype=1 \else \to\!!toksa
+ \@EA\appendtoks \the\tabulatebmath\to\!!toksa
+ \@EA\appendtoks \the\tabulatefont\to\!!toksa
+ \@EA\appendtoks \the\tabulatesettings\to\!!toksa
+ \@EA\appendtoks \the\tabulatebefore\to\!!toksa
+ \appendtoks\fi \to\!!toksa
+ \appendtoks \bgroup\ignorespaces\to\!!toksa
+ \appendtoks \tabulatehook##\to\!!toksa
+ \appendtoks \unskip\unskip\egroup\to\!!toksa
+ \appendtoks\ifnum\tabulatetype=1 \else \to\!!toksa
+ \@EA\appendtoks \the\tabulateafter\to\!!toksa
+ \@EA\appendtoks \the\tabulateemath\to\!!toksa
+ \appendtoks\fi \to\!!toksa
+ \appendtoks #2\egroup\egroup\to\!!toksa
+ \@EA\appendtoks \@EA&\@EA\hskip\postabskip##\to\!!toksa
+ \appendtoks\NC\to\tabulatedummy
+ \let\bbskip\empty
+ \def\pretabskip{.5\tabulateunit}%
+ \def\postabskip{.5\tabulateunit}%
+ \let\gettabulateexit\dogettabulateexit
+ \tabulatewidth\!!zeropoint}
+
+\def\dosettabulatepreamble%
+ {\ifx\next\relax
+ \let\nextnext\relax
+ \else
+ \let\nextnext\settabulatepreamble
+ \ifx l\next
+ \chardef\tabulatealign=1
+ \else\ifx r\next
+ \chardef\tabulatealign=2
+ \else\ifx c\next
+ \chardef\tabulatealign=3
+ \else\ifx p\next
+ \let\nextnext\gettabulateparagraph
+ \else\ifx w\next
+ \let\nextnext\gettabulatewidth
+ \else\ifx f\next
+ \let\nextnext\gettabulatefont
+ \else\ifx B\next
+ \tabulatefont{\bf}%
+ \else\ifx I\next
+ \tabulatefont{\it}%
+ \else\ifx S\next
+ \tabulatefont{\sl}%
+ \else\ifx T\next
+ \tabulatefont{\tt}%
+ \else\ifx R\next
+ \tabulatefont{\rm}%
+ \else\ifx m\next
+ \tabulatebmath{$}%
+ \tabulateemath{$}%
+ \else\ifx M\next
+ \tabulatebmath{$\displaystyle}%
+ \tabulateemath{$}%
+ \else\ifx h\next
+ \let\nextnext\gettabulatehook
+ \else\ifx b\next
+ \let\nextnext\gettabulatebefore
+ \else\ifx a\next
+ \let\nextnext\gettabulateafter
+ \else\ifx i\next
+ \let\nextnext\gettabulatepreskip
+ \else\ifx j\next
+ \let\nextnext\gettabulateposskip
+ \else\ifx k\next
+ \let\nextnext\gettabulatepreposskip
+ \else\ifx X\next
+ \let\nextnext\gettabulateexit
+ \else\ifx e\next
+ \appendtoks\global\tabulateequaltrue\to\tabulatesettings
+ \else\ifx ~\next
+ \appendtoks\fixedspaces\to\tabulatesettings
+ \else
+ \message{unknown preamble key [\meaning\next]}%
+ \fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
+ \fi
+ \nextnext}
+
+\def\dogettabulateexit%
+ {\let\postabskip\!!zeropoint
+ \settabulatepreamble}
+
+\let\gettabulateexit\dogettabulateexit
+
+\def\gettabulatepreskip#1%
+ {\doifnumberelse{#1}
+ {\dimen0=#1\tabulateunit\let\next\empty}
+ {\dimen0=.5\tabulateunit\def\next{#1}}%
+ \edef\pretabskip{\the\dimen0}%
+ \@EA\settabulatepreamble\next}
+
+\def\gettabulateposskip#1%
+ {\doifnumberelse{#1}
+ {\dimen0=#1\tabulateunit\let\next\empty}
+ {\dimen0=.5\tabulateunit\def\next{#1}}%
+ \edef\postabskip{\the\dimen0}%
+ \let\gettabulateexit\settabulatepreamble
+ \@EA\settabulatepreamble\next}
+
+\def\gettabulatepreposskip#1%
+ {\doifnumberelse{#1}
+ {\dimen0=#1\tabulateunit\let\next\empty}
+ {\dimen0=.5\tabulateunit\def\next{#1}}%
+ \edef\pretabskip{\the\dimen0}%
+ \edef\postabskip{\the\dimen0}%
+ \let\gettabulateexit\settabulatepreamble
+ \@EA\settabulatepreamble\next}
+
+\def\gettabulatehook#1%
+ {\setvalue{\@@tabhook@@\tabulatecolumns}{#1}%
+ \settabulatepreamble}
+
+\def\gettabulatebefore#1%
+ {\tabulatebefore{#1}%
+ \settabulatepreamble}
+
+\def\gettabulateafter#1%
+ {\tabulateafter{#1}%
+ \settabulatepreamble}
+
+\def\gettabulatefont#1%
+ {\tabulatefont{#1}%
+ \settabulatepreamble}
+
+\def\gettabulatewidth%
+ {\chardef\tabulatemodus=0
+ \doifnextcharelse{(}
+ {\chardef\tabulatedimen=0
+ \dogettabulatewidth}
+ {\chardef\tabulatedimen=0
+ \settabulatepreamble}}
+
+\def\gettabulateparagraph%
+ {\doifnextcharelse{(}
+ {\chardef\tabulatemodus=1
+ \chardef\tabulatedimen=1
+ \dogettabulatewidth}
+ {\chardef\tabulatemodus=2
+ \chardef\tabulatedimen=0
+ \settabulatepreamble}}
+
+\def\dogettabulatewidth(#1)%
+ {\tabulatewidth=#1\relax
+ \ifnum\tabulatedimen=1
+ \global\advance\tabulatepwidth\tabulatewidth
+ \fi
+ \settabulatepreamble}
+
+\def\settabulatepreamble%
+ {\afterassignment\dosettabulatepreamble\let\next=}
+
+\def\tabulateraggedright {\ifnum\tabulatetype=1 \else\raggedright \fi}
+\def\tabulateraggedcenter{\ifnum\tabulatetype=1 \else\raggedcenter\fi}
+\def\tabulateraggedleft {\ifnum\tabulatetype=1 \else\raggedleft \fi}
+\def\tabulatehss {\ifnum\tabulatetype=1 \else\hss \fi}
+
+\def\nexttabulate#1|%
+ {\chardef\tabulatealign=0
+ \chardef\tabulatemodus=0
+ \chardef\tabulatedimen=0
+ \tabulatebefore{}%
+ \tabulateafter{}%
+ \tabulatebmath{}%
+ \tabulateemath{}%
+ \tabulatefont{}%
+ \tabulatesettings{}%
+ \doglobal\increment\tabulatecolumns
+ \settabulatepreamble#1\relax\relax % permits i without n
+ \ifcase\tabulatemodus\relax
+ \ifcase\tabulatealign\relax
+ \dodosettabulatepreamble\empty \tabulatehss \or
+ \dodosettabulatepreamble\empty \tabulatehss \or
+ \dodosettabulatepreamble\tabulatehss\empty \or
+ \dodosettabulatepreamble\tabulatehss\tabulatehss \fi
+ \or % fixed width
+ \ifcase\tabulatealign\relax
+ \dodosettabulatepreamble \bskip \eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedright }\eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedleft }\eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedcenter}\eskip \fi
+ \or % auto width
+ \doglobal\increment\nofautotabulate\relax
+ \ifcase\tabulatealign\relax
+ \dodosettabulatepreamble \bskip \eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedright }\eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedleft }\eskip \or
+ \dodosettabulatepreamble{\bskip\tabulateraggedcenter}\eskip \fi
+ \fi
+ \futurelet\next\donexttabulate}
+
+\def\donexttabulate%
+ {\ifx\next\relax\else
+ \expandafter\nexttabulate
+ \fi}
+
+\def\splitofftabulatebox%
+ {\mindermeldingen
+ \@EA\setbox\@EA\tabulatebox\@EA\vsplit\csname\@@tabbox@@\tabulatecolumn\endcsname
+ to \lineheight
+ \setbox\tabulatebox=\vbox{\unvbox\tabulatebox}%
+ \setbox\tabulatebox=\hbox to \wd\tabulatebox
+ {\hss\dotabulatehook{\box\tabulatebox}\hss}%
+ \ht\tabulatebox=\ht\strutbox
+ \dp\tabulatebox=\dp\strutbox
+ \box\tabulatebox}
+
+\def\dotabulatehook%
+ {\getvalue{\@@tabhook@@\tabulatecolumn}}
+
+% \definetabulate
+% \redefinetabulate
+% \starttabulate[preamble]
+% \starttabulate -> \starttabulate[|l|p|]
+
+\def\definetabulate%
+ {\dotripleempty\dodefinetabulate}
+
+\def\dodefinetabulate[#1][#2][#3]%
+ {\ifthirdargument
+ \doifundefined{\??tt#1::\c!eenheid}
+ {\copyparameters
+ [\??tt#1::][\??tt\e!tabulate::]
+ [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,EQ]}%
+ \copyparameters
+ [\??tt#1::#2][\??tt#1::]%
+ [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,EQ]%
+ \setvalue{\e!start#1::#2}{\dofinalstarttabulate[#1][#2][#3]}%
+ \setvalue{\e!start#1}{\bgroup\dosubstarttabulate[#1]}%
+ \else\ifsecondargument
+ \definetabulate[#1][][#2]%
+ \else
+ \definetabulate[#1][][|l|p|]%
+ \fi\fi}
+
+\def\dosubstarttabulate%
+ {\dodoubleempty\dodosubstarttabulate}
+
+\def\dodosubstarttabulate[#1][#2]%
+ {\getvalue{\e!start#1::\ifundefined{\e!start#1::#2}\else#2\fi}}
+
+\setvalue{\e!start\e!tabulate}%
+ {\dodoubleempty\donormalstarttabulate}
+
+\def\donormalstarttabulate[#1][#2]%
+ {\bgroup
+ \ifsecondargument
+ \getparameters[\??tt\e!tabulate::][#2]%
+ \fi
+ \iffirstargument
+ \def\next{\dofinalstarttabulate[\e!tabulate][][#1]}%
+ \else
+ \def\next{\dofinalstarttabulate[\e!tabulate][][|l|p|]}%
+ \fi
+ \next}
+
+\def\dofinalstarttabulate[#1][#2][#3]% identifier sub preamble
+ {\edef\currenttabulate{#1::#2}%
+ \ifinsidefloat \else
+ \witruimte
+ \getvalue{\??tt\currenttabulate\c!voor}%
+ \fi
+ \bgroup
+ \getvalue{\??tt\currenttabulate\c!binnen}%
+ \dimen0=\leftskip
+ \advance\dimen0 by \hangindent
+ \doifvalue{\??tt\currenttabulate\c!inspringen}{\v!ja}
+ {\advance\dimen0 by \parindent}% \voorwit}%
+ \edef\tabulateindent{\the\dimen0}%
+ \!!toksb{}%
+ \def\dorepeat*##1##2%
+ {\dorecurse{##1}{\appendtoks##2\to\!!toksb}\do}%
+ \def\do%
+ {\futurelet\next\dodo}%
+ \def\dodo%
+ {\ifx\next\relax
+ % exit
+ \else\ifx*\next
+ \let\next\dorepeat
+ \else\ifx\bgroup\next
+ \let\next\dododo
+ \else
+ \let\next\dodododo
+ \fi\fi\fi
+ \next}%
+ \def\dododo##1%
+ {\appendtoks{##1}\to\!!toksb\do}%
+ \def\dodododo##1%
+ {\appendtoks##1\to\!!toksb\do}%
+ \xdef\tabulatecolumn{0}%
+ \do#3\relax
+ \processcontent
+ {\e!stop#1}% \currenttabulate}
+ \tabulatecontent
+ {\@EA\processtabulate\@EA[\the\!!toksb]}}
+
+\chardef\tabulatetype=0
+
+% 0 = NC column next EQ equal column
+% 1 = RC column raw RQ equal column raw
+% 2 = HC column hook HQ equal column hook
+
+\def\tabulateEQ%
+ {\getvalue{\??tt\currenttabulate EQ}\global\tabulateequalfalse}
+
+\def\tabulatenormalcolumn#1%
+ {&\iftabulateequal\tabulateEQ\fi&\global\chardef\tabulatetype=#1&}
+
+\def\tabulateequalcolumn#1%
+ {&\tabulateEQ&\global\chardef\tabulatetype=#1&}
+
+\def\tabulateautocolumn%
+ {\tabulatenormalcolumn0\relax
+ \ifnum\tabulatecolumn>\tabulatecolumns\relax
+ \expandafter\NR
+ \else
+ \expandafter\ignorespaces % interferes with the more tricky hooks
+ \fi}
+
+\def\setquicktabulate#1% see \startlegend \startgiven
+ {\let#1=\tabulateautocolumn
+ \let\\=\tabulateautocolumn}
+
+\def\processtabulate[|#1|]%
+ {\tabulateunit=\getvalue{\??tt\currenttabulate\c!eenheid}%
+ \let\pretabskip\!!zeropoint
+ \def\postabskip{.5\tabulateunit}%
+ \doglobal\newcounter\tabulatecolumns
+ \doglobal\newcounter\nofautotabulate
+ \doglobal\newcounter\noftabulatelines
+ \global\tabulatepwidth=\!!zeropoint
+ \global\tabulateequalfalse
+ \def\NC{\tabulatenormalcolumn0}%
+ \def\RC{\tabulatenormalcolumn1}%
+ \def\HC{\tabulatenormalcolumn2}%
+ \def\EQ{\tabulateequalcolumn 0}%
+ \def\RQ{\tabulateequalcolumn 1}%
+ \def\HQ{\tabulateequalcolumn 2}%
+ \def\NR% next row
+ {\doglobal\increment\noftabulatelines
+ \global\tabulateequalfalse
+ \xdef\tabulatecolumn{0}%
+ \unskip\unskip\crcr\flushtabulated}%
+ \let\HL\empty
+ \let\FL\empty
+ \let\ML\empty
+ \let\LL\empty
+ \global\let\flushtabulated\empty
+ \let\savedbar=|\let|\nexttabulate
+ \tabskip\!!zeropoint
+ \!!toksa{&\hbox to \tabulateindent{}##\strut&##}%
+ \tabulatewidth\!!zeropoint
+ |#1X|\relax
+ \appendtoks&##\to\!!toksa
+ \appendtoks\doglobal\increment\tabulatecolumn\to\!!toksa
+ \appendtoks\NC\unskip\unskip\crcr\flushtabulated\to\tabulatedummy % no count
+ \xdef\tabulatecolumn{0}%
+ \def\bskip%
+ {\setbox\tabulatebox=\vbox\bgroup
+ \global\let\tabulatehook\empty}%
+ \def\eskip
+ {\egroup
+ \global\let\tabulatehook\dotabulatehook}%
+ \let|\savedbar
+ \global\let\tabulatehook\dotabulatehook
+ \doifvalue{\??tt\currenttabulate\c!inspringen}{\v!nee}
+ {\forgetparindent}%
+ \ifinsidefloat
+ \let\tabulateindent\!!zeropoint
+ \else
+ \setlocalhsize \hsize=\localhsize
+ \fi
+ \mindermeldingen
+ \forgetall
+ \ifnum\nofautotabulate>0
+ \setbox0=\ruledvbox
+ {\let\tabulateindent\!!zeropoint\@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}}%
+ \tabulatewidth\hsize
+ \advance\tabulatewidth by -\wd0
+ \advance\tabulatewidth by -\tabulatepwidth
+ \ifnum\nofautotabulate>0
+ \divide\tabulatewidth by \nofautotabulate\relax
+ \fi
+ \fi
+ \ifsplittabulate
+ \splittopskip\ht\strutbox
+ \global\let\flushtabulatedindeed\empty
+ \long\def\bbskip%
+ {\@EA\ifvoid\csname\@@tabbox@@\tabulatecolumn\endcsname
+ \ifx\flushtabulatedindeed\empty\else
+ \setbox0\hbox
+ \fi
+ \fi}%
+ \def\bskip%
+ {\@EA\ifvoid\csname\@@tabbox@@\tabulatecolumn\endcsname
+ \@EA\global\@EA\setbox\csname\@@tabbox@@\tabulatecolumn\endcsname=\vbox
+ \bgroup
+ \global\let\tabulatehook\empty
+ \ifautotabulate\hsize\tabulatewidth\fi
+ %\begstrut % interferes with pre-\pars
+ \ignorespaces
+ \def\eskip%
+ {\egroup
+ \global\let\tabulatehook\dotabulatehook
+ \splitofftabulatebox}%
+ \else
+ \let\eskip\empty
+ \mindermeldingen
+ \global\let\tabulatehook\dotabulatehook
+ \expandafter\splitofftabulatebox
+ \fi}%
+ \gdef\flushtabulated%
+ {\noalign % no interference !
+ {\global\let\flushtabulatedindeed\empty
+ \dorecurse\noftabcolumns
+ {\@EA\ifvoid\csname\@@tabbox@@\recurselevel\endcsname\else
+ \gdef\flushtabulatedindeed{\the\tabulatedummy}%
+ \fi}}%
+ \flushtabulatedindeed}%
+ \else
+ % tabhook op alles ?
+ \def\bskip%
+ {\vtop\bgroup
+ \ifautotabulate\hsize\tabulatewidth\fi
+ %\begstrut % interferes with pre-\pars
+ \ignorespaces}%
+ \def\eskip%
+ {\egroup}%
+ \fi
+ \let\totalnoftabulatelines\noftabulatelines
+ \doglobal\newcounter\noftabulatelines
+ \def\HL{\TABLEnoalign
+ {\ifnum\noftabulatelines=0 \FL
+ \else\ifnum\noftabulatelines<\totalnoftabulatelines\relax \ML
+ \else \LL
+ \fi\fi}}%
+ \def\tablebaselinecorrection
+ {\def\dobaselinecorrection
+ {\vskip-\prevdepth
+ \vskip\dp\strutbox
+ \vskip\dp\strutbox}%
+ \baselinecorrection}%
+ \def\FL{\TABLEnoalign
+ {\ifinsidefloat\else
+ \doifvaluenothing{\??tt\currenttabulate\c!voor}
+ {\tablebaselinecorrection}%
+ \fi
+ \hrule \!!height .2pt \!!depth .2pt
+ \nobreak
+ \vskip\dp\strutbox
+ \nobreak}}%
+ \def\ML{\TABLEnoalign
+ {\vskip\dp\strutbox
+ \hrule \!!height .2pt \!!depth .2pt
+ \vskip\topskip\allowbreak\vskip-\topskip\vskip-.4pt
+ \hrule \!!height .2pt \!!depth .2pt
+ \vskip\dp\strutbox}}%
+ \def\LL{\TABLEnoalign
+ {\nobreak
+ \vskip\dp\strutbox
+ \nobreak
+ \hrule \!!height .2pt \!!depth .2pt
+ \ifinsidefloat\else
+ \doifvaluenothing{\??tt\currenttabulate\c!na}
+ {\vskip\dp\strutbox
+ \vbox{\strut}
+ \vskip-\lineheight}%
+ \fi}}%
+ %\def\FL{\dotoptextrule {}}%
+ %\def\ML{\domiddletextrule{}}%
+ %\def\LL{\dobottomtextrule {}}%
+ \@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}%
+ \egroup
+ \ifinsidefloat \else
+ \getvalue{\??tt\currenttabulate\c!na}%
+ \fi
+ \egroup}
+
+\def\setuptabulate%
+ {\dotripleempty\dosetuptabulate}
+
+\def\dosetuptabulate[#1][#2][#3]%
+ {\ifthirdargument
+ \getparameters[\??tt#1::#2][#3]%
+ \else\ifsecondargument
+ \getparameters[\??tt#1::][#2]%
+ \else
+ \getparameters[\??tt\e!tabulate::][#1]%
+ \fi\fi}
+
+\setuptabulate
+ [\c!eenheid=1em,
+ EQ={:},
+ \c!binnen=,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!inspringen=\v!nee]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index 817f7117e..d534a387e 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -1,23 +1,60 @@
-%D \module
-%D [ file=core-var,
-%D version=1998.02.21,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Variables,
-%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 / Variables}
-
-\unprotect
-
-\newtoks\everyshipout
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=core-var,
+%D version=1998.02.21,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Variables,
+%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 / Variables}
+
+\unprotect
+
+\newevery \everyshipout \relax
+\newevery \everybeforeshipout \relax
+\newevery \everyaftershipout \relax
+\newevery \everylastshipout \relax
+\newevery \everybye \relax
+\newevery \everystarttext \relax
+\newevery \everystoptext \relax
+\newevery \everypagebody \relax
+
+%D \macros
+%D {fastmode}
+%D
+%D The command \type {\fastmode} disables some time consuming
+%D typesetting.
+
+\newevery \everyfastmode \relax
+
+\newif\iffastmode
+
+\def\fastmode%
+ {\fastmodetrue
+ \the\everyfastmode}
+
+%D \macros
+%D {pdfoutput}
+%D
+%D There are some fundamental differences between producing
+%D \DVI\ and \PDF\ output, especially when we use \PDFTEX, like
+%D object reuse, one pass graphic inclusion and the lack of a
+%D postprocessing stage. Because we must make sure that
+%D \CONTEXT\ knows what it's up to, we always default to \DVI\
+%D mode, even when users explicitly ask for \PDF\ output in the
+%D \PDFTEX\ configuration file.
+
+\ifx\pdfoutput\undefined \else
+
+ \prependtoks \pdfoutput=0 \to \everyjob
+
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index d5838f695..8be6c643a 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -1,683 +1,726 @@
-%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\prettyidentifier {TEX}
-\def\prettypalet {}
-
-\def\setupprettiesintype#1%
- {\edef\prettyidentifier{#1}%
- \doifinstringelse{\prettyidentifier}{tex,TEX}
- {\def\prettyidentifier{TEX}}
- {\doifinstringelse{\prettyidentifier}{perl,pl,PERL,PL}
- {\def\prettyidentifier{PL}}
- {\doifinstringelse{\prettyidentifier}{metapost,mp,metafont,mf,METAPOST,MP,METAFONT,MF}
- {\def\prettyidentifier{MP}}
- {\doifinstringelse{\prettyidentifier}{javascript,js,java,jv,JAVASCRIPT,JS,JAVA,JV}
- {\def\prettyidentifier{JV}}
- {\def\prettyidentifier{TEX}}}}}%
- \doifundefined{setuppretty\prettyidentifier type}%
- {\setbox0=\hbox % get rid of spaces when in-line \newpretty loading
- {\restorecatcodes % also needed when loading during \newpretty
- \readsysfile{verb-\prettyidentifier.tex}{}{}}}%
- \doifdefinedelse{setuppretty\prettyidentifier type}%
- {\def\setupprettytype{\getvalue{setuppretty\prettyidentifier type}}}
- {\let\setupprettytype=\relax}}
-
-\installnewpretty M {\setupprettiesintype{MP}\setupprettytype}
-\installnewpretty P {\setupprettiesintype{PL}\setupprettytype}
-\installnewpretty T {\setupprettiesintype{TEX}\setupprettytype}
-\installnewpretty J {\setupprettiesintype{JV}\setupprettytype}
-
-\def\setupcommonverbatim#1%
- {\def\verbatimfont {\tttf}%
- \def\prettyidentifierfont {\ttsl}%
- \def\prettyvariablefont {}%
- \def\prettyidentifier {TEX}%
- \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!geen=>\let\obeycharacters=\relax,
- \v!kleur=>\setupprettiesintype{TEX}%
- \let\obeycharacters=\setupprettytype
- \let\obeytabs=\ignoretabs,
- \v!normaal=>\let\obeycharacters=\setupgroupedtype,
- \v!commandos=>\def\obeycharacters{\setupcommandsintype{#1}}%
- \let\obeytabs=\ignoretabs,
- \v!schuin=>\let\obeycharacters=\setupslantedtype
- \let\obeytabs=\ignoretabs,
- \s!unknown=>\setupprettiesintype{\getvalue{#1\c!optie}}%
- \let\obeycharacters=\setupprettytype
- \let\obeytabs=\ignoretabs]%
- \edef\prettypalet%
- {\prettyidentifier\getvalue{#1\c!palet}}}
-
-%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%
- {\donefalse
- \skip0=\getvalue{\??tp#1\c!onevenmarge}\relax
- \ifdim\skip0=\!!zeropoint\relax\else\donetrue\fi
- \skip0=\getvalue{\??tp#1\c!evenmarge}\relax
- \ifdim\skip0=\!!zeropoint\relax\else\donetrue\fi
- \ifdone
- \def\doopenupverbatimline%
- {\getpagestatus
- \ifrightpage
- \hskip \getvalue{\??tp#1\c!onevenmarge}\relax
- \else
- \hskip \getvalue{\??tp#1\c!evenmarge}\relax
- \fi}%
- \else
- \doadaptleftskip{\getvalue{\??tp#1\c!marge}}%
- \fi
- \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}%
- \doifvalue{\??tp#1\c!springvolgendein}{\v!nee}{\noindentation}}
-
-%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]%
- {\copyparameters
- [\??tp#1][\??tp]
- [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,
- \c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge,
- \c!springvolgendein,\c!blanko,\c!escape]%
- \getparameters
- [\??tp#1]
- [#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]
-
-\definetyping[MP] [\c!optie=MP]
-\definetyping[PL] [\c!optie=PL]
-\definetyping[JV] [\c!optie=JV]
-\definetyping[TEX][\c!optie=TEX]
-
-%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 [colorprettyone] [r=.9, g=.0, b=.0] % red
-\definecolor [colorprettytwo] [r=.0, g=.8, b=.0] % green
-\definecolor [colorprettythree] [r=.0, g=.0, b=.9] % blue
-\definecolor [colorprettyfour] [r=.8, g=.8, b=.6] % yellow
-
-\definecolor [grayprettyone] [s=.30]
-\definecolor [grayprettytwo] [s=.45]
-\definecolor [grayprettythree] [s=.60]
-\definecolor [grayprettyfour] [s=.75]
-
-\definepalet
- [colorpretty]
- [ prettyone=colorprettyone,
- prettytwo=colorprettytwo,
- prettythree=colorprettythree,
- prettyfour=colorprettyfour]
-
-\definepalet
- [graypretty]
- [ prettyone=grayprettyone,
- prettytwo=grayprettytwo,
- prettythree=grayprettythree,
- prettyfour=grayprettyfour]
-
-% ---> naar verb-* ? of predefine als undefined?
-
-\definepalet [TEXcolorpretty] [colorpretty]
-\definepalet [TEXgraypretty] [graypretty]
-\definepalet [PLcolorpretty] [colorpretty]
-\definepalet [PLgraypretty] [graypretty]
-\definepalet [MPcolorpretty] [colorpretty]
-\definepalet [MPgraypretty] [graypretty]
-\definepalet [JVcolorpretty] [colorpretty]
-\definepalet [JVgraypretty] [graypretty]
-
-%D We can use some core color commands. These are faster than
-%D the standard color switching ones and work ok on a line by
-%D line basis.
-
-% Some real in-depth knowlegde of palets: `palet:color' it is!
-
-\def\beginofpretty[#1]{\startcolormode{\prettypalet:#1}}
-\def\endofpretty {\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
- \doifinset{\getvalue{\??tp\v!file\c!optie}}{\v!commandos,\v!schuin,\v!normaal}
- {\setuptyping[\v!file][\c!optie=\v!geen]}%
- \doifvalue{\??tp\v!file\c!optie}{\v!kleur}
- {\expandafter\aftersplitstring#1\at.\to\prettyidentifier
- \letvalue{\??tp\v!file\c!optie}=\prettyidentifier}%
- \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!palet=colorpretty,
- \c!springvolgendein=\v!ja,
- \c!marge=\!!zeropoint,
- \c!evenmarge=\!!zeropoint,
- \c!onevenmarge=\!!zeropoint,
- \c!blanko=\v!regel,
- \c!escape=/]
-
-\permitshiftedendofverbatim
-
-\optimizeverbatimtrue
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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}
+
+\startmessages dutch library: verbatims
+ title: typen
+ 1: file -- bestaat niet
+\stopmessages
+
+\startmessages english library: verbatims
+ title: verbatim
+ 1: file -- does not exist
+\stopmessages
+
+\startmessages german library: verbatims
+ title: verbatim
+ 1: Datei -- existiert nicht
+\stopmessages
+
+\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\prettyidentifier {TEX}
+\def\prettypalet {}
+
+\def\setupprettiesintype#1%
+ {\edef\prettyidentifier{#1}%
+ \doifinstringelse{\prettyidentifier}{tex,TEX}
+ {\def\prettyidentifier{TEX}}
+ {\doifinstringelse{\prettyidentifier}{perl,pl,pm,PERL,PL,PM}
+ {\def\prettyidentifier{PL}}
+ {\doifinstringelse{\prettyidentifier}{metapost,mp,metafont,mf,METAPOST,MP,METAFONT,MF}
+ {\def\prettyidentifier{MP}}
+ {\doifinstringelse{\prettyidentifier}{javascript,js,java,jv,JAVASCRIPT,JS,JAVA,JV}
+ {\def\prettyidentifier{JV}}
+ {\def\prettyidentifier{TEX}}}}}%
+ \doifundefined{setuppretty\prettyidentifier type}%
+ {\bgroup
+ \setbox0=\hbox % get rid of spaces when in-line \newpretty loading
+ {\restorecatcodes % also needed when loading during \newpretty
+ \startreadingfile % restore < and > if needed
+ \readsysfile{verb-\prettyidentifier.tex}{}{}
+ \stopreadingfile}%
+ \egroup}%
+ \doifdefinedelse{setuppretty\prettyidentifier type}%
+ {\def\setupprettytype{\getvalue{setuppretty\prettyidentifier type}}}
+ {\let\setupprettytype=\relax}}
+
+\installnewpretty M {\setupprettiesintype{MP}\setupprettytype}
+\installnewpretty P {\setupprettiesintype{PL}\setupprettytype}
+\installnewpretty T {\setupprettiesintype{TEX}\setupprettytype}
+\installnewpretty J {\setupprettiesintype{JV}\setupprettytype}
+
+\def\setupcommonverbatim#1%
+ {\def\verbatimfont {\tttf}%
+ \def\prettyidentifierfont {\ttsl}%
+ \def\prettyvariablefont {}%
+ \def\prettyidentifier {TEX}%
+ \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!geen=>\let\obeycharacters=\relax,
+ \v!kleur=>\setupprettiesintype{TEX}%
+ \let\obeycharacters=\setupprettytype
+ \let\obeytabs=\ignoretabs,
+ \v!normaal=>\let\obeycharacters=\setupgroupedtype,
+ \v!commandos=>\def\obeycharacters{\setupcommandsintype{#1}}%
+ \let\obeytabs=\ignoretabs,
+ \v!schuin=>\let\obeycharacters=\setupslantedtype
+ \let\obeytabs=\ignoretabs,
+ \s!unknown=>\setupprettiesintype{\getvalue{#1\c!optie}}%
+ \let\obeycharacters=\setupprettytype
+ \let\obeytabs=\ignoretabs]%
+ \edef\prettypalet%
+ {\prettyidentifier\getvalue{#1\c!palet}}}
+
+%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 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 the 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. The \type
+%D {\hbox{}} prevents ligatures, which unfortunately turn up
+%D in Lucida fonts.
+
+\def\doenterdoublelesstype%
+ {\ifx\next\egroup
+ \lesscharacter\hbox{}\lesscharacter
+ \else
+ \bgroup\switchslantedtype
+ \let\doenterdoublemoretype=\egroup
+ \fi}
+
+\def\doenterdoublemoretype%
+ {\def\doenterdoubletype%
+ {\ifx\next\egroup
+ \morecharacter\hbox{}\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,obeyhyphens}
+%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%
+ {\def\obeyedspace{ }%
+ \edef\savedfont{\the\font}%
+ \ttsl\hyphenchar\font=45
+ \tttf\hyphenchar\font=45
+ \savedfont
+ \spaceskip.5em\!!plus.25em\!!minus.25em\relax}
+
+\unexpanded\def\typ%
+ {\bgroup
+ \obeyhyphens
+ \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 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%
+ {\donefalse
+ \scratchskip=\getvalue{\??tp#1\c!onevenmarge}\relax
+ \ifdim\scratchskip=\!!zeropoint\relax\else\donetrue\fi
+ \scratchskip=\getvalue{\??tp#1\c!evenmarge}\relax
+ \ifdim\scratchskip=\!!zeropoint\relax\else\donetrue\fi
+ \ifdone
+ \def\doopenupverbatimline%
+ {\getpagestatus
+ \ifrightpage
+ \hskip \getvalue{\??tp#1\c!onevenmarge}\relax
+ \else
+ \hskip \getvalue{\??tp#1\c!evenmarge}\relax
+ \fi}%
+ \else
+ \doadaptleftskip{\getvalue{\??tp#1\c!marge}}%
+ \fi
+ \doifdefinedelse{\??bo\getvalue{\??tp#1\c!blanko}}
+ {\edef\!!stringa{\csname\??bo\csname\??tp#1\c!blanko\endcsname\endcsname}}
+ {\edef\!!stringa{\csname\??tp#1\c!blanko\endcsname}}%
+ \processaction
+ [\!!stringa]
+ [\v!standaard=>\scratchskip=\tussenwit,
+ \v!klein=>\scratchskip=\blankokleinmaat,
+ \v!middel=>\scratchskip=\blankomiddelmaat,
+ \v!groot=>\scratchskip=\blankogrootmaat,
+ \v!halveregel=>\scratchskip=.5\baselineskip,
+ \v!regel=>\scratchskip=\baselineskip,
+ \v!geen=>\scratchskip=\!!zeropoint,
+ \s!unknown=>\scratchskip=\commalistelement]%
+ \ifgridsnapping
+ \edef\verbatimbaselineskip{\the\baselineskip}%
+ \else
+ \edef\verbatimbaselineskip{\the\scratchskip}%
+ \fi
+ \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}%
+ \doifvalue{\??tp#1\c!springvolgendein}{\v!nee}{\noindentation}}
+
+%D \macros
+%D {definetyping}
+%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]%
+ {\copyparameters
+ [\??tp#1][\??tp]
+ [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,
+ \c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge,
+ \c!springvolgendein,\c!blanko,\c!escape]%
+ \getparameters
+ [\??tp#1]
+ [#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]
+
+\definetyping[MP] [\c!optie=MP]
+\definetyping[PL] [\c!optie=PL]
+\definetyping[PM] [\c!optie=PL]
+\definetyping[JS] [\c!optie=JS]
+\definetyping[JV] [\c!optie=JV]
+\definetyping[TEX][\c!optie=TEX]
+
+%D \macros
+%D {setuptyping}
+%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 [colorprettyone] [r=.9, g=.0, b=.0] % red
+\definecolor [colorprettytwo] [r=.0, g=.8, b=.0] % green
+\definecolor [colorprettythree] [r=.0, g=.0, b=.9] % blue
+\definecolor [colorprettyfour] [r=.8, g=.8, b=.6] % yellow
+
+\definecolor [grayprettyone] [s=.30]
+\definecolor [grayprettytwo] [s=.45]
+\definecolor [grayprettythree] [s=.60]
+\definecolor [grayprettyfour] [s=.75]
+
+\definepalet
+ [colorpretty]
+ [ prettyone=colorprettyone,
+ prettytwo=colorprettytwo,
+ prettythree=colorprettythree,
+ prettyfour=colorprettyfour]
+
+\definepalet
+ [graypretty]
+ [ prettyone=grayprettyone,
+ prettytwo=grayprettytwo,
+ prettythree=grayprettythree,
+ prettyfour=grayprettyfour]
+
+% ---> naar verb-* ? of predefine als undefined?
+
+\definepalet [TEXcolorpretty] [colorpretty]
+\definepalet [TEXgraypretty] [graypretty]
+\definepalet [PLcolorpretty] [colorpretty]
+\definepalet [PLgraypretty] [graypretty]
+\definepalet [PMcolorpretty] [colorpretty]
+\definepalet [PMgraypretty] [graypretty]
+\definepalet [MPcolorpretty] [colorpretty]
+\definepalet [MPgraypretty] [graypretty]
+\definepalet [JVcolorpretty] [colorpretty]
+\definepalet [JVgraypretty] [graypretty]
+\definepalet [JScolorpretty] [colorpretty]
+\definepalet [JSgraypretty] [graypretty]
+
+%D We can use some core color commands. These are faster than
+%D the standard color switching ones and work ok on a line by
+%D line basis.
+
+% Some real in-depth knowlegde of palets: `palet:color' it is!
+
+\def\beginofpretty[#1]{\startcolormode{\prettypalet:#1}}
+\def\endofpretty {\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 numbering using these
+%D macros.
+
+%D \macros
+%D {typefile}
+%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}%
+ \doiffileelse{#1}
+ {\startopelkaar % includes \bgroup
+ \doifinset{\getvalue{\??tp\v!file\c!optie}}{\v!commandos,\v!schuin,\v!normaal}
+ {\setuptyping[\v!file][\c!optie=\v!geen]}%
+ \doifvalue{\??tp\v!file\c!optie}{\v!kleur}
+ {\expandafter\aftersplitstring#1\at.\to\prettyidentifier
+ \letvalue{\??tp\v!file\c!optie}=\prettyidentifier}%
+ \initializetyping\v!file
+ \processfileverbatim{#1}%
+ \stopopelkaar} % includes \egroup
+ {{\tttf[\makemessage{\m!verbatims}{1}{#1}]}%
+ \showmessage{\m!verbatims}{1}{#1}}%
+ \getvalue{\??tp\v!file\c!na}}
+
+%D \macros
+%D {filename}
+%D
+%D Typesetting filenames in monospaced fonts is possible with
+%D
+%D \starttypen
+%D \filename{here/there/filename.suffix}
+%D \stoptypen
+%D
+%D The definition is not that spectacular.
+
+\def\filename#1{{\tttf\hyphenatedfile{#1}}}
+
+%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!palet=colorpretty,
+ \c!springvolgendein=\v!ja,
+ \c!marge=\!!zeropoint,
+ \c!evenmarge=\!!zeropoint,
+ \c!onevenmarge=\!!zeropoint,
+ \c!blanko=\v!regel,
+ \c!escape=/]
+
+\permitshiftedendofverbatim
+
+\optimizeverbatimtrue
+
+\protect
+
+\endinput
diff --git a/tex/context/base/core-vis.tex b/tex/context/base/core-vis.tex
index 37b5a768e..96d44b7c9 100644
--- a/tex/context/base/core-vis.tex
+++ b/tex/context/base/core-vis.tex
@@ -1,545 +1,688 @@
-%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 \macros
-%D {makecutbox, cuthbox, cutvbox, cutvtop}
-%D
-%D Although mainly used for marking the page, these macros can
-%D also serve local use.
-%D
-%D \startbuffer
-%D \setbox0=\vbox{a real \crlf vertical box} \makecutbox0
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This marked \type{\vbox} shows up as:
-%D
-%D \startregelcorrectie
-%D \haalbuffer
-%D \stopregelcorrectie
-%D
-%D The alternative macros are used as:
-%D
-%D \startbuffer
-%D \cuthbox{a made cut box}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This is typeset as:
-%D
-%D \startregelcorrectie
-%D \haalbuffer
-%D \stopregelcorrectie
-%D
-%D By setting the next macros one can influence the length of
-%D the marks as well as the horizontal and vertical divisions.
-
-\def\cutmarklength {2\bodyfontsize}
-\chardef\horizontalcutmarks = 2
-\chardef\verticalcutmarks = 2
-\chardef\cutmarkoffset = 1
-\let\cutmarksymbol = \relax
-
-\def\horizontalcuts%
- {\normalhbox to \ruledwidth
- {\dorecurse{\horizontalcutmarks}
- {\vrule\!!width\boxrulewidth\!!height\cutmarklength\normalhfill}%
- \unskip}}
-
-\def\verticalcuts%
- {\scratchdimen=\ruledheight
- \advance\scratchdimen by \ruleddepth
- \normalvbox to \scratchdimen
- {\hsize\cutmarklength
- \dorecurse{\verticalcutmarks}
- {\vrule\!!height\boxrulewidth\!!width\hsize\normalvfill}%
- \unskip}}
-
-\def\baselinecuts%
- {\ifdim\ruleddepth>\!!zeropoint
- \scratchdimen=\ruledheight
- \advance\scratchdimen by \ruleddepth
- \normalvbox to \scratchdimen
- {\scratchdimen=\cutmarklength
- \divide\scratchdimen by 2
- \hsize\scratchdimen
- \normalvskip\!!zeropoint\!!plus\ruledheight
- \vrule\!!height\boxrulewidth\!!width\hsize
- \normalvskip\!!zeropoint\!!plus\ruleddepth}%
- \fi}
-
-\def\cutmarksymbols%
- {\setbox\scratchbox=\normalvbox to \cutmarklength
- {\normalvfill
- \normalhbox to \cutmarklength
- {\normalhfill\ssxx\cutmarksymbol\normalhfill}%
- \normalvfill}%
- \normalhbox to \ruledwidth
- {\scratchdimen=\cutmarklength
- \divide\scratchdimen by 2
- \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
- \normalhfill
- \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}}}
-
-\def\makecutbox#1%
- {\edef\ruledheight{\the\ht#1}%
- \edef\ruleddepth {\the\dp#1}%
- \edef\ruledwidth {\the\wd#1}%
- \setbox#1=\normalhbox
- {\dontcomplain
- \forgetall
- \boxmaxdepth\maxdimen
- \offinterlineskip
- \scratchdimen=\cutmarklength
- \divide\scratchdimen by 2
- \hsize\ruledwidth
- \setbox\scratchbox=\normalvbox
- {\setbox\scratchbox=\normalhbox{\horizontalcuts}%
- \normalvskip-\cutmarkoffset\scratchdimen
- \normalvskip-2\scratchdimen
- \copy\scratchbox
- \normalvskip\cutmarkoffset\scratchdimen
- \hbox to \ruledwidth
- {\setbox\scratchbox=\normalhbox{\verticalcuts}%
- \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
- \bgroup
- \setbox\scratchbox=\normalhbox{\baselinecuts}%
- \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
- \normalhfill
- \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}%
- \egroup
- \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}}%
- \normalvskip\cutmarkoffset\scratchdimen
- \copy\scratchbox}%
- \ht\scratchbox=\ruledheight
- \dp\scratchbox=\ruleddepth
- \wd\scratchbox=\!!zeropoint
- \box\scratchbox
- \ifx\cutmarksymbol\relax \else
- \setbox\scratchbox=\normalvbox
- {\setbox\scratchbox=\normalhbox{\cutmarksymbols}%
- \vskip-\cutmarkoffset\scratchdimen
- \vskip-\cutmarklength
- \copy\scratchbox
- \vskip\cutmarkoffset\scratchdimen
- \vskip\ruledheight
- \vskip\ruleddepth
- \vskip\cutmarkoffset\scratchdimen
- \copy\scratchbox}%
- \ht\scratchbox=\ruledheight
- \dp\scratchbox=\ruleddepth
- \wd\scratchbox=\!!zeropoint
- \box\scratchbox
- \fi
- \box#1}%
- \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}
-
-%D \macros
-%D {colormarkbox}
-%D
-%D This macro is used in the pagebody routine. No other use
-%D is advocated here.
-%D
-%D \starttypen
-%D \colormarkbox0
-%D \stoptypen
-
-\def\colormarkoffset{\cutmarkoffset}
-\def\colormarklength{\cutmarklength}
-
-\def\colorrangeA#1#2#3#4%
- {\vbox
- {\scratchdimen=-\colormarklength
- \multiply\scratchdimen by 4
- \advance\scratchdimen by \ruledheight
- \advance\scratchdimen by \ruleddepth
- \divide\scratchdimen by 21
- \def\docommando##1%
- {\vbox
- {\hsize\scratchdimen
- \definecolor
- [\s!dummy]
- [\c!c=#2##1\else0\fi,
- \c!m=#3##1\else0\fi,
- \c!y=#4##1\else0\fi,
- \c!k=0]%
- \localstartcolor[\s!dummy]%
- \hrule
- \!!width 3em
- \!!height \scratchdimen
- \!!depth \!!zeropoint
- \localstopcolor
- \ifdim\scratchdimen>1ex
- \vskip-\scratchdimen
- \vbox to \scratchdimen
- {\vss
- \hbox to \hsize
- {\hss\ifdim##1pt=0pt#1\else##1\fi\hss}%
- \vss}%
- \fi}}%
- \offinterlineskip
- \processcommalist[1.00,0.95,0.75,0.50,0.25,0.05,0.00]\docommando}}
-
-\def\colorrangeB%
- {\hbox
- {\scratchdimen=-\colormarklength
- \multiply\scratchdimen by 2
- \advance\scratchdimen by \ruledwidth
- \divide\scratchdimen by 11
- \def\docommando ##1 ##2 ##3##4##5##6%
- {\definecolor
- [\s!dummy]
- [\c!c=##3##2\else0\fi,
- \c!m=##4##2\else0\fi,
- \c!y=##5##2\else0\fi,
- \c!k=##6##2\else0\fi]%
- \localstartcolor[\s!dummy]%
- \vrule
- \!!width \scratchdimen
- \!!height \colormarklength
- \!!depth \!!zeropoint
- \localstopcolor
- \ifdim\scratchdimen>2em
- \hskip-\scratchdimen
- \vbox to \colormarklength
- {\vss
- \hbox to \scratchdimen
- {\hss\ifdim##2pt=.5pt##2~\fi##1\hss}
- \vss}%
- \fi}%
- \docommando C .5 \iftrue \iffalse\iffalse\iffalse
- \docommando M .5 \iffalse\iftrue \iffalse\iffalse
- \docommando Y .5 \iffalse\iffalse\iftrue \iffalse
- \docommando K .5 \iffalse\iffalse\iffalse\iftrue
- \docommando C 1 \iftrue \iffalse\iffalse\iffalse
- \docommando G 1 \iftrue \iffalse\iftrue \iffalse
- \docommando Y 1 \iffalse\iffalse\iftrue \iffalse
- \docommando R 1 \iffalse\iftrue \iftrue \iffalse
- \docommando M 1 \iffalse\iftrue \iffalse\iffalse
- \docommando B 1 \iftrue \iftrue \iffalse\iffalse
- \docommando K 1 \iffalse\iffalse\iffalse\iftrue}}
-
-\def\colorrangeC%
- {\hbox
- {\scratchdimen=-\colormarklength
- \multiply\scratchdimen by 2
- \advance\scratchdimen by \ruledwidth
- \divide\scratchdimen by 14
- \def\docommando##1%
- {\definecolor[\s!dummy][\c!s=##1]%
- \localstartcolor[\s!dummy]%
- \vrule
- \!!width \scratchdimen
- \!!height \colormarklength
- \!!depth \!!zeropoint
- \localstopcolor
- \ifdim\scratchdimen>2em
- \hskip-\scratchdimen
- \vbox to \colormarklength
- {\vss\hbox to \scratchdimen{\hss##1\hss}\vss}%
- \fi}%
- \processcommalist
- [1.00,0.95,0.90,0.85,0.80,0.75,
- 0.70,0.60,0.50,0.40,0.30,0.20,0.10,0.00]\docommando}}
-
-\def\docolormarkbox#1%
- {\edef\ruledheight{\the\ht#1}%
- \edef\ruleddepth {\the\dp#1}%
- \edef\ruledwidth {\the\wd#1}%
- \setbox#1=\hbox
- {\scratchdimen=\colormarklength
- \divide\scratchdimen by 2
- \forgetall
- \ssxx
- \setbox\scratchbox=\vbox
- {\offinterlineskip
- \vskip-\colormarkoffset\scratchdimen
- \vskip-2\scratchdimen
- \hbox to \ruledwidth
- {\hss\hbox{\colorrangeB}\hss}%
- \vskip\colormarkoffset\scratchdimen
- \vbox to \ruledheight
- {\vss
- \hbox to \ruledwidth
- {\llap{\colorrangeA C\iftrue\iffalse\iffalse\hskip\colormarkoffset\scratchdimen}%
- \hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA R\iffalse\iftrue\iftrue}}%
- \vss
- \hbox to \ruledwidth
- {\llap{\colorrangeA M\iffalse\iftrue\iffalse\hskip\colormarkoffset\scratchdimen}%
- \hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA G\iftrue\iffalse\iftrue}}%
- \vss
- \hbox to \ruledwidth
- {\llap{\colorrangeA Y\iffalse\iffalse\iftrue\hskip\colormarkoffset\scratchdimen}%
- \hfill
- \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA B\iftrue\iftrue\iffalse}}%
- \vss}
- \vskip\colormarkoffset\scratchdimen
- \hbox to \ruledwidth
- {\hss\lower\ruleddepth\hbox{\colorrangeC}\hss}}%
- \ht\scratchbox=\ruledheight
- \dp\scratchbox=\ruleddepth
- \wd\scratchbox=\!!zeropoint
- \box\scratchbox
- \box#1}%
- \wd#1=\ruledwidth
- \ht#1=\ruledheight
- \dp#1=\ruleddepth}
-
-\def\colormarkbox#1%
- {\ifincolor
- \docolormarkbox{#1}%
- \fi}
-
-\protect
-
-\endinput
+%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 \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 \macros
+%D {showpagebuilder}
+%D
+%D The next tracing option probaly is only of use to me and a
+%D few \CONTEXT\ hackers.
+
+\def\showpagebuilder%
+ {\EveryPar{\doshowpagebuilder}}
+
+\def\doshowpagebuilder%
+ {\strut
+ \llap
+ {\ttxx \vl
+ v:\the\vsize \vl
+ g:\the\pagegoal \vl
+ t:\the\pagetotal\vl}}
+
+%D \macros
+%D {makecutbox, cuthbox, cutvbox, cutvtop}
+%D
+%D Although mainly used for marking the page, these macros can
+%D also serve local use.
+%D
+%D \startbuffer
+%D \setbox0=\vbox{a real \crlf vertical box} \makecutbox0
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This marked \type{\vbox} shows up as:
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D The alternative macros are used as:
+%D
+%D \startbuffer
+%D \cuthbox{a made cut box}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This is typeset as:
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D By setting the next macros one can influence the length of
+%D the marks as well as the horizontal and vertical divisions.
+
+\def\cutmarklength {2\bodyfontsize}
+\chardef\horizontalcutmarks = 2
+\chardef\verticalcutmarks = 2
+\chardef\cutmarkoffset = 1
+\let\cutmarksymbol = \relax
+
+\def\horizontalcuts%
+ {\normalhbox to \ruledwidth
+ {\dorecurse{\horizontalcutmarks}
+ {\vrule\!!width\boxrulewidth\!!height\cutmarklength\normalhfill}%
+ \unskip}}
+
+\def\verticalcuts%
+ {\scratchdimen=\ruledheight
+ \advance\scratchdimen by \ruleddepth
+ \normalvbox to \scratchdimen
+ {\hsize\cutmarklength
+ \dorecurse{\verticalcutmarks}
+ {\vrule\!!height\boxrulewidth\!!width\hsize\normalvfill}%
+ \unskip}}
+
+\def\baselinecuts%
+ {\ifdim\ruleddepth>\!!zeropoint
+ \scratchdimen=\ruledheight
+ \advance\scratchdimen by \ruleddepth
+ \normalvbox to \scratchdimen
+ {\scratchdimen=\cutmarklength
+ \divide\scratchdimen by 2
+ \hsize\scratchdimen
+ \normalvskip\!!zeropoint\!!plus\ruledheight
+ \vrule\!!height\boxrulewidth\!!width\hsize
+ \normalvskip\!!zeropoint\!!plus\ruleddepth}%
+ \fi}
+
+\def\cutmarksymbols%
+ {\setbox\scratchbox=\normalvbox to \cutmarklength
+ {\normalvfill
+ \normalhbox to \cutmarklength
+ {\normalhfill\ssxx\cutmarksymbol\normalhfill}%
+ \normalvfill}%
+ \normalhbox to \ruledwidth
+ {\scratchdimen=\cutmarklength
+ \divide\scratchdimen by 2
+ \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
+ \normalhfill
+ \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}}}
+
+\def\makecutbox#1%
+ {\edef\ruledheight{\the\ht#1}%
+ \edef\ruleddepth {\the\dp#1}%
+ \edef\ruledwidth {\the\wd#1}%
+ \setbox#1=\normalhbox
+ {\dontcomplain
+ \forgetall
+ \boxmaxdepth\maxdimen
+ \offinterlineskip
+ \scratchdimen=\cutmarklength
+ \divide\scratchdimen by 2
+ \hsize\ruledwidth
+ \setbox\scratchbox=\normalvbox
+ {\setbox\scratchbox=\normalhbox{\horizontalcuts}%
+ \normalvskip-\cutmarkoffset\scratchdimen
+ \normalvskip-2\scratchdimen
+ \copy\scratchbox
+ \normalvskip\cutmarkoffset\scratchdimen
+ \hbox to \ruledwidth
+ {\setbox\scratchbox=\normalhbox{\verticalcuts}%
+ \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
+ \bgroup
+ \setbox\scratchbox=\normalhbox{\baselinecuts}%
+ \llap{\copy\scratchbox\normalhskip\cutmarkoffset\scratchdimen}%
+ \normalhfill
+ \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}%
+ \egroup
+ \rlap{\normalhskip\cutmarkoffset\scratchdimen\copy\scratchbox}}%
+ \normalvskip\cutmarkoffset\scratchdimen
+ \copy\scratchbox}%
+ \ht\scratchbox=\ruledheight
+ \dp\scratchbox=\ruleddepth
+ \wd\scratchbox=\!!zeropoint
+ \box\scratchbox
+ \ifx\cutmarksymbol\relax \else
+ \setbox\scratchbox=\normalvbox
+ {\setbox\scratchbox=\normalhbox{\cutmarksymbols}%
+ \vskip-\cutmarkoffset\scratchdimen
+ \vskip-\cutmarklength
+ \copy\scratchbox
+ \vskip\cutmarkoffset\scratchdimen
+ \vskip\ruledheight
+ \vskip\ruleddepth
+ \vskip\cutmarkoffset\scratchdimen
+ \copy\scratchbox}%
+ \ht\scratchbox=\ruledheight
+ \dp\scratchbox=\ruleddepth
+ \wd\scratchbox=\!!zeropoint
+ \box\scratchbox
+ \fi
+ \box#1}%
+ \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}
+
+%D \macros
+%D {colormarkbox}
+%D
+%D This macro is used in the pagebody routine. No other use
+%D is advocated here.
+%D
+%D \starttypen
+%D \colormarkbox0
+%D \stoptypen
+
+\def\colormarkoffset{\cutmarkoffset}
+\def\colormarklength{\cutmarklength}
+
+\def\colorrangeA#1#2#3#4%
+ {\vbox
+ {\scratchdimen=-\colormarklength
+ \multiply\scratchdimen by 4
+ \advance\scratchdimen by \ruledheight
+ \advance\scratchdimen by \ruleddepth
+ \divide\scratchdimen by 21
+ \def\docommando##1%
+ {\vbox
+ {\hsize3em % \scratchdimen
+ \definecolor
+ [\s!dummy]
+ [\c!c=#2##1\else0\fi,
+ \c!m=#3##1\else0\fi,
+ \c!y=#4##1\else0\fi,
+ \c!k=0]%
+ \localstartcolor[\s!dummy]%
+ \hrule
+ \!!width 3em
+ \!!height \scratchdimen
+ \!!depth \!!zeropoint
+ \localstopcolor
+ \ifdim\scratchdimen>1ex
+ \vskip-\scratchdimen
+ \vbox to \scratchdimen
+ {\vss
+ \hbox to 3em
+ {\hss\ifdim##1pt=0pt#1\else##1\fi\hss}%
+ \vss}%
+ \fi}}%
+ \offinterlineskip
+ \processcommalist[1.00,0.95,0.75,0.50,0.25,0.05,0.00]\docommando}}
+
+\def\colorrangeB%
+ {\hbox
+ {\scratchdimen=-\colormarklength
+ \multiply\scratchdimen by 2
+ \advance\scratchdimen by \ruledwidth
+ \divide\scratchdimen by 11
+ \def\docommando ##1 ##2 ##3##4##5##6%
+ {\definecolor
+ [\s!dummy]
+ [\c!c=##3##2\else0\fi,
+ \c!m=##4##2\else0\fi,
+ \c!y=##5##2\else0\fi,
+ \c!k=##6##2\else0\fi]%
+ \localstartcolor[\s!dummy]%
+ \vrule
+ \!!width \scratchdimen
+ \!!height \colormarklength
+ \!!depth \!!zeropoint
+ \localstopcolor
+ \ifdim\scratchdimen>2em
+ \hskip-\scratchdimen
+ \vbox to \colormarklength
+ {\vss
+ \hbox to \scratchdimen
+ {\hss\ifdim##2pt=.5pt##2~\fi##1\hss}
+ \vss}%
+ \fi}%
+ \docommando C .5 \iftrue \iffalse\iffalse\iffalse
+ \docommando M .5 \iffalse\iftrue \iffalse\iffalse
+ \docommando Y .5 \iffalse\iffalse\iftrue \iffalse
+ \docommando K .5 \iffalse\iffalse\iffalse\iftrue
+ \docommando C 1 \iftrue \iffalse\iffalse\iffalse
+ \docommando G 1 \iftrue \iffalse\iftrue \iffalse
+ \docommando Y 1 \iffalse\iffalse\iftrue \iffalse
+ \docommando R 1 \iffalse\iftrue \iftrue \iffalse
+ \docommando M 1 \iffalse\iftrue \iffalse\iffalse
+ \docommando B 1 \iftrue \iftrue \iffalse\iffalse
+ \docommando K 1 \iffalse\iffalse\iffalse\iftrue}}
+
+\def\colorrangeC%
+ {\hbox
+ {\scratchdimen=-\colormarklength
+ \multiply\scratchdimen by 2
+ \advance\scratchdimen by \ruledwidth
+ \divide\scratchdimen by 14
+ \def\docommando##1%
+ {\definecolor[\s!dummy][\c!s=##1]%
+ \localstartcolor[\s!dummy]%
+ \vrule
+ \!!width \scratchdimen
+ \!!height \colormarklength
+ \!!depth \!!zeropoint
+ \localstopcolor
+ \ifdim\scratchdimen>2em
+ \hskip-\scratchdimen
+ \vbox to \colormarklength
+ {\vss\hbox to \scratchdimen{\hss##1\hss}\vss}%
+ \fi}%
+ \processcommalist
+ [1.00,0.95,0.90,0.85,0.80,0.75,
+ 0.70,0.60,0.50,0.40,0.30,0.20,0.10,0.00]\docommando}}
+
+\def\docolormarkbox#1%
+ {\edef\ruledheight{\the\ht#1}%
+ \edef\ruleddepth {\the\dp#1}%
+ \edef\ruledwidth {\the\wd#1}%
+ \setbox#1=\hbox
+ {\scratchdimen=\colormarklength
+ \divide\scratchdimen by 2
+ \forgetall
+ \ssxx
+ \setbox\scratchbox=\vbox
+ {\offinterlineskip
+ \vskip-\colormarkoffset\scratchdimen
+ \vskip-2\scratchdimen
+ \hbox to \ruledwidth
+ {\hss\hbox{\colorrangeB}\hss}%
+ \vskip\colormarkoffset\scratchdimen
+ \vbox to \ruledheight
+ {\vss
+ \hbox to \ruledwidth
+ {\llap{\colorrangeA C\iftrue\iffalse\iffalse\hskip\colormarkoffset\scratchdimen}%
+ \hfill
+ \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA R\iffalse\iftrue\iftrue}}%
+ \vss
+ \hbox to \ruledwidth
+ {\llap{\colorrangeA M\iffalse\iftrue\iffalse\hskip\colormarkoffset\scratchdimen}%
+ \hfill
+ \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA G\iftrue\iffalse\iftrue}}%
+ \vss
+ \hbox to \ruledwidth
+ {\llap{\colorrangeA Y\iffalse\iffalse\iftrue\hskip\colormarkoffset\scratchdimen}%
+ \hfill
+ \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA B\iftrue\iftrue\iffalse}}%
+ \vss}
+ \vskip\colormarkoffset\scratchdimen
+ \hbox to \ruledwidth
+ {\hss\lower\ruleddepth\hbox{\colorrangeC}\hss}}%
+ \ht\scratchbox=\ruledheight
+ \dp\scratchbox=\ruleddepth
+ \wd\scratchbox=\!!zeropoint
+ \box\scratchbox
+ \box#1}%
+ \wd#1=\ruledwidth
+ \ht#1=\ruledheight
+ \dp#1=\ruleddepth}
+
+\def\colormarkbox#1%
+ {\ifincolor
+ \docolormarkbox{#1}%
+ \fi}
+
+%D \macros
+%D {showwhatsits, dontshowwhatsits}
+%D
+%D \TEX\ has three so called whatsits: \type {\mark}, \type
+%D {\write} and \type {\special}. The first one keeps track of
+%D the current state at page boundaries, the last two are used
+%D to communicate to the outside world. Due to fact that
+%D especially \type {\write} is often used in conjunction with
+%D \type {\edef}, we can only savely support that one in \ETEX.
+%D
+%D \bgroup \showwhatsits \stelkleurenin[status=start]
+%D
+%D Whatsits show up \color[blue]{in color} and are
+%D characterized bij their first character.\voetnoot [some note]
+%D {So we may encounter \type {w}, \type {m} and \type{s}.}
+%D They are \writestatus{dummy}{demo}\color[yellow]{stacked}.
+%D
+%D \egroup
+
+\newif\ifimmediatewrite
+
+\ifx\eTeXversion\undefined
+
+ \let\showwhatsits\relax
+ \let\dontshowwhatsits\relax
+
+\else
+
+ \let\supernormalmark \normalmark % mark is already superseded
+ \let\supernormalmarks \normalmarks % mark is already superseded
+
+ \def\showwhatsits%
+ {\protected\def\normalmark {\visualwhatsit100+m\supernormalmark }%
+ \protected\def\normalmarks{\visualwhatsit100+m\supernormalmarks}%
+ \protected\def\special {\visualwhatsit0100s\normalspecial }%
+ \protected\def\write {\visualwhatsit001-w\normalwrite }%
+ \let\immediate=\immediatewhatsit
+ \appendtoks\dontshowwhatsits\to\everystoptext}
+
+ \def\immediatewhatsit%
+ {\bgroup\futurelet\next\doimmediatewhatsit}%
+
+ \def\doimmediatewhatsit%
+ {\ifx\next\write
+ \egroup\immediatewritetrue
+ \else
+ \egroup\expandafter\normalimmediate
+ \fi}
+
+ \def\dontshowwhatsits%
+ {\let\immediate \normalimmediate
+ \let\normalmark\supernormalmark
+ \let\special \normalspecial
+ \let\write \normalwrite}
+
+ \def\visualwhatsit#1#2#3#4#5%
+ {\bgroup
+ \pushwhatsit
+ \dontinterfere
+ \dontcomplain
+ \dontshowcomposition
+ \dontshowwhatsits
+ \ttx
+ \ifvmode\donetrue\else\donefalse\fi
+ \setbox\scratchbox=\hbox
+ {\ifdone\dostartgraycolormode0\else\dostartrgbcolormode#1#2#3\fi
+ #5\dostopcolormode}%
+ \setbox\scratchbox=\hbox
+ {\ifdone\dostartrgbcolormode#1#2#3\else\dostartgraycolormode0\fi
+ \vrule\!!width\wd\scratchbox\dostopcolormode
+ \hskip-\wd\scratchbox\box\scratchbox}%
+ \scratchdimen=1ex
+ \ifdone
+ \setbox\scratchbox=\hbox
+ {\hskip#4\scratchdimen\box\scratchbox}%
+ \else
+ \setbox\scratchbox=\hbox
+ {\raise#4\scratchdimen\box\scratchbox}%
+ \fi
+ \smashbox\scratchbox
+ \ifdone\nointerlineskip\fi
+ \box\scratchbox
+ \ifvmode\nointerlineskip\fi
+ \popwhatsit
+ \egroup
+ \ifimmediatewrite
+ \immediatewritefalse
+ \expandafter\normalimmediate
+ \fi}
+
+ \def\pushwhatsit%
+ {\ifdim\lastskip=\!!zeropoint
+ \ifnum\lastpenalty=0
+ \ifnum\lastkern=0
+ \ifhmode
+ \let\popwhatsit\relax
+ \else
+ \edef\popwhatsit{\prevdepth\the\prevdepth}%
+ \fi
+ \else
+ \ifhmode
+ \edef\popwhatsit{\kern\the\lastkern}\unkern
+ \else
+ \edef\popwhatsit{\kern\the\lastkern\prevdepth\the\prevdepth}
+ \kern-\lastkern
+ \fi
+ \fi
+ \else
+ \ifhmode
+ \edef\popwhatsit{\the\lastpenalty}%
+ \unpenalty
+ \else
+ \edef\popwhatsit{\penalty\the\lastpenalty\prevdepth\the\prevdepth}%
+ %\nobreak
+ \fi
+ \fi
+ \else
+ \ifhmode
+ \edef\popwhatsit{\hskip\the\lastskip}\unskip
+ \else
+ \edef\popwhatsit{\vskip\the\lastskip\prevdepth\the\prevdepth}
+ \vskip-\lastskip
+ \fi
+ \fi}
+
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/docs-ini.tex b/tex/context/base/docs-ini.tex
index b78dfca0f..7209db8f9 100644
--- a/tex/context/base/docs-ini.tex
+++ b/tex/context/base/docs-ini.tex
@@ -1,41 +1,40 @@
-%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
+%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
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
new file mode 100644
index 000000000..0751247b1
--- /dev/null
+++ b/tex/context/base/enco-ans.tex
@@ -0,0 +1,165 @@
+%D \module
+%D [ file=enco-ans,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=\YandY\ texnansi Encoding,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+
+%D This is \YandY's texnansi encoding vector, which combines
+%D the best of the ansi encoding vector (prebuilt accented
+%D characters etc.) and some of \TEX's vectors.
+
+\startmapping[texnansi]
+
+\definecasemap 228 228 196 \definecasemap 196 228 196
+\definecasemap 235 235 203 \definecasemap 203 235 203
+\definecasemap 239 239 207 \definecasemap 207 239 207
+\definecasemap 246 246 214 \definecasemap 214 246 214
+\definecasemap 252 252 220 \definecasemap 220 252 220
+\definecasemap 255 255 159 \definecasemap 159 255 159
+
+\definecasemap 225 225 193 \definecasemap 193 225 193
+\definecasemap 233 233 201 \definecasemap 201 233 201
+\definecasemap 237 237 205 \definecasemap 205 237 205
+\definecasemap 243 243 211 \definecasemap 211 243 211
+\definecasemap 250 250 218 \definecasemap 218 250 218
+\definecasemap 253 253 221 \definecasemap 221 253 221
+
+\definecasemap 224 224 192 \definecasemap 192 224 192
+\definecasemap 232 232 200 \definecasemap 200 232 200
+\definecasemap 236 236 204 \definecasemap 204 236 204
+\definecasemap 242 242 210 \definecasemap 210 242 210
+\definecasemap 249 249 217 \definecasemap 217 249 217
+
+\definecasemap 226 226 194 \definecasemap 194 226 194
+\definecasemap 234 234 202 \definecasemap 202 234 202
+\definecasemap 238 238 206 \definecasemap 206 238 206
+\definecasemap 244 244 212 \definecasemap 212 244 212
+\definecasemap 251 251 219 \definecasemap 219 251 219
+
+\definecasemap 227 227 195 \definecasemap 195 227 195
+\definecasemap 241 241 209 \definecasemap 209 241 209
+\definecasemap 245 245 213 \definecasemap 213 245 213
+
+\stopmapping
+
+\startencoding[texnansi]
+
+\defineaccent " a 228
+\defineaccent " e 235
+\defineaccent " i 239
+\defineaccent " o 246
+\defineaccent " u 252
+\defineaccent " y 255
+
+\defineaccent " A 196
+\defineaccent " E 203
+\defineaccent " I 207
+\defineaccent " O 214
+\defineaccent " U 220
+\defineaccent " Y 159
+
+\defineaccent ' a 225
+\defineaccent ' e 233
+\defineaccent ' i 237
+\defineaccent ' o 243
+\defineaccent ' u 250
+\defineaccent ' y 253
+
+\defineaccent ' A 193
+\defineaccent ' E 201
+\defineaccent ' I 205
+\defineaccent ' O 211
+\defineaccent ' U 218
+\defineaccent ' Y 221
+
+\defineaccent ` a 224
+\defineaccent ` e 232
+\defineaccent ` i 236
+\defineaccent ` o 242
+\defineaccent ` u 249
+
+\defineaccent ` A 192
+\defineaccent ` E 200
+\defineaccent ` I 204
+\defineaccent ` O 210
+\defineaccent ` U 217
+
+\defineaccent ^ a 226
+\defineaccent ^ e 234
+\defineaccent ^ i 238
+\defineaccent ^ o 244
+\defineaccent ^ u 251
+
+\defineaccent ^ A 194
+\defineaccent ^ E 202
+\defineaccent ^ I 206
+\defineaccent ^ O 212
+\defineaccent ^ U 219
+
+\defineaccent ~ a 227
+\defineaccent ~ n 241
+\defineaccent ~ o 245
+
+\defineaccent ~ A 195
+\defineaccent ~ N 209
+\defineaccent ~ O 213
+
+\defineaccent ` {\dotlessi} 236
+\defineaccent ' {\dotlessi} 237
+\defineaccent " {\dotlessi} 239
+\defineaccent ^ {\dotlessi} 238
+
+\definecharacter ae 230
+\definecharacter oe 156
+\definecharacter o 248
+\definecharacter AE 198
+\definecharacter OE 140
+\definecharacter O 216
+\definecharacter ss 223
+
+\definecharacter aa 229
+\definecharacter AA 197
+
+\definecharacter cc 231
+\definecharacter CC 199
+
+%D The next piece of code is rather ugly:
+
+\def\texnansiencodedb#1%
+ {\oalign{#1\crcr\hidewidth\vbox to.2ex{\hbox{\char175}\vss}\hidewidth}}
+
+\def\texnansiencodedc#1%
+ {\setbox0\hbox{#1}\ifdim\ht0=1ex\accent184 #1\else
+ {\ooalign{\hidewidth\char184\hidewidth\crcr\unhbox0}}\fi}
+
+\definecommand b {\texnansiencodedb}
+\definecommand c {\texnansiencodedc}
+
+%D We still have to take care of:
+%D
+%D \starttypen
+%D \bgroup
+%D \catcode146=\active
+%D \gdef^^92{{^\bgroup\prim@s}}
+%D \egroup
+%D
+%D \mathcode146="8000
+%D
+%D \chardef\i=105
+%D \stoptypen
+
+%D We have to redefine some commands too:
+
+\redefinecommand grave \definecommand grave {\mathaccent"7060 }
+\redefinecommand acute \definecommand acute {\mathaccent"70B4 }
+\redefinecommand hat \definecommand hat {\mathaccent"7088 }
+\redefinecommand tilde \definecommand tilde {\mathaccent"7098 }
+\redefinecommand ddot \definecommand ddot {\mathaccent"70A8 }
+\redefinecommand bar \definecommand bar {\mathaccent"70AF }
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-ibm.tex b/tex/context/base/enco-ibm.tex
new file mode 100644
index 000000000..55dc91a18
--- /dev/null
+++ b/tex/context/base/enco-ibm.tex
@@ -0,0 +1,107 @@
+%D \module
+%D [ file=enco-ibm,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=IBM Keys,
+%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 activates the \kap{IBM PC} high \ASCII\
+%D characters, such as ‰ and á.
+
+\unprotect
+
+\catcode`\‰=\@@active \unexpanded\def‰{\"e}
+\catcode`\‚=\@@active \unexpanded\def‚{\'e}
+\catcode`\Š=\@@active \unexpanded\defŠ{\`e}
+\catcode`\ˆ=\@@active \unexpanded\defˆ{\^e}
+
+\catcode`\„=\@@active \unexpanded\def„{\"a}
+\catcode`\ =\@@active \unexpanded\def {\'a}
+\catcode`\…=\@@active \unexpanded\def…{\`a}
+\catcode`\ƒ=\@@active \unexpanded\defƒ{\^a}
+
+\catcode`\”=\@@active \unexpanded\def”{\"o}
+\catcode`\¢=\@@active \unexpanded\def¢{\'o}
+\catcode`\•=\@@active \unexpanded\def•{\`o}
+\catcode`\“=\@@active \unexpanded\def“{\^o}
+
+\catcode`\‹=\@@active \unexpanded\def‹{\"\dotlessi}
+\catcode`\¡=\@@active \unexpanded\def¡{\'\dotlessi}
+\catcode`\=\@@active \unexpanded\def{\`\dotlessi}
+\catcode`\Œ=\@@active \unexpanded\defŒ{\^\dotlessi}
+
+\catcode`\=\@@active \unexpanded\def{\"u}
+\catcode`\£=\@@active \unexpanded\def£{\'u}
+\catcode`\—=\@@active \unexpanded\def—{\`u}
+\catcode`\–=\@@active \unexpanded\def–{\^u}
+
+\catcode`\=\@@active \unexpanded\def{\'E}
+\catcode`\Ž=\@@active \unexpanded\defŽ{\"A}
+\catcode`\š=\@@active \unexpanded\defš{\"U}
+
+\catcode`\‡=\@@active \unexpanded\def‡{\c c}
+\catcode`\€=\@@active \unexpanded\def€{\c C}
+
+\catcode`\¤=\@@active \unexpanded\def¤{\~n}
+
+\catcode`\á=\@@active \unexpanded\defá{\SS}
+
+\catcode`\®=\@@active
+\catcode`\¯=\@@active
+
+\unexpanded\def®{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
+\unexpanded\def¯{\prewordbreak\rightguillemot}
+
+%D The next section will be changed as soon as we get grip on
+%D the other encodings.
+%D
+%D \starttypen
+%D \appendtoks\lccode`\"=0\to\everysanitize
+%D
+%D \appendtoks\lccode`‰=`e\to\everysanitize
+%D \appendtoks\lccode`‚=`e\to\everysanitize
+%D \appendtoks\lccode`Š=`e\to\everysanitize
+%D \appendtoks\lccode`ˆ=`e\to\everysanitize
+%D
+%D \appendtoks\lccode`„=`a\to\everysanitize
+%D \appendtoks\lccode` =`a\to\everysanitize
+%D \appendtoks\lccode`…=`a\to\everysanitize
+%D \appendtoks\lccode`ƒ=`a\to\everysanitize
+%D
+%D \appendtoks\lccode`”=`o\to\everysanitize
+%D \appendtoks\lccode`¢=`o\to\everysanitize
+%D \appendtoks\lccode`•=`o\to\everysanitize
+%D \appendtoks\lccode`“=`o\to\everysanitize
+%D
+%D \appendtoks\lccode`‹=`i\to\everysanitize
+%D \appendtoks\lccode`¡=`i\to\everysanitize
+%D \appendtoks\lccode`=`i\to\everysanitize
+%D \appendtoks\lccode`Œ=`i\to\everysanitize
+%D
+%D \appendtoks\lccode`=`u\to\everysanitize
+%D \appendtoks\lccode`£=`u\to\everysanitize
+%D \appendtoks\lccode`—=`u\to\everysanitize
+%D \appendtoks\lccode`–=`u\to\everysanitize
+%D
+%D \appendtoks\lccode`=`E\to\everysanitize
+%D \appendtoks\lccode`Ž=`A\to\everysanitize
+%D \appendtoks\lccode`š=`U\to\everysanitize
+%D
+%D \appendtoks\lccode`‡=`c\to\everysanitize
+%D \appendtoks\lccode`€=`c\to\everysanitize
+%D \appendtoks\lccode`¤=`n\to\everysanitize
+%D \appendtoks\lccode`á=`s\to\everysanitize
+%D
+%D \appendtoks\lccode`®=`<\to\everysanitize
+%D \appendtoks\lccode`¯=`<\to\everysanitize
+%D \stoptypen
+
+\protect
+
+\endinput
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
new file mode 100644
index 000000000..f54021504
--- /dev/null
+++ b/tex/context/base/enco-il2.tex
@@ -0,0 +1,175 @@
+%D \module
+%D [ file=enco-il2,
+%D version=1998.12.1,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Czech and Slovak ISO Latin 2 Encoding,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+
+%D This Czech/Slovak encoding is dedicated to Han The Thanh.
+%D The numbers are derived from some files he sent me. This
+%D definition file is (still) sort of beta.
+
+\startmapping[il2]
+
+\definecasemap 165 181 165 \definecasemap 169 185 169
+\definecasemap 171 187 171 \definecasemap 174 190 174
+\definecasemap 181 181 165 \definecasemap 185 185 169
+\definecasemap 187 187 171 \definecasemap 190 190 174
+\definecasemap 192 224 192 \definecasemap 193 225 193
+\definecasemap 196 228 196 \definecasemap 197 229 197
+\definecasemap 200 232 200 \definecasemap 201 233 201
+\definecasemap 204 236 204 \definecasemap 205 237 205
+\definecasemap 207 239 207 \definecasemap 210 242 210
+\definecasemap 211 243 211 \definecasemap 212 244 212
+\definecasemap 214 246 214 \definecasemap 216 248 216
+\definecasemap 217 249 217 \definecasemap 218 250 218
+\definecasemap 220 252 220 \definecasemap 221 253 221
+\definecasemap 224 224 192 \definecasemap 225 225 193
+\definecasemap 228 228 196 \definecasemap 229 229 197
+\definecasemap 232 232 200 \definecasemap 233 233 201
+\definecasemap 236 236 204 \definecasemap 237 237 205
+\definecasemap 239 239 207 \definecasemap 242 242 210
+\definecasemap 243 243 211 \definecasemap 244 244 212
+\definecasemap 246 246 214 \definecasemap 248 248 216
+\definecasemap 249 249 217 \definecasemap 250 250 218
+\definecasemap 252 252 220 \definecasemap 253 253 221
+
+\stopmapping
+
+\startcoding[il2]
+
+%D Most accents are located at their normal position as set
+%D in \PLAIN\ \TEX; only \type {\r} is new.
+
+\defineaccentcommand " 127
+\defineaccentcommand ' 19
+\defineaccentcommand . 95
+\defineaccentcommand = 22
+\defineaccentcommand ^ 94
+\defineaccentcommand ` 18
+\defineaccentcommand ~ 126
+\defineaccentcommand H 125
+\defineaccentcommand u 21
+\defineaccentcommand v 20
+\defineaccentcommand r 23
+
+\defineaccent ' a ^^e1 \defineaccent ' A ^^c1
+\defineaccent ' e ^^e9 \defineaccent ' E ^^c9
+\defineaccent ' i ^^ed \defineaccent ' I ^^cd
+\defineaccent ' {\i} ^^ed
+\defineaccent ' l ^^e5 \defineaccent ' L ^^c5
+\defineaccent ' o ^^f3 \defineaccent ' O ^^d3
+\defineaccent ' r ^^e0 \defineaccent ' R ^^c0
+\defineaccent ' u ^^fa \defineaccent ' U ^^da
+\defineaccent ' y ^^fd \defineaccent ' Y ^^dd
+
+\defineaccent ` a ^^b8 \defineaccent ` A ^^98
+
+\defineaccent ^ o ^^f4 \defineaccent ^ O ^^d4
+
+\defineaccent " a ^^e4 \defineaccent " A ^^c4
+\defineaccent " o ^^f6 \defineaccent " O ^^d6
+\defineaccent " u ^^fc \defineaccent " U ^^dc
+
+\defineaccent v c ^^e8 \defineaccent v C ^^c8
+\defineaccent v d ^^ef \defineaccent v D ^^cf
+\defineaccent v e ^^ec \defineaccent v E ^^cc
+\defineaccent v l ^^b5 \defineaccent v L ^^a5
+\defineaccent v n ^^f2 \defineaccent v N ^^d2
+\defineaccent v r ^^f8 \defineaccent v R ^^d8
+\defineaccent v s ^^b9 \defineaccent v S ^^a9
+\defineaccent v t ^^bb \defineaccent v T ^^ab
+\defineaccent v z ^^be \defineaccent v Z ^^ae
+
+\defineaccent r u ^^f9 \defineaccent r U ^^d9
+
+\def\csencodedrA%
+ {\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
+ \rlap{\raise.67\dimen@\hbox{\char'27}}A}
+
+ \defineaccent r A {\csencodedrA}
+
+\definecharacter ae 26 \definecharacter AE 29
+\definecharacter oe 27 \definecharacter OE 30
+\definecharacter o 28 \definecharacter O 31
+\definecharacter i 16
+\definecharacter j 17
+ \definecharacter SS 25
+
+%D Some rather \PLAIN\ \TEX\ redefinitions.
+
+\def\csencodedb#1
+ {\oalign{\null#1\crcr\hidewidth\sh@ft{29}%
+ \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}
+
+\def\csencodedc#1
+ {\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1\else
+ {\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
+
+\def\csencodedd#1%
+ {\oalign{\null#1\crcr\hidewidth\sh@ft{08}.\hidewidth}}
+
+\definecommand b {\csencodedb}
+\definecommand c {\csencodedc}
+\definecommand d {\csencodedd}
+
+%D Some less \PLAIN\ ones:
+
+\redefinecommand l
+\redefinecommand L
+
+\def\csencodedl%
+ {{\char32l}}
+
+\def\csencodedL% I don't like the \leavevmode here, better \enterhmode
+ {\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
+
+\definecommand l {\csencodedl}
+\definecommand L {\csencodedL}
+
+\stopcoding
+
+% \everyuppercase, font/language specifics ?
+
+% \uccode152=152 \lccode152=184
+% \uccode184=152 \lccode184=184
+% \uccode165=165 \lccode165=181
+% \uccode181=165 \lccode181=181
+% \uccode169=169 \lccode169=185
+% \uccode185=169 \lccode185=185
+% \uccode171=171 \lccode171=187
+% \uccode187=171 \lccode187=187
+% \uccode174=174 \lccode174=190
+% \uccode190=174 \lccode190=190
+% \sfcode254=0 \lccode254=0
+% \sfcode255=0 \lccode255=0
+% \sfcode158=0 \lccode158=0
+% \sfcode159=0 \lccode159=0
+
+% \defineaccent v c '350 \defineaccent v C '310
+% \defineaccent v d '357 \defineaccent v D '317
+% \defineaccent v e '354 \defineaccent v E '314
+% \defineaccent v l '265 \defineaccent v L '245
+% \defineaccent v n '362 \defineaccent v N '322
+% \defineaccent v r '370 \defineaccent v R '330
+% \defineaccent v s '271 \defineaccent v S '251
+% \defineaccent v t '273 \defineaccent v T '253
+% \defineaccent v z '276 \defineaccent v Z '256
+% \defineaccent ' a '341 \defineaccent ' A '301
+% \defineaccent ' e '351 \defineaccent ' E '311
+% \defineaccent ' i '355 \defineaccent ' I '315
+% \defineaccent ' {\i} '355
+% \defineaccent ' l '345 \defineaccent ' L '305
+% \defineaccent ' o '363 \defineaccent ' O '323
+% \defineaccent ' r '340 \defineaccent ' R '300
+% \defineaccent ' u '372 \defineaccent ' U '332
+% \defineaccent ' y '375 \defineaccent ' Y '335
+% \defineaccent ` a '270 \defineaccent ` A '230
+% \defineaccent ^ o '364 \defineaccent ^ O '324
+% \defineaccent " a '344 \defineaccent " A '304
+% \defineaccent " o '366 \defineaccent " O '326
+% \defineaccent " u '374 \defineaccent " U '334
+% \defineaccent r u '371 \defineaccent r U '331
+
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
new file mode 100644
index 000000000..8c9d05cb7
--- /dev/null
+++ b/tex/context/base/enco-ini.tex
@@ -0,0 +1,648 @@
+%D \module
+%D [ file=enco-ini,
+%D version=1998.12.03,
+%D title=\CONTEXT\ Encoding 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.
+
+% \everyuppercase
+% \dotlessi
+% single/double quotes
+% hyphens
+% characterencoding => encoding
+% charactermapping => mapping
+
+%D Most of this module used to be part of the font and language
+%D modules. While implementing Czech support, I decided to
+%D isolate this code.
+
+%D While dealing with input (the text source) and output (the
+%D glyphs), encoding comes into view. To summarize a few:
+%D
+%D \startopsomming
+%D \som Bytes in the input file are mapped to an internal
+%D representation. An~\type {a} often stays an~\type {a},
+%D but~\type {\"e} can become either one code or become
+%D two codes (ending in overlapping glyphs).
+%D \som Characters can be made active and mapped onto another
+%D character.
+%D \som When changing case, characters are mapped onto
+%D themselves, their case||counterpart or a reasonable
+%D alternative, like~\"e onto~e.
+%D \som Single character representations in a \DVI\ file can
+%D be mapped onto one or more characters, either of not
+%D in more than one font file (virtual fonts).
+%D \som In the final format, fonts collections can be
+%D partially embedded, thereby losing the one||to||one
+%D relation between several instances of one font.
+%D \som For special purposes, individual characters should be
+%D mapped onto a dedicated encoding vector, for instance
+%D \PDF\ document encoding.
+%D \stopopsomming
+%D
+%D These and other kind of mappings are to be dealt with, and
+%D the exact way of dealing often depends on the language to be
+%D typeset.
+
+\writestatus{loading}{Context Encoding Macros (ini)}
+
+\unprotect
+
+\startmessages dutch library: encodings
+ title: encoding
+ 1: codering --
+ 2: codering -- wordt geladen
+ 3: onbekende codering --
+\stopmessages
+
+\startmessages english library: encodings
+ title: encoding
+ 1: coding --
+ 2: coding -- is loaded
+ 3: unknown coding --
+\stopmessages
+
+\startmessages german library: encodings
+ title: Kodierung
+ 1: Kodierung --
+ 2: Kodierung -- ist geladen
+ 3: Unbekannte Kodierung --
+\stopmessages
+
+%D First we define a few local constants.
+
+\def\@map@ {@m@ap@} % mapping prefix
+\def\@plain@ {@e@pl@} % plain TeX encoding vector
+
+%D \macro
+%D {useencoding}
+%D
+%D Encodings things are defined in separate files and are
+%D loaded only once, using:
+%D
+%D \showsetup{\y!useencoding}
+
+\def\douseencoding#1%
+ {\doifundefined{\c!file\f!encodingprefix#1}%
+ {\setvalue{\c!file\f!encodingprefix#1}{}%
+ \makeshortfilename[\f!encodingprefix#1]%
+ \startreadingfile
+ \readsysfile{\shortfilename}
+ {\showmessage{\m!encodings}{2}{#1}}
+ {\showmessage{\m!encodings}{3}{#1}}%
+ \stopreadingfile}}
+
+\def\useencoding[#1]%
+ {\processcommalist[#1]\douseencoding}
+
+%D \macros
+%D {startmapping,usemapping}
+%D
+%D In order to process patterns, convert from lower to
+%D uppercase and vise versa and some more, we provide a
+%D mechanism to define mappings. The first real application
+%D of this command was:
+%D
+%D \starttypen
+%D \startmapping [something]
+%D \definecasemap 165 181 165
+%D \definecasemap 171 187 171
+%D ...
+%D \defineuppercasecom \i {I}
+%D \defineuppercasecom \l \L
+%D \definelowercasecom \AE \ae
+%D ...
+%D \stopmapping
+%D \stoptypen
+%D
+%D So, character 165 becomes 181 in uppercase and 165 in
+%D lowercase. A mapping is activated with \type {\usemapping}.
+
+\def\startmapping[#1]%
+ {\pushmacro\charactermapping
+ \def\charactermapping{#1}%
+ \doifundefined{\@map@\charactermapping}
+ {\expanded{\newtoks\csname\@map@\charactermapping\endcsname}}}
+
+\def\stopmapping%
+ {\popmacro\charactermapping}
+
+\def\setmappingtoks%
+ {\@EA\let\@EA\mappingtoks\csname\@map@\charactermapping\endcsname}
+
+\def\definecasemap #1 #2 #3 % code lower upper
+ {\setmappingtoks
+ \appendtoks\setcasemap #1 #2 #3 \to\mappingtoks
+ \ignorespaces}
+
+\def\setcasemap #1 #2 #3 %
+ {\catcode#1=\@@letter
+ \lccode #1=#2
+ \uccode #1=#3 }
+
+\def\definespacemap #1 #2 % code sfcode
+ {\setmappingtoks
+ \appendtoks\setspacemap #1 #2 \to\mappingtoks
+ \ignorespaces}
+
+\def\setspacemap #1 #2 %
+ {\catcode#1=\@@other
+ \lccode #1=0
+ \uccode #1=0
+ \sfcode #1=#2 }
+
+\def\defineuppercasecom#1#2%
+ {\setmappingtoks
+ \appendtoks\setuppercasecom#1{#2}\to\mappingtoks
+ \ignorespaces}
+
+\def\definelowercasecom#1#2%
+ {\setmappingtoks
+ \appendtoks\setlowercasecom#1{#2}\to\mappingtoks
+ \ignorespaces}
+
+\let\setuppercasecom\gobbletwoarguments
+\let\setlowercasecom\gobbletwoarguments
+
+\def\setcasecom#1#2{\def#1{#2}}
+
+\def\usemapping[#1]%
+ {\doifdefined{\@map@#1}{\the\csname\@map@#1\endcsname}}
+
+%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%
+ {\edef\unprotectfontcharacters%
+ {\catcode`\noexpand ~=\the\catcode`~\relax
+ \catcode`\noexpand _=\the\catcode`_\relax
+ \catcode`\noexpand ^=\the\catcode`^\relax}%
+ \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 \texnansiencodedb
+%D \definecommand c \texnansiencodedc
+%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{\characterencoding} and \type{\nocharacterencoding}. These
+%D contain the current and default encoding vectors and both
+%D default to the \PLAIN\ one.
+
+\let\characterencoding = \@plain@
+\let\nocharacterencoding = \@plain@
+\let\charactermapping = \@plain@
+
+%D \macros
+%D {startcoding, setcoding}
+%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. We use the \type
+%D {\start}||\type {\stop}||commands for definitions and the
+%D \type {\set}||command for local switching.
+
+\def\donthandleaccent#1#2%
+ {\getvalue{\characterencoding#1\string#2}}
+
+\def\startcoding[#1]%
+ {\doifelsenothing{#1}
+ {\let\stopcoding\relax}
+ {%\protectfontcharacters % problematic in language loading
+ \showmessage{\m!encodings}{1}{#1}%
+ \pushmacro\dohandleaccent
+ \let\dohandleaccent\donthandleaccent
+ \def\characterencoding{@#1@}%
+ \def\stopcoding%
+ {\popmacro\dohandleaccent
+ \let\characterencoding=\@plain@
+ \unprotectfontcharacters}}} % ??
+
+\def\setcoding[#1]% use grouped!
+ {\doifsomething{#1}
+ {\let\dohandleaccent\donthandleaccent
+ \def\characterencoding{@#1@}%
+ \enablelanguagespecifics[\currentlanguage]}}
+
+\def\startencoding{\startcoding}
+\def\stopencoding {\stopcoding}
+\def\setencoding {\setcoding}
+
+%D The use of these macros are not limited to font
+%D definition files, but may also be used when loading
+%D patterns.
+
+%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%
+ {\protectfontcharacters
+ \dodefineaccent}
+
+\def\dodefineaccent#1 #2 %
+ {\unprotectfontcharacters
+ \dododefineaccent#1 #2 }
+
+\def\dododefineaccent#1 #2 #3 %
+ {\doifnumberelse{#3}
+ {\setvalue{\characterencoding#1\string#2}{\char#3}}
+ {\setvalue{\characterencoding#1\string#2}{#3}}%
+ \unprotectfontcharacters}
+
+\def\definecharacter#1 #2 %
+ {\doifnumberelse{#2}
+ {\setvalue{\characterencoding\string#1}{\char#2}}
+ {\setvalue{\characterencoding\string#1}{#2}}}
+
+%D Instead of numbers, a command may be entered.
+
+\def\definecommand#1 #2 %
+ {\setvalue{\characterencoding\string#1}{#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{\nocharacterencoding\string#1}%
+ \doifundefined{\!!stringa}
+ {\@EA\letvalue\@EA\!!stringa\@EA=\csname\string#1\endcsname}%
+ \setvalue{\string#1}{\dohandleaccent#1}%
+ \unprotectfontcharacters}
+
+%D \macros
+%D {defineaccentcommand}
+%D
+%D When needed, one can overload the default positions of the
+%D accents. The \PLAIN\ \TEX\ defaults are:
+%D
+%D \starttypen
+%D \defineaccentcommand ` 18
+%D \defineaccentcommand ' 19
+%D \defineaccentcommand v 20
+%D \defineaccentcommand u 21
+%D \defineaccentcommand = 22
+%D \defineaccentcommand ^ 94
+%D \defineaccentcommand . 95
+%D \defineaccentcommand H 125 % "7D
+%D \defineaccentcommand ~ 126 % "7E
+%D \defineaccentcommand " 127 % "7F
+%D \stoptypen
+
+\def\defineaccentcommand%
+ {\protectfontcharacters
+ \dodefineaccentcommand}
+
+\def\dodefineaccentcommand#1 #2 %
+ {\doifnumberelse{#2}
+ {\setvalue{\characterencoding\string#1}##1{{\accent#2 ##1}}}
+ {\setvalue{\characterencoding\string#1}##1{{#2##1}}}%
+ \unprotectfontcharacters}
+
+%D We don't have to define them for the default \PLAIN\ case. Commands
+%D may be used instead of character codes.
+
+%D \macros
+%D {normalaccent}
+%D
+%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.
+
+% kan met minder def's en \expandafter...
+
+\let\normalaccent=\accent
+
+\unexpanded\def\dohandleaccent#1%
+ {\def\dodohandleaccent%
+ {\ifx\next\bgroup
+ \def\next{\getvalue{\nocharacterencoding#1}}%
+ \else
+ \def\next{\dododohandleaccent#1}%
+ \fi
+ \next}%
+ \futurelet\next\dodohandleaccent}
+
+\def\dododohandleaccent#1#2%
+ {\bgroup
+ \ifundefined{\characterencoding#1\string#2}%
+ \def\\{\getvalue{\nocharacterencoding#1}#2\egroup}%
+ \else
+ \def\\{\getvalue{\characterencoding#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{\nocharacterencoding#1}%
+ \doifundefined{\!!stringa}
+ {\@EA\letvalue\@EA\!!stringa\@EA=\csname#1\endcsname}%
+ \setvalue{#1}{\dohandlecommand{#1}}}%
+
+\unexpanded\def\dohandlecommand#1%
+ {\doifdefinedelse{\characterencoding#1}
+ {\def\next{\getvalue{\characterencoding#1}}}
+ {\def\next{\getvalue{\nocharacterencoding#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 {everyuppercase, EveryUppercase,
+%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
+\newevery \everylowercase \EveryLowercase
+
+%\appendtoks \def\i{I}\to \everyuppercase
+%\appendtoks \def\j{J}\to \everyuppercase
+%\appendtoks \def\SS{SS}\to \everyuppercase % \SS <= \ss
+%
+%\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 This magic trick maps takes care of mapping from lower to
+%D upper case and reverse.
+
+\appendtoks\let\setuppercasecom\setcasecom\to\everyuppercase
+\appendtoks\let\setlowercasecom\setcasecom\to\everylowercase
+
+\appendtoks\usemapping[\charactermapping]\to\everyuppercase
+\appendtoks\usemapping[\charactermapping]\to\everylowercase
+
+%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 \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 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 % ........
+\redefineaccent r % ........
+
+\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
+\redefinecommand d
+
+\redefinecommand i % \definecharacter i "10
+\redefinecommand j % \definecharacter j "11
+
+\defineaccent " i {\"\i} \defineaccent " j {\"\j}
+\defineaccent ^ i {\^\i} \defineaccent ^ j {\^\j}
+\defineaccent ` i {\`\i} \defineaccent ` j {\`\j}
+\defineaccent ' i {\'\i} \defineaccent ' j {\'\j}
+\defineaccent ~ i {\~\i} \defineaccent ~ j {\~\j}
+
+%D Some more:
+
+\startmapping[\nocharacterencoding]
+
+\defineuppercasecom \i {I}
+\defineuppercasecom \j {J}
+\defineuppercasecom \SS {SS}
+\defineuppercasecom \l \L
+\defineuppercasecom \ae \AE
+\defineuppercasecom \aa \AA
+\defineuppercasecom \o \O
+\defineuppercasecom \oe \OE
+\definelowercasecom \L \l
+\definelowercasecom \AE \ae
+\definelowercasecom \AA \aa
+\definelowercasecom \O \o
+\definelowercasecom \OE \oe
+
+\stopmapping
+
+%D We preload several encodings:
+
+\useencoding[ans,il2,pdf]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex
new file mode 100644
index 000000000..dbf6c717d
--- /dev/null
+++ b/tex/context/base/enco-pdf.tex
@@ -0,0 +1,83 @@
+%D \module
+%D [ file=enco-ans,
+%D version=1995.1.1,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=\YandY\ texnansi Encoding,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+
+%D This is the \PDF\ document encoding.
+
+\startencoding[pdfdoc]
+
+\defineaccent " A ^^c4
+\defineaccent " a ^^e4
+\defineaccent " E ^^cb
+\defineaccent " e ^^eb
+\defineaccent " I ^^cf
+\defineaccent " i ^^ef
+\defineaccent " O ^^d6
+\defineaccent " o ^^f6
+\defineaccent " U ^^dc
+\defineaccent " u ^^fc
+\defineaccent " y ^^ff
+
+\defineaccent ' A ^^c1
+\defineaccent ' a ^^e1
+\defineaccent ' E ^^c9
+\defineaccent ' e ^^e9
+\defineaccent ' I ^^cd
+\defineaccent ' i ^^ed
+\defineaccent ' O ^^d3
+\defineaccent ' o ^^f3
+\defineaccent ' U ^^da
+\defineaccent ' u ^^fa
+\defineaccent ' Y ^^dd
+\defineaccent ' y ^^fd
+
+\defineaccent ^ A ^^c2
+\defineaccent ^ a ^^e2
+\defineaccent ^ E ^^ca
+\defineaccent ^ e ^^ea
+\defineaccent ^ I ^^ce
+\defineaccent ^ i ^^ee
+\defineaccent ^ O ^^d4
+\defineaccent ^ o ^^f4
+\defineaccent ^ U ^^db
+\defineaccent ^ u ^^fb
+
+\defineaccent ` A ^^c0
+\defineaccent ` a ^^e0
+\defineaccent ` E ^^c8
+\defineaccent ` e ^^e8
+\defineaccent ` I ^^cc
+\defineaccent ` i ^^ec
+\defineaccent ` O ^^d2
+\defineaccent ` o ^^f2
+\defineaccent ` U ^^d9
+\defineaccent ` u ^^f9
+
+\defineaccent ~ A ^^c3
+\defineaccent ~ a ^^e3
+\defineaccent ~ N ^^d1
+\defineaccent ~ n ^^f1
+\defineaccent ~ O ^^d5
+\defineaccent ~ o ^^f5
+
+\defineaccent , C ^^c7
+\defineaccent , c ^^e7
+
+\defineaccent < < ^^ab
+\defineaccent > > ^^bb
+
+\definecharacter AE ^^c6
+\definecharacter ae ^^e6
+\definecharacter oA ^^c5
+\definecharacter oa ^^e5
+\definecharacter oe ^^9c
+\definecharacter ss ^^df
+
+\stopencoding
+
+\endinput
diff --git a/tex/context/base/enco-win.tex b/tex/context/base/enco-win.tex
new file mode 100644
index 000000000..af5323145
--- /dev/null
+++ b/tex/context/base/enco-win.tex
@@ -0,0 +1,123 @@
+%D \module
+%D [ file=enco-win,
+%D version=1997.08.29,
+%D title=\CONTEXT\ Encoding Macros,
+%D subtitle=Windows 1252 ANSI keys,
+%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.
+
+%D This module activates the (western) \kap{windows} high \ANSI\
+%D characters, such as ë and á.
+
+\unprotect
+
+\catcode`\À=\@@active \unexpanded\defÀ{\`A}
+\catcode`\Á=\@@active \unexpanded\defÁ{\'A}
+\catcode`\Â=\@@active \unexpanded\defÂ{\^A}
+\catcode`\Ã=\@@active \unexpanded\defÃ{\~A}
+\catcode`\Ä=\@@active \unexpanded\defÄ{\"A}
+\catcode`\Å=\@@active \unexpanded\defÅ{\AA}
+\catcode`\Æ=\@@active \unexpanded\defÆ{\AE}
+
+\catcode`\à=\@@active \unexpanded\defà{\`a}
+\catcode`\á=\@@active \unexpanded\defá{\'a}
+\catcode`\â=\@@active \unexpanded\defâ{\^a}
+\catcode`\ã=\@@active \unexpanded\defã{\~a}
+\catcode`\ä=\@@active \unexpanded\defä{\"a}
+\catcode`\å=\@@active \unexpanded\defå{\aa}
+\catcode`\æ=\@@active \unexpanded\defæ{\ae}
+
+\catcode`\Ç=\@@active \unexpanded\defÇ{\c C}
+\catcode`\ç=\@@active \unexpanded\defç{\c c}
+
+\catcode`\È=\@@active \unexpanded\defÈ{\`E}
+\catcode`\É=\@@active \unexpanded\defÉ{\'E}
+\catcode`\Ê=\@@active \unexpanded\defÊ{\^E}
+\catcode`\Ë=\@@active \unexpanded\defË{\"E}
+
+\catcode`\è=\@@active \unexpanded\defè{\`e}
+\catcode`\é=\@@active \unexpanded\defé{\'e}
+\catcode`\ê=\@@active \unexpanded\defê{\^e}
+\catcode`\ë=\@@active \unexpanded\defë{\"e}
+
+\catcode`\Ì=\@@active \unexpanded\defÌ{\`I}
+\catcode`\Í=\@@active \unexpanded\defÍ{\'I}
+\catcode`\Î=\@@active \unexpanded\defÎ{\^I}
+\catcode`\Ï=\@@active \unexpanded\defÏ{\"I}
+
+\catcode`\ì=\@@active \unexpanded\defì{\`i}
+\catcode`\í=\@@active \unexpanded\defí{\'i}
+\catcode`\î=\@@active \unexpanded\defî{\^i}
+\catcode`\ï=\@@active \unexpanded\defï{\"i}
+
+\catcode`\Ñ=\@@active \unexpanded\defÑ{\~N}
+\catcode`\ñ=\@@active \unexpanded\defñ{\~n}
+
+\catcode`\Ò=\@@active \unexpanded\defÒ{\`O}
+\catcode`\Ó=\@@active \unexpanded\defÓ{\'O}
+\catcode`\Ô=\@@active \unexpanded\defÔ{\^O}
+\catcode`\Õ=\@@active \unexpanded\defÕ{\~O}
+\catcode`\Ö=\@@active \unexpanded\defÖ{\"O}
+\catcode`\Œ=\@@active \unexpanded\defŒ{\OE}
+\catcode`\Ø=\@@active \unexpanded\defØ{\O}
+
+\catcode`\ò=\@@active \unexpanded\defò{\`o}
+\catcode`\ó=\@@active \unexpanded\defó{\'o}
+\catcode`\ô=\@@active \unexpanded\defô{\^o}
+\catcode`\õ=\@@active \unexpanded\defõ{\~o}
+\catcode`\ö=\@@active \unexpanded\defö{\"o}
+\catcode`\œ=\@@active \unexpanded\defœ{\oe}
+\catcode`\ø=\@@active \unexpanded\defø{\o}
+
+\catcode`\Š=\@@active \unexpanded\defŠ{\v{S}}
+\catcode`\š=\@@active \unexpanded\defš{\v{s}}
+\catcode`\ß=\@@active \unexpanded\defß{\SS}
+
+\catcode`\Ù=\@@active \unexpanded\defÙ{\`U}
+\catcode`\Ú=\@@active \unexpanded\defÚ{\'U}
+\catcode`\Û=\@@active \unexpanded\defÛ{\^U}
+\catcode`\Ü=\@@active \unexpanded\defÜ{\"U}
+
+\catcode`\ù=\@@active \unexpanded\defù{\`u}
+\catcode`\ú=\@@active \unexpanded\defú{\'u}
+\catcode`\û=\@@active \unexpanded\defû{\^u}
+\catcode`\ü=\@@active \unexpanded\defü{\"u}
+
+\catcode`\Ý=\@@active \unexpanded\defÝ{\'Y}
+\catcode`\ý=\@@active \unexpanded\defý{\'y}
+\catcode`\ÿ=\@@active \unexpanded\defÿ{\"y}
+
+\catcode`\¿=\@@active \unexpanded\def¿{?`}
+\catcode`\¡=\@@active \unexpanded\def¡{!`}
+\catcode`\†=\@@active \unexpanded\def†{\dag}
+\catcode`\‡=\@@active \unexpanded\def‡{\ddag}
+\catcode`\¶=\@@active \unexpanded\def¶{\P}
+\catcode`\§=\@@active \unexpanded\def§{\S}
+\catcode`\–=\@@active \unexpanded\def–{--}
+\catcode`\—=\@@active \unexpanded\def—{---}
+\catcode`\…=\@@active \unexpanded\def…{\dots}
+\catcode`\©=\@@active \unexpanded\def©{\copyright}
+\catcode`\£=\@@active \unexpanded\def£{\pounds}
+
+\catcode`\„=\@@active \unexpanded\def„{\char44\kern-.1em\char44}
+\catcode`\“=\@@active \unexpanded\def“{\char96\kern-.1em\char96}
+\catcode`\”=\@@active \unexpanded\def”{\char34}
+\catcode`\‘=\@@active \unexpanded\def‘{\upperleftsinglesixquote}
+\catcode`\’=\@@active \unexpanded\def’{\char39}
+\catcode`\›=\@@active \unexpanded\def›{\rightsubguillemot}
+\catcode`\‹=\@@active \unexpanded\def‹{\leftsubguillemot}
+
+\catcode`\«=\@@active
+\catcode`\»=\@@active
+
+\unexpanded\def«{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
+\unexpanded\def»{\prewordbreak\rightguillemot}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/font-ams.tex b/tex/context/base/font-ams.tex
index 11e104120..be264f3ce 100644
--- a/tex/context/base/font-ams.tex
+++ b/tex/context/base/font-ams.tex
@@ -1,497 +1,506 @@
-%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.
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt] [mm]
- [ma=msam10 sa 1,
- mb=msbm10 sa 1]
-
-\definebodyfont [8pt,7pt] [mm]
- [ma=msam7 sa 1,
- mb=msbm7 sa 1]
-
-\definebodyfont [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
+%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.
+
+\definefontsynonym [MathAlpha] [msam10]
+\definefontsynonym [MathBeta] [msbm10]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt] [mm]
+ [ma=msam10 sa 1,
+ mb=msbm10 sa 1]
+
+\definebodyfont [8pt,7pt] [mm]
+ [ma=msam7 sa 1,
+ mb=msbm7 sa 1]
+
+\definebodyfont [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=\mafam
+\let\msbfam=\mbfam
+
+\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.
+
+\unprotect % \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}.
+
+\let\normalundefine\undefine
+\let\normalnewsymbol\newsymbol
+
+\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 \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 \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.
+
+\let\undefine\normalundefine
+\let\newsymbol\normalnewsymbol
+
+\protect % \catcode`\@=\csname pre amssym.tex at\endcsname
+
+\endinput
diff --git a/tex/context/base/font-ber.tex b/tex/context/base/font-ber.tex
new file mode 100644
index 000000000..16b2cfa7a
--- /dev/null
+++ b/tex/context/base/font-ber.tex
@@ -0,0 +1,46 @@
+%D \module
+%D [ file=font-ber,
+%D version=1998.4.11,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Karl Berry Font Names,
+%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.
+
+\definefontsynonym [Baskerville] [mbvr8a]
+\definefontsynonym [Baskerville-Italic] [mbvri8a]
+\definefontsynonym [Baskerville-Bold] [mbvb8a]
+\definefontsynonym [Baskerville-BoldItalic] [mbvbi8a]
+\definefontsynonym [Baskerville-SemiBold] [mbvs8a]
+\definefontsynonym [Baskerville-SemiBoldItalic] [mbvsi8a]
+
+\definefontsynonym [Courier] [pcrr]
+\definefontsynonym [Courier-Oblique] [pcrro]
+\definefontsynonym [Helvetica] [phvr]
+\definefontsynonym [Helvetica-Oblique] [phvro]
+\definefontsynonym [Helvetica-Bold] [phvb]
+\definefontsynonym [Helvetica-BoldOblique] [phvbo]
+\definefontsynonym [Times-Roman] [ptmr]
+\definefontsynonym [Times-Italic] [ptmri]
+\definefontsynonym [Times-Bold] [ptmb]
+\definefontsynonym [Times-BoldItalic] [ptmbi]
+
+\definefontsynonym [AvantGarde] [pag]
+\definefontsynonym [BookmanLight] [pbk]
+\definefontsynonym [CentaurMT] [pur]
+\definefontsynonym [Garamond] [pgm]
+\definefontsynonym [GillSans] [pgs]
+\definefontsynonym [NewBaskerville] [pnb]
+\definefontsynonym [Optima] [pop]
+\definefontsynonym [Palatino] [ppl]
+\definefontsynonym [Symbol] [psy]
+\definefontsynonym [Univers] [pun]
+\definefontsynonym [Utopia] [put]
+\definefontsynonym [ZapfChancery] [pzc]
+\definefontsynonym [ZapfDingbats] [pzd]
+
+\endinput
diff --git a/tex/context/base/font-cmr.tex b/tex/context/base/font-cmr.tex
index 8915a8b24..959b33fde 100644
--- a/tex/context/base/font-cmr.tex
+++ b/tex/context/base/font-cmr.tex
@@ -1,502 +1,538 @@
-%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.
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [12pt] [mm]
- [ex=cmex10 at 12pt,
- mi=cmmi12,
- sy=cmsy10 at 12pt]
-
-\definebodyfont [12pt] [hw]
- [tf=cmtt12]
-
-\definebodyfont [12pt] [cg]
- [tf=cmtt12]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [11pt] [tt]
- [tf=cmtt10 at 11pt,
- sl=cmsltt10 at 11pt,
- it=cmitt10 at 11pt]
-
-\definebodyfont [11pt] [mm]
- [ex=cmex10 at 11pt,
- mi=cmmi10 at 11pt,
- sy=cmsy10 at 11pt]
-
-\definebodyfont [11pt] [hw]
- [tf=cmtt10 at 11pt]
-
-\definebodyfont [11pt] [cg]
- [tf=cmtt10 at 11pt]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [10pt] [tt]
- [tf=cmtt10,
- sl=cmsltt10,
- it=cmitt10,
- tfa=cmtt10 scaled \magstep1,
- tfb=cmtt10 scaled \magstep2,
- tfc=cmtt10 scaled \magstep3,
- tfd=cmtt10 scaled \magstep4]
-
-\definebodyfont [10pt] [mm]
- [ex=cmex10,
- mi=cmmi10,
- sy=cmsy10]
-
-\definebodyfont [10pt] [hw]
- [tf=cmtt10]
-
-\definebodyfont [10pt] [cg]
- [tf=cmtt10]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [9pt] [tt]
- [tf=cmtt9,
- sl=cmsltt10 at 9pt,
- it=cmitt10 at 9pt]
-
-\definebodyfont [9pt] [mm]
- [ex=cmex10 at 9pt,
- mi=cmmi9,
- sy=cmsy9]
-
-\definebodyfont [9pt] [hw]
- [tf=cmtt9]
-
-\definebodyfont [9pt] [cg]
- [tf=cmtt9]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [8pt] [tt]
- [tf=cmtt8,
- sl=cmsltt10 at 8pt,
- it=cmitt10 at 8pt]
-
-\definebodyfont [8pt] [mm]
- [ex=cmex10 at 8pt,
- mi=cmmi8,
- sy=cmsy8]
-
-\definebodyfont [8pt] [hw]
- [tf=cmtt8]
-
-\definebodyfont [8pt] [cg]
- [tf=cmtt8]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [7pt] [tt]
- [tf=cmtt10 at 7pt,
- sl=cmsltt10 at 7pt,
- it=cmitt10 at 7pt]
-
-\definebodyfont [7pt] [mm]
- [ex=cmex10 at 7pt,
- mi=cmmi7,
- sy=cmsy7]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [6pt] [tt]
- [tf=cmtt10 at 6pt,
- sl=cmsltt10 at 6pt,
- it=cmitt10 at 6pt]
-
-\definebodyfont [6pt] [mm]
- [ex=cmex10 at 6pt,
- mi=cmmi6,
- sy=cmsy6]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [5pt] [tt]
- [tf=cmtt10 at 5pt,
- sl=cmsltt10 at 5pt,
- it=cmitt10 at 5pt]
-
-\definebodyfont [5pt] [mm]
- [ex=cmex10 at 5pt,
- mi=cmmi5,
- sy=cmsy5]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [4pt] [tt]
- [tf=cmtt10 at 4pt,
- sl=cmsltt10 at 4pt,
- it=cmitt10 at 4pt]
-
-\definebodyfont [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.
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [7pt] [rm]
- [bfa=cmbx7 scaled \magstep1,
- bfb=cmbx7 scaled \magstep2,
- bfc=cmbx7 scaled \magstep3,
- bfd=cmbx7 scaled \magstep4]
-
-\definebodyfont [6pt] [rm]
- [bfa=cmbx6 scaled \magstep1,
- bfb=cmbx6 scaled \magstep2,
- bfc=cmbx6 scaled \magstep3,
- bfd=cmbx6 scaled \magstep4]
-
-\definebodyfont [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]
-
-\definebodyfont [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]
-
-\definebodyfont [12pt] [tt]
- [sla=cmsltt10 scaled \magstep2,
- slb=cmsltt10 scaled \magstep3,
- slc=cmsltt10 scaled \magstep4,
- sld=cmsltt10 scaled \magstep5]
-
-\definebodyfont [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
+%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.
+
+%D Now watch these definitions. They permits us to generate
+%D undefined sizes on the fly. We take 10 point as starting
+%D point.
+
+\definefontsynonym [Serif] [ComputerModern]
+\definefontsynonym [SerifBold] [ComputerModern-Bold]
+\definefontsynonym [SerifItalic] [ComputerModern-Italic]
+\definefontsynonym [SerifSlanted] [ComputerModern-Slanted]
+\definefontsynonym [SerifBoldItalic] [ComputerModern-BoldItalic]
+\definefontsynonym [SerifBoldSlanted] [ComputerModern-BoldSlanted]
+\definefontsynonym [SerifCaps] [ComputerModern-Caps]
+
+\definefontsynonym [Sans] [ComputerModernSans]
+\definefontsynonym [SansBold] [ComputerModernSans-Bold]
+\definefontsynonym [SansItalic] [ComputerModernSans-Italic]
+\definefontsynonym [SansSlanted] [ComputerModernSans-Slanted]
+\definefontsynonym [SansBoldItalic] [ComputerModernSans-BoldItalic]
+\definefontsynonym [SansBoldSlanted] [ComputerModernSans-BoldSlanted]
+\definefontsynonym [SansCaps] [ComputerModernSans-Caps]
+
+\definefontsynonym [Mono] [ComputerModernMono]
+\definefontsynonym [MonoBold] [ComputerModernMono-Bold]
+\definefontsynonym [MonoItalic] [ComputerModernMono-Italic]
+\definefontsynonym [MonoSlanted] [ComputerModernMono-Slanted]
+\definefontsynonym [MonoBoldItalic] [ComputerModernMono-BoldItalic]
+\definefontsynonym [MonoBoldSlanted] [ComputerModernMono-BoldSlanted]
+\definefontsynonym [MonoCaps] [ComputerModernMono-Caps]
+
+\definefontsynonym [MathRoman] [ComputerModernMath-Roman]
+\definefontsynonym [MathExtension] [ComputerModernMath-Extension]
+\definefontsynonym [MathItalic] [ComputerModernMath-Italic]
+\definefontsynonym [MathSymbol] [ComputerModernMath-Symbol]
+
+\definefontsynonym [OldStyle] [MathItalic]
+
+%D What follows next is the main definition part.
+
+\definebodyfont [12pt] [rm]
+ [ tf=cmr12,
+ tfa=cmr12 scaled \magstep1,
+ tfb=cmr12 scaled \magstep2,
+ tfc=cmr12 scaled \magstep3,
+ tfd=cmr12 scaled \magstep4,
+ bf=cmbx12,
+ it=cmti12,
+ sl=cmsl12,
+ bi=cmbxti10 at 12pt,
+ bs=cmbxsl10 at 12pt,
+ sc=cmcsc10 at 12pt]
+
+\definebodyfont [12pt] [ss]
+ [ tf=cmss12,
+ tfa=cmss12 scaled \magstep1,
+ tfb=cmss12 scaled \magstep2,
+ tfc=cmss12 scaled \magstep3,
+ tfd=cmss12 scaled \magstep4,
+ bf=cmssbx10 at 12pt,
+ it=cmssi12,
+ sl=cmssi12,
+ bi=cmssbx10 at 12pt,
+ bs=cmssbx10 at 12pt,
+ sc=cmss10 at 12pt]
+
+\definebodyfont [12pt] [tt]
+ [ tf=cmtt12,
+ tfa=cmtt12 scaled \magstep1,
+ tfb=cmtt12 scaled \magstep2,
+ tfc=cmtt12 scaled \magstep3,
+ tfd=cmtt12 scaled \magstep4,
+ sl=cmsltt10 at 12pt,
+ it=cmitt10 at 12pt]
+
+\definebodyfont [12pt] [mm]
+ [ex=cmex10 at 12pt,
+ mi=cmmi12,
+ sy=cmsy10 at 12pt]
+
+\definebodyfont [12pt] [hw]
+ [tf=cmtt12]
+
+\definebodyfont [12pt] [cg]
+ [tf=cmtt12]
+
+\definebodyfont [11pt] [rm]
+ [ tf=cmr10 at 11pt,
+ tfa=cmr9 scaled \magstep2,
+ tfb=cmr9 scaled \magstep3,
+ tfc=cmr9 scaled \magstep4,
+ tfd=cmr9 scaled \magstep5,
+ bf=cmbx10 at 11pt,
+ sl=cmsl10 at 11pt,
+ it=cmti10 at 11pt,
+ bi=cmbxti10 at 11pt,
+ bs=cmbxsl10 at 11pt,
+ sc=cmcsc10 at 11pt]
+
+\definebodyfont [11pt] [ss]
+ [ tf=cmss10 at 11pt,
+ tfa=cmss9 scaled \magstep2,
+ tfb=cmss9 scaled \magstep3,
+ tfc=cmss9 scaled \magstep4,
+ tfd=cmss9 scaled \magstep5,
+ bf=cmssbx10 at 11pt,
+ it=cmssi10 at 11pt,
+ sl=cmssi10 at 11pt,
+ bi=cmssbx10 at 11pt,
+ bs=cmssbx10 at 11pt,
+ sc=cmss10 at 11pt]
+
+\definebodyfont [11pt] [tt]
+ [tf=cmtt10 at 11pt,
+ sl=cmsltt10 at 11pt,
+ it=cmitt10 at 11pt]
+
+\definebodyfont [11pt] [mm]
+ [ex=cmex10 at 11pt,
+ mi=cmmi10 at 11pt,
+ sy=cmsy10 at 11pt]
+
+\definebodyfont [11pt] [hw]
+ [tf=cmtt10 at 11pt]
+
+\definebodyfont [11pt] [cg]
+ [tf=cmtt10 at 11pt]
+
+\definebodyfont [10pt] [rm]
+ [ tf=cmr10,
+ tfa=cmr10 scaled \magstep1,
+ tfb=cmr10 scaled \magstep2,
+ tfc=cmr10 scaled \magstep3,
+ tfd=cmr10 scaled \magstep4,
+ bf=cmbx10,
+ it=cmti10,
+ sl=cmsl10,
+ bi=cmbxti10,
+ bs=cmbxsl10,
+ sc=cmcsc10]
+
+\definebodyfont [10pt] [ss]
+ [ tf=cmss10,
+ tfa=cmss10 scaled \magstep1,
+ tfb=cmss10 scaled \magstep2,
+ tfc=cmss10 scaled \magstep3,
+ tfd=cmss10 scaled \magstep4,
+ bf=cmssbx10,
+ it=cmssi10,
+ sl=cmssi10,
+ bi=cmssbx10,
+ bs=cmssbx10,
+ sc=cmss10]
+
+\definebodyfont [10pt] [tt]
+ [ tf=cmtt10,
+ tfa=cmtt10 scaled \magstep1,
+ tfb=cmtt10 scaled \magstep2,
+ tfc=cmtt10 scaled \magstep3,
+ tfd=cmtt10 scaled \magstep4,
+ sl=cmsltt10,
+ it=cmitt10]
+
+\definebodyfont [10pt] [mm]
+ [ex=cmex10,
+ mi=cmmi10,
+ sy=cmsy10]
+
+\definebodyfont [10pt] [hw]
+ [tf=cmtt10]
+
+\definebodyfont [10pt] [cg]
+ [tf=cmtt10]
+
+\definebodyfont [9pt] [rm]
+ [ tf=cmr9,
+ tfa=cmr9 scaled \magstep1,
+ tfb=cmr9 scaled \magstep2,
+ tfc=cmr9 scaled \magstep3,
+ tfd=cmr9 scaled \magstep4,
+ bf=cmbx9,
+ it=cmti9,
+ sl=cmsl9,
+ bi=cmbxti10 at 9pt,
+ bs=cmbxsl10 at 9pt,
+ sc=cmcsc10 at 9pt]
+
+\definebodyfont [9pt] [ss]
+ [ tf=cmss9,
+ tfa=cmss9 scaled \magstep1,
+ tfb=cmss9 scaled \magstep2,
+ tfc=cmss9 scaled \magstep3,
+ tfd=cmss9 scaled \magstep4,
+ bf=cmssbx10 at 9pt,
+ it=cmssi9,
+ sl=cmssi9,
+ bi=cmssbx10 at 9pt,
+ bs=cmssbx10 at 9pt,
+ sc=cmss9]
+
+\definebodyfont [9pt] [tt]
+ [tf=cmtt9,
+ sl=cmsltt10 at 9pt,
+ it=cmitt10 at 9pt]
+
+\definebodyfont [9pt] [mm]
+ [ex=cmex10 at 9pt,
+ mi=cmmi9,
+ sy=cmsy9]
+
+\definebodyfont [9pt] [hw]
+ [tf=cmtt9]
+
+\definebodyfont [9pt] [cg]
+ [tf=cmtt9]
+
+\definebodyfont [8pt] [rm]
+ [ tf=cmr8,
+ tfa=cmr8 scaled \magstep1,
+ tfb=cmr8 scaled \magstep2,
+ tfc=cmr8 scaled \magstep3,
+ tfd=cmr8 scaled \magstep4,
+ bf=cmbx8,
+ it=cmti8,
+ sl=cmsl8,
+ bi=cmbxti10 at 8pt,
+ bs=cmbxsl10 at 8pt,
+ sc=cmcsc10 at 8pt]
+
+\definebodyfont [8pt] [ss]
+ [ tf=cmss8,
+ tfa=cmss8 scaled \magstep1,
+ tfb=cmss8 scaled \magstep2,
+ tfc=cmss8 scaled \magstep3,
+ tfd=cmss8 scaled \magstep4,
+ bf=cmssbx10 at 8pt,
+ it=cmssi8,
+ sl=cmssi8,
+ bi=cmssbx10 at 8pt,
+ bs=cmssbx10 at 8pt,
+ sc=cmss8]
+
+\definebodyfont [8pt] [tt]
+ [tf=cmtt8,
+ sl=cmsltt10 at 8pt,
+ it=cmitt10 at 8pt]
+
+\definebodyfont [8pt] [mm]
+ [ex=cmex10 at 8pt,
+ mi=cmmi8,
+ sy=cmsy8]
+
+\definebodyfont [8pt] [hw]
+ [tf=cmtt8]
+
+\definebodyfont [8pt] [cg]
+ [tf=cmtt8]
+
+\definebodyfont [7pt] [rm]
+ [ tf=cmr7,
+ tfa=cmr7 scaled \magstep1,
+ tfb=cmr7 scaled \magstep2,
+ tfc=cmr7 scaled \magstep3,
+ tfd=cmr7 scaled \magstep4,
+ bf=cmbx7,
+ it=cmti10 at 7pt,
+ sl=cmsl10 at 7pt,
+ bi=cmbxti10 at 7pt,
+ bs=cmbxsl10 at 7pt,
+ sc=cmcsc10 at 7pt]
+
+\definebodyfont [7pt] [ss]
+ [ tf=cmss10 at 7pt,
+ tfa=cmss8, % scaled 1000,
+ tfb=cmss8 scaled \magstep1,
+ tfc=cmss8 scaled \magstep2,
+ tfd=cmss8 scaled \magstep3,
+ bf=cmssbx10 at 7pt,
+ it=cmssi10 at 7pt,
+ sl=cmssi10 at 7pt,
+ bs=cmssbx10 at 7pt,
+ bi=cmssbx10 at 7pt,
+ sc=cmss10 at 7pt]
+
+\definebodyfont [7pt] [tt]
+ [tf=cmtt10 at 7pt,
+ sl=cmsltt10 at 7pt,
+ it=cmitt10 at 7pt]
+
+\definebodyfont [7pt] [mm]
+ [ex=cmex10 at 7pt,
+ mi=cmmi7,
+ sy=cmsy7]
+
+\definebodyfont [6pt] [rm]
+ [ tf=cmr6,
+ tfa=cmr6 scaled \magstep1,
+ tfb=cmr6 scaled \magstep2,
+ tfc=cmr6 scaled \magstep3,
+ tfd=cmr6 scaled \magstep4,
+ bf=cmbx6,
+ it=cmti10 at 6pt,
+ sl=cmsl10 at 6pt,
+ bi=cmbxti10 at 6pt,
+ bs=cmbxsl10 at 6pt,
+ sc=cmcsc10 at 6pt]
+
+\definebodyfont [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 6pt]
+
+\definebodyfont [6pt] [tt]
+ [tf=cmtt10 at 6pt,
+ sl=cmsltt10 at 6pt,
+ it=cmitt10 at 6pt]
+
+\definebodyfont [6pt] [mm]
+ [ex=cmex10 at 6pt,
+ mi=cmmi6,
+ sy=cmsy6]
+
+\definebodyfont [5pt] [rm]
+ [ tf=cmr5,
+ tfa=cmr5 scaled \magstep1,
+ tfb=cmr5 scaled \magstep2,
+ tfc=cmr5 scaled \magstep3,
+ tfd=cmr5 scaled \magstep4,
+ bf=cmbx5,
+ it=cmti10 at 5pt,
+ sl=cmsl10 at 5pt,
+ bi=cmbxti10 at 5pt,
+ bs=cmbxsl10 at 5pt,
+ sc=cmcsc10 at 5pt]
+
+\definebodyfont [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 5pt]
+
+\definebodyfont [5pt] [tt]
+ [tf=cmtt10 at 5pt,
+ sl=cmsltt10 at 5pt,
+ it=cmitt10 at 5pt]
+
+\definebodyfont [5pt] [mm]
+ [ex=cmex10 at 5pt,
+ mi=cmmi5,
+ sy=cmsy5]
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [4pt] [tt]
+ [tf=cmtt10 at 4pt,
+ sl=cmsltt10 at 4pt,
+ it=cmitt10 at 4pt]
+
+\definebodyfont [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.
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [7pt] [rm]
+ [bfa=cmbx7 scaled \magstep1,
+ bfb=cmbx7 scaled \magstep2,
+ bfc=cmbx7 scaled \magstep3,
+ bfd=cmbx7 scaled \magstep4]
+
+\definebodyfont [6pt] [rm]
+ [bfa=cmbx6 scaled \magstep1,
+ bfb=cmbx6 scaled \magstep2,
+ bfc=cmbx6 scaled \magstep3,
+ bfd=cmbx6 scaled \magstep4]
+
+\definebodyfont [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]
+
+\definebodyfont [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]
+
+\definebodyfont [12pt] [tt]
+ [sla=cmsltt10 scaled \magstep2,
+ slb=cmsltt10 scaled \magstep3,
+ slc=cmsltt10 scaled \magstep4,
+ sld=cmsltt10 scaled \magstep5]
+
+\definebodyfont [10pt] [tt]
+ [sla=cmsltt10 scaled \magstep1,
+ slb=cmsltt10 scaled \magstep2,
+ slc=cmsltt10 scaled \magstep3,
+ sld=cmsltt10 scaled \magstep4]
+
+\endinput
diff --git a/tex/context/base/font-con.tex b/tex/context/base/font-con.tex
index edaf77f96..bd8412750 100644
--- a/tex/context/base/font-con.tex
+++ b/tex/context/base/font-con.tex
@@ -1,62 +1,61 @@
-%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.
-
-\definebodyfont [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
-
-\definebodyfont [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
-
-\definebodyfont [10pt] [rm]
- [tf=ccr10,
- it=ccti10,
- sl=ccsl10,
- sc=cccsc10]
-
-\definebodyfont [9pt] [rm]
- [tf=ccr9,
- it=ccr9,
- sl=ccr9,
- sc=ccr9]
-
-\definebodyfont [8pt] [rm]
- [tf=ccr8,
- it=ccr8,
- sl=ccr8,
- sc=ccr8]
-
-\definebodyfont [7pt] [rm]
- [tf=ccr7,
- it=ccr7,
- sl=ccr7,
- sc=ccr7]
-
-\definebodyfont [6pt] [rm]
- [tf=ccr6,
- it=ccr6,
- sl=ccr6,
- sc=ccr6]
-
-\definebodyfont [5pt] [rm]
- [tf=ccr5,
- it=ccr5,
- sl=ccr5,
- sc=ccr5]
-
-\endinput
- \ No newline at end of file
+%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.
+
+\definebodyfont [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
+
+\definebodyfont [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
+
+\definebodyfont [10pt] [rm]
+ [tf=ccr10,
+ it=ccti10,
+ sl=ccsl10,
+ sc=cccsc10]
+
+\definebodyfont [9pt] [rm]
+ [tf=ccr9,
+ it=ccr9,
+ sl=ccr9,
+ sc=ccr9]
+
+\definebodyfont [8pt] [rm]
+ [tf=ccr8,
+ it=ccr8,
+ sl=ccr8,
+ sc=ccr8]
+
+\definebodyfont [7pt] [rm]
+ [tf=ccr7,
+ it=ccr7,
+ sl=ccr7,
+ sc=ccr7]
+
+\definebodyfont [6pt] [rm]
+ [tf=ccr6,
+ it=ccr6,
+ sl=ccr6,
+ sc=ccr6]
+
+\definebodyfont [5pt] [rm]
+ [tf=ccr5,
+ it=ccr5,
+ sl=ccr5,
+ sc=ccr5]
+
+\endinput
diff --git a/tex/context/base/font-csr.tex b/tex/context/base/font-csr.tex
new file mode 100644
index 000000000..01bef5e84
--- /dev/null
+++ b/tex/context/base/font-csr.tex
@@ -0,0 +1,48 @@
+%D \module
+%D [ file=font-csr,
+%D version=1998.12.1,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Computer Modern Czech/Slovak,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+
+%D For Than.
+
+\definefontsynonym [Serif] [csr10] [encoding=il2]
+\definefontsynonym [SerifBold] [csbx10] [encoding=il2]
+\definefontsynonym [SerifItalic] [csti10] [encoding=il2]
+\definefontsynonym [SerifSlanted] [cssl10] [encoding=il2]
+\definefontsynonym [SerifBoldItalic] [csbxti10] [encoding=il2]
+\definefontsynonym [SerifBoldSlanted] [csbxsl10] [encoding=il2]
+\definefontsynonym [SerifCaps] [csr10] [encoding=il2]
+
+\definefontsynonym [Sans] [csss10] [encoding=il2]
+\definefontsynonym [SansBold] [csssbx10] [encoding=il2]
+\definefontsynonym [SansItalic] [csssi10] [encoding=il2]
+\definefontsynonym [SansSlanted] [csssi10] [encoding=il2]
+\definefontsynonym [SansBoldItalic] [csssbx10] [encoding=il2]
+\definefontsynonym [SansBoldSlanted] [csssbx10] [encoding=il2]
+\definefontsynonym [SansCaps] [csss10] [encoding=il2]
+
+\definefontsynonym [Mono] [cstt10] [encoding=il2]
+\definefontsynonym [MonoBold] [cstt10] [encoding=il2]
+\definefontsynonym [MonoItalic] [csitt10] [encoding=il2]
+\definefontsynonym [MonoSlanted] [cssltt10] [encoding=il2]
+\definefontsynonym [MonoBoldItalic] [cstt10] [encoding=il2]
+\definefontsynonym [MonoBoldSlanted] [cstt10] [encoding=il2]
+\definefontsynonym [MonoCaps] [cstt10] [encoding=il2]
+
+\definefontsynonym [MathRoman] [csr10] [encoding=il2]
+\definefontsynonym [MathExtension] [cmex10]
+\definefontsynonym [MathItalic] [cmmi10]
+\definefontsynonym [MathSymbol] [cmsy10]
+
+\definefontsynonym [OldStyle] [MathItalic]
+
+\definebodyfont
+ [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt]
+ [rm,ss,tt,mm]
+ [default]
+
+\endinput
diff --git a/tex/context/base/font-def.tex b/tex/context/base/font-def.tex
deleted file mode 100644
index 8f310665d..000000000
--- a/tex/context/base/font-def.tex
+++ /dev/null
@@ -1,66 +0,0 @@
-%D \module
-%D [ file=font-def,
-%D version=1998.11.4,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=Default Font Names,
-%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.
-
-\definefilesynonym [Courier] [com]
-\definefilesynonym [Courier-Oblique] [coo]
-\definefilesynonym [Helvetica] [hv]
-\definefilesynonym [Helvetica-Oblique] [hvo]
-\definefilesynonym [Helvetica-Bold] [hvb]
-\definefilesynonym [Helvetica-BoldOblique] [hvbo]
-\definefilesynonym [Times-Roman] [tir]
-\definefilesynonym [Times-Italic] [tii]
-\definefilesynonym [Times-Bold] [tib]
-\definefilesynonym [Times-BoldItalic] [tibi]
-
-\definefilesynonym [LucidaBlackletter] [lbl]
-\definefilesynonym [LucidaBright] [lbr]
-\definefilesynonym [LucidaBright-Demi] [lbd]
-\definefilesynonym [LucidaBright-DemiItalic] [lbdi]
-\definefilesynonym [LucidaBright-Italic] [lbi]
-\definefilesynonym [LucidaBrightSmallcaps] [lbrsc]
-\definefilesynonym [LucidaBrightSmallcaps-Demi] [lbdsc]
-\definefilesynonym [LucidaBright-Oblique] [lbsl]
-\definefilesynonym [LucidaCalligraphy-Italic] [lbc]
-\definefilesynonym [LucidaCasual] [lbkr]
-\definefilesynonym [LucidaCasual-Italic] [lbki]
-\definefilesynonym [LucidaFax] [lfr]
-\definefilesynonym [LucidaFax-Demi] [lfd]
-\definefilesynonym [LucidaFax-DemiItalic] [lfdi]
-\definefilesynonym [LucidaFax-Italic] [lfi]
-\definefilesynonym [LucidaHandwriting-Italic] [lbh]
-\definefilesynonym [LucidaSans] [lsr]
-\definefilesynonym [LucidaSans-Demi] [lsd]
-\definefilesynonym [LucidaSans-DemiItalic] [lsdi]
-\definefilesynonym [LucidaSans-Italic] [lsi]
-\definefilesynonym [LucidaSans-Bold] [lsb]
-\definefilesynonym [LucidaSans-BoldItalic] [lsbi]
-\definefilesynonym [LucidaSans-Typewriter] [lstr]
-\definefilesynonym [LucidaSans-TypewriterBold] [lstb]
-\definefilesynonym [LucidaSans-TypewriterBoldOblique] [lstbo]
-\definefilesynonym [LucidaSans-TypewriterOblique] [lsto]
-\definefilesynonym [LucidaTypewriter] [lbtr]
-\definefilesynonym [LucidaTypewriterBold] [lbtb]
-\definefilesynonym [LucidaTypewriterBoldOblique] [lbtbo]
-\definefilesynonym [LucidaTypewriterOblique] [lbto]
-\definefilesynonym [LucidaNewMath-AltDemiItalic] [lbmdo]
-\definefilesynonym [LucidaNewMath-AltItalic] [lbmo]
-\definefilesynonym [LucidaNewMath-Arrows] [lbma]
-\definefilesynonym [LucidaNewMath-Arrows-Demi] [lbmad]
-\definefilesynonym [LucidaNewMath-Extension] [lbme]
-\definefilesynonym [LucidaNewMath-Roman] [lbmr]
-\definefilesynonym [LucidaNewMath-Demibold] [lbmd]
-\definefilesynonym [LucidaNewMath-DemiItalic] [lbmdi]
-\definefilesynonym [LucidaNewMath-Italic] [lbmi]
-\definefilesynonym [LucidaNewMath-Symbol] [lbms]
-\definefilesynonym [LucidaNewMath-Symbol-Demi] [lbmsd]
- \ No newline at end of file
diff --git a/tex/context/base/font-eul.tex b/tex/context/base/font-eul.tex
index 90e1da267..8d356fbbe 100644
--- a/tex/context/base/font-eul.tex
+++ b/tex/context/base/font-eul.tex
@@ -1,174 +1,173 @@
-%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.
-
-\definebodyfont [12pt] [mm] % scaled \magstep1
- [mi=eurm10 at 12pt,
- ex=euex10 at 12pt,
- ma=euex10 at 12pt,
- mb=eusm10 at 12pt,
- mc=eufm10 at 12pt]
-
-\definebodyfont [11pt] [mm] % scaled \magstephalf
- [mi=eurm10 at 11pt,
- ex=euex10 at 11pt,
- ma=euex10 at 11pt,
- mb=eusm10 at 11pt,
- mc=eufm10 at 11pt]
-
-\definebodyfont [10pt] [mm]
- [mi=eurm10,
- ex=euex10,
- ma=euex10,
- mb=eusm10,
- mc=eufm10]
-
-\definebodyfont [9pt] [mm]
- [mi=eurm10 at 9pt,
- ex=euex10 at 9pt,
- ma=euex10 at 9pt,
- mb=eusm10 at 9pt,
- mc=eufm10 at 9pt]
-
-\definebodyfont [8pt] [mm]
- [mi=eurm7 at 8pt,
- ex=euex10 at 8pt,
- ma=euex10 at 8pt,
- mb=eusm7 at 8pt,
- mc=eufm7 at 8pt]
-
-\definebodyfont [7pt] [mm]
- [mi=eurm7,
- ex=euex10 at 7pt,
- ma=euex10 at 7pt,
- mb=eusm7,
- mc=eufm7]
-
-\definebodyfont [6pt] [mm]
- [mi=eurm7 at 6pt,
- ex=euex10 at 6pt,
- ma=euex10 at 6pt,
- mb=eusm7 at 6pt,
- mc=eufm7 at 6pt]
-
-\definebodyfont [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
+%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.
+
+\definebodyfont [12pt] [mm] % scaled \magstep1
+ [mi=eurm10 at 12pt,
+ ex=euex10 at 12pt,
+ ma=euex10 at 12pt,
+ mb=eusm10 at 12pt,
+ mc=eufm10 at 12pt]
+
+\definebodyfont [11pt] [mm] % scaled \magstephalf
+ [mi=eurm10 at 11pt,
+ ex=euex10 at 11pt,
+ ma=euex10 at 11pt,
+ mb=eusm10 at 11pt,
+ mc=eufm10 at 11pt]
+
+\definebodyfont [10pt] [mm]
+ [mi=eurm10,
+ ex=euex10,
+ ma=euex10,
+ mb=eusm10,
+ mc=eufm10]
+
+\definebodyfont [9pt] [mm]
+ [mi=eurm10 at 9pt,
+ ex=euex10 at 9pt,
+ ma=euex10 at 9pt,
+ mb=eusm10 at 9pt,
+ mc=eufm10 at 9pt]
+
+\definebodyfont [8pt] [mm]
+ [mi=eurm7 at 8pt,
+ ex=euex10 at 8pt,
+ ma=euex10 at 8pt,
+ mb=eusm7 at 8pt,
+ mc=eufm7 at 8pt]
+
+\definebodyfont [7pt] [mm]
+ [mi=eurm7,
+ ex=euex10 at 7pt,
+ ma=euex10 at 7pt,
+ mb=eusm7,
+ mc=eufm7]
+
+\definebodyfont [6pt] [mm]
+ [mi=eurm7 at 6pt,
+ ex=euex10 at 6pt,
+ ma=euex10 at 6pt,
+ mb=eusm7 at 6pt,
+ mc=eufm7 at 6pt]
+
+\definebodyfont [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
diff --git a/tex/context/base/font-fil.tex b/tex/context/base/font-fil.tex
new file mode 100644
index 000000000..ace7a73a3
--- /dev/null
+++ b/tex/context/base/font-fil.tex
@@ -0,0 +1,102 @@
+%D \module
+%D [ file=font-fil,
+%D version=1998.11.4,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Original Font Names,
+%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.
+
+\definefontsynonym [ComputerModern] [cmr10]
+\definefontsynonym [ComputerModern-Bold] [cmbx10]
+\definefontsynonym [ComputerModern-Italic] [cmti10]
+\definefontsynonym [ComputerModern-Slanted] [cmsl10]
+\definefontsynonym [ComputerModern-BoldItalic] [cmbxti10]
+\definefontsynonym [ComputerModern-BoldSlanted] [cmbxsl10]
+\definefontsynonym [ComputerModern-Caps] [cmr10]
+
+\definefontsynonym [ComputerModernSans] [cmss10]
+\definefontsynonym [ComputerModernSans-Bold] [cmssbx10]
+\definefontsynonym [ComputerModernSans-Italic] [cmssi10]
+\definefontsynonym [ComputerModernSans-Slanted] [cmssi10]
+\definefontsynonym [ComputerModernSans-BoldItalic] [cmssbx10]
+\definefontsynonym [ComputerModernSans-BoldSlanted] [cmssbx10]
+\definefontsynonym [ComputerModernSans-Caps] [cmss10]
+
+\definefontsynonym [ComputerModernMono] [cmtt10]
+\definefontsynonym [ComputerModernMono-Bold] [cmtt10]
+\definefontsynonym [ComputerModernMono-Italic] [cmitt10]
+\definefontsynonym [ComputerModernMono-Slanted] [cmsltt10]
+\definefontsynonym [ComputerModernMono-BoldItalic] [cmtt10]
+\definefontsynonym [ComputerModernMono-BoldSlanted] [cmtt10]
+\definefontsynonym [ComputerModernMono-Caps] [cmtt10]
+
+\definefontsynonym [ComputerModernMath-Roman] [cmr10]
+\definefontsynonym [ComputerModernMath-Extension] [cmex10]
+\definefontsynonym [ComputerModernMath-Italic] [cmmi10]
+\definefontsynonym [ComputerModernMath-Symbol] [cmsy10]
+
+\definefontsynonym [Courier] [com] [encoding=texnansi]
+\definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi]
+\definefontsynonym [Helvetica] [hv] [encoding=texnansi]
+\definefontsynonym [Helvetica-Oblique] [hvo] [encoding=texnansi]
+\definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi]
+\definefontsynonym [Helvetica-BoldOblique] [hvbo] [encoding=texnansi]
+\definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
+\definefontsynonym [Times-Italic] [tii] [encoding=texnansi]
+\definefontsynonym [Times-Bold] [tib] [encoding=texnansi]
+\definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi]
+
+\definefontsynonym [LucidaBlackletter] [lbl] [encoding=texnansi]
+\definefontsynonym [LucidaBright] [lbr] [encoding=texnansi]
+\definefontsynonym [LucidaBright-Demi] [lbd] [encoding=texnansi]
+\definefontsynonym [LucidaBright-DemiItalic] [lbdi] [encoding=texnansi]
+\definefontsynonym [LucidaBright-Italic] [lbi] [encoding=texnansi]
+\definefontsynonym [LucidaBrightSmallcaps] [lbrsc] [encoding=texnansi]
+\definefontsynonym [LucidaBrightSmallcaps-Demi] [lbdsc] [encoding=texnansi]
+\definefontsynonym [LucidaBright-Oblique] [lbsl] [encoding=texnansi]
+\definefontsynonym [LucidaCalligraphy-Italic] [lbc] [encoding=texnansi]
+\definefontsynonym [LucidaCasual] [lbkr] [encoding=texnansi]
+\definefontsynonym [LucidaCasual-Italic] [lbki] [encoding=texnansi]
+\definefontsynonym [LucidaFax] [lfr] [encoding=texnansi]
+\definefontsynonym [LucidaFax-Demi] [lfd] [encoding=texnansi]
+\definefontsynonym [LucidaFax-DemiItalic] [lfdi] [encoding=texnansi]
+\definefontsynonym [LucidaFax-Italic] [lfi] [encoding=texnansi]
+\definefontsynonym [LucidaHandwriting-Italic] [lbh] [encoding=texnansi]
+\definefontsynonym [LucidaSans] [lsr] [encoding=texnansi]
+\definefontsynonym [LucidaSans-Demi] [lsd] [encoding=texnansi]
+\definefontsynonym [LucidaSans-DemiItalic] [lsdi] [encoding=texnansi]
+\definefontsynonym [LucidaSans-Italic] [lsi] [encoding=texnansi]
+\definefontsynonym [LucidaSans-Bold] [lsb] [encoding=texnansi]
+\definefontsynonym [LucidaSans-BoldItalic] [lsbi] [encoding=texnansi]
+\definefontsynonym [LucidaSans-Typewriter] [lstr] [encoding=texnansi]
+\definefontsynonym [LucidaSans-TypewriterBold] [lstb] [encoding=texnansi]
+\definefontsynonym [LucidaSans-TypewriterBoldOblique] [lstbo] [encoding=texnansi]
+\definefontsynonym [LucidaSans-TypewriterOblique] [lsto] [encoding=texnansi]
+\definefontsynonym [LucidaTypewriter] [lbtr] [encoding=texnansi]
+\definefontsynonym [LucidaTypewriterBold] [lbtb] [encoding=texnansi]
+\definefontsynonym [LucidaTypewriterBoldOblique] [lbtbo] [encoding=texnansi]
+\definefontsynonym [LucidaTypewriterOblique] [lbto] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-AltDemiItalic] [lbmdo] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-AltItalic] [lbmo] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Arrows] [lbma] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Arrows-Demi] [lbmad] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Extension] [lbme] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Roman] [lbmr] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Demibold] [lbmd] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-DemiItalic] [lbmdi] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Italic] [lbmi] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Symbol] [lbms] [encoding=texnansi]
+\definefontsynonym [LucidaNewMath-Symbol-Demi] [lbmsd] [encoding=texnansi]
+
+\definefontsynonym [AntykwaTorunska-Bold] [anttb]
+\definefontsynonym [AntykwaTorunska-Regular] [anttr]
+\definefontsynonym [AntykwaTorunska-Italic] [anttri]
+
+\definefontsynonym [ContextNavigation] [contnav]
+
+\endinput
diff --git a/tex/context/base/font-ibm.tex b/tex/context/base/font-ibm.tex
index 6a9fe35cd..90174be2c 100644
--- a/tex/context/base/font-ibm.tex
+++ b/tex/context/base/font-ibm.tex
@@ -1,107 +1,2 @@
-%D \module
-%D [ file=font-ibm,
-%D version=1995.1.1,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=IBM Keys,
-%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 activates the \kap{IBM PC} high \ASCII\
-%D characters, such as ‰ and á.
-
-\unprotect
-
-\catcode`\‰=\@@active \unexpanded\def‰{\"e}
-\catcode`\‚=\@@active \unexpanded\def‚{\'e}
-\catcode`\Š=\@@active \unexpanded\defŠ{\`e}
-\catcode`\ˆ=\@@active \unexpanded\defˆ{\^e}
-
-\catcode`\„=\@@active \unexpanded\def„{\"a}
-\catcode`\ =\@@active \unexpanded\def {\'a}
-\catcode`\…=\@@active \unexpanded\def…{\`a}
-\catcode`\ƒ=\@@active \unexpanded\defƒ{\^a}
-
-\catcode`\”=\@@active \unexpanded\def”{\"o}
-\catcode`\¢=\@@active \unexpanded\def¢{\'o}
-\catcode`\•=\@@active \unexpanded\def•{\`o}
-\catcode`\“=\@@active \unexpanded\def“{\^o}
-
-\catcode`\‹=\@@active \unexpanded\def‹{\"\dotlessi}
-\catcode`\¡=\@@active \unexpanded\def¡{\'\dotlessi}
-\catcode`\=\@@active \unexpanded\def{\`\dotlessi}
-\catcode`\Œ=\@@active \unexpanded\defŒ{\^\dotlessi}
-
-\catcode`\=\@@active \unexpanded\def{\"u}
-\catcode`\£=\@@active \unexpanded\def£{\'u}
-\catcode`\—=\@@active \unexpanded\def—{\`u}
-\catcode`\–=\@@active \unexpanded\def–{\^u}
-
-\catcode`\=\@@active \unexpanded\def{\'E}
-\catcode`\Ž=\@@active \unexpanded\defŽ{\"A}
-\catcode`\š=\@@active \unexpanded\defš{\"U}
-
-\catcode`\‡=\@@active \unexpanded\def‡{\c c}
-\catcode`\€=\@@active \unexpanded\def€{\c C}
-
-\catcode`\¤=\@@active \unexpanded\def¤{\~n}
-
-\catcode`\á=\@@active \unexpanded\defá{\SS}
-
-\catcode`\®=\@@active
-\catcode`\¯=\@@active
-
-\unexpanded\def®{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
-\unexpanded\def¯{\prewordbreak\rightguillemot}
-
-%D The next section will be changed as soon as we get grip on
-%D the other encodings.
-%D
-%D \starttypen
-%D \appendtoks\lccode`\"=0\to\everysanitize
-%D
-%D \appendtoks\lccode`‰=`e\to\everysanitize
-%D \appendtoks\lccode`‚=`e\to\everysanitize
-%D \appendtoks\lccode`Š=`e\to\everysanitize
-%D \appendtoks\lccode`ˆ=`e\to\everysanitize
-%D
-%D \appendtoks\lccode`„=`a\to\everysanitize
-%D \appendtoks\lccode` =`a\to\everysanitize
-%D \appendtoks\lccode`…=`a\to\everysanitize
-%D \appendtoks\lccode`ƒ=`a\to\everysanitize
-%D
-%D \appendtoks\lccode`”=`o\to\everysanitize
-%D \appendtoks\lccode`¢=`o\to\everysanitize
-%D \appendtoks\lccode`•=`o\to\everysanitize
-%D \appendtoks\lccode`“=`o\to\everysanitize
-%D
-%D \appendtoks\lccode`‹=`i\to\everysanitize
-%D \appendtoks\lccode`¡=`i\to\everysanitize
-%D \appendtoks\lccode`=`i\to\everysanitize
-%D \appendtoks\lccode`Œ=`i\to\everysanitize
-%D
-%D \appendtoks\lccode`=`u\to\everysanitize
-%D \appendtoks\lccode`£=`u\to\everysanitize
-%D \appendtoks\lccode`—=`u\to\everysanitize
-%D \appendtoks\lccode`–=`u\to\everysanitize
-%D
-%D \appendtoks\lccode`=`E\to\everysanitize
-%D \appendtoks\lccode`Ž=`A\to\everysanitize
-%D \appendtoks\lccode`š=`U\to\everysanitize
-%D
-%D \appendtoks\lccode`‡=`c\to\everysanitize
-%D \appendtoks\lccode`€=`c\to\everysanitize
-%D \appendtoks\lccode`¤=`n\to\everysanitize
-%D \appendtoks\lccode`á=`s\to\everysanitize
-%D
-%D \appendtoks\lccode`®=`<\to\everysanitize
-%D \appendtoks\lccode`¯=`<\to\everysanitize
-%D \stoptypen
-
-\protect
-
-\endinput
+\writestatus{ENCODING}{please use \string\useencoding[ibm] instead}\wait
+\input enco-ibm.tex \endinput
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index d9ee543b0..e374e469a 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -1,2664 +1,2921 @@
-%D \module
-%D [ file=font-ini,
-%D version=1997.11.15,
-%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: bodyfont
- 1: coding --, one could use grouping
- 2: variant -- is loaded
- 3: unknown variant --
- 4: bodyfont -- 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 calligraphic \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 specify 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 bodyfont 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 bodyfont 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) + bodyfont (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 bodyfont
-%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.
-
-\chardef\mrfam=0 % 0 (Plain TeX) Math Roman
-\chardef\mifam=1 % 1 (Plain TeX) Math Italic
-\chardef\syfam=2 % 2 (Plain TeX) Math Symbol
-\chardef\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 Because Taco needs a few more math families, we reuse
-%D family~7 for all those typefaces that have no related
-%D family, and therefore are grouped into one.
-
-\let\nnfam\ttfam % 7 (ReUsed) NoName
-
-%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 is reused, at the moment we have one families left:~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}
-
-\edef\hexnnfam {\hexnumber\nnfam}
-
-%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@} % bodyfont 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 This list will be extended when needed with (pseudo)
-%D families. The speude ones will in fact use the NoName
-%D family.
-
-%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 \macros
-%D {normalaccent}
-%D
-%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.
-
-\let\normalaccent=\accent
-
-\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 bodyfontsize 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}
-
-\def\splitfontdefinition#1 #2 #3 #4\end%
- {\def\somefontname{#1}%
- \doifelse{#2}{*}
- {\let\somefontspec=\empty}
- {\def\somefontspec{ #2 #3}}}
-
-\def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed!
- {\edef\fontscale{#2}%
- \expandafter\splitfontdefinition#1 * * \end
- \ifx\fontscale\empty \else
- \scaledfont=#4\relax
- \def\somefontspec{ at \fontscale\scaledfont}%
- \fi
- \expandafter\font\csname#4#5\endcsname=
- \truefilename{\somefontname}\somefontspec\relax}
-
-%D While looking for fonts, filesynonyms are for accessing
-%D the files!
-
-%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 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. Here we also handle the
-%D optional hyphenchar definitions, like:
-%D
-%D \starttypen
-%D \definebodyfont [12pt] [rm] [hyphenchar=45]
-%D \stoptypen
-
-\def\dodoloadfont#1#2#3#4%
- {\expanded{\docalculatefont\getvalue{\??ft#1#2#3} sa sa*#1*#2#3*}%
- \doifdefinedelse{#1#2\s!hyphenchar}
- {\expandafter\hyphenchar\csname#1#2#3\endcsname=
- \getvalue{#1#2\s!hyphenchar}\relax}
- {\expandafter\hyphenchar\csname#1#2#3\endcsname=
- #4\relax}%
- \getvalue{#1#2#3}}
-
-%D The loading macro is used in two macros. One of them takes
-%D care of fixed width teletype fonts.
-
-\def\doloadfont#1#2#3%
- {\debuggerinfo{\m!fonts}{loaded #1#2#3}%
- \dodoloadfont{#1}{#2}{#3}{45}}
-
-\def\doloadttfont#1#2#3%
- {\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}%
- \dodoloadfont{#1}{#2}{#3}{-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 {definebodyfontenvironment}
-%D
-%D The relationship between the several sizes of a font, is
-%D defined by:
-%D
-%D \showsetup{\y!definebodyfontenvironment}
-%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 \definebodyfontenvironment
-%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 bodyfont 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\definebodyfontenvironment%
- {\dodoubleempty\dodefinebodyfontenvironment}
-
-\def\dodefinebodyfontenvironment[#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,
- \c!interlinie=]}%
- \getparameters[\??ft#1][#2]%
- \let\c!text=\c!savedtext
- \setvalue{\@size@#1}{\docompletefontswitch[#1]}}
-
-%D We default all parameters to the main bodyfont size (begin
-%D \type{#1}), so the next setup is valid too:
-%D
-%D \starttypen
-%D \definebodyfontenvironment[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 {definebodyfont}
-%D
-%D The next step in defining a bodyfont 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!definebodyfont}
-%D
-%D This commands takes three arguments, where \ShowArgument\
-%D takes a (series of) bodyfont size(s) and \ShowArgument\
-%D the style group to which the definitions belong.
-%D
-%D Argument \ShowArgument\ 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 \definebodyfont [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 \definebodyfont [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\definebodyfont%
- {\dotripleargument\dodefinebodyfont}
-
-%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\dodefinebodyfont[#1][#2][#3]%
- {\ifthirdargument
- \def\dododefinebodyfont##1%
- {\dodododefinebodyfont[##1][#2][#3]}%
- \processcommalist[#1]\dododefinebodyfont
- \else
- \definebodyfont[#1][\c!rm][#2]%
- \fi}
-
-%D Defining a bodyfont 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 bodyfont size related fonts. The first step is bodyfont
-%D independant but executed every time. This permits user
-%D definitions like \type{\tfw} or \type{\bfq} for real large
-%D alternatives.
-
-\def\dodododefinebodyfont[#1][#2][#3]%
- {\geteparameters[\??ft#1#2][#3]% We expand them!
- \dodefinebodyfontenvironment[#1][]% Just to be sure.
- \def\doiffamily##1##2##3\\% adapted
- {\doifinstringelse{##1##2}\familylist
- {}
- {\addtocommalist{##1##2}\familylist
- %\settextfonts
- \unexpanded\setvalue{##1##2}%
- {\getvalue{#2}\getvalue{##1##2}}%
- \unexpanded\setvalue{##1##2\c!x}%
- {\getvalue{##1##2}\getvalue{##1##2\c!x}}%
- \unexpanded\setvalue{##1##2\c!xx}%
- {\getvalue{##1##2}\getvalue{##1##2\c!xx}}}%
- \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%
- {\doifnot{##1}{\s!hyphenchar}
- {\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}%
- \doifnot{#2}{\c!mm} % new!
- {\expandafter\doiffamily##1\\}}}%
- \processassignlist[#3]\dodefinefont}
-
-%D Unknown families are added to the family list! For the
-%D moment we also set the direct calls here. Some day a better
-%D solution will be implemented.
-
-%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 {everybodyfont,Everybodyfont}
-%D
-%D Every change in bodyfont 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 \everybodyfont \Everybodyfont
-
-%D At the system level one can initialize thing like:
-%D
-%D \starttypen
-%D \appendtoks \setupspacing \to \everybodyfont
-%D \stoptypen
-%D
-%D While users can add their own non standard commands like:
-%D
-%D \starttypen
-%D \Everybodyfont{\message{changing to bodyfont \the\bodyfontsize}}
-%D \stoptypen
-%D
-%D Personnaly I never felt the need for such extensions, but
-%D at least its possible.
-
-%D \macros
-%D {globalbodyfontsize,localbodyfontsize}
-%D
-%D Next we'll do the tough job of font switching. Here we
-%D have to distinguish between the global (overal) bodyfont
-%D size and the local (sometimes in the textflow) size. We
-%D store these dimensions in two \DIMENSION\ registers.
-
-\newdimen\globalbodyfontsize \globalbodyfontsize=12pt
-\newdimen\localbodyfontsize \localbodyfontsize =\globalbodyfontsize
-
-%D \macros
-%D {bodyfontsize}
-%D
-%D These two registers are not to be misused in calculations.
-%D For this purpose we keep a copy:
-
-\newdimen\bodyfontsize \bodyfontsize=\globalbodyfontsize
-
-%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 {bodyfontfactor,bodyfontpoints}
-%D
-%D For multiplication purposes we keep an auxiliary counter
-%D and macro (here the expansion is not explicitly needed):
-
-\newcount\bodyfontpoints \dimensiontocount\bodyfontsize\bodyfontpoints
-
-\edef\bodyfontfactor{\withoutpt\the\bodyfontsize}
-
-%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 specifie the bodyfont size. Therefore
-%D we also store the normalized value.
-
-\def\normalizebodyfontsize#1\to#2%
- {\scratchdimen=#1\relax
- \doifinstringelse{.0}{\withoutpt\the\scratchdimen}
- {\dimensiontocount\scratchdimen\scratchcounter
- \edef#2{\the\scratchcounter pt}}
- {\edef#2{\the\scratchdimen}}}
-
-\normalizebodyfontsize\bodyfontsize\to\normalizedglobalbodyfontsize
-\normalizebodyfontsize\bodyfontsize\to\normalizedlocalbodyfontsize
-\normalizebodyfontsize\bodyfontsize\to\normalizedbodyfontsize
-
-%D To be internationalized:
-
-\def\korpsgrootte {\bodyfontsize}
-\def\korpspunten {\bodyfontpoints}
-
-%D some day.
-
-%D \macros
-%D {fontsize,fontstyle}
-%D
-%D Within a bodyfont, 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 \type{font-cmr}. These files are loaded by:
-
-\def\doreadfontdefinitionfile#1%
- {\doifundefined{\c!file\f!fontprefix#1}%
- {\setvalue{\c!file\f!fontprefix#1}{}%
- \makeshortfilename[\f!fontprefix\truefilename{#1}]%
- \startreadingfile
- \readsysfile{\shortfilename}
- {\showmessage{\m!fonts}{2}{#1}}
- {\showmessage{\m!fonts}{3}{#1}}%
- \stopreadingfile}}
-
-%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 inactive 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}%
- \localbodyfontsize=#1\relax
- \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize
- \the\everybodyfont}
- {\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{\definebodyfont} 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 bodyfont 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 bodyfont 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}{\normalizedbodyfontsize\normalspace\fontstyle}%
- \doswitchpoints[\normalizedbodyfontsize]%
- \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 bodyfont size.
-
-\def\dosetfont[#1]%
- {\doifelse{#1}{\v!globaal}
- {\restoreglobalbodyfont}
- {\processcommalist[#1]\dodosetfont
- \ifloadingfonts\else
- \doswitchpoints[\normalizedbodyfontsize]%
- \doswitchstyle[\fontstyle]%
- \fi}%
- \chardef\currentxfontsize=0\relax}
-
-\def\dodosetfont#1%
- {\dododosetfont{#1}{\showmessage{\m!fonts}{4}{#1}}}
-
-\def\dododosetfont#1#2%
- {\doifnumberelse{#1}
- {\scratchdimen=#1\relax
- \normalizebodyfontsize\scratchdimen\to\normalizedsetfont
- \doifdefinedelse{\@size@\normalizedsetfont}
- {\localbodyfontsize=\normalizedsetfont
- \let\normalizedbodyfontsize=\normalizedsetfont}
- {#2\dosetsubstitutefont{#1}}}
- {\doifelse{#1}{\v!reset}
- {\def\fontsize{}}
- {\doifdefinedelse{\@style@#1}
- {\edef\fontstyle{#1}}
- {\doreadfontdefinitionfile{#1}}}}}
-
-%D In the previous macros we use \type{\currentxfontsize} to
-%D hold the current x||size of the font. This enables us to
-%D support for instance \type{\sl} inside a \type{\tx} switch.
-
-\chardef\currentxfontsize=0
-
-%D When users specify for instance a 13 point bodyfont while no
-%D such bodyfont is defined, the system automatically tries to
-%D find a best fit, that is the nearest smaller defined
-%D bodyfontzize. 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{\normalizedbodyfontsize#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 bodyfontenvironment are
-%D used. Here we also set \type{\currentxfontsize}.
-
-\def\dosetsomextypeface#1%
- {\doifdefinedelse{#1}
- {\getvalue{#1}}
- {\showmessage{\m!fonts}{7}{#1}}}%
-
-\def\dosetxtypeface#1%
- {\chardef\currentxfontsize=1
- \ifmmode
- \scriptstyle
- \else
- \dosetsomextypeface
- {\getvalue{\??ft\normalizedbodyfontsize\c!x}% % pt
- \getvalue{\@shortstyle@\fontstyle}% % rm
- #1}% % tf
- \unexpanded\def\tx{\dosetxxtypeface{#1}}%
- \fi}
-
-\def\dosetxxtypeface#1%
- {\chardef\currentxfontsize=2
- \ifmmode
- \scriptscriptstyle
- \else
- \dosetsomextypeface
- {\getvalue{\??ft\normalizedbodyfontsize\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#3%
- {\def\setfamily##1##2%
- {\doifdefinedelse{##2\c!mm#2}
- {\debuggerinfo{\m!fonts}{##2#1#2 overruled by ##2\c!mm#2}%
- \getvalue{##2\c!mm#2}\relax % activate font
- \expandafter##1\getvalue{#3\s!fam}=\getvalue{##2\c!mm#2}}
- {\doifdefinedelse{##2#1#2}
- {\debuggerinfo{\m!fonts}{defined ##2#1#2}%
- \getvalue{##2#1#2}\relax % activate font
- \expandafter##1\getvalue{#3\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{#3\s!fam}=\getvalue{##2#1\c!tf}}
- {\debuggerinfo{\m!fonts}{not defined ##2#1#2}}}}}%
- \scriptscriptfont\getvalue{#3\s!fam}=\scriptfont\getvalue{#3\s!fam}%
- \setfamily\scriptscriptfont\scriptscriptface
- \scriptfont \getvalue{#3\s!fam}=\textfont \getvalue{#3\s!fam}%
- \setfamily\scriptfont\scriptface
- \textfont \getvalue{#3\s!fam}=\textfont \tffam
- \setfamily\textfont\textface}
-
-%D The previous macro lets definitions like
-%D
-%D \starttypen
-%D \definebodyfont[mm][10pt][bf=cmbx10 at 10.25pt]
-%D \stoptypen
-%D
-%D take preference over
-%D
-%D \starttypen
-%D \definebodyfont[rm][10pt][bf=cmbx10 at 10pt]
-%D \stoptypen
-
-%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%
- {\doifdefinedelse{##1\s!fam} % added
- {\settextfamily{#2}{##1}{##1}}
- {\settextfamily{#2}{##1}{\c!nn}}%
- \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 Optionally skew characters can be set on a per font basis,
-%D like:
-%D
-%D \starttypen
-%D \definebodyfont
-%D [12pt] [mm]
-%D [mi=cmmi10,sy=cmsy10,syskewchar='50]
-%D \stoptypen
-%D
-%D When setting the \type{\skewchar} we need to test on the
-%D availability first.
-
-\def\setskewchar#1#2%
- {\doifdefined{#1}
- {\doifdefinedelse{\??ft#1\s!skewchar}
- {\dosetskewchar{#1}{\getvalue{\??ft#1\s!skewchar}}}
- {\dosetskewchar{#1}{#2}}}}
-
-\def\dosetskewchar#1#2%
- {\getvalue{#1}\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 \setupbodyfont
-%D [ams]
-%D
-%D \definebodyfont [24pt] [mm]
-%D [ma=msam10 at 24pt,
-%D mb=msbm10 at 24pt]
-%D
-%D \switchtobodyfont
-%D [24pt]
-%D
-%D This is a 24pt $\blacktriangleleft$
-%D \stoptypen
-%D
-%D Here we didn't define the 24 point bodyfont 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{\everybodyfont}
-
-\def\docompletefontswitch[#1]%
- {\bodyfontsize=#1\relax
- \dimensiontocount\bodyfontsize\bodyfontpoints
- \edef\bodyfontfactor{\withoutpt\the\bodyfontsize}%
- \normalizebodyfontsize\bodyfontsize\to\normalizedbodyfontsize
- \edef\textface{\getvalue{\??ft\normalizedbodyfontsize\s!text}}%
- \edef\scriptface{\getvalue{\??ft\normalizedbodyfontsize\s!script}}%
- \edef\scriptscriptface{\getvalue{\??ft\normalizedbodyfontsize\s!scriptscript}}%
- \settextfonts
- \setmathfamilies
- \rmtf
- \the\everybodyfont}
-
-%D \macros
-%D {setupbodyfont,switchtobodyfont}
-%D
-%D The next two macros are user ones. With \type{\setupbodyfont}
-%D one can set the document bodyfont size, font family, style
-%D and/or options defined in files, for example:
-%D
-%D \starttypen
-%D \setupbodyfont[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 \switchtobodyfont[10pt]
-%D \stoptypen
-%D
-%D So we've got:
-%D
-%D \showsetup{\y!setupbodyfont}
-%D \showsetup{\y!switchtobodyfont}
-%D
-%D Both macros look alike. The second one also has to take
-%D all kind of keywords into account.
-
-\def\setupbodyfont[#1]%
- {\doifsomething{#1}
- {\dosetfont[#1]%
- \globalbodyfontsize=\localbodyfontsize
- \normalizebodyfontsize\globalbodyfontsize\to\normalizedglobalbodyfontize
- \let\globalfontstyle=\fontstyle
- \the\everybodyfont}}
-
-\unexpanded\def\switchtobodyfont[#1]%
- {\doifsomething{#1}
- {\doifdefinedelse{\??ft\normalizedbodyfontsize\interfaced{#1}}
- {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced{#1}}]%
- \doswitchstyle[\fontstyle]}
- {\dosetfont[#1]}%
- \the\everybodyfont}}
-
-%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}%
- \doifdefinedelse{#1\s!fam} % adapted
- {\edef\mffam{\getvalue{#1\s!fam}}}
- {\edef\mffam{\getvalue{\c!nn\s!fam}}}%
- \textfont \mrfam=\textfont \mffam
- \scriptfont \mrfam=\scriptfont \mffam
- \scriptscriptfont\mrfam=\scriptscriptfont\mffam}
-
-\let\fontalternative=\c!tf
-
-\def\dosettypeface#1#2%
- {\doifdefinedelse{@\normalizedbodyfontsize#1#2@}
- {\edef\charactercoding{\getvalue{@\normalizedbodyfontsize#1#2@}}}
- {\let\charactercoding=\@plain@}%
- \def\fontalternative{#2}%
- \unexpanded\def\tx%
- {\dosetxtypeface{#2\fontsize}}%
- \unexpanded\def\txx%
- {\dosetxxtypeface{#2\fontsize}}%
- \doifdefinedelse{#2\s!fam} % adapted
- {\expandafter\fam\getvalue{#2\s!fam}}
- {\expandafter\fam\getvalue{\c!nn\s!fam}}%
- \def\mf{\donottest{\dosetmathfont{#2}}}%
- \donottest\getvalue{#1#2}%
- \ifcase\currentxfontsize\or\tx\or\txx\fi}
-
-%D Just an experiment: \type{..\sl..\switchstyleonly\tt..}.
-
-\def\switchstyleonly#1%
- {\let\savedfontalternative=\fontalternative
- \chardef\savedescapechar=\escapechar
- \escapechar=-1
- \getvalue{\string#1}%
- \escapechar=\savedescapechar
- \getvalue{\savedfontalternative}}
-
-%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.}
-
-\unexpanded\def\os%
- {\getvalue{\normalizedbodyfontsize\c!mm\c!mi}}
-
-%D \macros
-%D {definebodyfontswitch}
-%D
-%D \PLAIN\ \TEX\ defines some macro's like \type{\tenpoint}
-%D to switch to a specific bodyfontsize. Just for the sake of
-%D compatibility we can define them like:
-%D
-%D \starttypen
-%D \definebodyfontswitch [twelvepoint] [12pt]
-%D \stoptypen
-%D
-%D We don't support language specific synonyms here, mainly
-%D because \PLAIN\ \TEX\ is english anyway.
-
-\def\dodefinebodyfontswitch[#1][#2]%
- {\def\docommando##1%
- {\setvalue{##1}{\switchtobodyfont[#2]}}%
- \processcommalist[#1]\docommando}
-
-\def\definebodyfontswitch%
- {\dodoubleargument\dodefinebodyfontswitch}
-
-%D \macros
-%D {setsmallbodyfont,setmainbodyfont,setbigbodyfont}
-%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{\switchtobodyfont[small]}.
-%D The three alternatives can be activated by the next three
-%D system calls and are defined by the bodyfontenvironment.
-
-\def\setsmallbodyfont%
- {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!klein}]%
- \doswitchstyle[\fontstyle]}
-
-\def\setmainbodyfont%
- {\doswitchpoints[\normalizedbodyfontsize]%
- \doswitchstyle[\fontstyle]}
-
-\def\setbigbodyfont%
- {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!groot}]%
- \doswitchstyle[\fontstyle]}
-
-%D \macros
-%D {restoreglobalbodyfont}
-%D
-%D Users can set whatever font available while typesetting text.
-%D Pagenumnbers, footers, headers etc. however must be typeset
-%D in the main bodyfont and style of the document. Returning to
-%D the global state can be done with the next macro:
-
-\def\restoreglobalbodyfont%
- {\let\fontsize=\empty
- \doswitchpoints[\normalizedglobalbodyfontize]%
- \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 bodyfont and style
-%D while the running text is temporary set to a smaller one|>|
-%D by saying \type{\switchtobodyfont[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 bodyfont and style, so
-%D here too we use a direct method.
-
-\def\infofont%
- {\getvalue{\!!sixpoint\c!tt\c!tf}%
- \the\everybodyfont}
-
-%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 {showbodyfont}
-%D
-%D One can call for a rather simple overview of a bodyfont and the
-%D relations between its alternative fonts.
-%D
-%D \showsetup{\y!showbodyfont}
-%D
-%D The current bodyfont (here we omitted the argument) looks like:
-%D
-%D \showbodyfont
-%D
-%D The implementation is rather straightforward in using
-%D \type{\halign}.
-
-\def\doshowbodyfont[#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}}
- {\switchtobodyfont[#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\showbodyfont%
- {\dosingleempty\doshowbodyfont}
-
-%D \macros
-%D {showbodyfontenvironment}
-%D
-%D The current bodyfontenvironment is:
-%D
-%D \showbodyfontenvironment
-%D
-%D This overview is generated using:
-%D
-%D \showsetup{\y!showbodyfontenvironment}
-
-\def\doshowbodyfontenvironment[#1]%
- {\startbaselinecorrection
- \vbox
- {\tabskip\!!zeropoint
- \parindent\!!zeropoint
- \doifelsenothing{#1}
- {\def\title{\the\korpsgrootte}}
- {\switchtobodyfont[#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\showbodyfontenvironment%
- {\dosingleempty\doshowbodyfontenvironment}
-
-%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.
-
-\def\dodosmashaccent#1%
- {\bgroup
- \setbox0=\hbox{#1}%
- \setbox2=\hbox{\normalaccent\scratchcounter#1}%
- \ht2=\ht0\box2
- \egroup
- \nobreak}
-
-\def\dosmashaccent%
- {\afterassignment\dodosmashaccent\expandafter\scratchcounter}
-
-\def\smashaccent%
- {\dontleavehmode
- \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%
- {\bgroup
- \dimen0=\fontdimen5\font
- \dimen2=\dimen0
- \advance\dimen2 by -\accentdisplacement
- \fontdimen5\font=\dimen2
- \normalaccent\scratchcounter#1\relax
- \fontdimen5\font=\dimen0
- \egroup}
-
-\def\domoveaccent%
- {\afterassignment\dodomoveaccent\expandafter\scratchcounter}
-
-\def\moveaccent#1%
- {\dontleavehmode
- \def\accentdisplacement{#1}%
- \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
-
-\definebodyfontenvironment
- [\!!fourteenpointfour]
- [ \s!text=\!!fourteenpointfour,
- \s!script=\!!elevenpoint,
- \s!scriptscript=\!!ninepoint,
- \c!x=\!!twelvepoint,
- \c!xx=\!!tenpoint,
- \c!groot=\!!fourteenpointfour,
- \c!klein=\!!twelvepoint]
-
-\definebodyfontenvironment
- [\!!twelvepoint]
- [ \s!text=\!!twelvepoint,
- \s!script=\!!ninepoint,
- \s!scriptscript=\!!sevenpoint,
- \c!x=\!!tenpoint,
- \c!xx=\!!eightpoint,
- \c!groot=\!!fourteenpointfour,
- \c!klein=\!!tenpoint]
-
-\definebodyfontenvironment
- [\!!elevenpoint]
- [ \s!text=\!!elevenpoint,
- \s!script=\!!eightpoint,
- \s!scriptscript=\!!sixpoint,
- \c!x=\!!ninepoint,
- \c!xx=\!!sevenpoint,
- \c!groot=\!!twelvepoint,
- \c!klein=\!!ninepoint]
-
-\definebodyfontenvironment
- [\!!tenpoint]
- [ \s!text=\!!tenpoint,
- \s!script=\!!sevenpoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!eightpoint,
- \c!xx=\!!sixpoint,
- \c!groot=\!!twelvepoint,
- \c!klein=\!!eightpoint]
-
-\definebodyfontenvironment
- [\!!ninepoint]
- [ \s!text=\!!ninepoint,
- \s!script=\!!sevenpoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!sevenpoint,
- \c!xx=\!!fivepoint,
- \c!groot=\!!elevenpoint,
- \c!klein=\!!sevenpoint]
-
-\definebodyfontenvironment
- [\!!eightpoint]
- [ \s!text=\!!eightpoint,
- \s!script=\!!sixpoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!sixpoint,
- \c!xx=\!!fivepoint,
- \c!groot=\!!tenpoint,
- \c!klein=\!!sixpoint]
-
-\definebodyfontenvironment
- [\!!sevenpoint]
- [ \s!text=\!!sevenpoint,
- \s!script=\!!sixpoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!sixpoint,
- \c!xx=\!!fivepoint,
- \c!groot=\!!ninepoint,
- \c!klein=\!!fivepoint]
-
-\definebodyfontenvironment
- [\!!sixpoint]
- [ \s!text=\!!sixpoint,
- \s!script=\!!fivepoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!fivepoint,
- \c!xx=\!!fivepoint,
- \c!groot=\!!eightpoint,
- \c!klein=\!!fivepoint]
-
-\definebodyfontenvironment
- [\!!fivepoint]
- [ \s!text=\!!fivepoint,
- \s!script=\!!fivepoint,
- \s!scriptscript=\!!fivepoint,
- \c!x=\!!fivepoint,
- \c!xx=\!!fivepoint,
- \c!groot=\!!sevenpoint,
- \c!klein=\!!fivepoint]
-
-\definebodyfontenvironment
- [\!!fourpoint]
- [ \s!text=\!!fourpoint,
- \s!script=\!!fourpoint,
- \s!scriptscript=\!!fourpoint,
- \c!x=\!!fourpoint,
- \c!xx=\!!fourpoint,
- \c!groot=\!!sixpoint,
- \c!klein=\!!fourpoint]
-
-\definebodyfontswitch [fourteenpointfour] [\!!fourteenpointfour]
-\definebodyfontswitch [twelvepoint] [\!!twelvepoint]
-\definebodyfontswitch [elevenpoint] [\!!elevenpoint]
-\definebodyfontswitch [tenpoint] [\!!tenpoint]
-\definebodyfontswitch [ninepoint] [\!!ninepoint]
-\definebodyfontswitch [eightpoint] [\!!eightpoint]
-\definebodyfontswitch [sevenpoint] [\!!sevenpoint]
-\definebodyfontswitch [sixpoint] [\!!sixpoint]
-\definebodyfontswitch [fivepoint] [\!!fivepoint]
-\definebodyfontswitch [fourpoint] [\!!fourpoint]
-
-\definebodyfontswitch [xii] [\!!twelvepoint]
-\definebodyfontswitch [xi] [\!!elevenpoint]
-\definebodyfontswitch [x] [\!!tenpoint]
-\definebodyfontswitch [ix] [\!!ninepoint]
-\definebodyfontswitch [viii] [\!!eightpoint]
-\definebodyfontswitch [vii] [\!!sevenpoint]
-\definebodyfontswitch [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 bodyfont. 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{\setupbodyfont[pos]}).
-
-\setupbodyfont [cmr, def, 12pt, \v!romaan, ibm, ans]
-
-\protect
-
-\endinput
+%D \module
+%D [ file=font-ini,
+%D version=1998.09.11,
+%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 --
+ 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
+ 9: mapping -- is geladen
+ 10: onbekende font file --
+\stopmessages
+
+\startmessages english library: fonts
+ title: bodyfont
+ 1: coding --
+ 2: variant -- is loaded
+ 3: unknown variant --
+ 4: bodyfont -- is not defined
+ 5: style -- is not defined
+ 6: -- is loaded
+ 7: unknown format --
+ 8: style -- defined
+ 9: mapping -- is loaded
+ 10: unknown font file --
+\stopmessages
+
+\startmessages german library: fonts
+ title: Fliesstext
+ 1: Kodierung --
+ 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
+ 9: Map -- ist geladen
+ 10: unbekanntes Font --
+\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
+%D \pagina[grotevoorkeur]
+
+%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 regular serif \NC \type{\rm} \NC\FR
+%D \NC sansserif sans support \NC \type{\ss} \NC\MR
+%D \NC type teletype mono \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 calligraphic \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 specify 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 bodyfont 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 bodyfont 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) + bodyfont (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 bodyfont
+%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}:
+
+\unexpanded\def\mf%
+ {\dodosetmathfont{\fontalternative}%
+ \getvalue{\fontalternative}}
+
+%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 \typebuffer
+%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 We can fix arbitrary horizontal boxes by redefining the
+%D \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 incompatibilities,
+%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
+ \ifx\normalhbox\undefined\let\normalhbox=\hbox\fi
+ \let\hbox=\mbox
+ \to\everymath}
+
+%D So in fact one can enable this 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.
+
+\chardef\mrfam=0 % 0 (Plain TeX) Math Roman
+\chardef\mifam=1 % 1 (Plain TeX) Math Italic
+\chardef\syfam=2 % 2 (Plain TeX) Math Symbol
+\chardef\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 Because Taco needs a few more math families, we reuse
+%D family~7 for all those typefaces that have no related
+%D family, and therefore are grouped into one.
+
+\let\nnfam\ttfam % 7 (ReUsed) NoName
+
+%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 is reused, at the moment we have one families left:~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}
+
+\edef\hexnnfam {\hexnumber\nnfam}
+
+%D We define some (very private) constants to improve speed,
+%D memory usage and consistency.
+
+\def\@size@ {@f@si@} % bodyfont 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: By assigning
+%D \type{\dowithfamily} some suitable meaning one can process
+%D such lists quite fast. The current implementation uses the
+%D commalist processing macros and is not that slow either.
+
+\def\familylist%
+ {\c!tf,\c!sl,\c!it,\c!bf,\c!bs,\c!bi,\c!sc}
+
+\def\processfamilylist%
+ {\dowithfamily\c!tf
+ \dowithfamily\c!sl
+ \dowithfamily\c!it
+ \dowithfamily\c!bf
+ \dowithfamily\c!bs
+ \dowithfamily\c!bi
+ \dowithfamily\c!sc}
+
+%D This list will be extended when needed with (pseudo)
+%D families. The speude ones will in fact use the NoName
+%D family.
+
+%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 \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 bodyfontsize 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}
+
+\def\splitfontdefinition#1 #2 #3 #4\end%
+ {\def\somefontname{#1}%
+ \doifelse{#2}{*}
+ {\let\somefontspec=\empty}
+ {\def\somefontspec{ #2 #3}}}
+
+% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed!
+% {\edef\fontscale{#2}%
+% \expandafter\splitfontdefinition#1 * * \end
+% \ifx\fontscale\empty \else
+% \scaledfont=#4\relax
+% \def\somefontspec{ at \fontscale\scaledfont}%
+% \fi
+% \expandafter\font\csname#4#5\endcsname=
+% \truefilename{\somefontname}\somefontspec\relax}
+
+%D We also accept \type{sa a}||\type{sa d} as specification.
+
+\def\checkfontscale#1#2\end%
+ {\doifnumberelse{#1}{}
+ {\doifdefinedelse{\??ft\s!default#1}
+ {\edef\fontscale{\getvalue{\??ft\s!default#1}}}
+ {\edef\fontscale{1}}}}
+
+% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed!
+% {\edef\fontscale{#2}%
+% \expandafter\splitfontdefinition#1 * * \end
+% \ifx\fontscale\empty \else
+% \expandafter\checkfontscale#2 \end % #2 can be "a " (space!)
+% \scaledfont=#4\relax
+% \def\somefontspec{ at \fontscale\scaledfont}%
+% \fi
+% \expandafter\font\csname#4#5\endcsname=
+% \truefilename{\somefontname}\somefontspec\relax}
+
+\def\defaultfontfile{cmtt10}
+\edef\nullfontname {\fontname\nullfont}
+\edef\dummyfontname {font\strippedcsname\\}
+
+\def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed!
+ {\edef\fontscale{#2}%
+ \expandafter\splitfontdefinition#1 * * \end
+ \ifx\fontscale\empty \else
+ \expandafter\checkfontscale#2 \end % #2 can be "a " (space!)
+ \scaledfont=#4\relax
+ \def\somefontspec{ at \fontscale\scaledfont}%
+ \fi
+ \edef\fontfile{\truefontname{\somefontname}}%
+ \ifx\fontfile\s!unknown
+ \let\fontfile\defaultfontfile
+ \else
+ \edef\fontdata{\truefontdata{\somefontname}}%
+ \ifx\fontdata\empty \else
+ %\@EA\getparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]%
+ \@EA\rawgetparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]%
+ \fi
+ \fi
+ % faster
+ %\expandafter\font\csname#4#5\endcsname\fontfile\somefontspec\relax
+ % nicer
+ \edef\lastfontname{\fontfile\somefontspec}%
+ \expandafter\font\csname#4#5\endcsname\lastfontname
+ \expandafter\font\csname\dummyfontname\endcsname\lastfontname\relax}
+ % safer but sometimes introducing newlines in the log
+ %\batchmode
+ %\font\lastloadedfont\fontfile\somefontspec\relax
+ %\errorstopmode
+ %\edef\lastfontname{\fontname\lastloadedfont}%
+ %\ifx\lastfontname\nullfontname
+ % \showmessage{\m!fonts}{10}{\fontfile}%
+ % \expandafter\font\csname#4#5\endcsname=\defaultfontfile\somefontspec\relax
+ %\else
+ % \expandafter\let\csname#4#5\endcsname\lastloadedfont
+ %\fi}
+
+%D The duplicate font definition, using the ever the same dummy
+%D font name, results in less fuzzy error messages. In the log
+%D file, for instance when overfull boxes are reported, the
+%D simple keyword `font' replaces the \TEX\ ordinated name. The
+%D latter can be too misleading, due to the fact that \TEX\ has
+%D a rather optimized font memory management. Thanks to Taco
+%D for helping me sort this out.
+
+%D \macros
+%D {definefontsynonym}
+%D
+%D While looking for fonts, fontsynonyms are used for accessing
+%D the files!
+%D
+%D \starttypen
+%D \definefontsynonym[Serif][Lucida-Bright]
+%D \definefontsynonym[Lucida-Bright][lbr][encoding=texnansi]
+%D \stoptypen
+%D
+%D The definitions can be accessed by:
+%D
+%D \startregels
+%D name: \type {\truefontname{Lucida-Bright}}
+%D data: \type {\truefontdata{Lucida-Bright}}
+%D \stopregels
+
+\def\definefontsynonym%
+ {\dotripleempty\dodefinefontsynonym}
+
+\def\dodefinefontsynonym[#1][#2][#3]%
+ {\setevalue{\??ff#1}{{#2}{#3}}}
+
+\def\truefontname#1%
+ {\dotruefontname{#1}{}}
+
+\def\dotruefontname#1#2%
+ {\ifundefined{\??ff#1}%
+ #1%
+ \else
+ \@EA\@EA\@EA\dotruefontname\csname\??ff#1\endcsname
+ \fi}
+
+\def\truefontdata#1%
+ {\dotruefontdata{#1}{}}
+
+\def\dotruefontdata#1#2%
+ {\ifundefined{\??ff#1}%
+ #2%
+ \else
+ \@EA\@EA\@EA\dotruefontdata\csname\??ff#1\endcsname
+ \fi}
+
+%D \macros
+%D {definefont}
+%D
+%D Before we implement the main definition macro, we first show
+%D one for local use:
+%D
+%D \starttypen
+%D \definefont[Some][LucidaBright at 100pt] \Some some text
+%D \definefont[More][LucidaBright scaled 3000] \More more text
+%D \definefont[Last][LucidaBright sa 5.4] \Last last text
+%D \stoptypen
+%D
+%D The implementation one looks familiar:
+
+\def\definefont%
+ {\dodoubleargument\dodefinefont}
+
+\def\dodefinefont[#1][#2]%
+ {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}}
+
+\def\dododefinefont#1#2sa #3sa#4*%
+ {\edef\fontscale{#3}%
+ \expandafter\splitfontdefinition#2 * * \end
+ \expandafter\font\csname#1\endcsname=\truefontname\somefontname
+ \ifx\fontscale\empty
+ \somefontspec
+ \else
+ \space at \fontscale\bodyfontsize
+ \fi
+ \getvalue{#1}}
+
+%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. Here we also handle the
+%D optional hyphenchar definitions, like:
+%D
+%D \starttypen
+%D \definebodyfont [12pt] [rm] [hyphenchar=45]
+%D \stoptypen
+
+\beginTEX
+
+\def\dodoloadfont#1#2#3#4%
+ {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}%
+ \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*%
+ \@EA\ifx\csname#1#2\s!hyphenchar\endcsname\relax
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ #4\relax
+ \else
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ \csname#1#2\s!hyphenchar\endcsname\relax
+ \fi
+ \csname#1#2#3\endcsname}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dodoloadfont#1#2#3#4%
+ {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}%
+ \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*%
+ \ifcsname#1#2\s!hyphenchar\endcsname
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ \csname#1#2\s!hyphenchar\endcsname\relax
+ \else
+ \@EA\hyphenchar\csname#1#2#3\endcsname=
+ #4\relax
+ \fi
+ \csname#1#2#3\endcsname}
+
+\endETEX
+
+%D The loading macro is used in two macros. One of them takes
+%D care of fixed width teletype fonts.
+
+\def\doloadfont#1#2#3%
+ {\debuggerinfo{\m!fonts}{loaded #1#2#3}%
+ \dodoloadfont{#1}{#2}{#3}{45}}
+
+\def\doloadttfont#1#2#3%
+ {\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}%
+ \dodoloadfont{#1}{#2}{#3}{-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 \macros
+%D {currentfontscale}
+%D
+%D Sometimes we need to have access to the font scale
+%D including the \type{a}||\type{d} sizes. The next macro
+%D returns the current scaling factor. Take a look at
+%D \type {cont-log.tex} for an example of its use.
+
+\beginTEX
+
+\def\currentfontscale%
+ {\@EA\ifx\csname\??ft\s!default\fontsize\endcsname\relax
+ \@EA\ifx\csname\??ft\s!default\s!text\endcsname\relax
+ 1%
+ \else
+ \csname\??ft\s!default\s!text\endcsname
+ \fi
+ \else
+ \csname\??ft\s!default\fontsize\endcsname
+ \fi}
+
+\endTEX
+
+\beginETEX
+
+\def\currentfontscale%
+ {\ifcsname\??ft\s!default\fontsize\endcsname
+ \csname\??ft\s!default\fontsize\endcsname
+ \else\ifcsname\??ft\s!default\s!text\endcsname
+ \csname\??ft\s!default\s!text\endcsname
+ \else
+ 1%
+ \fi\fi}
+
+\endETEX
+
+%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 {definebodyfontenvironment,setupbodyfontenvironment}
+%D
+%D The relationship between the several sizes of a font, is
+%D defined by:
+%D
+%D \showsetup{\y!definebodyfontenvironment}
+%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 \definebodyfontenvironment
+%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 bodyfont size to which the
+%D settings apply. All second parameters are specified in
+%D dimensions and tell us more about related sizes.
+%D
+%D Afterwards, one can change values with
+%D
+%D \showsetup{\y!setupbodyfontenvironment}
+%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.
+%D
+%D When instead of a size the keyword \type{unknown} is
+%D passed, fractions (relations) are used instead of fixed
+%D sizes.
+
+\let\bodyfontenvironmentlist\empty
+
+\def\definebodyfontenvironment%
+ {\dodoubleempty\dodefinebodyfontenvironment}
+
+\def\dodefinebodyfontenvironment[#1][#2]%
+ {\let\c!savedtext=\c!text
+ \let\c!text=\s!text
+ \doifelse{#1}{\s!default}
+ {\getparameters[\??ft\s!default][#2]}
+ {\normalizebodyfontsize#1\to\tempbodyfontsize
+ \addtocommalist\tempbodyfontsize\bodyfontenvironmentlist
+ \@EA\dododefinebodyfontenvironment\@EA[\tempbodyfontsize][#2]}%
+ \let\c!text=\c!savedtext}
+
+\def\dododefinebodyfontenvironment[#1][#2]%
+ {\doifundefined{\??ft#1\s!text}
+ {\def\docommando##1%
+ {\scratchdimen=#1\relax
+ \scratchdimen=\getvalue{\??ft\s!default##1}\scratchdimen
+ \normalizebodyfontsize\scratchdimen\to\tempbodyfontsize
+ \setevalue{\??ft#1##1}{\tempbodyfontsize}}%
+ \processcommalist
+ [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein]
+ \docommando
+ \copyparameters
+ [\??ft#1][\??ft\s!default]
+ [\c!interlinie,\c!em]}%
+ \getparameters[\??ft#1][#2]%
+ \setvalue{\@size@#1}{\docompletefontswitch[#1]}}
+
+\def\setupbodyfontenvironment%
+ {\dodoubleargument\dosetupbodyfontenvironment}
+
+\def\dosetupbodyfontenvironment[#1]%
+ {\getparameters[\??ft#1]}
+
+%D We default all parameters to the main bodyfont size (begin
+%D \type{#1}), so the next setup is valid too:
+%D
+%D \starttypen
+%D \definebodyfontenvironment[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 {definebodyfont}
+%D
+%D The next step in defining a bodyfont 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!definebodyfont}
+%D
+%D This commands takes three arguments, where \ShowArgument\
+%D takes a (series of) bodyfont size(s) and \ShowArgument\
+%D the style group to which the definitions belong.
+%D
+%D Argument \ShowArgument\ 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 \definebodyfont [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 \definebodyfont [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\definebodyfont%
+ {\dotripleargument\dodefinebodyfont}
+
+%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\dodefinebodyfont[#1][#2][#3]%
+% {\ifthirdargument
+% \def\dododefinebodyfont##1%
+% {\dodododefinebodyfont[##1][#2][#3]}%
+% \processcommalist[#1]\dododefinebodyfont
+% \else
+% \definebodyfont[#1][\c!rm][#2]%
+% \fi}
+
+\def\dodefinedefaultbodyfont[#1][#2]%
+ {\def\dododefinedefaultbodyfont##1%
+ {\def\dodododefinedefaultbodyfont####1{\getvalue{\s!default####1}{##1}}%
+ \processcommalist[#2]\dodododefinedefaultbodyfont}%
+ \processcommalist[#1]\dododefinedefaultbodyfont}
+
+\def\dodefinebodyfont[#1][#2][#3]%
+ {\ifthirdargument
+ \doifelse{#3}{\s!default} % new
+ {\dodefinedefaultbodyfont[#1][#2]}
+ {\def\dododefinebodyfont##1{\dodododefinebodyfont[##1][#2][#3]}%
+ \processcommalist[#1]\dododefinebodyfont}%
+ \else\ifsecondargument
+ \definebodyfont[#1][\c!rm][#2]%
+ \else
+ \doifundefined{\@size@#1} % Maybe there are default dependancies
+ {\defineunknownfont{#1}}% defined which we can use ([unknown])
+ \doifundefined{\@size@#1} % and if not, then we have at least to
+ {\definebodyfont[#1][\c!rm][]}% make sure some basics are set up.
+ \fi\fi}
+
+%D Defining a bodyfont 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 bodyfont size related fonts. The first step is bodyfont
+%D independant but executed every time. This permits user
+%D definitions like \type{\tfw} or \type{\bfq} for real large
+%D alternatives.
+
+\def\dodododefinebodyfont[#1][#2][#3]%
+ {\doifelse{#1}{\s!default}
+ {\setvalue{\s!default#2}##1{\definebodyfont[##1][#2][#3]}}
+ {\geteparameters[\??ft#1#2][#3]% We expand them!
+ \dodefinebodyfontenvironment[#1][]% Just to be sure.
+ \def\doiffamily##1##2##3\\% adapted
+ {\doifinstringelse{##1##2}\familylist
+ {}
+ {\addtocommalist{##1##2}\familylist
+ %\settextfonts
+ \unexpanded\setvalue{##1##2}%
+ {\getvalue{#2}\getvalue{##1##2}}%
+ \unexpanded\setvalue{##1##2\c!x}%
+ {\getvalue{##1##2}\getvalue{##1##2\c!x}}%
+ \unexpanded\setvalue{##1##2\c!xx}%
+ {\getvalue{##1##2}\getvalue{##1##2\c!xx}}}%
+ \doifsomething{##3}
+ {\unexpanded\setvalue{#2##3}% eg: \rma, \ssa
+ {\switchtofontstyle{#2}{##3}}%
+ \unexpanded\setvalue{##1##2##3}% eg: \tfa, \bfa
+ {\switchtofontalternative{##1##2}{##3}}%
+ \unexpanded\setvalue{#2##1##2##3}% eg: \rmtfa, \ssbfa
+ {\switchtofontstylealternative{#2}{##1##2}{##3}}}}%
+ \def\dododododefinebodyfont##1%
+ {\doifnot{##1}{\s!hyphenchar}
+ {\doifdefined{\??ft#1#2##1}
+ {\letvalue{@#1#2##1@}=\characterencoding
+ \doifelse{#2}{\c!tt}
+ {\unexpanded\setvalue{#1#2##1}{\doloadttfont{#1}{#2}{##1}}}
+ {\unexpanded\setvalue{#1#2##1}{\doloadfont{#1}{#2}{##1}}}%
+ \bgroup
+ \let\relax=\empty
+ \debuggerinfo
+ {\m!fonts}{\getvalue{\??ft#1#2##1} defined as #1 #2 ##1}%
+ \egroup}%
+ \doifnot{#2}{\c!mm} % new!
+ {\expandafter\doiffamily##1\\}}}%
+ \processassignlist[#3]\dododododefinebodyfont}}
+
+%D Unknown families are added to the family list! For the
+%D moment we also set the direct calls here. Some day a better
+%D solution will be implemented. The good news is that unknown
+%D fonts are defined automatically.
+
+\newif\ifdefiningunknownfont
+
+\def\defineunknownfont#1%
+ {\let\c!savedtext=\c!text
+ \let\c!text=\s!text
+ \donefalse
+ \def\docommando##1%
+ {\doifdefined{\??ft\s!default##1}
+ {\donetrue
+ \scratchdimen=#1\relax
+ \scratchdimen=\getvalue{\??ft\s!default##1}\scratchdimen
+ %\setevalue{\??ft#1##1}{\the\scratchdimen}}}%
+ \normalizebodyfontsize\scratchdimen\to\!!stringa
+ \letvalue{\??ft#1##1}\!!stringa}}%
+ \processcommalist
+ [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein]
+ \docommando
+ \let\c!text=\c!savedtext
+ \ifdone
+ \donefalse
+ \def\defineunknownbodyfont##1%
+ {\doifdefined{\s!default##1}{\donetrue\getvalue{\s!default##1}{#1}}}%
+ \processcommacommand
+ [\stylelist,\c!mm]
+ \defineunknownbodyfont
+ \ifdone
+ \setvalue{\@size@#1}{\docompletefontswitch[#1]}%
+ \ifdefiningunknownfont \else
+ \definingunknownfonttrue
+ \def\defineunknownsubfont##1%
+ {\doifundefined{\@size@\getvalue{\??ft#1##1}}
+ {\defineunknownfont{\getvalue{\??ft#1##1}}}}%
+ \processcommalist
+ [\s!text,\s!script,\s!scriptscript,\c!x,\c!xx,\c!groot,\c!klein]
+ \defineunknownsubfont
+ \definingunknownfontfalse
+ \fi
+ \fi
+ \fi}
+
+%D These macros show that quite some definitions take place.
+%D Fonts are not loaded 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 600 extra entries in the hash table.
+
+%D A previous implementation used:
+%D
+%D \starttypen
+%D \type {\setvalue{name}{\donottest...}}
+%D \stoptypen
+%D
+%D instead of the more memory hungry:
+%D
+%D \starttypen
+%D \unexpanded\setvalue{name}{...}
+%D \stoptypen
+%D
+%D The first alternative saves about 500 hash entries (about
+%D 2.5\% of the total number of entries used. The second
+%D alternative is currently used, because that one can more
+%D easily be made \ETEX\ aware.
+
+%D \macros
+%D {everybodyfont,Everybodyfont}
+%D
+%D Every change in bodyfont 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 \everybodyfont \Everybodyfont
+
+%D At the system level one can initialize thing like:
+%D
+%D \starttypen
+%D \appendtoks \setupspacing \to \everybodyfont
+%D \stoptypen
+%D
+%D While users can add their own non standard commands like:
+%D
+%D \starttypen
+%D \Everybodyfont{\message{changing to bodyfont \the\bodyfontsize}}
+%D \stoptypen
+%D
+%D Personnaly I never felt the need for such extensions, but
+%D at least its possible.
+
+%D \macros
+%D {globalbodyfontsize,localbodyfontsize}
+%D
+%D Next we'll do the tough job of font switching. Here we
+%D have to distinguish between the global (overal) bodyfont
+%D size and the local (sometimes in the textflow) size. We
+%D store these dimensions in two \DIMENSION\ registers.
+
+\newdimen\globalbodyfontsize \globalbodyfontsize=12pt
+\newdimen\localbodyfontsize \localbodyfontsize =\globalbodyfontsize
+
+%D \macros
+%D {bodyfontsize}
+%D
+%D These two registers are not to be misused in calculations.
+%D For this purpose we keep a copy:
+
+\newdimen\bodyfontsize \bodyfontsize=\globalbodyfontsize
+
+%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 {600}
+
+%D \macros
+%D {bodyfontfactor,bodyfontpoints}
+%D
+%D For multiplication purposes we keep an auxiliary counter
+%D and macro (here the expansion is not explicitly needed):
+
+\newcount\bodyfontpoints \dimensiontocount\bodyfontsize\bodyfontpoints
+
+\edef\bodyfontfactor{\withoutpt\the\bodyfontsize}
+
+%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 specifie the bodyfont size. Therefore
+%D we also store the normalized value.
+
+\chardef\fontdigits=1 %
+
+\def\donormalizedbodyfontsize#1.#2#3#4\to#5%
+ {\edef#5%
+ {#1%
+ \ifcase\fontdigits\space
+ \or
+ \ifcase#2 \else.#2\fi % and not: \ifcase#2\else ...
+ \else
+ \ifcase#2#3 \else.#2\ifcase#3 \else#3\fi\fi % not: \ifcase#2#3\else ...
+ \fi
+ pt}}
+
+\def\normalizebodyfontsize#1\to#2%
+ {\scratchdimen=#1\relax
+ \@EA\@EA\@EA\donormalizedbodyfontsize
+ \@EA\WITHOUTPT\the\scratchdimen00\to#2}
+
+\normalizebodyfontsize\bodyfontsize\to\normalizedglobalbodyfontsize
+\normalizebodyfontsize\bodyfontsize\to\normalizedlocalbodyfontsize
+\normalizebodyfontsize\bodyfontsize\to\normalizedbodyfontsize
+
+%D To be internationalized:
+
+\def\korpsgrootte {\bodyfontsize}
+\def\korpspunten {\bodyfontpoints}
+
+%D some day.
+
+%D \macros
+%D {fontsize,fontstyle}
+%D
+%D Within a bodyfont, 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 \type{font-cmr}. These files are loaded by:
+
+\def\resetfontdefinitionfile#1%
+ {\letbeundefined{\c!file\f!fontprefix#1}}
+
+\def\doreadfontdefinitionfile#1%
+ {\doifundefined{\c!file\f!fontprefix#1}%
+ {\setvalue{\c!file\f!fontprefix#1}{}%
+ \makeshortfilename[\f!fontprefix\truefontname{#1}]%
+ \startreadingfile
+ \readsysfile{\shortfilename}
+ {\showmessage{\m!fonts}{2}{#1}}
+ {\loadfontmappingfile{#1}
+ {\showmessage{\m!fonts}{9}{#1}}
+ {\showmessage{\m!fonts}{3}{#1}}}%
+ \stopreadingfile}}
+
+%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 inactive 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}%
+% \localbodyfontsize=#1\relax
+% \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize
+% \the\everybodyfont}
+% {\showmessage{\m!fonts}{4}{#1}}}
+
+\def\dodoswitchpoints#1%
+ {\doifundefined{\@size@#1}
+ {\defineunknownfont{#1}}%
+ \doifdefinedelse{\@size@#1}
+ {\getvalue{\@size@#1}%
+ \localbodyfontsize=#1\relax
+ \normalizebodyfontsize\localbodyfontsize\to\normalizedbodyfontsize
+ \the\everybodyfont}
+ {\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{\definebodyfont} 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 bodyfont 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 bodyfont 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}{\normalizedbodyfontsize\normalspace\fontstyle}%
+ \doswitchpoints[\normalizedbodyfontsize]%
+ \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 bodyfont size.
+
+\def\dosetfont[#1]%
+ {\doifelse{#1}{\v!globaal}
+ {\restoreglobalbodyfont}
+ {\processcommalist[#1]\dodosetfont
+ \ifloadingfonts\else
+ \doswitchpoints[\normalizedbodyfontsize]%
+ \doswitchstyle[\fontstyle]%
+ \fi}%
+ \chardef\currentxfontsize=0\relax}
+
+\def\dodosetfont#1%
+ {\dododosetfont{#1}{\showmessage{\m!fonts}{4}{#1}}}
+
+\def\dododosetfont#1#2%
+ {\doifnumberelse{#1}
+ {\scratchdimen=#1\relax
+ \normalizebodyfontsize\scratchdimen\to\normalizedsetfont
+ \doifundefined{\@size@\normalizedsetfont}
+ {\defineunknownfont{#1}}%
+ \doifdefinedelse{\@size@\normalizedsetfont}
+ {\localbodyfontsize=\normalizedsetfont
+ \let\normalizedbodyfontsize=\normalizedsetfont}
+ {#2\dosetsubstitutefont{#1}}}
+ {\doifelse{#1}{\v!reset}
+ {\let\fontsize=\empty}
+ {\doifdefinedelse{\@style@#1}
+ {\edef\fontstyle{#1}}
+ {\doreadfontdefinitionfile{#1}}}}}
+
+%D In the previous macros we use \type{\currentxfontsize} to
+%D hold the current x||size of the font. This enables us to
+%D support for instance \type{\sl} inside a \type{\tx} switch.
+
+\chardef\currentxfontsize=0
+
+%D When users specify for instance a 13 point bodyfont while no
+%D such bodyfont is defined, the system automatically tries to
+%D find a best fit, that is the nearest smaller defined
+%D bodyfontzize. 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}%
+ \getvalue{#1}}
+
+\def\switchtofontstylealternative#1#2#3%
+ {\getvalue{\normalizedbodyfontsize#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 bodyfontenvironment are
+%D used. Here we also set \type{\currentxfontsize}.
+
+\def\dosetsomextypeface#1%
+ {\doifdefinedelse{#1}
+ {\getvalue{#1}}
+ {\showmessage{\m!fonts}{7}{#1}}}%
+
+\def\dosetxtypeface#1%
+ {\chardef\currentxfontsize=1
+ \ifmmode
+ \scriptstyle
+ \else
+ \dosetsomextypeface
+ {\getvalue{\??ft\normalizedbodyfontsize\c!x}% % pt
+ \getvalue{\@shortstyle@\fontstyle}% % rm
+ #1}% % tf
+ \unexpanded\def\tx{\dosetxxtypeface{#1}}%
+ \fi}
+
+\def\dosetxxtypeface#1%
+ {\chardef\currentxfontsize=2
+ \ifmmode
+ \scriptscriptstyle
+ \else
+ \dosetsomextypeface
+ {\getvalue{\??ft\normalizedbodyfontsize\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.
+
+\beginTEX
+
+\def\dosettextfont#1#2% Watch the extra test!
+ {\unexpanded\setvalue{#1#2}%
+ {\csname\textface#1%
+ \@EA\ifx\csname\textface#1#2\fontsize\endcsname\relax
+ \@EA\ifx\csname\textface#1\c!tf\fontsize\endcsname\relax
+ #2%
+ \else
+ \c!tf\fontsize
+ \fi
+ \else
+ #2\fontsize
+ \fi
+ \endcsname}}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dosettextfont#1#2% Watch the extra test!
+ {\unexpanded\setvalue{#1#2}%
+ {\csname\textface#1%
+ \ifcsname\textface#1#2\fontsize\endcsname
+ #2\fontsize
+ \else\ifcsname\textface#1\c!tf\fontsize\endcsname
+ \c!tf\fontsize
+ \else
+ #2%
+ \fi\fi
+ \endcsname}}
+
+\endETEX
+
+\def\settextfont#1%
+ {\def\dowithfamily{\dosettextfont{#1}}\processfamilylist}
+
+\def\settextfonts%
+ {\rawprocesscommalist[\stylelist]\settextfont}
+
+%D All three sizes come together in the macro:
+
+\def\settypefaces#1#2%
+ {\unexpanded\setvalue{#2}%
+ {\dosettypeface{#1}{#2}}%
+ \unexpanded\setvalue{#2\c!x}%
+ {\dosetxtypeface{#2}}%
+ \unexpanded\setvalue{#2\c!xx}%
+ {\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#3%
+ {\scriptscriptfont\csname#3\s!fam\endcsname\scriptfont\csname#3\s!fam\endcsname
+ \dosettextfamily{#1}{#2}{#3}\scriptscriptfont\scriptscriptface
+ \scriptfont \csname#3\s!fam\endcsname\textfont \csname#3\s!fam\endcsname
+ \dosettextfamily{#1}{#2}{#3}\scriptfont\scriptface
+ \textfont \csname#3\s!fam\endcsname\textfont \tffam
+ \dosettextfamily{#1}{#2}{#3}\textfont\textface}
+
+\beginTEX
+
+\def\dosettextfamily#1#2#3#4#5%
+ {\@EA\ifx\csname#5\c!mm#2\endcsname\relax
+ \@EA\ifx\csname#5#1#2\endcsname\relax
+ \@EA\ifx\csname#5#1\c!tf\endcsname\relax
+ \debuggerinfo{\m!fonts}{not defined #5#1#2}%
+ \else
+ \debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
+ \csname#5#1\c!tf\endcsname% activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5#1\c!tf\endcsname
+ \fi
+ \else
+ \debuggerinfo{\m!fonts}{defined #5#1#2}%
+ \csname#5#1#2\endcsname% activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5#1#2\endcsname
+ \fi
+ \else
+ \debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
+ \csname#5\c!mm#2\endcsname % activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5\c!mm#2\endcsname
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dosettextfamily#1#2#3#4#5%
+ {\ifcsname#5\c!mm#2\endcsname
+ \debuggerinfo{\m!fonts}{#5#1#2 overruled by #5\c!mm#2}%
+ \csname#5\c!mm#2\endcsname % activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5\c!mm#2\endcsname
+ \else\ifcsname#5#1#2\endcsname
+ \debuggerinfo{\m!fonts}{defined #5#1#2}%
+ \csname#5#1#2\endcsname% activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5#1#2\endcsname
+ \else\ifcsname#5#1\c!tf\endcsname
+ \debuggerinfo{\m!fonts}{#5#1#2 replaced by #5#1\c!tf}%
+ \csname#5#1\c!tf\endcsname% activate font
+ \@EA#4\csname#3\s!fam\endcsname\csname#5#1\c!tf\endcsname
+ \else
+ \debuggerinfo{\m!fonts}{not defined #5#1#2}%
+ \fi\fi\fi}
+
+\endETEX
+
+%D The previous macro lets definitions like
+%D
+%D \starttypen
+%D \definebodyfont[10pt][mm][bf=cmbx10 at 10.25pt]
+%D \stoptypen
+%D
+%D take preference over
+%D
+%D \starttypen
+%D \definebodyfont[10pt][mm][bf=cmbx10 at 10pt]
+%D \stoptypen
+
+%D \macros
+%D {definefontstyle}
+%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 \definefontstyle [serif, rm] [rm]
+%D \definefontstyle [sansserif, ss] [ss]
+%D \stoptypen
+
+\def\dodefinefontstyle[#1][#2]%
+ {\rawdoifinsetelse{#2}{\stylelist}
+ {\debuggerinfo{\m!fonts}{unknown style #2}}
+ {\addtocommalist{#2}\stylelist
+ \showmessage{\m!fonts}{8}{#2 (#1)}}%
+\unexpanded\setvalue{#2}{\setfontstyle{#2}{#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}}%
+ }%\unexpanded\setvalue{#2}{\setfontstyle{##1}{#2}}}%
+ \processcommalist[#1]\docommando}
+
+\def\definefontstyle%
+ {\dodoubleargument\dodefinefontstyle}
+
+%D CHECKEN WAT \type{\fontstyle} HIER DOET
+
+\def\setfontstyle#1#2% #1:name (roman, romaan) #2:style (rm)
+ {\edef\fontstyle{#1}%
+ \def\dowithfamily{\dosetfontstyle{#2}}\processfamilylist
+ \unexpanded\def\tx{\tfx}%
+ \fam\tffam
+ \tf}
+
+\beginTEX
+
+\def\dosetfontstyle#1#2%
+ {\@EA\ifx\csname#2\s!fam\endcsname\relax
+ \settextfamily{#1}{#2}{\c!nn}%
+ \else
+ \settextfamily{#1}{#2}{#2}%
+ \fi
+ \settypefaces{#1}{#2}}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dosetfontstyle#1#2%
+ {\ifcsname#2\s!fam\endcsname
+ \settextfamily{#1}{#2}{#2}%
+ \else
+ \settextfamily{#1}{#2}{\c!nn}%
+ \fi
+ \settypefaces{#1}{#2}}
+
+\endETEX
+
+%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 Optionally skew characters can be set on a per font basis,
+%D like:
+%D
+%D \starttypen
+%D \definebodyfont
+%D [12pt] [mm]
+%D [mi=cmmi10,sy=cmsy10,syskewchar='50]
+%D \stoptypen
+%D
+%D When setting the \type{\skewchar} we need to test on the
+%D availability first.
+
+\beginTEX
+
+\def\setskewchar#1#2%
+ {\@EA\ifx\csname#1\endcsname\relax\else
+ \csname#1\endcsname
+ \@EA\ifx\csname\??ft#1\s!skewchar\endcsname\relax
+ \skewchar\csname#1\endcsname#2\relax
+ \else
+ \skewchar\csname#1\endcsname\csname\??ft#1\s!skewchar\endcsname\relax
+ \fi
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\setskewchar#1#2%
+ {\ifcsname#1\endcsname
+ \csname#1\endcsname
+ \ifcsname\??ft#1\s!skewchar\endcsname
+ \skewchar\csname#1\endcsname\csname\??ft#1\s!skewchar\endcsname\relax
+ \else
+ \skewchar\csname#1\endcsname#2\relax
+ \fi
+ \fi}
+
+\endETEX
+
+%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% er kunnen veel {} weg
+ {\dosetmathfamily\scriptscriptfont{#4}{#1}{#5}{#6}%
+ \dosetmathfamily\scriptfont {#3}{#1}{#5}{#6}%
+ \dosetmathfamily\textfont {#2}{#1}{#5}{#6}}
+
+\beginTEX
+
+\def\dosetmathfamily#1#2#3#4#5%
+ {\@EA\ifx\csname#2#4\endcsname\relax
+ \@EA\ifx\csname#2#5\endcsname\relax
+ \@EA\ifx\csname\!!twelvepoint#4\endcsname\relax
+ #1#3\nullfont
+ \else
+ \csname\!!twelvepoint#4\endcsname
+ #1#3\csname\!!twelvepoint#4\endcsname\relax
+ \fi
+ \else
+ \csname#2#5\endcsname
+ #1#3\csname#2#5\endcsname\relax
+ \fi
+ \else
+ \csname#2#4\endcsname
+ #1#3\csname#2#4\endcsname\relax
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\dosetmathfamily#1#2#3#4#5%
+ {\ifcsname#2#4\endcsname
+ \csname#2#4\endcsname
+ #1#3\csname#2#4\endcsname\relax
+ \else\ifcsname#2#5\endcsname
+ \csname#2#5\endcsname
+ #1#3\csname#2#5\endcsname\relax
+ \else\ifcsname\!!twelvepoint#4\endcsname
+ \csname\!!twelvepoint#4\endcsname
+ #1#3\csname\!!twelvepoint#4\endcsname\relax
+ \else
+ #1#3\nullfont
+ \fi\fi\fi}
+
+\endETEX
+
+%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 \setupbodyfont
+%D [ams]
+%D
+%D \definebodyfont [24pt] [mm]
+%D [ma=msam10 at 24pt,
+%D mb=msbm10 at 24pt]
+%D
+%D \switchtobodyfont
+%D [24pt]
+%D
+%D This is a 24pt $\blacktriangleleft$
+%D \stoptypen
+%D
+%D Here we didn't define the 24 point bodyfont 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{\everybodyfont}
+
+\def\docompletefontswitch[#1]%
+ {\bodyfontsize=#1\relax
+ \dimensiontocount\bodyfontsize\bodyfontpoints
+ \edef\bodyfontfactor{\withoutpt\the\bodyfontsize}%
+ \normalizebodyfontsize\bodyfontsize\to\normalizedbodyfontsize
+ \edef\textface{\getvalue{\??ft\normalizedbodyfontsize\s!text}}%
+ \edef\scriptface{\getvalue{\??ft\normalizedbodyfontsize\s!script}}%
+ \edef\scriptscriptface{\getvalue{\??ft\normalizedbodyfontsize\s!scriptscript}}%
+ \settextfonts
+ \setmathfamilies
+ \rmtf
+ \the\everybodyfont}
+
+%D \macros
+%D {setupbodyfont,switchtobodyfont}
+%D
+%D The next two macros are user ones. With \type{\setupbodyfont}
+%D one can set the document bodyfont size, font family, style
+%D and/or options defined in files, for example:
+%D
+%D \starttypen
+%D \setupbodyfont[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 \switchtobodyfont[10pt]
+%D \stoptypen
+%D
+%D So we've got:
+%D
+%D \showsetup{\y!setupbodyfont}
+%D \showsetup{\y!switchtobodyfont}
+%D
+%D Both macros look alike. The second one also has to take
+%D all kind of keywords into account.
+
+\definecomplexorsimple\setupbodyfont
+
+\def\simplesetupbodyfont%
+ {\restoreglobalbodyfont}
+
+\def\complexsetupbodyfont[#1]%
+ {\doifsomething{#1}
+ {\dosetfont[#1]%
+ \globalbodyfontsize=\localbodyfontsize
+ \normalizebodyfontsize\globalbodyfontsize\to\normalizedglobalbodyfontize
+ \let\globalfontstyle=\fontstyle
+ \the\everybodyfont}}
+
+\unexpanded\def\switchtobodyfont[#1]%
+ {\doifsomething{#1}
+ {\doifdefinedelse{\??ft\normalizedbodyfontsize\interfaced{#1}}
+ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced{#1}}]%
+ \doswitchstyle[\fontstyle]}
+ {\dosetfont[#1]}%
+ \the\everybodyfont}}
+
+%D Because the last macro can appear in arguments or be assigned
+%D to parameters, we protect this one for unwanted expansion.
+
+\def\dodosetmathfont#1%
+ {\doifdefinedelse{#1\s!fam} % adapted
+ {\edef\mffam{\getvalue{#1\s!fam}}}
+ {\edef\mffam{\getvalue{\c!nn\s!fam}}}%
+ \textfont \mrfam=\textfont \mffam
+ \scriptfont \mrfam=\scriptfont \mffam
+ \scriptscriptfont\mrfam=\scriptscriptfont\mffam}
+
+\def\dosetmathfont%
+ {\def\rm{\fam0}\dodosetmathfont}
+
+\let\fontalternative=\c!tf
+
+%D Watch the encoding: the first settings are there for
+%D upward compatibility reasons, the second one is the new,
+%D font synonym related setting.
+
+\def\dosettypeface#1#2%
+ {\doifdefinedelse{@\normalizedbodyfontsize#1#2@} % the definition bound one
+ {\edef\characterencoding{\getvalue{@\normalizedbodyfontsize#1#2@}}}
+ {\let\characterencoding=\nocharacterencoding}%
+ \edef\fontalternative{#2}%
+ \unexpanded\def\tx%
+ {\dosetxtypeface{#2\fontsize}}%
+ \unexpanded\def\txx%
+ {\dosetxxtypeface{#2\fontsize}}%
+ \doifdefinedelse{#2\s!fam} % adapted
+ {\expandafter\fam\getvalue{#2\s!fam}}
+ {\expandafter\fam\getvalue{\c!nn\s!fam}}%
+ \getvalue{#1#2}%
+ \ifcase\currentxfontsize\or\tx\or\txx\fi
+ \doifdefined{\purefontname\font\s!encoding} % the file bound one
+ {\edef\characterencoding{@\getvalue{\purefontname\font\s!encoding}@}}%
+ \doifdefinedelse{\purefontname\font\s!mapping} % the file bound one
+ {\edef\charactermapping{@\getvalue{\purefontname\font\s!mapping}@}}%
+ {\let\charactermapping\characterencoding}}
+
+%D The next auxilliary macro is an alternative to \type
+%D {\fontname}.
+
+\def\purefontname#1%
+ {\expandafter\splitoffpurefontname\fontname#1 \\}
+
+\def\splitoffpurefontname#1 #2\\{#1}
+
+%D Just an experiment: \type{..\sl..\switchstyleonly\tt..}.
+
+\def\switchstyleonly#1%
+ {\let\savedfontalternative=\fontalternative
+ \chardef\savedescapechar=\escapechar
+ \escapechar=-1
+ \getvalue{\string#1}%
+ \escapechar=\savedescapechar
+ \getvalue{\savedfontalternative}}
+
+% testen
+%
+%\def\switchstyleonly#1%
+% {\let\savedfontalternative=\fontalternative
+% \getvalue{\strippedcsname#1}%
+% \getvalue{\savedfontalternative}}
+
+%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.
+
+% \unexpanded\def\os%
+% {\getvalue{\normalizedbodyfontsize\c!mm\c!mi}}
+
+\definefont[os][OldStyle sa \currentfontscale]
+
+\definefontsynonym[OldStyle][Serif]
+
+%D \macros
+%D {definebodyfontswitch}
+%D
+%D \PLAIN\ \TEX\ defines some macro's like \type{\tenpoint}
+%D to switch to a specific bodyfontsize. Just for the sake of
+%D compatibility we can define them like:
+%D
+%D \starttypen
+%D \definebodyfontswitch [twelvepoint] [12pt]
+%D \stoptypen
+%D
+%D We don't support language specific synonyms here, mainly
+%D because \PLAIN\ \TEX\ is english anyway.
+
+\def\dodefinebodyfontswitch[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{##1}{\switchtobodyfont[#2]}}%
+ \processcommalist[#1]\docommando}
+
+\def\definebodyfontswitch%
+ {\dodoubleargument\dodefinebodyfontswitch}
+
+%D \macros
+%D {setsmallbodyfont,setmainbodyfont,setbigbodyfont}
+%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{\switchtobodyfont[small]}.
+%D The three alternatives can be activated by the next three
+%D system calls and are defined by the bodyfontenvironment.
+
+\def\setsmallbodyfont%
+ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!klein}]%
+ \doswitchstyle[\fontstyle]}
+
+\def\setmainbodyfont%
+ {\doswitchpoints[\normalizedbodyfontsize]%
+ \doswitchstyle[\fontstyle]}
+
+\def\setbigbodyfont%
+ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!groot}]%
+ \doswitchstyle[\fontstyle]}
+
+%D \macros
+%D {restoreglobalbodyfont}
+%D
+%D Users can set whatever font available while typesetting text.
+%D Pagenumnbers, footers, headers etc. however must be typeset
+%D in the main bodyfont and style of the document. Returning to
+%D the global state can be done with the next macro:
+
+\def\restoreglobalbodyfont%
+ {\let\fontsize=\empty
+ \doswitchpoints[\normalizedglobalbodyfontize]%
+ \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 bodyfont and style
+%D while the running text is temporary set to a smaller one|>|
+%D by saying \type{\switchtobodyfont[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 bodyfont and style, so
+%D here too we use a direct method.
+
+\def\infofont%
+ {\getvalue{\!!sixpoint\c!tt\c!tf}%
+ \the\everybodyfont}
+
+%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}
+ {\setvalue{##1}{\groupedcommand{#2}{}}}%
+ \setvalue{\@letter@##1}{#2}%
+ \setvalue{\@noletter@##1}{#3}}%
+ \processcommalist[#1]\docommando}
+
+\def\definealternativestyle%
+ {\dotripleempty\dodefinealternativestyle}
+
+\def\definestyle{\definealternativestyle}
+
+%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{bold} 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}
+ {\let\next=\empty}
+ {\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}
+ {\let\next=\empty}
+ {\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}
+
+%D or even better:
+
+\def\emphasistypeface%
+ {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}{\v!schuin}{\sl}
+ {\doifvalue{\??ft\normalizedbodyfontsize\c!em}{\v!italic}{\it}}}
+
+\def\emphasisboldface%
+ {\doifelsevalue{\??ft\normalizedbodyfontsize\c!em}{\v!schuin}{\bs}
+ {\doifvalue{\??ft\normalizedbodyfontsize\c!em}{\v!italic}{\bi}}}
+
+%D To be set with the default body font environment: \type
+%D {em} being \type {slanted} or \type {italic}.
+
+\newconditional\emneeded
+
+\unexpanded\def\em%
+ {\ifdim\fontdimen1\font>\!!zeropoint\relax
+ \settrue\emneeded
+ \else
+ \setfalse\emneeded
+ \fi
+ \setemphasisboldface % new
+ \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
+ \ifconditional\emneeded\relax
+ \else
+ \expandafter\aftergroup
+ \fi
+ \emphasiscorrection}
+
+%D The next feature was not present in previous versions. It
+%D takes are of \type {\em \bf ...} sitiations.
+
+\def\setemphasisboldface%
+ {\let\normalbf\bf
+ \let\setemphasisboldface\relax
+ \def\bf%
+ {\ifnum\fam=\itfam
+ \bi
+ \else\ifnum\fam=\slfam
+ \bs
+ \else
+ \normalbf
+ \fi\fi
+ \let\bf\normalbf}}
+
+%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
+ \/\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% geen \dosetfont mogelijk
+ {\def\next{\nextfont\stelinterliniein}%
+ \afterassignment\next\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 {showbodyfont}
+%D
+%D One can call for a rather simple overview of a bodyfont and the
+%D relations between its alternative fonts.
+%D
+%D \showsetup{\y!showbodyfont}
+%D
+%D The current bodyfont (here we omitted the argument) looks like:
+%D
+%D \showbodyfont
+%D
+%D The implementation is rather straightforward in using
+%D \type{\halign}.
+
+\def\doshowbodyfont[#1]%
+ {\startbaselinecorrection
+ \vbox
+ {\def\doreadfontdefinitionfile##1% geen test op geladen
+ {\makeshortfilename[\f!fontprefix\truefontname{##1}]%
+ \startreadingfile
+ \readsysfile{\shortfilename}{}{}%
+ \stopreadingfile}%
+ \def\bigstrut##1##2%
+ {\hbox{\vrule
+ \!!height ##1\ht\strutbox
+ \!!depth ##2\dp\strutbox
+ \!!width \!!zeropoint}}
+ \doifelsenothing{#1}
+ {\def\title{\the\korpsgrootte}}
+ {\switchtobodyfont[#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\showbodyfont%
+ {\dosingleempty\doshowbodyfont}
+
+%D \macros
+%D {showbodyfontenvironment}
+%D
+%D The current bodyfontenvironment is:
+%D
+%D \showbodyfontenvironment
+%D
+%D This overview is generated using:
+%D
+%D \showsetup{\y!showbodyfontenvironment}
+
+\def\showbodyfontenvironment%
+ {\dosingleempty\doshowbodyfontenvironment}
+
+\def\doshowbodyfontenvironment[#1]%
+ {\startbaselinecorrection
+ \vbox
+ {\tabskip\!!zeropoint
+ \parindent\!!zeropoint
+ \doifelsenothing{#1}
+ {\def\title{\the\korpsgrootte}}
+ {\switchtobodyfont[#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
+ \@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\donext}}
+ \stopbaselinecorrection}
+
+%D \macros
+%D {getglyph}
+%D
+%D Individual glyphs can be accessed by using
+%D
+%D \starttypen
+%D \getglyph{fontname}{character}
+%D \stoptypen
+%D
+%D This macro is used in for instance the symbol modules.
+
+\def\getglyph#1#2%
+ {{\font\temp=\truefontname{#1} at \bodyfontsize\temp#2\relax}}
+
+%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 {smashaccent}
+%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{\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.
+
+\def\dodosmashaccent#1%
+ {\bgroup
+ \setbox0=\hbox{#1}%
+ \setbox2=\hbox{\normalaccent\scratchcounter#1}%
+ \ht2=\ht0\box2
+ \egroup
+ \nobreak}
+
+\def\dosmashaccent%
+ {\afterassignment\dodosmashaccent\expandafter\scratchcounter}
+
+\def\smashaccent%
+ {\dontleavehmode
+ \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 The difference is in the height:
+%D
+%D \leavevmode\ruledhbox
+%D {\ruledhbox{\smashaccent\"Uberhaupt}\quad
+%D oder\quad
+%D \ruledhbox{\"Uberhaupt}}
+
+%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.
+%D Here the difference is in the position:
+%D
+%D \leavevmode\ruledhbox
+%D {\ruledhbox{\moveaccent{-.1ex}\"Uberhaupt}\quad
+%D oder\quad
+%D \ruledhbox{\"Uberhaupt}}
+
+\def\dodomoveaccent#1%
+ {\bgroup
+ \dimen0=\fontdimen5\font
+ \dimen2=\dimen0
+ \advance\dimen2 by -\accentdisplacement
+ \fontdimen5\font=\dimen2
+ \normalaccent\scratchcounter#1\relax
+ \fontdimen5\font=\dimen0
+ \egroup}
+
+\def\domoveaccent%
+ {\afterassignment\dodomoveaccent\expandafter\scratchcounter}
+
+\def\moveaccent#1%
+ {\dontleavehmode
+ \def\accentdisplacement{#1}%
+ \let\accent=\domoveaccent}
+
+%D Personally I think that using \TEX\ is complicated by the
+%D way fonts are handled. Apart from the many encodings, we
+%D also deal with different naming schemes. Confronted with
+%D this problem, I decided to change the definitions into:
+%D
+%D \starttypen
+%D \definebodyfont [12pt] [rm] [tf=Times-Roman at 12pt]
+%D \stoptypen
+%D
+%D combined with for instance:
+%D
+%D \starttypen
+%D \definefontsynonym [Times-Roman] [tir]
+%D \stoptypen
+%D
+%D Then Taco came up with the suggestion to automate this
+%D process by loading the fontmap file as distributed with the
+%D \DVIPS\ and \PDFTEX\ program. Therefore, we now have:
+
+\def\loadfontmappingfile#1#2#3% file yes no
+ {\pushendofline
+ \chardef\@@savedtabcatcode=\the\catcode`\^^I
+ \def\dodocommando##1 ##2 ##3 ##4\end%
+ {\doifnot{##1}{*}
+ {%\writestatus{\m!systems}{font ##2 mapped into ##1}%
+ \definefontsynonym[##2][##1]}}%
+ \def\docommando%
+ {\expandafter\dodocommando\fileline * * * * \end}%
+ \doprocessfile\scratchread{#1.map}\docommando
+ \catcode`\^^I=\@@savedtabcatcode
+ \popendofline
+ \iffileprocessed#2\else#3\fi}
+
+%D Now we're up to some definitions.
+
+\definebodyfontenvironment
+ [\s!default]
+ [ \s!text=1.0,
+ \s!script=0.7,
+ \s!scriptscript=0.5,
+ \c!a=1.200,
+ \c!b=1.440,
+ \c!c=1.728,
+ \c!d=2.074,
+ \c!x=0.8,
+ \c!xx=0.6,
+ \c!groot=1.2,
+ \c!klein=0.8,
+ \c!interlinie=,
+ \c!em=\v!schuin]
+
+\definebodyfontenvironment
+ [\!!fourteenpointfour]
+ [ \s!text=\!!fourteenpointfour,
+ \s!script=\!!elevenpoint,
+ \s!scriptscript=\!!ninepoint,
+ \c!x=\!!twelvepoint,
+ \c!xx=\!!tenpoint,
+ \c!groot=\!!fourteenpointfour,
+ \c!klein=\!!twelvepoint]
+
+\definebodyfontenvironment
+ [\!!twelvepoint]
+ [ \s!text=\!!twelvepoint,
+ \s!script=\!!ninepoint,
+ \s!scriptscript=\!!sevenpoint,
+ \c!x=\!!tenpoint,
+ \c!xx=\!!eightpoint,
+ \c!groot=\!!fourteenpointfour,
+ \c!klein=\!!tenpoint]
+
+\definebodyfontenvironment
+ [\!!elevenpoint]
+ [ \s!text=\!!elevenpoint,
+ \s!script=\!!eightpoint,
+ \s!scriptscript=\!!sixpoint,
+ \c!x=\!!ninepoint,
+ \c!xx=\!!sevenpoint,
+ \c!groot=\!!twelvepoint,
+ \c!klein=\!!ninepoint]
+
+\definebodyfontenvironment
+ [\!!tenpoint]
+ [ \s!text=\!!tenpoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!eightpoint,
+ \c!xx=\!!sixpoint,
+ \c!groot=\!!twelvepoint,
+ \c!klein=\!!eightpoint]
+
+\definebodyfontenvironment
+ [\!!ninepoint]
+ [ \s!text=\!!ninepoint,
+ \s!script=\!!sevenpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sevenpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!elevenpoint,
+ \c!klein=\!!sevenpoint]
+
+\definebodyfontenvironment
+ [\!!eightpoint]
+ [ \s!text=\!!eightpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sixpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!tenpoint,
+ \c!klein=\!!sixpoint]
+
+\definebodyfontenvironment
+ [\!!sevenpoint]
+ [ \s!text=\!!sevenpoint,
+ \s!script=\!!sixpoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!sixpoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!ninepoint,
+ \c!klein=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!sixpoint]
+ [ \s!text=\!!sixpoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!fivepoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!eightpoint,
+ \c!klein=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!fivepoint]
+ [ \s!text=\!!fivepoint,
+ \s!script=\!!fivepoint,
+ \s!scriptscript=\!!fivepoint,
+ \c!x=\!!fivepoint,
+ \c!xx=\!!fivepoint,
+ \c!groot=\!!sevenpoint,
+ \c!klein=\!!fivepoint]
+
+\definebodyfontenvironment
+ [\!!fourpoint]
+ [ \s!text=\!!fourpoint,
+ \s!script=\!!fourpoint,
+ \s!scriptscript=\!!fourpoint,
+ \c!x=\!!fourpoint,
+ \c!xx=\!!fourpoint,
+ \c!groot=\!!sixpoint,
+ \c!klein=\!!fourpoint]
+
+\definebodyfontswitch [fourteenpointfour] [\!!fourteenpointfour]
+\definebodyfontswitch [twelvepoint] [\!!twelvepoint]
+\definebodyfontswitch [elevenpoint] [\!!elevenpoint]
+\definebodyfontswitch [tenpoint] [\!!tenpoint]
+\definebodyfontswitch [ninepoint] [\!!ninepoint]
+\definebodyfontswitch [eightpoint] [\!!eightpoint]
+\definebodyfontswitch [sevenpoint] [\!!sevenpoint]
+\definebodyfontswitch [sixpoint] [\!!sixpoint]
+\definebodyfontswitch [fivepoint] [\!!fivepoint]
+\definebodyfontswitch [fourpoint] [\!!fourpoint]
+
+\definebodyfontswitch [xii] [\!!twelvepoint]
+\definebodyfontswitch [xi] [\!!elevenpoint]
+\definebodyfontswitch [x] [\!!tenpoint]
+\definebodyfontswitch [ix] [\!!ninepoint]
+\definebodyfontswitch [viii] [\!!eightpoint]
+\definebodyfontswitch [vii] [\!!sevenpoint]
+\definebodyfontswitch [vi] [\!!sixpoint]
+
+\definefontstyle [\c!rm,\v!roman,\v!serif,\v!regular] [\c!rm]
+\definefontstyle [\c!ss,\v!sansserif,\v!sans,\v!support] [\c!ss]
+\definefontstyle [\c!tt,\v!teletype,\v!type,\v!mono] [\c!tt]
+\definefontstyle [\c!hw,\v!handwritten] [\c!hw]
+\definefontstyle [\c!cg,\v!calligraphic] [\c!cg]
+
+\definealternativestyle [\v!mediaeval] [\os] []
+\definealternativestyle [\v!normaal] [\tf] []
+\definealternativestyle [\v!vet] [\bf] []
+\definealternativestyle [\v!type] [\tt] []
+\definealternativestyle [\v!schuin] [\sl] []
+\definealternativestyle [\v!italic] [\it] []
+\definealternativestyle [\v!vetschuin,\v!schuinvet] [\bs] []
+\definealternativestyle [\v!vetitalic,\v!italicvet] [\bi] []
+\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!kleinvetitalic,\v!kleinitalicvet] [\bix] []
+
+%D We treat {\sc Small Caps} and \kap {Pseudo Caps} a bit
+%D different.
+
+\definealternativestyle [\v!kap,\v!kapitaal] [\normalkap] [\normalkap]
+\definealternativestyle [\v!smallcaps] [\sc] [\sc]
+
+%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 (but
+%D not yet at this moment) and activate the 12pt roman
+%D bodyfont. Sans serif and teletype are also available and
+%D can be called for by \type{\ss} and \type{\tt}.
+
+\setupbodyfont [unk, fil, rm]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/font-kb.tex b/tex/context/base/font-kb.tex
deleted file mode 100644
index 98f369488..000000000
--- a/tex/context/base/font-kb.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-%D \module
-%D [ file=font-kb,
-%D version=1998.11.4,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=Karl Berry Font Names,
-%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.
-
-\definefilesynonym [Courier] [pcr]
-\definefilesynonym [Courier-Oblique] [pcro]
-\definefilesynonym [Helvetica] [phv]
-\definefilesynonym [Helvetica-Oblique] [phvo]
-\definefilesynonym [Helvetica-Bold] [phvb]
-\definefilesynonym [Helvetica-BoldOblique] [phvbo]
-\definefilesynonym [Times-Roman] [ptm]
-\definefilesynonym [Times-Italic] [ptmi]
-\definefilesynonym [Times-Bold] [ptmb]
-\definefilesynonym [Times-BoldItalic] [ptmbi]
-
-\definefilesynonym [AvantGarde] [pag]
-\definefilesynonym [BookmanLight] [pbk]
-\definefilesynonym [CentaurMT] [pur]
-\definefilesynonym [Garamond] [pgm]
-\definefilesynonym [GillSans] [pgs]
-\definefilesynonym [NewBaskerville] [pnb]
-\definefilesynonym [Optima] [pop]
-\definefilesynonym [Palatino] [ppl]
-\definefilesynonym [Symbol] [psy]
-\definefilesynonym [Univers] [pun]
-\definefilesynonym [Utopia] [put]
-\definefilesynonym [ZapfChancery] [pzc]
-\definefilesynonym [ZapfDingbats] [pzd]
- \ No newline at end of file
diff --git a/tex/context/base/font-lbr.tex b/tex/context/base/font-lbr.tex
index dcddb44d7..9b62c0a7c 100644
--- a/tex/context/base/font-lbr.tex
+++ b/tex/context/base/font-lbr.tex
@@ -1,349 +1,301 @@
-%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 bodyfont is indeed never that size. The Lucida Bright
-%D fonts come in one design size.
-
-\startcoding[texnansi]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
- [tf=LucidaBright sa 1,
- bf=LucidaBright-Demi sa 1,
- it=LucidaBright-Italic sa 1,
- sl=LucidaBright-Oblique sa 1,
- bi=LucidaBright-DemiItalic sa 1,
- bs=LucidaBright-DemiItalic sa 1,
- tfa=LucidaBright sa 1.200,
- tfb=LucidaBright sa 1.440,
- tfc=LucidaBright sa 1.728,
- tfd=LucidaBright sa 2.074,
- sc=LucidaBright sa 0.833]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
- [tf=LucidaSans sa 1,
- bf=LucidaSans-Demi sa 1,
- it=LucidaSans-Italic sa 1,
- sl=LucidaSans-Italic sa 1,
- bi=LucidaSans-DemiItalic sa 1,
- bs=LucidaSans-DemiItalic sa 1,
- tfa=LucidaSans sa 1.200,
- tfb=LucidaSans sa 1.440,
- tfc=LucidaSans sa 1.728,
- tfd=LucidaSans sa 2.074,
- sc=LucidaSans sa 0.833]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
- [tf=LucidaSans-Typewriter sa 1,
- sl=LucidaSans-TypewriterOblique sa 1,
- it=LucidaSans-TypewriterOblique sa 1,
- bf=LucidaSans-TypewriterBold sa 1,
- bs=LucidaSans-TypewriterBoldOblique sa 1,
- tfa=LucidaSans-Typewriter sa 1.200,
- tfb=LucidaSans-Typewriter sa 1.440,
- tfc=LucidaSans-Typewriter sa 1.728,
- tfd=LucidaSans-Typewriter sa 2.074]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [hw]
- [tf=LucidaHandwriting-Italic sa 1]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [cg]
- [tf=LucidaCalligraphy-Italic sa 1]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [mm]
- [ex=LucidaNewMath-Extension sa 1,
- mi=LucidaNewMath-AltItalic sa 1,
- sy=LucidaNewMath-Symbol sa 1,
- ma=LucidaNewMath-Arrows sa 1]
-
-\definebodyfont [7pt,6pt,5pt,4pt] [rm]
- [tf=LucidaBright sa 1,
- bf=LucidaBright-Demi sa 1,
- sl=LucidaBright-Italic sa 1,
- it=LucidaBright-Italic sa 1]
-
-\definebodyfont [7pt,6pt,5pt,4pt] [ss]
- [tf=LucidaSans sa 1,
- sl=LucidaSans-Demi sa 1,
- it=LucidaSans-Italic sa 1,
- bf=LucidaSans-Italic sa 1]
-
-\definebodyfont [7pt,6pt,5pt,4pt] [tt]
- [tf=LucidaSans-Typewriter sa 1,
- sl=LucidaSans-TypewriterOblique sa 1]
-
-\definebodyfont [7pt,6pt,5pt,4pt] [mm]
- [ex=LucidaNewMath-Extension sa 1,
- mi=LucidaNewMath-AltItalic sa 1,
- sy=LucidaNewMath-Symbol sa 1,
- ma=LucidaNewMath-Arrows sa 1]
-
-%D Defining the larger alternatives takes only a few
-%D commands, thanks to \type{sa}.
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
- [bfa=LucidaBright-Demi sa 1.200,
- bfb=LucidaBright-Demi sa 1.440,
- bfc=LucidaBright-Demi sa 1.728,
- bfd=LucidaBright-Demi sa 2.074,
- sla=LucidaBright-Oblique sa 1.200,
- slb=LucidaBright-Oblique sa 1.440,
- slc=LucidaBright-Oblique sa 1.728,
- sld=LucidaBright-Oblique sa 2.074,
- bsa=LucidaBright-DemiItalic sa 1.200,
- bsb=LucidaBright-DemiItalic sa 1.440,
- bsc=LucidaBright-DemiItalic sa 1.728,
- bsd=LucidaBright-DemiItalic sa 2.074]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
- [bfa=LucidaSans sa 1.200,
- bfb=LucidaSans sa 1.440,
- bfc=LucidaSans sa 1.728,
- bfd=LucidaSans sa 2.074,
- sla=LucidaSans-Demi sa 1.200,
- slb=LucidaSans-Demi sa 1.440,
- slc=LucidaSans-Demi sa 1.728,
- sld=LucidaSans-Demi sa 2.074,
- bsa=LucidaSans-Italic sa 1.200,
- bsb=LucidaSans-Italic sa 1.440,
- bsc=LucidaSans-Italic sa 1.728,
- bsd=LucidaSans-Italic sa 2.074]
-
-\definebodyfont [14.4pt,12pt,10pt] [tt]
- [sla=LucidaSans-TypewriterOblique sa 1.220,
- slb=LucidaSans-TypewriterOblique sa 1.440,
- slc=LucidaSans-TypewriterOblique sa 1.728,
- sld=LucidaSans-TypewriterOblique sa 2.074]
-
-\stopcoding
-
-%D The Lucida Bright TeleType font does not contain \TEX's
-%D visual space. The next definition offers an alternative.
-
-\def\controlspace%
- {\hbox{\font\next=cmtt10 at \bodyfontsize\next\char32}}
-
-%D Next we implement some alternatives for \AMS\ symbols.
-%D These can be overrules by loading the \AMS\ font module
-%D afterwards.
-
-\unprotect
-
-\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.
-
-\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
- \ No newline at end of file
+%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 bodyfont is indeed never that size. The Lucida Bright
+%D fonts come in one design size.
+
+\definefontsynonym [Serif] [LucidaBright]
+\definefontsynonym [SerifBold] [LucidaBright-Demi]
+\definefontsynonym [SerifItalic] [LucidaBright-Italic]
+\definefontsynonym [SerifSlanted] [LucidaBright-Oblique]
+\definefontsynonym [SerifBoldItalic] [LucidaBright-DemiItalic]
+\definefontsynonym [SerifBoldSlanted] [LucidaBright-DemiItalic]
+\definefontsynonym [SerifCaps] [LucidaBrightSmallcaps]
+
+\definefontsynonym [Sans] [LucidaSans]
+\definefontsynonym [SansBold] [LucidaSans-Demi]
+\definefontsynonym [SansItalic] [LucidaSans-Italic]
+\definefontsynonym [SansSlanted] [LucidaSans-Italic]
+\definefontsynonym [SansBoldItalic] [LucidaSans-DemiItalic]
+\definefontsynonym [SansBoldSlanted] [LucidaSans-DemiItalic]
+\definefontsynonym [SansCaps] [LucidaSans]
+
+\definefontsynonym [Mono] [LucidaSans-Typewriter]
+\definefontsynonym [MonoBold] [LucidaSans-TypewriterBold]
+\definefontsynonym [MonoItalic] [LucidaSans-TypewriterOblique]
+\definefontsynonym [MonoSlanted] [LucidaSans-TypewriterOblique]
+\definefontsynonym [MonoBoldItalic] [LucidaSans-TypewriterBoldOblique]
+\definefontsynonym [MonoBoldSlanted] [LucidaSans-TypewriterBoldOblique]
+\definefontsynonym [MonoCaps] [LucidaSans-Typewriter]
+
+\definefontsynonym [MathRoman] [LucidaBright]
+\definefontsynonym [MathExtension] [LucidaNewMath-Extension]
+\definefontsynonym [MathItalic] [LucidaNewMath-AltItalic]
+\definefontsynonym [MathSymbol] [LucidaNewMath-Symbol]
+\definefontsynonym [MathAlpha] [LucidaNewMath-Arrows]
+
+\definefontsynonym [Handwriting] [LucidaHandwriting-Italic]
+\definefontsynonym [Calligraphy] [LucidaCalligraphy-Italic]
+
+\definefontsynonym [OldStyle] [MathItalic]
+
+\definebodyfont
+ [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
+ [rm,ss,tt,mm]
+ [default]
+
+%D Some nice aditional ones.
+
+\definebodyfont
+ [14.4pt,12pt,11pt,10pt,9pt,8pt]
+ [hw,cg]
+ [default]
+
+%D Defining the larger alternatives takes only a few
+%D commands, thanks to \type{sa}.
+
+%D The Lucida Bright TeleType font does not contain \TEX's
+%D visual space. The next definition offers an alternative.
+
+\def\controlspace% slow slow slow
+ {\hbox to .5em
+ {\font\next=cmtt10 at \bodyfontsize\next
+ \hss\char32\hss}}
+
+% \def\controlspace%
+% {\hbox to .5em
+% {\hss
+% \vrule\!!width .1\dp\strutbox \!!height\!!zeropoint \!!depth .7\dp\strutbox
+% \vrule\!!width .4em\!!height -.6\dp\strutbox\!!depth .7\dp\strutbox
+% \vrule\!!width .1\dp\strutbox \!!height\!!zeropoint \!!depth .7\dp\strutbox
+% \hss}}
+
+%D Next we implement some alternatives for \AMS\ symbols.
+%D These can be overrules by loading the \AMS\ font module
+%D afterwards.
+
+\unprotect
+
+\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.
+
+\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}).
+
+%D Should these be adapted to \type {\bodyfontsize} ?
+
+\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}.
+
+% interferes with \mf settings
+%
+% \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-map.tex b/tex/context/base/font-map.tex
new file mode 100644
index 000000000..a430185a7
--- /dev/null
+++ b/tex/context/base/font-map.tex
@@ -0,0 +1,119 @@
+%D \module
+%D [ file=font-map,
+%D version=1998.3.13,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Postscript for Maps,
+%D author=Taco Hoekwater,
+%D date=\currentdate,
+%D copyright=NTG Maps]
+
+\startnotmode[localfonts]
+
+\definefontsynonym [Mono] [pcrr7tn] [encoding=texnansi]
+\definefontsynonym [MonoSlanted] [pcrro7tn] [encoding=texnansi]
+\definefontsynonym [MonoBold] [pcrb7tn] [encoding=texnansi]
+\definefontsynonym [MonoBoldSlanted] [pcrbo7tn] [encoding=texnansi]
+\definefontsynonym [MonoBoldItalic] [pcrbo7tn] [encoding=texnansi]
+
+\definefontsynonym [Serif] [ptmr7d] [encoding=texnansi]
+\definefontsynonym [SerifBold] [ftb] [encoding=texnansi]
+\definefontsynonym [SerifItalic] [ptmri7d] [encoding=texnansi]
+\definefontsynonym [SerifSlanted] [ptmro9t] [encoding=texnansi]
+\definefontsynonym [SerifBoldItalic] [ftbi] [encoding=texnansi]
+\definefontsynonym [SerifBoldSlanted] [ftbi] [encoding=texnansi]
+\definefontsynonym [SerifCaps] [ptmrc9t] [encoding=texnansi]
+
+\definefontsynonym [Sans] [ftl] [encoding=texnansi]
+\definefontsynonym [SansBold] [ftb] [encoding=texnansi]
+\definefontsynonym [SansItalic] [ftli] [encoding=texnansi]
+\definefontsynonym [SansSlanted] [ftli] [encoding=texnansi]
+\definefontsynonym [SansBoldItalic] [ftbi] [encoding=texnansi]
+\definefontsynonym [SansBoldSlanted] [ftbi] [encoding=texnansi]
+\definefontsynonym [SansCaps] [ftr] [encoding=texnansi]
+
+\definefontsynonym [BigSerif] [ptmr7t] [encoding=texnansi]
+\definefontsynonym [BigSerifSlanted] [ptmro7t] [encoding=texnansi]
+
+\stopnotmode
+
+\startmode[localfonts]
+
+\definefontsynonym [BigSerif] [Serif]
+\definefontsynonym [BigSerifSlanted] [SerifSlanted]
+
+\stopmode
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm]
+ [tf=Serif sa 1.06,
+ bf=SerifBold sa 1,
+ it=SerifItalic sa 1.06,
+ sl=SerifSlanted sa 1.06,
+ bi=SerifBoldItalic sa 1,
+ bs=SerifBoldSlanted sa 1,
+ sc=SerifCaps sa 1.06]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
+ [tfa=BigSerif sa 1.200,
+ tfb=BigSerif sa 1.440,
+ tfc=BigSerif sa 1.728,
+ tfd=BigSerif sa 2.074,
+ bfa=SerifBold sa 1.200,
+ bfb=SerifBold sa 1.440,
+ bfc=SerifBold sa 1.728,
+ bfd=SerifBold sa 2.074,
+ sla=BigSerifSlanted sa 1.200,
+ slb=BigSerifSlanted sa 1.440,
+ slc=BigSerifSlanted sa 1.728,
+ sld=BigSerifSlanted sa 2.074,
+ bsa=SerifBoldSlanted sa 1.200,
+ bsb=SerifBoldSlanted sa 1.440,
+ bsc=SerifBoldSlanted sa 1.728,
+ bsd=SerifBoldSlanted sa 2.074,
+ bia=SerifBoldItalic sa 1.200,
+ bib=SerifBoldItalic sa 1.440,
+ bic=SerifBoldItalic sa 1.728,
+ bid=SerifBoldItalic sa 2.074]
+
+\definebodyfont [22pt,17pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss]
+ [tf=Sans sa 1,
+ bf=SansBold sa 1,
+ it=SansItalic sa 1,
+ sl=SansSlanted sa 1,
+ bs=SansBoldSlanted sa 1,
+ bi=SansBoldSlanted sa 1,
+ sc=SansCaps sa .8,
+ tfa=Sans sa 1.200,
+ tfb=Sans sa 1.440,
+ tfc=Sans sa 1.728,
+ tfd=Sans sa 2.074,
+ bfa=SansBold sa 1.200,
+ bfb=SansBold sa 1.440,
+ bfc=SansBold sa 1.728,
+ bfd=SansBold sa 2.074,
+ bsa=SansBoldSlanted sa 1.200,
+ bsb=SansBoldSlanted sa 1.440,
+ bsc=SansBoldSlanted sa 1.728,
+ bsd=SansBoldSlanted sa 2.074]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt]
+ [ tf=Mono sa 1,
+ sl=MonoSlanted sa 1,
+ bf=MonoBold sa 1,
+ bs=MonoBoldSlanted sa 1,
+ bi=MonoBoldSlanted sa 1,
+ tfa=Mono sa 1.200,
+ tfb=Mono sa 1.440,
+ tfc=Mono sa 1.728,
+ tfd=Mono sa 2.074,
+ sla=MonoSlanted sa 1.200,
+ slb=MonoSlanted sa 1.440,
+ slc=MonoSlanted sa 1.728,
+ sld=MonoSlanted sa 2.074]
+
+%D The Courier font does not contain \TEX's visual space. The
+%D next definition offers an alternative.
+
+\def\controlspace%
+ {\hbox{\font\next=cmtt10 at \bodyfontsize\next\char32}}
+
+\endinput
diff --git a/tex/context/base/font-pcr.tex b/tex/context/base/font-pcr.tex
index adee397bd..1b964f812 100644
--- a/tex/context/base/font-pcr.tex
+++ b/tex/context/base/font-pcr.tex
@@ -1,46 +1,28 @@
-%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]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
- [tf=Courier sa 1,
- sl=Courier-Oblique sa 1,
- tfa=Courier sa 1.200,
- tfb=Courier sa 1.440,
- tfc=Courier sa 1.728,
- tfd=Courier sa 2.074]
-
-\definebodyfont [7pt,6pt,5pt] [tt]
- [tf=Courier sa 1,
- sl=Courier-Oblique sa 1]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt]
- [tf=Courier sa 1,
- sl=Courier-Oblique sa 1]
-
-\definebodyfont [14.4pt,12pt,10pt] [tt]
- [sla=Courier-Oblique sa 1.200,
- slb=Courier-Oblique sa 1.440,
- slc=Courier-Oblique sa 1.728,
- sld=Courier-Oblique sa 2.074]
-
-\stopcoding
-
-%D The Courier font does not contain \TEX's visual space. The
-%D next definition offers an alternative.
-
-\def\controlspace%
- {\hbox{\font\next=cmtt10 at \bodyfontsize\next\char32}}
-
-\endinput
- \ No newline at end of file
+%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 fonts.
+
+\definefontsynonym [Mono] [Courier]
+\definefontsynonym [MonoBold] [Courier]
+\definefontsynonym [MonoItalic] [Courier-Oblique]
+\definefontsynonym [MonoSlanted] [Courier-Oblique]
+\definefontsynonym [MonoBoldItalic] [Courier]
+\definefontsynonym [MonoBoldSlanted] [Courier]
+\definefontsynonym [MonoCaps] [Courier]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt] [default]
+
+%D The Courier font does not contain \TEX's visual space. The
+%D next definition offers an alternative at bodyfont size.
+
+\def\controlspace%
+ {\hbox{\font\next=cmtt10 at \bodyfontsize\next\char32}}
+
+\endinput
diff --git a/tex/context/base/font-phv.tex b/tex/context/base/font-phv.tex
index 1230bc236..fefcc43c3 100644
--- a/tex/context/base/font-phv.tex
+++ b/tex/context/base/font-phv.tex
@@ -1,53 +1,22 @@
-%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]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [ss]
- [tf=Helvetica sa 1,
- bf=Helvetica-Bold sa 1,
- it=Helvetica-Oblique sa 1,
- sl=Helvetica-Oblique sa 1,
- bs=Helvetica-BoldOblique sa 1,
- bi=Helvetica-BoldOblique sa 1,
- tfa=Helvetica sa 1.200,
- tfb=Helvetica sa 1.440,
- tfc=Helvetica sa 1.728,
- tfd=Helvetica sa 2.074,
- sc=Helvetica sa 0.833]
-
-\definebodyfont [7pt,6pt,5pt] [ss]
- [tf=Helvetica sa 1,
- bf=Helvetica-Bold sa 1,
- it=Helvetica-Oblique sa 1,
- sl=Helvetica-Oblique sa 1,
- bs=Helvetica-BoldOblique sa 1,
- bi=Helvetica-BoldOblique sa 1]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [tt]
- [bfa=Helvetica-Bold sa 1.200,
- bfb=Helvetica-Bold sa 1.440,
- bfc=Helvetica-Bold sa 1.728,
- bfd=Helvetica-Bold sa 2.074,
- sla=Helvetica-Oblique sa 1.200,
- slb=Helvetica-Oblique sa 1.440,
- slc=Helvetica-Oblique sa 1.728,
- sld=Helvetica-Oblique sa 2.074,
- bsa=Helvetica-BoldOblique sa 1.200,
- bsb=Helvetica-BoldOblique sa 1.440,
- bsc=Helvetica-BoldOblique sa 1.728,
- bsd=Helvetica-BoldOblique sa 2.074]
-
-\stopcoding
-
-\endinput
- \ No newline at end of file
+%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 fonts.
+
+\definefontsynonym [Sans] [Helvetica]
+\definefontsynonym [SansBold] [Helvetica-Bold]
+\definefontsynonym [SansItalic] [Helvetica-Oblique]
+\definefontsynonym [SansSlanted] [Helvetica-Oblique]
+\definefontsynonym [SansBoldItalic] [Helvetica-BoldOblique]
+\definefontsynonym [SansBoldSlanted] [Helvetica-BoldOblique]
+\definefontsynonym [SansCaps] [Helvetica]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss] [default]
+
+\endinput
diff --git a/tex/context/base/font-pos.tex b/tex/context/base/font-pos.tex
index 4783df561..c168d1121 100644
--- a/tex/context/base/font-pos.tex
+++ b/tex/context/base/font-pos.tex
@@ -1,18 +1,17 @@
-%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
+%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
diff --git a/tex/context/base/font-ptm.tex b/tex/context/base/font-ptm.tex
index 8c1960536..9c897bb11 100644
--- a/tex/context/base/font-ptm.tex
+++ b/tex/context/base/font-ptm.tex
@@ -1,53 +1,22 @@
-%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]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
- [tf=Times-Roman sa 1,
- bf=Times-Bold sa 1,
- it=Times-Italic sa 1,
- sl=Times-Italic sa 1,
- bi=Times-BoldItalic sa 1,
- bs=Times-Bold sa 1,
- tfa=Times-Roman sa 1.200,
- tfb=Times-Roman sa 1.440,
- tfc=Times-Roman sa 1.728,
- tfd=Times-Roman sa 2.074,
- sc=Times-Roman sa 0.833]
-
-\definebodyfont [7pt,6pt,5pt] [rm]
- [tf=Times-Roman sa 1,
- bf=Times-Bold sa 1,
- it=Times-Italic sa 1,
- sl=Times-Italic sa 1,
- bi=Times-BoldItalic sa 1,
- bs=Times-Bold sa 1]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
- [bfa=Times-Bold sa 1.200,
- bfb=Times-Bold sa 1.440,
- bfc=Times-Bold sa 1.728,
- bfd=Times-Bold sa 2.074,
- sla=Times-Italic sa 1.200,
- slb=Times-Italic sa 1.440,
- slc=Times-Italic sa 1.728,
- sld=Times-Italic sa 2.074,
- bsa=Times-Bold sa 1.200,
- bsb=Times-Bold sa 1.440,
- bsc=Times-Bold sa 1.728,
- bsd=Times-Bold sa 2.074]
-
-\stopcoding
-
-\endinput
- \ No newline at end of file
+%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.
+
+\definefontsynonym [Serif] [Times-Roman]
+\definefontsynonym [SerifBold] [Times-Bold]
+\definefontsynonym [SerifItalic] [Times-Italic]
+\definefontsynonym [SerifSlanted] [Times-Italic]
+\definefontsynonym [SerifBoldItalic] [Times-BoldItalic]
+\definefontsynonym [SerifBoldSlanted] [Times-BoldItalic]
+\definefontsynonym [SerifCaps] [Times-Roman]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm] [default]
+
+\endinput
diff --git a/tex/context/base/font-unk.tex b/tex/context/base/font-unk.tex
new file mode 100644
index 000000000..c0928ad99
--- /dev/null
+++ b/tex/context/base/font-unk.tex
@@ -0,0 +1,211 @@
+%D \module
+%D [ file=font-unk,
+%D version=1998.09.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Unknown Defaults,
+%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 is rather important, because it enables us to
+%D define and call for not yet defined fonts in a way
+%D completely independant of real font names. First we map
+%D some meaningful names onto unknown filenames.
+
+\definefontsynonym [Serif] [unknown]
+\definefontsynonym [SerifBold] [unknown]
+\definefontsynonym [SerifItalic] [unknown]
+\definefontsynonym [SerifSlanted] [unknown]
+\definefontsynonym [SerifBoldItalic] [unknown]
+\definefontsynonym [SerifBoldSlanted] [unknown]
+\definefontsynonym [SerifCaps] [unknown]
+
+\definefontsynonym [Sans]
+\definefontsynonym [SansBold] [unknown]
+\definefontsynonym [SansItalic] [unknown]
+\definefontsynonym [SansSlanted] [unknown]
+\definefontsynonym [SansBoldItalic] [unknown]
+\definefontsynonym [SansBoldSlanted] [unknown]
+\definefontsynonym [SansCaps] [unknown]
+
+\definefontsynonym [Mono] [unknown]
+\definefontsynonym [MonoBold] [unknown]
+\definefontsynonym [MonoItalic] [unknown]
+\definefontsynonym [MonoSlanted] [unknown]
+\definefontsynonym [MonoBoldItalic] [unknown]
+\definefontsynonym [MonoBoldSlanted] [unknown]
+\definefontsynonym [MonoCaps] [unknown]
+
+\definefontsynonym [MathRoman] [unknown]
+\definefontsynonym [MathExtension] [unknown]
+\definefontsynonym [MathItalic] [unknown]
+\definefontsynonym [MathSymbol] [unknown]
+
+\definefontsynonym [MathAlpha] [unknown]
+\definefontsynonym [MathBeta] [unknown]
+
+\definefontsynonym [Handwriting] [unknown]
+\definefontsynonym [Calligraphic] [unknown]
+
+%D Also handy:
+
+\definefontsynonym [Regular] [Serif]
+\definefontsynonym [RegularBold] [SerifBold]
+\definefontsynonym [RegularItalic] [SerifItalic]
+\definefontsynonym [RegularSlanted] [SerifSlanted]
+\definefontsynonym [RegularBoldItalic] [SerifBoldItalic]
+\definefontsynonym [RegularBoldSlanted] [SerifBoldSlanted]
+\definefontsynonym [RegularCaps] [SerifCaps]
+
+\definefontsynonym [Support] [Sans]
+\definefontsynonym [SupportBold] [SansBold]
+\definefontsynonym [SupportItalic] [SansItalic]
+\definefontsynonym [SupportSlanted] [SansSlanted]
+\definefontsynonym [SupportBoldItalic] [SansBoldItalic]
+\definefontsynonym [SupportBoldSlanted] [SansBoldSlanted]
+\definefontsynonym [SupportCaps] [SansCaps]
+
+%D Well, not that good an idea:
+
+\definefontsynonym [Roman] [Serif]
+\definefontsynonym [RomanBold] [SerifBold]
+\definefontsynonym [RomanItalic] [SerifItalic]
+\definefontsynonym [RomanSlanted] [SerifSlanted]
+\definefontsynonym [RomanBoldItalic] [SerifBoldItalic]
+\definefontsynonym [RomanBoldSlanted] [SerifBoldSlanted]
+\definefontsynonym [RomanCaps] [SerifCaps]
+
+\definefontsynonym [Type] [Mono]
+\definefontsynonym [TypeBold] [MonoBold]
+\definefontsynonym [TypeItalic] [MonoItalic]
+\definefontsynonym [TypeSlanted] [MonoSlanted]
+\definefontsynonym [TypeBoldItalic] [MonoBoldItalic]
+\definefontsynonym [TypeBoldSlanted] [MonoBoldSlanted]
+\definefontsynonym [TypeCaps] [MonoCaps]
+
+% To be added: Handwriting, Calligraphic
+
+%D Next we define roman, sans and monospaced font sets.
+
+\definebodyfont [default] [rm]
+ [ tf=Serif sa 1,
+ tfa=Serif sa a,
+ tfb=Serif sa b,
+ tfc=Serif sa c,
+ tfd=Serif sa d,
+ bf=SerifBold sa 1,
+ bfa=SerifBold sa a,
+ bfb=SerifBold sa b,
+ bfc=SerifBold sa c,
+ bfd=SerifBold sa d,
+ it=SerifItalic sa 1,
+ ita=SerifItalic sa a,
+ itb=SerifItalic sa b,
+ itc=SerifItalic sa c,
+ itd=SerifItalic sa d,
+ sl=SerifSlanted sa 1,
+ sla=SerifSlanted sa a,
+ slb=SerifSlanted sa b,
+ slc=SerifSlanted sa c,
+ sld=SerifSlanted sa d,
+ bi=SerifBoldItalic sa 1,
+ bia=SerifBoldItalic sa a,
+ bib=SerifBoldItalic sa b,
+ bic=SerifBoldItalic sa c,
+ bid=SerifBoldItalic sa d,
+ bs=SerifBoldSlanted sa 1,
+ bsa=SerifBoldSlanted sa a,
+ bsb=SerifBoldSlanted sa b,
+ bsc=SerifBoldSlanted sa c,
+ bsd=SerifBoldSlanted sa d,
+ sc=SerifCaps sa 1,
+ sca=SerifCaps sa a,
+ scb=SerifCaps sa b,
+ scc=SerifCaps sa c,
+ scd=SerifCaps sa d]
+
+\definebodyfont [default] [ss]
+ [ tf=Sans sa 1,
+ tfa=Sans sa a,
+ tfb=Sans sa b,
+ tfc=Sans sa c,
+ tfd=Sans sa d,
+ bf=SansBold sa 1,
+ bfa=SansBold sa a,
+ bfb=SansBold sa b,
+ bfc=SansBold sa c,
+ bfd=SansBold sa d,
+ it=SansItalic sa 1,
+ ita=SansItalic sa a,
+ itb=SansItalic sa b,
+ itc=SansItalic sa c,
+ itd=SansItalic sa d,
+ sl=SansSlanted sa 1,
+ ita=SansSlanted sa a,
+ itb=SansSlanted sa b,
+ itc=SansSlanted sa c,
+ itd=SansSlanted sa d,
+ bi=SansBoldItalic sa 1,
+ ita=SansBoldItalic sa a,
+ itb=SansBoldItalic sa b,
+ itc=SansBoldItalic sa c,
+ itd=SansBoldItalic sa d,
+ bs=SansBoldSlanted sa 1,
+ ita=SansBoldSlanted sa a,
+ itb=SansBoldSlanted sa b,
+ itc=SansBoldSlanted sa c,
+ itd=SansBoldSlanted sa d,
+ sc=SansCaps sa 1,
+ sca=SansCaps sa a,
+ scb=SansCaps sa b,
+ scc=SansCaps sa c,
+ scd=SansCaps sa d]
+
+\definebodyfont [default] [tt]
+ [ tf=Mono sa 1,
+ tfa=Mono sa a,
+ tfb=Mono sa b,
+ tfc=Mono sa c,
+ tfd=Mono sa d,
+ sl=MonoSlanted sa 1,
+ sla=MonoSlanted sa a,
+ slb=MonoSlanted sa b,
+ slc=MonoSlanted sa c,
+ sld=MonoSlanted sa d,
+ it=MonoItalic sa 1,
+ ita=MonoItalic sa a,
+ itb=MonoItalic sa b,
+ itc=MonoItalic sa c,
+ itd=MonoItalic sa d]
+
+\definebodyfont [default] [mm]
+ [mr=MathRoman sa 1,
+ ex=MathExtension sa 1,
+ mi=MathItalic sa 1,
+ sy=MathSymbol sa 1,
+ ma=MathAlpha sa 1,
+ mb=MathBeta sa 1]
+
+\definebodyfont [default] [hw]
+ [ tf=Handwriting sa 1,
+ tfa=Handwriting sa a,
+ tfb=Handwriting sa b
+ tfc=Handwriting sa c,
+ tfd=Handwriting sa d]
+
+\definebodyfont [default] [cg]
+ [ tf=Calligraphy sa 1,
+ tfa=Calligraphy sa a,
+ tfb=Calligraphy sa b
+ tfc=Calligraphy sa c,
+ tfd=Calligraphy sa d]
+
+%D These definitions come into action as soon as names are
+%D mapped onto real file names (or names that themselves are
+%D mapped).
+
+\endinput
diff --git a/tex/context/base/font-win.tex b/tex/context/base/font-win.tex
index ccdbaa4c5..d67542557 100644
--- a/tex/context/base/font-win.tex
+++ b/tex/context/base/font-win.tex
@@ -1,124 +1,2 @@
-%D \module
-%D [ file=font-win,
-%D version=1997.8.29,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=Windows 1252 ANSI keys,
-%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.
-
-%D This module activates the (western) \kap{windows} high \ANSI\
-%D characters, such as ë and á.
-
-\unprotect
-
-\catcode`\À=\@@active \unexpanded\defÀ{\`A}
-\catcode`\Á=\@@active \unexpanded\defÁ{\'A}
-\catcode`\Â=\@@active \unexpanded\defÂ{\^A}
-\catcode`\Ã=\@@active \unexpanded\defÃ{\~A}
-\catcode`\Ä=\@@active \unexpanded\defÄ{\"A}
-\catcode`\Å=\@@active \unexpanded\defÅ{\AA}
-\catcode`\Æ=\@@active \unexpanded\defÆ{\AE}
-
-\catcode`\à=\@@active \unexpanded\defà{\`a}
-\catcode`\á=\@@active \unexpanded\defá{\'a}
-\catcode`\â=\@@active \unexpanded\defâ{\^a}
-\catcode`\ã=\@@active \unexpanded\defã{\~a}
-\catcode`\ä=\@@active \unexpanded\defä{\"a}
-\catcode`\å=\@@active \unexpanded\defå{\aa}
-\catcode`\æ=\@@active \unexpanded\defæ{\ae}
-
-\catcode`\Ç=\@@active \unexpanded\defÇ{\c C}
-\catcode`\ç=\@@active \unexpanded\defç{\c c}
-
-\catcode`\È=\@@active \unexpanded\defÈ{\`E}
-\catcode`\É=\@@active \unexpanded\defÉ{\'E}
-\catcode`\Ê=\@@active \unexpanded\defÊ{\^E}
-\catcode`\Ë=\@@active \unexpanded\defË{\"E}
-
-\catcode`\è=\@@active \unexpanded\defè{\`e}
-\catcode`\é=\@@active \unexpanded\defé{\'e}
-\catcode`\ê=\@@active \unexpanded\defê{\^e}
-\catcode`\ë=\@@active \unexpanded\defë{\"e}
-
-\catcode`\Ì=\@@active \unexpanded\defÌ{\`I}
-\catcode`\Í=\@@active \unexpanded\defÍ{\'I}
-\catcode`\Î=\@@active \unexpanded\defÎ{\^I}
-\catcode`\Ï=\@@active \unexpanded\defÏ{\"I}
-
-\catcode`\ì=\@@active \unexpanded\defì{\`i}
-\catcode`\í=\@@active \unexpanded\defí{\'i}
-\catcode`\î=\@@active \unexpanded\defî{\^i}
-\catcode`\ï=\@@active \unexpanded\defï{\"i}
-
-\catcode`\Ñ=\@@active \unexpanded\defÑ{\~N}
-\catcode`\ñ=\@@active \unexpanded\defñ{\~n}
-
-\catcode`\Ò=\@@active \unexpanded\defÒ{\`O}
-\catcode`\Ó=\@@active \unexpanded\defÓ{\'O}
-\catcode`\Ô=\@@active \unexpanded\defÔ{\^O}
-\catcode`\Õ=\@@active \unexpanded\defÕ{\~O}
-\catcode`\Ö=\@@active \unexpanded\defÖ{\"O}
-\catcode`\Œ=\@@active \unexpanded\defŒ{\OE}
-\catcode`\Ø=\@@active \unexpanded\defØ{\O}
-
-\catcode`\ò=\@@active \unexpanded\defò{\`o}
-\catcode`\ó=\@@active \unexpanded\defó{\'o}
-\catcode`\ô=\@@active \unexpanded\defô{\^o}
-\catcode`\õ=\@@active \unexpanded\defõ{\~o}
-\catcode`\ö=\@@active \unexpanded\defö{\"o}
-\catcode`\œ=\@@active \unexpanded\defœ{\oe}
-\catcode`\ø=\@@active \unexpanded\defø{\o}
-
-\catcode`\Š=\@@active \unexpanded\defŠ{\v{S}}
-\catcode`\š=\@@active \unexpanded\defš{\v{s}}
-\catcode`\ß=\@@active \unexpanded\defß{\SS}
-
-\catcode`\Ù=\@@active \unexpanded\defÙ{\`U}
-\catcode`\Ú=\@@active \unexpanded\defÚ{\'U}
-\catcode`\Û=\@@active \unexpanded\defÛ{\^U}
-\catcode`\Ü=\@@active \unexpanded\defÜ{\"U}
-
-\catcode`\ù=\@@active \unexpanded\defù{\`u}
-\catcode`\ú=\@@active \unexpanded\defú{\'u}
-\catcode`\û=\@@active \unexpanded\defû{\^u}
-\catcode`\ü=\@@active \unexpanded\defü{\"u}
-
-\catcode`\Ý=\@@active \unexpanded\defÝ{\'Y}
-\catcode`\ý=\@@active \unexpanded\defý{\'y}
-\catcode`\ÿ=\@@active \unexpanded\defÿ{\"y}
-
-\catcode`\¿=\@@active \unexpanded\def¿{?`}
-\catcode`\¡=\@@active \unexpanded\def¡{!`}
-\catcode`\†=\@@active \unexpanded\def†{\dag}
-\catcode`\‡=\@@active \unexpanded\def‡{\ddag}
-\catcode`\¶=\@@active \unexpanded\def¶{\P}
-\catcode`\§=\@@active \unexpanded\def§{\S}
-\catcode`\–=\@@active \unexpanded\def–{--}
-\catcode`\—=\@@active \unexpanded\def—{---}
-\catcode`\…=\@@active \unexpanded\def…{\dots}
-\catcode`\©=\@@active \unexpanded\def©{\copyright}
-\catcode`\£=\@@active \unexpanded\def£{\pounds}
-
-\catcode`\„=\@@active \unexpanded\def„{\char44\kern-.1em\char44}
-\catcode`\“=\@@active \unexpanded\def“{\char96\kern-.1em\char96}
-\catcode`\”=\@@active \unexpanded\def”{\char34}
-\catcode`\‘=\@@active \unexpanded\def‘{\upperleftsinglesixquote}
-\catcode`\’=\@@active \unexpanded\def’{\char39}
-\catcode`\›=\@@active \unexpanded\def›{\rightsubguillemot}
-\catcode`\‹=\@@active \unexpanded\def‹{\leftsubguillemot}
-
-\catcode`\«=\@@active
-\catcode`\»=\@@active
-
-\unexpanded\def«{\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
-\unexpanded\def»{\prewordbreak\rightguillemot}
-
-\protect
-
-\endinput
-
+\writestatus{ENCODING}{please use \string\useencoding[win] instead}\wait
+\input enco-win.tex \endinput
diff --git a/tex/context/base/java-ans.tex b/tex/context/base/java-ans.tex
new file mode 100644
index 000000000..71e6f85c4
--- /dev/null
+++ b/tex/context/base/java-ans.tex
@@ -0,0 +1,27 @@
+%D \module
+%D [ file=java-ans,
+%D version=1998.06.01,
+%D title=\CONTEXT\ JavaScript Macros,
+%D subtitle=Answer Analyzation,
+%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.
+
+\startJSpreamble{Do_Check_Answer} used later
+
+ function Do_Check_Answer (field, value)
+ { if (event.value.toLowerCase()==value.toLowerCase())
+ { event.target.hidden = true }
+ return("\040") } // funny, "" does not work
+
+\stopJSpreamble
+
+\startJScode{Check_Answer} uses {Do_Check_Answer}
+ event.value = Do_Check_Answer(JS_S_1, JS_S_2) ;
+\stopJScode
+
+\endinput
diff --git a/tex/context/base/java-fil.tex b/tex/context/base/java-fil.tex
new file mode 100644
index 000000000..729bf36eb
--- /dev/null
+++ b/tex/context/base/java-fil.tex
@@ -0,0 +1,33 @@
+\startJSpreamble{Auxiliary} used now
+
+ function DocumentFileName ()
+ { var Paths = this.path.split("/") ;
+ Paths = Paths[Paths.length-1].split(".") ;
+ return(Paths[0]) }
+
+ function Print_Page_Range(From, To) % gaat mis, nog geen args mogelijk
+ { if ((From>0)&&(To>=From))
+ { this.print(false,From,To,true) } }
+
+ function Print_This_Page ()
+ { this.print(false,this.pageNum,this.pageNum,true) }
+
+\stopJSpreamble
+
+\definereference
+ [PrintSubPaginas]
+ [JS(Print_Page_Range{\firstsubpage,\lastsubpage})]
+
+\definereference
+ [PrintSubPages]
+ [JS(Print_Page_Range{\firstsubpage,\lastsubpage})]
+
+\definereference
+ [PrintDezePagina]
+ [JS(Print_This_Page)]
+
+\definereference
+ [PrintThisPage]
+ [JS(Print_This_Page)]
+
+\endinput
diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex
new file mode 100644
index 000000000..8a6b84f78
--- /dev/null
+++ b/tex/context/base/java-fld.tex
@@ -0,0 +1,259 @@
+% nu nog alles geladen, moet dus anders
+
+%D \module
+%D [ file=java-fld,
+%D version=1998.05.20,
+%D title=\CONTEXT\ JavaScript Macros,
+%D subtitle=Field 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.
+
+\startJSpreamble {Sanitize_TeX_Input} used later
+
+ function Sanitized_TeX_String (value)
+ { var v = value ;
+ % v = v.replace(/\\\\\\/L/g,"\\225") ; % problematic
+ % v = v.replace( /\\\\OE/g,"\\226") ; % problematic
+ % v = v.replace( /\\\\vS/g,"\\227") ; % problematic
+ % v = v.replace( /\\\\"Y/g,"\\230") ; % problematic
+ % v = v.replace( /\\\\vZ/g,"\\231") ; % problematic
+ % v = v.replace(/\\\\\\/l/g,"\\233") ; % problematic
+ v = v.replace( /\\\\oe/g,"\\234") ;
+ % v = v.replace( /\\\\vs/g,"\\235") ; % problematic
+ % v = v.replace( /\\\\vz/g,"\\236") ; % problematic
+ v = v.replace( /\\\\<</g,"\\253") ;
+ v = v.replace( /\\\\>>/g,"\\273") ;
+ v = v.replace( /\\\\`A/g,"\\300") ;
+ v = v.replace( /\\\\'A/g,"\\301") ;
+ v = v.replace( /\\\\^A/g,"\\302") ;
+ v = v.replace( /\\\\~A/g,"\\303") ;
+ v = v.replace( /\\\\"A/g,"\\304") ;
+ v = v.replace( /\\\\oA/g,"\\305") ;
+ v = v.replace( /\\\\AE/g,"\\306") ;
+ v = v.replace( /\\\\,C/g,"\\307") ;
+ v = v.replace( /\\\\`E/g,"\\310") ;
+ v = v.replace( /\\\\'E/g,"\\311") ;
+ v = v.replace( /\\\\^E/g,"\\312") ;
+ v = v.replace( /\\\\"E/g,"\\313") ;
+ v = v.replace( /\\\\`I/g,"\\314") ;
+ v = v.replace( /\\\\'I/g,"\\315") ;
+ v = v.replace( /\\\\^I/g,"\\316") ;
+ v = v.replace( /\\\\"I/g,"\\317") ;
+ v = v.replace( /\\\\~N/g,"\\321") ;
+ v = v.replace( /\\\\`O/g,"\\322") ;
+ v = v.replace( /\\\\'O/g,"\\323") ;
+ v = v.replace( /\\\\^O/g,"\\324") ;
+ v = v.replace( /\\\\~O/g,"\\325") ;
+ v = v.replace( /\\\\"O/g,"\\326") ;
+ % v = v.replace(/\\\\\\/O/g,"\\330") ; % problematic
+ v = v.replace( /\\\\`U/g,"\\331") ;
+ v = v.replace( /\\\\'U/g,"\\332") ;
+ v = v.replace( /\\\\^U/g,"\\333") ;
+ v = v.replace( /\\\\"U/g,"\\334") ;
+ v = v.replace( /\\\\'Y/g,"\\335") ;
+ v = v.replace( /\\\\ss/g,"\\337") ;
+ v = v.replace( /\\\\`a/g,"\\340") ;
+ v = v.replace( /\\\\'a/g,"\\341") ;
+ v = v.replace( /\\\\^a/g,"\\342") ;
+ v = v.replace( /\\\\~a/g,"\\343") ;
+ v = v.replace( /\\\\"a/g,"\\344") ;
+ v = v.replace( /\\\\oa/g,"\\345") ;
+ v = v.replace( /\\\\ae/g,"\\346") ;
+ v = v.replace( /\\\\,c/g,"\\347") ;
+ v = v.replace( /\\\\`e/g,"\\350") ;
+ v = v.replace( /\\\\'e/g,"\\351") ;
+ v = v.replace( /\\\\^e/g,"\\352") ;
+ v = v.replace( /\\\\"e/g,"\\353") ;
+ v = v.replace( /\\\\`i/g,"\\354") ;
+ v = v.replace( /\\\\'i/g,"\\355") ;
+ v = v.replace( /\\\\^i/g,"\\356") ;
+ v = v.replace( /\\\\"i/g,"\\357") ;
+ v = v.replace( /\\\\~n/g,"\\361") ;
+ v = v.replace( /\\\\`o/g,"\\362") ;
+ v = v.replace( /\\\\'o/g,"\\363") ;
+ v = v.replace( /\\\\^o/g,"\\364") ;
+ v = v.replace( /\\\\~o/g,"\\365") ;
+ v = v.replace( /\\\\"o/g,"\\366") ;
+ % v = v.replace(/\\\\\\/o/g,"\\370") ; % problematic
+ v = v.replace( /\\\\`u/g,"\\371") ;
+ v = v.replace( /\\\\'u/g,"\\372") ;
+ v = v.replace( /\\\\^u/g,"\\373") ;
+ v = v.replace( /\\\\"u/g,"\\374") ;
+ v = v.replace( /\\\\'y/g,"\\375") ;
+ v = v.replace( /\\\\"y/g,"\\377") ;
+ return(v) }
+
+ var TeX_Key_Mode = 0 ;
+
+ function Initialize_TeX_Keystroke ()
+ { TeX_Key_Char = "" ;
+ TeX_Key_Mode = 0 }
+
+ function Sanitized_TeX_Keystroke (change)
+ { if (change=="\\\\")
+ { TeX_Key_Mode = 1 ;
+ return("") }
+ else if (TeX_Key_Mode==1)
+ { TeX_Key_Mode = 2 ;
+ TeX_Key_Char = change ;
+ return("") }
+ else if (TeX_Key_Mode==2)
+ { TeX_Key_Mode = 0 ;
+ TeX_Key_Char = "\\\\"+TeX_Key_Char+change ;
+ return(Sanitized_TeX_String(TeX_Key_Char)) }
+ else
+ { TeX_Key_Mode = 0 ;
+ return(change) } }
+
+\stopJSpreamble
+
+\startJScode {Initialize_TeX_Key} uses {Sanitize_TeX_Input}
+ Initialize_TeX_Keystroke() ;
+\stopJScode
+
+\startJScode {Convert_TeX_Key} uses {Sanitize_TeX_Input}
+ if (!event.willCommit)
+ { event.change = Sanitized_TeX_Keystroke(event.change) }
+\stopJScode
+
+\startJScode{Convert_TeX_String} uses {Sanitize_TeX_Input}
+ event.value = Sanitized_TeX_String(event.value) ;
+\stopJScode
+
+\startJSpreamble {Do_With_Field}
+
+function Hide_When_Down ()
+ { event.target.hidden = true }
+
+function Hide_Field ( Name )
+ { var v = this.getField(Name) ;
+ if (v) { v.hidden = true } }
+
+function Vide_Field ( Name )
+ { var v = this.getField(Name) ;
+ if (v) { v.hidden = false } }
+
+function Toggle_Hide ( Name )
+ { var v = this.getField(Name) ;
+ if (v) { v.hidden = !v.hidden } }
+
+function Field_On ( Name )
+ { v = this.getField(Name) ;
+ if (v) { v.value = "On" } }
+
+function Field_Off ( Name )
+ { var v = this.getField(Name) ;
+ if (v) { v.value = "Off" } }
+
+function Toggle_Value ( Name )
+ { var v = this.getField(Name) ;
+ if (v)
+ { if (v.value=="On")
+ { v.value = "Off" }
+ else
+ { v.value = "On" } } }
+
+function Toggle_Read ( Name )
+ { var v = this.getField(Name);
+ if (v) { v.readonly = !v.readonly } }
+
+function Flip_Fields ( Name )
+ { var Names = Name.split(",") ;
+ for (var i=0;i<Names.length;i++)
+ { v = this.getField(Names[i]) ;
+ if (v)
+ { v.hidden = !v.hidden ;
+ v.value = "On" } } }
+
+\stopJSpreamble
+
+\startJScode{Hide_When_Down} Hide_When_Down() \stopJScode
+\startJScode{Hide_Field} Hide_Field(JS_S_1) \stopJScode
+\startJScode{Vide_Field} Vide_Field(JS_S_1) \stopJScode
+\startJScode{Toggle_Hide} Toggle_Hide(JS_S_1) \stopJScode
+\startJScode{Field_On} Field_On(JS_S_1) \stopJScode
+\startJScode{Field_Off} Field_Off(JS_S_1) \stopJScode
+\startJScode{Toggle_Value} Toggle_Value(JS_S_1) \stopJScode
+\startJScode{Toggle_Read} Toggle_Read(JS_S_1) \stopJScode
+\startJScode{Flip_Fields} Flip_Fields(JS_S_1) \stopJScode
+
+\startJScode{Forget_Changes} this.dirty = false \stopJScode
+
+\startJSpreamble {Walk_Field} used later
+
+function Walk_Field ( FieldSet )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (v)
+ { if (v.value=="On")
+ { v.value = "Off" ;
+ var ii = i ; ii++ ;
+ v = this.getField(FieldSet+":"+ii) ;
+ if (!v)
+ { v = this.getField(FieldSet+":"+1) }
+ if (v)
+ { v.value = "On" }
+ break }
+ i++ }
+ else
+ { break } } }
+
+\stopJSpreamble
+
+\startJScode {Walk_Field} uses {Walk_Field}
+ Walk_Field (JS_S_1) ;
+\stopJScode
+
+\startJSpreamble {Walk_Field} used later
+
+function Walk_Field ( FieldSet )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (v)
+ { if (v.value=="On")
+ { v.value = "Off" ;
+ var ii = i ; ii++ ;
+ v = this.getField(FieldSet+":"+ii) ;
+ if (!v)
+ { v = this.getField(FieldSet+":"+1) }
+ if (v)
+ { v.value = "On" }
+ break }
+ i++ }
+ else
+ { break } } }
+
+\stopJSpreamble
+
+\startJScode {Walk_Field} uses {Walk_Field}
+ Walk_Field (JS_S_1) ;
+\stopJScode
+
+\startJSpreamble {Set_Field} used later
+
+function Set_Field ( FieldSet, FieldName )
+ { var i = 1 ;
+ while (true)
+ { v = this.getField(FieldSet+":"+i) ;
+ if (!v)
+ { break }
+ else if (i==FieldName)
+ { v.value = "On" }
+ else
+ { v.value = "Off" }
+ i++ } }
+
+\stopJSpreamble
+
+\startJScode {Set_Field} uses {Set_Field}
+ Set_Field (JS_S_1,JS_S_2) ;
+\stopJScode
+
+\endinput
diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex
new file mode 100644
index 000000000..95c7ae08b
--- /dev/null
+++ b/tex/context/base/java-ini.tex
@@ -0,0 +1,636 @@
+% JavaScript support is under development. In the near future
+% a slightly different model will be used. The JScode stuff
+% will probably become just auto function inclusion and the
+% JS_* things will disappear. First I have to find a way to
+% deal with global variables so the 'uses' thing will remain.
+
+% Also, obeylines will be supported.
+
+%D \module
+%D [ file=java-ini,
+%D version=1998.01.30,
+%D title=\CONTEXT\ JavaScript 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 JavaScript Macros / Initialization}
+
+\unprotect
+
+%D \JAVA\ support is not implemented as a generic support
+%D module. The main reason for this is that passing system
+%D variables to a \JAVASCRIPT\ is closely related to other core
+%D macros. First some messages:
+
+\startmessages dutch library: javascript
+ title: javascript
+ 1: script set -- wordt geladen
+ 2: onbekende preamble --
+\stopmessages
+
+\startmessages english library: javascript
+ title: javascript
+ 1: loading script set --
+ 2: unknown preamble --
+\stopmessages
+
+\startmessages german library: javascript
+ title: javascript
+ 1: Lade Scriptdatei --
+ 2: unbekannte Preamble --
+\stopmessages
+
+%D \TEX\ is not the right tool to check the \JAVA\ code; the
+%D most we can do is reporting some passed variables:
+
+\newif\iftraceJScode \traceJScodefalse
+
+\let\traceJScode\traceJScodetrue
+
+%D A bit out of place, but not dangerous:
+
+\bgroup
+\catcode127=\@@letter
+\gdef\delcharacter{^^7f}
+\egroup
+
+%D The number of passed variables is minimalized by setting the
+%D next switch.
+
+\newif\ifminimalizeJScode \minimalizeJScodetrue
+
+%D \macros
+%D {JS*}
+%D
+%D Because \JAVASCRIPT's are activated by the user, for
+%D instance by activating on a button, their support is closely
+%D related to the referencing mechanism. Integration takes
+%D place by
+%D
+%D \starttypen
+%D \naar{calculate total}[Sum()]
+%D \stoptypen
+%D
+%D The \type{()} classify this as a script. If they are absent,
+%D the keyword is treated as a normal reference.
+%D
+%D One can pass arguments to such a script by saying:
+%D
+%D \starttypen
+%D \naar{calculate total}[Sum(1.5,2.3)]
+%D \stoptypen
+%D
+%D References are passed by using the \type{R{}} classifier.
+%D
+%D \starttypen
+%D \naar{calculate total}[Sum(1.5,2.3,R{overflow})]
+%D \stoptypen
+%D
+%D The last call calls the script \type{Sum} and passes the
+%D next set of variables:
+%D
+%D \starttypen
+%D JS_S_1="1.5";
+%D JS_S_2="2.3";
+%D JS_R_3="overflow";
+%D JS_P_3=3;
+%D \stoptypen
+%D
+%D The first two parameters are just strings, the third one
+%D however is treated as a reference and results in passing the
+%D reference (if needed this references is prefixed) and the
+%D (real) page number. The alternative:
+%D
+%D \starttypen
+%D \naar{calculate total}[JS(Sum{V{1.5},V{2.3},R{overflow}})]
+%D \stoptypen
+%D
+%D does a verbose passing:
+%D
+%D \starttypen
+%D JS_V_1=1.5;
+%D JS_V_2=2.3;
+%D JS_R_3="overflow";
+%D JS_P_3=3;
+%D \stoptypen
+% %D
+% %D Finally we have a counter that tells\JAVA\ how many
+% %D arguments were passed,
+% %D
+% %D \starttypen
+% %D JS_N
+% %D \stoptypen
+
+%D We will also support direct function calls. In that case
+%D no intermediate variables are used.
+
+%D \macros
+%D {startJScode}
+%D
+%D A piece of \JAVASCRIPT\ code is defined by saying:
+%D
+%D \starttypen
+%D \startJScode{SomeScript}
+%D var Item=this.getField("item");
+%D N=Item.getArray();
+%D Total=this.getField("total");
+%D Total.value=0;
+%D for (j=0; j<N.length; j++)
+%D { if (N[j].value!="")
+%D { Total.value += N[j].value } } ;
+%D if ((JS_N>0) && (JS_R_1!=""))
+%D { gotoNamedDest(JS_R_1) };
+%D \stopJScode
+%D \stoptypen
+%D
+%D Such a piece of code is closely related to the interpreter
+%D used. Watch the last two lines, here the script adapts
+%D itself to the presence of a reference.
+%D
+%D While
+%D
+%D \starttypen
+%D \startJScode{name}
+%D name = 4 ;
+%D \stopJScode
+%D \stoptypen
+%D
+%D assumes uses no preamble or presumes that the preamble is
+%D always loaded, the next definition also tells \CONTEXT\ to
+%D actually include the preamble needed.
+%D
+%D \starttypen
+%D \startJScode{uses} uses {later}
+%D uses = 6 ;
+%D \stopJScode
+%D \stoptypen
+
+\long\gdef\startJScode#1 #2
+ {\doifelse{#2}{uses}
+ {\def\next{\dostartJScodeA{#1}}}
+ {\def\next{\dostartJScodeB{#1} #2}}%
+ \next}
+
+\long\gdef\dostartJScodeA#1#2 #3\stopJScode%
+ {\long\setgvalue{\r!java#1}{\do{#2}{#3}}}
+
+\long\gdef\dostartJScodeB#1#2\stopJScode%
+ {\long\setgvalue{\r!java#1}{\do{}{#2}}}
+
+%D \macros
+%D {presetJScode}
+%D
+%D The code can be retrieved by saying
+%D
+%D \starttypen
+%D \presetJScode{SomeScript}{template}
+%D \stoptypen
+%D
+%D Such a template is a comma separated list, where
+%D individual entries can optionally be transformed by
+%D \type{R{}} and \type{V{}}.
+%D
+%D After this call, the code is available in \type{\JScode}.
+
+\def\setverbosecscharacter#1%
+ {\edef#1{\string#1}}
+
+\def\setverbosecscharacters% temporary hack
+ {\setverbosecscharacter |\setverbosecscharacter ~%
+ \setverbosecscharacter\:\setverbosecscharacter\;%
+ \setverbosecscharacter\+\setverbosecscharacter\-%
+ \setverbosecscharacter\[\setverbosecscharacter\]%
+ \setverbosecscharacter\.\setverbosecscharacter\\%
+ \setverbosecscharacter\)\setverbosecscharacter\(%
+ \setverbosecscharacter\0\setverbosecscharacter\1%
+ \setverbosecscharacter\2\setverbosecscharacter\3%
+ \setverbosecscharacter\4\setverbosecscharacter\5%
+ \setverbosecscharacter\6\setverbosecscharacter\7%
+ \setverbosecscharacter\8\setverbosecscharacter\9%
+ \setverbosecscharacter\/\setverbosecscharacter\s}
+
+\newif\ifdirectJScode
+
+\def\presetJScode#1#2% #1=operation #2=arguments
+ {\setverbosecscharacters
+ \def\par{\delcharacter}% was: { }
+ \scratchcounter=0
+ \global\let\JScode=\empty
+ \def\do##1##2%
+ {\doifelse{##2}{!}{\directJScodetrue}{\directJScodefalse}}%
+ \getvalue{\r!java#1}%
+ \edef\!!stringa{#2}%
+ \ifx\!!stringa\empty \else
+ \processcommacommand[\!!stringa]\dopresetJSvariables
+ \fi
+ \def\docommando##1%
+ {\doifundefinedelse{\r!java\r!java##1}
+ {\showmessage{\m!javascript}{2}{##1}}
+ {\doglobal\increment\currentJSpreamble
+ \doglobal\addtocommalist{##1}\allJSpreambles}}%
+ \def\do##1##2%
+ {\xdef\JScode{\ifdirectJScode#1(\JScode)\else\JScode##2\fi}%
+ %\xdef\JScode{JS\string_N=\the\scratchcounter;\JScode}%
+ \processcommalist[##1]\docommando}%
+ \getvalue{\r!java#1}}
+
+\def\dopresetJSvariables#1%
+ {\advance\scratchcounter by 1
+ \donefalse
+ \dodopresetJSvariables#1\end}%
+
+\def\dodopresetJSvariables%
+ {\doifnextcharelse{R}
+ {\dodopresetJSrefvariables}
+ {\doifnextcharelse{V}
+ {\dodopresetJSvervariables}
+ {\doifnextcharelse{S}
+ {\dodopresetJSstrvariables}
+ {\dodopresetJSrawvariables}}}}
+
+\def\dodopresetJSrefvariables R#1\end%
+ {\doifreferencefoundelse{#1}
+ {\donetrue\dododopresetJSvariables R{\referenceprefix#1}%
+ \donefalse\dododopresetJSvariables P{\currentrealreference}}
+ {\unknownreference{#1}}%
+ \ifminimalizeJScode \else
+ \donetrue\dododopresetJSvariables S{#1}%
+ \fi}
+
+\def\dodopresetJSvervariables V#1\end%
+ {\donefalse\dododopresetJSvariables V{#1}%
+ \ifminimalizeJScode \else
+ \donetrue\dododopresetJSvariables S{#1}%
+ \fi}
+
+\def\dodopresetJSstrvariables S#1\end%
+ {\donetrue\dododopresetJSvariables S{#1}}
+
+\def\dodopresetJSrawvariables #1\end%
+ {\donetrue\dododopresetJSvariables S{#1}}
+
+\def\JSprefix#1%
+ {JS\string_#1\string_\the\scratchcounter}
+
+\def\dododopresetJSvariables#1#2%
+ {\iftraceJScode
+ \writestatus{JavaScript}{\JSprefix#1=#2}
+ \xdef\JScode{\JScode console.println("\JSprefix#1=#2"); }%
+ \fi
+ \ifdirectJScode
+ \xdef\JScode{\ifx\JScode\empty\else\JScode,\fi\ifdone"#2"\else#2\fi}%
+ \else
+ \xdef\JScode{\JScode\JSprefix#1=\ifdone"#2"\else#2\fi; }%
+ \fi}
+
+%D \macros
+%D {startJSpreamble, flushJSpreamble}
+%D
+%D One can define insert \JAVASCRIPT\ code at the document level
+%D by using:
+%D
+%D \starttypen
+%D \startJSpreamble{oeps}
+%D oeps = 1 ;
+%D \stopJSpreamble
+%D \stoptypen
+%D
+%D which is the same as:
+%D
+%D \starttypen
+%D \startJSpreamble{now} used now
+%D now = 2 ;
+%D \stopJSpreamble
+%D \stoptypen
+%D
+%D while the next definition is only included when actually
+%D used.
+%D
+%D \starttypen
+%D \startJSpreamble{later} used later
+%D later = 3 ;
+%D \stopJSpreamble
+%D \stoptypen
+%D
+%D This command may be used more that once, but always before
+%D the first page is shipped out.
+
+\newif\ifoneJSpreamble \oneJSpreambletrue
+
+\let\allJSpreambles=\empty
+\newcounter\nofJSpreambles
+\newcounter\currentJSpreamble
+
+\long\gdef\startJSpreamble#1 #2
+ {\doifelse{#2}{used}
+ {\def\next{\dostartJSpreamble{#1} }}
+ {\def\next{\dostartJSpreamble{#1} now #2 }}%
+ \next}
+
+\long\def\dostartJSpreamble#1 #2 #3\stopJSpreamble%
+ {\bgroup
+ \processaction
+ [#2]
+ [ later=>\chardef\JSstatus=0,
+ now=>\chardef\JSstatus=1,
+ \s!default=>\chardef\JSstatus=2,
+ \s!unknown=>\chardef\JSstatus=2]%
+ \presetJSfunctions #3function ()\end%
+ \ifcase\JSstatus
+ \long\setgvalue{\r!java\r!java#1}{#3}%
+ \else
+ \long\setgvalue{\r!java\r!java#1}{#3}%
+ \doglobal\increment\currentJSpreamble
+ \doglobal\addtocommalist{#1}\allJSpreambles
+ \fi
+ \egroup}
+
+%D Because we want to check for valid calls, we preload the
+%D functions. This means that we can call them directly as
+%D well as indirectly when defined by \type {\startJScode} etc.
+
+\long\def\presetJSfunctions#1function #2(#3)%
+ {\doifelsenothing{#2}
+ {\long\def\presetJSfunctions##1\end{}}
+ {\stripspaces\from#2\to\ascii
+ \doifundefined{\r!java\ascii}{\setgvalue{\r!java\ascii}{\do{}{!}}}}%
+ \presetJSfunctions}
+
+\def\getJSpreamble#1%
+ {\getvalue{\r!java\r!java#1}}
+
+\def\presetJSpreamble%
+ {\ifx\allJSpreambles\empty\else
+ \bgroup
+ \setverbosecscharacters
+ \def\par{\delcharacter}% was: { }
+ \global\let\JSpreamble=\empty
+ \def\@@collectedJSpreamble{\r!java\r!java collected}%
+ \letvalue{\@@collectedJSpreamble}=\empty
+ \def\docommando##1%
+ {\xdef\JScode{\getvalue{\r!java\r!java##1}}%
+ \ifoneJSpreamble
+ \@EA\setxvalue\@EA\@@collectedJSpreamble\@EA
+ {\csname\@@collectedJSpreamble\endcsname\JScode}%
+ \else
+ \setxvalue{\r!java\r!java##1}%
+ {\JScode}%
+ \fi}%
+ \processcommacommand[\allJSpreambles]\docommando
+ \ifoneJSpreamble
+ \gdef\allJSpreambles{collected}%
+ \fi
+ \global\let\presetJSpreamble=\relax
+ \egroup
+ \fi}
+
+%\def\flushJSpreamble%
+% {\iflocation\ifx\allJSpreambles\empty\else
+% \bgroup
+% \presetJSpreamble
+% \expanded{\doflushJSpreamble{\allJSpreambles}}%
+% \global\let\flushJSpreamble=\relax
+% \global\let\allJSpreambles=\empty
+% \egroup
+% \fi\fi}
+%
+%\prependtoks \flushJSpreamble \to \everylastshipout
+
+\def\flushJSpreamble%
+ {\iflocation\ifx\allJSpreambles\empty\else
+ \ifcase\nofJSpreambles\else\ifnum\nofJSpreambles=\currentJSpreamble
+ \bgroup
+ \presetJSpreamble
+ \expanded{\doflushJSpreamble{\allJSpreambles}}%
+ \global\let\flushJSpreamble=\relax
+ \global\let\allJSpreambles=\empty
+ \egroup
+ \fi\fi
+ \fi\fi}
+
+\def\finalflushJSpreamble%
+ {\iflocation
+ \flushJSpreamble
+ \ifcase\currentJSpreamble\relax\else
+ \savecurrentvalue\nofJSpreambles\currentJSpreamble
+ \global\let\currentJSpreamble\nofJSpreambles
+ \fi
+ \fi}
+
+\prependtoks \flushJSpreamble \to \everyshipout
+\prependtoks \finalflushJSpreamble \to \everylastshipout
+
+%D \macros
+%D {doPSsanitizeJScode}
+%D
+%D Before the code can be passed to the (\POSTSCRIPT\ or \PDF)
+%D output file, some precautions must be made concerning the
+%D use of \type{(} and~\type{)}. Here we use a beautiful
+%D \type{\aftergroup} trick I discovered in the \TABLE\ format.
+
+\def\doPSsanitizeJScode#1\to#2%
+ {\begingroup
+ \scratchcounter=0 % \aftergroup counter
+ \aftergroup\xdef
+ \aftergroup#2%
+ \aftergroup{%
+ \expanded{\convertargument#1\noexpand\to\noexpand\JScode}%
+ \expandafter\handletokens\JScode\with\dodoPSsanitizeJScode
+ \aftergroup}%
+ \endgroup
+ \iftraceJScode
+ \writestatus{JS trace}{#2}%
+ \fi}
+
+%D I started with:
+%D
+%D \starttypen
+%D \def\dodoPSsanitizeJScode#1%
+%D {\aftergroup\string
+%D \if#1(%
+%D \expandafter\aftergroup\csname#1\endcsname
+%D \else\if#1)%
+%D \expandafter\aftergroup\csname#1\endcsname
+%D \else\if#1;%
+%D \aftergroup;\aftergroup\string\expandafter\aftergroup\
+%D \else
+%D \expandafter\aftergroup#1%
+%D \fi\fi\fi
+%D \advance\scratchcounter by 1
+%D \ifnum\scratchcounter=500
+%D \expandafter\dododoPSsanitizeJScode
+%D \fi}
+%D \stoptypen
+%D
+%D For pretty printing purposes, we need some way to signal
+%D \TEX\ macros. Therefore we introduce a special keyword
+%D \type{TEX}. When followed by a space, this keyword is
+%D ignored, that is, filtered from the stream. Now we have:
+
+\chardef\JSisTEX=0
+\chardef\JScomment=0
+
+\newif\ifaddJSlinebreaks
+
+\def\flushJSisTEX%
+ {\ifcase\JSisTEX
+ \or \aftergroup T%
+ \or \aftergroup T\aftergroup E%
+ \or \aftergroup T\aftergroup E\aftergroup X%
+ \fi
+ \chardef\JSisTEX=0 }
+
+\def\doJSlinebreak%
+ {\ifaddJSlinebreaks
+ \aftergroup\string\aftergroup\n%
+ \fi}
+
+\def\dodoPSsanitizeJScode#1% % input stack>500 & TEX check
+ {\if#1/%
+ \ifnum\JScomment=0
+ \chardef\JScomment=1
+ \else\ifnum\JScomment=1
+ \chardef\JScomment=2
+ \fi\fi
+ \else
+ \ifnum\JScomment=1
+ \aftergroup/%
+ \chardef\JScomment=0
+ \fi
+ \ifnum\JScomment=2
+ \if#1\delcharacter
+ \chardef\JScomment=0
+ \fi
+ \else
+ \if#1\delcharacter
+ \flushJSisTEX\doJSlinebreak
+ \else\if#1(%
+ \flushJSisTEX\aftergroup\string\expandafter\aftergroup\csname#1\endcsname
+ \else\if#1)%
+ \flushJSisTEX\aftergroup\string\expandafter\aftergroup\csname#1\endcsname
+ \else\if#1;%
+ \flushJSisTEX\aftergroup;\doJSlinebreak
+ \else\if#1T%
+ \ifnum\JSisTEX=0 \chardef\JSisTEX=1 \else\flushJSisTEX\aftergroup T\fi
+ \else\if#1E%
+ \ifnum\JSisTEX=1 \chardef\JSisTEX=2 \else\flushJSisTEX\aftergroup E\fi
+ \else\if#1X%
+ \ifnum\JSisTEX=2 \chardef\JSisTEX=3 \else\flushJSisTEX\aftergroup X\fi
+ \else\if#1\normalspace
+ \ifnum\JSisTEX=3 \chardef\JSisTEX=0 \else\flushJSisTEX\aftergroup#1\fi
+ \else
+ \flushJSisTEX\aftergroup\string\expandafter\aftergroup#1%
+ \fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \fi
+ \dododoPSsanitizeJScode}
+
+%D Close reading learns that one line comments (\type{// ...})
+%D are removed from the stream. This permits switching in
+%D pretty printing \JAVASCRIPT\ sources as well as saves
+%D some bytes.
+
+%D The magic 500 in the next hack prevents the input stack from
+%D overflowing when large scripts are sanitized.
+
+\beginTEX
+
+\def\dododoPSsanitizeJScode%
+ {\ifcase\JSisTEX\ifcase\JScomment
+ \advance\scratchcounter by 1
+ \fi\fi
+ \ifnum\scratchcounter=500
+ \expandafter\dodododoPSsanitizeJScode
+ \fi}
+
+\def\dodododoPSsanitizeJScode%
+ {\let\next={%
+ \aftergroup}%
+ \endgroup
+ \begingroup
+ \aftergroup\xdef
+ \aftergroup\sanitizedJScode
+ \aftergroup{%
+ \aftergroup\sanitizedJScode
+ \let\next=}}
+
+\endTEX
+
+\beginETEX \aftergroup
+
+\let\dododoPSsanitizeJScode\relax
+
+\endETEX
+
+%D The macro \type{\doPSsanitizeJScode} converts its argument
+%D into the macro \type{\sanitizedJScode}, thereby prefixing
+%D each \type{(} and \type{)} by a slash.
+
+%D Hooking this mechanism into the general \CONTEXT\ reference
+%D mechanism does not take much effort:
+
+\definespecialtest{JS}
+ {\doifdefinedelse{\r!java\currentreferenceoperation}}
+
+\definespeciallocation{JS}#1#2%
+ {\iflocation
+ \bgroup
+ \presetJScode
+ \currentreferenceoperation
+ \currentreferencearguments
+ \dostartgoto
+ \data
+ {#2}%
+ \start
+ \dostartgotoJS
+ {\number\buttonwidth}{\number\buttonheight}
+ {\JScode}%
+ \stop
+ \dostopgotoJS
+ \dostopgoto
+ \egroup
+ \else
+ {#2}%
+ \fi}
+
+%D \macros
+%D {useJSscripts}
+%D
+%D In due time, users will build their collections of scripts,
+%D which can be used (loaded) when applicable. Although not all
+%D public, we will provide some general purpose scripts,
+%D collected in files with names like \type{java-...}. One can
+%D load these scripts with \type{\useJSscripts}, like:
+%D
+%D \starttypen
+%D \useJSscripts[fld]
+%D \stoptypen
+%D
+%D The not so complicated implementation of this macro is:
+
+\def\douseJSscripts#1%
+ {\doifelse{#1}{\v!reset}
+ {\let\allJSpreambles=\empty}
+ {\doifundefined{\c!file\f!javascriptprefix#1}
+ {\bgroup
+ \setbox0=\hbox % forget spaces and worse
+ {\setgvalue{\c!file\f!javascriptprefix#1}{}%
+ \makeshortfilename[\f!javascriptprefix#1]%
+ \showmessage{\m!javascript}{1}{#1}%
+ \startreadingfile
+ \readsysfile{\shortfilename}{}{}%
+ \stopreadingfile}%
+ \egroup}}}
+
+\def\useJSscripts[#1]%
+ {\processcommalist[#1]\douseJSscripts}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/knuth.tex b/tex/context/base/knuth.tex
new file mode 100644
index 000000000..30b6310cc
--- /dev/null
+++ b/tex/context/base/knuth.tex
@@ -0,0 +1,16 @@
+Thus, I came to the conclusion that the designer of a new
+system must not only be the implementer and first
+large||scale user; the designer should also write the first
+user manual.
+
+The separation of any of these four components would have
+hurt \TeX\ significantly. If I had not participated fully in
+all these activities, literally hundreds of improvements
+would never have been made, because I would never have
+thought of them or perceived why they were important.
+
+But a system cannot be successful if it is too strongly
+influenced by a single person. Once the initial design is
+complete and fairly robust, the real test begins as people
+with many different viewpoints undertake their own
+experiments.
diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex
index b6504ffeb..ea87ed801 100644
--- a/tex/context/base/lang-alt.tex
+++ b/tex/context/base/lang-alt.tex
@@ -1,87 +1,88 @@
-%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
+%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!status=\v!stop]
+
+\installlanguage [turkish] [\s!tr]
+
+\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!sub\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
diff --git a/tex/context/base/lang-ana.tex b/tex/context/base/lang-ana.tex
index 742d5f6fb..5f5b021bf 100644
--- a/tex/context/base/lang-ana.tex
+++ b/tex/context/base/lang-ana.tex
@@ -1,21 +1,20 @@
-%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
+%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
diff --git a/tex/context/base/lang-art.tex b/tex/context/base/lang-art.tex
index d91be59fb..3538e774e 100644
--- a/tex/context/base/lang-art.tex
+++ b/tex/context/base/lang-art.tex
@@ -1,23 +1,22 @@
-%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
+%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
diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex
index 2d95f3735..a0b043019 100644
--- a/tex/context/base/lang-bal.tex
+++ b/tex/context/base/lang-bal.tex
@@ -1,23 +1,22 @@
-%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
+%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
diff --git a/tex/context/base/lang-cel.tex b/tex/context/base/lang-cel.tex
index 2f104e9e1..90dd3f8ce 100644
--- a/tex/context/base/lang-cel.tex
+++ b/tex/context/base/lang-cel.tex
@@ -1,23 +1,22 @@
-%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
+%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
diff --git a/tex/context/base/lang-cz.hyp b/tex/context/base/lang-cz.hyp
new file mode 100644
index 000000000..498105d80
--- /dev/null
+++ b/tex/context/base/lang-cz.hyp
@@ -0,0 +1,10 @@
+% List of exceptions created by Karel Horak
+% Mathamatical Institute of Czechoslovak Acadamy of Science
+% Prague, April 1, 1991
+%
+\hyphenation
+ {koe-fi-ci-ent
+ koe-fi-ci-en-ty
+ pro-jek-\v{c}n\'i
+ \'uhlo-p\v{r}\'i\v{c}-ka
+ \'uhlo-p\v{r}\'i\v{c}-ky}
diff --git a/tex/context/base/lang-cz.pat b/tex/context/base/lang-cz.pat
new file mode 100644
index 000000000..20d4ce746
--- /dev/null
+++ b/tex/context/base/lang-cz.pat
@@ -0,0 +1,3651 @@
+%%% ====================================================================
+% This is CZHYPHEN.TEX, containing czech hyphenation patterns.
+% Prepared by:
+% Pavel Sevecek
+% Faculty of Informatics, Masaryk University, Brno, Czech Republic
+% E-mail: pavel@informatics.muni.cz
+%
+% General permission for use and non-profit redistribution is granted.
+% For special commercial use, contact the above address.
+%%% --------------------------------------------------------------------
+\patterns{
+.a2
+.a4da
+.a4de
+.a4di
+.a4do
+.a4d\'e
+.a4kl
+.a4ko
+.a4kr
+.a4ku
+.ale3x
+.a4ra
+.a4re
+.a4ri
+.a4ro
+.a4ry
+.a4r\'a
+.a4sa
+.a4se
+.a4so
+.as3t3
+.a4sy
+.a4ta
+.a4te
+.at3l
+.a4to
+.a4tr
+.a4ty
+.a4ve
+.b2
+.c2
+.ch2
+.cyk3
+.d2
+.dez3
+.d4na
+.dne4
+.dne\v s4k
+.d4ny
+.dos4
+.d4ve
+.d4v\v e
+.d4v\'i
+.e2
+.e4ch
+.e4ko
+.es3k
+.es3t
+.e4ve
+.f4ri
+.g2
+.h2
+.h4le
+.h4ne
+.i2
+.i4na
+.i4ni
+.i4no
+.is3l
+.j2
+.j4ak
+.je4dl
+.j4se
+.j4zd
+.j\'ad4
+.k2
+.k4li
+.k4ly
+.k\v r\'i3d
+.l2
+.le4gr
+.li3kv
+.m2
+.mi3st4
+.moud3
+.na3\v c4
+.ne3c
+.ne\v c4
+.ne3\v s
+.ni2t
+.no4s3t
+.n4vp
+.n\'a1
+.n\'a\v r4k
+.o2
+.o4b\'e
+.ode3
+.od3l
+.od3r\'a
+.o4ka
+.o4ko
+.o4na
+.o4ne
+.o4ni
+.o4no
+.o4nu
+.o4ny
+.o4n\v e
+.o4n\'i
+.o4pe
+.o4po
+.o4se
+.o4sl
+.os4to
+.os3t3r
+.os4t\v e
+.ot3r\'a
+.ot3v
+.o4t\'i
+.o4t\v r
+.ov\v e4t
+.o4za
+.oz3do
+.o4zi
+.o4zo
+.o4zu
+.o4\v sk
+.o4\v sl
+.o4\v zi
+.p2
+.pa4re
+.pa3t\v r
+.polk4l
+.po3\v c4
+.p4ro
+.p4r\'y
+.p4se
+.pu3b
+.r2
+.rej4
+.re3s
+.ro4k
+.roze3
+.roz3r
+.ru4dl
+.s2
+.s4ch
+.s4ci
+.sem4
+.se3pn
+.s4ke
+.sk4l
+.s4k\'a
+.s4le
+.s4na
+.s4ny
+.s4pe
+.s4po
+.st2
+.s4t\'a
+.s4\v zi
+.t2
+.u2
+.u4ba
+.u4be
+.u4bi
+.u4bo
+.u4de
+.u4di
+.u4do
+.u4du
+.u4d\'i
+.uh4n
+.uj4m
+.u4ko
+.u4ku
+.ul4h
+.u4ma
+.u4me
+.u4mi
+.u4mu
+.u4ne
+.u4ni
+.u4pa
+.u4pe
+.u4pi
+.up4n
+.u4po
+.u4pu
+.u4p\'a
+.u4p\v e
+.u4p\'i
+.u4ra
+.u4ro
+.u4r\'a
+.us2
+.u4so
+.u4st
+.u4sy
+.u4s\'i
+.ut2
+.u4vi
+.u4ze
+.u4\v ce
+.u4\v ci
+.u4\v c\'i
+.u4\v se
+.u4\v si
+.u4\v sk
+.u\v s4t
+.u4\v s\'i
+.u4\v zi
+.u\v z4n
+.u4\v zo
+.u4\v z\'i
+.v2
+.va4dl
+.v4po
+.vy3
+.v4z\'a
+.v\'y1
+.v4\v zi
+.y4or
+.y4ve
+.z2
+.za3
+.zao3s
+.zar2
+.za\v c2
+.zd2
+.z4di
+.z4dr
+.z4ky
+.z4mn
+.z4no
+.z4nu
+.z4n\v e
+.z4n\'i
+.z4pe
+.z4po
+.z4t\v r
+.z4ve
+.z4vi
+.\v c2
+.\v c4te
+.\'e2
+.\'i2
+.\'o2
+.\v s2
+.\v se3t
+.\v s4ka
+.\v s4ke
+.\v s4ky
+.\v s4\v to
+.\v s4\v t\'a
+.\'u2
+.\'u4d\r u
+.\v z2
+a1
+2a.
+aa3t2
+ab3lon
+ab4l\'y
+ab3ri
+ab4sb
+ab2st
+ac4ci
+a2d
+a3da
+a3de
+a3di
+ad2la
+a4dli
+a4dl\'a
+a4dl\'e
+ad4me
+ad4mu
+a3do
+ado4s
+a3d3ra
+ad3ri
+a3dr\v z
+a3du
+a4du\v z
+3a3dva
+ad3vo
+a3dy
+a3d\'a
+a3d\'e
+a3d\v e
+a3d\'i
+ad4\'uz
+ad4\'u\v r
+a3d\r u
+a3d\'y
+ae4vi
+afi2a
+a2g
+a3ga
+ag4fa
+a3go
+ag3ro
+a3gu
+a3g\'a
+ah4li
+ah3v
+a2i
+a3in
+ai4re
+a3iv
+a2jd
+a2jm
+aj4me
+aj2o
+a2k
+a3ke
+a3ki
+a3kl
+ak4ni
+a3ko
+a3kr
+a3ku
+a3ky
+a3k\'a
+a3k\'e
+a3k\'o
+a3k\r u
+a3k\'y
+al4fb
+al4kl
+al4tz
+al3\v z\'i
+am4bd
+am4kl
+am4nu
+amo3s
+am4\v zi
+a4nae
+a4name
+an4dt
+ane4sk
+aneu4
+an4sc
+an4sg
+an4sl
+an4sm
+an2sp
+an4sv
+an4t\v c
+an4\v zh
+ao4ed
+ao4hm
+ao4st\v r
+ao4t\v c
+ap4r.
+a4pso
+ap3t
+a4p\v r.
+a2r
+a3ra
+ar4dw
+a3re
+a4rer
+ar4gl
+a3ri
+ar4kh
+a3ro
+a4rox
+ar3st
+a3ru
+ar2va
+a3ry
+a3r\'a
+a3r\'o
+ar3\v s2
+ar4\v sr
+a3r\r u
+ar\r us3
+a3r\'y
+a2s
+a3sa
+a3se
+a3sh
+a3sin
+as3n\'a
+a3so
+as3pi
+as4tat
+a4stk
+as4tm
+a4stru.
+as3tv
+a3su
+a3sv
+a3sy
+a3s\'a
+a3s\'e
+a3s\'i
+a3s\r u
+a2t
+a3ta
+at4ch
+a3te
+a3ti
+a4tio
+at4kl
+at3lo
+a3to
+a3tr
+at3re
+at3ron
+at3rov
+a4tru
+at4r\'a
+at4th
+a3tu
+a3tv
+a3ty
+a3t\'a
+a3t\'e
+a3t\v e
+a3t\'i
+a3t\'o
+at1\v r
+a4t\v r\'i.
+a3t\r u
+a3t\'y
+a2u
+au4gs
+a3uj
+auj4m
+aus3t
+a3u\v c
+2av
+av3d
+av4d.
+av3lo
+a4vlu
+a4vl\'i
+av3t
+av4ti
+2ay
+ay4on
+az3k
+az3la
+az4l\'e
+az3ni
+a3zp
+a2\v c
+a3\v ca
+a3\v ce
+a3\v ci
+a3\v cl
+a\v c4m\'a
+a3\v co
+a3\v cu
+a3\v c\'a
+a3\v c\'i
+a3\v c\r u
+a2\v n
+a3\v no
+a3\v nu
+a\v re4k
+a3\v r\'i
+a4\v spl
+a4\v spy
+a2\v t
+a\'u3t
+2b.
+3ba.
+ba4br
+ba4chr
+ba3ka
+ba4se
+2b1c
+b1d
+be4ef
+be4et
+bej4m
+be3p
+beu4r
+be2z3
+beze3
+b1h
+1bi
+bi2b3
+bis3
+bist4
+bi4tr
+b1j
+2bk
+3bl.
+bl4bl
+b2lem
+b2les
+3blk
+b4l\'an
+b2l\'em
+b1m
+2bn
+1bo
+bo4et
+bo4jm
+bo4ok
+bo4tr
+bou3s
+bo4\v sk
+b2ral
+b2ran
+2bri
+b4rodit
+b4rou
+broz4
+b2ru
+b3ru.
+b3rub
+b2r\'an
+2b1s2
+bs3tr
+2b1t
+bt\'ah4
+bu2c
+bu4en
+3by.
+bys3
+by4sm
+by4t\v c
+by4zn
+b2z
+1b\'a
+2b1\v c
+b\'e4rc
+1b\v e.
+b\v e3ta
+1b\'i
+3b\'in
+b\'i4rc
+2b\v n
+b3\v ra
+b3\v re.
+b\v re4s
+b1\v r\'i
+2b\v s2
+2c.
+1ca
+cad4l
+ca4es
+2cc
+1ce
+cech4
+ced4l
+celo3
+ce4ns
+ce4ov
+ce4ps
+cer4v
+ce2u
+2ch.
+1cha
+4chalg
+3che
+4che.
+2chl
+ch4ly
+ch4mb
+2ch3n
+2cht
+4chte
+1chu
+ch4u.
+1chy
+1ch\'a
+2ch\v r
+1ci
+cien4c
+cik4l
+2ck2
+c4ket
+ckte4r\'y
+2cl
+c3la
+c3l\'e
+2cn
+1co
+co4at
+co4mm
+co4\v zp
+c2p
+2ct
+c2ti
+ctis4
+ct4la
+ct2n
+c3tv
+c2t\v e
+cuk1
+1c2v
+cy2
+1c\'a
+1c\'i
+c\'i4pl
+2c\v n
+1c\r u
+2d.
+1da
+da3d
+da4j\v s
+da4kl
+da4tr
+d1b
+d2ba
+4dbat.
+d2b\'a
+2d1c
+dch4l
+3dch4n
+d1d
+dd4ha
+1de
+de4bre
+de3hn
+de3jd
+dej4mo
+de3kl
+de3kv
+de2na
+de2oz
+de3sl
+de4sm
+de4so
+de2sp
+des4t
+de3str
+de1x
+de4xt
+de2z
+de3zn
+dez3o
+de3\v ct
+de4\v zp
+2d1h
+1di
+di4gg
+4dind
+dis3k
+di4so
+d1j
+dj4us
+2dk
+d3kv
+3dl.
+d1la
+d4lab
+d4lak
+d3li
+1dln
+d2lou
+d3lou.
+d2lu
+d3lu\v c
+d4l\'a\v z
+d1l\'e
+2d1l\'i
+d2l\r u
+d1m
+1dmd
+dm\'y\v s4
+2dn
+1do
+4dobl
+4doboj
+dob4rat
+do3by
+do3b\v e
+do3b\'y
+do1d
+4do4dd
+4do4dj
+dod4n
+do3h
+doj4m
+4dokn
+4doly
+do3mn
+domoh4
+do3p
+do4pc
+dop4n
+dor2v
+do1s
+dos4p
+dos4tiv
+do3t
+do3uk
+do3u\v c
+do3z2
+doz4n
+do3\v c
+4do4\v cn
+do\v c4t
+do4\v zp
+4dran
+d4rap
+d1re
+d4ren
+3drobn
+d3ros
+d3rou
+d3ro\v s
+dr4sc
+d3ru\v s
+d3r\'e
+d3r\'y
+d4r\'yv
+2d1s2
+ds4k\r u
+ds4po
+d1t
+d3tl
+d3t\v r
+1du
+dum3\v r
+du3na
+du3p
+du4pn
+2dur
+du3si
+du4\'i.
+d2v
+d4vac
+d3ve
+d3vl
+d3vr
+d3vy
+d3v\'a
+d3v\v e
+d3v\'i
+1dy
+dy4su
+d3zb
+d3zd
+d3zn
+1d\'a
+2d1\v c
+1d\'e
+1d\v e
+3d\v ej
+1d\'i
+2d\v n
+d1\v ra
+d\v re4k
+d4\v rep
+d\v re4pn
+d4\v rev
+d1\v r\'i
+d2\v r\'it
+2d\v s2
+d3\v sk
+d3\v st
+1d\r u
+3d\r u.
+d\r u3s
+1d\'y
+d2\v z2
+2e.
+e1a
+ea3dr
+e2ar
+e1b
+eb4er
+ebez2
+eb4li
+e2b\v r
+e4ch.
+e3chl.
+e4chm
+e3cho
+e2chr
+e3chv
+e4ch\v t
+ed4be
+ed4kv
+ed1l
+ed2ma
+e3dmn
+ed3v
+ed4\v r\'i
+e1e
+ee4th
+ee3xi
+eg4gi
+e1ha
+e1he
+ehno4
+eh4n\v e
+e1ho
+e1hr
+e1hu
+e1hy
+e1h\'a
+e1h\'y
+e1i
+eilus3
+ej3ag
+e3jas
+e1je
+e3jed
+ej3ele
+e3jez
+ej3in
+e3jis
+ej1m
+ej3mo
+e3jmu
+ej1o
+ej1u
+eju3st
+ej3v
+e2k
+e3ka
+e3ke
+e4kly
+e3ko
+e3kr
+e3ku
+e3ky
+e3k\'a
+e3k\'e
+e3k\'o
+e3k\v r
+e3k\r u
+e1la
+e4lau
+el4dv
+e1le
+e1lo
+e1lu
+e1ly
+el4ze
+e1l\'a
+e1l\'e
+e1l\'i
+e1ml
+e4ml\'i
+emo3k
+e1mr
+e1my
+e3m\'a
+e1m\v e
+e1m\'i
+e3m\v r
+e3m\r u
+e1m\'y
+em3\v ze
+en4dv
+enitos4
+en4sc
+en4si
+ent3r
+e1o
+eo3by
+eoch3r
+eod3l
+eo4du
+e4ole
+eo1s
+eo2st
+eo4t\v r
+eo3z
+eo4zb
+eo4zd
+eo\v se3
+epa3t
+e2pl
+e4pni
+ep2no
+e4pn\'y
+epo\v c3t
+epro4z\v r
+ep4tl
+ep4tm
+ep4tn
+e4ptu
+epy3
+2er
+e1ra
+er4a.
+e1re
+e1ri
+e1ro
+er3s
+er4s.
+er4sn
+e1ru
+e1ry
+e1r\'a
+e1r\'e
+e1r\r u
+e1r\'y
+e1s
+e4sag
+e2sce
+e4sin
+esi4s
+e2sk
+es4k.
+e4s4kn
+es3ku.
+es3ky
+es3k\'e
+e2sl
+e4s3li
+e4sly
+es2m
+e4sp.
+es4pe
+e2st
+e4st.
+e4ste
+es3ti\v z
+es4tol
+e4strou
+es3t\'an
+e1t
+e4tki
+e4tkr
+e4tli
+e4tly
+et3ri
+et3ro
+et3r\r u
+et1\v r
+et4\'un
+e1u
+eu3b
+eu3ct
+eu3d
+eu3k
+eu3m
+eu4m.
+eu3n
+eu3p
+eu3r
+eu4r.
+e4ura
+eu4ras
+eu4rg
+eu3s2
+eu3t
+e4u4t.
+eu4tra
+eu4ts
+eu3v
+eu3z
+eu3\v z
+e3vd
+eve4\v s
+e3v2k
+e4vsk
+evy3
+evyjad4
+evyp\'a4t
+evy4\v ck
+ev\v e4tr
+ex4ta
+e3xu
+ey4or
+ey4ov
+ezaos3
+ez4ap
+ez4bo
+ez3de
+ez3dov
+ez3du
+ez4d\v e
+e3ze
+ez4ed2
+ez4ej
+ez4el
+ez4er
+ez4es
+ez4ez
+ez4e\v s
+ezis4
+ez4it
+ez4le
+ez4n\'a
+ez4n\v e
+ez4py
+ez2t
+ez4\'ac
+ez4\'ah
+ez4\v ce
+e3z\'i
+e3z\v r
+ez4\v re
+e1\'a
+e\v c4kat
+e1\v ct
+e\v c4te
+e4\v cti
+e4\v ct\'i
+e2\v n
+e3\v no
+e3\v nu
+e3\v n\'a
+e3\'on
+e1\v r
+e\v re4k
+e\v r4ku
+e3\v r\'i
+e2\v s
+e3\v se
+e3\v si
+e4\v ska
+e3\v sl
+e\v s4l\'a
+e3\v so
+e\v s4to
+e\v st\'ih4
+e3\v s\'i
+e\'u1
+e\'umy4
+e\'u3n
+e\'u3p
+e\'u3t
+e\'u3\v c
+e\v z\'i\v s4
+1f
+2f.
+fe4in
+fene4
+fe4ue
+fi4em
+fi4fl
+f2l
+f3l\'i
+fl\'o4r
+fm4no
+2fn
+2fr
+f4ran
+f4ras
+3frek
+f1ri
+2fs
+fs4te
+2ft
+fu4ch
+2f\'e
+f2\'u
+1g
+2g.
+ga4u\v c
+ge2s
+ghou4
+3gic
+3gin
+gi4\'im
+g4lom
+2g1m
+2gn
+g4noi
+g4nos
+go1
+go4hm
+3graf
+gu4el
+gu4it
+gu3m
+gu4m.
+gus4t
+gu3v
+2h.
+ha4ag
+ha4ar
+ha4bl
+ha4br
+ha3dl
+ha4dla
+ha4ke
+has3t
+hatos4
+ha4yd
+h2b
+h2c
+2hd
+he4br
+he4id
+hej4s
+he2s
+he2u
+he3x
+hi4an
+hi3er
+hi4gh
+hi4re
+2hk
+4hla.
+h4led
+h3len
+2hli
+4h3lo.
+h3lob
+h3lop
+h3lov
+h3luj
+2h1ly
+4hl\'a.
+h4l\'as
+h3l\'i.
+4hl\'ik
+2hl\'y
+h2m
+2h2n
+h3ne
+h4ned
+h3niv
+h4noj
+3hn\v ed
+3hodin
+ho3str
+hos4t\v e
+4hove
+4hovna
+4hovny
+4hovn\'a
+4hovn\v e
+h2r
+hra4p
+2h1t
+h4tin
+h2t\v e
+h4t\'it
+hu4ch
+hu3mo
+hu4t\v n
+2h2v
+hyd1
+hy4do
+hy4ps
+hys3
+hy2t3r
+hy4zd
+h1\v c
+2h\v n
+h\v r2
+h\v r4by
+h\'y4bl
+h2\v z
+2i.
+i1a
+ia3d
+ia3g2
+i4al.
+ias4t
+ia4tr
+i1b
+ib2l
+i2b1r
+i1ch
+i4ch\v z
+i1d
+id4ge
+id2l
+id4lo.
+i4dl\'y
+i1em
+i1en
+i1et
+if1r
+ig4ne
+i1h
+i2hl
+i3hl.
+i4hli
+ih3n
+ih4na
+i3im
+i1j
+ijed4
+ij4me
+ij4mi
+i2kl
+ik3le
+ik3lo.
+ik3m
+ik4ry
+i4kve
+ik4\'u\v r
+i1l
+il4ba
+ili\v c4n
+i4lnu
+ilu3
+i1m
+i4mla
+i4mly
+i4mun
+i2n
+i3na
+ina3d
+in4cm
+in4dl
+i3ne
+3infe
+in4gh
+in4gp
+in4gs
+in4gt
+i3ni
+i3no
+i3nu
+i3ny
+i3n\'a
+i3n\'e
+i3n\v e
+i3n\'i
+in4\v sp
+i3n\r u
+i3n\'y
+i1o
+io4sk
+i2ps
+i1r
+iro4s
+i1sa
+is3c
+is4ch
+is4k.
+is3ka
+is3ke
+is3ko.
+is3kr
+is3ku
+is3kv
+is3ky
+i3slav
+is3lo
+is3l\'e
+is3pl
+is3po
+is1t
+is4tal
+is4tat
+is4th
+ist3v
+is3t\'i
+i1sy
+i3s\'a
+i1t
+it1r
+it4rh
+it4rp
+it4se
+it4su
+i2tv
+i1um
+iv3d
+i1x
+ix4td
+i3zp
+iz1r
+i1\'a
+i1\v cl
+i\v c3t
+i\v c4tl
+i\v c4to
+i2\v d
+i1\'e
+i\'e4re.
+i1\'ic
+i1\'im
+i1\'o
+i1\v r
+i\v r4kl
+i\v r4\v ce
+i2\v s
+i3\v se
+i3\v si
+i\v s3k
+i\v s4kr
+i\v s4kv
+i3\v so
+i\v s4to
+i3\v su
+i3\v s\'a
+i3\v s\'i
+i2\v z
+i3\v za
+i3\v ze
+i3\v zi
+i3\v zo
+i3\v zu
+i3\v z\'a
+2j.
+ja2b2
+jac4k
+ja4cq
+ja3d
+ja3g
+j3akt
+j1b2
+jbyst3
+2j1c
+j2d
+j3dob
+j3dok
+j3dos
+j3dr
+j3d\'a
+jd4\v r\'i
+j3d\r u
+jech4
+j3ef
+j3ex
+jez3d\'i
+jg4ra
+2j1h
+1ji
+ji4ch
+jih3l
+ji4m\v z
+j4ina
+jis3k
+jit4ro
+ji2zv
+j1j
+2jk
+j3kv
+2j1l
+j2m
+j3ma
+j3mi
+jmou3d
+2jm\'i
+2jn
+jne3
+j1ob
+j1od
+jod2\v r
+j1oh
+j1op
+j4ora
+j1os
+jo3sv
+j2ov
+j3ovl
+j1o3z2
+2jp
+jpor4
+jpo4zv
+jp\v r\'iz4
+2j1r
+2j1s2
+j4sem
+j4si.
+j4sk.
+js4ko
+js4k\'a
+j4s4k\r u
+j4s4me
+j3sn
+j4sou.
+j4souc
+js4po
+j4s4te
+2j1t
+j3tl
+ju4an
+ju3na
+ju3p
+j1us
+ju3sp
+ju3t
+ju4t.
+ju3v
+ju4xt
+ju3z
+j1u\v z
+ju3\v zi
+2jv2
+j3vd
+j3vn
+2jz
+j3zb
+j3zd
+j3zk
+j3zn
+j3zp
+j\'ad2r
+2j1\v c
+2j\v d
+1j\'i
+j3\v st
+j\v s4ti
+j3\v s\v t
+2j\'u1
+j\'u3n
+j\'u3\v c
+j\'u3\v z
+2j\v z
+1k
+2k.
+ka4bl
+ka4ch
+ka3dl
+3kaj
+ka3ka
+3kami
+3kan\v e
+ka2p3l
+ka2p3r
+ka2ps
+ka4pv
+ka2p\v r
+kas3t
+kast3r
+3kat
+ka4u\v c
+3kav
+3ka\v c
+3ka\v r
+ka\v s3l
+ka4\v sp
+2k1c
+k2d
+k2e
+ke4bl
+ke3jo
+ke4pr
+ke4ps
+3ket
+2kf
+2kk
+k2l
+3kl.
+4k3la.
+k3lej
+4k3li.
+k4lib
+k3lic
+4kli\v cka
+4klo.
+k3los
+2k3ly
+k3l\'a.
+k3l\'e
+k3l\'o
+k3l\'y
+2k2m
+k3m\v e
+2kn
+kna4s
+ko3by
+3kof
+ko4jm
+ko2p\v r
+ko4sk
+ko2t3v
+kous3k
+3kov
+ko3z\'a
+4kroa
+k3rob
+k3rof
+kr2s
+kr4\'u.
+2ks
+2k1t
+kt2r
+kuch4
+ku4f\v r
+ku4hr
+3kuj
+ku3se
+ku3si
+ku3su
+ku4th
+ku3v
+2k2v
+k4vr\v n
+3kyn
+ky2pr
+kyp3\v r
+ky4zn
+3k\'ac
+k\'a4pl
+3k\'ar
+3k\'a\v r
+2k\v c
+k2\v n
+k2\v r2
+k3\v rej
+k\v s4ti
+3k\r u.
+2l.
+1la.
+la4br
+lab4s
+la3ka
+la4nq
+la4ps
+4la3si
+la4v\v s
+la4y.
+la2zm
+2l1b
+2l1c
+2l1d
+ld4ne
+le4ad
+le4au
+lech3t
+leh3n
+le2i
+1lej
+le3jo
+4lej\v sk
+1lel
+4lench
+lepa3d
+lepo4s
+le4pr
+le4ps
+le4sc
+le4sm
+le4sv
+let4li
+let3m
+le2tr
+le4t\v c
+le4uk
+le4vh
+le4vk
+le3xi
+lez3n
+2lf
+2lg
+2lh
+3lhan
+1li
+li4az
+li4bl
+li4bv
+li4dm
+lind4
+3lio
+li4t\v n
+li4vr
+2li\v z
+2lj
+2lk
+l4kat
+l2kl
+lk4nu
+2ll
+2l1m
+2ln
+l4nul
+lo3br
+lo4id
+lo4is
+1los
+lo3sp
+lo3st\v r
+lo3sv
+lo2tr
+lo4t\v r
+lo4u.
+lo3z
+loz4d
+lo4\v sk
+2lp
+l2p\v e
+2l1s2
+l4sla
+ls3n
+lst4n
+l4st\'i
+2l1t
+lt4ra
+lt4ru
+lt4ry
+lu4id
+lu4j.
+lu4k.
+lu4lk
+lu4m.
+lu4mn
+lu3pr
+lu3va
+lu3vl
+lu3vy
+lu3v\'i
+2lv
+2lz
+1l\'a.
+l\'a4j\v s
+l\'a4v\v s
+2l1\v c
+1l\'e.
+1l\'ik
+l\'i4pl
+l\'i4zn
+1l\'i\v r
+2l\v n
+2l\v s2
+l3\v st
+l4\v st\'y
+1l\r u
+1l\'y
+l\'y2t
+2l2\v z
+2m.
+1ma
+maj4s
+ma4kl
+ma4kr
+4mald
+mas3k
+mat3r
+ma4tra
+ma4v\v s
+maz3l
+2m1b
+2m1c
+2m1d2
+m2dl
+1me
+3me.
+me4go
+me4is
+met3re
+me3x
+mezi3s
+2mf
+mh4le
+1mi
+mid3l
+mik3r
+mi4xt
+2mk2
+3m2kl
+mk4la
+mk4li
+m2l
+4mla.
+2mle
+ml3h
+ml4h.
+2mli
+ml4sc
+ml4sk
+4mlu.
+2mn
+m3na
+mna4s
+m4noh
+m3nos
+m4noz
+3mno\v z
+m3n\'a
+m3n\'e
+m4n\'ez
+m3n\v ej
+m3n\'y
+1mo
+mod3r
+mo2hl
+mo2k
+mo2s
+mo4s.
+mot3\v r
+4mout
+moza4
+mo3z\v r
+mo\'u3
+2mp
+m4plo
+mpo4s
+m2ps
+mp4se
+mp2t
+mr2s
+2m1s2
+m4stl
+2m1t
+1mu
+mu4fl
+mu3n
+mu4n.
+mu4nd
+mu4nn
+mu4ns
+mu4n\v s
+2mu\v s
+2mv
+mys3lo
+my4\v sk
+2mz
+3m\'a.
+m\'alo3
+m\'a2s
+2m\v c
+m2\v ce
+m\'i1c
+m\'i4r\v n
+2m2\v s
+m\v s4\v ci
+m\v s3\v t
+m\v s4\v tan.
+3m\r u.
+3m\'y.
+m2\v z
+1n
+2n.
+3na.
+na3ch
+na4do
+na4em
+na3h
+na4h.
+na3jd
+na3ka
+nam4ne
+na3p2
+na3s2
+na4s.
+nat2
+na3tl
+na3t\v r
+na3z
+naz4k
+na4z\v s
+na4\v c.
+na3\v s
+na\v z4n
+2nb
+2n1c
+n4chc
+2n1d
+nd4hi
+ndo4t
+nd2re
+nd4ri
+nd4\v r\'i
+ne1d
+ne4gl
+ne1h
+ne3h4n
+ne2j
+nej3t
+nej3u
+ne3kl
+ne4kro
+ne3kv
+ne4m.
+ne3p
+ne3s2
+ne4s.
+nes4le
+ne4ss
+4nesti
+ne3tl
+net4r
+ne3ud
+ne3v2
+ne4v.
+ne3z
+nez4n
+ne3\v sk
+ne3\v s\v t
+2nf
+n3fr
+2ng
+ng1l
+ng4la
+ng4le
+ng4l\'i
+n4gro
+ng4vi
+nik4t
+ni4mr
+ni4m\v z
+3nio
+3nisk
+2nit\v r
+n1j
+2nk
+2n1l
+2nn
+no3b2
+no4bs
+no3hn
+no4hs
+no4ir
+no4m\v z
+no4sky
+no3sm
+no3str
+not4r
+no3z
+no4zd
+no4\v sk
+2no\v z
+2n1s2
+n2sa
+ns3ak
+ns4ko
+n4soc
+ns3po
+nst4ra
+2n1t
+nte4r3a
+nt4lem
+nt4r.
+nt3ru
+nt3r\'a
+2nub
+nu4gg
+3ny.
+2nz
+3n\'ak
+n\'a3s2
+n\'a4s.
+2n1\v c
+2n\v d
+2n\'iv
+2n\'i\v z
+2n\'o
+2n\v s2
+n3\v st
+n\v s4\v to
+n\r u2
+2n\v z
+2o.
+o1a
+oang4
+o1ba
+o1be
+obe3j
+obe3s
+obe3z
+ob1l
+ob1r
+ob4r\v n
+o1bu
+obys4
+ob3z
+o3b\'e
+ob3\v rez
+o1c
+o4chl
+o2chr
+oc4ke
+oc4ko
+o4ct.
+oct3n
+ocy3
+oc4\'un
+od3b
+odej4m
+ode3p
+ode3s
+od1l
+o4doc
+odos4
+odo4tk
+od3ra
+od4ran
+od3r\r u
+o3dr\v z
+od3v
+od1\v r
+o1e2
+oe3g
+oe3ti
+o2fl
+ofrek4
+og2
+o3gn
+o1h
+oh4ne
+o1i
+oi4ce
+o4int
+o1j
+o4jar
+oje4dl
+o4jmi
+o4jmov
+o4jmu
+o4jm\r u
+oj2o
+o4juz
+2oka
+ok2te
+o1l
+ol4gl
+ol4to
+o1m
+om4kl
+om2n
+o2n
+o3na
+ona4s
+o3ne
+o3ni
+o3no
+ont4ra
+o3nu
+o3ny
+o3n\'a
+on\'a\v r4ka
+o3n\v e
+o3n\'i
+o3n\r u
+o3n\'y
+o1o
+oo4h\v r
+oote2
+opo\v c3t
+opro4s
+o2ps
+o4ptu
+op\'a4t
+o4p\v r.
+op\v rej4
+op\v re4jm
+o1ra
+o4rae
+or4dm
+o1re
+o1ri
+o1ro
+or3st
+o1ru
+or4v\'a
+o1ry
+o1r\'a
+o3r\'e
+o1r\r u
+or\r us3
+o3r\'y
+o1sa
+o4sai
+ose4s
+osi4d
+o1sk
+o4s3ke
+o4sku
+osk3v
+o4sk\'a
+o4sk\'y
+o1sl
+os4la
+os4li
+os4l\'y
+os3mo
+os4mu
+o4st.
+o4stg
+o4stm
+os4tor
+os3tr\r u
+o4st\'e
+o4st\v s
+o4st\'y
+o1sy
+o1t
+ot4kl
+o4tl\'y
+oto3s
+ot3ro
+ot3v\'i
+o3t\'i
+o3t\v r
+ot3\v ri
+o2u
+ou3b\v e
+ou3d\v e
+ou4fl
+ou4il
+ou4is
+ou4k.
+ou3ka
+o4ukl
+ou3kr
+ou3k\'a
+ou3m
+oup3n
+oupo4
+ou4s.
+ou3sa
+ou3se
+ou4sk
+ou3sm
+ou4tv
+ou3v
+ou4vl
+ou4vn
+ouz3d
+o4u\v ck
+ou3\v zi
+ovi4dla
+o4vsk
+ovy2p
+o2v\v st
+o1x
+o2z
+o3za
+oz1b
+oz4d.
+oz3d\'a
+oz3d\v e
+oz3d\'i
+o3ze
+oze3d2
+ozer4
+oz1h
+o3zi
+oz3j
+oz3k
+oz4ko
+oz1l
+oz3m
+o4zn.
+o3zo
+oz3p
+oz4py
+oz4p\v e
+oz4p\'i
+oz3ro
+oz3ru
+oz3r\r u
+oz3t
+o3zu
+o4zut
+oz3vr
+oz3v\'a
+o3z\'i
+o3z\r u
+oz\r u4s
+o1\v c
+o\v c2k
+o\v c4ka
+o2\v n
+o3\v na
+o3\v no
+o1\v r
+o\v ri2s
+o3\v sk
+o4\v sku
+o4\v sky
+o3\v sl
+o\v s4l\'a
+o\v s4mo
+o\v s4ti
+o\v s4\v tu
+o3\v zl
+o\v z4mo
+1p
+2p.
+pa4ed
+pa4es
+pa4kl
+pa3si
+pa4t.
+pat4ri
+2p1c
+pe4al
+pede4
+pe4ig
+pe4np
+peri3
+pes3t3
+pe4tra
+3pe\v c
+pi4kr
+pi4pl
+2pk
+p2kl
+p2l
+3pl.
+4p3la.
+pl3h
+pl4h.
+4p3li.
+4plo.
+2pn
+p2nu
+po1b2
+po3c2
+3pod
+podb\v e4h
+pod4nes
+po3dru
+po3dr\'a
+po3h
+poly3
+po3m2
+po4mp
+po4ol
+po3p
+po4p.
+po4pm
+po1s2
+pos4p
+post4r
+po3t2
+po4t.
+po4tn
+po3uk
+po3u\v c
+po3u\v z
+3po3v
+po3z2
+po4zd
+po\v c2
+po3\v ck
+po\v c3te
+po3\v r\'i
+po4\v sv
+2pp
+4pra.
+pra3st
+pr2c
+pro1
+prob2
+pro3p
+pro3t4
+pro3z
+pr2s
+4pr\'an
+pr\r u3
+pse4s
+2p1sk
+p4sut
+2pt
+p4tej
+p4ter
+p4tev
+pt4ri
+p3tu
+p4t\'a.
+pu4dl
+pu4tr
+pyt3l
+p\'a1
+p\'a2c
+p\'ad3l
+p\'a4nv
+p\'a4sl
+2p\v c
+p\'e4rh
+2p\v r.
+p\v re3h
+p\v re3j
+p\v re3t4
+p\v re3z
+p\v re3\v c2
+p\v ri3
+p\v rih4
+2p\v s
+p\v s4ti
+2p\v t
+qu2
+2r.
+1ra.
+ra4br
+ra4em
+ra4es
+ra4ff
+ra4hl
+ra4hm
+ra4jg
+ra4j\v s
+2rak
+ra4nh
+ra3si
+rast4r
+ra4vv
+ra4wl
+ra4y.
+ra4yo
+ra4\v dm
+4ra\v zi
+r1b
+r2bl
+r1c
+rca3
+r3cha
+r3cho
+rc4ki
+r1d
+r4dla
+rdo2s
+re4ad
+re4au
+red4r
+re4et
+re3kl
+re3kvi
+re4mr
+re2sb
+res3l
+retis4
+ret4r
+re4um
+r1ha
+r3hl.
+rh3n
+r1ho
+r3hu
+r1h\'a
+ri4bb
+1ric
+ric4ku
+ri4dg
+ri4dr
+ri4fl
+ri4gh
+ri4zm
+2rk
+r2kl
+r1l
+2r1m
+r4mio
+2rn
+rna4v\v s
+rn4dr
+ro4ad
+ro3by
+rod2l
+ro3d4r
+3rofy
+ro3h
+ro4h.
+ro4jb
+ro4k\v s
+rom3n
+romy4s
+rop\'at4
+ro2sb
+ro4skv
+ro4sky
+ro3sv
+ro3ti
+ro3tl
+ro4t\v c
+ro3vd
+rov\v e4t
+3rov\'y
+roz3d
+roz3n
+ro4zo
+roz3v
+ro3z\'a
+ro4\v cp
+rpa3d
+2rr
+rr4ha
+rr4ho
+2r1s
+r2st
+r4stu
+rs3tv\v e
+rs3tv\'y
+2r1t
+r2th
+r4tr\'a
+rt4sm
+rtu3
+r2t3v
+rt4zu
+1ru.
+ru3se
+ru3si
+rus3k
+ru3\v zi
+3rvan\'i
+r1x
+1ry.
+rych3
+ryd2
+rys3ky
+rys3t
+ry4zk
+ry4zn
+ry4\'i.
+ry4\v sk
+2rz
+rz3d
+rz3l
+r\'ad4l
+r\'a4d\v z
+1r\'ak
+r\'a3ri
+1r\'a\v r
+r1\v c
+4r\v cit\'y.
+r\v c3t
+3r\'e.
+2r\'o
+2r\v s
+r\v s4n\'i
+r\r u4m.
+r\r us3ta
+r\r u4v.
+3r\'y.
+r\'y4zn
+2s.
+sa4pf
+sa4pr
+sas3k
+s2b2
+s2c
+s3ca
+s3ce.
+sch2
+sch4l
+sch4n
+3schop
+s3ci
+sci4e
+s3c\'i
+s2d
+1se
+se4au
+se3h
+se4ig
+se4il
+sej4m
+se4ku
+3sel
+se3lh
+3sem
+ser4va
+se3s2
+ses4k
+se4ss
+se4stra
+se4stru
+se4st\v r
+set2
+se3tk
+se3t\v r
+se4ur
+se3z
+se3\v ct
+2sf
+s3fo
+3sf\'e
+s3f\'u
+1si
+3sic
+3sif
+si4fl
+sig4no
+3sik
+si3ste
+3sit
+s2j
+s3ju
+s2k
+4skac
+s4kak
+4skam
+s4kok
+2skon
+skos4
+4skot
+sk4ra
+sk4ru
+sk4ry
+4skve
+sk4vo
+s3k\'an
+s3k\r u
+3sl.
+4s3la.
+s4lav
+s3le.
+s4led
+s3lem
+s3len
+s3let
+s4lib
+s4li\v ci
+3sln
+4s3lo.
+s2ly
+s3ly.
+s1l\'i
+s2ma
+s4mek
+s2mo
+2sn
+s2na
+s3nat
+s2ne
+s3ne.
+sn4tl
+s2n\'a
+s3n\'a.
+s4n\'id
+1so
+sob4l
+so3br
+so4sk
+so4tv
+sou3h
+sou3s
+souz4
+so4\v sk
+s2p
+s4pol
+spro4s
+1sr
+2ss
+ss4sr
+2st.
+4sta.
+s3taj
+s2tan
+st4at
+4stec
+s4tep
+st4er
+s4tero
+s4tich
+2stil
+s4tink
+4stit.
+4sti\v c
+st3lo
+2stn
+4sto.
+s4tona
+4stou.
+4str.
+4stram
+s4trik
+4strn
+4str\'ac
+4stupni
+s2tv
+st4ve
+3stv\'i
+4sty.
+s4tyl
+3sty\v s
+s2t\'a
+4st\'a.
+s3t\'a\v r
+4st\v e.
+s4t\v ed
+3st\v eh
+s2t\v er
+s2t\v e\v z
+s1t\'i
+2st\'i.
+s3t\v rej
+1su
+su4ba
+su4bo
+suma4
+su3ve
+s2v
+sy3c
+sych3r
+sy4nes
+s\'a2d
+3s\'ah
+s\'a2kl
+2s2\v c
+s3\v ci
+1s\'e
+1s\'i
+2s\v n
+2s\v t
+s3\v to
+1s\r u
+s2\v z
+2t.
+1ta.
+ta2bl
+tac4tvo
+t2a3d
+1taj
+ta4jf
+ta4jg
+4talt
+4tand
+3tan\v e
+t1ao
+2tark
+tast4
+ta3str
+ta4\v ck
+2t1b
+2t1c
+1te
+3te.
+te4ak
+te4fl
+te4in
+4ten\'em
+teob4
+tep3l
+ters4
+tes3ta
+te4tr
+te4uc
+te4ur
+te4ut
+2tf
+2tg
+1ti
+ti4gr
+2tih
+ti3kl
+tin4g
+ti4pl
+ti3sl
+tis4tr
+ti4tr
+2titu
+tiz4r
+4tiz\'i
+ti\'u3
+2ti\v z
+2tk2
+t4kal
+4t2kan
+t4kat
+t2kl
+tk4la
+tk4li
+4tkn\v e
+t2k\'a
+2tl
+3tl.
+4tla.
+t1le
+tles3
+3tlm
+t3lo.
+t4lou
+tlu3
+tlu4s
+t1ly
+t1l\'e
+2tm
+t2ma
+2tn
+t3n\'i
+1to
+to4as
+to3b
+tob4l
+to3dr
+to4hm
+to4ir
+2toj
+tol4s
+to4ol
+4top.
+4topt
+4topu
+2torn
+2toup
+2tp
+t3rant
+t4rea
+t4ref
+tre4t
+4tric.
+trip4
+t4rit
+t4rog
+t3rol
+tro4sk
+t4rou
+4trouh
+4tro\v n.
+4trun
+t4rus
+4t4ru\v z
+t3r\'aln
+4tr\'a\v s
+2tr\v c
+t3r\r um
+t3r\r uv
+2tr\'y
+2t1s
+ts4ko
+ts2t
+2t1t
+tt4ch
+tt4ri
+1tu.
+tu4ff
+1tuj
+tu4lk
+2tup
+tu4r.
+tu3ry
+tu4s.
+tu4\v t.
+tu3\v zi
+t2v
+2tve
+2t3vi
+t4vinn
+t4vi\v s
+t4v\'yc
+1ty.
+ty4g\v r
+ty2la
+ty4\v re
+ty4\v rh
+ty4\v rj
+ty4\v ro
+ty4\v rr
+ty4\v r\'u
+3t\'a.
+t\'a4fl
+t2\v c
+t3\v ci
+2t\v c\'i
+1t\'e
+t\'e2bl
+3t\'em
+1t\v e
+t\v e3d4l
+2t\v eh
+2t\v enn
+2t\v ep
+1t\'ic
+4t\'ic.
+4t\'ice
+1t\'im
+2t\'in
+2t\'ir
+2t\v r
+t4\v reb
+t\v reh3n
+t2\v rel
+t2\v ric
+t3\v ril
+t\v r4ti
+t1\v ru
+t2\v r\'a
+3t\v r\'ab
+t\v r\'i4s
+2t\v s
+t3\v st
+t\v s4ti
+1t\r u
+1t\'y.
+1t\'ym
+1t\'y\v r
+3t\'y\v s
+u1
+2u.
+u2at
+u2b
+u3ba
+u3be
+u3bi
+u3bo
+ubs4t
+u3bu
+u3b\'a
+u3b\'i.
+u3b\r u
+uc4t\'i
+2u2d
+u3de
+u3di
+u3do
+u3dru
+u3du
+u3dy
+u3d\'i
+ue4fa
+2uf
+u2hl
+uh3l\'a
+uh3no
+u2in
+u2jm
+u2k
+u3ka.
+uk4aj
+uk4al
+uk4at
+u3ke
+uk3la
+uk3le
+u3ko
+u3ku
+u3ky
+uk4\'a.
+u3k\r u
+ul4fa
+ul1h
+ul4p\'i
+u2m
+u3ma
+u3me
+u3mi
+um4pl
+um4ru
+u3mu
+u3m\'a
+3um\v r
+u2n
+un4dl
+u3ne
+u3no
+u3nu
+u3n\v e
+u3n\'i
+u3n\r u
+un4\v zr
+u2p
+u3pa
+u3pe
+upe2r3
+u3pi
+u3pln
+u3pu
+u3py
+u3p\'a
+u3p\v e
+u3p\'i
+u3p\r u
+u2r
+u3ra
+u3re
+u3ri
+2u3ro
+u3ru
+u3ry.
+u3r\'a
+1ur\v c
+u3r\r u
+u2s
+us3ky
+us3k\'a
+us3k\'e
+us3k\'y
+us1l
+us2lo
+u3so
+u4ste
+u4sty
+u4st\'e
+u4st\v e
+u3st\v r
+u4st\v s
+u4st\'y
+u3su.
+u3sy
+u3s\'a
+u3s\'i
+u3s\r u
+u4tro
+u4tr\'a
+u2v
+u3vi
+u3vu
+u2z
+u3ze
+u3zi
+uz1l
+u3zo
+u3zu
+u3z\'i
+u2\v c
+u3\v ca
+u3\v ce
+u3\v ci
+u3\v co
+u\v c3t
+u3\v cu
+u3\v c\'a
+u3\v c\'i
+u2\v d
+u2\v n
+u2\v s
+u3\v se
+u3\v si
+u\v s4kl
+u3\v so
+u\v s3t\'i
+u3\v su
+u3\v s\'a
+u3\v s\'i
+u2\v z
+u3\v ze
+u3\v zo
+u3\v zu
+u3\v z\'a
+u3\v z\'i
+1v
+2v.
+va3dl
+va4j\v t
+va4kl
+2v1b
+2v1c
+v2ch
+2v2d
+v4dal
+v3di
+v4d\v ek
+v4d\v e\v c
+ve3dle
+ve3jd
+3ven
+ve2p
+ve3ps
+vep3\v r
+ves3l
+ve4sm
+ves4p
+ve3sta
+ve3t4\v r
+ve2z3m
+vi4ch
+vide2
+vi4dr
+vi4et
+vi4kr
+vi2tr
+2vk
+v2kr
+v2l
+2v3la.
+4vle.
+4vlem
+2vlo
+2vm
+2vn
+v4nad
+vo3b
+vo4ic
+vo4ja
+vo4jb
+vo4jd
+vo4jj
+vo4jm
+vo4j\v r
+vo2s
+vo4t\v r
+vou3
+vous2
+v2p
+vr2c
+vr2dl
+4vrny
+v1ro
+vr4st
+vrst3v
+vrs4tv\v e
+2vs2
+v1sk
+v3stv
+2v2t
+vy3c
+vy3d2
+vy4dra
+vyp2
+vy3s2
+vy4sn
+vys4t
+vy3t
+vy3\v c
+vy\v c4k
+vy\v s2
+vy4\v s.
+vy4\v sm
+vy4\v s\v s
+vy4\v zl
+v2z2
+vz4no
+vz4n\'e
+vz4n\v e
+vz4n\'i
+v\'a3ri
+2v2\v c
+v3\v c\'a
+v3\v c\'i
+v4\v c\'ir
+v\v e4cm
+v\v e3t4a
+v\'ice3
+v\'i4hat
+3v\'in
+2v\v n
+2v\v r\'i
+v3\v r\'in
+v2\v s2
+v\v se3s
+v3\v st\'i.
+3v\'ys
+v\'y3t
+3v\'y3z
+v2\v z2
+wa4fd
+3war
+wa4re
+we2
+2x.
+xand4
+2xf
+xisk4
+2xn
+3xov
+x1t
+xt4ra
+xy4sm
+y1
+y2a
+y2bl
+yb3ri
+y2ch
+y4chr
+y2d1l
+yd4l\'a
+y2dr
+yd4y.
+y2e
+y2gr
+y3hn
+yh4ne
+yj4ma
+yj4me
+y2kl
+yk3la
+y3klop
+yk4ly
+yman\'e4
+ym4kl
+yna4s
+y3ni
+ype4r
+yp4si
+yp4t\'a
+y2p\v r
+yr2v
+y2s
+y3sa
+y3se
+y3si
+ys3lu
+y3sm
+y3so
+y3sp
+ys2t
+ys3te
+yst4r
+y3su
+y3sv
+y3sy
+y3s\'a
+y3s\'e
+y3s\'i
+yt4me
+yu3\v z
+y3vs
+yv\v e4t
+y3zb
+y3zd
+y3zk
+y3zn
+yz4n\v e
+yz4n\'i
+y3zp
+yz4po
+y\v c2k
+y2\v n
+y\v r3b
+y\v rk4n
+y\v r4\v ce
+y3\v r\'i
+y2\v s
+y3\v se
+y3\v si
+y3\v sk
+y\v s1l
+y3\v so
+y3\v sp
+y3\v su
+y3\v s\'i
+y\v z2
+y3\v zd
+1z
+2z.
+zab2l
+za4bs
+za4dk
+za3dl
+za4dn
+za3h
+za3i
+za3j
+za4jk
+za3k
+za4kt
+zal4k
+zam4n
+za3p2
+za3s2
+zat2
+za3tl
+zat4r
+za4ut
+za3z
+zaz4n
+za4z\v s
+za4\v c.
+za3\v s
+za\v s4k
+za4\v ss
+2zb
+zban4
+z2by
+zbys4
+2z1c
+2z2d
+z3di
+zdn\v e4n\'i
+z4doba
+z4dobn\'y
+zd4re
+zd4v\'i
+z2e
+ze3h
+ze3p2
+4zerot
+ze3s2
+zes4p
+zet2
+zev2
+ze3vn
+ze3z
+ze4z.
+2z2f
+z1h\'a
+z4ine
+z2j
+z3j\'i
+2z2k
+z3ka.
+z3ky
+z3k\'e
+z3k\r u
+z3k\'y
+2zl
+3zl.
+zlhos4
+zlik3
+z3ly.
+z2m2
+2zme
+z3mn
+z3my
+z4m\v en
+2z2n
+3znak
+z4nal
+z3ne.
+z3nic
+z3no
+z3nu
+z3ny
+z3n\'e
+z3n\v e
+z4n\v el
+z3n\'i
+z4n\'it
+z4n\'iv
+z3n\'y
+zo4tr
+zo4\v sk
+2z2p
+z3pt
+z4p\'at
+3zrak
+2z1s2
+2zt
+ztros3
+z4tr\'a
+z3t\v r
+3zu.
+zu3mo
+zu3m\v e
+zu3m\'i
+zu3\v s
+z2v
+zva4d
+z3va\v r
+z3vi
+zvik4
+zv4n\v e
+z3vod
+z3voj
+z4von
+zv4ro
+z4v\'an
+z4v\v es
+z3v\'ij
+3zy.
+2zz
+z\'a1
+z\'ah2
+z\'a4kl.
+3z\'ap
+z\'a3s2
+z\'a3z
+z\'a\v s2
+2z\v c
+z3\v cl
+2z\v n
+z2\v r
+z\v rej3
+z3\v rez
+z3\v re\v s
+2z\v s2
+z3\v sk
+z\v s4ka
+z3\v st
+2z2\'u1
+z\'u3\v c
+z\'u3\v z
+z\r u3s
+\'a1b
+\'a2bl
+\'ab4ry
+\'a4b\v r.
+\'a3cho
+\'ac3ti3
+\'a1d
+\'a2dl
+\'ado4s
+\'ados4ti
+\'ad1\v r
+\'a1ha
+\'a3he
+\'ah1l
+\'a3hl.
+\'ah3n
+\'a1ho
+\'a1hr
+\'a1h\'a
+\'a1j
+\'a4jmu
+\'aj4m\r u
+\'a4kli
+\'ak4ni
+\'a1la
+\'a1le
+\'a1lo
+\'a1lu
+\'a1ly
+\'a3l\'e
+\'a1l\'i
+\'a3my
+\'a3m\'e
+\'a1m\v e
+\'a3m\'i
+\'a3m\'y
+\'ane4v
+\'a1ra
+\'a1re
+\'ar2m
+\'a1ro
+\'a1ru
+\'a3r\r u
+\'a1s
+\'a2sc
+\'a2s3k
+\'as4k.
+\'as4kl
+\'as4kn
+\'a2sla
+\'as4ly
+\'a2sm
+\'as4po
+\'a2st
+\'at3k
+\'at1r
+\'a1tu
+\'a1ty
+\'a1t\'i
+\'a3t\'y
+\'av4si
+\'av4s\'i
+\'az3k
+\'az3ni
+\'azni4c
+\'az4vi
+\'a2\v n
+\'a1\v r
+\'a\v r4ke
+\'a\v r4k\r u
+\'a2\v s
+\'a3\v se
+\'a3\v s\'i
+2\v c.
+1\v ca
+\v ca4br
+2\v cb
+2\v c1c
+1\v ce
+3\v ce.
+\v ce1c
+\v ces3k
+1\v ci
+2\v ck
+\v c3ka.
+\v c3ko
+\v c3ku
+\v c3ky
+2\v c1m
+2\v cn
+\v c2ne
+1\v co
+\v c2p
+2\v cs
+\v c1sk
+\v cs4la
+\v cs4sr
+2\v c2t
+\v c4ten\'e.
+\v c4ten\'y
+\v ct4la
+\v c4tov\'y.
+3\v ctv
+4\v ct\v en
+\v c3t\'i
+1\v cu
+1\v c\'a
+1\v c\'i
+\v c\'is3l
+1\v c\r u
+2\v d.
+1\v da
+1\v do
+\v ds4te
+2\v d1t
+3\v duj
+\'e1
+\'e2d
+\'e3di
+\'e3do
+\'e2f
+\'e3fo
+\'ef1r
+\'e2kl
+\'e2l
+\'e2m
+\'e3ma
+\'e3me
+\'e3mi
+\'e3mo
+\'e3mu
+\'e3m\r u
+4\'ere.
+\'e2s
+\'e2t
+\'e3ta
+\'e3to
+\'e3t\'a
+\'e2\v s
+\'e2\v z
+\v e1c
+\v ed3r
+\v e3ha
+\v e3he
+\v e3hl.
+\v eh3lo
+\v eh3n
+\v e1ho
+\v e3hu
+\v e3h\r u
+\v e3ja
+\v e1je
+\v e1jo
+\v e3j\r u
+\v e4kl\'e
+\v e3k2t
+\v e1l
+\v e1ra
+\v era3d
+\v e1re
+\v e1ro
+\v er3s
+\v ers4t
+\v e1ru
+\v e1ry
+\v e1r\r u
+\v es3k
+\v es3n
+\v et1a3
+\v et4ac
+\v et1l
+\v e1tr
+\v et3ra
+\v e4traj
+\v et3v
+\v e1t\'i
+\v et3\v r\'i
+\v e2v
+\v e3va
+\v e3ve
+\v e3vl
+\v e3vo
+\v e3vu
+\v e3v\'a
+\v ev3\v c
+\v e2z
+\v e3ze
+\v e3zi
+\v ez3n
+\v e3zo
+\v e3z\'i
+\v e1\v r
+\v e2\v s
+\v e3\v se
+\v e3\v si
+\v e3\v so
+\v e3\v su
+\v e3\v s\'a
+\v e3\v s\'i
+\v e\v s3\v t
+\v e\v s4\v ts
+\v e2\v t
+\v e3\v to
+\v e2\v z
+\v e3\v ze
+\v e3\v zi
+\v e3\v zo
+\v e3\v zu
+\v e3\v z\'i
+\'i1b
+\'ib3\v r
+\'i3cho
+\'ich4t
+\'id1l
+\'i1h
+\'i2hl
+\'ih3n
+\'i1j
+\'ijed4
+\'ij4m\r u
+\'i2kr
+\'i1l
+\'i1m\'a
+\'i3m\'e
+\'i1m\v e
+\'i1r
+\'i1sa
+\'i2s3k
+\'is4kl
+\'is4kn
+\'is4l.
+\'is3le
+\'is4ln
+\'is\'ah2
+\'i1t
+\'it3k
+\'i3t3\v re
+\'iz3da
+\'iz3de
+\'iz3k
+\'i3zna
+\'i3z3ni
+\'i3zn\v en
+\'i2\v n
+\'i1\v r
+\'i2\v s
+\'i3\v se
+\'i3\v si
+\'i3\v so
+\'i3\v s\'i
+1\v n
+2\v n.
+2\v na
+\v na3d
+2\v nk
+2\v nm
+3\v nov
+\v n1s
+2\v n1t
+\'o1
+\'o2z
+\'o3za
+\'o3zi
+\'o3zo
+\'o3zy
+2\v r.
+\v ra4pl
+\v ra4\v dm
+2\v r2b
+2\v rc
+2\v rd
+\v re3ch
+\v re4dob
+\v re1h
+\v re3jd
+\v re3kl
+\v re3kv
+\v re4k\v r\'i
+\v reo4r
+\v re3p2
+\v re4p.
+\v re4pk
+\v re4p\v c
+\v rer4v
+2\v res
+\v re3ska
+\v re3sko
+\v re2sp
+\v res3po
+\v re4sr
+\v re3sta
+\v re3stu
+\v re3st\'a
+\v re3st\v r
+\v re3tl
+\v ret4\v r
+\v re3zd
+\v re3zk
+4\v rezl
+\v re3\v ct
+\v ri1
+\v ria3
+\v ri3h
+\v ri4h.
+\v ri4hn
+\v ri4j\v d
+\v ri4l.
+\v ri4lb
+\v ril2n
+4\v rine
+\v ris2
+3\v ri4t.
+\v ri4v.
+\v ri4vk
+\v ri4vn
+\v ri3z
+\v ri\v c4t
+\v ri3\v r
+\v ri4\v s.
+2\v rk
+\v r2kl
+\v rk4la
+\v rk4li
+\v rk4ly
+\v rk4no
+2\v r1l
+2\v r1m
+2\v rn
+1\v ro
+2\v rou
+2\v r2p
+2\v r1s
+\v rs4to
+2\v r1t
+\v r2v
+2\v rz
+\v r\'a4pl
+\v r\'a2sl
+2\v r1\v c
+2\v r\'id
+\v r\'i4k\v r
+\v r\'i1s
+2\v r\v s
+\v r3\v st
+\v r\v s4ti
+1\v s
+2\v s.
+\v sab3
+\v sa4vl
+2\v s1c
+\v sej4d
+\v sep3t
+\v si4mr
+2\v s2k
+\v s3ka
+\v s3ke
+\v s3k3li
+4\v s3kou
+4\v skov
+3\v skr
+\v sk4ro
+\v s3ku.
+\v s3ky
+2\v sl
+\v s2la
+\v s2li
+\v s3liv
+\v s2lo
+\v sl\'a2
+\v s2l\'e
+\v s2l\'y
+2\v s1m
+\v smi4d
+2\v sn
+\v s2p
+2\v s1s
+2\v st
+\v s4tip
+\v st4ka
+\v st4kl
+\v s4t\v ek
+\v s2t\v es
+\v s4t\v ev
+\v s4t\'ip
+\v s2v
+\v s\'i3d
+\v s2\v n
+\v s3\v s\'i
+2\v s2\v t
+\v s3\v to
+\v s3\v tu
+\v s3\v t\'a
+1\v t
+2\v t.
+3\v tal
+2\v tk
+2\v tm
+2\v tt
+\v t\'a\v c4k
+1\'u
+\'u2c2
+\'u2d
+\'uj4ma
+\'u2k
+\'u2l
+\'u2n
+\'u2p
+\'u2t
+\'ut4ko
+\'u2v
+\'u2z
+\'uz3k
+\'u2\v c
+3\'u\v ce
+\'u\v re4z
+\'u\v s4ti
+\'u2\v z
+\r u1b
+\r u1c
+\r u1hl
+\r u3jd
+\r u4jmov\'y
+\r u1le
+\r u1my
+\r u1m\v e
+\r u1ra
+\r ur4va
+\r ur4vy
+\r u1s2
+\r u2st
+\r us3te
+\r us3t\'an
+\r ut2
+\r u3tkl
+\r u2v
+\r u3va
+\r u3vo
+\r u3v\v e
+\r u2z
+\r u3zo
+\r u2\v z
+\r u3\v ze
+\r u3\v zi
+\r u3\v zo
+\'y1b
+\'y3cho
+\'y1d
+\'yd4la
+\'y1h
+\'y1j
+\'y1l
+\'y1ml
+\'y1m\v e
+\'y2n
+\'y3no
+\'ypo3\v c4
+\'y1r
+\'y1s2
+\'y2sk
+\'y1t
+\'yt4ku
+\'yt4ky
+\'y1u
+\'y4vli
+\'y3zk
+\'y3zn
+\'y4zvu
+\'y\v c4n\v e
+\'y1\v r
+\'y\v s3l
+1\v z
+2\v z.
+\v za3d
+\v za4tv
+3\v za\v c
+2\v z1b
+2\v z1c
+2\v z1d
+\v ze2b3
+\v zeh3n
+\v ze4ml
+\v ze4zg
+\v zi4dl
+\v zi4jm
+3\v zil
+\v zi2vl
+2\v zk
+\v zk4ni
+2\v zl
+\v z4lic
+3\v zlo
+2\v z1m
+2\v zn
+\v zon2
+2\v z1s2
+2\v z1t
+\v z2v
+\v z\'a4br
+\v z\'a4nr
+2\v z\v d
+\v z\'i4zn
+2\v z\v n
+2\v z\v s
+\v z\v s4ti
+\v z\v s4t\v e
+}
+\endinput
+%%
+%% End of file `czhyphen.tex'.
diff --git a/tex/context/base/lang-da.pat b/tex/context/base/lang-da.pat
index 7259cee1d..e49c9fe4e 100644
--- a/tex/context/base/lang-da.pat
+++ b/tex/context/base/lang-da.pat
@@ -1,1154 +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
+\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
index e0373ee4e..76f198bbf 100644
--- a/tex/context/base/lang-de.pat
+++ b/tex/context/base/lang-de.pat
@@ -1,2581 +1,1042 @@
-% 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
+% This is `gnhyph01.tex', revision level 26
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% gnhyph01 -- Vorlaeufige TeX-Trennmuster fuer die
+% neue deutsche Rechtschreibung
+%
+% Preliminary hyphenation patterns for the
+% new German orthography
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% *** Bitte beachten Sie die Informationen am ENDE dieser Datei! ***
+%
+% Copyright (C) 1988,1991 Rechenzentrum der Ruhr-Universitaet Bochum
+% [german hyphen patterns]
+% Copyright (C) 1993,1994 Bernd Raichle/DANTE e.V.
+% [macros, adaption for TeX 2]
+% Copyright (C) 1998 Walter Schmidt
+% [adaption to new German orthography]
+%
+% General permission for use and non-profit redistribution is granted.
+% For special commercial use, contact the below address.
+%
+% Commercial use is generally granted, if a reference copy
+% - for use by the Rechenzentrum of the Ruhr-Universitaet -
+% is received.
+%
+%%
+% For use with TeX generated by
+%
+% Norbert Schwarz
+% Rechenzentrum Ruhr-Universitaet Bochum
+% Universitaetsstrasse 150
+% D-44721 Bochum, FRG
+% Email (X.400):
+% Norbert.Schwarz@RUBA.RZ.RUHR-UNI-BOCHUM.DBP.DE
+%
+%
+% Adaption of these patterns for TeX, Version 2.x and 3.x and
+% all fonts in `Cork'/EC/DC and/or CM encoding (ghyph31.tex) by
+%
+% Bernd Raichle
+% Stettener Str. 73
+% D-73732 Esslingen, FRG
+% Email: raichle@Informatik.Uni-Stuttgart.DE
+%
+%
+% Adapted to new German orthography (gnhyph01.tex) by
+%
+% Walter Schmidt
+% Schornbaumstr. 2
+% D-91052 Erlangen
+% Germany
+% Email: wschmi@ibm.net
+%
+% *** Please, send error reports to the latter address only! ***
+% *** ***
+% *** Please, do _not_ report errors occuring in conjunction ***
+% *** with the traditional german hyphenation patterns ***
+% *** ghyph31.tex, too. ***
+%
+%
+% -----------------------------------------------------------------
+%
+\message{New German Hyphenation Patterns `gnhyph01' Rev.26 <1998-08-23> (WaS)}
+%
+\begingroup
+\ifnum 0\ifx\inputlineno\undefined \else
+ \ifnum\inputlineno<1 \else 1\fi\fi<1
+ \let\x=\endgroup
+\else
+ \def\x{\endgroup
+%
+% The following commands ensure correct \catcodes, \lccodes and
+% \uccodes if your TeX implementations uses these character codes.
+%
+\catcode"E4=11 \catcode"C4=11 % \"a \"A
+\catcode"F6=11 \catcode"D6=11 % \"o \"O
+\catcode"FC=11 \catcode"DC=11 % \"u \"U
+\catcode"FF=11 \catcode"DF=11 % \ss SS
+%
+\lccode"C4="E4 \uccode"C4="C4 \lccode"E4="E4 \uccode"E4="C4
+\lccode"D6="F6 \uccode"D6="D6 \lccode"F6="F6 \uccode"F6="D6
+\lccode"DC="FC \uccode"DC="DC \lccode"FC="FC \uccode"FC="DC
+\lccode"DF="FF \uccode"DF="DF \lccode"FF="FF \uccode"FF="DF
+%
+}
+\fi
+% Now execute the changes of the above \*codes for TeX 3.x
+\x
+
+
+%
+% Next we define some commands, which are used inside the patterns.
+% To keep them local, we enclose the rest of the file in a group
+% (The \patterns command globally changes the hyphenation trie!).
+%
+\begingroup
+%
+% Because we use ^^e4, ^^f6, ... in the following definition,
+% we have to ensure that the catcodes of ^^e and ^^f are ok
+% for TeX 2. (The macro is not used for TeX 2.)
+\catcode"0E=12 \catcode"0F=12
+%
+% And we have to change the \lccode of ^^Y to make sure that
+% we can include this character in the hyphenation patterns.
+\catcode`\^^Y=11 \lccode`\^^Y=`\^^Y
+%
+% Define a simple " macro...
+\catcode`\"=13
+\def"#1{\ifx#1a^^e4\else \ifx#1o^^f6\else
+ \ifx#1u^^fc\else
+ \errmessage{Hyphenation pattern file corrupted!}%
+ \fi\fi\fi}
+%
+% ... and define a macro to allow the use of this file
+% with TeX 2 and TeX 3.
+\ifnum 0\ifx\inputlineno\undefined \else
+ \ifnum\inputlineno<1 \else 1\fi\fi<1
+ % for TeX 2:
+ % ignore the patterns with umlauts
+ \def\n#1{}
+ % ignore the duplicated patterns with \ss
+ \def\c#1{}
+ % define \3 to be code ^^Y
+ \def\3{^^Y}
+\else
+ % for TeX 3:
+ % patterns with umlauts are ok
+ \def\n#1{#1}
+ % duplicated patterns are ok (for CM fonts)
+ \def\c#1{#1}
+ % >>>>>> UNCOMMENT the next line, if you do not want
+ % >>>>>> to use fonts with CM layout
+ %\def\c#1{}
+ % define \3 to be code `\^^ff (\ss in DC/EC font layout)
+ % define \9 to be code `\^^Y (\ss in CM font layout)
+ \def\3{^^ff}
+ \def\9{^^Y}
+\fi
+%
+%
+\patterns{%
+.aa6l .ab3a4s .ab3ei .abi2 .ab3it .ab1l .ab1r .ab3u .ad3o4r .alti6
+.ana3c .an5alg .an1e
+.ang8s2t1 % .ang8s (des einzige Wort, das mit angs... beginnt !)
+.an1s .ap1p .ar6sc .ar6ta .ar6tei .as2z
+.au2f1 .au2s3 .be5erb .be3na .ber6t5r .bie6r5 .bim6s5t .brot3 .bru6s
+.ch6 .che6f5 .da8c .da2r .dar5in .dar5u .den6ka .de5r6en .des6pe
+.de8spo .de3sz .dia3s4 .dien4 .dy2s1 .ehren5 .eine6 .ei6n5eh .ei8nen
+.ein5sa .en6der .en6d5r .en3k4 .en8ta8 .en8tei .en4t3r .epo1 .er6ban
+.er6b5ei .er6bla .er6d5um .er3ei .er5er .er3in .er3o4b .erwi5s .es1p
+.es8t1l .es8t1n % .es8t
+.ex1a2 .ex3em .fal6sc .fe6st5a .flu4g3 .furch8 .ga6ner .ge3n4a
+\n{.ge5r"o}
+.ges6
+.halb5 .halbe6 .hal6br .haup4 .hau4t .heima6 .he4r3e
+.her6za .he5x .hin3 .hir8sc .ho4c .hu3sa .hy5o .ibe5 .ima6ge .in1
+.ini6 .is5chi .jagd5 .kal6k5o .ka6ph .ki4e .kop6f3 .kraf6 \n{.k"u5ra}
+.lab6br .liie6 .lo6s5k \n{.l"o4s3t} .ma5d .mi2t1 .no6th .no6top
+.obe8ri .ob1l .obs2 .ob6st5e .or3c .ort6s5e .ost3a .oste8r .pe4re
+.pe3ts .ph6 .po8str .rau4m3 .re5an .ro8q .ru5the \n{.r"u5be}
+% \n{.r"u8stet}
+.sch8 .se6e .se5n6h .se5ra .si2e .spi6ke .st4 .sy2n
+.tages5 .tan6kl .ta8th .te6e .te8str .to6der .to8nin .to6we .um1
+.umpf4 .un1 .une6 .unge5n .ur1c .ur5en .ve6rin .vora8 .wah6l5 .we8ges
+.we8s2t .wes3te
+.wo6r .wor3a .wun4s .zi4e .zuch8 \n{."ande8re} \n{."och8} aa1c aa2gr
+aal5e aa6r5a a5arti aa2s1t aat2s 6aba ab3art 1abdr 6abel aben6dr
+ab5erk ab5err ab5esse 1abf 1abg \n{1abh"a} ab1ir 1abko a1bl ab1la
+5ablag a6bla\3 \c{a6bla\9} ab4ler ab1lu \n{a8bl"a} \n{5a6bl"o} abma5c
+1abn ab1ra ab1re 5a6brec ab1ro
+ab1s
+ab8sk abs2z 3abtei ab1ur 1abw
+5abze 5abzu \n{ab1"an} \n{ab"au8} a4ce. a5chal ach5art ach5au a1che
+a8chent ach6er. a6ch5erf a1chi ach1l ach3m ach5n a1cho ach3re a1chu
+ach1w a1chy \n{ach5"af} ack1o acks6t ack5sta a1d 8ad. a6d5ac ad3ant
+ad8ar 5addi a8dein ade5o8 adi5en 1adj 1adle ad1op a2dre 3adres adt1
+1adv \n{a6d"a} a1e2d ae1r a1er. 1aero 8afa a3fal af1an a5far a5fat
+af1au a6fentl a2f1ex af1fr af5rau af1re 1afri af6tent af6tra aft5re
+a6f5um \n{8af"a} ag5abe 5a4gent ag8er ages5e 1aggr ag5las ag1lo a1gn
+ag2ne 1agog a6g5und a1ha a1he ah5ein a4h3erh a1hi ahl1a ah1le ah4m3ar
+ahn1a a5ho ahra6 ahr5ab ah1re ah8rei ahren8s ahre4s3 ahr8ti ah1ru a1hu
+\n{ah8"o} ai3d2s ai1e aif6 a3inse ai4re. a5isch. ais8e a3ismu ais6n
+aiso6 a1j 1akad a4kade a1ke a1ki 1akko 5akro1 a5lal al5ans 3al8arm
+al8beb al8berw alb5la 3album al1c a1le a6l5e6be a4l3ein a8lel a8lerb
+a8lerh a6lert 5a6l5eth 1algi al4gli al3int al4lab al8lan al4l3ar
+alle3g a1lo a4l5ob al6schm al4the
+% altist5
+al4t3re 8a1lu alu5i a6lur
+alu3ta \n{a1l"a} a6mate 8ame. 5a6meise am6m5ei am6mum am2n ampf3a
+am6schw am2ta a1mu \n{a1m"a} a3nac a1nad anadi5e an3ako an3alp 3analy
+an3ame an3ara a1nas an5asti a1nat anat5s an8dent ande4s3 an1ec an5eis
+an1e2k 4aner. a6n5erd a8nerf a6n5erke 1anfa 5anfert \n{1anf"a} 3angab
+5angebo an3gli ang6lis an2gn 3angri ang5t6 \n{5anh"a} ani5g ani4ka
+an5i8on an1kl an6kno an4kro 1anl anma5c anmar4 3annah anne4s3 a1no
+5a6n1o2d 5a6n3oma 5a6nord 1anr an1sa 5anschl an4soz an1st 5anstal
+an1s2z 5antenn an1th \n{5anw"a} a5ny an4z3ed 5anzeig 5anzieh 3anzug
+\n{an1"a} \n{5an"as} \n{a1n"o} \n{an"o8d} a1os a1pa 3apfel a2ph1t
+\n{aph5"a6} a1pi 8apl apo1c apo1s
+a6pos2t % a6pos2te
+a6poth 1appa ap1pr a1pr
+\n{a5p"a} \n{a3p"u} a1ra a4r3af ar3all 3arbei 2arbt ar1c 2a1re ar3ein
+ar2gl 2a1ri ari5es ar8kers ar6les ar4nan ar5o6ch ar1o2d a1rol ar3ony
+a8ror a3ros ar5ox ar6schl 8artei ar6t5ri a1ru a1ry 1arzt arz1w
+\n{ar8z"a} \n{ar"a8m} \n{ar"o6} \n{ar5"om} \n{ar1"u2} a1sa a6schec
+asch5l asch3m a6schn a3s4hi as1pa asp5l
+% a8steb % ueberfluessig ?
+as5tev 1asth
+% a6stoc % ueberfluessig ?
+a1str ast3re 8a1ta ata5c ata3la a6tapf ata5pl a1te a6teli aten5a
+ate5ran 6atf 6atg a1th at3hal 1athl 2a1ti 5atlant 3atlas 8atmus 6atn
+a1to a6t5ops ato6ra a6t5ort. 4a1tr a6t5ru at2t1h \n{at5t6h"a} 6a1tu
+atz1w \n{a1t"a} \n{a1t"u} au1a au6bre auch3a au1e aue4l 5aufent
+\n{3auff"u} 3aufga 1aufn auf1t 3auftr 1aufw 3auge. au4kle aule8s 6aum
+au8mar aum5p 1ausb 3ausd 1ausf 1ausg au8sin
+% 3auss
+au4sta 1ausw 1ausz
+aut5eng au1th 1auto au\3e8 \c{au\9e8} a1v ave5r6a aver6i a1w a6wes a1x
+a2xia a6xio a1ya a1z azi5er. 8a\3 \c{8a\9} 1ba 8ba8del ba1la ba1na
+ban6k5r ba5ot bardi6n ba1ro basten6 bau3sp 2b1b bb6le b2bli 2b1c 2b1d
+1be be1a be8at. be1ch 8becht 8becke. be5el be1en bee8rei be5eta bef2
+8beff be1g2 \n{beh"o8} bei1s 6b5eisen bei3tr b8el bel8o belu3t be3nac
+bend6o be6ners be6nerw be4nor ben4se6 bens5el \n{be1n"a} \n{be1n"u}
+be1o2 b8er. be1ra be8rac ber8gab. ber1r \n{be1r"u} bes8c bes5erh
+bes2p be5tha bet5sc be1un be1ur 8bex be6zwec 2b1f8
+% bfe6st5e
+2b1g2
+bga2s5 bge1 2b1h bhole6 1bi bi1bl b6ie bi1el bi1la \n{bil"a5} bi1na
+bi4nok
+% bi5str
+bi6stu bi5tr bit4t5r b1j 2b1k2 \n{bk"u6} bl8 b6la.
+6b1lad 6blag 8blam 1blat b8latt 3blau. b6lav 3ble. b1leb b1led
+8b1leg 8b1leh 8bleid 8bleih 6b3lein
+% blei3s
+ble4m3o 4blich b4lind
+8bling b2lio 5blit b4litz b1loh 8b1los 1blu 5blum 2blun blut3a blut5sc
+\n{3bl"a} \n{bl"as5c} \n{5bl"o} \n{3bl"u} \n{bl"u8sc} 2b1m 2b1n 1bo
+bo1ch bo5d6s boe5 8boff 8bonk bo1ra b1ort 2b1p2 b1q 1br brail6 brast8
+bre4a b5red 8bref 8b5riem b6riga bro1s b1rup b2ruz \n{8br"oh}
+\n{br"os5c} 8bs b1sa b8sang b2s1ar b1sc bs3erl bs3erz b8sof b1s2p
+bst1h b3stru \n{b5st"a} b6sun 2b1t b2t1h 1bu bu1ie bul6k b8ure bu6sin
+6b1v 2b1w 1by1 by6te. 8b1z
+% bzi1s % ueberfluessig ?
+\n{1b"a} \n{b5"a6s5} \n{1b"u}
+\n{b6"u5bere} \n{b"uge6} \n{b"ugel5e} \n{b"ur6sc} 1ca cag6 ca5la ca6re
+ca5y c1c 1ce celi4c celich5 ce1ro c8h 2ch. 1chae ch1ah ch3akt cha6mer
+8chanz 5chara 3chari 5chato 6chb 1chef 6chei ch3eil ch3eis 6cherkl
+6chf 4chh 5chiad 5chias 6chins 8chj chl6 5chlor 6ch2m 2chn6 ch8nie
+5cho. 8chob choi8d 6chp ch3ren ch6res \n{ch3r"u} 2chs 2cht cht5ha
+cht3hi 5chthon ch6tin 6chuh chu4la 6ch3unt chut6t 8chw 1ci ci5tr c2k
+2ck. ck1ei 4ckh ck3l ck3n ck5o8f ck1r 2cks ck5stra ck6s5u c2l 1c8o
+con6ne 8corb cos6t c3q 1c6r 8c1t 1cu 1cy \n{5c"a1} \n{c"o5} 1da.
+8daas 2dabg 8dabr 6dabt 6dabw 1dac da2gr 6d5alk 8d5amt dan6ce.
+dani5er dan8ker 2danl danla6 6dans 8danzi 6danzu d1ap da2r1a8 2d1arb
+d3arc dar6men 4d3art 8darz 1dat 8datm 2d1auf 2d1aus 2d1b 2d1c 2d1d
+d5de d3d2h \n{dd"amme8} 1de 2deal de5an de3cha de1e defe6 6deff 2d1ehr
+5d4eic de5isc de8lar del6s5e del6spr de4mag de8mun de8nep dene6r
+8denge. 8dengen de5o6d 2deol de5ram 8derdb der5ein de1ro der1r d8ers
+der5um de4s3am de4s3an de4sau de6sil de4sin de8sor de4spr de2su 8deul
+de5us. 2d1f df2l 2d1g 2d1h 1di dia5c di5ara dice5 di3chr di5ena di1gn
+di1la dil8s di1na 8dind 6dinf 4d3inh 2d1ins di5o6d di3p4t di8sen dis1p
+di5s8per di6s5to
+dis3tr % dis5tra
+di8tan di8tin d1j 6dje 2dju 2d1k 2d1l 2d1m
+2d1n6 dni6 dnje6 1do 6d5obe do6berf 6d5ony do3ran 6dord 2d1org dor4t3h
+% do6ste
+6doth dott8e 2d1p d5q dr4 1drah 8drak d5rand 6dre. 4drech
+d6reck 4d3reg 8d3reic d5reife 8drem 8d1ren 2drer 8dres. 6d5rh 1dria
+d1ric 8drind droi6 dro5x 1dru 8drut \n{dr"os5c} \n{1dr"u} \n{dr"u5b}
+\n{dr"u8sc} 2ds d1sa d6san dsat6 d1sc 5d6scha. 5dschik dse8e d8serg
+8dsl d1sp d4spak ds2po \n{d8sp"a} d1st \n{d1s"u} 2dt d1ta d1te d1ti
+d1to dt1s6 d1tu \n{d5t"a} 1du du5als du1b6 du1e duf4t3r 4d3uh du5ie
+8duml 8dumw 2d1und du8ni 6d5unt dur2c durch3 6durl 6dursa 8durt
+dus1t % du1s
+du8schr 2d1v 2d1w dwa8l 2d1z \n{1d"a} \n{6d"ah} \n{8d"and} \n{d"a6r}
+\n{d"o8bl} \n{d5"ol} \n{d"or6fl} \n{d"o8sc} \n{d5"o4st}
+% \n{d"os3te}
+\n{1d"u} ea4ben e1ac e1ah e1akt e1al. e5alf e1alg e5a8lin e1alk e1all
+e5alp e1alt e5alw e1am e1and ea6nim e1ar. e5arf e1ark e5arm e3art
+e5at. e6ate e6a5t6l e8ats e5att e6au. e1aus e1b e6b5am ebens5e
+eb4lie eb4ser eb4s3in e1che e8cherz e1chi ech3m 8ech3n ech1r ech8send
+ech4su e1chu eck5an e5cl e1d ee5a ee3e ee5g e1ei ee5isc eei4s3t
+ee6lend e1ell \n{ee5l"o} e1erd ee3r4e ee8reng eere6s5 \n{ee5r"a}
+ee6tat e1ex e1f e6fau e8fe8b 3effek ef3rom ege6ra eglo6si 1egy e1ha
+e6h5ach eh5ans e6hap eh5auf e1he e1hi ehl3a eh1le ehl5ein eh1mu ehn5ec
+e1ho ehr1a eh1re ehre6n eh1ri eh1ru ehr5um e1hu eh1w e1hy \n{e1h"a}
+\n{e1h"o} \n{e3h"ut} ei1a eia6s ei6bar eich3a eich5r ei4dar ei6d5ei
+ei8derf ei3d4sc ei1e 8eifen 3eifri 1eign eil1d ei6mab ei8mag ein1a4
+ei8nat ei8nerh ei8ness ei6nete ein1g e8ini ein1k ei6n5od ei8nok ei4nor
+\n{e3ins"a} ei1o e1irr ei5ru ei8sab ei5schn ei6s5ent ei8sol ei4t3al
+eit3ar eit1h ei6thi ei8tho eit8samt ei6t5um e1j 1ekd e1ke e1ki e1k2l
+e1kn ekni4 e1la e2l1al 6elan e6lanf e8lanl e6l5ans el3arb el3arm
+e6l3art 5e6lasti e6lauge elbst5a e1le 6elef ele6h e6l5ehe e8leif
+e6l5einh 1elek e8lel 3eleme e6lemen e6lente el5epi e4l3err e6l5ersc
+elf2l elg2 e6l5ins ell8er 4e1lo e4l3ofe el8soh el8tent 5eltern e1lu
+elut2 \n{e1l"a} \n{e1l"u} em8dei em8meis 4emo emo5s 1emp1f 1empt 1emto
+e1mu emurk4 emurks5 \n{e1m"a} en5a6ben en5achs en5ack e1nad en5af
+en5all en3alt en1am en3an. en3ant en3anz en1a6p en1ar en1a6s 6e1nat
+en3auf en3aus en2ce enda6l end5erf end5erg en8dess 4ene. en5eck
+e8neff e6n5ehr e6n5eim en3eis 6enem. 6enen e4nent 4ener. e8nerd
+e6n3erf e4nerg 5energi e6n5erla en5ers e6nerst en5erw 6enes e6n5ess
+e2nex en3glo 2eni enni6s5 ennos4 enns8 e1no e6nober eno8f en5opf
+e4n3ord en8sers ens8kl en1sp ens6por en5t6ag enta5go en8terbu en6tid
+3entla ent5ric 5entwic 5entwu 1entz enu5i e3ny en8zan \n{en1"of}
+\n{e1n"os} \n{e1n"ug} eo1c e5o6fe e5okk e1on. e3onf e5onk e5onl e5onr
+e5opf e5ops e5or. e1ord e1org eo5r6h eo1t e1pa e8pee e6p5e6g ep5ent
+e1p2f e1pi 5epid e6pidem e1pl 5epos e6pos. ep4p3a e1pr \n{e1p"a} e1q
+e1ra. er5aal 8eraba e5rabel er5a6ben e5rabi er3abs er3ach era5e
+era5k6l er3all er3amt e3rand e3rane er3ans e5ranz. e1rap er3arc
+e3rari er3a6si e1rat erat3s er3auf e3raum 3erbse er1c e1re 4e5re.
+er3eck er5egg er5e2h 2erei e3rei. e8reine er5einr 6eren. e4r3enm
+4erer. e6r5erm er5ero er5erst e4r3erz er3ess \n{5erf"ul} er8gan.
+5ergebn er2g5h \n{5erg"anz} \n{5erh"ohu} 2e1ri eri5ak e6r5iat e4r3ind
+e6r5i6n5i6 er5ins e6r5int er5itio er1kl \n{3erkl"a} \n{5erl"os.}
+ermen6s er6nab 3ernst 6e1ro. e1rod er1o2f e1rog 6e3roi ero8ide e3rol
+e1rom e1ron e3rop8 e2r1or e1ros e1rot er5ox ersch4 5erstat er6t5ein
+er2t1h er5t6her 2e1ru eruf4s3 e4r3uhr er3ums e5rus 5erwerb e1ry er5zwa
+er3zwu \n{er"a8m} \n{er5"as} \n{er"o8} \n{e3r"os.} \n{e6r1"u2b} e1sa
+esa8b e8sap e6s5a6v e1sc esch4l ese1a es5ebe eserve5 e8sh es5ill
+es3int es4kop e2sl eso8b e1sp espei6s5 es2po es2pu 5essenz e6stabs
+e6staf e6st5ak est3ar e8stob e1str est5res es3ur e2sz \n{e1s"u} e1ta
+et8ag etari5e eta8ta e1te eten6te et5hal e5thel e1ti 1etn e1to e1tr
+et3rec e8tscha et8se et6tei et2th et2t1r e1tu etu1s et8zent et8zw
+\n{e1t"a} \n{e1t"o} \n{e1t"u} eu1a2 eu1e eue8rei eu5fe euin5 euk2
+e1um. eu6nio e5unter eu1o6 eu5p 3europ eu1sp eu5str eu8zo e1v eval6s
+eve5r6en ever4i e1w e2wig ex1or 1exp 1extr ey3er. e1z \n{e1"a2}
+\n{e5"o8} \n{e1"u} e8\3es \c{e8\9es} fa6ch5i fade8 fa6del fa5el.
+fal6lo falt8e fa1na fan4gr 6fanl 6fap far6ba far4bl far6r5a 2f1art
+fa1sc fau8str fa3y 2f1b2 6f1c 2f1d 1fe 2f1eck fe6dr feh6lei f6eim
+8feins f5eis fel5en 8feltern 8femp fe5rant 4ferd. ferri8 fe8stof
+fe6str fe6stum fe8tag fet6ta fex1 2ff f1fa f6f5arm f5fe ffe5in ffe6la
+ffe8ler ff1f f1fla ff3lei ff4lie ff8sa ff6s5ta 2f1g2 fgewen6 4f1h 1fi
+fid4 fi3ds fieb4 fi1la fi8lei fil4m5a f8in. fi1na 8finf fi8scho fi6u
+6f1j 2f1k2 f8lanz fl8e 4f3lein 8flib 4fling f2lix 6f3lon 5flop 1flor
+\n{5f8l"ac} \n{3fl"ot} 2f1m 2f1n 1fo foh1 f2on fo6na 2f1op fo5ra
+for8mei for8str for8th for6t5r fo5ru 6f5otte 2f1p8 f1q fr6 f5ram
+1f8ran f8ra\3 \c{f8ra\9} f8re. frei1 5frei. f3reic f3rest f1rib
+8f1ric 6frig 1fris fro8na \n{fr"as5t} 2fs f1sc f2s1er f5str
+\n{fs3t"at} 2ft f1tak f1te ft5e6h ftere6 ft1h f1ti f5to f1tr ft5rad
+ft1sc ft2so f1tu ftwi3d4 ft1z 1fu 6f5ums 6funf fun4ka fu8\3end
+\c{fu8\9end} 6f1v 2f1w 2f1z \n{1f"a} \n{f"a1c} \n{8f"arm} \n{6f"aug}
+\n{f"a8\3} \n{\c{f"a8\9}} \n{f"ode3} \n{8f"of} \n{3f"or} \n{1f"u}
+\n{f"un4f3u} 1ga ga6bl 6gabw 8gabz g3a4der ga8ho ga5isc 4gak ga1la
+6g5amt ga1na gan5erb gan6g5a ga5nj 6ganl 8gansc 6garb 2g1arc 2g1arm
+ga5ro 6g3arti ga8sa ga8sc ga6stre 2g1atm 6g5auf gau5fr g5aus 2g1b g5c
+6gd g1da 1ge ge1a2 ge6an ge8at. ge1e2 ge6es gef2 8geff ge1g2l ge1im
+4g3eise geist5r gel8bra gelt8s \n{ge5l"o} ge8nin gen3k 6g5entf
+\n{ge3n"a} ge1or ge1ra ge6rab ger8au \n{8gerh"o} ger8ins ge1ro 6g5erz.
+\n{ge1r"a} \n{ge1r"u} ge1s ges2p
+ge2s7te. ge2s7ten ge2s7ter ge2s7tik
+ge5unt 4g3ex3 2g1f8 2g1g g1ha 6g1hei
+5ghel. g5henn 6g1hi g1ho 1ghr \n{g1h"o} 1gi gi5la gi8me. gi1na
+4g3ins
+gis1tr % gi3str % lat. Trennregeln ?
+g1j 2g1k 8gl. 1glad g5lag glan4z3 1glas 6glass 5glaub
+g3lauf 1gle. g5leb 3gleic g3lein 5gleis 1glem 2gler 8g3leu gli8a
+g2lie 3glied 1g2lik 1g2lim g6lio 1gloa 5glom 1glon 1glop g1los g4loss
+g5luf 1g2ly \n{1gl"u} 2g1m gn8 6gn. 1gna 8gnach 2gnah g1nas g8neu
+g2nie g3nis 1gno 8gnot 1go goe1 8gof 2gog 5gogr 6g5oh goni5e 6gonist
+go1ra 8gord 2g1p2 g1q 1gr4 g5rahm gra8m gra4s3t 6g1rec gre6ge 4g3reic
+g5reit 8grenn gri4e g5riem 5grif 2grig g5ring 6groh 2grot gro6\3
+\c{gro6\9} 4grut 2gs gs1ab g5sah gs1ak gs1an gs8and gs1ar gs1au g1sc
+gs1ef g5seil gs5ein g2s1er gs1in g2s1o gso2r gs1pr g2s1u 2g1t g3te
+g2t1h 1gu gu5as gu2e 2gue. 6gued 4g3uh 8gums 6g5unt
+% gu1s
+gut3h gu2tu
+4g1v 2g1w gy1n g1z \n{1g"a} \n{8g"a8m} \n{6g"arm} \n{1g"o} \n{1g"u}
+\n{6g"ub} 1haa hab8r ha8del hade4n 8hae ha5el. haf6tr 2hal. ha1la
+hal4b5a 6hale 8han. ha1na han6dr han6ge. 2hani h5anth 6hanz 6harb
+h3arbe h3arme ha5ro ha2t1h h1atm hau6san ha8\3 \c{ha8\9} h1b2 h1c h1d
+he2bl he3cho h3echt he5d6s 5heft h5e6he. hei8ds h1eif 2hein he3ism
+he5ist. heit8s3 hek6ta hel8lau 8helt he6mer 1hemm 6h1emp hen5end
+hen5klo hen6tri he2nu 8heo he8q her3ab he5rak her3an 4herap her3au
+h3erbi he1ro he8ro8b he4r3um her6z5er he4spe he1st heta6 het5am he5th
+heu3sc he1xa hey5e h1f2 h1g hgol8 h1h h1iat hie6r5i hi5kt hil1a2
+hil4fr hi5nak hin4ta hi2nu hi5ob hirn5e hir6ner hi1sp hi1th hi5tr
+5hitz h1j h6jo h1k2 hlabb4 hla4ga hla6gr h5lai hl8am h1las h1la\3
+\c{h1la\9} hl1c h1led h3lein h5ler. h2lif h2lim h8linf hl5int h2lip
+h2lit h4lor h3lose \n{h1l"as} hme5e h2nee h2nei hn3eig h2nel hne8n
+hne4p3f hn8erz h6netz h2nip h2nit h1nol hn5sp h2nuc h2nud h2nul hoch1
+1hoh hoh8lei 2hoi ho4l3ar 1holz h2on ho1ra 6horg 5horn. ho3sl hos1p
+ho4spi h1p hpi6 h1q 6hr h1rai h8rank h5raum hr1c hrcre8 h1red h3reg
+h8rei. h4r3erb h8rert hrg2 h1ric hr5ins h2rom hr6t5erl hr2t1h hr6t5ra
+hr8tri h6rum hr1z hs3ach h6s5amt h1sc h6s5ec h6s5erl hs8erle h4sob
+h1sp h8spa\3 \c{h8spa\9} h8spel hs6po h4spun h1str h4s3tum hs3und
+\n{h1s"u} h5ta. h5tab ht3ac ht1ak ht3ang h5tanz ht1ar ht1at h5taub
+h1te h2t1ec ht3eff ht3ehe h4t3eif h8teim h4t3ein ht3eis h6temp h8tentf
+hte8ren \n{h6terf"u} h8tergr h4t3erh h6t5ersc h8terst h8tese h8tess
+h2t1eu h4t3ex ht1he ht5hu h1ti ht5rak hts3ah ht1sc ht6sex ht8sk ht8so
+h1tu htz8 \n{h5t"um} hub5l hu6b5r huh1l h5uhr. huld5a6 hu8lent
+\n{hu8l"a} h5up. h1v h5weib h3weis h1z \n{h"a8kl} \n{h"al8s}
+\n{h"ama8tu8} \n{h"a8sche.} \n{h"at1s} \n{h"au4s3c} \n{2h"o.}
+\n{2h"oe} \n{8h"oi} \n{h"o6s} \n{h"os5c} \n{h"uhne6} \n{h"ul4s3t}
+\n{h"utte8re} i5adn i1af i5ak. i1al. i1al1a i1alb i1ald i5alei i1alf
+i1alg i3alh i1alk i1all i1alp i1alr i1als i1alt i1alv i5alw i3alz
+i1an. ia5na i3and ian8e ia8ne8b i1ang i3ank i5ann i1ant i1anz i6apo
+i1ar. ia6rab i5arr i1as. i1asm i1ass i5ast. i1at. i5ats i1au i5azz
+i6b5eig i6b5eis ib2le i4blis i6brig i6b5unt \n{i6b"ub} i1che ich5ei
+i6cherb i1chi ich5ins ich1l ich3m ich1n i1cho icht5an icht3r i1chu
+ich1w ick6s5te ic5l i1d id3arm 3ideal ide8na 3ideol \n{ide5r"o} i6diot
+id5rec id1t ie1a ie6b5ar iebe4s3 ie2bl ieb1r ie8bra ie4bre \n{ie8b"a}
+ie2dr ie1e8 ie6f5ad ief5f ie2f1l ie4fro ief1t i1ei ie4l3ec ie8lei
+ie4lek i3ell i1en. i1end ien6e i3enf i5enn ien6ne. i1enp i1enr
+i5ensa ien8stal i5env i1enz ie5o ier3a4b ie4rap i2ere ie4rec ie6r5ein
+ie6r5eis ier8er i3ern. ie8rum ie8rund ie6s5che ie6tau ie8tert ie5the
+ie6t5ri i1ett ie5un iex5 2if i1fa if5ang i6fau if1fr if5lac i5f6lie
+i1fre ift5a if6t5r ig3art 2ige i8gess ig5he i5gla ig2ni i5go ig3rot
+ig3s2p i1ha i8ham i8hans i1he i1hi ih1n ih1r i1hu i8hum ih1w 8i1i ii2s
+ii2t i1j i1k i6kak i8kerz i6kes ik4ler i6k5unt 2il i5lac i1lag il3ans
+i5las i1lau il6auf i1le ile8h i8lel il2fl il3ipp il6l5enn i1lo ilt8e
+i1lu \n{i1l"a} i8mart imb2 i8mele i8mid imme6l5a i1mu \n{i1m"a}
+\n{i5m"o} ina5he i1nat in1au inau8s 8ind. in4d3an 5index ind2r 3indus
+i5nec i2n1ei i8nerw 3infek 1info 5ingeni ing5s6o 5inhab ini5er. 5inj
+\n{in8k"at} in8nan i1no inoi8d in3o4ku in5sau in1sp 5inspe 5instit
+5instru ins4ze 5intere 5interv in3the in5t2r i5ny \n{in"a2} \n{i1n"ar}
+\n{in1"as} \n{in"o8} \n{in5"od} \n{i1n"os} 2io io1a8 io1c iode4 io2di
+ioi8 i1ol. i1om. i1on. i5onb ion2s1 i1ont i5ops i5o8pt i1or.
+i3oral io3rat i5orc i1os. i1ot. i1o8x 2ip i1pa i1pi i1p2l i1pr i1q
+i1ra ir6bl i1re i1ri ir8me8d ir2m1o2 ir8nak i1ro ir5rho ir6schl
+ir6sch5r i5rus i5ry \n{i5r"a} i1sa i8samt i6sar i2s1au i8scheh i8schei
+isch5m isch3r \n{isch"a8} is8ele ise3ra i4s3erh is3err isi6de i8sind
+is4kop ison5e is6por i8s5tum i5sty \n{i5s"o} i1ta it5ab. i2t1a2m
+i8tax i1te i8tersc i1thi i1tho i5thr \n{it8h"a} i1ti i8ti8d iti6kl
+itmen4 i1to i8tof it3ran it3rau i1tri itri5o it1sc it2se it5spa it8tru
+i1tu it6z5erg it6z1w \n{i1t"a} \n{it"a6r5e} \n{it"at2} \n{it"ats5}
+\n{i1t"u} i1u iu6r 2i1v i6vad iva8tin i8vei i6v5ene i8verh i2vob i8vur
+i1w iwi2 i5xa i1xe i1z ize8n i8zir i6z5w \n{i"a8m} \n{i1"a6r}
+\n{i5"at.} \n{i5"av} \n{i1"o8} \n{i"u8} i6\35ers \c{i6\95ers} ja5la
+je2t3r 6jm 5jo jo5as jo1ra jou6l ju5cha jugen4 jugend5 jung5s6
+% ju1s
+\n{3j"a} 1ka 8kachs 8kakz ka1la kal5d kam5t ka1na 2kanl 8kapf ka6pl
+ka5r6a 6k3arbe ka1ro kar6p5f 4k3arti 8karz \n{ka1r"a} kasi5e ka6teb
+kat8ta kauf6s kau3t2 2k1b 2k1c 4k1d kehr6s kehrs5a 8keic 2k1eig 6k5ein
+6k5eis ke6lar ke8leis ke8lo 8kemp k5ente. k3entf 8k5ents 6kentz ke1ra
+k5erlau 2k1f8 2k1g 2k1h ki5fl 8kik king6s5 6kinh ki5os ki5sp ki5th
+\n{8ki8"o} 2k1k2 kl8 1kla 8klac k5lager kle4br k3leib 3kleid kle5isc
+4k3leit k3lek 6k5ler. 5klet 2klic 8klig k2lim k2lin 5klip 5klop k3lor
+\n{1kl"a} 2k1m kmani5e kn8 6kner k2ni \n{kn"a8} 1k2o ko1a2 ko6de.
+ko1i koi8t ko6min ko1op ko1or ko6pht ko3ra kor6d5er ko5ru ko5t6sc k3ou
+3kow 6k5ox 2k1p2 k1q 1kr8 4k3rad 2k1rec 4k3reic kre5ie 2krib 6krig
+2krip 6kroba 2ks k1sa k6sab ksal8s k8samt k6san k1sc k2s1ex k5spat
+k5spe k8spil ks6por k1spr kst8 k2s1uf 2k1t kta8l kt5a6re k8tein kte8re
+k2t1h k8tinf kt3rec kt1s 1ku ku1ch kuck8 k3uhr ku5ie kum2s1 kunfts5
+kun2s kunst3 ku8rau ku4ro kurz1
+% ku1st
+4kusti ku1ta ku8\3 \c{ku8\9}
+6k1v 2k1w ky5n 2k1z \n{1k"a} \n{k"a4m} \n{4k3"ami} \n{k"ase5} \n{1k"o}
+\n{k"o1c} \n{k"o1s} \n{1k"u} \n{k"u1c} \n{k"ur6sc}
+% \n{k"u1s}
+1la.
+8labf 8labh lab2r 2l1abs lach3r la8dr 5ladu 8ladv 6laff laf5t la2gn
+5laken 8lamb la6mer 5lampe. 2l1amt la1na 1land lan4d3a lan4d3r lan4gr
+8lanme 6lann 8lanw \n{6lan"a} 8lappa lap8pl lap6pr l8ar. la5ra lar4af
+la8rag la8ran la6r5a6s l3arbe la8rei 6larm. la8sa la1sc la8sta lat8i
+6l5atm 4lauss 4lauto 1law 2lb l8bab l8bauf l8bede l4b3ins l5blo
+lbst5an lbst3e 8lc l1che l8chert l1chi lch3m l5cho lch5w 6ld l4d3ei
+ld1re \n{l6d"ub} le2bl le8bre lecht6s5 led2r 6leff le4gas 1lehr lei6br
+le8inf 8leinn 5leistu 4lektr le6l5ers lemo2 8lemp l8en. 8lends
+6lendun le8nend len8erw 6l5ents 4l3entw 4lentz 8lenzy 8leoz 6lepi
+le6pip 8lepo 1ler l6er. 8lerbs 6l5erde le8reis le8rend le4r3er 4l3erg
+l8ergr 6lerkl 6l5erzie \n{8ler"o} 8lesel lesi5e le3sko le3tha let1s
+5leuc 4leuro leu4s3t le5xe 6lexp l1f 2l1g lgend8 l8gh lglie3 lglied6
+6l1h 1li li1ar li1as 2lick li8dr li1en lien6n li8ers li8ert 2lie\3
+\c{2lie\9} 3lig li8ga8b li1g6n li1l8a 8limb li1na 4l3indu lings5
+4l3inh 6linj link4s3 4linkt 2lint 8linv
+% lion5s6t
+4lipp 5lipt 4lisam
+livi5e 6l1j 6l1k l8keim l8kj lk2l lko8f lkor8 lk2sa lk2se 6ll l1la
+ll3a4be l8labt ll8anl ll1b ll1c ll1d6 l1le l4l3eim l6l5eise ller3a
+l4leti l5lip l1lo ll3ort ll5ov ll6spr llte8 l1lu ll3urg \n{l1l"a}
+\n{l5l"u} \n{l6l"ub} 2l1m l6m5o6d 6ln l1na l1no 8lobl lo6br 3loch.
+l5o4fen 5loge. 5lohn 4l3ohr 1lok l2on 4l3o4per lo1ra 2l1ord 6lorg
+4lort lo1ru 1los. lo8sei 3losig lo6ve lowi5 6l1p lp2f l8pho l8pn
+lp4s3te l2pt l1q 8l1r 2ls l1sa l6sarm l1sc l8sec l6s5erg l4s3ers l8sh
+l5s6la l1sp ls4por ls2pu l1str l8suni \n{l1s"u} 2l1t lt5amp l4t3ein
+l5ten l6t5eng l6t5erp l4t3hei lt3her l2t1ho l6t5i6b lti1l \n{l8tr"o}
+lt1sc lt6ser lt4s3o lt5ums lu8br lu2dr lu1en8 8lu8fe luft3a luf8tr
+lu6g5r 2luh l1uhr lu5it 5luk 2l1umf 2l1umw 1lun 6l5u6nio 4l3unte lu5ol
+4lurg 6lurs l3urt lu4sto
+lus1tr % lu3str % lat. Trennregeln ?
+lu6st5re lu8su lu6tal lu6t5e6g lu8terg
+lu3the lu6t5or lu2t1r lu6\35 \c{lu6\95} l1v lve5r6u 2l1w 1ly lya6
+6lymp ly1no l8zess l8zo8f l3zwei lz5wu \n{3l"and} \n{l"a5on}
+\n{l"a6sc} \n{l"at1s} \n{5l"auf} \n{2l"aug} \n{l"au6s5c} \n{l"a5v}
+\n{l1"ol} \n{1l"os} \n{l"o1\36t} \n{\c{l"o1\96t}} \n{6l1"ube} 1ma
+8mabg ma5chan mad2 ma5el 4magg mag8n ma1la ma8lau mal5d 8malde mali5e
+malu8 ma8lut 2m1amp 3man mand2 man3ds 8mangr mani5o 8m5anst 6mappa
+4m3arbe mar8kr ma1r4o mar8schm 3mas ma1sc \n{ma1t"o} 4m5auf ma5yo 2m1b
+mb6r 2m1c 2m1d \n{md6s"a} 1me me1ch me5isc 5meld mel8sa 8memp me5nal
+men4dr men8schl men8schw 8mentsp me1ra mer4gl me1ro 3mes me6s5ei me1th
+me8\3 \c{me8\9} 2m1f6 2m1g 2m1h 1mi mi1a mi6ale mi1la 2m1imm mi1na
+\n{mi5n"u} mi4s3an mit1h mi5t6ra 3mitt mitta8 mi6\35 \c{mi6\95} 6mj
+2m1k8 2m1l 2m1m m6mad m6m5ak m8menth m8mentw mme6ra m2mn mm5sp mm5ums
+mmut5s \n{m8m"an} m1n8 m5ni 1mo mo5ar mo4dr 8mof mo8gal mo4kla mol5d
+m2on mon8do mo4n3od
+mon2s1tr % lat. Trennregeln ?
+mont8a 6m5ony mopa6 mo1ra mor8d5a mo1sc mo1sp 5mot
+moy5 2mp m1pa mpfa6 mpf3l mphe6 m1pi mpin6 m1pl mp2li m2plu mpo8ste
+m1pr \n{mpr"a5} mp8th mput6 mpu5ts \n{m1p"o} 8m1q 2m1r 2ms ms5au m1sc
+msch4l ms6po m3spri m1str 2m1t mt1ar m8tein m2t1h mt6se \n{mt8s"a}
+mu5e 6m5uh mumi1 1mun mun6dr muse5e mu1ta 2m1v mvol2 mvoll3 2m1w 1my
+2m1z \n{m"a6kl} \n{1m"an} \n{m"a1s} \n{m"a5tr} \n{m"au4s3c} \n{3m"a\3}
+\n{\c{3m"a\9}} \n{m"ob2} \n{6m"ol} \n{1m"u} \n{5m"un} \n{3m"ut} 1na.
+n5ab. 8nabn n1abs n1abz \n{na6b"a} na2c nach3e 3nacht 1nae na5el
+n1afr 1nag 1n2ah na8ha na8ho 1nai 6nair na4kol n1akt nal1a 8naly 1nama
+na4mer na1mn n1amp 8n1amt 5nanc nan6ce n1and n6and. 2n1ang 1nani
+1nann n1ans 8nanw 5napf. 1n2ar. na2ra 2n1arc n8ard 1nari n8ark
+6n1arm 5n6ars 2n1art n8arv 6natm nat6s5e 1naue 4nauf n3aug 5naui n5auk
+na5um 6nausb 6nauto 1nav 2nax 3naz 1na\3 \c{1na\9} n1b2 nbau5s n1c
+nche5e nch5m 2n1d nda8d n2d1ak nd5ans n2d1ei nde8lac ndel6sa n8derhi
+nde4se nde8stal n2dj ndnis5 n6d5or6t nd3rec nd3rot nd8samt nd6sau
+ndt1h n8dumd 1ne ne5as ne2bl 6n5ebn 2nec 5neei ne5en ne1g4l 2negy
+4n1ein 8neis 4n3e4lem 8nemb 2n1emp nen1a 6n5energ nen3k 8nentb
+4n3en3th 8nentl 8n5entn 8n5ents ne1ra ne5r8al ne8ras 8nerbi 6n5erde.
+nere5i6d nerfor6 \n{6n5erh"o} \n{8nerl"o} 2n1err n8ers. 6n5ertra
+2n1erz nesi3e net1h neu4ra neu5sc 8neu\3 \c{8neu\9} n1f nf5f nf2l
+nflei8 nf5lin nft8st n8g5ac ng5d ng8en nge8ram ngg2 ng1h n6glic ng3rip
+ng8ru ng2se4 ng2si n2g1um n1gy \n{n8g"al} n1h nhe6r5e 1ni ni1bl
+\n{ni5ch"a} ni8dee n6ie ni1en nie6s5te niet5h ni8etn 4n3i6gel n6ik
+ni1la 2n1imp ni5na 2n1ind 8ninf 6n5inh ni8nit 6n5inn 2n1ins 4n1int
+n6is
+nis1tr % ni3str % lat. Trennregeln ?
+ni1th ni1tr n1j n6ji n8kad nk5ans n1ke n8kerla n1ki nk5inh
+\n{n5kl"o} n1k2n n8k5not nk3rot \n{n8kr"u} nk5spo nk6t5r n8kuh
+\n{n6k"ub} n5l6 nli4mi n1m nmen4s n1na n8nerg nni5o n1no nn4t3ak nnt1h
+nnu1e n1ny \n{n1n"a} \n{n1n"o} \n{n1n"u} no5a no4b3la 4n3obs 2nobt
+noche8 no6die no4dis no8ia no5isc 6n5o6leu no4mal noni6er 2n1onk n1ony
+4n3o4per 6nopf 6nopti no3ra no4ram nor6da 4n1org 2n1ort n6os no1st
+8nost. no8tan no8ter noty6pe 6n5ox n1p2 n1q n1r \n{nr"os3} 6ns n1sac
+ns3ang n1sc n8self n8s5erf n8serg n6serk ns5erw n8sint n1s2pe n1spr
+n6s5tat.
+% n5s6te.
+n6stob n1str n1ta n4t3a4go nt5anh nt3ark nt3art
+n1te nt3eis nte5n6ar nte8nei nter3a nte6rei nt1ha nt6har n3ther nt5hie
+n3thus n1ti nti1c n8tinh nti1t ntlo6b ntmen8 n1to nt3o4ti n1tr ntra5f
+ntra5ut nt8rea nt3rec nt8rep n4t3rin nt8rop n4t3rot \n{n4tr"u} nt1s
+nts6an nt2sk n1tu nt1z \n{n1t"a} \n{n1t"o} \n{n8t"ol} \n{n1t"u} 1nu
+nu1a nu5el nu5en 4n1uhr nu5ie 8numl 6n5ums 6n5umw 2n1und 6nuni 6n5unr
+2n1unt 2nup 2nu6r n5uri nu3skr nu5ta n1v 8n1w 1nys n1za n6zab n2z1ar
+n6zaus nzi4ga n8zof n6z5unt n1zw n6zwir \n{1n"ac} \n{5n"ae} \n{5n"ai}
+\n{n8"al} \n{n"a6m} \n{n"a6re} \n{n5"arz} \n{5n"aus} \n{n1"ol}
+\n{1n"ot} \n{n5"oz} \n{5n"u.} \n{6n1"u2b} \n{5n"u\3} \n{\c{5n"u\9}}
+o5ab. oa2l o8ala o1a2m o1an ob1ac obe4ra o6berh 5o4bers o4beru
+obe6ser 1obj o1bl o2bli ob5sk 3obst. ob8sta obst5re ob5sz o1che
+oche8b o8chec o3chi och1l och3m ocho8f o3chro och3to o3chu och1w o1d
+o2d1ag od2dr ode5i ode6n5e od1tr o5e6b o5e6der. oe8du o1ef o1e2l
+o1e2p o1er. o5e8x o1fa of8fan 1offi of8fin of6f5la o5fla o1fr 8o1g
+og2n o1ha o1he o6h5eis o1hi ohl1a oh1le oh4l3er 5ohm. oh2ni o1ho
+oh1re oh1ru o1hu oh1w o1hy \n{o1h"a} o5ia o1id. o8idi oi8dr o5ids
+o5isch. oiset6 o1ism o3ist. o5i6tu o1j o1k ok2l ok3lau \n{o8kl"a}
+1okta o1la old5am old5r o1le ole5in ole1r ole3u ol6gl ol2kl olk4s1
+ol8lak ol8lauf. ol6lel ol8less o1lo
+ol1s ol2ster
+ol6sk o1lu oly1e2 5olym
+o2mab om6an o8mau ombe4 o8merz om5sp o1mu o8munt \n{o1m"a} \n{o1m"o}
+o1na ona8m on1ax on8ent o6n5erb 8oni oni5er. on1k on6n5a6b o1no ono1c
+o4nokt 1ons onts8 \n{o1n"a} oo8f 1oog oo2pe oo2sa o1pa 3o4pera o3pfli
+opf3lo opf3r o1pi o1pl o2pli o5p6n op8pa op6pl o1pr o3p4ter 1opti
+\n{o1p"a} \n{o5p"o} o1q o1ra. o3rad o8radd 1oram o6rang o5ras o8rauf
+or5cha or4d3a4m or8dei or8deu 1ordn or4dos o1re o5re. ore2h o8r5ein
+ore5isc or6enn or8fla or8fli 1orga 5orgel. or2gl o1ri 5o6rient or8nan
+\n{or8n"a} o1ro or1r2h or6t5an or8tau or8tere o1rus o1ry \n{o1r"a}
+\n{or1"u2} o1sa osa3i 6ose o8serk o1sk o6ske o6ski os2kl os2ko os2kr
+osni5e o2s1o2d o3s4per o4stam o6stau o3stra ost3re osu6 o6s5ur o5s6ze
+o1ta ot3auf o6taus o1te o6terw o1th othe5u o2th1r o1ti o1to oto1a
+ot1re o1tri o1tro ot1sc o3tsu ot6t5erg ot2t3h ot2t5r \n{ot8t"o} o1tu
+ou3e ouf1 ou5f6l o5u6gr ou5ie ou6rar ou1t6a o1v o1wa o1we o6wer. o1wi
+owid6 o1wo o5wu o1xe oy5al. oy1e oy1i o5yo o1z oza2r 1o2zea ozo3is
+\n{o"o8} o\35elt \c{o\95elt} o\31t \c{o\91t} 3paa pa6ce 5pad pag2 1pak
+pa1la pa8na8t pani5el pa4nor pan1s2 1pap pap8s pa8rei par8kr paro8n
+par5o6ti part8e 5partei 3partn pas6sep pa4tha 1pau 6paug pau3sc p1b
+8p5c 4p1d 1pe 4peic pe5isc 2pek pen3k pen8to8 p8er pe1ra pere6 per5ea
+per5eb pe4rem 2perr per8ran 3pers 4persi \n{pe3r"u} pe4sta pet2s
+p2f1ec p4fei pf1f pf2l 5pflanz pf8leg pf3lei 2pft pf3ta p1g 1ph 2ph.
+2p1haf 6phb 8phd 6p5heit ph5eme 6phg phi6e 8phk 6phn p5holl pht2
+ph3tha 4ph3the phu6 6phz pi1en pi5err pi1la pi1na 5pinse pioni8e 1pis
+pi1s2k pi1th p1k pl8 5pla p2lau 4plei p3lein 2pler 6p5les 2plig p6lik
+6p5ling p2liz plo8min 6p1m p1n 1p2o 8poh 5pol po8lan poly1 po3ny po1ra
+2porn por4t3h \n{po5r"o} 5poti p1pa p6p5ei ppe6la pp5f p2p1h p1pi pp1l
+ppp6 pp5ren
+pp1s pp2ste
+\n{p5p"o} pr6 3preis 1pres 2p3rig 5prinz 1prob 1prod
+5prog pro8pt pro6t5a prote5i 8pro\3 \c{8pro\9} \n{pr"a3l} \n{1pr"as}
+\n{pr"ate4} \n{1pr"uf} p5schl 2pst 1p2sy p1t p8to8d pt1s 5p6ty 1pu
+pu1b2 2puc pu2dr puf8fr 6p5uh pun8s pu8rei pu5s6h pu1ta p1v p3w 5py
+py5l p1z \n{p"a6der} \n{p5"a6m} \n{p"a8nu} \n{8p"ar} \n{p"at5h}
+\n{p"at1s} qu6 1qui 8rabk ra6bla 3rable ra2br r1abt 6rabz ra4dan ra2dr
+5rafal ra4f3er ra5gla ra2g3n 6raha ral5am 5rald 4ralg ra8lins 2rall
+ral5t 8ramei r3anal r6and ran8der ran4dr 8ranf 6ranga 5rangi ran8gli
+r3angr rans5pa 8ranw r8anz. ra5or 6rapf ra5pl rap6s5er 2r1arb 1rarh
+r1arm ra5ro 2r1art 6r1arz ra8tei ra6t5he 6ratl ra4t3ro r5atta raue4n
+6raus. r5austa rau8tel raut5s ray1 r1b rb5lass r6bler rb4lie rbon6n
+r8brecht \n{rb6s5t"a} r8ces r1che rch1l rch3m rch3re rch3tr rch1w 8rd
+r1da r8dachs r8dap rda5ro rde5ins rdio5 r8dir rd3ost r1dr r8drau 1re.
+re1ak 3reakt re3als re6am. re1as 4reben re6bl rech5a r8edi re3er
+8reff 3refl 2reh 5reha r4ei. reich6s5 8reier 6reign re5imp 4r3eina
+6r3einb 6reing 6r5einn 6reinr 4r3eins r3eint reli3e 8r5elt 6rempf
+2remt ren5a6b ren8gl r3enni 1reno 5rente 4r3enth 8rentl 4r3entw 8rentz
+ren4zw re1on requi5 1rer rer4bl 6rerbs 4r3erd \n{8rerh"o} 8rerkl
+4r3erla \n{8rerl"o} 4r3erns \n{6r5ern"a} rer5o 6r5erreg r5ertr r5erwec
+\n{r5er"o} re2sa re8schm 2ress re5u8ni 6rewo 2r1ex r1f r8ferd rf4lie
+8r1g r8gah rge4bl rge5na rgest4 rg6ne r2gni2 r8gob r4g3ret rg8sel r1h8
+r2hy 5rhyt ri1ar ri5cha rid2g r2ie rieg4s5 ri8ei ri1el ri6ele ri1en
+ri3er. ri5ers. ri6fan ri8fer ri8fr 1r2ig ri8kn ri5la \n{rim"a8}
+ri1na r8inde rin4ga rin6gr 1rinn 6rinner rino1 r8insp 4rinst
+\n{ri1n"a} ri5o6ch ri1o2d ri3o6st 2r1ir r2is ri3sko ri8spr
+% \n{ri8st"u}
+ri5sv r2it 6r5i6tal ri5tr ri6ve. 8r1j 6rk r1ke rkehrs5 r1ki r3klin
+r1k2n rk3str rk4t3an rk6to r6kuh \n{rk"a4s3t} r1l r5li rline5a 6r1m
+r6manl rma4p r4m3aph r8minf r8mob rm5sa 2rn r1na rna8be r5ne rn2ei
+r6neif r6nex r6nh rn1k r1no r6n5oc rn1sp \n{r1n"a} \n{r1n"u} ro6bern
+6robs ro1ch 3rock. ro5de ro1e 4rofe ro8hert 1rohr ro5id ro1in ro5isc
+6rolym r2on 6roog ro6phan r3ort ro1s2p ro5s6w ro4tau ro1tr ro6ts 5rout
+r1p rpe8re rp2f r2ps r2pt r1q 2rr r1ra r1re rrer6
+rr6hos \n{r5rh"o}
+r1ri r1ro rro8f rr8or rror5a r1ru r3ry \n{r1r"a} \n{r1r"o} \n{r1r"u}
+2r1s
+r2ste r2sti % aber: 3ste... s.u.!
+r6sab r4sanf rse6e rse5na r2sh r6ska r6ski rs2kl r8sko r2sl rs2p
+r6stauf r8sterw r8stran rswi3d4 r2sz 2r1t rt3art r8taut r5tei rt5eige
+r8tepe r4t3erh r8terla r4t3hei r5t6hu r4t3int rt5reif rt1sc rt6ser
+rt6s5o rt6s5u rt5und r8turt rube6 ru1en 1r4uf ruf4st ru1ie 2r1umg
+2r1uml 2rums run8der run4d5r 6rundz 6runf 8runs 2r1unt 2r1ur r6us
+ru6sta
+rus1tr % ru3str % lat. Trennregeln ?
+ru6tr 1ruts r1v rven1 rvi2c r1w r1x r1za rz5ac r6z5al
+r8z1ar r8zerd r6z5erf rz8erh rz4t3h r8zum \n{r"a4ste} \n{r"au8sc}
+\n{r1"of} \n{5r"ohr} \n{r"o5le} \n{3r"oll} \n{5r"omis} \n{r1"or}
+\n{r"o2sc} \n{3r"ump} 1sa. 1saa s3a4ben sa2bl 2s1abs 6s1abt 6sabw
+3sack. 6s3a4der 1saf sa1fa 4s1aff sa5fr 1sag 1sai sa1i2k1 4s1akt 1sal
+sa1la 4s3alpi 6salter salz3a 1sam s5anb san2c 1sand s5angeh 6sanl
+2s1ans 6s3antr 8s1anw s1ap s6aph 8sapo sap5p6 s8ar. 2s1arb 3sarg
+s1arm sa5ro 2s1art 6s1arz 1sas 1sat sat8a 2s1atl sa8tom 3s8aue s5auff
+sau5i s6aur 2s1aus 5s6ause 2s1b2 2sca s4ce 8sch. 3scha. 5schade
+3schaf 3schal sch5ame 8schanc 8schb 1sche 6schef 8schex 2schf 2schg
+2schh 1schi 2schk 5schlag 5schlu \n{6schm"a\3} \n{\c{6schm"a\9}}
+6schna\3 \c{6schna\9} 1scho 6schord 6schp 3schri 8schric 8schrig
+8schrou 6schs 2scht sch3ta sch3tr 1schu 8schunt 6schv 2schz \n{5sch"o}
+\n{5sch"u} 2sco scre6 6scu 2s1d 1se se5an se1ap se6ben se5ec see5i6g
+se3erl 8seff se6han se8hi \n{se8h"o} 6s5eid. 2s1eig s8eil 5sein.
+sei5n6e 6s5einh 3s8eit 3sel. se4lar selb4 6s3e4lem se8lerl 2s1emp
+sen3ac se5nec 6s5ents 4sentz s8er. se8reim ser5inn \n{8serm"a}
+8s5erzi \n{6ser"of} se1um 8sexa 6sexp 2s1f2 sfal8ler 2s3g2 sge5b2 s1h
+s8hew 5s6hip 5s4hop 1si 2siat si1b sicht6s 6s5i6dee siege6s5 si1en
+si5err si1f2 si1g2n si6g5r si8kau sik1i si4kin si2kl \n{si8k"u} si1la
+sil6br si1na 2s1inf sin5gh 2s1inh sinne6s5 2s1ins si5ru si5str 4s1j
+s1k2 6sk. 2skau skel6c skelch5 s6kele 1s2ki. 3s4kin. s6kiz s8kj
+6skn 2skow 3skrib 3skrip 2sku \n{8sk"u} s1l s8lal slei3t s4low 2s1m
+s1n 6sna 6snot 1so so1ch 2s1odo so4dor 6s5o4fen solo3 s2on so5of 4sope
+so1ra 2s1ord 4sorga sou5c so3un 4s3ox sp2 8spaa 5spal 1span 2spap
+s2pec s4peis 1spek s6perg 4spers s6pes 2s1pf 8sphi \n{1s2ph"a} 1spi
+spi4e 6s5pig 6spinse 2spis 2spla 2spol 5s6pom 6s5pos 6spoti 1spra
+3s8prec 6spreis 5spring 6sprob 1spru s2pul 1s2pur 6spy \n{5sp"an}
+\n{1sp"u} s1q 2s1r
+% 2s1s2
+% 2s1sa 2s1se 2s1si 2s1so \n{2s1s"a} \n{2s1s"o} \n{2s1s"u} 2s1sch
+2ssa 2sse 2ssi 2sso \n{2ss"a} \n{2ss"o} \n{2ss"u} 2s1sch
+sse8nu ssini6s ssoi6r 2st.
+1sta 4stafe 2stag
+sta3la 6stale
+4s2talg
+8stalk 8stamt 6st5anf 4stans 6stanw 6starb sta4te
+6staus 2stb 6stc 6std
+s1te % 1ste
+4steil
+% 8stemb % ueberfluessig ?
+6steppi
+% 8stese % ueberfluessig ?
+8stesse 6stf 2stg 2sth st1ha st3hei s8t1hi st1ho st5hu
+s1ti % 1sti
+s2ti4el % sti4el
+4s2tigm
+% sti3na
+6s2tind % 6stind
+4s2tinf
+s2ti8r
+2stk 2stl 2stm
+1sto 6stoll. 4st3ope
+6stopf. 6stord 6stp
+% 5stra. % ueberfluessig ?
+4strai
+s3tral % 3s4tral % lat. Trennregeln ?
+6s5traum 3stra\3
+\c{3stra\9} 3strec 6s3tref 8streib 5streif 6streno 6stres 6strev
+% 5s6tria % lat. Trennregeln ?
+2st5rig
+% 5strik % ueberfluessig ?
+8s2t1ris % 8strisi
+% 3s4troa % ueberfluessig ?
+s8troma st5rose 4struf 3strum
+\n{6str"ag} 2st1s6 2stt
+1stu stu5a 4stuc 2stue 8stun. 2stv 2stw s2tyl
+6stz \n{1st"a} \n{8st"ag}
+\n{1st"o}
+\n{1st"u} \n{8st"uch} \n{4st"ur.}
+1su su2b1 3suc su1e su2fe su8mar 6sumfa 8sumk 2s1unt sup1p2 6s5u6ran
+6surte 2s1v 2s1w 1sy 8syl. sy5la syn1 sy2na syne4 s1z s4zend 5s6zene.
+8szu \n{1s"a} \n{6s5"and} \n{6s"augi} \n{6s"au\3} \n{\c{6s"au\9}}
+\n{5s"om} \n{2s1"u2b} \n{1s"uc} \n{s"u8di} \n{1s"un} \n{5s"u\3}
+\n{\c{5s"u\9}} taats3 4tab. taba6k ta8ban tab2l ta6bre 4tabs t3absc
+8tabz 6t3acht ta6der 6tadr tad6s tad2t 1tafe4 1tag ta6ga6 ta8gei
+tage4s tag6s5t tah8 tahl3 tai6ne. ta5ir. tak8ta tal3au 1tale ta8leng
+tal5ert 6t5a6mer 6tamp tampe6 2t1amt tan5d6a tan8dr tands5a tani5e
+6tanl 2tanr t3ans 8t5antr tanu6 t5anw 8tanwa tan8zw ta8rau 6tarbe
+1tari 2tark 2t1arm ta1ro 2tart t3arti 6tarz ta1sc ta6sien ta8stem
+ta8sto t5aufb 4taufn 8taus. 5tause 8tausf 6tausg t5ausl 2t1b2 2t1c
+t6chu 2t1d te2am tea4s te8ben 5techn 4teff te4g3re te6hau 2tehe te4hel
+2t1ehr te5id. teig5l 6teign tei8gr 1teil 4teinh t5einhe 4teis t5eisen
+8teiw te8lam te4lar 4telek 8telem te6man te6n5ag ten8erw ten5k tens4p
+ten8tro 4t3entw 8tentz te6pli 5teppi ter5a6b te3ral ter5au 8terbar
+t5erbe. 6terben 8terbs 4t3erbt t5erde. ter5ebe ter5ein te8rers terf4
+\n{8terh"o} \n{6terkl"a} ter8nor ter6re. t8erscha t5e6sel te8stau
+t3euro te1xa tex3e 8texp tex6ta 2t1f2 2t1g2 2th. th6a 5tha. 2thaa
+6t1hab 6t5haf t5hah 8thak 3thal. 6thals 6t3hand 2t1hau 1the. 3t4hea
+t1heb t5heil t3heit t3helf 1theo 5therap 5therf 6t5herz 1thes 1thet
+5thi. 2t1hil t3him 8thir 3this t5hj 2th1l 2th1m th1n t5hob t5hof
+4tholz 6thopti 1thr6 4ths t1hum 1thy \n{4t1h"a} \n{2t1h"o} \n{t1h"u}
+ti1a2m ti1b tie6fer ti1en ti8gerz tig3l ti8kin ti5lat 1tilg t1ind
+tin4k3l ti3spa ti5str 5tite ti5tr ti8vel ti8vr 2t1j 2t1k2 2t1l tl8a
+2t1m8 2t1n 3tobe 8tobj to3cha 5tocht 8tock tode4 to8del to8du to1e
+6t5o6fen to1in toi6r 5toll. to8mene t2ons 2t1ony to4per 5topf. 6topt
+to1ra
+to1s to2ste
+to6ska tos2l 2toti to1tr t8ou 2t1p2 6t1q tr6 tra5cha
+tra8far traf5t 1trag tra6gl tra6gr t3rahm 1trai t6rans tra3sc tra6st
+3traue t4re. 2trec t3rech t8reck 6t1red t8ree 4t1reg 3treib 4treif
+8t3reis 8trepo tre6t5r t3rev 4t3rez 1trib t6rick tri6er 2trig t8rink
+tri6o5d trizi5 tro1a 3troc trocke6 troi8d tro8man. tro3ny 5tropf
+6t5rosa t5ro\3 \c{t5ro\9} 5trub 5trup trut5 \n{1tr"ag} \n{6t1r"oh}
+\n{5tr"ub} \n{tr"u3bu} \n{t1r"uc} \n{t1r"us} 2ts ts1ab t1sac tsa8d
+ts1ak t6s5alt ts1an ts1ar ts3auf t3schr \n{t5sch"a} tse6e tsee5i
+tsein6s ts3ent ts1er t8serf t4serk t8sh 5t6sik t4s3int ts5ort.
+t5s6por t6sprei
+t1st t2ste
+t6s5tanz ts1th t6stit t4s3tor 1t2sua t2s1uf
+t8sum. t2s1u8n t2s1ur 2t1t tt5eif tte6sa tt1ha tt8ret tt1sc tt8ser
+tt5s6z 1tuc tuch5a 1tu1e 6tuh t5uhr tu1i tu6it 1tumh 6t5umr 1tums
+8tumt 6tund 6tunf 2t1unt tu5ra tu6rau tu6re. tu4r3er 2t1v 2t1w 1ty1
+ty6a ty8la 8tym 6ty6o 2tz tz5al tz1an tz1ar t8zec tzeh6 tzehn5 t6z5ei.
+t6zor t4z3um \n{t6z"au} \n{5t"ag} \n{6t"ah} \n{t5"alt} \n{t8"an}
+\n{t"are8} \n{8t"a8st} \n{6t"au\3} \n{\c{6t"au\9}} \n{t5"offen}
+\n{8t"o8k} \n{1t"on} \n{4t"ub} \n{t6"u5ber.} \n{5t"uch} \n{1t"ur.}
+u3al. u5alb u5alf u3alh u5alk u3alp u3an. ua5na u3and u5ans u5ar.
+ua6th u1au ua1y u2bab ubi5er. u6b5rit ubs2k \n{u5b"o} \n{u8b"ub} 2uc
+u1che u6ch5ec u1chi uch1l uch3m uch5n uch1r uch5to ucht5re u1chu uch1w
+uck1a uck5in u1d ud4a u1ei u6ela uene8 u6ep u1er uer1a ue8rerl uer5o
+u8esc u2est u8ev u1fa u2f1ei u4f3ent u8ferh uf1fr uf1l uf1ra uf1re
+\n{uf1r"a} \n{uf1r"u} uf1s2p uf1st uft1s u8gabt u8gad u6gap ugeb8 u8gn
+ugo3s4 u1ha u1he u1hi uh1le u1ho uh1re u1hu uh1w \n{u1h"a} \n{u1h"o}
+6ui ui5en u1ig u3ins uin8tes u5isch. u1j 6uk u1ke u1ki u1kl u8klu
+u1k6n u5ky u1la uld8se u1le ul8lac ul6lau ul6le6l ul6lo ulni8 u1lo
+ulo6i ult6a ult8e u1lu ul2vr \n{u1l"a} \n{u1l"o} 3umfan 5umlau umo8f
+um8pho u1mu umu8s \n{u5m"o} u1n1a un2al un6at unau2 6und. 5undein
+un4d3um 3undzw \n{und"u8} \n{un8d"ub} une2b un1ec une2h un3eis 3unfal
+\n{1unf"a} 5ungea \n{3ungl"u} ung2s1 \n{un8g"a} 1u2nif un4it un8kro
+unk5s u1no unpa2 uns2p unvol4 unvoll5 u5os. u1pa u1pi u1p2l u1pr
+up4s3t up2t1a u1q u1ra ur5abs ura8d ur5ah u6rak ur3alt u6rana u6r5ans
+u8rap ur5a6ri u8ratt u1re ur3eig ur8gri u1ri ur5ins 3urlau urmen6
+ur8nan u1ro 3ursac ur8sau ur8sei ur4sk 3urtei u1ru uru5i6 uru6r u1ry
+ur2za \n{ur6z"a} \n{ur5"a6m} \n{u5r"o} \n{u1r"u} \n{ur"uck3} u1sa
+usa4gi u2s1ar u2s1au u8schec usch5wi u2s1ei use8kel u8sl u4st3a4b
+us3tau
+% u3s4ter
+u2s1uf u8surn ut1ac u1tal uta8m u1tan ut1ar u1tas ut1au
+u1te u8teic u4tent u8terf u6terin u4t3hei ut5ho ut1hu u1ti utine5
+uti6q u1to uto5c u1tr ut1sa ut1s6p ut6stro u1tu utz5w u1u u1v uve5n
+\n{uve3r4"a} u1w u1xe u5ya uy5e6 u1yi u2z1eh u8zerh \n{u5"o} u\3e6n
+\c{u\9e6n} u\3en5e \c{u\9en5e} 8vanb 6vang 6varb var8d va6t5a va8tei
+va2t1r 2v1b 6v5c 6vd 1ve 6ve5g6 ver1 ver5b verb8l ve2re2 verg8 ve2ru8
+ve1s ve2s3p ve3xe 2v1f 2v1g 6v5h vi6el vie6w5 vi1g4 vi8leh vil6le.
+8vint vi1ru vi1tr 2v1k 2v1l 2v1m 4v5n 8vo8f voi6le vol8lend vol8li
+v2or1 vo2re vo8rin vo2ro 2v1p 8vra v6re
+2v2s % 2v1s
+2v1t 2v1v 4v3w 2v1z
+waffe8 wa6g5n 1wah wah8n wa5la wal8din wal6ta wan4dr 5ware wa8ru
+war4za 1was w5c w1d 5wech we6fl 1weg we8geng weg5h weg3l we2g1r
+weh6r5er 5weise weit3r wel2t welt3r we6rat 8werc 5werdu wer4fl 5werk.
+wer4ka wer8ku wer4ta wer8term we2sp
+we8s4tend
+% we6s4teu
+we8str
+\n{we8st"o} wet8ta wich6s5t 1wid wi2dr wiede4 wieder5 wik6 wim6ma
+win4d3r 5wirt wisch5l 1wj 6wk 2w1l 8w1n wo1c woche6 wol6f wor6t5r 6ws2
+w1sk 6w5t 5wunde. wun6gr wu1sc wu2t1 6w5w wy5a \n{w"arme5} \n{w"a1sc}
+1xag x1ak x3a4men 8xamt x1an 8x1b x1c 1xe. x3e4g 1xen xe1ro x1erz
+1xes 8xf x1g 8x1h 1xi 8xid xi8so 4xiste x1k 6x1l x1m 8xn 1xo 8x5o6d
+8x3p2 x1r x1s6 8x1t x6tak x8terf x2t1h 1xu xu1e x5ul 6x3w x1z 5ya.
+y5an. y5ank y1b y1c y6cha y4chia y1d yen6n y5ern y1g y5h y5in y1j
+y1k2 y1lak yl1al yla8m y5lax y1le y1lo y5lu y8mn ym1p2 y3mu y1na yno2d
+yn1t y1on. y1o4p y5ou ypo1 y1pr y8ps y1r yri3e yr1r2
+% y1s
+ys5iat ys8ty
+y1t y3w y1z \n{y"a8m} z5a6b zab5l 8za6d 1zah za5is 4z3ak 6z1am 5zange.
+8zanl 2z1ara 6z5as z5auf 3zaun 2z1b 6z1c 6z1d 1ze ze4dik 4z3eff 8zein
+zei4ta zei8ters ze6la ze8lec zel8th 4zemp 6z5engel zen8zin \n{8zerg"a}
+zer8i ze1ro zers8 zerta8 zer8tab zer8tag 8zerz ze8ste zeu6gr 2z1ex
+2z1f8 z1g 4z1h 1zi zi1en zi5es. 4z3imp zi1na 6z5inf 6z5inni zin6s5er
+8zinsuf zist5r zi5th zi1tr 6z1j 2z1k 2z1l 2z1m 6z1n 1zo zo6gl 4z3oh
+zo1on zor6na8 4z1p z5q 6z1r 2z1s8 2z1t z4t3end z4t3hei z8thi 1zu zu3al
+zu1b4 zu1f2 6z5uhr zun2a 8zunem zunf8 8zungl zu1o zup8fi zu1s8 zu1z
+2z1v zw8 z1wal 5zweck zwei3s z1wel z1wer z6werg 8z5wes 1zwi zwi1s
+6z1wo 1zy 2z1z zz8a zzi1s \n{1z"a} \n{1z"o} \n{6z"ol.} \n{z"o1le}
+\n{1z"u} \n{2z1"u2b} \n{"a1a6} \n{"ab1l} \n{"a1che} \n{"a3chi}
+\n{"ach8sc} \n{"ach8sp} \n{"a5chu} \n{"ack5a} \n{"ad1a} \n{"ad5era}
+\n{"a6d5ia} \n{"a1e} \n{"a5fa} \n{"af1l} \n{"aft6s} \n{"ag1h}
+\n{"ag3le} \n{"a6g5nan} \n{"ag5str} \n{"a1he} \n{"a1hi} \n{"ah1le}
+\n{"ah5ne} \n{1"ahnl} \n{"ah1re} \n{"ah5ri} \n{"ah1ru} \n{"a1hu}
+\n{"ah1w} \n{6"ai} \n{"a1isc} \n{"a6ische} \n{"a5ism} \n{"a5j}
+\n{"a1k} \n{"al1c} \n{"a1le} \n{"a8lei} \n{"al6schl} \n{"ami1e}
+\n{"am8n} \n{"am8s} \n{"a5na} \n{5"anderu} \n{"ane5i8} \n{"ang3l}
+\n{"ank5l} \n{"a1no} \n{"an6s5c} \n{"a1pa} \n{"ap6s5c} \n{3"aq}
+\n{"ar1c} \n{"a1re} \n{"are8m} \n{5"argern} \n{"ar6gl} \n{"a1ri}
+\n{3"armel} \n{"a1ro} \n{"art6s5} \n{"a1ru} \n{3"arztl} \n{"a5r"o}
+\n{"a6s5chen} \n{"asen8s} \n{"as1th} \n{"ata8b} \n{"a1te} \n{"ateri4}
+\n{"ater5it} \n{"a6thy} \n{"a1ti} \n{3"atk} \n{"a1to} \n{"at8schl}
+\n{"ats1p} \n{"a5tu} \n{"aub1l} \n{"au1e} \n{1"aug} \n{"au8ga}
+\n{"au5i} \n{"a1um.} \n{"a1us.} \n{1"au\3} \n{\c{1"au\9}} \n{"a1z}
+\n{"o1b} \n{"o1che} \n{"o5chi}
+\n{"och8s2tei} % \n{"och8stei}
+\n{"och8str} \n{"ocht6}
+\n{5"o6dem} \n{5"offn} \n{"o1he} \n{"oh1l8} \n{"oh1re} \n{"o1hu}
+\n{"o1is} \n{"o1ke} \n{1"o2ko} \n{1"ol.} \n{"ol6k5l} \n{"ol8pl}
+\n{"o1mu} \n{"o5na} \n{"onig6s3} \n{"o1no} \n{"o5o6t} \n{"opf3l}
+\n{"op6s5c} \n{"o1re} \n{"or8gli} \n{"o1ri} \n{"or8tr} \n{"o1ru}
+\n{5"osterr} \n{"o1te} \n{"o5th} \n{"o1ti} \n{"o1tu} \n{"o1v} \n{"o1w}
+\n{"owe8} \n{"o2z} \n{"ub6e2} \n{3"u4ber1} \n{"ub1l} \n{"ub1r}
+\n{5"u2bu} \n{"u1che} \n{"u1chi} \n{"u8ch3l} \n{"uch6s5c} \n{"u8ck}
+\n{"uck1a} \n{"uck5ers} \n{"ud1a2} \n{"u6deu} \n{"udi8t} \n{"u2d1o4}
+\n{"ud5s6} \n{"uge4l5a} \n{"ug1l} \n{"uh5a} \n{"u1he} \n{"u8heh}
+\n{"u6h5erk} \n{"uh1le} \n{"uh1re} \n{"uh1ru} \n{"u1hu} \n{"uh1w}
+\n{"u3k} \n{"u1le} \n{"ul4l5a} \n{"ul8lo} \n{"ul4ps} \n{"ul6s5c}
+\n{"u1lu} \n{"un8da} \n{"un8fei} \n{"unk5l} \n{"un8za} \n{"un6zw}
+\n{"u5pi} \n{"u1re} \n{"u8rei} \n{"ur8fl} \n{"ur8fr} \n{"ur8geng}
+\n{"u1ri} \n{"u1ro} \n{"ur8sta}
+% \n{"ur8ster}
+\n{"u1ru} \n{"use8n}
+\n{"u8sta} \n{"u8stes}
+% \n{"u6s5tete}
+ \n{"u3ta} \n{"u1te} \n{"u1ti}
+\n{"ut8tr} \n{"u1tu} \n{"ut8zei} \n{"u1v} \31a8 \c{\91a8} 5\3a.
+\c{5\9a.} \38as \c{\98as} \31b8 \c{\91b8} \31c \c{\91c} \31d \c{\91d}
+1\3e \c{1\9e} \35ec \c{\95ec} 8\3e8g \c{8\9e8g} 8\3e8h \c{8\9e8h}
+2\31ei \c{2\91ei} 8\3em \c{8\9em} \31f8 \c{\91f8} \31g \c{\91g} \31h
+\c{\91h} 1\3i \c{1\9i} \31k \c{\91k} \31l \c{\91l} \31m \c{\91m}
+% \3mana8 \c{\9mana8} % ueberfluessig ?
+\31n \c{\91n} \31o \c{\91o} \31p8 \c{\91p8} \35q
+\c{\95q} \31r \c{\91r} \31s2 \c{\91s2} \3st8 \c{\9st8} \31ta \c{\91ta}
+\31te \c{\91te} \3t3hei \c{\9t3hei} \31ti \c{\91ti} \35to \c{\95to}
+\31tr \c{\91tr} 1\3u8 \c{1\9u8} 6\35um \c{6\95um} \31v \c{\91v} \31w
+\c{\91w} \31z \c{\91z}
+%
+% st
+%
+2s1ta.
+i2s1tal
+2s1tani 2s1tan.
+fe2s1ta
+te2s1ta
+%
+nd2ste
+ve2ste
+3s2tec
+4s3techn
+3s2teg
+3s2teh
+3s2tein 3s2teig 3s2teif
+3s2tell 3s2telz
+a4s3tel
+3s2temm
+3s2temp
+3s2tep
+s3s2ter t3s2tern
+3s2teue
+6s4teuro
+%
+bs2ti
+te2s3ti
+ve2sti
+3s2tic
+% 3s2tiefel
+3s2tieb
+3s2tieg
+% 3s2tiel s.o.
+3s2tif
+3s2til
+3s2tim
+3s2tink
+3s2titu
+%
+a2s1to
+i2s1tol i2s1tor
+ve2s1to
+%
+2s1tung
+2s7tus
+%
+% eszet
+%
+aus3s4
+ens3s4
+gs3s4
+.mis2s1
+s2s1b8 % ss1b8 %\31b8 \c{\91b8}
+% \31c \c{\91c}
+s2s3chen
+s2s3d % \31d \c{\91d}
+s2s5ec % \35ec \c{\95ec}
+% 8sse8g % 8\3e8g \c{8\9e8g}
+% 8sse8h % 8\3e8h \c{8\9e8h}
+2s2s1ei % 2\31ei \c{2\91ei}
+s2s3f % ss1f % \31f8 \c{\91f8}
+s2s1g % ss1g % \31g \c{\91g}
+s2s3h %\31h \c{\91h}
+s2s3k % \31k \c{\91k}
+s2s3l % \31l \c{\91l}
+s2s3m % \31m \c{\91m}
+% ssmana8 % \3mana8 \c{\9mana8} % ueberfluessig ?
+s2s3n % \31n \c{\91n}
+s2s3p8 % \31p8 \c{\91p8}
+s2s5q % \35q \c{\95q}
+s2s3r % \31r \c{\91r}
+s2s3s2 % \31s2 \c{\91s2}
+sss2t8 % \3st8 \c{\9st8}
+% \31ta \c{\91ta}%
+% \31te \c{\91te}
+as2s3te
+is2s3te
+us2s3te
+\n{"us2s3te}
+s2st3hei % \3t3hei \c{\9t3hei}
+s2s3ti % \31ti \c{\91ti}
+s2s1to % \35to \c{\95to}
+s2s1tr % \31tr \c{\91tr}
+% aber: ...s-sung
+6ss5um % 6\35um \c{6\95um}
+s2s3v % \31v \c{\91v}
+s2s3w % \31w \c{\91w}
+s2s3z % ss1z \31z \c{\91z}
+%
+% ck
+%
+1cker.
+1ckert
+1ckad
+1cke.
+1ckel
+1cken
+4ck1ent
+1ckere
+1ckern
+1ckeru
+1ckie
+1ckig
+1ckun
+}
+\endgroup
+\relax
+\endinput
+%
+% -----------------------------------------------------------------
+%
+% =============== Additional Documentation ===============
+%
+%
+% Necessary Settings in TeX macro files:
+% --------------------------------------
+%
+% \lefthyphenmin, \righthyphenmin:
+% You can set both parameters to 2.
+% The new German orthography allows hyphenation after the first letter,
+% i.e. \lefthyphenmin=1.
+% Despite being ugly, this may ease line breaking in narrow columns.
+% The current patterns do, however, *** NOT *** support it.
+%
+% \lccode <char>:
+% To get correct hyphenation points within words containing
+% umlauts or \ss, it's necessary to assign values > 0 to the
+% appropriate \lccode <char> positions.
+%
+% These changes are done when reading this file (\lccode for umlauts)
+% or are included in the language switching mechanism of `german.sty'
+% (\lccode change for \ss, \left-/\righthyphenmin settings).
+%
+%
+% Warum ist diese Version "vorlaeufig" ?
+% --------------------------------------
+%
+% Diese Trennmuster fuer die neue deutsche Rechtschreibung
+% entstanden durch manuelle Ueberarbeitung der Muster "ghyph31.tex",
+% die den "alten" Schreibregeln entsprechen. Sie sind deshalb
+% statistisch nicht optimal.
+%
+% Die neuerdings erlaubten Trennstellen nach dem ersten Buchstaben
+% eines Wortes fehlen hier; ihre Implementierung wuerde die
+% Neuberechnung der Muster erfordern.
+%
+% Wo die neue Rechtschreibung sowohl die "traditionelle", also
+% etymologisch richtige Trennung, als auch eine Trennung nach
+% Sprechsilben erlaubt, wird weiterhin "traditionell" getrennt.
+% (Beachte: In Woertern lateinischen Ursprungs wird "str" jetzt
+% als "s-tr" getrennt, ausser natuerlich am Anfang eines Wortstamms:
+% "Demons-tration", "Aus-tralien" usw., aber "de-struktiv".)
+%
+% Sobald Trennmuster fuer die neue deutsche Rechtschreibung
+% verfuegbar sind, die von Grund auf neu berechnet wurden, sollten
+% die vorliegenden Muster nicht laenger verwendet werden.
+%
+%
+% Versionsgeschichte
+% -------------------
+%
+% 1998-02-15 beta 19
+%
+% 1998-02-24 beta 20
+%
+% 1998-04-28 21
+%
+% 1998-05-28 22
+%
+% 1998-08-23 26
+%
+%
+%
+%% \CharacterTable
+%% {Upper-case \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
+%% Lower-case \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
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\endinput
+%%
+%% End of file `gnhyph01.tex'.
diff --git a/tex/context/base/lang-deo.pat b/tex/context/base/lang-deo.pat
new file mode 100644
index 000000000..de252327e
--- /dev/null
+++ b/tex/context/base/lang-deo.pat
@@ -0,0 +1,848 @@
+% This is `ghyph31.tex' as of 13. Feb 94.
+%
+% Copyright (C) 1988,1991 Rechenzentrum der Ruhr-Universitaet Bochum
+% [german hyphen patterns]
+% Copyright (C) 1993,1994 Bernd Raichle/DANTE e.V.
+% [macros, adaption for TeX 2]
+%
+% General permission for use and non-profit redistribution is granted.
+% For special commercial use, contact the below address.
+%
+% Commercial use is generally granted, if a reference copy
+% - for use by the Rechenzentrum of the Ruhr-Universitaet -
+% is received.
+%
+%
+% This file contains 5719 german hyphen patterns with umlauts
+% in the recommended version of September 27, 1990.
+% It is an experimental version for testing the integration of
+% umlauts and `es-zett', but without `c-k' and triple consonants.
+%
+% For use with TeX generated by
+%
+% Norbert Schwarz
+% Rechenzentrum Ruhr-Universitaet Bochum
+% Universitaetsstrasse 150
+% D-44721 Bochum, FRG
+%
+% Email (X.400):
+% Norbert.Schwarz@RUBA.RZ.RUHR-UNI-BOCHUM.DBP.DE
+%
+%
+% Adaption of these patterns for TeX, Version 2.x and 3.x and
+% all fonts in `Cork'/EC/DC and/or CM encoding by
+%
+% Bernd Raichle
+% Stettener Str. 73
+% D-73732 Esslingen, FRG
+% Email: raichle@Informatik.Uni-Stuttgart.DE
+%
+%
+% Error reports in case of UNCHANGED versions to
+%
+% DANTE e.V., Koordinator `german.sty'
+% Postfach 10 18 40
+% D-69008 Heidelberg, FRG
+% Email: german@Dante.DE
+%
+% or one of the addresses given above.
+%
+% Changes:
+% 1990-09-27 First version of `ghyphen3.tex' (Norbert Schwarz)
+% 1991-02-13 PC umlauts changed to ^^xx (Norbert Schwarz)
+% 1993-08-27 Umlauts/\ss changed to "a/\3 macros, added macro
+% definitions and additional logic to select correct
+% patterns/encoding (Bernd Raichle)
+% 1994-02-13 Release of `ghyph31.tex'
+%
+%
+% For more informations see the additional documentation
+% at the end of this file.
+%
+% -----------------------------------------------------------------
+%
+\message{German Hyphenation Patterns `ghyphen' Version 3.1a <94/02/13>}
+%
+\begingroup
+\ifnum 0\ifx\inputlineno\undefined \else
+ \ifnum\inputlineno<1 \else 1\fi\fi<1
+ \let\x=\endgroup
+\else
+ \def\x{\endgroup
+%
+% The following commands ensure correct \catcodes, \lccodes and
+% \uccodes if your TeX implementations uses these character codes.
+%
+\catcode"E4=11 \catcode"C4=11 % \"a \"A
+\catcode"F6=11 \catcode"D6=11 % \"o \"O
+\catcode"FC=11 \catcode"DC=11 % \"u \"U
+\catcode"FF=11 \catcode"DF=11 % \ss SS
+%
+\lccode"C4="E4 \uccode"C4="C4 \lccode"E4="E4 \uccode"E4="C4
+\lccode"D6="F6 \uccode"D6="D6 \lccode"F6="F6 \uccode"F6="D6
+\lccode"DC="FC \uccode"DC="DC \lccode"FC="FC \uccode"FC="DC
+\lccode"DF="FF \uccode"DF="DF \lccode"FF="FF \uccode"FF="DF
+%
+}
+\fi
+% Now execute the changes of the above \*codes for TeX 3.x
+\x
+
+
+%
+% Next we define some commands, which are used inside the patterns.
+% To keep them local, we enclose the rest of the file in a group
+% (The \patterns command globally changes the hyphenation trie!).
+%
+\begingroup
+%
+% Because we use ^^e4, ^^f6, ... in the following definition,
+% we have to ensure that the catcodes of ^^e and ^^f are ok
+% for TeX 2. (The macro is not used for TeX 2.)
+\catcode"0E=12 \catcode"0F=12
+%
+% And we have to change the \lccode of ^^Y to make sure that
+% we can include this character in the hyphenation patterns.
+\catcode`\^^Y=11 \lccode`\^^Y=`\^^Y
+%
+% Define a simple " macro...
+\catcode`\"=13
+\def"#1{\ifx#1a^^e4\else \ifx#1o^^f6\else
+ \ifx#1u^^fc\else
+ \errmessage{Hyphenation pattern file corrupted!}%
+ \fi\fi\fi}
+%
+% ... and define a macro to allow the use of this file
+% with TeX 2 and TeX 3.
+\ifnum 0\ifx\inputlineno\undefined \else
+ \ifnum\inputlineno<1 \else 1\fi\fi<1
+ % for TeX 2:
+ % ignore the patterns with umlauts
+ \def\n#1{}
+ % ignore the duplicated patterns with \ss
+ \def\c#1{}
+ % define \3 to be code ^^Y
+ \def\3{^^Y}
+\else
+ % for TeX 3:
+ % patterns with umlauts are ok
+ \def\n#1{#1}
+ % duplicated patterns are ok (for CM fonts)
+ \def\c#1{#1}
+ % >>>>>> UNCOMMENT the next line, if you do not want
+ % >>>>>> to use fonts with CM layout
+ %\def\c#1{}
+ % define \3 to be code `\^^ff (\ss in DC/EC font layout)
+ % define \9 to be code `\^^Y (\ss in CM font layout)
+ \def\3{^^ff}
+ \def\9{^^Y}
+\fi
+%
+%
+\patterns{%
+.aa6l .ab3a4s .ab3ei .abi2 .ab3it .ab1l .ab1r .ab3u .ad3o4r .alti6
+.ana3c .an5alg .an1e .ang8s .an1s .ap1p .ar6sc .ar6ta .ar6tei .as2z
+.au2f1 .au2s3 .be5erb .be3na .ber6t5r .bie6r5 .bim6s5t .brot3 .bru6s
+.ch6 .che6f5 .da8c .da2r .dar5in .dar5u .den6ka .de5r6en .des6pe
+.de8spo .de3sz .dia3s4 .dien4 .dy2s1 .ehren5 .eine6 .ei6n5eh .ei8nen
+.ein5sa .en6der .en6d5r .en3k4 .en8ta8 .en8tei .en4t3r .epo1 .er6ban
+.er6b5ei .er6bla .er6d5um .er3ei .er5er .er3in .er3o4b .erwi5s .es1p
+.es8t .ex1a2 .ex3em .fal6sc .fe6st5a .flu4g3 .furch8 .ga6ner .ge3n4a
+\n{.ge5r"o} .ges6 .halb5 .halbe6 .hal6br .haup4 .hau4t .heima6 .he4r3e
+.her6za .he5x .hin3 .hir8sc .ho4c .hu3sa .hy5o .ibe5 .ima6ge .in1
+.ini6 .is5chi .jagd5 .kal6k5o .ka6ph .ki4e .kop6f3 .kraf6 \n{.k"u5ra}
+.lab6br .liie6 .lo6s5k \n{.l"o4s3t} .ma5d .mi2t1 .no6th .no6top
+.obe8ri .ob1l .obs2 .ob6st5e .or3c .ort6s5e .ost3a .oste8r .pe4re
+.pe3ts .ph6 .po8str .rau4m3 .re5an .ro8q .ru5the \n{.r"u5be}
+\n{.r"u8stet} .sch8 .se6e .se5n6h .se5ra .si2e .spi6ke .st4 .sy2n
+.tages5 .tan6kl .ta8th .te6e .te8str .to6der .to8nin .to6we .um1
+.umpf4 .un1 .une6 .unge5n .ur1c .ur5en .ve6rin .vora8 .wah6l5 .we8ges
+.wo6r .wor3a .wun4s .zi4e .zuch8 \n{."ande8re} \n{."och8} aa1c aa2gr
+aal5e aa6r5a a5arti aa2s1t aat2s 6aba ab3art 1abdr 6abel aben6dr
+ab5erk ab5err ab5esse 1abf 1abg \n{1abh"a} ab1ir 1abko a1bl ab1la
+5ablag a6bla\3 \c{a6bla\9} ab4ler ab1lu \n{a8bl"a} \n{5a6bl"o} abma5c
+1abn ab1ra ab1re 5a6brec ab1ro ab1s ab8sk abs2z 3abtei ab1ur 1abw
+5abze 5abzu \n{ab1"an} \n{ab"au8} a4ce. a5chal ach5art ach5au a1che
+a8chent ach6er. a6ch5erf a1chi ach1l ach3m ach5n a1cho ach3re a1chu
+ach1w a1chy \n{ach5"af} ack1o acks6t ack5sta a1d 8ad. a6d5ac ad3ant
+ad8ar 5addi a8dein ade5o8 adi5en 1adj 1adle ad1op a2dre 3adres adt1
+1adv \n{a6d"a} a1e2d ae1r a1er. 1aero 8afa a3fal af1an a5far a5fat
+af1au a6fentl a2f1ex af1fr af5rau af1re 1afri af6tent af6tra aft5re
+a6f5um \n{8af"a} ag5abe 5a4gent ag8er ages5e 1aggr ag5las ag1lo a1gn
+ag2ne 1agog a6g5und a1ha a1he ah5ein a4h3erh a1hi ahl1a ah1le ah4m3ar
+ahn1a a5ho ahra6 ahr5ab ah1re ah8rei ahren8s ahre4s3 ahr8ti ah1ru a1hu
+\n{ah8"o} ai3d2s ai1e aif6 a3inse ai4re. a5isch. ais8e a3ismu ais6n
+aiso6 a1j 1akad a4kade a1ke a1ki 1akko 5akro1 a5lal al5ans 3al8arm
+al8beb al8berw alb5la 3album al1c a1le a6l5e6be a4l3ein a8lel a8lerb
+a8lerh a6lert 5a6l5eth 1algi al4gli al3int al4lab al8lan al4l3ar
+alle3g a1lo a4l5ob al6schm al4the altist5 al4t3re 8a1lu alu5i a6lur
+alu3ta \n{a1l"a} a6mate 8ame. 5a6meise am6m5ei am6mum am2n ampf3a
+am6schw am2ta a1mu \n{a1m"a} a3nac a1nad anadi5e an3ako an3alp 3analy
+an3ame an3ara a1nas an5asti a1nat anat5s an8dent ande4s3 an1ec an5eis
+an1e2k 4aner. a6n5erd a8nerf a6n5erke 1anfa 5anfert \n{1anf"a} 3angab
+5angebo an3gli ang6lis an2gn 3angri ang5t6 \n{5anh"a} ani5g ani4ka
+an5i8on an1kl an6kno an4kro 1anl anma5c anmar4 3annah anne4s3 a1no
+5a6n1o2d 5a6n3oma 5a6nord 1anr an1sa 5anschl an4soz an1st 5anstal
+an1s2z 5antenn an1th \n{5anw"a} a5ny an4z3ed 5anzeig 5anzieh 3anzug
+\n{an1"a} \n{5an"as} \n{a1n"o} \n{an"o8d} a1os a1pa 3apfel a2ph1t
+\n{aph5"a6} a1pi 8apl apo1c apo1s a6poste a6poth 1appa ap1pr a1pr
+\n{a5p"a} \n{a3p"u} a1ra a4r3af ar3all 3arbei 2arbt ar1c 2a1re ar3ein
+ar2gl 2a1ri ari5es ar8kers ar6les ar4nan ar5o6ch ar1o2d a1rol ar3ony
+a8ror a3ros ar5ox ar6schl 8artei ar6t5ri a1ru a1ry 1arzt arz1w
+\n{ar8z"a} \n{ar"a8m} \n{ar"o6} \n{ar5"om} \n{ar1"u2} a1sa a6schec
+asch5l asch3m a6schn a3s4hi as1pa asp5l a8steb as5tev 1asth a6stoc
+a1str ast3re 8a1ta ata5c ata3la a6tapf ata5pl a1te a6teli aten5a
+ate5ran 6atf 6atg a1th at3hal 1athl 2a1ti 5atlant 3atlas 8atmus 6atn
+a1to a6t5ops ato6ra a6t5ort. 4a1tr a6t5ru at2t1h \n{at5t6h"a} 6a1tu
+atz1w \n{a1t"a} \n{a1t"u} au1a au6bre auch3a au1e aue4l 5aufent
+\n{3auff"u} 3aufga 1aufn auf1t 3auftr 1aufw 3auge. au4kle aule8s 6aum
+au8mar aum5p 1ausb 3ausd 1ausf 1ausg au8sin 3auss au4sta 1ausw 1ausz
+aut5eng au1th 1auto au\3e8 \c{au\9e8} a1v ave5r6a aver6i a1w a6wes a1x
+a2xia a6xio a1ya a1z azi5er. 8a\3 \c{8a\9} 1ba 8ba8del ba1la ba1na
+ban6k5r ba5ot bardi6n ba1ro basten6 bau3sp 2b1b bb6le b2bli 2b1c 2b1d
+1be be1a be8at. be1ch 8becht 8becke. be5el be1en bee8rei be5eta bef2
+8beff be1g2 \n{beh"o8} bei1s 6b5eisen bei3tr b8el bel8o belu3t be3nac
+bend6o be6ners be6nerw be4nor ben4se6 bens5el \n{be1n"a} \n{be1n"u}
+be1o2 b8er. be1ra be8rac ber8gab. ber1r \n{be1r"u} bes8c bes5erh
+bes2p be5tha bet5sc be1un be1ur 8bex be6zwec 2b1f8 bfe6st5e 2b1g2
+bga2s5 bge1 2b1h bhole6 1bi bi1bl b6ie bi1el bi1la \n{bil"a5} bi1na
+bi4nok bi5str bi6stu bi5tr bit4t5r b1j 2b1k2 \n{bk"u6} bl8 b6la.
+6b1lad 6blag 8blam 1blat b8latt 3blau. b6lav 3ble. b1leb b1led
+8b1leg 8b1leh 8bleid 8bleih 6b3lein blei3s ble4m3o 4blich b4lind
+8bling b2lio 5blit b4litz b1loh 8b1los 1blu 5blum 2blun blut3a blut5sc
+\n{3bl"a} \n{bl"as5c} \n{5bl"o} \n{3bl"u} \n{bl"u8sc} 2b1m 2b1n 1bo
+bo1ch bo5d6s boe5 8boff 8bonk bo1ra b1ort 2b1p2 b1q 1br brail6 brast8
+bre4a b5red 8bref 8b5riem b6riga bro1s b1rup b2ruz \n{8br"oh}
+\n{br"os5c} 8bs b1sa b8sang b2s1ar b1sc bs3erl bs3erz b8sof b1s2p
+bst1h b3stru \n{b5st"a} b6sun 2b1t b2t1h 1bu bu1ie bul6k b8ure bu6sin
+6b1v 2b1w 1by1 by6te. 8b1z bzi1s \n{1b"a} \n{b5"a6s5} \n{1b"u}
+\n{b6"u5bere} \n{b"uge6} \n{b"ugel5e} \n{b"ur6sc} 1ca cag6 ca5la ca6re
+ca5y c1c 1ce celi4c celich5 ce1ro c8h 2ch. 1chae ch1ah ch3akt cha6mer
+8chanz 5chara 3chari 5chato 6chb 1chef 6chei ch3eil ch3eis 6cherkl
+6chf 4chh 5chiad 5chias 6chins 8chj chl6 5chlor 6ch2m 2chn6 ch8nie
+5cho. 8chob choi8d 6chp ch3ren ch6res \n{ch3r"u} 2chs 2cht cht5ha
+cht3hi 5chthon ch6tin 6chuh chu4la 6ch3unt chut6t 8chw 1ci ci5tr c2k
+2ck. ck1ei 4ckh ck3l ck3n ck5o8f ck1r 2cks ck5stra ck6s5u c2l 1c8o
+con6ne 8corb cos6t c3q 1c6r 8c1t 1cu 1cy \n{5c"a1} \n{c"o5} 1da.
+8daas 2dabg 8dabr 6dabt 6dabw 1dac da2gr 6d5alk 8d5amt dan6ce.
+dani5er dan8ker 2danl danla6 6dans 8danzi 6danzu d1ap da2r1a8 2d1arb
+d3arc dar6men 4d3art 8darz 1dat 8datm 2d1auf 2d1aus 2d1b 2d1c 2d1d
+d5de d3d2h \n{dd"amme8} 1de 2deal de5an de3cha de1e defe6 6deff 2d1ehr
+5d4eic de5isc de8lar del6s5e del6spr de4mag de8mun de8nep dene6r
+8denge. 8dengen de5o6d 2deol de5ram 8derdb der5ein de1ro der1r d8ers
+der5um de4s3am de4s3an de4sau de6sil de4sin de8sor de4spr de2su 8deul
+de5us. 2d1f df2l 2d1g 2d1h 1di dia5c di5ara dice5 di3chr di5ena di1gn
+di1la dil8s di1na 8dind 6dinf 4d3inh 2d1ins di5o6d di3p4t di8sen dis1p
+di5s8per di6s5to dis5tra di8tan di8tin d1j 6dje 2dju 2d1k 2d1l 2d1m
+2d1n6 dni6 dnje6 1do 6d5obe do6berf 6d5ony do3ran 6dord 2d1org dor4t3h
+do6ste 6doth dott8e 2d1p d5q dr4 1drah 8drak d5rand 6dre. 4drech
+d6reck 4d3reg 8d3reic d5reife 8drem 8d1ren 2drer 8dres. 6d5rh 1dria
+d1ric 8drind droi6 dro5x 1dru 8drut \n{dr"os5c} \n{1dr"u} \n{dr"u5b}
+\n{dr"u8sc} 2ds d1sa d6san dsat6 d1sc 5d6scha. 5dschik dse8e d8serg
+8dsl d1sp d4spak ds2po \n{d8sp"a} d1st \n{d1s"u} 2dt d1ta d1te d1ti
+d1to dt1s6 d1tu \n{d5t"a} 1du du5als du1b6 du1e duf4t3r 4d3uh du5ie
+8duml 8dumw 2d1und du8ni 6d5unt dur2c durch3 6durl 6dursa 8durt du1s
+du8schr 2d1v 2d1w dwa8l 2d1z \n{1d"a} \n{6d"ah} \n{8d"and} \n{d"a6r}
+\n{d"o8bl} \n{d5"ol} \n{d"or6fl} \n{d"o8sc} \n{d5"o4st} \n{d"os3te}
+\n{1d"u} ea4ben e1ac e1ah e1akt e1al. e5alf e1alg e5a8lin e1alk e1all
+e5alp e1alt e5alw e1am e1and ea6nim e1ar. e5arf e1ark e5arm e3art
+e5at. e6ate e6a5t6l e8ats e5att e6au. e1aus e1b e6b5am ebens5e
+eb4lie eb4ser eb4s3in e1che e8cherz e1chi ech3m 8ech3n ech1r ech8send
+ech4su e1chu eck5an e5cl e1d ee5a ee3e ee5g e1ei ee5isc eei4s3t
+ee6lend e1ell \n{ee5l"o} e1erd ee3r4e ee8reng eere6s5 \n{ee5r"a}
+ee6tat e1ex e1f e6fau e8fe8b 3effek ef3rom ege6ra eglo6si 1egy e1ha
+e6h5ach eh5ans e6hap eh5auf e1he e1hi ehl3a eh1le ehl5ein eh1mu ehn5ec
+e1ho ehr1a eh1re ehre6n eh1ri eh1ru ehr5um e1hu eh1w e1hy \n{e1h"a}
+\n{e1h"o} \n{e3h"ut} ei1a eia6s ei6bar eich3a eich5r ei4dar ei6d5ei
+ei8derf ei3d4sc ei1e 8eifen 3eifri 1eign eil1d ei6mab ei8mag ein1a4
+ei8nat ei8nerh ei8ness ei6nete ein1g e8ini ein1k ei6n5od ei8nok ei4nor
+\n{e3ins"a} ei1o e1irr ei5ru ei8sab ei5schn ei6s5ent ei8sol ei4t3al
+eit3ar eit1h ei6thi ei8tho eit8samt ei6t5um e1j 1ekd e1ke e1ki e1k2l
+e1kn ekni4 e1la e2l1al 6elan e6lanf e8lanl e6l5ans el3arb el3arm
+e6l3art 5e6lasti e6lauge elbst5a e1le 6elef ele6h e6l5ehe e8leif
+e6l5einh 1elek e8lel 3eleme e6lemen e6lente el5epi e4l3err e6l5ersc
+elf2l elg2 e6l5ins ell8er 4e1lo e4l3ofe el8soh el8tent 5eltern e1lu
+elut2 \n{e1l"a} \n{e1l"u} em8dei em8meis 4emo emo5s 1emp1f 1empt 1emto
+e1mu emurk4 emurks5 \n{e1m"a} en5a6ben en5achs en5ack e1nad en5af
+en5all en3alt en1am en3an. en3ant en3anz en1a6p en1ar en1a6s 6e1nat
+en3auf en3aus en2ce enda6l end5erf end5erg en8dess 4ene. en5eck
+e8neff e6n5ehr e6n5eim en3eis 6enem. 6enen e4nent 4ener. e8nerd
+e6n3erf e4nerg 5energi e6n5erla en5ers e6nerst en5erw 6enes e6n5ess
+e2nex en3glo 2eni enni6s5 ennos4 enns8 e1no e6nober eno8f en5opf
+e4n3ord en8sers ens8kl en1sp ens6por en5t6ag enta5go en8terbu en6tid
+3entla ent5ric 5entwic 5entwu 1entz enu5i e3ny en8zan \n{en1"of}
+\n{e1n"os} \n{e1n"ug} eo1c e5o6fe e5okk e1on. e3onf e5onk e5onl e5onr
+e5opf e5ops e5or. e1ord e1org eo5r6h eo1t e1pa e8pee e6p5e6g ep5ent
+e1p2f e1pi 5epid e6pidem e1pl 5epos e6pos. ep4p3a e1pr \n{e1p"a} e1q
+e1ra. er5aal 8eraba e5rabel er5a6ben e5rabi er3abs er3ach era5e
+era5k6l er3all er3amt e3rand e3rane er3ans e5ranz. e1rap er3arc
+e3rari er3a6si e1rat erat3s er3auf e3raum 3erbse er1c e1re 4e5re.
+er3eck er5egg er5e2h 2erei e3rei. e8reine er5einr 6eren. e4r3enm
+4erer. e6r5erm er5ero er5erst e4r3erz er3ess \n{5erf"ul} er8gan.
+5ergebn er2g5h \n{5erg"anz} \n{5erh"ohu} 2e1ri eri5ak e6r5iat e4r3ind
+e6r5i6n5i6 er5ins e6r5int er5itio er1kl \n{3erkl"a} \n{5erl"os.}
+ermen6s er6nab 3ernst 6e1ro. e1rod er1o2f e1rog 6e3roi ero8ide e3rol
+e1rom e1ron e3rop8 e2r1or e1ros e1rot er5ox ersch4 5erstat er6t5ein
+er2t1h er5t6her 2e1ru eruf4s3 e4r3uhr er3ums e5rus 5erwerb e1ry er5zwa
+er3zwu \n{er"a8m} \n{er5"as} \n{er"o8} \n{e3r"os.} \n{e6r1"u2b} e1sa
+esa8b e8sap e6s5a6v e1sc esch4l ese1a es5ebe eserve5 e8sh es5ill
+es3int es4kop e2sl eso8b e1sp espei6s5 es2po es2pu 5essenz e6stabs
+e6staf e6st5ak est3ar e8stob e1str est5res es3ur e2sz \n{e1s"u} e1ta
+et8ag etari5e eta8ta e1te eten6te et5hal e5thel e1ti 1etn e1to e1tr
+et3rec e8tscha et8se et6tei et2th et2t1r e1tu etu1s et8zent et8zw
+\n{e1t"a} \n{e1t"o} \n{e1t"u} eu1a2 eu1e eue8rei eu5fe euin5 euk2
+e1um. eu6nio e5unter eu1o6 eu5p 3europ eu1sp eu5str eu8zo e1v eval6s
+eve5r6en ever4i e1w e2wig ex1or 1exp 1extr ey3er. e1z \n{e1"a2}
+\n{e5"o8} \n{e1"u} e8\3es \c{e8\9es} fa6ch5i fade8 fa6del fa5el.
+fal6lo falt8e fa1na fan4gr 6fanl 6fap far6ba far4bl far6r5a 2f1art
+fa1sc fau8str fa3y 2f1b2 6f1c 2f1d 1fe 2f1eck fe6dr feh6lei f6eim
+8feins f5eis fel5en 8feltern 8femp fe5rant 4ferd. ferri8 fe8stof
+fe6str fe6stum fe8tag fet6ta fex1 2ff f1fa f6f5arm f5fe ffe5in ffe6la
+ffe8ler ff1f f1fla ff3lei ff4lie ff8sa ff6s5ta 2f1g2 fgewen6 4f1h 1fi
+fid4 fi3ds fieb4 fi1la fi8lei fil4m5a f8in. fi1na 8finf fi8scho fi6u
+6f1j 2f1k2 f8lanz fl8e 4f3lein 8flib 4fling f2lix 6f3lon 5flop 1flor
+\n{5f8l"ac} \n{3fl"ot} 2f1m 2f1n 1fo foh1 f2on fo6na 2f1op fo5ra
+for8mei for8str for8th for6t5r fo5ru 6f5otte 2f1p8 f1q fr6 f5ram
+1f8ran f8ra\3 \c{f8ra\9} f8re. frei1 5frei. f3reic f3rest f1rib
+8f1ric 6frig 1fris fro8na \n{fr"as5t} 2fs f1sc f2s1er f5str
+\n{fs3t"at} 2ft f1tak f1te ft5e6h ftere6 ft1h f1ti f5to f1tr ft5rad
+ft1sc ft2so f1tu ftwi3d4 ft1z 1fu 6f5ums 6funf fun4ka fu8\3end
+\c{fu8\9end} 6f1v 2f1w 2f1z \n{1f"a} \n{f"a1c} \n{8f"arm} \n{6f"aug}
+\n{f"a8\3} \n{\c{f"a8\9}} \n{f"ode3} \n{8f"of} \n{3f"or} \n{1f"u}
+\n{f"un4f3u} 1ga ga6bl 6gabw 8gabz g3a4der ga8ho ga5isc 4gak ga1la
+6g5amt ga1na gan5erb gan6g5a ga5nj 6ganl 8gansc 6garb 2g1arc 2g1arm
+ga5ro 6g3arti ga8sa ga8sc ga6stre 2g1atm 6g5auf gau5fr g5aus 2g1b g5c
+6gd g1da 1ge ge1a2 ge6an ge8at. ge1e2 ge6es gef2 8geff ge1g2l ge1im
+4g3eise geist5r gel8bra gelt8s \n{ge5l"o} ge8nin gen3k 6g5entf
+\n{ge3n"a} ge1or ge1ra ge6rab ger8au \n{8gerh"o} ger8ins ge1ro 6g5erz.
+\n{ge1r"a} \n{ge1r"u} ge1s ges2p ge5unt 4g3ex3 2g1f8 2g1g g1ha 6g1hei
+5ghel. g5henn 6g1hi g1ho 1ghr \n{g1h"o} 1gi gi5la gi8me. gi1na
+4g3ins gi3str g1j 2g1k 8gl. 1glad g5lag glan4z3 1glas 6glass 5glaub
+g3lauf 1gle. g5leb 3gleic g3lein 5gleis 1glem 2gler 8g3leu gli8a
+g2lie 3glied 1g2lik 1g2lim g6lio 1gloa 5glom 1glon 1glop g1los g4loss
+g5luf 1g2ly \n{1gl"u} 2g1m gn8 6gn. 1gna 8gnach 2gnah g1nas g8neu
+g2nie g3nis 1gno 8gnot 1go goe1 8gof 2gog 5gogr 6g5oh goni5e 6gonist
+go1ra 8gord 2g1p2 g1q 1gr4 g5rahm gra8m gra4s3t 6g1rec gre6ge 4g3reic
+g5reit 8grenn gri4e g5riem 5grif 2grig g5ring 6groh 2grot gro6\3
+\c{gro6\9} 4grut 2gs gs1ab g5sah gs1ak gs1an gs8and gs1ar gs1au g1sc
+gs1ef g5seil gs5ein g2s1er gs1in g2s1o gso2r gs1pr g2s1u 2g1t g3te
+g2t1h 1gu gu5as gu2e 2gue. 6gued 4g3uh 8gums 6g5unt gu1s gut3h gu2tu
+4g1v 2g1w gy1n g1z \n{1g"a} \n{8g"a8m} \n{6g"arm} \n{1g"o} \n{1g"u}
+\n{6g"ub} 1haa hab8r ha8del hade4n 8hae ha5el. haf6tr 2hal. ha1la
+hal4b5a 6hale 8han. ha1na han6dr han6ge. 2hani h5anth 6hanz 6harb
+h3arbe h3arme ha5ro ha2t1h h1atm hau6san ha8\3 \c{ha8\9} h1b2 h1c h1d
+he2bl he3cho h3echt he5d6s 5heft h5e6he. hei8ds h1eif 2hein he3ism
+he5ist. heit8s3 hek6ta hel8lau 8helt he6mer 1hemm 6h1emp hen5end
+hen5klo hen6tri he2nu 8heo he8q her3ab he5rak her3an 4herap her3au
+h3erbi he1ro he8ro8b he4r3um her6z5er he4spe he1st heta6 het5am he5th
+heu3sc he1xa hey5e h1f2 h1g hgol8 h1h h1iat hie6r5i hi5kt hil1a2
+hil4fr hi5nak hin4ta hi2nu hi5ob hirn5e hir6ner hi1sp hi1th hi5tr
+5hitz h1j h6jo h1k2 hlabb4 hla4ga hla6gr h5lai hl8am h1las h1la\3
+\c{h1la\9} hl1c h1led h3lein h5ler. h2lif h2lim h8linf hl5int h2lip
+h2lit h4lor h3lose \n{h1l"as} hme5e h2nee h2nei hn3eig h2nel hne8n
+hne4p3f hn8erz h6netz h2nip h2nit h1nol hn5sp h2nuc h2nud h2nul hoch1
+1hoh hoh8lei 2hoi ho4l3ar 1holz h2on ho1ra 6horg 5horn. ho3sl hos1p
+ho4spi h1p hpi6 h1q 6hr h1rai h8rank h5raum hr1c hrcre8 h1red h3reg
+h8rei. h4r3erb h8rert hrg2 h1ric hr5ins h2rom hr6t5erl hr2t1h hr6t5ra
+hr8tri h6rum hr1z hs3ach h6s5amt h1sc h6s5ec h6s5erl hs8erle h4sob
+h1sp h8spa\3 \c{h8spa\9} h8spel hs6po h4spun h1str h4s3tum hs3und
+\n{h1s"u} h5ta. h5tab ht3ac ht1ak ht3ang h5tanz ht1ar ht1at h5taub
+h1te h2t1ec ht3eff ht3ehe h4t3eif h8teim h4t3ein ht3eis h6temp h8tentf
+hte8ren \n{h6terf"u} h8tergr h4t3erh h6t5ersc h8terst h8tese h8tess
+h2t1eu h4t3ex ht1he ht5hu h1ti ht5rak hts3ah ht1sc ht6sex ht8sk ht8so
+h1tu htz8 \n{h5t"um} hub5l hu6b5r huh1l h5uhr. huld5a6 hu8lent
+\n{hu8l"a} h5up. h1v h5weib h3weis h1z \n{h"a8kl} \n{h"al8s}
+\n{h"ama8tu8} \n{h"a8sche.} \n{h"at1s} \n{h"au4s3c} \n{2h"o.}
+\n{2h"oe} \n{8h"oi} \n{h"o6s} \n{h"os5c} \n{h"uhne6} \n{h"ul4s3t}
+\n{h"utte8re} i5adn i1af i5ak. i1al. i1al1a i1alb i1ald i5alei i1alf
+i1alg i3alh i1alk i1all i1alp i1alr i1als i1alt i1alv i5alw i3alz
+i1an. ia5na i3and ian8e ia8ne8b i1ang i3ank i5ann i1ant i1anz i6apo
+i1ar. ia6rab i5arr i1as. i1asm i1ass i5ast. i1at. i5ats i1au i5azz
+i6b5eig i6b5eis ib2le i4blis i6brig i6b5unt \n{i6b"ub} i1che ich5ei
+i6cherb i1chi ich5ins ich1l ich3m ich1n i1cho icht5an icht3r i1chu
+ich1w ick6s5te ic5l i1d id3arm 3ideal ide8na 3ideol \n{ide5r"o} i6diot
+id5rec id1t ie1a ie6b5ar iebe4s3 ie2bl ieb1r ie8bra ie4bre \n{ie8b"a}
+ie2dr ie1e8 ie6f5ad ief5f ie2f1l ie4fro ief1t i1ei ie4l3ec ie8lei
+ie4lek i3ell i1en. i1end ien6e i3enf i5enn ien6ne. i1enp i1enr
+i5ensa ien8stal i5env i1enz ie5o ier3a4b ie4rap i2ere ie4rec ie6r5ein
+ie6r5eis ier8er i3ern. ie8rum ie8rund ie6s5che ie6tau ie8tert ie5the
+ie6t5ri i1ett ie5un iex5 2if i1fa if5ang i6fau if1fr if5lac i5f6lie
+i1fre ift5a if6t5r ig3art 2ige i8gess ig5he i5gla ig2ni i5go ig3rot
+ig3s2p i1ha i8ham i8hans i1he i1hi ih1n ih1r i1hu i8hum ih1w 8i1i ii2s
+ii2t i1j i1k i6kak i8kerz i6kes ik4ler i6k5unt 2il i5lac i1lag il3ans
+i5las i1lau il6auf i1le ile8h i8lel il2fl il3ipp il6l5enn i1lo ilt8e
+i1lu \n{i1l"a} i8mart imb2 i8mele i8mid imme6l5a i1mu \n{i1m"a}
+\n{i5m"o} ina5he i1nat in1au inau8s 8ind. in4d3an 5index ind2r 3indus
+i5nec i2n1ei i8nerw 3infek 1info 5ingeni ing5s6o 5inhab ini5er. 5inj
+\n{in8k"at} in8nan i1no inoi8d in3o4ku in5sau in1sp 5inspe 5instit
+5instru ins4ze 5intere 5interv in3the in5t2r i5ny \n{in"a2} \n{i1n"ar}
+\n{in1"as} \n{in"o8} \n{in5"od} \n{i1n"os} 2io io1a8 io1c iode4 io2di
+ioi8 i1ol. i1om. i1on. i5onb ion2s1 i1ont i5ops i5o8pt i1or.
+i3oral io3rat i5orc i1os. i1ot. i1o8x 2ip i1pa i1pi i1p2l i1pr i1q
+i1ra ir6bl i1re i1ri ir8me8d ir2m1o2 ir8nak i1ro ir5rho ir6schl
+ir6sch5r i5rus i5ry \n{i5r"a} i1sa i8samt i6sar i2s1au i8scheh i8schei
+isch5m isch3r \n{isch"a8} is8ele ise3ra i4s3erh is3err isi6de i8sind
+is4kop ison5e is6por i8s5tum i5sty \n{i5s"o} i1ta it5ab. i2t1a2m
+i8tax i1te i8tersc i1thi i1tho i5thr \n{it8h"a} i1ti i8ti8d iti6kl
+itmen4 i1to i8tof it3ran it3rau i1tri itri5o it1sc it2se it5spa it8tru
+i1tu it6z5erg it6z1w \n{i1t"a} \n{it"a6r5e} \n{it"at2} \n{it"ats5}
+\n{i1t"u} i1u iu6r 2i1v i6vad iva8tin i8vei i6v5ene i8verh i2vob i8vur
+i1w iwi2 i5xa i1xe i1z ize8n i8zir i6z5w \n{i"a8m} \n{i1"a6r}
+\n{i5"at.} \n{i5"av} \n{i1"o8} \n{i"u8} i6\35ers \c{i6\95ers} ja5la
+je2t3r 6jm 5jo jo5as jo1ra jou6l ju5cha jugen4 jugend5 jung5s6 ju1s
+\n{3j"a} 1ka 8kachs 8kakz ka1la kal5d kam5t ka1na 2kanl 8kapf ka6pl
+ka5r6a 6k3arbe ka1ro kar6p5f 4k3arti 8karz \n{ka1r"a} kasi5e ka6teb
+kat8ta kauf6s kau3t2 2k1b 2k1c 4k1d kehr6s kehrs5a 8keic 2k1eig 6k5ein
+6k5eis ke6lar ke8leis ke8lo 8kemp k5ente. k3entf 8k5ents 6kentz ke1ra
+k5erlau 2k1f8 2k1g 2k1h ki5fl 8kik king6s5 6kinh ki5os ki5sp ki5th
+\n{8ki8"o} 2k1k2 kl8 1kla 8klac k5lager kle4br k3leib 3kleid kle5isc
+4k3leit k3lek 6k5ler. 5klet 2klic 8klig k2lim k2lin 5klip 5klop k3lor
+\n{1kl"a} 2k1m kmani5e kn8 6kner k2ni \n{kn"a8} 1k2o ko1a2 ko6de.
+ko1i koi8t ko6min ko1op ko1or ko6pht ko3ra kor6d5er ko5ru ko5t6sc k3ou
+3kow 6k5ox 2k1p2 k1q 1kr8 4k3rad 2k1rec 4k3reic kre5ie 2krib 6krig
+2krip 6kroba 2ks k1sa k6sab ksal8s k8samt k6san k1sc k2s1ex k5spat
+k5spe k8spil ks6por k1spr kst8 k2s1uf 2k1t kta8l kt5a6re k8tein kte8re
+k2t1h k8tinf kt3rec kt1s 1ku ku1ch kuck8 k3uhr ku5ie kum2s1 kunfts5
+kun2s kunst3 ku8rau ku4ro kurz1 ku1st 4kusti ku1ta ku8\3 \c{ku8\9}
+6k1v 2k1w ky5n 2k1z \n{1k"a} \n{k"a4m} \n{4k3"ami} \n{k"ase5} \n{1k"o}
+\n{k"o1c} \n{k"o1s} \n{1k"u} \n{k"u1c} \n{k"ur6sc} \n{k"u1s} 1la.
+8labf 8labh lab2r 2l1abs lach3r la8dr 5ladu 8ladv 6laff laf5t la2gn
+5laken 8lamb la6mer 5lampe. 2l1amt la1na 1land lan4d3a lan4d3r lan4gr
+8lanme 6lann 8lanw \n{6lan"a} 8lappa lap8pl lap6pr l8ar. la5ra lar4af
+la8rag la8ran la6r5a6s l3arbe la8rei 6larm. la8sa la1sc la8sta lat8i
+6l5atm 4lauss 4lauto 1law 2lb l8bab l8bauf l8bede l4b3ins l5blo
+lbst5an lbst3e 8lc l1che l8chert l1chi lch3m l5cho lch5w 6ld l4d3ei
+ld1re \n{l6d"ub} le2bl le8bre lecht6s5 led2r 6leff le4gas 1lehr lei6br
+le8inf 8leinn 5leistu 4lektr le6l5ers lemo2 8lemp l8en. 8lends
+6lendun le8nend len8erw 6l5ents 4l3entw 4lentz 8lenzy 8leoz 6lepi
+le6pip 8lepo 1ler l6er. 8lerbs 6l5erde le8reis le8rend le4r3er 4l3erg
+l8ergr 6lerkl 6l5erzie \n{8ler"o} 8lesel lesi5e le3sko le3tha let1s
+5leuc 4leuro leu4s3t le5xe 6lexp l1f 2l1g lgend8 l8gh lglie3 lglied6
+6l1h 1li li1ar li1as 2lick li8dr li1en lien6n li8ers li8ert 2lie\3
+\c{2lie\9} 3lig li8ga8b li1g6n li1l8a 8limb li1na 4l3indu lings5
+4l3inh 6linj link4s3 4linkt 2lint 8linv lion5s6t 4lipp 5lipt 4lisam
+livi5e 6l1j 6l1k l8keim l8kj lk2l lko8f lkor8 lk2sa lk2se 6ll l1la
+ll3a4be l8labt ll8anl ll1b ll1c ll1d6 l1le l4l3eim l6l5eise ller3a
+l4leti l5lip l1lo ll3ort ll5ov ll6spr llte8 l1lu ll3urg \n{l1l"a}
+\n{l5l"u} \n{l6l"ub} 2l1m l6m5o6d 6ln l1na l1no 8lobl lo6br 3loch.
+l5o4fen 5loge. 5lohn 4l3ohr 1lok l2on 4l3o4per lo1ra 2l1ord 6lorg
+4lort lo1ru 1los. lo8sei 3losig lo6ve lowi5 6l1p lp2f l8pho l8pn
+lp4s3te l2pt l1q 8l1r 2ls l1sa l6sarm l1sc l8sec l6s5erg l4s3ers l8sh
+l5s6la l1sp ls4por ls2pu l1str l8suni \n{l1s"u} 2l1t lt5amp l4t3ein
+l5ten l6t5eng l6t5erp l4t3hei lt3her l2t1ho l6t5i6b lti1l \n{l8tr"o}
+lt1sc lt6ser lt4s3o lt5ums lu8br lu2dr lu1en8 8lu8fe luft3a luf8tr
+lu6g5r 2luh l1uhr lu5it 5luk 2l1umf 2l1umw 1lun 6l5u6nio 4l3unte lu5ol
+4lurg 6lurs l3urt lu4sto lu3str lu6st5re lu8su lu6tal lu6t5e6g lu8terg
+lu3the lu6t5or lu2t1r lu6\35 \c{lu6\95} l1v lve5r6u 2l1w 1ly lya6
+6lymp ly1no l8zess l8zo8f l3zwei lz5wu \n{3l"and} \n{l"a5on}
+\n{l"a6sc} \n{l"at1s} \n{5l"auf} \n{2l"aug} \n{l"au6s5c} \n{l"a5v}
+\n{l1"ol} \n{1l"os} \n{l"o1\36t} \n{\c{l"o1\96t}} \n{6l1"ube} 1ma
+8mabg ma5chan mad2 ma5el 4magg mag8n ma1la ma8lau mal5d 8malde mali5e
+malu8 ma8lut 2m1amp 3man mand2 man3ds 8mangr mani5o 8m5anst 6mappa
+4m3arbe mar8kr ma1r4o mar8schm 3mas ma1sc \n{ma1t"o} 4m5auf ma5yo 2m1b
+mb6r 2m1c 2m1d \n{md6s"a} 1me me1ch me5isc 5meld mel8sa 8memp me5nal
+men4dr men8schl men8schw 8mentsp me1ra mer4gl me1ro 3mes me6s5ei me1th
+me8\3 \c{me8\9} 2m1f6 2m1g 2m1h 1mi mi1a mi6ale mi1la 2m1imm mi1na
+\n{mi5n"u} mi4s3an mit1h mi5t6ra 3mitt mitta8 mi6\35 \c{mi6\95} 6mj
+2m1k8 2m1l 2m1m m6mad m6m5ak m8menth m8mentw mme6ra m2mn mm5sp mm5ums
+mmut5s \n{m8m"an} m1n8 m5ni 1mo mo5ar mo4dr 8mof mo8gal mo4kla mol5d
+m2on mon8do mo4n3od mont8a 6m5ony mopa6 mo1ra mor8d5a mo1sc mo1sp 5mot
+moy5 2mp m1pa mpfa6 mpf3l mphe6 m1pi mpin6 m1pl mp2li m2plu mpo8ste
+m1pr \n{mpr"a5} mp8th mput6 mpu5ts \n{m1p"o} 8m1q 2m1r 2ms ms5au m1sc
+msch4l ms6po m3spri m1str 2m1t mt1ar m8tein m2t1h mt6se \n{mt8s"a}
+mu5e 6m5uh mumi1 1mun mun6dr muse5e mu1ta 2m1v mvol2 mvoll3 2m1w 1my
+2m1z \n{m"a6kl} \n{1m"an} \n{m"a1s} \n{m"a5tr} \n{m"au4s3c} \n{3m"a\3}
+\n{\c{3m"a\9}} \n{m"ob2} \n{6m"ol} \n{1m"u} \n{5m"un} \n{3m"ut} 1na.
+n5ab. 8nabn n1abs n1abz \n{na6b"a} na2c nach3e 3nacht 1nae na5el
+n1afr 1nag 1n2ah na8ha na8ho 1nai 6nair na4kol n1akt nal1a 8naly 1nama
+na4mer na1mn n1amp 8n1amt 5nanc nan6ce n1and n6and. 2n1ang 1nani
+1nann n1ans 8nanw 5napf. 1n2ar. na2ra 2n1arc n8ard 1nari n8ark
+6n1arm 5n6ars 2n1art n8arv 6natm nat6s5e 1naue 4nauf n3aug 5naui n5auk
+na5um 6nausb 6nauto 1nav 2nax 3naz 1na\3 \c{1na\9} n1b2 nbau5s n1c
+nche5e nch5m 2n1d nda8d n2d1ak nd5ans n2d1ei nde8lac ndel6sa n8derhi
+nde4se nde8stal n2dj ndnis5 n6d5or6t nd3rec nd3rot nd8samt nd6sau
+ndt1h n8dumd 1ne ne5as ne2bl 6n5ebn 2nec 5neei ne5en ne1g4l 2negy
+4n1ein 8neis 4n3e4lem 8nemb 2n1emp nen1a 6n5energ nen3k 8nentb
+4n3en3th 8nentl 8n5entn 8n5ents ne1ra ne5r8al ne8ras 8nerbi 6n5erde.
+nere5i6d nerfor6 \n{6n5erh"o} \n{8nerl"o} 2n1err n8ers. 6n5ertra
+2n1erz nesi3e net1h neu4ra neu5sc 8neu\3 \c{8neu\9} n1f nf5f nf2l
+nflei8 nf5lin nft8st n8g5ac ng5d ng8en nge8ram ngg2 ng1h n6glic ng3rip
+ng8ru ng2se4 ng2si n2g1um n1gy \n{n8g"al} n1h nhe6r5e 1ni ni1bl
+\n{ni5ch"a} ni8dee n6ie ni1en nie6s5te niet5h ni8etn 4n3i6gel n6ik
+ni1la 2n1imp ni5na 2n1ind 8ninf 6n5inh ni8nit 6n5inn 2n1ins 4n1int
+n6is ni3str ni1th ni1tr n1j n6ji n8kad nk5ans n1ke n8kerla n1ki nk5inh
+\n{n5kl"o} n1k2n n8k5not nk3rot \n{n8kr"u} nk5spo nk6t5r n8kuh
+\n{n6k"ub} n5l6 nli4mi n1m nmen4s n1na n8nerg nni5o n1no nn4t3ak nnt1h
+nnu1e n1ny \n{n1n"a} \n{n1n"o} \n{n1n"u} no5a no4b3la 4n3obs 2nobt
+noche8 no6die no4dis no8ia no5isc 6n5o6leu no4mal noni6er 2n1onk n1ony
+4n3o4per 6nopf 6nopti no3ra no4ram nor6da 4n1org 2n1ort n6os no1st
+8nost. no8tan no8ter noty6pe 6n5ox n1p2 n1q n1r \n{nr"os3} 6ns n1sac
+ns3ang n1sc n8self n8s5erf n8serg n6serk ns5erw n8sint n1s2pe n1spr
+n6s5tat. n5s6te. n6stob n1str n1ta n4t3a4go nt5anh nt3ark nt3art
+n1te nt3eis nte5n6ar nte8nei nter3a nte6rei nt1ha nt6har n3ther nt5hie
+n3thus n1ti nti1c n8tinh nti1t ntlo6b ntmen8 n1to nt3o4ti n1tr ntra5f
+ntra5ut nt8rea nt3rec nt8rep n4t3rin nt8rop n4t3rot \n{n4tr"u} nt1s
+nts6an nt2sk n1tu nt1z \n{n1t"a} \n{n1t"o} \n{n8t"ol} \n{n1t"u} 1nu
+nu1a nu5el nu5en 4n1uhr nu5ie 8numl 6n5ums 6n5umw 2n1und 6nuni 6n5unr
+2n1unt 2nup 2nu6r n5uri nu3skr nu5ta n1v 8n1w 1nys n1za n6zab n2z1ar
+n6zaus nzi4ga n8zof n6z5unt n1zw n6zwir \n{1n"ac} \n{5n"ae} \n{5n"ai}
+\n{n8"al} \n{n"a6m} \n{n"a6re} \n{n5"arz} \n{5n"aus} \n{n1"ol}
+\n{1n"ot} \n{n5"oz} \n{5n"u.} \n{6n1"u2b} \n{5n"u\3} \n{\c{5n"u\9}}
+o5ab. oa2l o8ala o1a2m o1an ob1ac obe4ra o6berh 5o4bers o4beru
+obe6ser 1obj o1bl o2bli ob5sk 3obst. ob8sta obst5re ob5sz o1che
+oche8b o8chec o3chi och1l och3m ocho8f o3chro och3to o3chu och1w o1d
+o2d1ag od2dr ode5i ode6n5e od1tr o5e6b o5e6der. oe8du o1ef o1e2l
+o1e2p o1er. o5e8x o1fa of8fan 1offi of8fin of6f5la o5fla o1fr 8o1g
+og2n o1ha o1he o6h5eis o1hi ohl1a oh1le oh4l3er 5ohm. oh2ni o1ho
+oh1re oh1ru o1hu oh1w o1hy \n{o1h"a} o5ia o1id. o8idi oi8dr o5ids
+o5isch. oiset6 o1ism o3ist. o5i6tu o1j o1k ok2l ok3lau \n{o8kl"a}
+1okta o1la old5am old5r o1le ole5in ole1r ole3u ol6gl ol2kl olk4s1
+ol8lak ol8lauf. ol6lel ol8less o1lo ol1s ol6sk o1lu oly1e2 5olym
+o2mab om6an o8mau ombe4 o8merz om5sp o1mu o8munt \n{o1m"a} \n{o1m"o}
+o1na ona8m on1ax on8ent o6n5erb 8oni oni5er. on1k on6n5a6b o1no ono1c
+o4nokt 1ons onts8 \n{o1n"a} oo8f 1oog oo2pe oo2sa o1pa 3o4pera o3pfli
+opf3lo opf3r o1pi o1pl o2pli o5p6n op8pa op6pl o1pr o3p4ter 1opti
+\n{o1p"a} \n{o5p"o} o1q o1ra. o3rad o8radd 1oram o6rang o5ras o8rauf
+or5cha or4d3a4m or8dei or8deu 1ordn or4dos o1re o5re. ore2h o8r5ein
+ore5isc or6enn or8fla or8fli 1orga 5orgel. or2gl o1ri 5o6rient or8nan
+\n{or8n"a} o1ro or1r2h or6t5an or8tau or8tere o1rus o1ry \n{o1r"a}
+\n{or1"u2} o1sa osa3i 6ose o8serk o1sk o6ske o6ski os2kl os2ko os2kr
+osni5e o2s1o2d o3s4per o4stam o6stau o3stra ost3re osu6 o6s5ur o5s6ze
+o1ta ot3auf o6taus o1te o6terw o1th othe5u o2th1r o1ti o1to oto1a
+ot1re o1tri o1tro ot1sc o3tsu ot6t5erg ot2t3h ot2t5r \n{ot8t"o} o1tu
+ou3e ouf1 ou5f6l o5u6gr ou5ie ou6rar ou1t6a o1v o1wa o1we o6wer. o1wi
+owid6 o1wo o5wu o1xe oy5al. oy1e oy1i o5yo o1z oza2r 1o2zea ozo3is
+\n{o"o8} o\35elt \c{o\95elt} o\31t \c{o\91t} 3paa pa6ce 5pad pag2 1pak
+pa1la pa8na8t pani5el pa4nor pan1s2 1pap pap8s pa8rei par8kr paro8n
+par5o6ti part8e 5partei 3partn pas6sep pa4tha 1pau 6paug pau3sc p1b
+8p5c 4p1d 1pe 4peic pe5isc 2pek pen3k pen8to8 p8er pe1ra pere6 per5ea
+per5eb pe4rem 2perr per8ran 3pers 4persi \n{pe3r"u} pe4sta pet2s
+p2f1ec p4fei pf1f pf2l 5pflanz pf8leg pf3lei 2pft pf3ta p1g 1ph 2ph.
+2p1haf 6phb 8phd 6p5heit ph5eme 6phg phi6e 8phk 6phn p5holl pht2
+ph3tha 4ph3the phu6 6phz pi1en pi5err pi1la pi1na 5pinse pioni8e 1pis
+pi1s2k pi1th p1k pl8 5pla p2lau 4plei p3lein 2pler 6p5les 2plig p6lik
+6p5ling p2liz plo8min 6p1m p1n 1p2o 8poh 5pol po8lan poly1 po3ny po1ra
+2porn por4t3h \n{po5r"o} 5poti p1pa p6p5ei ppe6la pp5f p2p1h p1pi pp1l
+ppp6 pp5ren pp1s \n{p5p"o} pr6 3preis 1pres 2p3rig 5prinz 1prob 1prod
+5prog pro8pt pro6t5a prote5i 8pro\3 \c{8pro\9} \n{pr"a3l} \n{1pr"as}
+\n{pr"ate4} \n{1pr"uf} p5schl 2pst 1p2sy p1t p8to8d pt1s 5p6ty 1pu
+pu1b2 2puc pu2dr puf8fr 6p5uh pun8s pu8rei pu5s6h pu1ta p1v p3w 5py
+py5l p1z \n{p"a6der} \n{p5"a6m} \n{p"a8nu} \n{8p"ar} \n{p"at5h}
+\n{p"at1s} qu6 1qui 8rabk ra6bla 3rable ra2br r1abt 6rabz ra4dan ra2dr
+5rafal ra4f3er ra5gla ra2g3n 6raha ral5am 5rald 4ralg ra8lins 2rall
+ral5t 8ramei r3anal r6and ran8der ran4dr 8ranf 6ranga 5rangi ran8gli
+r3angr rans5pa 8ranw r8anz. ra5or 6rapf ra5pl rap6s5er 2r1arb 1rarh
+r1arm ra5ro 2r1art 6r1arz ra8tei ra6t5he 6ratl ra4t3ro r5atta raue4n
+6raus. r5austa rau8tel raut5s ray1 r1b rb5lass r6bler rb4lie rbon6n
+r8brecht \n{rb6s5t"a} r8ces r1che rch1l rch3m rch3re rch3tr rch1w 8rd
+r1da r8dachs r8dap rda5ro rde5ins rdio5 r8dir rd3ost r1dr r8drau 1re.
+re1ak 3reakt re3als re6am. re1as 4reben re6bl rech5a r8edi re3er
+8reff 3refl 2reh 5reha r4ei. reich6s5 8reier 6reign re5imp 4r3eina
+6r3einb 6reing 6r5einn 6reinr 4r3eins r3eint reli3e 8r5elt 6rempf
+2remt ren5a6b ren8gl r3enni 1reno 5rente 4r3enth 8rentl 4r3entw 8rentz
+ren4zw re1on requi5 1rer rer4bl 6rerbs 4r3erd \n{8rerh"o} 8rerkl
+4r3erla \n{8rerl"o} 4r3erns \n{6r5ern"a} rer5o 6r5erreg r5ertr r5erwec
+\n{r5er"o} re2sa re8schm 2ress re5u8ni 6rewo 2r1ex r1f r8ferd rf4lie
+8r1g r8gah rge4bl rge5na rgest4 rg6ne r2gni2 r8gob r4g3ret rg8sel r1h8
+r2hy 5rhyt ri1ar ri5cha rid2g r2ie rieg4s5 ri8ei ri1el ri6ele ri1en
+ri3er. ri5ers. ri6fan ri8fer ri8fr 1r2ig ri8kn ri5la \n{rim"a8}
+ri1na r8inde rin4ga rin6gr 1rinn 6rinner rino1 r8insp 4rinst
+\n{ri1n"a} ri5o6ch ri1o2d ri3o6st 2r1ir r2is ri3sko ri8spr \n{ri8st"u}
+ri5sv r2it 6r5i6tal ri5tr ri6ve. 8r1j 6rk r1ke rkehrs5 r1ki r3klin
+r1k2n rk3str rk4t3an rk6to r6kuh \n{rk"a4s3t} r1l r5li rline5a 6r1m
+r6manl rma4p r4m3aph r8minf r8mob rm5sa 2rn r1na rna8be r5ne rn2ei
+r6neif r6nex r6nh rn1k r1no r6n5oc rn1sp \n{r1n"a} \n{r1n"u} ro6bern
+6robs ro1ch 3rock. ro5de ro1e 4rofe ro8hert 1rohr ro5id ro1in ro5isc
+6rolym r2on 6roog ro6phan r3ort ro1s2p ro5s6w ro4tau ro1tr ro6ts 5rout
+r1p rpe8re rp2f r2ps r2pt r1q 2rr r1ra r1re rrer6 rr6hos \n{r5rh"o}
+r1ri r1ro rro8f rr8or rror5a r1ru r3ry \n{r1r"a} \n{r1r"o} \n{r1r"u}
+2r1s r6sab r4sanf rse6e rse5na r2sh r6ska r6ski rs2kl r8sko r2sl rs2p
+r6stauf r8sterw r8stran rswi3d4 r2sz 2r1t rt3art r8taut r5tei rt5eige
+r8tepe r4t3erh r8terla r4t3hei r5t6hu r4t3int rt5reif rt1sc rt6ser
+rt6s5o rt6s5u rt5und r8turt rube6 ru1en 1r4uf ruf4st ru1ie 2r1umg
+2r1uml 2rums run8der run4d5r 6rundz 6runf 8runs 2r1unt 2r1ur r6us
+ru6sta ru3str ru6tr 1ruts r1v rven1 rvi2c r1w r1x r1za rz5ac r6z5al
+r8z1ar r8zerd r6z5erf rz8erh rz4t3h r8zum \n{r"a4ste} \n{r"au8sc}
+\n{r1"of} \n{5r"ohr} \n{r"o5le} \n{3r"oll} \n{5r"omis} \n{r1"or}
+\n{r"o2sc} \n{3r"ump} 1sa. 1saa s3a4ben sa2bl 2s1abs 6s1abt 6sabw
+3sack. 6s3a4der 1saf sa1fa 4s1aff sa5fr 1sag 1sai sa1i2k1 4s1akt 1sal
+sa1la 4s3alpi 6salter salz3a 1sam s5anb san2c 1sand s5angeh 6sanl
+2s1ans 6s3antr 8s1anw s1ap s6aph 8sapo sap5p6 s8ar. 2s1arb 3sarg
+s1arm sa5ro 2s1art 6s1arz 1sas 1sat sat8a 2s1atl sa8tom 3s8aue s5auff
+sau5i s6aur 2s1aus 5s6ause 2s1b2 2sca s4ce 8sch. 3scha. 5schade
+3schaf 3schal sch5ame 8schanc 8schb 1sche 6schef 8schex 2schf 2schg
+2schh 1schi 2schk 5schlag 5schlu \n{6schm"a\3} \n{\c{6schm"a\9}}
+6schna\3 \c{6schna\9} 1scho 6schord 6schp 3schri 8schric 8schrig
+8schrou 6schs 2scht sch3ta sch3tr 1schu 8schunt 6schv 2schz \n{5sch"o}
+\n{5sch"u} 2sco scre6 6scu 2s1d 1se se5an se1ap se6ben se5ec see5i6g
+se3erl 8seff se6han se8hi \n{se8h"o} 6s5eid. 2s1eig s8eil 5sein.
+sei5n6e 6s5einh 3s8eit 3sel. se4lar selb4 6s3e4lem se8lerl 2s1emp
+sen3ac se5nec 6s5ents 4sentz s8er. se8reim ser5inn \n{8serm"a}
+8s5erzi \n{6ser"of} se1um 8sexa 6sexp 2s1f2 sfal8ler 2s3g2 sge5b2 s1h
+s8hew 5s6hip 5s4hop 1si 2siat si1b sicht6s 6s5i6dee siege6s5 si1en
+si5err si1f2 si1g2n si6g5r si8kau sik1i si4kin si2kl \n{si8k"u} si1la
+sil6br si1na 2s1inf sin5gh 2s1inh sinne6s5 2s1ins si5ru si5str 4s1j
+s1k2 6sk. 2skau skel6c skelch5 s6kele 1s2ki. 3s4kin. s6kiz s8kj
+6skn 2skow 3skrib 3skrip 2sku \n{8sk"u} s1l s8lal slei3t s4low 2s1m
+s1n 6sna 6snot 1so so1ch 2s1odo so4dor 6s5o4fen solo3 s2on so5of 4sope
+so1ra 2s1ord 4sorga sou5c so3un 4s3ox sp2 8spaa 5spal 1span 2spap
+s2pec s4peis 1spek s6perg 4spers s6pes 2s1pf 8sphi \n{1s2ph"a} 1spi
+spi4e 6s5pig 6spinse 2spis 2spla 2spol 5s6pom 6s5pos 6spoti 1spra
+3s8prec 6spreis 5spring 6sprob 1spru s2pul 1s2pur 6spy \n{5sp"an}
+\n{1sp"u} s1q 2s1r 2s1s2 sse8nu ssini6s ssoi6r 2st. 1sta 4stafe 2stag
+sta3la 6stale 4stalg 8stalk 8stamt 6st5anf 4stans 6stanw 6starb sta4te
+6staus 2stb 6stc 6std 1ste 4steil 3s2tel st3elb 8stemb 6steppi 8stese
+8stesse 6stf 2stg 2sth st1ha st3hei s8t1hi st1ho st5hu 1sti sti4el
+4stigm sti3na 6stind 4stinf sti8r 2stk 2stl 2stm 1sto 6stoll. 4st3ope
+6stopf. 6stord 6stp 5stra. 4strai 3s4tral 6s5traum 3stra\3
+\c{3stra\9} 3strec 6s3tref 8streib 5streif 6streno 6stres 6strev
+5s6tria 6strig 5strik 8strisi 3s4troa s8troma st5rose 4struf 3strum
+\n{6str"ag} 2st1s6 2stt 1stu stu5a 4stuc 2stue 8stun. 2stv 2stw s2tyl
+6stz \n{1st"a} \n{8st"ag} \n{1st"o} \n{1st"u} \n{8st"uch} \n{4st"ur.}
+1su su2b1 3suc su1e su2fe su8mar 6sumfa 8sumk 2s1unt sup1p2 6s5u6ran
+6surte 2s1v 2s1w 1sy 8syl. sy5la syn1 sy2na syne4 s1z s4zend 5s6zene.
+8szu \n{1s"a} \n{6s5"and} \n{6s"augi} \n{6s"au\3} \n{\c{6s"au\9}}
+\n{5s"om} \n{2s1"u2b} \n{1s"uc} \n{s"u8di} \n{1s"un} \n{5s"u\3}
+\n{\c{5s"u\9}} taats3 4tab. taba6k ta8ban tab2l ta6bre 4tabs t3absc
+8tabz 6t3acht ta6der 6tadr tad6s tad2t 1tafe4 1tag ta6ga6 ta8gei
+tage4s tag6s5t tah8 tahl3 tai6ne. ta5ir. tak8ta tal3au 1tale ta8leng
+tal5ert 6t5a6mer 6tamp tampe6 2t1amt tan5d6a tan8dr tands5a tani5e
+6tanl 2tanr t3ans 8t5antr tanu6 t5anw 8tanwa tan8zw ta8rau 6tarbe
+1tari 2tark 2t1arm ta1ro 2tart t3arti 6tarz ta1sc ta6sien ta8stem
+ta8sto t5aufb 4taufn 8taus. 5tause 8tausf 6tausg t5ausl 2t1b2 2t1c
+t6chu 2t1d te2am tea4s te8ben 5techn 4teff te4g3re te6hau 2tehe te4hel
+2t1ehr te5id. teig5l 6teign tei8gr 1teil 4teinh t5einhe 4teis t5eisen
+8teiw te8lam te4lar 4telek 8telem te6man te6n5ag ten8erw ten5k tens4p
+ten8tro 4t3entw 8tentz te6pli 5teppi ter5a6b te3ral ter5au 8terbar
+t5erbe. 6terben 8terbs 4t3erbt t5erde. ter5ebe ter5ein te8rers terf4
+\n{8terh"o} \n{6terkl"a} ter8nor ter6re. t8erscha t5e6sel te8stau
+t3euro te1xa tex3e 8texp tex6ta 2t1f2 2t1g2 2th. th6a 5tha. 2thaa
+6t1hab 6t5haf t5hah 8thak 3thal. 6thals 6t3hand 2t1hau 1the. 3t4hea
+t1heb t5heil t3heit t3helf 1theo 5therap 5therf 6t5herz 1thes 1thet
+5thi. 2t1hil t3him 8thir 3this t5hj 2th1l 2th1m th1n t5hob t5hof
+4tholz 6thopti 1thr6 4ths t1hum 1thy \n{4t1h"a} \n{2t1h"o} \n{t1h"u}
+ti1a2m ti1b tie6fer ti1en ti8gerz tig3l ti8kin ti5lat 1tilg t1ind
+tin4k3l ti3spa ti5str 5tite ti5tr ti8vel ti8vr 2t1j 2t1k2 2t1l tl8a
+2t1m8 2t1n 3tobe 8tobj to3cha 5tocht 8tock tode4 to8del to8du to1e
+6t5o6fen to1in toi6r 5toll. to8mene t2ons 2t1ony to4per 5topf. 6topt
+to1ra to1s to6ska tos2l 2toti to1tr t8ou 2t1p2 6t1q tr6 tra5cha
+tra8far traf5t 1trag tra6gl tra6gr t3rahm 1trai t6rans tra3sc tra6st
+3traue t4re. 2trec t3rech t8reck 6t1red t8ree 4t1reg 3treib 4treif
+8t3reis 8trepo tre6t5r t3rev 4t3rez 1trib t6rick tri6er 2trig t8rink
+tri6o5d trizi5 tro1a 3troc trocke6 troi8d tro8man. tro3ny 5tropf
+6t5rosa t5ro\3 \c{t5ro\9} 5trub 5trup trut5 \n{1tr"ag} \n{6t1r"oh}
+\n{5tr"ub} \n{tr"u3bu} \n{t1r"uc} \n{t1r"us} 2ts ts1ab t1sac tsa8d
+ts1ak t6s5alt ts1an ts1ar ts3auf t3schr \n{t5sch"a} tse6e tsee5i
+tsein6s ts3ent ts1er t8serf t4serk t8sh 5t6sik t4s3int ts5ort.
+t5s6por t6sprei t1st t6s5tanz ts1th t6stit t4s3tor 1t2sua t2s1uf
+t8sum. t2s1u8n t2s1ur 2t1t tt5eif tte6sa tt1ha tt8ret tt1sc tt8ser
+tt5s6z 1tuc tuch5a 1tu1e 6tuh t5uhr tu1i tu6it 1tumh 6t5umr 1tums
+8tumt 6tund 6tunf 2t1unt tu5ra tu6rau tu6re. tu4r3er 2t1v 2t1w 1ty1
+ty6a ty8la 8tym 6ty6o 2tz tz5al tz1an tz1ar t8zec tzeh6 tzehn5 t6z5ei.
+t6zor t4z3um \n{t6z"au} \n{5t"ag} \n{6t"ah} \n{t5"alt} \n{t8"an}
+\n{t"are8} \n{8t"a8st} \n{6t"au\3} \n{\c{6t"au\9}} \n{t5"offen}
+\n{8t"o8k} \n{1t"on} \n{4t"ub} \n{t6"u5ber.} \n{5t"uch} \n{1t"ur.}
+u3al. u5alb u5alf u3alh u5alk u3alp u3an. ua5na u3and u5ans u5ar.
+ua6th u1au ua1y u2bab ubi5er. u6b5rit ubs2k \n{u5b"o} \n{u8b"ub} 2uc
+u1che u6ch5ec u1chi uch1l uch3m uch5n uch1r uch5to ucht5re u1chu uch1w
+uck1a uck5in u1d ud4a u1ei u6ela uene8 u6ep u1er uer1a ue8rerl uer5o
+u8esc u2est u8ev u1fa u2f1ei u4f3ent u8ferh uf1fr uf1l uf1ra uf1re
+\n{uf1r"a} \n{uf1r"u} uf1s2p uf1st uft1s u8gabt u8gad u6gap ugeb8 u8gn
+ugo3s4 u1ha u1he u1hi uh1le u1ho uh1re u1hu uh1w \n{u1h"a} \n{u1h"o}
+6ui ui5en u1ig u3ins uin8tes u5isch. u1j 6uk u1ke u1ki u1kl u8klu
+u1k6n u5ky u1la uld8se u1le ul8lac ul6lau ul6le6l ul6lo ulni8 u1lo
+ulo6i ult6a ult8e u1lu ul2vr \n{u1l"a} \n{u1l"o} 3umfan 5umlau umo8f
+um8pho u1mu umu8s \n{u5m"o} u1n1a un2al un6at unau2 6und. 5undein
+un4d3um 3undzw \n{und"u8} \n{un8d"ub} une2b un1ec une2h un3eis 3unfal
+\n{1unf"a} 5ungea \n{3ungl"u} ung2s1 \n{un8g"a} 1u2nif un4it un8kro
+unk5s u1no unpa2 uns2p unvol4 unvoll5 u5os. u1pa u1pi u1p2l u1pr
+up4s3t up2t1a u1q u1ra ur5abs ura8d ur5ah u6rak ur3alt u6rana u6r5ans
+u8rap ur5a6ri u8ratt u1re ur3eig ur8gri u1ri ur5ins 3urlau urmen6
+ur8nan u1ro 3ursac ur8sau ur8sei ur4sk 3urtei u1ru uru5i6 uru6r u1ry
+ur2za \n{ur6z"a} \n{ur5"a6m} \n{u5r"o} \n{u1r"u} \n{ur"uck3} u1sa
+usa4gi u2s1ar u2s1au u8schec usch5wi u2s1ei use8kel u8sl u4st3a4b
+us3tau u3s4ter u2s1uf u8surn ut1ac u1tal uta8m u1tan ut1ar u1tas ut1au
+u1te u8teic u4tent u8terf u6terin u4t3hei ut5ho ut1hu u1ti utine5
+uti6q u1to uto5c u1tr ut1sa ut1s6p ut6stro u1tu utz5w u1u u1v uve5n
+\n{uve3r4"a} u1w u1xe u5ya uy5e6 u1yi u2z1eh u8zerh \n{u5"o} u\3e6n
+\c{u\9e6n} u\3en5e \c{u\9en5e} 8vanb 6vang 6varb var8d va6t5a va8tei
+va2t1r 2v1b 6v5c 6vd 1ve 6ve5g6 ver1 ver5b verb8l ve2re2 verg8 ve2ru8
+ve1s ve2s3p ve3xe 2v1f 2v1g 6v5h vi6el vie6w5 vi1g4 vi8leh vil6le.
+8vint vi1ru vi1tr 2v1k 2v1l 2v1m 4v5n 8vo8f voi6le vol8lend vol8li
+v2or1 vo2re vo8rin vo2ro 2v1p 8vra v6re 2v1s 2v1t 2v1v 4v3w 2v1z
+waffe8 wa6g5n 1wah wah8n wa5la wal8din wal6ta wan4dr 5ware wa8ru
+war4za 1was w5c w1d 5wech we6fl 1weg we8geng weg5h weg3l we2g1r
+weh6r5er 5weise weit3r wel2t welt3r we6rat 8werc 5werdu wer4fl 5werk.
+wer4ka wer8ku wer4ta wer8term we2sp we8stend we6steu we8str
+\n{we8st"o} wet8ta wich6s5t 1wid wi2dr wiede4 wieder5 wik6 wim6ma
+win4d3r 5wirt wisch5l 1wj 6wk 2w1l 8w1n wo1c woche6 wol6f wor6t5r 6ws2
+w1sk 6w5t 5wunde. wun6gr wu1sc wu2t1 6w5w wy5a \n{w"arme5} \n{w"a1sc}
+1xag x1ak x3a4men 8xamt x1an 8x1b x1c 1xe. x3e4g 1xen xe1ro x1erz
+1xes 8xf x1g 8x1h 1xi 8xid xi8so 4xiste x1k 6x1l x1m 8xn 1xo 8x5o6d
+8x3p2 x1r x1s6 8x1t x6tak x8terf x2t1h 1xu xu1e x5ul 6x3w x1z 5ya.
+y5an. y5ank y1b y1c y6cha y4chia y1d yen6n y5ern y1g y5h y5in y1j
+y1k2 y1lak yl1al yla8m y5lax y1le y1lo y5lu y8mn ym1p2 y3mu y1na yno2d
+yn1t y1on. y1o4p y5ou ypo1 y1pr y8ps y1r yri3e yr1r2 y1s ys5iat ys8ty
+y1t y3w y1z \n{y"a8m} z5a6b zab5l 8za6d 1zah za5is 4z3ak 6z1am 5zange.
+8zanl 2z1ara 6z5as z5auf 3zaun 2z1b 6z1c 6z1d 1ze ze4dik 4z3eff 8zein
+zei4ta zei8ters ze6la ze8lec zel8th 4zemp 6z5engel zen8zin \n{8zerg"a}
+zer8i ze1ro zers8 zerta8 zer8tab zer8tag 8zerz ze8ste zeu6gr 2z1ex
+2z1f8 z1g 4z1h 1zi zi1en zi5es. 4z3imp zi1na 6z5inf 6z5inni zin6s5er
+8zinsuf zist5r zi5th zi1tr 6z1j 2z1k 2z1l 2z1m 6z1n 1zo zo6gl 4z3oh
+zo1on zor6na8 4z1p z5q 6z1r 2z1s8 2z1t z4t3end z4t3hei z8thi 1zu zu3al
+zu1b4 zu1f2 6z5uhr zun2a 8zunem zunf8 8zungl zu1o zup8fi zu1s8 zu1z
+2z1v zw8 z1wal 5zweck zwei3s z1wel z1wer z6werg 8z5wes 1zwi zwi1s
+6z1wo 1zy 2z1z zz8a zzi1s \n{1z"a} \n{1z"o} \n{6z"ol.} \n{z"o1le}
+\n{1z"u} \n{2z1"u2b} \n{"a1a6} \n{"ab1l} \n{"a1che} \n{"a3chi}
+\n{"ach8sc} \n{"ach8sp} \n{"a5chu} \n{"ack5a} \n{"ad1a} \n{"ad5era}
+\n{"a6d5ia} \n{"a1e} \n{"a5fa} \n{"af1l} \n{"aft6s} \n{"ag1h}
+\n{"ag3le} \n{"a6g5nan} \n{"ag5str} \n{"a1he} \n{"a1hi} \n{"ah1le}
+\n{"ah5ne} \n{1"ahnl} \n{"ah1re} \n{"ah5ri} \n{"ah1ru} \n{"a1hu}
+\n{"ah1w} \n{6"ai} \n{"a1isc} \n{"a6ische} \n{"a5ism} \n{"a5j}
+\n{"a1k} \n{"al1c} \n{"a1le} \n{"a8lei} \n{"al6schl} \n{"ami1e}
+\n{"am8n} \n{"am8s} \n{"a5na} \n{5"anderu} \n{"ane5i8} \n{"ang3l}
+\n{"ank5l} \n{"a1no} \n{"an6s5c} \n{"a1pa} \n{"ap6s5c} \n{3"aq}
+\n{"ar1c} \n{"a1re} \n{"are8m} \n{5"argern} \n{"ar6gl} \n{"a1ri}
+\n{3"armel} \n{"a1ro} \n{"art6s5} \n{"a1ru} \n{3"arztl} \n{"a5r"o}
+\n{"a6s5chen} \n{"asen8s} \n{"as1th} \n{"ata8b} \n{"a1te} \n{"ateri4}
+\n{"ater5it} \n{"a6thy} \n{"a1ti} \n{3"atk} \n{"a1to} \n{"at8schl}
+\n{"ats1p} \n{"a5tu} \n{"aub1l} \n{"au1e} \n{1"aug} \n{"au8ga}
+\n{"au5i} \n{"a1um.} \n{"a1us.} \n{1"au\3} \n{\c{1"au\9}} \n{"a1z}
+\n{"o1b} \n{"o1che} \n{"o5chi} \n{"och8stei} \n{"och8str} \n{"ocht6}
+\n{5"o6dem} \n{5"offn} \n{"o1he} \n{"oh1l8} \n{"oh1re} \n{"o1hu}
+\n{"o1is} \n{"o1ke} \n{1"o2ko} \n{1"ol.} \n{"ol6k5l} \n{"ol8pl}
+\n{"o1mu} \n{"o5na} \n{"onig6s3} \n{"o1no} \n{"o5o6t} \n{"opf3l}
+\n{"op6s5c} \n{"o1re} \n{"or8gli} \n{"o1ri} \n{"or8tr} \n{"o1ru}
+\n{5"osterr} \n{"o1te} \n{"o5th} \n{"o1ti} \n{"o1tu} \n{"o1v} \n{"o1w}
+\n{"owe8} \n{"o2z} \n{"ub6e2} \n{3"u4ber1} \n{"ub1l} \n{"ub1r}
+\n{5"u2bu} \n{"u1che} \n{"u1chi} \n{"u8ch3l} \n{"uch6s5c} \n{"u8ck}
+\n{"uck1a} \n{"uck5ers} \n{"ud1a2} \n{"u6deu} \n{"udi8t} \n{"u2d1o4}
+\n{"ud5s6} \n{"uge4l5a} \n{"ug1l} \n{"uh5a} \n{"u1he} \n{"u8heh}
+\n{"u6h5erk} \n{"uh1le} \n{"uh1re} \n{"uh1ru} \n{"u1hu} \n{"uh1w}
+\n{"u3k} \n{"u1le} \n{"ul4l5a} \n{"ul8lo} \n{"ul4ps} \n{"ul6s5c}
+\n{"u1lu} \n{"un8da} \n{"un8fei} \n{"unk5l} \n{"un8za} \n{"un6zw}
+\n{"u5pi} \n{"u1re} \n{"u8rei} \n{"ur8fl} \n{"ur8fr} \n{"ur8geng}
+\n{"u1ri} \n{"u1ro} \n{"ur8sta} \n{"ur8ster} \n{"u1ru} \n{"use8n}
+\n{"u8sta} \n{"u8stes} \n{"u6s5tete} \n{"u3ta} \n{"u1te} \n{"u1ti}
+\n{"ut8tr} \n{"u1tu} \n{"ut8zei} \n{"u1v} \31a8 \c{\91a8} 5\3a.
+\c{5\9a.} \38as \c{\98as} \31b8 \c{\91b8} \31c \c{\91c} \31d \c{\91d}
+1\3e \c{1\9e} \35ec \c{\95ec} 8\3e8g \c{8\9e8g} 8\3e8h \c{8\9e8h}
+2\31ei \c{2\91ei} 8\3em \c{8\9em} \31f8 \c{\91f8} \31g \c{\91g} \31h
+\c{\91h} 1\3i \c{1\9i} \31k \c{\91k} \31l \c{\91l} \31m \c{\91m}
+\3mana8 \c{\9mana8} \31n \c{\91n} \31o \c{\91o} \31p8 \c{\91p8} \35q
+\c{\95q} \31r \c{\91r} \31s2 \c{\91s2} \3st8 \c{\9st8} \31ta \c{\91ta}
+\31te \c{\91te} \3t3hei \c{\9t3hei} \31ti \c{\91ti} \35to \c{\95to}
+\31tr \c{\91tr} 1\3u8 \c{1\9u8} 6\35um \c{6\95um} \31v \c{\91v} \31w
+\c{\91w} \31z \c{\91z}
+}%
+\endgroup
+\relax\endinput
+%
+% -----------------------------------------------------------------
+%
+% =============== Additional Documentation ===============
+%
+%
+% Older Versions of German Hyphenation Patterns:
+% ----------------------------------------------
+%
+% All older versions of `ghyphen.tex' distributed as
+%
+% ghyphen.tex/germhyph.tex as of 1986/11/01
+% ghyphen.min/ghyphen.max as of 1988/10/10
+% ghyphen3.tex as of 90/09/27 & 91/02/13
+%
+% are out of date and it is recommended to replace them
+% with the new version `ghyph31.tex'.
+%
+% If you are using `ghyphen.min' (a minor version of `ghyphen')
+% because of limited trie memory space, try this version and if
+% the space is exceeded get a newer TeX implementation with
+% larger or configurable trie memory sizes.
+%
+%
+%
+% Trie Memory Requirements/Space for Hyphenation Patterns:
+% --------------------------------------------------------
+%
+% To load this set of german hyphenation patterns the parameters
+% of TeX has to have at least these values:
+%
+% TeX 3.x:
+% IniTeX: trie_size >= 9733 trie_op_size >= 207
+% VirTeX: trie_size >= 8375 trie_op_size >= 207
+%
+% TeX 2.x:
+% IniTeX: trie_size >= 8675 trie_op_size >= 198
+% VirTeX: trie_size >= 7560 trie_op_size >= 198
+%
+% If you want to load more than one set of hyphenation patterns
+% (in TeX 3.x), the parameters have to be set to a value larger
+% than or equal to the sum of all required values for each set.
+%
+%
+% Setting Trie Memory Parameters:
+% -------------------------------
+%
+% Some implementations allow the user to change the default value
+% of a set of the internal TeX parameters including the trie memory
+% size parameter specifying the used memory for the hyphenation
+% patterns.
+%
+% emTeX (PC):
+% You can set the used memory size of the trie using the
+% `-mt<number>' option on the command line or in the
+% TEXOPTIONS environment variable.
+%
+% PasTeX (Amiga):
+% The values for the parameters can be set using the keywords
+% `triesize', `itriesize' and `trieopsize' in the configuration
+% file.
+%
+% others (binaries only):
+% See the documentation of the implementation if it is possible
+% and how to change these values without recompilation.
+%
+% others (with sources, e.g. PublicTeX (PC), web2c (Unix et.al.)):
+% If the trie memory is too small, you have to recompile TeX
+% using larger values for `trie_size' and `trie_op_size'.
+% Modify the change file pctex.ch/ctex.ch and recompile TeX.
+% For details see the documentation included in the sources.
+%
+%
+%
+% Necessary Settings in TeX macro files:
+% --------------------------------------
+%
+% \lefthyphenmin, \righthyphenmin:
+% You can set both parameters to 2.
+%
+% \lccode <char>:
+% To get correct hyphenation points within words containing
+% umlauts or \ss, it's necessary to assign values > 0 to the
+% appropriate \lccode <char> positions.
+%
+% These changes are done when reading this file (\lccode for umlauts)
+% or are included in the language switching mechanism of `german.sty'
+% (\lccode change for \ss, \left-/\righthyphenmin settings).
+%
+%
+%% \CharacterTable
+%% {Upper-case \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
+%% Lower-case \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
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\endinput
+%%
+%% End of file `ghyph31.tex'.
diff --git a/tex/context/base/lang-en.pat b/tex/context/base/lang-en.pat
index 57341a7a2..efd11cdf1 100644
--- a/tex/context/base/lang-en.pat
+++ b/tex/context/base/lang-en.pat
@@ -1,4468 +1,4467 @@
-% 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
+% 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
diff --git a/tex/context/base/lang-fr.pat b/tex/context/base/lang-fr.pat
index 374822e74..d5edc1a39 100644
--- a/tex/context/base/lang-fr.pat
+++ b/tex/context/base/lang-fr.pat
@@ -1,511 +1,510 @@
-% 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
+% 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
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index 569807766..11daf873f 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -1,536 +1,586 @@
-%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!datum={\v!maand,\ ,\v!dag,{,\ },\v!jaar},
- \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 Rather new ...
-
-\setuplabeltext [\s!nl] [\v!oppagina=op pagina]
-\setuplabeltext [\s!nl] [\v!hierboven=hierboven]
-\setuplabeltext [\s!nl] [\v!hieronder=hieronder]
-
-%D ... and to be completed!
-
-%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
+%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!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!maand,\ ,\v!dag,{,\ },\v!jaar},
+ \c!status=\v!stop] % elders 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!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!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!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!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!status=\v!stop]
+
+%D Hey look, some experiment:
+
+\installlanguage % eight bit dutch
+ [nlx]
+ [\c!spatiering=\v!opelkaar,
+ \c!default=\s!nl,
+ \c!status=\v!stop]
+
+\installlanguage % old german
+ [deo]
+ [\c!spatiering=\v!opelkaar,
+ \c!default=\s!de,
+ \c!status=\v!stop]
+
+%D And some alternative (but very real) english patterns:
+
+\installlanguage
+ [uk]
+ [\c!default=\s!en,
+ \c!status=\v!stop]
+
+\installlanguage
+ [us]
+ [\c!default=\s!en,
+ \c!status=\v!stop]
+
+%D For compatibility reasons we also define:
+
+\installlanguage [du] [\s!de] % old times context
+
+\installlanguage [usenglish] [\s!us]
+\installlanguage [ukenglish] [\s!uk]
+\installlanguage [english] [\s!en]
+\installlanguage [dutch] [\s!nl]
+\installlanguage [german] [\s!de]
+\installlanguage [danish] [\s!da]
+\installlanguage [swedish] [\s!sv]
+\installlanguage [afrikaans] [\s!af]
+\installlanguage [norwegian] [\s!no]
+
+%D The next section is dedicated to Tobias Burnus.
+
+\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
+
+%D An experimental hack:
+
+\startencoding[pdfdoc]
+ \startlanguagespecifics[de]% hm
+ \defineactivecharacter " {\"}
+ \stoplanguagespecifics
+\stopencoding
+
+%D This hack should be perfected.
+
+\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!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!nl] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!de] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!da] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sv] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!af] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!no] [\v!sub\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 Rather new ...
+
+\setuplabeltext [\s!nl] [\v!oppagina=op pagina]
+\setuplabeltext [\s!nl] [\v!hierboven=hierboven]
+\setuplabeltext [\s!nl] [\v!hieronder=hieronder]
+\setuplabeltext [\s!nl] [\v!zie=zie]
+
+\setuplabeltext [\s!en] [\v!oppagina=at page]
+\setuplabeltext [\s!en] [\v!hierboven=as we show above]
+\setuplabeltext [\s!en] [\v!hieronder=as we show below]
+\setuplabeltext [\s!en] [\v!zie=see]
+
+\setuplabeltext [\s!de] [\v!oppagina=auf Seite]
+\setuplabeltext [\s!de] [\v!hierboven=siehe oben]
+\setuplabeltext [\s!de] [\v!hieronder=siehe unten]
+\setuplabeltext [\s!de] [\v!zie=sieh]
+
+%D ... and to be completed!
+
+%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
diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex
index 51590dd06..7041962a9 100644
--- a/tex/context/base/lang-grk.tex
+++ b/tex/context/base/lang-grk.tex
@@ -1,23 +1,22 @@
-%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
+%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
diff --git a/tex/context/base/lang-hnl.tex b/tex/context/base/lang-hnl.tex
index 32317499f..5932769c3 100644
--- a/tex/context/base/lang-hnl.tex
+++ b/tex/context/base/lang-hnl.tex
@@ -1,33 +1,32 @@
-%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
+%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
diff --git a/tex/context/base/lang-ind.tex b/tex/context/base/lang-ind.tex
index 29df64cae..f1e50901d 100644
--- a/tex/context/base/lang-ind.tex
+++ b/tex/context/base/lang-ind.tex
@@ -1,23 +1,22 @@
-%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
+%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
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index f42373a7b..743714206 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -1,508 +1,618 @@
-%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 command 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
+%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 (n=--)
+ 2: geen afbreekpatronen -- voor -- (n=--)
+ 3: afbreekdefinities -- voor -- geladen (n=--)
+ 4: geen afbreekdefinities -- voor -- (n=--)
+ 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 (n=--)
+ 2: no patterns -- for -- (n=--)
+ 3: hyphenations -- for -- loaded (n=--)
+ 4: no hyphenations -- for -- (n=--)
+ 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 (n=--)
+ 2: Keine Trennmuster -- fuer -- (n=--)
+ 3: Trenndefinitionen -- fuer -- geladen (n=--)
+ 4: Keine Trenndefinitionen -- fuer -- (n=--)
+ 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 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 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#2% #2 added
+ {\doifundefined{#1}{\setvalue{#1}{\language[#2]}}%
+ \expanded{\noexpand\uppercase{\noexpand\edef\noexpand\ascii{#1}}}%
+ \doifundefined{\ascii}{\setvalue{\ascii}{\language[#2]}}}
+
+\def\doinstalllanguage[#1][#2]%
+ {\doifinstringelse{=}{#2}
+ {\doifdefinedelse{\??la#1\c!status}
+ {\getparameters[\??la#1][#2]}
+ {\setvalue{\l!prefix!#1}{#1}%
+ \dodoinstalllanguage{#1}{#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,
+ \c!default=,
+ \s!patterns=,
+ \s!mapping=,
+ \s!encoding=,
+ #2]%
+ \doifvaluesomething{\??la#1\c!default}
+ {\doifnotvalue{\??la#1\c!default}{#1}
+ {\getparameters
+ [\??la#1]
+ [\s!lefthyphenmin=\languagedefault{#1}\s!lefthyphenmin,
+ \s!righthyphenmin=\languagedefault{#1}\s!righthyphenmin,
+ \c!spatiering=\languagedefault{#1}\c!spatiering,
+ \c!leftsentence=\languagedefault{#1}\c!leftsentence,
+ \c!rightsentence=\languagedefault{#1}\c!rightsentence,
+ \c!leftsubsentence=\languagedefault{#1}\c!leftsubsentence,
+ \c!rightsubsentence=\languagedefault{#1}\c!rightsubsentence,
+ \c!leftquote=\languagedefault{#1}\c!leftquote,
+ \c!rightquote=\languagedefault{#1}\c!rightquote,
+ \c!leftquotation=\languagedefault{#1}\c!leftquotation,
+ \c!rightquotation=\languagedefault{#1}\c!rightquotation,
+ \c!datum=\languagedefault{#1}\c!datum,
+ \s!mapping=\languagedefault{#1}\s!mapping,
+ \s!encoding=\languagedefault{#1}\s!encoding,
+ #2]}}}%
+ \doifvalue{\??la#1\c!default}{#1} {\letvalue{\??la#1\c!default}\empty}%
+ \doifvalue{\??la#1\s!patterns}{#1}{\letvalue{\??la#1\c!default}\empty}%
+ \doifelsevalue{\??la#1\c!status}{\v!start}
+ {\doifelsevaluenothing{\??la#1\s!patterns}
+ {\edef\languagesuffix{#1}}
+ {\edef\languagesuffix{\getvalue{\??la#1\s!patterns}}}%
+ \doifundefinedelse{\??la\??la\languagesuffix}
+ {\normallanguage=\loadedlanguage
+ \letvalue{\??la\??la\languagesuffix}=\loadedlanguage
+ \bgroup
+ \startencoding[\getvalue{\??la\languagesuffix\s!encoding}]%
+ \usemapping[\getvalue{\??la\languagesuffix\s!mapping}]%
+ \readsysfile{\f!languageprefix\languagesuffix.\f!patternsextension}
+ {\setxvalue{\??la#1\s!patterns}{\languagesuffix}%
+ \showmessage{\m!linguals}{1}{\languagesuffix,#1,\loadedlanguage}}
+ {\showmessage{\m!linguals}{2}{\languagesuffix,#1,\loadedlanguage}}%
+ \readsysfile{\f!languageprefix\languagesuffix.\f!hyphensextension}
+ {\showmessage{\m!linguals}{3}{\languagesuffix,#1,\loadedlanguage}}
+ {\showmessage{\m!linguals}{4}{\languagesuffix,#1,\loadedlanguage}}%
+ \stopencoding
+ \egroup
+ \increment\loadedlanguage}
+ {\bgroup
+ \edef\loadedlanguage{\getvalue{\??la\??la\languagesuffix}}%
+ \showmessage{\m!linguals}{1}{\languagesuffix,#1,\loadedlanguage}%
+ \showmessage{\m!linguals}{3}{\languagesuffix,#1,\loadedlanguage}%
+ \egroup}}
+ {\showmessage{\m!linguals}{5}{#1}}}
+ {\setvalue{\l!prefix!#1}{#2}%
+ \dodoinstalllanguage{#1}{#2}}}
+
+% ^^ \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 command 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 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, where the relation between number
+%D and language depends on the order in installing languages.
+%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\setnormallanguage#1#2%
+ {\doifdefined{\??la\??la#2}{\doifvaluesomething{\??la\??la#2}
+ {\donetrue
+ \setxvalue{\??la#1\s!patterns}{#2}%
+ \normallanguage=\getvalue{\??la\??la#2}}}}
+
+\def\docomplexlanguage[#1]%
+ {\donefalse
+ \setnormallanguage{#1}{\getvalue{\??la#1\s!patterns}}%
+ \ifdone\else
+ \setnormallanguage{#1}{#1}%
+ \ifdone\else
+ \doifvaluesomething{\??la#1\c!default}
+ {\setnormallanguage{#1}{\getvalue{\??la\defaultlanguage{#1}\s!patterns}}%
+ \ifdone\else
+ \setnormallanguage{#1}{\defaultlanguage{#1}}%
+ \fi}%
+ \fi
+ \fi
+ \edef\currentlanguage{#1}%
+ \enablelanguagespecifics[#1]%
+ \usemapping[\getvalue{\??la#1\s!mapping}]%
+ \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!
+
+\def\mainlanguage[#1]%
+ {\@EA\let\@EA\currentmainlanguage\csname\l!prefix!#1\endcsname
+ \language[#1]}
+
+%D \macros
+%D {defaultlanguage,languagedefault}
+%D
+%D The macro \type {\defaultlanguage{id}} expands into the
+%D default language, when defined, while \type
+%D {\languagedefault{id}\c!parameter} returns the default's
+%D parameter.
+
+\def\defaultlanguage#1%
+ {\@EA\ifx\csname\??la#1\c!default\endcsname\empty
+ #1%
+ \else
+ \@EA\defaultlanguage\@EA{\csname\??la#1\c!default\endcsname}%
+ \fi}
+
+\def\languagedefault#1#2%
+ {\csname\??la\defaultlanguage{#1}#2\endcsname}
+
+%D \macros
+%D {startlanguagespecifics,enablelanguagespecifics}
+%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% % we use double to
+ {\bgroup
+ \catcode`\^^I=\@@ignore
+ \catcode`\^^M=\@@ignore
+ \catcode`\^^L=\@@ignore
+ \dodoubleempty\dostartlanguagespecifics} % get rid of spaces
+
+%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.
+
+\def\languageencoding%
+ {\ifx\characterencoding\@plain@\else
+ \characterencoding-%
+ \fi}
+
+\long\def\dostartlanguagespecifics[#1][#2]#3\stoplanguagespecifics%
+ {\egroup
+ \long\def\docommando##1%
+ {\doifdefinedelse{\??la\languageencoding##1\??la}
+ {\long\def\do####1####2####3%
+ {\setvalue{\??la\languageencoding####1\??la}{\do{####1}{####2####3}}}%
+ \getvalue{\??la\languageencoding##1\??la}{#3}}
+ {\setvalue{\??la\languageencoding##1\??la}{\do{##1}{#3}}}%
+ \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
+ \doif{##1}{\currentmainlanguage}
+ {\enablelanguagespecifics[##1]}}%
+ \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}}
+
+\def\enablelanguagespecifics[#1]%
+ {\long\def\do##1##2{##2}%
+ \getvalue{\??la#1\??la}%
+ \getvalue{\??la\languageencoding#1\??la}}
+
+%D \macros
+%D {leftguillemot,rightguillemot,leftsubguillemot,rightsubguillemot,
+%D ...single...quote,...double...quote}
+%D
+%D We assign logical names to all kind of quote and sentence
+%D boundary characters.
+%D
+%D When using Computer Modern Roman, the next definitions
+%D looks a bit better than the default ligatures.
+%D
+%D \starttypen
+%D \def\lowerleftsingleninequote {,}
+%D \def\lowerleftdoubleninequote {,\kern-.1em,}
+%D \def\upperleftsingleninequote {'}
+%D \def\upperleftdoubleninequote {''\kern-.1em}
+%D \def\upperleftsinglesixquote {`}
+%D \def\upperleftdoublesixquote {`\kern-.1em`}
+%D
+%D \def\lowerrightsingleninequote {,}
+%D \def\lowerrightdoubleninequote {,\kern-.1em,}
+%D \def\upperrightsingleninequote {'}
+%D \def\upperrightdoubleninequote {''}
+%D \def\upperrightsinglesixquote {`}
+%D \def\upperrightdoublesixquote {\kern-.125em``}
+%D \stoptypen
+%D
+%D But in other fonts, these definitions can give problems, so
+%D we just say:
+
+\def\lowerleftsingleninequote {,}
+\def\lowerleftdoubleninequote {,,}
+\def\upperleftsingleninequote {'}
+\def\upperleftdoubleninequote {''}
+\def\upperleftsinglesixquote {`}
+\def\upperleftdoublesixquote {``}
+
+\def\lowerrightsingleninequote {,}
+\def\lowerrightdoubleninequote {,,}
+\def\upperrightsingleninequote {'}
+\def\upperrightdoubleninequote {''}
+\def\upperrightsinglesixquote {`}
+\def\upperrightdoublesixquote {``}
+
+%D Yes I know, they are ugly:
+
+\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 \ShowLanguageValues [cz] [czech] tjechisch tex
+%D \ShowLanguageValues [cz] [slovak] slowaakse ...
+
+%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\SR
+%D \HL
+%D \NC \s!pl \NC polish \NC slavic \NC\FR
+%D \NC \s!cz \NC czech \NC slavic \NC\MR
+%D \NC \s!sk \NC slavik \NC slavic \NC\LR
+%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 czech \appendtoks \language[\s!cz]\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
diff --git a/tex/context/base/lang-it.pat b/tex/context/base/lang-it.pat
index 7b0ecd599..66457543a 100644
--- a/tex/context/base/lang-it.pat
+++ b/tex/context/base/lang-it.pat
@@ -1,519 +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
-}
-
+\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
index d2fc6f204..faba20939 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -1,282 +1,289 @@
-%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
+%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!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!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!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!status=\v!stop]
+
+%D For compatibility reasons we also define:
+
+\installlanguage [fa] [\s!fr]
+
+\installlanguage [french] [\s!fr]
+\installlanguage [spanish] [\s!sp]
+\installlanguage [italian] [\s!it]
+\installlanguage [portuguese] [\s!pt]
+
+%D Labels and header texts.
+
+\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!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sp] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!it] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!pt] [\v!sub\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
diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex
index 68b796d7c..825000b6f 100644
--- a/tex/context/base/lang-lab.tex
+++ b/tex/context/base/lang-lab.tex
@@ -1,182 +1,193 @@
-%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\labellanguage{\currentmainlanguage}
-\def\headlanguage {\currentmainlanguage}
-
-\def\headtext%
- {\dogetupsometextprefix\headlanguage\v!kop}
-
-\def\labeltext%
- {\dogetupsometextprefix\labellanguage\c!label}
-
-\def\LABELTEXT#1%
- {\bgroup
- \let\handletextprefix=\uppercase
- \the\everyuppercase
- \dogetupsometextprefix\labellanguage\c!label{#1}% not \labeltext (see \MONTH)
- \egroup}
-
-\unexpanded\def\dogetupsometextprefix#1#2#3%
- {\doifdefinedelse{#2#1#3}
- {\getvalue{#2#1#3}}
- {\doifdefinedelse{#1#3}
- {\getvalue{#2#3}}
- {{\tttf[#2: #3/#1]~}}}}
-
-%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
+%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\labellanguage{\currentmainlanguage}
+\def\headlanguage {\currentmainlanguage}
+
+\def\headtext%
+ {\dogetupsometextprefix\headlanguage\v!kop}
+
+\def\labeltext%
+ {\dogetupsometextprefix\labellanguage\c!label}
+
+\def\LABELTEXT#1%
+ {\bgroup
+ \let\handletextprefix=\uppercase
+ \the\everyuppercase
+ \dogetupsometextprefix\labellanguage\c!label{#1}% not \labeltext (see \MONTH)
+ \egroup}
+
+\def\dodogetupsometextprefix#1#2#3#4%
+ {\doifdefinedelse{#2#1#3}
+ {\getvalue{#2#1#3}}
+ {\doifdefinedelse{#1#3}
+ {\getvalue{#2#3}}
+ {#4}}}
+
+\unexpanded\def\dogetupsometextprefix#1#2#3%
+ {\dodogetupsometextprefix{#1}{#2}{#3}
+ {\dodogetupsometextprefix{\defaultlanguage{#1}}{#2}{#3}
+ {\dodogetupsometextprefix{\s!en}{#2}{#3}
+ {\dodogetupsometextprefix{\s!nl}{#2}{#3}
+ {{\tttf[#2: #3/#1]~}}}}}}
+
+%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 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]% don't group!
+ {\getparameters[\??lg][#1]%
+ \doifdefinedelse{\??lg\currentlanguage}%
+ {\getvalue{\??lg\currentlanguage}}
+ {\doifdefinedelse{\??lg\s!en}
+ {\getvalue{\??lg\s!en}}
+ {\doifdefinedelse{\??lg\s!nl}
+ {\getvalue{\??lg\s!nl}}
+ {[translation #1]}}}}
+
+\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
diff --git a/tex/context/base/lang-nl.hyp b/tex/context/base/lang-nl.hyp
index 7d997255d..337d901a9 100644
--- a/tex/context/base/lang-nl.hyp
+++ b/tex/context/base/lang-nl.hyp
@@ -1,5 +1,12 @@
-% additional hyphenations
-
-\hyphenation{vrije-tijds-be-ste-ding}
-
-\endinput
+% additional hyphenations
+
+\hyphenation
+ {klank-im-pro-vi-sa-ties
+ vrije-tijds-be-ste-ding
+ docu-ment-over-stij-gen-de}
+
+% due to bug in patterns
+
+\lccode`\'=0
+
+\endinput
diff --git a/tex/context/base/lang-nl.pat b/tex/context/base/lang-nl.pat
index 9bc73109c..4eeb65a29 100644
--- a/tex/context/base/lang-nl.pat
+++ b/tex/context/base/lang-nl.pat
@@ -1,7947 +1,7946 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% 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
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% 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
diff --git a/tex/context/base/lang-nlx.pat b/tex/context/base/lang-nlx.pat
index 5e8b46062..7b7780c1b 100644
--- a/tex/context/base/lang-nlx.pat
+++ b/tex/context/base/lang-nlx.pat
@@ -1,8031 +1,8030 @@
-% 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
+% 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
diff --git a/tex/context/base/lang-sk.hyp b/tex/context/base/lang-sk.hyp
new file mode 100644
index 000000000..4e89b395b
--- /dev/null
+++ b/tex/context/base/lang-sk.hyp
@@ -0,0 +1,10 @@
+% List of exceptions created by Karel Horak
+% Mathamatical Institute of Czechoslovak Acadamy of Science
+% Prague, April 1, 1991
+%
+\hyphenation
+ {dos\v t
+ me-t\'o-da
+ me-t\'o-dy
+ ne-do-stat-ka-mi
+ sep-tem-bra}
diff --git a/tex/context/base/lang-sk.pat b/tex/context/base/lang-sk.pat
new file mode 100644
index 000000000..8c86495a1
--- /dev/null
+++ b/tex/context/base/lang-sk.pat
@@ -0,0 +1,2507 @@
+% Slovak hyphenation (version 2.0) 24.4.1992
+% Autor: Jana Chlebikova, Institute of Informatics,
+% Comenius University, 842 15 Bratislava, Czechoslovakia
+\expandafter\ifx\csname JanaChlebikova\endcsname\relax
+\global\everyjob = \expandafter
+ {\the \everyjob
+ \message {Loading SK hyphenation patterns: Jana Chlebikova, 1992}
+ }
+\def\JanaChlebikova{}
+\fi
+\patterns{
+ % samohl\'asky
+a1
+\'a1
+\"a1
+e1
+\'e1
+i1
+\'i1
+o1
+\'o1
+\^o1
+u1
+\'u1
+y1
+\'y1
+i2a
+i2\'a
+i2e
+i2u
+o2u
+c2h
+d2z
+d2\v z
+ % dvojice spoluhl\'asok
+2b1b
+2b1c
+2b1\v c
+2b1d
+2b1\v d
+2b1f
+2b1g
+2b1h
+2b1c2h
+2b1j
+2b1k
+2b1l
+2b1\v l
+2b1m
+2b1n
+2b1\v n
+2b1p
+2b1r
+2b1s
+2b1\v s
+2b1t
+2b1\v t
+2b1v
+2b1w
+2b1x
+2b1z
+2b1\v z
+2b1d2z
+2b1d2\v z
+2c1b
+2c1c
+2c1\v c
+2c1d
+2c1\v d
+2c1f
+2c1g
+2c1c2h
+2c1j
+2c1k
+2c1l
+2c1\v l
+2c1m
+2c1n
+2c1\v n
+2c1p
+2c1r
+2c1s
+2c1\v s
+2c1t
+2c1\v t
+2c1v
+2c1w
+2c1x
+2c1z
+2c1\v z
+2c1d2z
+2c1d2\v z
+2\v c1b
+2\v c1c
+2\v c1\v c
+2\v c1d
+2\v c1\v d
+2\v c1f
+2\v c1g
+2\v c1h
+2\v c1c2h
+2\v c1j
+2\v c1k
+2\v c1l
+2\v c1\v l
+2\v c1m
+2\v c1n
+2\v c1\v n
+2\v c1p
+2\v c1r
+2\v c1s
+2\v c1\v s
+2\v c1t
+2\v c1\v t
+2\v c1v
+2\v c1w
+2\v c1x
+2\v c1z
+2\v c1\v z
+2\v c1d2z
+2\v c1d2\v z
+2d1b
+2d1c
+2d1\v c
+2d1d
+2d1\v d
+2d1f
+2d1g
+2d1h
+2d1c2h
+2d1j
+2d1k
+2d1l
+2d1\v l
+2d1m
+2d1n
+2d1\v n
+2d1p
+2d1r
+2d1s
+2d1\v s
+2d1t
+2d1\v t
+2d1v
+2d1d2z
+2d1d2\v z
+2\v d1b
+2\v d1c
+2\v d1\v c
+2\v d1d
+2\v d1\v d
+2\v d1f
+2\v d1g
+2\v d1h
+2\v d1c2h
+2\v d1j
+2\v d1k
+2\v d1l
+2\v d1\v l
+.as4t4ro3
+.atmo3
+.a2u1to3
+2\v d1m
+2\v d1n
+2\v d1\v n
+2\v d1p
+2\v d1r
+2\v d1s
+2\v d1\v s
+2\v d1t
+2\v d1\v t
+2\v d1v
+2\v d1z
+2\v d1\v z
+2\v d1d2z
+2\v d1d2\v z
+2f1b
+2f1c
+2f1\v c
+2f1d
+2f1\v d
+2f1f
+2f1g
+2f1h
+2f1c2h
+2f1j
+2f1k
+2f1l
+2f1\v l
+2f1m
+2f1n
+2f1\v n
+2f1p
+2f1r
+2f1s
+2f1\v s
+2f1t
+2f1\v t
+2f1v
+2f1z
+2f1\v z
+2f1d2z
+2f1d2\v z
+2g1b
+2g1c
+2g1\v c
+2g1d
+2g1\v d
+2g1f
+2g1g
+2g1h
+2g1c2h
+2g1j
+2g1k
+2g1l
+2g1\v l
+2g1m
+2g1n
+2g1\v n
+2g1p
+2g1r
+2g1s
+2g1\v s
+2g1t
+2g1\v t
+2g1v
+2g1z
+2g1\v z
+2g1d2z
+2g1d2\v z
+2h1b
+2h1c
+2h1\v c
+2h1d
+2h1\v d
+2h1f
+2h1g
+2h1h
+2h1c2h
+2h1j
+2h1k
+2h1l
+2h1\v l
+2h1m
+2h1n
+2h1\v n
+2h1p
+2h1r
+2h1s
+2h1\v s
+2h1t
+2h1\v t
+2h1v
+2h1z
+2h1\v z
+2h1d2z
+2h1d2\v z
+2c2h1b
+2c2h1c
+2c2h1\v c
+2c2h1d
+2c2h1\v d
+2c2h1f
+2c2h1g
+2c2h1h
+2c2h1c2h
+2c2h1j
+2c2h1k
+2c2h1l
+2c2h1\v l
+2c2h1m
+2c2h1n
+2c2h1\v n
+2c2h1p
+2c2h1r
+2c2h1s
+2c2h1\v s
+2c2h1t
+2c2h1\v t
+2c2h1v
+2c2h1w
+2c2h1\v z
+2c2h1d2z
+2c2h1d2\v z
+2j1b
+2j1c
+2j1\v c
+2j1d
+2j1\v d
+2j1f
+2j1g
+2j1h
+2j1c2h
+2j1j
+2j1k
+2j1l
+2j1\v l
+2j1m
+2j1n
+2j1\v n
+2j1p
+2j1r
+2j1s
+2j1\v s
+2j1t
+2j1\v t
+2j1v
+2j1w
+2j1x
+2j1z
+2j1\v z
+2j1d2z
+2j1d2\v z
+2k1b
+2k1c
+2k1\v c
+2k1d
+2k1\v d
+2k1f
+2k1g
+2k1h
+2k1c2h
+2k1j
+2k1k
+2k1l
+2k1\v l
+2k1m
+2k1n
+2k1\v n
+2k1p
+2k1r
+2k1s
+2k1\v s
+2k1t
+2k1\v t
+2k1v
+2k1w
+2k1x
+2k1z
+2k1\v z
+2k1d2z
+2k1d2\v z
+2l1b
+2l1c
+2l1\v c
+2l1d
+2l1\v d
+2l1f
+2l1g
+2l1h
+2l1c2h
+2l1j
+2l1k
+2l1l
+2l1\v l
+2l1m
+2l1n
+2l1\v n
+2l1p
+2l1r
+2l1s
+2l1\v s
+2l1t
+2l1\v t
+2l1v
+2l1z
+2l1\v z
+2l1d2z
+2l1d2\v z
+2\v l1b
+2\v l1c
+2\v l1\v c
+2\v l1d
+2\v l1\v d
+2\v l1f
+2\v l1g
+2\v l1h
+2\v l1c2h
+2\v l1j
+2\v l1k
+2\v l1l
+2\v l1\v l
+2\v l1m
+2\v l1n
+2\v l1\v n
+2\v l1p
+2\v l1r
+2\v l1s
+2\v l1\v s
+2\v l1t
+2\v l1\v t
+2\v l1v
+2\v l1z
+2\v l1\v z
+2\v l1d2z
+2\v l1d2\v z
+2m1b
+2m1c
+2m1\v c
+2m1d
+2m1\v d
+2m1f
+2m1g
+2m1h
+2m1c2h
+2m1j
+2m1k
+2m1l
+2m1\v l
+2m1m
+2m1n
+2m1\v n
+2m1p
+2m1r
+2m1s
+2m1\v s
+2m1t
+2m1\v t
+2m1v
+2m1z
+2m1\v z
+2m1d2z
+2m1d2\v z
+2n1b
+2n1c
+2n1\v c
+2n1d
+2n1\v d
+2n1f
+2n1g
+2n1h
+2n1c2h
+2n1j
+2n1k
+2n1l
+2n1\v l
+2n1m
+2n1n
+2n1\v n
+2n1p
+2n1r
+2n1s
+2n1\v s
+2n1t
+2n1\v t
+2n1v
+2n1w
+2n1x
+2n1z
+2n1\v z
+2n1d2z
+2n1d2\v z
+2\v n1b
+2\v n1c
+2\v n1\v c
+2\v n1d
+2\v n1\v d
+2\v n1f
+2\v n1g
+2\v n1h
+2\v n1c2h
+2\v n1j
+2\v n1k
+2\v n1l
+2\v n1\v l
+2\v n1m
+2\v n1n
+2\v n1\v n
+2\v n1p
+2\v n1r
+2\v n1s
+2\v n1\v s
+2\v n1t
+2\v n1\v t
+2\v n1v
+2\v n1z
+2\v n1\v z
+2\v n1d2z
+2\v n1d2\v z
+2p1b
+2p1c
+2p1\v c
+2p1d
+2p1\v d
+2p1f
+2p1g
+2p1h
+2p1c2h
+2p1j
+2p1k
+2p1l
+2p1\v l
+2p1m
+2p1n
+2p1\v n
+2p1p
+2p1r
+2p1s
+2p1\v s
+2p1t
+2p1\v t
+2p1v
+2p1w
+2p1x
+2p1z
+2p1\v z
+2p1d2z
+2p1d2\v z
+2r1b
+2r1c
+2r1\v c
+2r1d
+2r1\v d
+2r1f
+2r1g
+2r1h
+2r1c2h
+2r1j
+2r1k
+2r1l
+2r1\v l
+2r1m
+2r1n
+2r1\v n
+2r1p
+2r1r
+2r1s
+2r1\v s
+2r1t
+2r1\v t
+2r1v
+2r1w
+2r1x
+2r1z
+2r1\v z
+2r1d2z
+2r1d2\v z
+2s1b
+2s1c
+2s1\v c
+2s1d
+2s1\v d
+2s1f
+2s1g
+2s1h
+2s1c2h
+2s1j
+2s1k
+2s1l
+2s1\v l
+2s1m
+2s1n
+2s1\v n
+2s1p
+2s1r
+2s1s
+2s1\v s
+2s1t
+2s1\v t
+2s1v
+2s1z
+2s1\v z
+2s1d2z
+2s1d2\v z
+2\v s1b
+2\v s1c
+2\v s1\v c
+2\v s1d
+2\v s1\v d
+2\v s1f
+2\v s1g
+2\v s1h
+2\v s1c2h
+2\v s1j
+2\v s1k
+2\v s1l
+2\v s1\v l
+2\v s1m
+2\v s1n
+2\v s1\v n
+2\v s1p
+2\v s1r
+2\v s1s
+2\v s1\v s
+2\v s1t
+2\v s1\v t
+2\v s1v
+2\v s1w
+2\v s1x
+2\v s1z
+2\v s1\v z
+2\v s1d2z
+2\v s1d2\v z
+2t1b
+2t1c
+2t1\v c
+2t1d
+2t1\v d
+2t1f
+2t1g
+2t1h
+2t1c2h
+2t1j
+2t1k
+2t1l
+2t1\v l
+2t1m
+2t1n
+2t1\v n
+2t1p
+2t1r
+2t1s
+2t1\v s
+2t1t
+2t1\v t
+2t1v
+2t1w
+2t1x
+2t1z
+2t1\v z
+2t1d2z
+2t1d2\v z
+2\v t1b
+2\v t1c
+2\v t1\v c
+2\v t1d
+2\v t1\v d
+2\v t1f
+2\v t1g
+2\v t1h
+2\v t1c2h
+2\v t1j
+2\v t1k
+2\v t1l
+2\v t1\v l
+2\v t1m
+2\v t1n
+2\v t1\v n
+2\v t1p
+2\v t1r
+2\v t1s
+2\v t1\v s
+2\v t1t
+2\v t1\v t
+2\v t1v
+2\v t1w
+2\v t1x
+2\v t1z
+2\v t1\v z
+2\v t1d2z
+2\v t1d2\v z
+2v1b
+2v1c
+2v1\v c
+2v1d
+2v1\v d
+2v1f
+2v1g
+2v1h
+2v1c2h
+2v1j
+2v1k
+2v1l
+2v1\v l
+2v1m
+2v1n
+2v1\v n
+2v1p
+2v1r
+2v1s
+2v1\v s
+2v1t
+2v1\v t
+2v1v
+2v1w
+2v1x
+2v1z
+2v1\v z
+2v1d2z
+2v1d2\v z
+2z1b
+2z1c
+2z1\v c
+2z1d
+2z1\v d
+2z1f
+2z1g
+2z1h
+2z1c2h
+2z1j
+2z1k
+2z1l
+2z1\v l
+2z1m
+2z1n
+2z1\v n
+2z1p
+2z1r
+2z1s
+2z1\v s
+2z1t
+2z1\v t
+2z1v
+2z1z
+2z1\v z
+2z1d2z
+2z1d2\v z
+2\v z1b
+2\v z1c
+2\v z1\v c
+2\v z1d
+2\v z1\v d
+2\v z1f
+2\v z1g
+2\v z1h
+2\v z1c2h
+2\v z1j
+2\v z1k
+2\v z1l
+2\v z1\v l
+2\v z1m
+2\v z1n
+2\v z1\v n
+2\v z1p
+2\v z1r
+2\v z1s
+2\v z1\v s
+2\v z1t
+2\v z1\v t
+2\v z1v
+2\v z1z
+2\v z1\v z
+2\v z1d2z
+2\v z1d2\v z
+2d2z1k
+2d2z1n
+2d2z1r
+2d2z1s
+2d2\v z1\v s
+2x1t
+2x1n
+2b1\'r
+2\'r1b
+2d2z1\'r
+2\'r1d2z
+2d2z1\v l
+2\'r1d2\v z
+2d2\v z1\v l
+ %2 samohl\'asky
+a1\'i2
+a1o2
+e1\'a2
+e1\'i2
+e1o2
+e1\'o2
+e1u2
+i1o2
+o1a2
+o1e2
+o1i2
+o1o2
+u1a2
+u1\'a2
+u1i2
+u1\'i2
+u1o2
+u1u2
+y1a2
+y1e2
+y1\'o2
+y1u2
+a2u1
+a2i1
+ % 3 spoluhl\'asky
+b2l3b
+3b2l3\v c
+b2l3c2h
+3b2l3k
+3b2\v l3k
+3b2l3\v n
+b2l3\v s
+b2\v l3\v s
+3b2r3b
+b2r3d
+3b2r3k
+3b2\'r3k
+3b2r3l
+3b2\'r3\v l
+3b2r3n
+3b2r3\v n
+3b2r3v
+b2r3z
+b3s2c
+b3s2t
+c3k2t
+3c2r3\v c
+3c2\'r3\v c
+3c2r3k
+3c2\'r3k
+c3t2v
+3\v c2l3n
+3\v c2r3\v c
+\v c2r3p
+3\v c2r3t
+3\v c2r3v
+d3c4h4n
+3d2l3b
+3d2l3h
+d2l3n
+3d2l3\v z
+3d2\v l3\v z
+3d2r3d
+3d2r3g
+d2r3l
+3d2r3k
+3d2r3m
+d2r3n
+3d2r3v
+3d2r3z
+3d2r3\v z
+3d2\'r3\v z
+d3s2v
+d3s2t
+d3v2r
+3f2r3\v c
+3f2r3f
+3f2r3k
+3f2\'r3k
+3f2r3m
+3f2r3n
+3g2l3g
+3g2r3c
+3g2r3g
+3h2l3b
+3h2\v l3b
+3h2l3t
+3h2m2l
+3h2r3b
+3h2\'r3b
+3h2r3\v c
+3h2r3d
+3h2r3d2z
+3h2r3k
+3h2r3m
+3h2r3n
+3h2r3\v n
+3h2r3t
+3h2r3v
+3c2h2l3p
+3c2h2r3b
+3c2h2r3\v c
+c2h2r3c4h
+3c2h2r3l
+3c2h2r3t
+j2c2h3n
+j3s2t
+j3\v s2le
+j3t2m
+j3t2r
+3k2l3b
+3k2\v l3b
+3k2l3\v c
+3k2l3z
+3k2\v l3z
+k2r3b
+3k2r3\v c
+3k2\'r3\v c
+3k2\'r3d
+3k2r3k
+3k2\'r3k
+3k2\'r3m
+3k2r3p
+3k2r3s
+3k2r3t
+3k2r3v
+k3s2\v l
+k2s3n
+k3t2r
+l3d2r
+\v l3k2n
+l3t2r
+m3b2l
+m3b2\v l
+m3b2r
+m3f2l
+m3f2r
+m3k2n
+3m2l3\v c
+3m2l3k
+m3p2l
+m3p2\v l
+m3p2r
+m3p2s
+3m2r3h
+m2r3c4h
+3m2r3k
+m2r3l
+m2r3\v s
+m2r3t
+3m2r3v
+3m2r3z
+3m2\'r3z
+m3s2t
+m3\v s2t
+n3d\v la
+n3d2r
+n3f2l
+n3f2r
+n3g2h
+n3g2l
+n3g2\v l
+n2g3n
+n3g2r
+n3g2v
+n3k2c
+n3k2h
+n3k2n
+n3k2r
+n3k2v
+n3s2c
+n3\v s2p
+n3\v s2t
+n3t2g
+n3t2l
+n3t2n
+n3t2r
+n2\v z3m
+3p2l3n
+3p2l3\v n
+3p2\v l3\v n
+3p2l3z
+3p2\v l3z
+3p2\v l3\v z
+3p2\'r3c
+3p2r3\v c
+3p2r3d
+3p2r3s
+3p2r3\v s
+p3\v s2\v t
+p3t2r
+r2b3n
+r3g2\v l
+r3g2r
+r3g2s
+r3k2d
+r2k3n
+r3k2t
+r3k2v
+r3p2c
+r3p2\v c
+r3p2r
+r3s2p
+r3\v s2\v c
+r3\v s2l
+r3\v s2r
+r2t3m
+r3t2n
+r2t3\v n
+r3t2r
+r3t2v
+3s4c4h4n
+s2k3l
+s2k3m
+s2k3n
+s3k2r
+s3k2v
+3s2l3n
+3s2l3\v n
+3s2l3z
+s3p2r
+3s2r3d
+3s4\'r3k
+3s4r3\v s
+s3t2k
+\^os4t3k2\'ar3s4t4v
+s2t3l
+s3t2m
+s2t3n
+s3t2r
+s3t2v
+s2\v t3h
+s2\v t3m
+s2\v t3p
+\v s3k2l
+\v s3k2r
+\v s3t2r
+3\v s4t4v
+t3k2l
+t3k2n
+3t2l3\v c
+3t2l3k
+t3h2l
+3t4r3\v c
+3t4r3h
+3t2r3l
+3t2r3k
+3t2r3m
+a4t2r3n
+3t2r3n
+3t2\'r3n
+3t2\'r3\v n
+3t4r3p
+3t2r3v
+3t2\'r3\v z
+3v2l3\v c
+3v2\v l3\v c
+3v2l3h
+3v2l3k
+3v2l3n
+3v2r3h
+3v2r3c2h
+3v2r3l
+3v2\'r3\v s
+3v2\'r3t
+3v2r3z
+3v2\'r3z
+3v4z4d
+3v4z4h
+3v4z4n
+3v3z2\v t
+z3d2n
+noz5d4r
+3z4d4r
+3z4d4v
+z3g2n
+3z4h4r
+3z2r3k
+3z2r3n
+3z4v4l
+\v z2d3n
+3\v z2l3\v c
+3\v z2l3t
+3\v z2\v lt
+3\v z2r3\v d
+\v z3s2t
+x3p2l
+x3p2r
+x3t2r
+ % 4 spoluhl\'asky
+3b2l4\v c3n
+3b2\v l4\v c3k
+3b2l4n3k
+3b2\v l3k2n
+3b2r4b3l
+3b2r4b3t
+3b2r4\v c3k
+3b2r4d3c
+3b2\'r4d3n
+3b2r3h2l
+3b4\'r4k3n
+3b4r4m3b
+3b4r4n3\v c
+3b4r4n3k
+3b4r4\v s3l
+3b4r4t3l
+3b4r4t3n
+3b4r4v3n
+3b4r4z3d
+3b4r4z3l
+3b4r4z3n
+b3s2t2r
+3c4\'r4\v c3k
+3c4r4k3n
+3c4v4r3\v c
+3c4v4r3k
+3c4v4\'r3k
+3c4v4r3l
+3\v c4l4n3k
+3\v c4r3\v c4r
+3\v c4r4c4h3n
+3\v c4r4p3k
+3\v c4r4p3n
+3\v c4r4t3n
+3\v c4v4r3k
+3\v c4v4r3l
+3d4l4b3n
+d4\v l4\v z3k
+d4l4\v z3n
+d4\v l4\v z3n
+3d4r4c3n
+3d4r4g3\v l
+3d4r4g3n
+3d4r4h3n
+3d4r4n3\v c
+3d4r4n3k
+3d4r4s3n
+3d4r4\v z3b
+3d4r4\v z3k
+3f4r4c3k
+3f4r4c3n
+3f4r4\v c3k
+3f4r4f3l
+3f4r4k3n
+3f4r4n3d
+3f4r4n3d4\v z
+3f4r4n3g
+3f4r4n3k
+3g4l4g3n
+3g2r4c3k
+3h2\v l4b3k
+3h2l3t4n
+3h2r4b3\v c
+3h2r4\v c3k
+h2r4d3l
+3h2r4g3\v l
+3h2r4k3\v l
+3h2r4k3n
+3h2\'r4k3n
+3h2r4n3\v c
+3h2r4s3t
+3h2r4s3\v t
+3ch4\v l4p3k
+3c2h2r4b3t
+3c2h2r4c4h3l
+3c2h2r4c4h3\v l
+3c4h4r4s3t
+j3s4t4r
+j3s4t4v
+3k4l4b3\v c
+3k4l4b3k
+3k4l4z3k
+3k4l4z3n
+3k4r4\v c3m
+3k4r4\v c3n
+3k4r4k3v
+3k4r4m3n
+3k4\'r4m3n
+3k4r4p3\v c
+3k4r4s3t
+3k4r4\v s3t
+3k4r4t3k
+3k4r4v3n
+3m2l4\v c3k
+3m2\v l4k3n
+3m2\v l4k3v
+3m2l4s3n
+m3p4r3p
+m3p4r3v
+3m4r4k3n
+3m4r4k3v
+3m4r4m3l
+3m4r4n3\v c
+3m4r4n3k
+3m4\'r4\v s3t
+3m4\'r4t3v
+3m4r4z3l
+3m4r4z3k
+3m4r4z3n
+n4g3s4t
+n3\v s4t4r
+n3t4l3m
+3p2l4z3l
+3p2\v l4z3n
+p2\'r4c3n
+3p2r4\v c3k
+3p4r4d3n
+3p4\'r4c2h3n
+3p4r4s3k
+3p4r4t3k
+r2s3k4d
+r2s3k4t
+\v cer4s3t4v
+3s4l4n3k
+3s4k4r3z
+3s4m4r3c
+3s4m4r3\v c
+3s4m4r3d
+3s4m4r3k
+3s4m4r3t
+3s4p4r3c4h
+3s4r4d3c
+3s4r4k3n
+3s4r4s3t
+3s4t4\v l3k
+s3t4r3b
+ko4s3t4r3\v c
+3s4t4r3\v c
+3s4t4\'r3h
+3s4t4r3k
+s4t4r3v
+4s4\v t5k4r\'at
+3\v s4k4l3b
+3\v s4k4r3k
+3\v s4k4\'r3k
+ma\v s3k4r3t
+3\v s4k4r3t
+3\v s4p4l3h
+3\v s4t4r3b
+\v s4t4r3n
+3\v s4t4v4r3t
+3\v s4t4v4r3\v t
+3t2\v l4c3\v t
+3t2r4b3l
+t2r4\v c3k
+3t2r4d3l
+3t2r4h3l
+3t2r4h3n
+3t2r4k3n
+3t2r4k3v
+3t2r4m3n
+3t4\'r4p3n
+3t2r4\v z3k
+3t2r4\v z3n
+3t2v4r3d
+3t2v4r3d4z
+3t2v4\'r3d4z
+3v2l4h3\v c
+3v2l4h3k
+3v2l4h3n
+3v2l4n3k
+3v2l4n3n
+3v4r4h3n
+3v4r4k3n
+3v4\'r4z3g
+3v4r4z3g
+3v4r4z3n
+3v4r4\v z3l
+3z4h4\'r3\v n
+3z4r4n3n
+3\v z4l4\v c3n
+3\v z4l4t3n
+3\v z4r4d3k
+ % 5 spoluhl\'asok
+3b4r4n3k4n
+b3d4\v l4\v z3n
+3c4v4r4\v c3k
+3c4v4r4n3k
+3\v c4\'r4s3t4v
+3\v c4r4t4t3n
+3\v c4v4r4k3n
+3d4r4\v z3g4r
+3f4r4n4g3n
+h2\'r4s3t4k
+3c4h4r4s4t3n
+3k4r4s4t3n
+3k4r4s4t3\v n
+3s4m4r4\v s3\v t
+3s4m4r4t3k
+s3t4r4n3k
+3\v s4k4l4b3n
+ma\v s3k4r4t3n
+3\v s4k4r4t3n
+3\v s4k4v4r3\v c
+3\v s4k4v4r3k
+3\v s4k4v4\'r3k
+3\v s4k4v4r3n
+3\v s4m4r4d3k
+3\v s4m4r4n3c
+3\v s4p4l4h3n
+3\v s4t4r4k3n
+3\v s3t4r4n3g
+3t4v4r4d3n
+3v4r4s3t4v
+3v4r4z3g4n
+ % 6 spoluhl\'asok
+3c4v4r4n3g4n
+3\v s4k4v4r4k3n
+3\v s4k4v4\'r4k3n
+ % koncovka -n\'y
+k4\v c3n\'y.
+k4\v c3n\'eho.
+k4\v c3n\'emu.
+k4\v c3nom.
+k4\v c3n\'ym.
+k4\v c3n\'e.
+k4\v c3n\'a.
+k4\v c3nej.
+k4\v c3n\'u.
+k4\v c3nou.
+k4\v c3n\'i.
+k4\v c3n\'ych.
+k4\v c3n\'ymi.
+k4t3n\'y.
+k4t3n\'eho.
+k4t3n\'emu.
+k4t3nom.
+k4t3n\'ym.
+k4t3n\'e.
+k4t3n\'a.
+k4t3nej.
+k4t3n\'u.
+k4t3nou.
+k4t3n\'i.
+k4t3n\'ych.
+k4t3n\'ymi.
+n4\v c3n\'y.
+n4\v c3n\'eho.
+n4\v c3n\'emu.
+n4\v c3nom.
+n4\v c3n\'ym.
+n4\v c3n\'e.
+n4\v c3n\'a.
+n4\v c3nej.
+n4\v c3n\'u.
+n4\v c3nou.
+n4\v c3n\'i.
+n4\v c3n\'ych.
+n4\v c3n\'ymi.
+n4k4\v c3n
+n4t3n\'y.
+n4t3n\'eho.
+n4t3n\'emu.
+n4t3nom.
+n4t3n\'ym.
+n4t3n\'e.
+n4t3n\'a.
+n4t3nej.
+n4t3n\'u.
+n4t3nou.
+n4t3n\'i.
+n4t3n\'ych.
+n4t3n\'ymi.
+r4d3n\'y.
+r4d3n\'eho.
+r4d3n\'emu.
+r4d3nom.
+r4d3n\'ym.
+r4d3n\'e.
+r4d3n\'a.
+r4d3nej.
+r4d3n\'u.
+r4d3nou.
+r4d3n\'i.
+r4d3n\'ych.
+r4d3n\'ymi.
+r4m3n\'y.
+r4m3n\'eho.
+r4m3n\'emu.
+r4m3nom.
+r4m3n\'ym.
+r4m3n\'e.
+r4m3n\'a.
+r4m3nej.
+r4m3n\'u.
+r4m3nou.
+r4m3n\'i.
+r4m3n\'ych.
+r4m3n\'ymi.
+r4p4\v c3n
+r4t3n\'y.
+r4t3n\'eho.
+r4t3n\'emu.
+r4t3nom.
+r4t3n\'ym.
+r4t3n\'e.
+r4t3n\'a.
+r4t3nej.
+r4t3n\'u.
+r4t3nou.
+r4t3n\'i.
+r4t3n\'ych.
+r4t3n\'ymi.
+s4t3n\'y.
+s4t3n\'eho.
+s4t3n\'emu.
+s4t3nom.
+s4t3n\'ym.
+s4t3n\'e.
+s4t3n\'a.
+s4t3nej.
+s4t3n\'u.
+s4t3nou.
+s4t3n\'i.
+s4t3n\'ych.
+s4t3n\'ymi.
+z4d3ny.
+z4d3neho.
+z4d3nemu.
+z4d3nom.
+z4d3nym.
+z4d3ne.
+z4d3na.
+z4d3nej.
+z4d3nu.
+z4d3nou.
+z4d3ni.
+z4d3nych.
+z4d3nymi.
+z4d3n\'y.
+z4d3n\'eho.
+z4d3n\'emu.
+z4d3n\'ym.
+z4d3n\'e.
+z4d3n\'a.
+z4d3n\'u.
+z4d3n\'i.
+z4d3n\'ych.
+z4d3n\'ymi.
+ % koncovky -ka
+b2l4\v s3k
+l2t3k2a.
+l2t3k2y.
+l2t3k2e.
+l2t3k2u.
+l2t3k2ou.
+l2t3k2\'am.
+l2t3k2\'ach.
+l2t3k2a1mi.
+n2t3k2a.
+n2t3k2y.
+n2t3k2e.
+n2t3k2u.
+n2t3k2ou.
+n2t3k2\'am.
+n2t3k2\'ach.
+n2t3k2a1mi.
+n2k2t3k
+p2t3k2a.
+p2t3k2y.
+p2t3k2e.
+p2t3k2u.
+p2t3k2ou.
+p2t3k2\'am.
+p2t3k2\'ach.
+p2t3k2a1mi.
+s2t3k2a.
+s2t3k2y.
+s2t3k2e.
+s2t3k2u.
+s2t3k2ou.
+s2t3k2\'am.
+s2t3k2\'ach.
+s2t3k2a1mi.
+ % koncovka -ty
+5p4r4s3t
+ % koncovka -sk\'y,-sky
+b3s4k
+d3s4k
+j3s4k
+l4p3s4k
+l3s4k
+\v l3s4k
+l4t3s4k
+4m3s4k
+4m4p3s4k
+n4d3s4k
+n4k4t3s4k
+n3s4k
+n4t3s4k
+p3s4k
+p4t3s4k
+r3s4k
+r4t3s4k
+r4z5s4k
+5s4r4b3s4k
+\v s3s4k
+t3s4k
+v3s4k
+z3s4k
+\v z3s4k
+ % koncovky -\v stina,-\v cina
+n2d3\v c
+z3\v s2t2
+r4z3\v s2t2
+ % koncovky -stvo
+b3s4t4v
+\v c3s4t4v
+d3s4t4v
+\v d3s4t4v
+\v l3s4t4v
+m3s4t4v
+n3s4t4v
+n4t3s4t4v
+p3s4t4v
+r3s4t4v
+r4v5s4t4v
+\v s3s4t4v
+t3s4t4v
+v3s4t4v
+\v z3s4t4v
+ %predpony
+.a2e2ro
+.a2e2ro3d2r
+.aero3g2r
+.a2e2ro3k2l
+.aero3p2l
+.aero3s2k
+.aero3s2t
+.aero3t2r
+.akcie3s2c2h
+.ane3s2teti
+.ane3s2t\'ez
+.anti5k4l
+.anti5k4r
+.apo5p4le
+.ap4rio
+.ap4ri\'o
+.arci5k4
+.aristo5k4
+.as3k2lep
+.austro5s4
+.bac2k3hand
+.balne2o3
+.belo5
+.belo5h4
+.bez5
+.bez5b4
+.bez5d4
+.bez5h4
+.bez5k4
+.bez5m4
+.bez5p4
+.bez5s4
+.bez5t4
+.bez5v4
+.bez5z4
+.bielo5
+.bielob4
+.bieloh4
+.bielov4
+.bi2o5
+.biok4
+.biop4
+.bios4
+.blaho5
+.blahop4
+.blahos4
+.bledo5
+.boha5p4
+.boho5s4
+.bo\v ze5
+.bo\v ze5d4
+.bo\v zec2h4
+.brato5v4r
+.b2z2d
+.c\'aro5v4ra
+.celo5d4
+.celo5k4
+.celo5p4
+.celo5s4
+.celo5u4
+.ceno5t4
+.ces2t5maj
+.cirkevno5
+.cirkevno5p4
+.c4t4n
+.cudzo5k4
+.cudzo5o4
+.cudzo5s4
+.cudzo5t4
+.cudzo5v4
+.cyto5p4
+.\v caro5k4
+.\v caro5s4
+.\v caro5v4
+.\v caro5z4
+.\v cerno5b4
+.\v cerno5h4
+.\v cerno5k4
+.\v cerno5o4
+.\v cerveno5a4
+.\v cerveno5b4
+.\v cerveno5h4
+.\v cerveno5k4
+.\v cerveno5o4
+.\v cerveno5p4
+.\v cierno5b4
+.\v cierno5h4
+.\v cierno5o4
+.\v co5ch4
+.\v co5s4
+.\v cudo5t4
+.da3k2d
+.\v datelino5t4
+.de5f4
+.de5g4
+.dek4l
+.desa\v t5
+.de5\v s4t2
+.dez5i2
+.dez5o2
+.dis2k3d4
+.divo5t4
+.dlho5h4
+.dlho5p4
+.dobro5d4
+.dobro5p4
+.dobro5s4
+.do5\v c2m
+.do5d4
+.do5f4
+.do5h4
+.do5c4h4
+.do5i4
+.do5k4
+.do5o
+.do5p4
+.do5s4
+.do5\v s4p
+.do5\v s4tie
+.do5\v s4t\'i
+.do5t4l
+.do5t4m
+.do5t4r
+.do5t4v
+.do5u
+.do5v4
+.do5z4
+.do5\v z4
+.drevo5p4
+.drevo5o
+.drevo5v4
+.drobno5z4
+.druho5s4
+.dvoj5al
+.dvoj5\v c4
+.dvoj5d4
+.dvoj5h4
+.dvoj5i4
+.dvoj5k4
+.dvoj5p4
+.dvoj5s4
+.dvoj5t4
+.dvoj5u
+.dvoj5v4
+.dvoj5z4
+.elektro5
+.ex5k4
+.fol2k5
+.foto5
+.gala5p4
+.gama5g4
+.ge4o
+.hnedo5o
+.hnedo5u
+.holo5b4
+.holo5h4
+.holo5k4
+.hore5z4
+.horno5u4
+.hr\^ozo5s4t4
+.hr\^ozo5v4
+.hr\^ozy5p4
+.hrubo5s4
+.hydro5
+.chorobo5p4
+.jasno5o
+.jasno5z4
+.jedno5h4
+.jedno5i4
+.jedno5p4
+.jedno5s4
+.jedno5u4
+.jedno5z4
+.juho5a
+.juho5s4
+.ju\v zno5s4
+.kata5k4
+.kata5s4t4
+.kme\v no5t4
+.koso5d4
+.koso5\v s4
+.koso5u
+.krivo5p4
+.kruto5v4
+.krvi5p4
+.krvi5s4
+.krvi5t4
+.ktovie5a2
+.l\'asky5p4
+.lesos4
+.\v l4s4t
+.\v ludovo5u
+.makro5k4
+.makro5o4
+.makro5s4
+.m\'alo5k4
+.malo5o
+.m\'alo5v4
+.m\'arno5t4
+.medzi5h4
+.medzi5i4
+.medzi5p4
+.medzi5\v s4
+.medzi5t4
+.melo5d4
+.meru5\^o2
+.miesto5d4
+.miesto5p4
+.mikro5e4
+.mikro5k4
+.mikro5o
+.mikro5p4
+.mimo5\v s4
+.mimo5\'u
+.mimo5v4
+.mnoho5s4
+.mnoho5t4
+.mnoho5u
+.mnoho5v
+.mnoho5z
+.modro5o
+.mrako5d4
+.mravo5u
+.mucho5t4
+.m4z4d
+.na5a4
+.na5b4
+.na5c4
+.nad5h4
+.na5d4nes.
+.nad5p4
+.na5d4p4.
+.na5d4\'r4.
+.na5d4robno.
+.na5h4
+.na5i4
+.na5k4
+.na5m4
+.na5o4
+.na5p4
+.n\'a5p4
+.n\'arodno5o
+.na5s4
+.na5st4
+.n\'a5s4
+.n\'a5st4
+.na5\v s4
+.na5\v sk4
+.na6\v s5sk
+.na5t4
+.na5u4
+.na5\'u4
+.n\'a5u4
+.n\'a5\'u4
+.na5v4l
+.na5v4na
+.na5v4r4
+.n\'a5v4r4
+.na5v4z4
+.na5z4r
+.na5z4v
+.na6z5vy\v s
+.n\'az5v4
+.na5\v z4
+.ne5a4
+.ne5do3u2k
+.ne5e4
+.ne5i4
+.ne5m4
+.ne5na5h4
+.ne5na5i4
+.ne5na5k4
+.ne5na5m4
+.ne5na5p4
+.ne5na5s4
+.ne5na5t4
+.ne5p4
+.ne5s4
+.ne6s5tor
+.ne5\v s4
+.ne5t4
+.ne6t5t
+.ne5u2
+.ne5\'u2
+.ne5v4
+.ne5z4d4r
+.ne5z4d4v
+.ne5z4l
+.ne5z4m
+.ne5z4n
+.ne5z4r
+.ne5z4v
+.nie5k4
+.ni5k4
+.ni6k5to\v s
+.n\'izko5k4
+.novo5u2
+.novo5z2
+.obi5d4
+.ob5k4
+.obo5s4
+.obo5z4
+.ob5s4
+.ob5t4
+.ob5z4
+.od5b4
+.od5c4
+.od5d4
+.od5f4
+.od5h4
+.od5c4h4
+.od5i4
+.od6i5\'o
+.od5\'i4
+.od5k4
+.odo5b4
+.odo5h4
+.odo5k4
+.odo5m4k4
+.odo5p4
+.odo5s4
+.od5p4
+.od5s4
+.od5\v s4
+.od5t4
+.od5v4
+.od5z4
+.t4v4r
+.o5h4l
+.o5h4\v l
+.o5h4na
+.o5h4n\'u
+.o5h4r
+.o5c4h4
+.o5k4l
+.o5k4\v l
+.okolo5i
+.okolo5s4
+.o5k4ra
+.o5k4r\'a
+.o5k4resa\v t
+.o5k4res\'ava\v t
+.o5k4ri
+.o5k4r\'i
+.o5k4ru
+.o5k4r\'u
+.o5m4l
+.o5m4n
+.o5m4r
+.o5p4
+.o6p5lan
+.o6p5rat
+.o5s4lab
+.o5s4lad
+.o5s4lav
+.o5s4l\'av
+.o5s4lep
+.o5s4lo
+.o5s4p4
+.o5s4tar
+.o5s4ta\v t
+.o5s4tan
+.o5s4ta\v n
+.o6s5tatn
+.o5s4tatok
+.o5s4tatk
+.o5s4t\'av
+.o5s6to5
+.o5s6t4rap
+.ostro5u
+.o5s4ved
+.o5s4vetl
+.o5s4viet
+.o5s4vie\v z
+.o5s4vit
+.o5s4voj
+.o5\v s4k4
+.o5\v s4\v l4
+.o5\v s4m4
+.o5\v s4p4
+.o5\v s4v4
+.o5t4ras
+.o5t4rav
+.o5t4r\'av
+.o5t4rep
+.o5t4ria
+.o5v4dov
+.o5v4l\'ad
+.o5v4la\v z
+.o5v4p4
+.o5v4r
+.o5z4l4
+.o5z4n
+.o5z4re
+.o5z4v4l
+.p\"a\v t5izbo
+.plno5a
+.plno5p4
+.plno5\v s4
+.plno5kr4
+.plocho5d4
+.po5b4
+.po5\v c4
+.poda5k4
+.pod5b4r
+.pod5h4
+.pod5c4h
+.pod5k4
+.pod5p4
+.po5d4r\'a\v z
+.po5d4rep
+.pod5re
+.po5d4rh
+.po5d4rie
+.po5d4rm
+.po5d4rv
+.po5d4r4\v z
+.pod5s4ko\v c
+.pod5v4
+.pod3zem
+.pod3zol
+.pod3\v za
+.pod3\v zu
+.po5h4
+.po6h5reb
+.po5c4h4
+.po5i4
+.po5k4
+.pol5d4
+.pol5i4z
+.polo5a
+.polo5b4
+.pol5o4bl\'u
+.polo5d4
+.polo5h4l
+.polo5i
+.polo5k4
+.polo5m4
+.polo5o4
+.polo5p4
+.polo5s4
+.polo5t4
+.polo5u4
+.polo5\'u4
+.polo5v4
+.polo5z4
+.pol5s4t
+.po5m4
+.po6m5n\'ik
+.po5o4
+.po5ob4h
+.po5ob4l
+.po5s4
+.po6s4t5s4k4rip
+.po6s5tul
+.po5\v s4
+.po6\v s5ta
+.po6\v s5tov
+.po6\v s5v
+.po5t4k4n
+.po5t4\v l
+.po5t4r
+.poroz5p4
+.poroz5s4
+.poroz5v4
+.po6st5g4r
+.po6s5ti
+.po5t4
+.po5u
+.po5v4
+.po4v5ra
+.povy5h4
+.povy5k4
+.povy5p4
+.povy5s4
+.povy5v4
+.povy5z4
+.po5v4z4b
+.po5z4
+.pra5o4
+.pra5p4
+.pravicovo5o
+.pra5v4l
+.pra5v4nu
+.pra5v4n\'u
+.pr\'a5vo5p4
+.pra5vo5s4
+.pre5b4
+.pre5c4
+.pred5c4
+.pred5h4
+.pred5ch4
+.pred5i
+.pred5k4
+.pred5m4
+.predo5h4
+.pred5op
+.pred5ostatn
+.pred5p4
+.pre5d4rah
+.pre5d4rap
+.pre5d4ra\v t
+.pre5d4ra\v z
+.pre5d4ri
+.pre5d4r\v z
+.pred5s4
+.pred5v4
+.pred5z4
+.pre5\v c4
+.pre5e2
+.pre5f2
+.pre5h4
+.pre5c4h4
+.pre5i4
+.pre5k4
+.pre6k5vap
+.pre5m4
+.pre5o4
+.pre5p4
+.pre5s4
+.pre6s5n
+.pre5\v s4
+.pre5t4
+.pre5v4
+.pre5z4
+.pre5\v z4
+.pri5b4
+.pri5\v c4
+.pri5d4
+.pri5h4
+.pri5c4h4
+.pri5k4
+.pr\'i5k4
+.pri5m4
+.pri5p4
+.pri5s4
+.pr\'i5s4
+.pr\'i6s5p
+.pri6s5p
+.pri5s4p\^o
+.pri5\v s4
+.pri6\v s5la.
+.pri6\v s5li.
+.pri6\v s5lo.
+.pri5t4
+.pri5v4
+.pri5z4
+.pri5\v z4
+.re5g4
+.re5k4
+.re6k5v
+.re5p4
+.re6p5n
+.re5\v s4
+.re5t4
+.ro4z5i4
+.ro6z5\'i4
+.rozo5b4
+.rozo5d4
+.rozo5c4h4
+.rozo5m4
+.rozo5p4
+.rozo5r4
+.rozo5s4
+.rozo5\v s4
+.rozo5z4
+.rozo5\v z4
+.ro6z5u4
+.ro6z5v4
+3s4polu5
+3s4polu5h4
+3s4polu5p4
+3s4polu5v4
+.\v sikmo5o
+.\v siroko5
+.\v siroko5p4
+.\v st\'ato5
+.\v st4vor5
+.su4b5s4
+.s\'u5h4
+.s\'u5k4r
+.s\'u5m4r
+.s\'u5s4
+.s\'u5v4
+.s\'u5z4
+.troj5
+.t4v4r4do5
+.viac5k4
+.viac5v4
+.vide2o5
+.vn\'utro5s4
+.vn\'utro5\v s4
+.vo5p4ch
+.vo5p4r
+.vo5s4p
+.vo5t4
+.vo5v4
+.vy5
+.v\'y5
+.vy5b4
+.vy5c4
+.v\'y5c4
+.vy5\v c4
+.v\'y5\v c4
+.vy5d4
+.v\'y5d4
+.vy5h4
+.vy6h5\v n
+.vy6h5ne
+.v\'y5h4
+.vy5c4h4
+.vy5k4
+.v\'y5k4
+.vy5m4
+.vy5p4
+.v\'y5p4
+.vy5s4
+.v\'y5s4
+.vy5\v s4
+.vy6\v s5\v s
+.v\'y6\v s5k
+.vy5t4
+.v\'y5t4
+.vy5v4
+.vy5z4
+.v\'y5z4
+.za5b4
+.z\'a5b4
+.za5c4
+.za5\v c4
+.za5d4
+.za5h4
+.za5c4h4
+.za5k4
+.za5m4
+.za5p4
+.za5r4
+.za5s4
+.za5\v s4
+.za5t4
+.za5v4
+.za5z4
+.za5\v z4
+.z\'a5k4
+.z\'a5z4
+.zo5b4
+.zo6d5p
+.zo5d4r
+.zo5d4v
+.zo5h4
+.zo5m4l
+.zo5m4r
+.zo5s4
+.zo5\v s4
+.zo5t4
+.zo5v4
+.zo5z4
+.zo5\v z4
+ % slovn\'e z\'aklady
+5alkohol
+auto4rk
+auto4rs
+5b4lah
+5b4ledn
+5b4lesk
+5b4lok
+5b4l\'ud
+5b4lysk
+5b4lysn
+5boh3vi4e3a2k
+5boh3vi4e3o2d3k
+5boh3z4
+5boles4t5n
+5b4ra\v t
+5b4r\'azd
+5b4rec2h
+5b4ronz
+5b4ru\v c
+5b4r\'us
+5b4r\'yzg
+5c4muk
+5c4nie
+5c4vak
+5c4vi\v c
+5c4vik
+\v c\'i6s5lov
+5\v c4len
+5\v c4l\'ank
+5\v c4l\'anok
+5\v c4lov
+5d4\v nov
+5d4ramat
+5d4ra\v t
+5d4van\'as4\v t5
+5d4vih
+5d4vi\v z
+5d4voj
+5d4vor
+5e2u2r\'op
+5f4\v lak
+5f4lias
+5f4ranc\'u
+5f4rekven
+5f4r\'az
+5g4raf
+5g4ram
+pro6g5ram
+5g4r\'e\v c
+5g4rob
+5g4vardej
+5h4lad
+5h4las
+5h4lav
+5h4\v lad
+5h4liad
+5h4luch
+5h4mat
+5h4mot
+5h4na\v t
+5h4ned
+5h4nev
+5h4niezd
+5h4noj
+5h4nut
+5h4n\'u\v t
+5h4n\'ut
+5h4rab
+5h4r3mot
+5h4ran
+5h4ra\v t
+5h4rob
+5h4rom
+5h4roz
+5h4rub
+5h4ryz
+5h4viezd
+5c6h4lap
+5c6h4leb
+5c6hran
+5c6h4r\'an
+5c6h4r\'a\v n
+5c6h4v\'al
+5c6h4v\'at
+5c6h4vat
+5c6h4vost
+5jeden\'as4t5k
+5jeden\'as4\v t5
+5k4lad
+5k4la\v d
+5k4\v lak
+5k4lam
+5k4l\'as\v t
+5k4liat
+5k4lia\v t
+5k4lep
+5k4les
+5k4\v l\'u\v c
+5k4resb
+5k4res\v t
+5k4ritic
+5k4r\'idl
+5k4r\^och
+5k4ruh
+5k4r\'u\v z
+5k4ryt
+5k4valif
+5k4valit
+5k4vet
+5k4vadr
+5m4ladis4t3v
+5m4no\v z
+5m4rav
+5m4r\'az
+na5d4\v z4ga
+na5d4\v z4g\'a
+nav3\v s4tev
+n\'av3\v s4tev
+nav3\v s4t\'iv
+5p4l\'an
+5p4lastik
+5p4lat
+5p4lav
+5p4leta
+5p4letie
+5p4let\'u
+5p4lies\v t
+5p4ne2umat
+5p4r\'av
+s6pr\'av
+5p4riam
+5p4rirod
+5p2ris\'am
+5p4roduk
+5s4f\'er
+5s4c2hopn
+5s4k4lad
+5s4k4lon
+5s4ko\v c
+5s4kok
+5s4kop
+5s4kor
+5s4k\^or
+5s4k4romne
+5s4k4rot
+5s4k4r\'uc
+5s4k4rutk
+5s4k4r\'yv
+5s4k\'usen
+5s4kuto\v c
+5s4k4v\'uc
+5s4ladk
+5s4lav
+5s4l\'av
+5s4led
+5s4lep
+5s4lovn
+5s4love
+5s4lova
+5s4lovk
+5s4luh
+5s4l\'u\v z
+5s4\v lub
+5s4ma\v z
+5s4mel
+5s4mer
+5s4piev
+5s4pev
+5s4por
+5s4potreb
+5s4p4ravod
+5s4p4raved
+5s4p4r\'avn
+5s4p4ravo
+5s4tarost
+5s4tatic
+5s4tav
+5s4t4rach
+5s4t4ran
+5s4t4r\'an
+5s4t4r\'ada
+5s4t4ra\v s
+5s4t2rat
+5s4t2red
+5s4t2rek
+5s4t4rel
+5s4t4re\v l
+5s4t4riel
+5s4t4rie\v l
+5s4t4rih
+5s4t4ri\v z
+5s4t4rom
+5s4t4r\'uh
+5s4t4run
+5s4t4ru\v z
+5s4tati
+5d2ve5s4to
+5t2ri5s4to
+5\v s4tyri5s4to
+5p\"a\v t5s4to
+5\v ses4\v t5s4to
+5sedem5s4to
+5osem5s4to
+5dev\"a\v t5s4to
+5p\"a\v t5
+5\v ses4\v t5
+5s4t4la
+5s4tup
+5s4ved
+5\v s4\v lah
+5\v s4liap
+5\v s4kola
+5\v s4k4rab
+5\v s4k4rie
+5\v s4pin
+5\v s4p4liech
+5\v s4print
+5\v s4tart
+5\v s4t\'at
+5\v s4tep
+5\v s4t\'it
+5\v s4t4rukt\'ur
+5\v s4tude
+5\v s4tudo
+5\v s4t4vera
+5\v s4t4vorec
+5\v s4tyli
+5\v s4\v tast
+5\v stiep4
+5\v s4t4v4r4\v t5k4
+5\v s4t4v4r4\v t5l4
+5\v s4t4v4r4\v t5r4
+5\v s4t4v4r4\v t5s4
+5t4la\v c
+5t4lak
+5t4ran4s5
+5t4ras
+5t4resk
+5t4retin
+5t4ried
+5t4rub
+5t4r4vaj
+5t4r4val
+5t4r4van
+5uholn\'ik
+5uho\v ln
+5viac5h4
+5v4\v cera
+5v4l\'ad
+5v4las
+5v4r\'as
+5v4rav
+5v4rat
+5v4r\'at
+5v4\v simn
+5v4t\'ak
+5v4tip
+5vy5s4t4r\'aja
+5v4z4du
+5v4z4\v tah
+5v4z4\v ta\v z
+5z4lom
+5z4lu\v c
+5z4mysel
+5z4mysl
+5z4nak
+5z4n\'am
+5z4n\'a\v sa
+5z4rak
+5z4v\"az
+5z4vest
+5zv4es\v t
+5z4vod
+5z4vuk
+5z4vu\v c
+5\v z4r\'a\v c
+5\v z4rane
+5\v z4reb
+5\v z4r\'ut
+ %za\v ciatky slov
+.cv6
+.ch6
+.sp6
+.st6
+.\v sk6
+.\v sp6
+.\v st6
+.tk6
+.uh6
+.uc6h6
+.uk6
+.um6
+.up6
+.us6
+.\'us6
+.usc6h6
+.\'usc6h
+.usk6
+.\'usl6
+.usm6
+.\'usm6
+.\'us7ta.
+.\'us7tami.
+.\'us7to\v c
+.\'us7ti
+.ust6l
+.\'ust7ny
+.ust6r
+.\'us7tret
+.us7t4ric
+.\'us6t6r
+.\'u\v s6
+.ut6
+.uv6
+.uz6
+.vd6
+.vh6
+.vk6
+.vp6
+.vs6
+.v\v s6
+.vt6
+.vz6
+.vzh6
+.vzk6
+.vzl6
+.vzp6
+.v\v z6
+.zb6
+.zd6n
+.zd6r
+.zd6v
+.zg6
+.zh6
+.zm6
+.zr6
+.zv6
+ %koncovky
+4b4s4\v t.
+8c4h.
+8d4z.
+8d4\v z.
+4c4ht4.
+4j4s4\v t.
+4lt.
+4m4p4r.
+4m4p4s.
+4m4\v s4t.
+4n4k4t.
+4p4r4v.
+4rd.
+r4p4t.
+r4\v s4\v c.
+r4t4z.
+4st.
+4s\v t.
+5k4r\'at.
+5s4to5k4r\'at.
+5t4\v l4c4\v t.
+ %cudzie slov\'a
+akci3a2
+akv\'ari3u2m
+gymn\'azi3um
+le2u3k\'emia
+t2ri3u2mf
+kli3e2nt
+}
+ % List of exceptions created by Karel Horak
+ % (Mathematical Institute of Czechoslovak Acadamy of Science)
+ % Prague, April 1, 1991
+ %
+\hyphenation{
+dos\v t me-t\'o-da me-t\'o-dy ne-do-stat-ka-mi sep-tem-bra
+}
+\endinput
+%%
+%% End of file `skhyphen.tex'.
diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex
index c7e8dcc29..4261ddbff 100644
--- a/tex/context/base/lang-sla.tex
+++ b/tex/context/base/lang-sla.tex
@@ -1,87 +1,210 @@
-%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
+%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!status=\v!stop]
+
+\installlanguage % not yet set up
+ [\s!cz]
+ [\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]
+
+\installlanguage % not yet set up
+ [\s!sk]
+ [\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]
+
+\installlanguage [polish] [\s!pl]
+\installlanguage [czech] [\s!cz]
+\installlanguage [slovak] [\s!sk]
+
+\setupheadtext [\s!pl] [\v!inhoud=Spis rzeczy]
+\setupheadtext [\s!cz] [\v!inhoud=Obsah]
+\setupheadtext [\s!sk] [\v!inhoud=Obsah]
+
+\setupheadtext [\s!pl] [\v!tabellen=Tabele]
+\setupheadtext [\s!cz] [\v!tabellen=Tabulek]
+\setupheadtext [\s!sk] [\v!tabellen=Tabuliek]
+
+\setupheadtext [\s!pl] [\v!figuren=Ilustracje]
+\setupheadtext [\s!cz] [\v!figuren=Obr\'azk\r{u}]
+\setupheadtext [\s!sk] [\v!figuren=Obr\'azkov]
+
+\setupheadtext [\s!pl] [\v!grafieken=Grafika]
+\setupheadtext [\s!cz] [\v!grafieken=...]
+\setupheadtext [\s!sk] [\v!grafieken=...]
+
+\setupheadtext [\s!pl] [\v!intermezzos=Intermezzi]
+\setupheadtext [\s!cz] [\v!intermezzos=...]
+\setupheadtext [\s!sk] [\v!intermezzos=...]
+
+\setupheadtext [\s!pl] [\v!index=Indeks]
+\setupheadtext [\s!cz] [\v!index=Rejst\v{r}\'{\i}k]
+\setupheadtext [\s!sk] [\v!index=Zoznam]
+
+\setupheadtext [\s!pl] [\v!afkortingen=Skr\'ocenie]
+\setupheadtext [\s!cz] [\v!afkortingen=...]
+\setupheadtext [\s!sk] [\v!afkortingen=...]
+
+\setupheadtext [\s!pl] [\v!logos=Snaki]
+\setupheadtext [\s!cz] [\v!logos=...]
+\setupheadtext [\s!sk] [\v!logos=...]
+
+\setupheadtext [\s!pl] [\v!eenheden=Jednostki]
+\setupheadtext [\s!cz] [\v!eenheden=...]
+\setupheadtext [\s!sk] [\v!eenheden=...]
+
+\setuplabeltext [\s!pl] [\v!tabel=Tabela ]
+\setuplabeltext [\s!cz] [\v!tabel=Tabulka ]
+\setuplabeltext [\s!sk] [\v!tabel=Tabu\v{l}ka ]
+
+\setuplabeltext [\s!pl] [\v!figuur=Ilustracja ]
+\setuplabeltext [\s!cz] [\v!figuur=Obr\'azek ]
+\setuplabeltext [\s!sk] [\v!figuur=... ]
+
+\setuplabeltext [\s!pl] [\v!intermezzo=Intermezzo ]
+\setuplabeltext [\s!cz] [\v!intermezzo=... ]
+\setuplabeltext [\s!sk] [\v!intermezzo=... ]
+
+\setuplabeltext [\s!pl] [\v!grafiek=Grafika ]
+\setuplabeltext [\s!cz] [\v!grafiek=... ]
+\setuplabeltext [\s!sk] [\v!grafiek=... ]
+
+\setuplabeltext [\s!pl] [\v!hoofdstuk=]
+\setuplabeltext [\s!cz] [\v!hoofdstuk=Kapitola]
+\setuplabeltext [\s!sk] [\v!hoofdstuk=Kapitola]
+
+\setuplabeltext [\s!pl] [\v!paragraaf=]
+\setuplabeltext [\s!cz] [\v!paragraaf=]
+\setuplabeltext [\s!sk] [\v!paragraaf=]
+
+\setuplabeltext [\s!pl] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!cz] [\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sk] [\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!pl] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!cz] [\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sk] [\v!sub\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!pl] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!cz] [\v!sub\v!sub\v!sub\v!paragraaf=]
+\setuplabeltext [\s!sk] [\v!sub\v!sub\v!sub\v!paragraaf=]
+
+\setuplabeltext [\s!pl] [\v!bijlage=]
+\setuplabeltext [\s!cz] [\v!bijlage=]
+\setuplabeltext [\s!sk] [\v!bijlage=]
+
+\setuplabeltext [\s!pl] [\v!deel=Ust\c{e}p]
+\setuplabeltext [\s!cz] [\v!deel=\v{C}\'ast]
+\setuplabeltext [\s!sk] [\v!deel=\v{C}as\v{t}]
+
+\setuplabeltext [\s!pl] [\v!regel=wiersz]
+\setuplabeltext [\s!cz] [\v!regel=...]
+\setuplabeltext [\s!sk] [\v!regel=...]
+
+\setuplabeltext [\s!pl] [\v!regels=wiersze]
+\setuplabeltext [\s!cz] [\v!regels=...]
+\setuplabeltext [\s!sk] [\v!regels=...]
+
+\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!cz] [\v!january=ledna]
+\setuplabeltext [\s!cz] [\v!february=\'unora]
+\setuplabeltext [\s!cz] [\v!march=b\v{r}ezna]
+\setuplabeltext [\s!cz] [\v!april=dubna]
+\setuplabeltext [\s!cz] [\v!may=kv\v{e}tna]
+\setuplabeltext [\s!cz] [\v!june=\v{c}ervna]
+\setuplabeltext [\s!cz] [\v!july=\v{c}ervence]
+\setuplabeltext [\s!cz] [\v!august=srpna]
+\setuplabeltext [\s!cz] [\v!september=z\'a\v{r}\'\i]
+\setuplabeltext [\s!cz] [\v!october=\v{r}\'{\i}jna]
+\setuplabeltext [\s!cz] [\v!november=listopadu]
+\setuplabeltext [\s!cz] [\v!december=prosince]
+
+\setuplabeltext [\s!sk] [\v!january=janu\'ara]
+\setuplabeltext [\s!sk] [\v!february=febru\'ara]
+\setuplabeltext [\s!sk] [\v!march=marca]
+\setuplabeltext [\s!sk] [\v!april=apr\'{\i}la]
+\setuplabeltext [\s!sk] [\v!may=m\'aja]
+\setuplabeltext [\s!sk] [\v!june=j\'una]
+\setuplabeltext [\s!sk] [\v!july=j\'ula]
+\setuplabeltext [\s!sk] [\v!august=augusta]
+\setuplabeltext [\s!sk] [\v!september=septembra]
+\setuplabeltext [\s!sk] [\v!october=okt\'obra]
+\setuplabeltext [\s!sk] [\v!november=novembra]
+\setuplabeltext [\s!sk] [\v!december=decembra]
+
+\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 ...
+%D \ShowAllLanguageValues [\s!cz] [czech] tsjechische ...
+%D \ShowAllLanguageValues [\s!sk] [slovak] slovaakse ...
+
+\protect
+
+\endinput
diff --git a/tex/context/base/lang-sp.pat b/tex/context/base/lang-sp.pat
index 72c2e6095..f3b0e56e8 100644
--- a/tex/context/base/lang-sp.pat
+++ b/tex/context/base/lang-sp.pat
@@ -1,151 +1,150 @@
-% 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
+% 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
diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex
index d84a0017d..ffb27766e 100644
--- a/tex/context/base/lang-ura.tex
+++ b/tex/context/base/lang-ura.tex
@@ -1,85 +1,86 @@
-%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
+%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!status=\v!stop]
+
+\installlanguage [finish] [\s!fi]
+
+\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!sub\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
diff --git a/tex/context/base/list-ini.tex b/tex/context/base/list-ini.tex
index d019d2182..20031b53f 100644
--- a/tex/context/base/list-ini.tex
+++ b/tex/context/base/list-ini.tex
@@ -1,40 +1,39 @@
-%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
+%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
diff --git a/tex/context/base/m-ch-de.sty b/tex/context/base/m-ch-de.sty
new file mode 100644
index 000000000..33aa71374
--- /dev/null
+++ b/tex/context/base/m-ch-de.sty
@@ -0,0 +1 @@
+\input m-ch-de.tex \relax \endinput
diff --git a/tex/context/base/m-ch-de.tex b/tex/context/base/m-ch-de.tex
new file mode 100644
index 000000000..467cdc670
--- /dev/null
+++ b/tex/context/base/m-ch-de.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / german interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=2
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/context/base/m-ch-en.sty b/tex/context/base/m-ch-en.sty
new file mode 100644
index 000000000..0ed2f9c1d
--- /dev/null
+++ b/tex/context/base/m-ch-en.sty
@@ -0,0 +1 @@
+\input m-ch-en.tex \relax \endinput
diff --git a/tex/context/base/m-ch-en.tex b/tex/context/base/m-ch-en.tex
new file mode 100644
index 000000000..8c55a5669
--- /dev/null
+++ b/tex/context/base/m-ch-en.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / english interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=0
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/context/base/m-ch-nl.sty b/tex/context/base/m-ch-nl.sty
new file mode 100644
index 000000000..82fb052a0
--- /dev/null
+++ b/tex/context/base/m-ch-nl.sty
@@ -0,0 +1 @@
+\input m-ch-nl.tex \relax \endinput
diff --git a/tex/context/base/m-ch-nl.tex b/tex/context/base/m-ch-nl.tex
new file mode 100644
index 000000000..c9d77733a
--- /dev/null
+++ b/tex/context/base/m-ch-nl.tex
@@ -0,0 +1,10 @@
+% name : PPCHTEX / english interface
+% version : 1997.03.05
+% author : J. Hagen
+% copyright : J. Hagen, A.F. Otten
+
+\chardef\interfacenumber=1
+
+\input ppchtex.noc
+
+\endinput
diff --git a/tex/context/base/m-chemic.tex b/tex/context/base/m-chemic.tex
new file mode 100644
index 000000000..3f107ffa7
--- /dev/null
+++ b/tex/context/base/m-chemic.tex
@@ -0,0 +1,21 @@
+%D \module
+%D [ file=ppchtex (m-chemic),
+%D version=1997.03.19,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten},
+%D suggestions={Tobias Burnus, Dirk Kuypers \& 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.
+
+\ifx\beginpicture\undefined
+ \input pictex.tex \relax
+\fi
+
+\input ppchtex.tex \relax
+
+\endinput
diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex
new file mode 100644
index 000000000..2badc299e
--- /dev/null
+++ b/tex/context/base/m-pictex.tex
@@ -0,0 +1,234 @@
+%D \module
+%D [ file=m-pictex,
+%D version=1997.01.15,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PICTEX\ Loading 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.
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+
+\unprotect
+
+%D \TEX\ provides 256 \DIMENSIONS\ and 256 \SKIPS. In \CONTEXT\
+%D this is no problem, but in packages that have many
+%D authors, one can be quite sure that a lot of \DIMENSIONS\ are
+%D allocated. Packages that use \PICTEX\ can therefore run out
+%D of \DIMENSIONS\ quite fast. This module was written as a
+%D reaction to persistent problems with loading \PPCHTEX\ in
+%D \LATEX\ and \PICTEX\ deserves a solution. I therefore
+%D dedicate this module to Tobias Burnus and Dirk Kuypers, who
+%D use \PPCHTEX\ in a \LATEX\ environment and suggested a lot
+%D of extensions to the repertoire of \PPCHTEX\ commands.
+%D
+%D This module presents a solution that is quite effective: all
+%D \DIMENSIONS\ are drawn from the pool of \DIMENSIONS\ and
+%D \SKIPS, depending on the availability. This is possible
+%D because \DIMENSIONS\ are \SKIPS\ without a glue component.
+%D Therefore we can use \SKIPS\ as \DIMENSIONS. However, some
+%D incompatibility can result from assignments that look like:
+%D
+%D \starttypen
+%D \somedimen=\someskip
+%D \stoptypen
+%D
+%D In such cases the \DIMENSION\ equals the fixed part of the
+%D \SKIP\ or in other words: this assignment strips off the
+%D glue. Because \PICTEX\ uses no glue components, I thought
+%D I could interchange both register types without problems,
+%D but alas, this didn't hold for all \DIMENSIONS.
+
+%D In \PLAIN\ \TEX\ the allocation macros are defined with (as)
+%D \type{\outer}. This means that they cannot appear inside
+%D macros, not even in an indirect way. We therefore have to
+%D redefine both \type{\newdimen} and \type{\newskip} to
+%D non||\type{\outer} alternatives. In most macro packages this
+%D redefinition already took place. We save the original
+%D meanings, so we can restores them afterwards.
+
+\let\normalnewdimen = \newdimen
+\let\normalnewskip = \newskip
+
+\def\temporarynewdimen {\alloc@1\dimen\dimendef\insc@unt}
+\def\temporarynewskip {\alloc@2\skip \skipdef \insc@unt}
+
+%D Here comes the trick. Depending on how many \DIMENSIONS\ and
+%D \SKIPS\ are allocated, the \type{\newdimen} assigns a
+%D \DIMENSIONS\ or \SKIP. \PLAIN\ \TEX\ allocates 15 \DIMENSIONS\
+%D and 17 \SKIPS. After loading \PICTEX, 71 \DIMENSIONS\ and
+%D and 71 \SKIPS\ are allocated. Indeed, \PICTEX\ needs 110
+%D \DIMENSIONS !
+%D
+%D \starttypen
+%D \def\newdimen%
+%D {\ifnum\count11>\count12
+%D \let\next=\temporarynewskip
+%D \else
+%D \let\next=\temporarynewdimen
+%D \fi
+%D \next}
+%D \stoptypen
+%D
+%D When I was testing a new version of \PPCHTEX\ in \PLAIN\
+%D \TEX\ I had to find out that this exchange of registers
+%D sometimes leads to unwanted results. It took me some hours
+%D to find out that the source of errors originated in
+%D constructions like:
+%D
+%D \starttypen
+%D \ifdim\DimenOne<\DimenTwo whatever you want \else or not \fi
+%D \stoptypen
+%D
+%D When \type{\DimenOne} is a \SKIP\ and \type{\DimenTwo} is a
+%D \DIMENSION, \TEX\ scans for some optional glue component,
+%D like in:
+%D
+%D \starttypen
+%D \skip0=\dimen0 plus 10pt minus 5pt
+%D \stoptypen
+%D
+%D The most robust solution to this problem is:
+%D
+%D \starttypen
+%D \ifdim\DimenOne<\DimenTwo\relax right \else wrong \fi
+%D \stoptypen
+%D
+%D Some close reading of the \PICTEX\ source however learned me
+%D that this problem could be solved best by just honoring the
+%D allocation of \DIMENSIONS\ when the name of the macro
+%D explictly stated the character sequence \type{dimen}. A next
+%D implementation therefore automatically declared all
+%D \DIMENSIONS\ with this sequence in their names with
+%D \type{\dimen}. Again I was too optimistic, so now we do it
+%D this way (the comments are from \PICTEX, which like \TABLE,
+%D is an example of a well documented package):
+
+\temporarynewdimen\!dimenA %.AW.X.DVEUL..OYQRST
+\temporarynewdimen\!dimenB %....X.DVEU...O.QRS.
+\temporarynewdimen\!dimenC %..W.X.DVEU......RS.
+\temporarynewdimen\!dimenD %..W.X.DVEU....Y.RS.
+\temporarynewdimen\!dimenE %..W........G..YQ.S.
+\temporarynewdimen\!dimenF %...........G..YQ.S.
+\temporarynewdimen\!dimenG %...........G..YQ.S.
+\temporarynewdimen\!dimenH %...........G..Y..S.
+\temporarynewdimen\!dimenI %...BX.........Y....
+\temporarynewdimen\!dxpos %..W......U..P....S.
+\temporarynewdimen\!dypos %..WB.....U..P......
+\temporarynewdimen\!xloc %..WB.....U.......S.
+\temporarynewdimen\!xpos %..........L.P..Q.ST
+\temporarynewdimen\!yloc %..WB.....U.......S.
+\temporarynewdimen\!ypos %..........L.P..Q.ST
+\temporarynewdimen\!zpt %.AWBX.DVEULGP.YQ.ST
+
+%D Tobias tested this module in all kind of \LATEX\ dialects
+%D so we were able to find out that we also needed to declare:
+
+\temporarynewdimen\linethickness
+
+%D After all, the new definition of \type{\newdimen} became:
+
+\def\newdimen#1%
+ {\ifx#1\undefined
+ \ifnum\count11>\count12\relax
+ \temporarynewskip#1\relax
+ \else
+ \temporarynewdimen#1\relax
+ \fi
+ %\edef\ascii{\meaning#1}%
+ %\immediate\write20{\string#1 becomes \ascii}%
+ \else
+ %\edef\ascii{\meaning#1}%
+ %\immediate\write20{\string#1 already is \ascii}%
+ \fi}
+
+% \def\newdimen#1%
+% {\bgroup
+% \escapechar=-1
+% \def\next##1##2%
+% {\def\next####1##1####2####3\next%
+% {\egroup
+% \if####2@
+% \temporarynewdimen#1\relax
+% \ifnum\count11>\count12
+% \temporarynewskip#1\relax
+% \else
+% \temporarynewdimen#1\relax
+% \fi\fi}%
+% \expandafter\next\string##2##1@@\next}%
+% \expandafter\next\expandafter{\string\dimen}#1}
+%
+% This macro is as unreadable, inefficient and as compact as
+% can be, but uses no extra hash entries, which sometimes are
+% scarce too. A more readable alternative, that also takes
+% explicit \SKIPS\ into account, is included in the source.
+%
+% \def\doifregisterpreferenceelse#1#2#3#4%
+% {\def\dodoifregisterpreferenceelse##1#1##2##3\war{\if##2@}%
+% \expandafter\dodoifregisterpreferenceelse\string#2#1@@\war
+% #4%
+% \else
+% #3%
+% \fi}
+%
+% \def\newdimen#1%
+% {\bgroup
+% \escapechar=-1
+% \expandafter\doifregisterpreferenceelse\expandafter{\string\dimen}#1
+% {\egroup
+% \temporarynewdimen#1}
+% {\expandafter\doifregisterpreferenceelse\expandafter{\string\skip}#1
+% {\egroup
+% \temporarynewskip#1}
+% {\egroup
+% \ifnum\count11>\count12
+% \temporarynewskip#1\relax
+% \else
+% \temporarynewdimen#1\relax
+% \fi}}}
+
+%D Curious readers can still find the previous solution in
+%D the source. The next macro is used instead of
+%D \type{\input}. This macro also reports some statistics.
+
+\def\dimeninput#1 %
+ {\message{[before: d=\the\count11,s=\the\count12]}%
+ \input #1 \relax
+ \message{[after: d=\the\count11,s=\the\count12]}}%
+
+%D Not every package defines \type{\fiverm}, \PICTEX's pixel,
+%D so let's take care of that omision now:
+
+\ifx\undefined\fiverm
+ \font\fiverm=cmr5
+\fi
+
+%D The actual loading of \PICTEX\ depends on the package.
+%D For \LATEX\ users we take care of loading the auxiliary
+%D ones too.
+
+\ifx\beginpicture\undefined
+ \ifx\newenvironment\undefined
+ \dimeninput pictex.tex \relax
+ \else
+ \dimeninput prepictex.tex \relax
+ \dimeninput pictex.tex \relax
+ \dimeninput postpictex.tex \relax
+ \fi
+\fi
+
+%D Finally we restore the old definitions of \type{\newdimen}
+%D and \type{\newskip}:
+
+\let\newdimen=\normalnewdimen
+\let\newskip =\normalnewskip
+
+%D and just hope for the best.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/m-pstric.tex b/tex/context/base/m-pstric.tex
new file mode 100644
index 000000000..32e48c571
--- /dev/null
+++ b/tex/context/base/m-pstric.tex
@@ -0,0 +1,46 @@
+%D \module
+%D [ file=m-pstricks,
+%D version=1997.01.15,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PSTRICKS\ Connections,
+%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.
+
+\edef\oldbarcode{\the\catcode`\|} % \chardef
+\catcode`\|=12
+
+\def\definieerkleur#1[#2]#3[#4]%
+ {%\writestatus{pstricks}{definieer kleur #2}%
+ \getparameters[pstricks][#4]%
+ \newrgbcolor{#2}{{\pstricksr} {\pstricksg} {\pstricksb}}}
+
+\def\definieerpalet#1[#2]#3[#4]%
+ {} %{\writestatus{pstricks}{overslaan definieer palet #2}}
+
+\def\definieerkleurgroep#1[#2]#3[#4]%
+ {} %{\writestatus{pstricks}{overslaan definieer kleurgroep #2}}
+
+\def\loadpstrickscolors#1%
+ {\let\olddefinieerkleur=\definieerkleur
+ \let\olddefinieerpalet=\definieerpalet
+ \let\olddefinieerkleurgroep=\definieerkleurgroep
+ \writestatus{pstricks}{loading colors from #1}%
+ \input #1 \relax
+ \let\definieerkleur=\olddefinieerkleur
+ \let\definieerpalet=\olddefinieerpalet
+ \let\definieerkleurgroep=\olddefinieerkleurgroep}
+
+\input multido \relax
+\input pstricks \relax
+\input pst_plot \relax
+
+\loadpstrickscolors{colo-rgb} % nog koppelen \redef\
+
+\catcode`\|=\oldbarcode
+
+\endinput
diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex
new file mode 100644
index 000000000..e83430f74
--- /dev/null
+++ b/tex/context/base/m-units.tex
@@ -0,0 +1,692 @@
+%D \module
+%D [ file=m-units,
+%D version=1997.03.19,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Scientific Units,
+%D author={Hans Hagen \& Ton Otten},
+%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 Scientific units can be typeset in math mode pretty well,
+%D but occasionally one has to take care of spacing.
+%D Furthermore, entering these units is not that natural as
+%D wanted. Therefore this module presents a more natural way of
+%D doing things, like:
+%D
+%D \starttypen
+%D 1.23 \Cubic \Meter \Per \Second
+%D \stoptypen
+%D
+%D This example shows that we use the order in which we say
+%D things, instead of typeset things. There is a separate
+%D manual for this module.
+
+%D Message number~1 deals with overruling the \type {\Degrees}
+%D macro defined in the core modules. Let's say that this is
+%D an upward compatibility issue.
+
+\startmessages dutch library: units
+ title: eenheden
+ 1: gebruik \string\Degrees\space\string\Celsius\space in plaats van \string\Celsius !
+\stopmessages
+
+\startmessages english library: units
+ title: units
+ 1: use \string\Degrees\space\string\Celsius\space instead of \string\Celsius !
+\stopmessages
+
+\startmessages german library: units
+ title: Einheiten
+ 1: Verwende \string\Degrees\space\string\Celsius\space statt \string\Celsius !
+\stopmessages
+
+\unprotect
+
+%D This runtime loadable module implements a way of defining
+%D units. The core macro is \type {\dimension}, a rather clever
+%D one that is able to cooperate with some other dimension
+%D related macros. As said, this module enables user to enter:
+%D
+%D \startbuffer
+%D some 10 \Square \Meter \Per \Second or more
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D as:
+%D
+%D \typebuffer
+%D
+%D The units itself are implemented as synonyms.
+%D
+%D \starttypen
+%D \definesynonyms [unit] [units] [\unitmeaning]
+%D \stelsynoniemenin [unit] [textstyle=\dimension]
+%D \stoptypen
+%D
+%D We have to use the command \type {\unitedmeaning} instead
+%D of \type {\meaning}, simply because the latter is a \TEX\
+%D primitive we don't want to loose. We use the label text
+%D mechanism for translations.
+%D
+%D This definition means that we can ask for the meaning of a
+%D unit using \type {\unitmeaning} and get a list of used
+%D units by saying \type {\placelistofunits}
+
+%D \macros
+%D {dimension}
+%D
+%D The core of this module is the low level macro \type
+%D {\dimension}. Before presenting this macro, it's best to
+%D look at some applications, because it's supposed to show
+%D some intelligence that can beter be understood from the
+%D context.
+%D
+%D The next useless examples show some of the cases we want
+%D to handle in a proper way.
+%D
+%D \startbuffer
+%D ... 10 \Square \Meter \Per \Volt \
+%D ... 10 \Square \Meter \Volt \
+%D ... 10 \Meter \Volt \
+%D ... 10 \Milli \Square \Meter \Per \Volt \
+%D ... 10 \Square \Milli \Meter \Per \Volt \
+%D ... 10 \Meter \Times \Meter \
+%D ... 10 \Square \Meter \Times \Meter \
+%D ... 10 \Square \Milli \Meter \Times \Meter \
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Becomes:
+%D
+%D \haalbuffer
+
+%D \macros
+%D {mathematicstypeface, dimensiontypeface,
+%D dimensionhalfspace, dimensionbackspace}
+%D
+%D There are some low level constants, that can be changed
+%D when needed. Some day I will write a decent setup command.
+
+\def\mathematicstypeface{\rm}
+\def\dimensiontypeface {\tf}
+
+\def\dimensionhalfspace {\,}
+\def\dimensionbackspace {\!}
+
+%D \macros
+%D {smashdimensionpower}
+%D
+%D Sometimes the baseline distance is not enough to provide
+%D for superscripts, so we smash their height by default.
+
+\newif\ifsmashdimensionpower \smashdimensionpowertrue
+
+%D The dimension mechanism uses a lot of signals to keep
+%D track if the current state.
+
+\newsignal\dimensionsignal
+\newsignal\dimensionpowersignal
+\newsignal\dimensionmidfixsignal
+\newsignal\dimensionaddfixsignal
+
+\let\thedimensionprefix = \empty
+\let\thedimensionpower = \empty
+
+%D \macros
+%D {spaceddimensions}
+%D
+%D The actual definition of \type {\dimension} overruled the
+%D one in the core modules. The boolean can be used to
+%D force spacing between units. Vergelijk {\Newton \Meter}
+%D eens met {\spaceddimensionstrue \Newton \Meter}. The
+%D rather ugly test prevents problems with nested dimensions.
+
+\newif\ifspaceddimensions \spaceddimensionsfalse % user switch
+\newif\ifnesteddimension \nesteddimensionfalse % local switch
+
+\unexpanded\def\dimension#1%
+ {\begingroup
+ \global\let\savedthedimensionprefix\thedimensionprefix
+ \global\let\savedthedimensionpower\thedimensionpower
+ \unexpanded\def\dimension##1{\global\nesteddimensiontrue}%
+ \let\dimensionprefix\dimension
+ \let\dimensionmidfix\dimension
+ \let\dimensionsuffix\dimension
+ \let\dimensionpower\dimension
+ \global\nesteddimensionfalse
+ \setbox0=\hbox{\startmathmode#1\stopmathmode}%
+ \global\let\thedimensionprefix\savedthedimensionprefix
+ \global\let\thedimensionpower\savedthedimensionpower
+ \endgroup
+ \ifnesteddimension#1\else\dodimension{#1}\fi}
+
+\def\dodimension#1%
+ {\dontbreakdimension
+ \ifdim\scratchdimen=\!!zeropoint\relax
+ \ifmmode
+ \dimensionhalfspace
+ \dimensionhalfspace
+ \fi
+ \startmathmode\dimensiontypeface
+ \else
+ \startmathmode\dimensiontypeface
+ \ifdim\scratchdimen=\dimensionsignal\relax
+ \ifspaceddimensions\dimensionhalfspace\fi
+ \fi
+ \fi
+ \mathematicstypeface\thedimensionprefix#1%
+ \ifx\thedimensionpower\empty
+ \else\ifsmashdimensionpower
+ \setbox\scratchbox=\hbox{$\scriptstyle\thedimensionpower$}%
+ \ht\scratchbox=\!!zeropoint
+ ^{\box\scratchbox}%
+ \else
+ ^{\thedimensionpower}%
+ \fi\fi
+ \stopmathmode
+ \nobreak
+ \ifx\thedimensionpower\empty
+ \hskip\dimensionsignal
+ \else
+ \hskip\dimensionpowersignal
+ \fi
+ \global\let\thedimensionprefix=\empty
+ \global\let\thedimensionpower=\empty}
+
+%D \macro
+%D {dontbreakdimension,
+%D dimensionprefix, dimensionaddfix,
+%D dimensionnopfix, dimensionmidfix,
+%D dimensionpower}
+%D
+%D Here are some auxilliary macros.
+
+\def\dontbreakdimension%
+ {\scratchdimen=\lastskip
+ \unskip
+ \nobreak
+ \hskip\scratchdimen
+ \nobreak}
+
+\def\dimensionprefix#1%
+ {\gdef\thedimensionprefix{#1}}
+
+\def\dimensionaddfix#1%
+ {\unskip
+ \mathematics{\mathematicstypeface#1}%
+ \nobreak
+ \hskip\dimensionaddfixsignal}
+
+\def\dimensionnopfix#1%
+ {\dontbreakdimension
+ \ifdim\scratchdimen=\dimensionpowersignal\relax
+ \startmathmode
+ \else
+ \startmathmode
+ \dimensionhalfspace
+ \nobreak
+ \fi
+ \mathematicstypeface#1%
+ \stopmathmode
+ \nobreak
+ \hskip\dimensionsignal}
+
+\def\dimensionmidfix#1%
+ {\dontbreakdimension
+ \ifdim\scratchdimen=\dimensionpowersignal\relax
+ \startmathmode
+ \dimensionbackspace
+ \nobreak
+ \else
+ \startmathmode
+ \fi
+ \mathematicstypeface#1%
+ \stopmathmode
+ \nobreak
+ \hskip\dimensionmidfixsignal}
+
+\def\dimensionpower#1%
+ {\gdef\thedimensionpower{#1}}
+
+%D \macro
+%D {SIunits, noSI, doSI}
+%D
+%D Some low level unit switching macros:
+
+\newif\ifSIunits \SIunitstrue
+
+\def\noSI#1{\begingroup\SIunitsfalse#1\endgroup}
+\def\doSI#1{\begingroup\SIunitstrue#1\endgroup}
+
+%D \macros
+%D {Degrees}
+%D
+%D We can fake the degrees symbol with:
+
+\def\Degrees%
+ {\dimensionaddfix{^\circ}}
+
+%D \macro
+%D {Unit, NoUnit}
+%D
+%D When a dimension has no leading number, we can use \type
+%D {\Unit}, and when no unit is appended, \type {\NoUnit} is
+%D to be used, just to prevent the prefix migrating to the
+%D next occasion.
+
+\def\Unit {\hskip\dimensionsignal}
+\def\NoUnit {\dimension{}}
+
+%D The mechanism described at the top of this module, depends
+%D on several dimensional components, like prefixes:
+
+\def\Atto {\dimensionprefix{a}}
+\def\Femto {\dimensionprefix{f}}
+\def\Pico {\dimensionprefix{p}}
+\def\Nano {\dimensionprefix{n}}
+\def\Micro {\dimensionprefix{\mu}}
+\def\Milli {\dimensionprefix{m}}
+\def\Centi {\dimensionprefix{c}}
+\def\Deci {\dimensionprefix{d}}
+\def\Hecto {\dimensionprefix{h}}
+\def\Kilo {\dimensionprefix{k}}
+\def\Mega {\dimensionprefix{M}}
+\def\Giga {\dimensionprefix{G}}
+\def\Terra {\dimensionprefix{T}}
+\def\Peta {\dimensionprefix{P}}
+\def\Exa {\dimensionprefix{E}}
+
+%D and operators:
+
+\def\Times {\dimensionnopfix{\cdot}}
+\def\Solidus {\dimensionmidfix{/}}
+\def\Per {\dimensionmidfix{/}}
+\def\OutOf {\dimensionnopfix{:}}
+
+%D and suffixes:
+
+\def\Linear {\dimensionpower{1}}
+\def\Square {\dimensionpower{2}}
+\def\Cubic {\dimensionpower{3}}
+
+\def\Inverse {\dimensionpower{-1}}
+\def\ILinear {\dimensionpower{-1}}
+\def\ISquare {\dimensionpower{-2}}
+\def\ICubic {\dimensionpower{-3}}
+
+%D Apart from these components, the units themselves are
+%D defined using the synonym mechanism. First we define some
+%D length and volume related units.
+
+\getvalue{\v!eenheid} [Meter] {m} {meter}
+\getvalue{\v!eenheid} [pMeter] {\Pico \Meter} {picometer}
+\getvalue{\v!eenheid} [nMeter] {\Nano \Meter} {nanometer}
+\getvalue{\v!eenheid} [uMeter] {\Micro \Meter} {micrometer}
+\getvalue{\v!eenheid} [mMeter] {\Milli \Meter} {millimeter}
+\getvalue{\v!eenheid} [cMeter] {\Centi \Meter} {centimeter}
+\getvalue{\v!eenheid} [dMeter] {\Deci \Meter} {decimeter}
+\getvalue{\v!eenheid} [hMeter] {\Hecto \Meter} {hectometer}
+\getvalue{\v!eenheid} [kMeter] {\Kilo \Meter} {kilometer}
+
+\getvalue{\v!eenheid} [Liter] {l} {liter}
+\getvalue{\v!eenheid} [mLiter] {\Milli \Liter} {milliliter}
+\getvalue{\v!eenheid} [cLiter] {\Centi \Liter} {centiliter}
+\getvalue{\v!eenheid} [dLiter] {\Deci \Liter} {deciliter}
+
+%D Next we define time related units (\type {\ifSI} still dutch only).
+
+\getvalue{\v!eenheid} [Sec] {s} {\labeltext{u:sec}}
+\getvalue{\v!eenheid} [fSec] {\Femto \Sec} {\labeltext{u:fsec}}
+\getvalue{\v!eenheid} [pSec] {\Pico \Sec} {\labeltext{u:psec}}
+\getvalue{\v!eenheid} [nSec] {\Nano \Sec} {\labeltext{u:nsec}}
+\getvalue{\v!eenheid} [uSec] {\Micro \Sec} {\labeltext{u:usec}}
+\getvalue{\v!eenheid} [mSec] {\Milli \Sec} {\labeltext{u:msec}}
+\getvalue{\v!eenheid} [Year] {\ifSIunits a \else j\fi} {\labeltext{u:year}}
+\getvalue{\v!eenheid} [Month] {m} {\labeltext{u:month}}
+\getvalue{\v!eenheid} [Week] {w} {\labeltext{u:week}}
+\getvalue{\v!eenheid} [Day] {d} {\labeltext{u:day}}
+\getvalue{\v!eenheid} [Hour] {\ifSIunits h \else u\fi} {\labeltext{u:hour}}
+\getvalue{\v!eenheid} [Min] {min} {\labeltext{u:min}}
+
+\setuplabeltext
+ [\s!nl]
+ [u:sec=seconde,
+ u:psec=picoseconde,
+ u:fsec=femtoseconde,
+ u:nsec=nanoseconde,
+ u:usec=microseconde,
+ u:msec=milliseconde,
+ u:year=jaar,
+ u:month=maand,
+ u:week=week,
+ u:day=dag,
+ u:hour=uur,
+ u:min=minuten]
+
+\setuplabeltext
+ [\s!en]
+ [u:sec=second,
+ u:fsec=femtosecond,
+ u:psec=picosecond,
+ u:nsec=nanosecond,
+ u:usec=microsecond,
+ u:msec=millisecond,
+ u:year=year,
+ u:month=month,
+ u:week=week,
+ u:day=day,
+ u:hour=hour,
+ u:min=minutes]
+
+\setuplabeltext
+ [\s!de]
+ [u:sec=Sekunde,
+ u:fsec=Femtosekunde,
+ u:psec=Picosekunde,
+ u:nsec=Nanosekunde,
+ u:usec=Microsekunde,
+ u:msec=Millisekunde,
+ u:year=Jahr,
+ u:month=Monat,
+ u:week=Woche,
+ u:day=Tag,
+ u:hour=Stunde,
+ u:min=Minuten]
+
+%D Then we define some angles.
+
+\getvalue{\v!eenheid} [Rad] {rad} {\labeltext{u:rad}}
+\getvalue{\v!eenheid} [Deg] {{^\circ}} {\labeltext{u:deg}}
+
+\setuplabeltext
+ [\s!nl]
+ [u:rad=hoek radialen,
+ u:deg=hoek graden]
+
+\setuplabeltext
+ [\s!en]
+ [u:rad=angle radians,
+ u:deg=angle degrees]
+
+\setuplabeltext
+ [\s!de]
+ [u:rad=Bogenma\SS,
+ u:deg=Gradma\SS]
+
+%D Rotation and frequency related units are defined by:
+
+\getvalue{\v!eenheid} [Hertz] {Hz} {Hertz}
+\getvalue{\v!eenheid} [kHertz] {\Kilo \Hertz} {kilo Hertz}
+\getvalue{\v!eenheid} [MHertz] {\Mega \Hertz} {mega Hertz}
+\getvalue{\v!eenheid} [GHertz] {\Giga \Hertz} {giga Hertz}
+\getvalue{\v!eenheid} [THertz] {\Tera \Hertz} {tera Hertz}
+\getvalue{\v!eenheid} [mHertz] {\Milli \Hertz} {milli Hertz}
+
+\getvalue{\v!eenheid} [RevPerSec] {RPS} {\labeltext{u:rps}}
+\getvalue{\v!eenheid} [RevPerMin] {RPM} {\labeltext{u:rpm}}
+
+\setuplabeltext
+ [\s!nl]
+ [u:rps=omwentelingen per seconde,
+ u:rpm=omwentelingen per minuut]
+
+\setuplabeltext
+ [\s!en]
+ [u:rps=revolutions per second,
+ u:rpm=revolutions per minute]
+
+\setuplabeltext
+ [\s!de]
+ [u:rps=Umdrehungen pro Sekunde,
+ u:rpm=Umdrehungen pro Minute]
+
+%D Mass and force:
+
+\getvalue{\v!eenheid} [Gram] {g} {gram}
+\getvalue{\v!eenheid} [uGram] {\Micro \Gram} {microgram}
+\getvalue{\v!eenheid} [mGram] {\Milli \Gram} {milligram}
+\getvalue{\v!eenheid} [kGram] {\Kilo \Gram} {kilogram}
+\getvalue{\v!eenheid} [Atom] {u} {\labeltext{u:u}}
+
+\getvalue{\v!eenheid} [Newton] {N} {Newton}
+\getvalue{\v!eenheid} [kNewton] {\Kilo \Newton} {kilo Newton}
+
+\getvalue{\v!eenheid} [Pascal] {Pa} {Pascal}
+\getvalue{\v!eenheid} [mPascal] {\Milli \Pascal} {milli Pascal}
+\getvalue{\v!eenheid} [kPascal] {\Kilo \Pascal} {kilo Pascal}
+
+\setuplabeltext
+ [\s!nl]
+ [u:u=atomaire massa eenheid]
+
+\setuplabeltext
+ [\s!en]
+ [u:u=atom mass unit]
+
+\setuplabeltext
+ [\s!de]
+ [u:u=Atomare Masseneinheit]
+
+%D Energy units comes in two alternatives:
+
+\getvalue{\v!eenheid} [Joule] {J} {Joule}
+\getvalue{\v!eenheid} [mJoule] {\Milli \Joule} {milli Joule}
+\getvalue{\v!eenheid} [kJoule] {\Kilo \Joule} {kilo Joule}
+\getvalue{\v!eenheid} [MJoule] {\Mega \Joule} {mega Joule}
+\getvalue{\v!eenheid} [GJoule] {\Giga \Joule} {giga Joule}
+
+\getvalue{\v!eenheid} [Watt] {W} {Watt}
+\getvalue{\v!eenheid} [mWatt] {\Milli \Watt} {milli Watt}
+\getvalue{\v!eenheid} [kWatt] {\Kilo \Watt} {kilo Watt}
+\getvalue{\v!eenheid} [MWatt] {\Mega \Watt} {mega Watt}
+\getvalue{\v!eenheid} [GWatt] {\Giga \Watt} {giga Watt}
+\getvalue{\v!eenheid} [TWatt] {\Tera \Watt} {tera Watt}
+
+%D Although Celsius is no longer permitted, we define it by
+%D saying:
+
+\getvalue{\v!eenheid} [Celsius] {C} {Celsius}
+\getvalue{\v!eenheid} [Kelvin] {K} {Kelvin}
+\getvalue{\v!eenheid} [Fahrenheit] {F} {Fahrenheit}
+
+%D Some chemic related units are:
+
+\getvalue{\v!eenheid} [Mol] {mol} {mol}
+\getvalue{\v!eenheid} [mMol] {\Milli \Mol} {millimol}
+\getvalue{\v!eenheid} [kMol] {\Kilo \Mol} {kilomol}
+\getvalue{\v!eenheid} [Molair] {M} {molair (\Mol \Per \Liter)}
+\getvalue{\v!eenheid} [Equivalent] {eq} {equivalent}
+\getvalue{\v!eenheid} [mEquivalent] {\Milli \Equivalent} {milli equivalent}
+
+%D There are quite a lot units related to electricity and
+%D magnetism:
+
+\getvalue{\v!eenheid} [Farad] {F} {Farad}
+\getvalue{\v!eenheid} [pFarad] {\Pico \Farad} {pico Farad}
+\getvalue{\v!eenheid} [nFarad] {\Nano \Farad} {nano Farad}
+\getvalue{\v!eenheid} [uFarad] {\Micro \Farad} {micro Farad}
+\getvalue{\v!eenheid} [mFarad] {\Milli \Farad} {milli Farad}
+
+\getvalue{\v!eenheid} [Ohm] {\Omega} {Ohm}
+\getvalue{\v!eenheid} [kOhm] {\Kilo \Ohm} {kilo Ohm}
+
+\getvalue{\v!eenheid} [Siemens] {S} {Siemens}
+
+\getvalue{\v!eenheid} [Ampere] {A} {Amp\`ere}
+\getvalue{\v!eenheid} [mAmpere] {\Milli \Ampere} {milli Amp\`ere}
+
+\getvalue{\v!eenheid} [Coulomb] {C} {Coulomb}
+
+\getvalue{\v!eenheid} [Volt] {V} {Volt}
+\getvalue{\v!eenheid} [mVolt] {\Milli \Volt} {milli Volt}
+\getvalue{\v!eenheid} [kVolt] {\Kilo \Volt} {kilo Volt}
+\getvalue{\v!eenheid} [eVolt] {eV} {electronvolt}
+\getvalue{\v!eenheid} [keVolt] {\Kilo \eVolt} {kilo electronvolt}
+\getvalue{\v!eenheid} [MeVolt] {\Mega \eVolt} {mega electronvolt}
+
+\getvalue{\v!eenheid} [Tesla] {T} {Tesla}
+
+\getvalue{\v!eenheid} [VoltAC] {V_{\xbox{ac}}} {\labeltext{u:vac}}
+\getvalue{\v!eenheid} [VoltDC] {V_{\xbox{dc}}} {\labeltext{u:vdc}}
+
+\setuplabeltext
+ [\s!nl]
+ [u:vac=wisselspanning,
+ u:vdc=gelijkspanning]
+
+\setuplabeltext
+ [\s!en]
+ [u:vac=alternating current,
+ u:vdc=different current]
+
+\setuplabeltext
+ [\s!de]
+ [u:vac=Wechselspannung,
+ u:vdc=Gleichspannung]
+
+%D Computer memory is specified in Bytes:
+
+\getvalue{\v!eenheid} [Baud] {Baud} {Baud (Bit/s)}
+\getvalue{\v!eenheid} [Bit] {Bit} {Bit}
+
+\getvalue{\v!eenheid} [Byte] {Byte} {Byte}
+\getvalue{\v!eenheid} [kByte] {\Kilo \Byte} {kilo Byte}
+\getvalue{\v!eenheid} [MByte] {\Mega \Byte} {mega Byte}
+\getvalue{\v!eenheid} [GByte] {\Giga \Byte} {giga Byte}
+\getvalue{\v!eenheid} [TByte] {\Terra \Byte} {terra Byte}
+
+%D Some radiation related units:
+
+\getvalue{\v!eenheid} [Bequerel] {Bq} {Bequerel}
+\getvalue{\v!eenheid} [MBequerel] {\Mega \Bequerel} {Bequerel}
+\getvalue{\v!eenheid} [Sievert] {Sv} {Sievert}
+\getvalue{\v!eenheid} [mSievert] {\Milli \Sievert} {milli Sievert}
+
+%D Light:
+
+\getvalue{\v!eenheid} [Candela] {cd} {Candela}
+
+%D and some sound ones:
+
+\getvalue{\v!eenheid} [Bell] {B} {Bell}
+\getvalue{\v!eenheid} [dBell] {\Deci \Bell} {decibel}
+
+%D We also define some non||regular, sometimes even forbidden,
+%D units:
+
+\getvalue{\v!eenheid} [At] {at} {\labeltext{u:at}}
+\getvalue{\v!eenheid} [Atm] {atm} {\labeltext{u:atm}}
+\getvalue{\v!eenheid} [Bar] {bar} {bar (100 \Kilo \Pascal)}
+\getvalue{\v!eenheid} [EVolt] {eV} {electronvolt}
+\getvalue{\v!eenheid} [Foot] {ft} {\labeltext{u:ft}}
+\getvalue{\v!eenheid} [Inch] {inch} {inch}
+\getvalue{\v!eenheid} [Cal] {cal} {\labeltext{u:cal}}
+\getvalue{\v!eenheid} [Force] {f} {\labeltext{u:f}}
+\getvalue{\v!eenheid} [kCal] {\Kilo \Cal} {\labeltext{u:kcal}}
+\getvalue{\v!eenheid} [Lux] {lux} {lux}
+
+%D Some more, thanks to Tobias:
+
+\getvalue{\v!eenheid} [Gray] {Gr} {Gray}
+\getvalue{\v!eenheid} [Weber] {Wb} {Weber}
+\getvalue{\v!eenheid} [Henry] {H} {Henry}
+\getvalue{\v!eenheid} [Sterant] {sr} {Sterant}
+\getvalue{\v!eenheid} [Angstom] {\AA} {\AA ngstr\"om}
+\getvalue{\v!eenheid} [Gauss] {G} {Gauss}
+
+\setuplabeltext
+ [\s!nl]
+ [u:at=technische atmosfeer,
+ u:atm=fysische atmosfeer,
+ u:ft=voet,
+ u:cal=calorie,
+ u:f=kracht (force),
+ u:kcal=kilocalorie]
+
+\setuplabeltext
+ [\s!en]
+ [u:at=technical atmosferic pressure,
+ u:atm=physical atmosferic pressure,
+ u:ft=foot,
+ u:cal=calory,
+ u:f=force,
+ u:kcal=kilocalory]
+
+\setuplabeltext
+ [\s!de]
+ [u:at=Technischer atmosph\"arischer Druck,
+ u:atm=physkalischer atmosph\"arischer Druck
+ u:ft=Fu\SS,
+ u:cal=Kalorien,
+ u:f=Force,
+ u:kcal=Kilokalorien]
+
+%D Here are some old ones, still there for compatibility
+%D reasons. These will probably be obsolete in a few years.
+
+\def\MeterTwee {\Square \Meter}
+\def\mMeterTwee {\Square \Milli \Meter}
+\def\cMeterTwee {\Square \Centi \Meter}
+\def\dMeterTwee {\Square \Deci \Meter}
+\def\kMeterTwee {\Square \Kilo \Meter}
+
+\def\MeterDrie {\Cubic \Meter}
+\def\mMeterDrie {\Cubic \Milli \Meter}
+\def\cMeterDrie {\Kubic \Centi \Meter}
+\def\dMeterDrie {\Cubic \Deci \Meter}
+\def\kMeterDrie {\Cubic \Kilo \Meter}
+
+\def\LiterTwee {\Square \Liter}
+\def\SecTwee {\Square \Sec}
+\def\SecMinEen {\Inverse \Sec}
+
+%D To make ourselves happy, we define some dutch specific
+%D units:
+
+\startinterface dutch
+
+ \getvalue{\v!eenheid} [PaardenKracht] {pk} {paardenkracht}
+ \getvalue{\v!eenheid} [Duits] {D} {duits}
+ \getvalue{\v!eenheid} [Kwik] {Hg} {kwikkolom}
+ \getvalue{\v!eenheid} [Hectare] {ha} {hectare}
+ \getvalue{\v!eenheid} [kGramForce] {\Kilo \Gram \Force} {kilogramforce}
+ \getvalue{\v!eenheid} [kWattUur] {\Kilo \Watt \Uur} {kilowattuur}
+ \getvalue{\v!eenheid} [MeterKwik] {\Meter \Kwik} {meter kwikkolom}
+ \getvalue{\v!eenheid} [Waterkolom] {WK} {waterkolom}
+ \getvalue{\v!eenheid} [MeterWater] {\Meter \Waterkolom} {meter waterkolom}
+ \getvalue{\v!eenheid} [DrogeStof] {ds} {droge stof}
+ \getvalue{\v!eenheid} [Normaal] {N} {normaal}
+
+ \getvalue{\v!eenheid} [Ton] {t} {ton}
+ \getvalue{\v!eenheid} [kTon] {\Kilo \Ton} {kiloton}
+
+ \let \OmwPerSec \RevPerSec
+ \let \OmwPerMin \RevPerMin
+ \let \Graden \Deg
+ \let \PaardeKracht \PaardenKracht
+ \let \Atoom \Atom
+ \let \Heure \Hour
+ \let \Jaar \Year
+ \let \Maand \Month
+ \let \Dag \Day
+ \let \Uur \Hour
+
+\stopinterface
+
+%D Finally we define some equivalents. By using \type {\let}
+%D we can be sure that they don't end up double in the lists of
+%D units.
+
+\let \Second \Sec
+\let \Kubic \Cubic
+\let \IKubic \ICubic
+
+\protect
+
+\endinput
diff --git a/tex/context/base/materie.tex b/tex/context/base/materie.tex
new file mode 100644
index 000000000..5e2597186
--- /dev/null
+++ b/tex/context/base/materie.tex
@@ -0,0 +1,50 @@
+Zaagh, of Steek||zaagh.
+Domme||kraght.
+Mokers.
+Yzere Wiggen.
+Brandt||yzer.
+Hout||haak.
+Spaander||haak.
+Een Klaas Jacobzen.
+Tange.
+Nagel||hamer.
+Wigge.
+Oor||houten.
+Kluften.
+Hellen.
+Steven||haken.
+Hevels en Klein||touwen.
+Een Koe||voet.
+Schot||bouten.
+Yzere ram.
+Avegaar.
+Een houte Ram.
+Een groote Wigge daar toe.
+Teer||ketel.
+Slyp||steen.
+Een Mal.
+Rye.
+Hout||bok.
+Schraagh.
+Vlotten.
+Een Slee.
+Dwars||slee.
+Kaap||stander.
+Bytels.
+Klavaats||hamer.
+Rabat||yzer.
+Klavaats||yzer.
+Spyker||yzer.
+Werk||bytel.
+Duim||stok.
+Schraper.
+Een Moker.
+Spyker||hamertje.
+Een Roffel.
+Gerf||schaaf.
+Odief.
+Ploegen.
+Handt||zaagh.
+Klamp||spykers||boor, tien duims Boor.
+Dissel.
+Byl.
diff --git a/tex/context/base/modu-abr.tex b/tex/context/base/modu-abr.tex
new file mode 100644
index 000000000..94aab8577
--- /dev/null
+++ b/tex/context/base/modu-abr.tex
@@ -0,0 +1,7 @@
+\input s-abr-01
+
+\ifx\PlaatsPragmaLogoBUR\undefined
+
+ \input modu-pra
+
+\fi
diff --git a/tex/context/base/modu-arg.tex b/tex/context/base/modu-arg.tex
new file mode 100644
index 000000000..094625477
--- /dev/null
+++ b/tex/context/base/modu-arg.tex
@@ -0,0 +1,75 @@
+\unprotect
+
+\newcounter\CurrentArgument
+\newif\ifInsideArgument
+
+\def\TypeSetCharacteristic%
+ {\bgroup
+ \doglobal\newcounter\CurrentArgument % also every \setup
+ \global\InsideArgumentfalse
+ \def\\{\par\egroup}
+ {\bs\translate[nl=doel,de=Zweck,en=purpose]\unskip}\par
+ \nobreak
+ \hangindent1em
+ \hangafter-100
+ \ignorespaces}
+
+\def\ShowArgument%
+ {\InsideArgumentfalse
+ \doglobal\increment\CurrentArgument
+ {\bf..\CurrentArgument..}}
+
+\def\DummyArgument%
+ {\InsideArgumentfalse
+ \doglobal\increment\CurrentArgument}
+
+\def\doTypeSetParameter#1\\%
+ {\bgroup
+ \ifInsideArgument \else
+ \InsideArgumenttrue
+ \doglobal\increment\CurrentArgument
+ \blanko
+ \fi
+ {\bf#1\unskip}\par
+ \nobreak
+ \hangindent1em
+ \hangafter-100
+ \def\\{\par\egroup\protect}%
+ \ignorespaces}
+
+\def\TypeSetParameter%
+ {\unprotect
+ \doTypeSetParameter}
+
+\def\TypeSetArgument%
+ {\InsideArgumentfalse
+ \doglobal\increment\CurrentArgument
+ \blanko
+ \bgroup
+ {\bf\ifv!numberingdots!.\CurrentArgument.\else...\fi}\par
+ \nobreak
+ \hangindent1em
+ \hangafter-100
+ \def\\{\par\egroup}%
+ \ignorespaces}
+
+\def\TypeSetInheritance%
+ {\TypeSetArgument % we can use label, message, interface ...
+ \indent\getmessage{setup}{see} \tttf\texescape\ignorespaces}
+
+\def\TypeSetValue#1%
+ {\unprotect{\tttf#1}\protect}
+
+\startcommands dutch english german
+
+ TypeSetCharacteristic: functie function funktion
+ TypeSetParameter: parameter parameter parameter
+ ShowArgument: toonargument showargument umargument
+ DummyAgrument: dummyargument dummyargument dummyargument
+ TypeSetArgument: argument argument argument
+ TypeSetInheritance: erfenis inheritance inheritance
+ TypeSetValue: waarde value wert
+
+\stopcommands
+
+\protect
diff --git a/tex/context/base/modu-env.tex b/tex/context/base/modu-env.tex
new file mode 100644
index 000000000..c94590d32
--- /dev/null
+++ b/tex/context/base/modu-env.tex
@@ -0,0 +1,367 @@
+\newprettytrue
+
+\gebruikmodule[eenheid]
+
+\enableactivediscretionaries
+
+% beter:
+%
+% group -> title
+% title -> category
+% subtitle -> subtitle
+
+% herzien ivm fonts
+
+% nog eens \interface \\ \\ verder doorvoeren
+
+\unprotect
+
+\def\resetmodule%
+ {\getparameters
+ [Module]
+ [ file=\jobname,
+ version={\currentdate[jaar,{.},maand,{.},dag]},
+ title=,
+ subtitle=,
+ author=Hans Hagen,
+ date=\currentdate,
+ copyright={PRAGMA / Hans Hagen \& Ton Otten},
+ suggestions=]}
+
+\resetmodule
+
+\def\dostartmodule[#1]%
+ {\newcounter\ParagraphNumber
+ \resetmodule
+ \getparameters[Module][type=tex,#1]}
+
+\def\startmodule%
+ {\dosingleempty\dostartmodule}
+
+\def\complexmodule[#1]%
+ {\startglobaal % i.v.m. \bgroup in \startdocumentation
+ \getparameters[Module][#1]
+ \stopglobaal % i.v.m. \bgroup in \startdocumentation
+ \moduletitel}
+
+\def\stopmodule%
+ {\pagina
+ \plaatsindex
+ [balanceren=ja,
+ aanduiding=nee,
+ criterium=tekst]}
+
+\def\simplemodule#1%
+ {\type{#1}}
+
+\definecomplexorsimple\module
+
+\def\TitelPagina%
+ {\runMPgraphicstrue
+ \startMPrun
+ mpgraph := 501 ;
+ input mp-cont ;
+ \stopMPrun
+ \naarbox
+ {\externalfigure[mprun.501][hoogte=\vsize,breedte=\hsize]}%
+ [WisselViewer]}
+
+\def\moduletitel%
+ {\ifx\ModuleNumber\undefined \else
+ \ifnum\ModuleNumber<10
+ \edef\ModuleNumber{00\ModuleNumber}%
+ \else\ifnum\ModuleNumber<100
+ \edef\ModuleNumber{0\ModuleNumber}%
+ \fi\fi
+ \stelachtergrondenin
+ [pagina]
+ [achtergrond=commando,commando=\TitelPagina]
+ \fi
+ \startstandaardopmaak[hoofdstatus=geen,voetstatus=geen]
+ \switchnaarkorps[cmx,14.4pt,ss] % geem cmx
+ \stelinterliniein[1.5]
+ \font\temp=cmssbx10 at 72pt
+ \bgroup
+ \def\CONTEXT {Con\kern-.15em\TeX t}
+ \def\TEXUTIL {\TeX Util}
+ \def\PPCHTEX {PPCH\TeX}
+ \regellinks{\temp \CONTEXT} \vskip24pt
+ \doifelse{\Modulesubtitle}{}
+ {\regellinks{\bfd \Moduletitle} \vfill}
+ {\regellinks{\bfd \Modulesubtitle} \vfill
+ \doifnot{\Moduletitle}{}
+ {\regellinks{\bf category: \Moduletitle} \vskip6pt}}
+ \regellinks{\bf version: \Moduleversion} \vskip6pt
+ \regellinks{\bf date: \Moduledate} \vskip6pt
+ \regellinks{\bf author: \Moduleauthor} \vskip6pt
+ \doifnot{\Modulesuggestions}{}
+ {\regellinks{\bs suggestions: \Modulesuggestions} \vskip6pt}
+ \regellinks{\bf copyright: \Modulecopyright} \par
+ \egroup
+ \stopstandaardopmaak
+ \ifx\ModuleNumber\undefined \else
+ \stelachtergrondenin[pagina][achtergrond=]
+ \fi}
+
+\let\stopdocumentation=\relax
+
+\def\startdocumentation%
+ {\bgroup
+ \doglobal\newcounter\NOfMarginLines
+ \def\stopdocumentation{\par\egroup}}
+
+\newif\ifcompressdefinitions
+
+\def\startcompressdefinitions {\global\compressdefinitionstrue}
+\def\stopcompressdefinitions {\global\compressdefinitionsfalse}
+
+\gdef\CompressDefinitions%
+ {\ifcompressdefinitions
+ \switchnaarkorps[klein]%
+ \fi}
+
+\definieertypen
+ [definition]
+
+\steltypenin
+ [definition]
+ [voor={\pagina[voorkeur]}\blanko\PresetParagraphNumber\CompressDefinitions,
+ na=\ResetParagraphNumber\blanko,
+ optie=\Moduletype]
+
+\definieertypen
+ [PL]
+ [optie=PL,
+ marge=standaard]
+
+\definieertypen
+ [JV]
+ [optie=JV,
+ marge=standaard]
+
+\definieertypen
+ [MP]
+ [optie=MP,
+ marge=standaard]
+
+\definieertypen
+ [TEX]
+ [optie=TEX,
+ marge=standaard]
+
+\steltypenin [typen] [marge=standaard]
+\steltypenin [file] [marge=standaard]
+\steltypenin [definition] [marge=0pt]
+
+\newcounter\NOfMarginLines
+\newcounter\ParagraphNumber
+
+\def\ResetParagraphNumber%
+ {\egroup}
+
+\def\PresetParagraphNumber%
+ {\bgroup
+ \xdef\NOfTextLines%
+ {\the\prevgraf}%
+ \doglobal\decrement\NOfMarginLines
+ \doglobal\increment\ParagraphNumber
+ \message{.}%
+ \gdef\ShowParagraphNumber%
+ {\llap{\slx\ParagraphNumber\hskip\linkermargeafstand}}%
+ \gdef\ShowParagraphNumberA%
+ {\ifnum\NOfMarginLines>\NOfTextLines\relax
+ \doglobal\increment\NOfTextLines
+ \else
+ \ShowParagraphNumber
+ \global\let\ShowParagraphNumberA=\relax
+ \global\let\ShowParagraphNumberB=\ShowParagraphNumber
+ \doglobal\newcounter\NOfMarginLines
+ \fi}%
+ \gdef\ShowParagraphNumberB%
+ {}%
+ \EveryLine
+ {\ShowParagraphNumberA}%
+ \EveryPar
+ {\vadjust{\nobreak}%
+ \ShowParagraphNumberB}}
+
+\EveryPar % skip one
+ {\EveryPar
+ {\doglobal\newcounter\NOfMarginLines}}
+
+\def\dodomargeaanduidingen[#1]#2%
+ {\def\docommando##1%
+ {\indent\hbox
+ {\ifx#2\relax
+ \index{##1}%
+ \else
+ \index{#2{##1}}%
+ \fi
+ #2{\doboundtext{##1}{\linkermargebreedte}{..}}}%
+ \doglobal\increment\NOfMarginLines
+ \endgraf}%
+ \processcommalist[#1]\docommando}
+
+\def\margeaanduidingen#1[#2]%
+ {\def\domargeaanduidingen##1##2%
+ {\margetitel[#2]%
+ {\switchnaarkorps[klein]%
+ \doglobal\newcounter\NOfMarginLines
+ \dodomargeaanduidingen[##1]#1%
+ \scratchcounter=\NOfMarginLines
+ \multiply\scratchcounter by 10
+ \divide\scratchcounter by 12
+ \advance\scratchcounter by 1
+ \xdef\NOfMarginLines{\the\scratchcounter}%
+ \processcommalist[##2]\index}}%
+ \dodoublegroupempty\domargeaanduidingen}
+
+\def\complexmacros%
+ {\margeaanduidingen\tex}
+
+\def\complexextras%
+ {\margeaanduidingen\relax}
+
+\definecomplexorsimpleempty\macros
+\definecomplexorsimpleempty\extras
+
+% \macros{a,b}
+% \macros{a,b}{b}
+% \macros[a]{a,b}{b}
+
+\definieeralineas [interface] [n=2]
+\stelalineasin [interface] [1] [breedte=4cm]
+
+\def\startvoorbeeld{\par\startsmaller}
+\def\stopvoorbeeld {\stopsmaller}
+
+\gdef\VisualizeLastSpace%
+ {\ifdim\lastskip>0pt\unskip\tttf\char32\fi}
+\gdef\ShowHeadText#1%
+ {\tttf#1\VL\headtext{#1}\VisualizeLastSpace}%
+\gdef\ShowLabelText#1%
+ {\tttf#1\VL\labeltext{#1}\VisualizeLastSpace}
+
+\startbuffer[lang-a]
+\starttabel[|l|l|]
+ \HL
+ \VL \bf head key \VL \bf current value \VL\SR
+ \HL
+ \VL \ShowHeadText \v!afkortingen \VL\FR
+ \VL \ShowHeadText \v!eenheden \VL\MR
+ \VL \ShowHeadText \v!figuren \VL\MR
+ \VL \ShowHeadText \v!grafieken \VL\MR
+ \VL \ShowHeadText \v!index \VL\MR
+ \VL \ShowHeadText \v!inhoud \VL\MR
+ \VL \ShowHeadText \v!intermezzos \VL\MR
+ \VL \ShowHeadText \v!logos \VL\MR
+ \VL \ShowHeadText \v!tabellen \VL\LR
+ \HL
+\stoptabel
+\stopbuffer
+
+\startbuffer[lang-b]
+\starttabel[|l|l|]
+ \HL
+ \VL \bf label key \VL \bf current value \VL\SR
+ \HL
+ \VL \ShowLabelText \v!tabel \VL\FR
+ \VL \ShowLabelText \v!figuur \VL\MR
+ \VL \ShowLabelText \v!intermezzo \VL\MR
+ \VL \ShowLabelText \v!grafiek \VL\MR
+ \VL \ShowLabelText \v!hoofdstuk \VL\MR
+ \VL \ShowLabelText \v!paragraaf \VL\MR
+ \VL \ShowLabelText {\v!sub\v!paragraaf} \VL\MR
+ \VL \ShowLabelText {\v!sub\v!sub\v!paragraaf} \VL\MR
+ \VL \ShowLabelText \v!bijlage \VL\MR
+ \VL \ShowLabelText \v!deel \VL\MR
+ \VL \ShowLabelText \v!regel \VL\MR
+ \VL \ShowLabelText \v!regels \VL\LR
+ \HL
+\stoptabel
+\stopbuffer
+
+\startbuffer[lang-c]
+\starttabel[|l|l|]
+ \HL
+ \VL \bf label key \VL \bf current value \VL\SR
+ \HL
+ \VL \ShowLabelText \v!january \VL\FR
+ \VL \ShowLabelText \v!february \VL\MR
+ \VL \ShowLabelText \v!march \VL\MR
+ \VL \ShowLabelText \v!april \VL\MR
+ \VL \ShowLabelText \v!may \VL\MR
+ \VL \ShowLabelText \v!june \VL\MR
+ \VL \ShowLabelText \v!july \VL\MR
+ \VL \ShowLabelText \v!august \VL\MR
+ \VL \ShowLabelText \v!september \VL\MR
+ \VL \ShowLabelText \v!october \VL\MR
+ \VL \ShowLabelText \v!november \VL\MR
+ \VL \ShowLabelText \v!december \VL\LR
+ \HL
+\stoptabel
+\stopbuffer
+
+\startbuffer[lang-d]
+\starttabel[|l|l|]
+ \HL
+ \VL \bf label key \VL \bf current value \VL\SR
+ \HL
+ \VL \ShowLabelText \v!sunday \VL\FR
+ \VL \ShowLabelText \v!monday \VL\MR
+ \VL \ShowLabelText \v!tuesday \VL\MR
+ \VL \ShowLabelText \v!wednesday \VL\MR
+ \VL \ShowLabelText \v!thursday \VL\MR
+ \VL \ShowLabelText \v!friday \VL\MR
+ \VL \ShowLabelText \v!saturday \VL\MR
+ \HL
+\stoptabel
+\stopbuffer
+
+\gdef\ShowTextsValues [#1] [#2]
+ {\vbox\bgroup
+ \language[#1]%
+ \setbox0=\hbox to \hsize{\hss\bfb#2 language defaults\hss}
+ \dp0=0pt
+ \box0
+ \vskip1em
+ \hrule
+ \vskip2em
+ \halign
+ {\hss##\hss&##\hskip1em&\hss##\hss\cr
+ $\vcenter{\haalbuffer[lang-a]}$&&$\vcenter{\haalbuffer[lang-b]}$\cr
+ \noalign{\vskip1em}
+ $\vcenter{\haalbuffer[lang-c]}$&&$\vcenter{\haalbuffer[lang-d]}$\cr}%
+ \egroup}
+
+\gdef\ShowLanguageValues [#1] [#2] #3 #4
+ {\hbox to \hsize
+ {\hss
+ \vbox
+ \bgroup
+ \language[#1]%
+ \let\normalbar=|
+ \starttabel[||||]
+ \HL
+ \VL \THREE{\bf subsentence symbol and quotes} \VL\SR
+ \HL
+ \VL \citaat{#3 #4} \VL \citeer{#2} \VL \let|=\normalbar |<||<|#3|>|#4|>| \VL\SR
+ \HL
+ \stoptabel
+ \egroup
+ \hss}}
+
+\gdef\doShowAllLanguageValues [#1] [#2] #3 #4
+ {\vbox
+ {\ShowTextsValues [#1] [#2]
+ \vskip2em
+ \ShowLanguageValues [#1] [#2] #3 #4 }
+ \protect
+ \pagina}
+
+\gdef\ShowAllLanguageValues%
+ {\pagina
+ \unprotect
+ \doShowAllLanguageValues}
+
+\protect
diff --git a/tex/context/base/modu-mod.tex b/tex/context/base/modu-mod.tex
new file mode 100644
index 000000000..6149991e4
--- /dev/null
+++ b/tex/context/base/modu-mod.tex
@@ -0,0 +1,11 @@
+\input setupa
+\input setupb
+
+\def\showsetup%
+ {\doglobal\newcounter\CurrentArgument
+ \setup}
+
+\stelkadertekstenin
+ [setuptext]
+ [achtergrond=raster,
+ kader=uit]
diff --git a/tex/context/base/modu-opt.tex b/tex/context/base/modu-opt.tex
new file mode 100644
index 000000000..50c4d497c
--- /dev/null
+++ b/tex/context/base/modu-opt.tex
@@ -0,0 +1 @@
+% testing options
diff --git a/tex/context/base/modu-pap.tex b/tex/context/base/modu-pap.tex
new file mode 100644
index 000000000..b6d7acdca
--- /dev/null
+++ b/tex/context/base/modu-pap.tex
@@ -0,0 +1,112 @@
+\stelkorpsin
+ [10pt,ams]
+
+\taal
+ [en]
+
+\stelwitruimtein
+ [groot]
+
+\steltolerantiein
+ [soepel]
+
+\emergencystretch=5em
+
+\stellayoutin
+ [rugwit=3.5cm,
+ linkermarge=1.75cm,
+ rechtermarge=0cm,
+ margeafstand=.5cm,
+ linkerrandafstand=.25cm,
+ rechterrandafstand=.5cm,
+ rand=1.5cm,
+ breedte=15.55333cm, % 13.998cm at 9pt => 15.55333 at 10pt
+ kopwit=2cm,
+ hoofd=1.25cm,
+ voet=1.25cm,
+ hoogte=25cm,
+ letter=\ss]
+
+\stelsetupin
+ [verwijzing=1]
+
+\startnotmode[single]
+
+ \stelnummeringin
+ [variant={dubbelzijdig,enkelzijdig}]
+
+\stopnotmode
+
+\stelnummeringin
+ [plaats=]
+
+\stelvoettekstenin
+ [rand]
+ [][paginanummer]
+
+\stelvoettekstenin
+ [marge]
+ [\tt\Modulefile][]
+ [\tt\Modulefile][]
+
+\stelvoettekstenin
+ [tekst]
+ [\CONTEXT]
+ [\Moduletitle]
+
+\stelhoofdtekstenin
+ [tekst]
+ []
+ [\Modulesubtitle]
+
+\stelinmargein
+ [plaats=links]
+
+\stelkoppenin
+ [variant=inmarge]
+
+\stelkopin
+ [hoofdstuk]
+ [letter=\ssc,
+ pagina=rechts,
+ hoofd=leeg]
+
+\stelkopin
+ [paragraaf]
+ [letter=\ssb,
+ pagina=rechts]
+
+\stellijstin
+ [hoofdstuk]
+ [letter=vet,
+ na=\blanko]
+
+\stelinhoudin
+ [breedte=3em,
+ titeluitlijnen=ja]
+
+\stelindexin
+ [balanceren=ja,
+ aanduiding=nee]
+
+\stelkleurenin
+ [status=start]
+
+\startnotmode[color]
+
+ \stelkleurenin
+ [conversie=altijd]
+
+ \steltypenin
+ [palet=graypretty]
+
+\stopnotmode
+
+\stelinteractiein
+ [status=start,
+ kleur=,
+ letter=]
+
+%\stelteksttekstenin
+% [{\button[breedte=\hsize,hoogte=\vsize,kader=uit]{}[WisselViewer]}]
+% []
diff --git a/tex/context/base/modu-pra.tex b/tex/context/base/modu-pra.tex
new file mode 100644
index 000000000..e5a634d9d
--- /dev/null
+++ b/tex/context/base/modu-pra.tex
@@ -0,0 +1,14 @@
+\def\NoPragmaLogo[#1][#2]{\writestatus{system}{no logos inserted}}
+
+\def\PlaatsPragmaLogo {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoBUR {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoOAO {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoIBV {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoADE {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoDDP {\dodoubleempty\NoPragmaLogo}
+\def\PlaatsPragmaLogoCSD {\dodoubleempty\NoPragmaLogo}
+
+\newif\ifPragmaLijnen
+\newif\ifPragmaOffset
+\newif\ifPragmaAflopend
+\newif\ifPragmaOnderAflopend
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index ec6d3a006..8bfcf312e 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -1,1224 +1,1383 @@
-%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
- definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment
- definierefliesstextumgebung
- definebodyfont: definieerkorps definebodyfont
- 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
- setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition
- stellefussnotendefinitioneein % TOBIAS
- 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
-
- setupbodyfont: stelkorpsin setupbodyfont
- stellefliesstextein
- switchtobodyfont: switchnaarkorps switchtobodyfont
- wechselezumfliesstext
- showbodyfont: toonkorps showbodyfont
- zeigefliesstext
- showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment
- 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
-
- pagenumber: paginanummer pagenumber
- seitenummer
-
- items: items items
- posten
- stelitemsin: stelitemsin setupitems
- stellepostenein
-
- regellinks: regellinks leftaligned
- zeilelinks % better: linksbuendig
- regelmidden: regelmidden midaligned
- zeilemitte % better: zentriert
- regelrechts: regelrechts rightaligned
- 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
- plaatsopgrid: plaatsopgrid snaptogrid
- snaptogrid % TOBIAS
- verplaatsopgrid: verplaatsopgrid resnaptogrid
- resnaptogrid % TOBIAS
-
- tooninstellingen: tooninstellingen showsetups
- zeigeeinstellungen
- toonkader: toonkader showframe
- zeigerahmen
- toongrid: toongrid showgrid
- zeigegrid
- toonopbouw: toonopbouw showbuildup
- zeigeaufbau
- toonlayout: toonlayout showlayout
- zeigelayout
- toonprint: toonprint showprint
- zeigeabdruck % - TOBIAS
- toonstruts: toonstruts showstruts
- zeigestruts
-
- definieerpapierformaat: definieerpapierformaat definepapersize
- definierepapierformat
- stelpapierformaatin: stelpapierformaatin setuppapersize
- stellepapierformatin
- stelarrangerenin: stelarrangerenin setuparranging
- stelarrangierenein % - TOBIAS
-
- 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
-
- bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics
- determinelistcharacteristics % TOBIAS
-
- 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
-
- bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics
- determineregistercharacteristics % TOBIAS
-
- 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
-
- stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions
- stelleseitenuebergangein
-
- 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
-
- usereferences: gebruikreferenties usereferences
- verwendereferenzen
- reflijst: reflijst reflist
- refliste
- stelreferentielijstin: stelreferentielijstin setupreferencelist
- stellereferenzlisteein
- setupreferencing: stelrefererenin setupreferencing
- stellereferenzierenein
-
- textreference: tekstreferentie textreference
- textreferenz
- pagereference: paginareferentie pagereference
- seitenreferenz
- reference: referentie reference
- referenz
-
- uit: uit from
- von
- in: in in
- in
- op: op at
- bei
- naar: naar goto
- zu
- naarbox: naarbox gotobox
- zurbox
- naarpagina: naarpagina gotopage
- zurseite % - old but forgotten
-
- startformule: startformule startformula
- startformel
- stopformule: stopformule stopformula
- stopformel
- plaatsformule: plaatsformule placeformula
- platziereformel
- plaatssubformule: plaatssubformule placesubformula
- platziereunterformel
- stelformulesin: stelformulesin setupformulae
- 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
-
- setups: instellingen setups
- setups % --
-
- 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
- startlocal: startlokaal startlocal
- startlokal
- stoplocal: stoplokaal stoplocal
- stoplokal
- startglobal: startglobaal startglobal
- startglobal
- stopglobal: stopglobaal stopglobal
- stopglobal
- 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
-
- spiegel: spiegel mirror
- mirror % TOBIAS CHECK!
- schaal: schaal scale
- scale % TOBIAS CHECK!
-
- 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
- definiereabsaetze
- stelalineasin: stelalineasin setupparagraphs
- stelleabsaetzeein
-
- 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
+%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}
+
+\startlogginginterface context.com
+
+%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
+
+ useencoding: usecodering useencoding
+ benutzekodierung
+
+ usespecials: gebruikspecials usespecials
+ benutzespezielles
+ defineoutput: definieeruitvoer defineoutput
+ defineoutput
+ setupoutput: steluitvoerin setupoutput
+ stelleausgabeein
+
+% 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
+ definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment
+ definierefliesstextumgebung
+ setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment
+ stellefliesstextumgebungein
+ definebodyfont: definieerkorps definebodyfont
+ definierefliesstext
+ definefont: definieerfont definefont
+ definiereschrift
+ definefontsynonym: definieerfontsynoniem definefontsynonym
+ defineschriftsynonym
+ definestyle: definieerletter definestyle
+ definierestil
+ definefontstyle: definieerfontstijl definefontstyle
+ definierefontstil % tobias
+
+ 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
+ setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition
+ stellefussnotendefinitionein
+ 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
+ date: datum date
+ datum
+ 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 romannumerals
+ roemischezahlen
+ Romannumerals: Romeins Romannumerals
+ Roemischezahlen
+ character: letter character
+ buchstabe
+ Character: Letter Character
+ Buchstabe
+ characters: letters characters
+ buchstaben
+ Characters: Letters Characters
+ Buchstaben
+
+ unknown: onbekend unknown
+ unbekant
+
+ definesymbol: definieersymbool definesymbol
+ definieresymbol
+ definefiguresymbol: definieerfiguursymbool definefiguresymbol
+ definiereabbsymbol
+ symbol: symbool symbol
+ symbol
+ setupsymbolset: stelsymboolsetin setupsymbolset
+ stellesymbolsetein
+ showsymbolset: toonsymboolset showsymbolset
+ showsymbolset
+ startsymbolset: startsymboolset startsymbolset
+ startsymbolset
+ usesymbols: gebruiksymbolen usesymbols
+ verwendesymbole
+
+ defineconversion: definieerconversie defineconversion
+ definierekonversion
+ convertnumber: converteernummer convertnumber
+ konvertierezahl
+
+ setupcapitals: stelkapitalenin setupcapitals
+ setupversalien % TOBIAS
+
+ kap: kap kap
+ kap
+ KAP: KAP CAP
+ KAP
+ nokap: nokap nocap
+ nokap
+ Kap: Kap Cap
+ Kap
+ Kaps: Kaps Caps
+ Kaps
+ WORD: WOORD WORD
+ WORT
+ WORDS: WOORDEN WORDS
+ WOERTER
+ Word: Woord Word
+ Wort
+ Words: Woorden Words
+ Woerter
+ stretched: uitgerekt stretched
+ gestreckt
+ overstrike: doorstreep overstrike
+ durchgestrichen
+ overstrikes: doorstrepen overstrikes
+ durchstreichen
+ overbar: overstreep overbar
+ ueberstrichen
+ overbars: overstrepen overbars
+ ueberstreichen
+ underbar: onderstreep underbar
+ unterstrichen
+ underbars: onderstrepen underbars
+ unterstreichen
+ setupunderbar: stelonderstrepenin setupunderbar
+ stelleunterstreichenein
+
+ setupbodyfont: stelkorpsin setupbodyfont
+ stellefliesstextein
+ switchtobodyfont: switchnaarkorps switchtobodyfont
+ wechselezumfliesstext
+ showbodyfont: toonkorps showbodyfont
+ zeigefliesstext
+ showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment
+ 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
+
+ defineframed: definieeromlijnd defineframed
+ definiereumrahmt
+
+ 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: invultekst 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
+
+ definieerblanko: definieerblanko defineblank
+ definiereblanko
+ blanko: blanko blank
+ blanko
+ stelblankoin: stelblankoin setupblank
+ stelleblankoein
+ corrigeerwitruimte: corrigeerwitruimte correctwhitespace
+ korrigierezwischenraum
+ fixedspaces: vastespaties fixedspaces
+ festesspatium % TOBIAS
+ fixedspace: vastespatie fixedspace
+ festesspatium % TOBIAS
+ 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
+ stopgrosserdurchschuss
+ 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
+
+ definetabulate: definieertabulatie definetabulate
+ definieretabulator
+ setuptabulate: steltabulatiein setuptabulate
+ stelletabulatorein
+
+ 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
+ definieertekst: definieertekst definetext
+ definieretext
+
+ pagenumber: paginanummer pagenumber
+ seitenummer
+
+ items: items items
+ posten
+ stelitemsin: stelitemsin setupitems
+ stellepostenein
+
+ regellinks: regellinks leftaligned
+ linksbuendig
+ regelmidden: regelmidden midaligned
+ zentriert
+ regelrechts: regelrechts rightaligned
+ 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
+ ran: ran ran
+ ran
+ startopsomming: startopsomming startitemize
+ startaufzaehlung
+ stelopsommingenin: stelopsommingenin setupitemizations
+ stelleaufzaehlungeein % Tobias, plural
+ stelopsommingin: stelopsommingin setupitemize
+ stelleaufzaehlungein
+ stopopsomming: stopopsomming stopitemize
+ stopaufzaehlung
+
+ definieerkop: definieerkop definehead
+ definiereueberschrift
+ stelkopin: stelkopin setuphead
+ stelleueberschriftein
+ stelkoppenin: stelkoppenin setupheads
+ stelleueberschriftenein
+ stelkopnummerin: stelkopnummerin setupheadnumber
+ stellekopfzahlein
+ kopnummer: kopnummer headnumber
+ kopfnummer
+ huidigekopnummer: huidigekopnummer currentheadnumber
+ heutigeskopfnummer % TOBIAS
+ bepaalkopnummer: bepaalkopnummer determineheadnumber
+ bestimmekopfnummer % TOBIAS
+
+ resetmarkering: resetmarkering resetmarking
+ ruecksetztenbeschriftung
+ stelmarkeringin: stelmarkeringin setupmarking
+ stellebeschriftungein
+ definieermarkering: definieermarkering definemarking
+ definierebeschriftung
+ geenmarkering: geenmarkering nomarking
+ keinebeschriftung
+ marking: 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
+ plaatsopgrid: plaatsopgrid placeongrid
+ amgitterausrichten
+ verplaatsopgrid: verplaatsopgrid moveongrid
+ amgitterneuausrichten
+
+ tooninstellingen: tooninstellingen showsetups
+ zeigeeinstellungen
+ toonkader: toonkader showframe
+ zeigerahmen
+ toongrid: toongrid showgrid
+ zeigegitter
+ toonopbouw: toonopbouw showbuildup
+ zeigeaufbau
+ toonlayout: toonlayout showlayout
+ zeigelayout
+ toonprint: toonprint showprint
+ zeigedruck
+ toonstruts: toonstruts showstruts
+ zeigestruts
+
+ definieerpapierformaat: definieerpapierformaat definepapersize
+ definierepapierformat
+ stelpapierformaatin: stelpapierformaatin setuppapersize
+ stellepapierformatin
+ stelarrangerenin: stelarrangerenin setuparranging
+ stelleanordnenein
+
+
+ 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
+ graycolor: grijskleur graycolor
+ graufarbe
+ 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
+ greyvalue: grijswaarde greyvalue
+ grauwert
+
+ startraster: startraster startraster
+ startraster
+ stopraster: stopraster stopraster
+ stopraster
+
+ definieerblok: definieerblok defineblock
+ definiereblock
+ stelblokin: stelblokin setupblock
+ stelleblockein
+ gebruikblokken: gebruikblokken useblocks
+ verwendebloecke
+ verwerkblokken: verwerkblokken processblocks
+ bearbeitebloecke
+ handhaafblokken: handhaafblokken keepblocks
+ behaltebloecke
+ selecteerblokken: selecteerblokken selectblocks
+ waehlebloeckeaus
+ verbergblokken: verbergblokken hideblocks
+ verbergebloecke
+ geenblokkenmeer: geenblokkenmeer nomoreblocks
+ keinebloeckemehr
+
+ definieerlijst: definieerlijst definelist
+ definiereliste
+ definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist
+ definierezusammengestellteliste
+ plaatslijst: plaatslijst placelist
+ platziereliste
+ plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist
+ platzierezusammengestellteliste
+ schrijfnaarlijst: schrijfnaarlijst writetolist
+ schreibezurliste
+ schrijftussenlijst: schrijftussenlijst writebetweenlist
+ schreibezwischenliste
+ stellijstin: stellijstin setuplist
+ stellelisteein
+ stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist
+ stellezusammengestelltelisteein
+
+ bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics
+ bestimmelistencharakeristika
+ lijstlengte: lijstlengte listlength
+ listlength % TOBIAS
+ lijstbreedte: lijstbreedte listwidth
+ listwidth % TOBIAS
+ lijsthoogte: lijsthoogte listheight
+ listheight % TOBIAS
+
+ geenlijst: geenlijst nolist
+ keineliste % TOBIAS
+
+% zal vervallen
+
+ 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
+
+ bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics
+ bestimmeregistercharakteristika
+
+ definieersorteren: definieersorteren definesorting
+ definieresortieren
+ definieersynoniemen: definieersynoniemen definesynonyms
+ definieresynonyme
+ stelsorterenin: stelsorterenin setupsorting
+ stellesortierenein
+ stelsynoniemenin: stelsynoniemenin setupsynonyms
+ 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
+ gebruikurl: gebruikurl useurl
+ verwendeurl
+ setupurl: stelurlin setupurl
+ stelleurlein
+ coupledocument: koppeldocument coupledocument
+ verknuepfedokument
+
+ stelprogrammasin: stelprogrammasin setupprograms
+ stelleprogrammein
+ definieerprogramma: definieerprogramma defineprogram
+ definiereprogramme
+ programma: programma program
+ programm
+
+ stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions
+ stelleseitenuebergangein
+
+ 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
+
+ setupexternalfigures: stelexternefigurenin setupexternalfigures
+ stelleexterneabbildungenein
+ showexternalfigures: toonexternefiguren showexternalfigures
+ zeigeexterneabbildungen
+ externalfigure: externfiguur externalfigure
+ externeabbildung
+% showexternalfigure: toonexternfiguur showexternalfigure
+% zeigeexterneabbildung
+ useexternalfigure: gebruikexternfiguur useexternalfigure
+ verwendeexterneabbildung
+
+ startfigure: startfiguur startfigure
+ startabbildung
+% stopfigure: stopfiguur stopfigure
+% stopabbildung
+ referring: refereer referring
+ referieren
+% marking: markeer marking
+% beschriftung
+ remark: toelichting remark
+ bemerkung
+ colorbar: kleurenbalk colorbar
+ farbbalken
+
+ rooster: rooster grid
+ gitter
+
+ button: button button
+ knopf
+ menubutton: menubutton menubutton
+ menueknopf
+ stelbuttonsin: stelbuttonsin setupbuttons
+ stelleknopfein
+
+ usereferences: gebruikreferenties usereferences
+ verwendereferenzen
+ reflijst: reflijst reflist
+ refliste
+ stelreferentielijstin: stelreferentielijstin setupreferencelist
+ stellereferenzlisteein
+ setupreferencing: stelrefererenin setupreferencing
+ stellereferenzierenein
+
+ textreference: tekstreferentie textreference
+ textreferenz
+ pagereference: paginareferentie pagereference
+ seitenreferenz
+ reference: referentie reference
+ referenz
+ definereference: definieerreferentie definereference
+ definierereferenz
+
+ useJSscripts: gebruikJSscripts useJSscripts
+ verwendeJSscript
+
+ uit: uit from
+ von
+ in: in in
+ in
+ op: op at
+ bei
+ over: over about
+ euber
+ naar: naar goto
+ zu
+ atpage: oppagina atpage
+ atpage % TOBIAS
+ somewhere: ergens somewhere
+ irgendwo
+ ref: ref ref
+ ref
+ naarbox: naarbox gotobox
+ zurbox
+ naarpagina: naarpagina gotopage
+ zurseite % - old but forgotten
+
+% startformule: startformule startformula
+% startformel
+% stopformule: stopformule stopformula
+% stopformel
+ plaatsformule: plaatsformule placeformula
+ platziereformel
+ plaatssubformule: plaatssubformule placesubformula
+ platziereunterformel
+ stelformulesin: stelformulesin setupformulae
+ 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
+
+ setups: instellingen setups
+ einstellungen
+
+ project: project project
+ projekt
+ onderdeel: onderdeel component
+ komponente
+ produkt: produkt product
+ produkt
+ omgeving: omgeving environment
+ umgebung
+ geenfilesmeer: geenfilesmeer nomorefiles
+ keinedateienmehr
+
+ haalbuffer: haalbuffer getbuffer
+ holepuffer
+% startbuffer: startbuffer startbuffer
+% startbuffer
+% stopbuffer: stopbuffer stopbuffer
+% stopbuffer
+ stelbufferin: stelbufferin setupbuffer
+ stellepufferein
+ typebuffer: typebuffer typebuffer
+ tippepuffer
+ definieerbuffer: definieerbuffer definebuffer
+ definierepuffer % TOBIAS
+
+ betekenis: betekenis unitmeaning
+ 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
+ startlocal: startlokaal startlocal
+ startlokal
+ stoplocal: stoplokaal stoplocal
+ stoplokal
+ startglobal: startglobaal startglobal
+ startglobal
+ stopglobal: stopglobaal stopglobal
+ stopglobal
+ 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
+
+ spiegel: spiegel mirror
+ spiegeln
+ schaal: schaal scale
+ format
+
+ stelnummerenin: stelnummerenin setupnumbering
+ stellenummerierungein
+ reset: reset reset
+ ruecksetzten
+
+ stelpublicatiesin: stelpublicatiesin setuppublications
+ stellepublikationein
+ publicatie: publicatie publication
+ publikation
+
+ definieerhbox: definieerhbox definehbox
+ definierehbox
+
+ toevoegen: toevoegen adding
+ zusatz
+
+ punten: punten periods
+ punkt
+
+ stelkoppeltekenin: stelkoppeltekenin setuphyphenmark
+ stellebindestrichein
+ stelinterliniein: stelinterliniein setupinterlinespace
+ stellezeilenabstandein
+ stelspatieringin: stelspatieringin setupspacing
+ stellespatiumein
+ steltolerantiein: steltolerantiein setuptolerance
+ stelletoleranzein
+
+ setupsystem: stelsysteemin setupsystem
+ stellesystemein
+ usepath: gebruikgebied usepath
+ usepath % TOBIAS
+
+ definieeralineas: definieeralineas defineparagraphs
+ definiereabsaetze
+ stelalineasin: stelalineasin setupparagraphs
+ stelleabsaetzeein
+
+ geentest: geentest donttest
+ keintest
+
+ stelcommentaarin: stelcommentaarin setupcomment
+ stellekommentarein
+ commentaar: commentaar comment
+ kommentar
+
+ definefield: definieerveld definefield
+ definierefeld
+ definemainfield: definieerhoofdveld definemainfield
+ definemainfield % TOBIAS
+ definesubfield: definieersubveld definesubfield
+ definieresubfeld
+ clonefield: kloonveld clonefield
+ klonierefeld
+ copyfield: copieerveld copyfield
+ kopierefeld
+ setupfield: stelveldin setupfield
+ stellefeldein
+ setupfields: stelveldenin setupfields
+ stellefelderin
+ field: veld field
+ feld
+ fitfield: passendveld fitfield
+ passendfeld
+ logfields: registreervelden logfields
+ registrierefelder
+ showfields: toonvelden showfields
+ zeigefelder
+ tooltip: suggestie tooltip
+ tooltip
+ fillinfield: invulveld fillinfield
+ ausfuellfeld
+ definefieldstack: definieerveldstapel definefieldstack
+ definierefeldstapel
+ fieldstack: veldstapel fieldstack
+ feldstapel
+
+\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
+ linkermargeafstand: linkermargeafstand leftmargindistance
+ linkemarginalafstand
+ rechtermargeafstand: rechtermargeafstand rightmargindistance
+ rechtemarginalafstand
+ randbreedte: randbreedte edgewidth
+ randbreite
+ linkerrandbreedte: linkerrandbreedte leftedgewidth
+ breitelinkerrand
+ rechterrandbreedte: rechterrandbreedte rightedgewidth
+ breiterechterrand
+ randafstand: randafstand edgedistance
+ randabstand
+ linkerrandafstand: linkerrandafstand leftedgedistance
+ abstandlinkerrand
+ rechterrandafstand: rechterrandafstand rightedgedistance
+ abstandrechterrand
+ 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
+ printpapierbreedte: printpapierbreedte printpaperwidth
+ printpapierbreite
+ printpapierhoogte: printpapierhoogte printpaperheight
+ printpapierhoehe
+ kopniveau: kopniveau headlevel
+ kopfniveau
+
+ linewidth: lijndikte linethickness
+ liniendicke
+
+ totaalaantalpaginas: totaalaantalpaginas totalnumberofpages
+ gesamtseitenanzahl
+
+\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
+
+\stoplogginginterface
+
+\endinput
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index 0219cdfca..4a8d3e43f 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -1,835 +1,902 @@
-
-%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 Next we introduce some general label bound variables:
-
-\startvariables dutch english german
-
- oppagina: oppagina atpage oppagina % TOBIAS/SEBASTIAN
- hierboven: hierboven hencefore hierboven % TOBIAS/SEBASTIAN
- hieronder: hieronder hereafter hieronder % TOBIAS/SEBASTIAN
-
-\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 bodypart haupttext
- hoofdteksten: hoofdteksten bodymatter haupttexte
- inleiding: inleiding frontpart einleitung
- inleidingen: inleidingen frontmatter einleitungen
- uitleiding: uitleiding backpart epilog
- uitleidingen: uitleidingen backmatter 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 formulae 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 intermezzi 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
- achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe
- achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel
- achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe
- achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset
- achtergrondraster: achtergrondraster backgroundscreen hintergrundraster
- achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius
- 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
- contrastkleur: contrastkleur contrastcolor kontrastfarbe
- 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
- evenmarge: evenmarge evenmargin geraderand
- expansie: expansie expansion expansion
- factor: factor factor faktor
- file: file file datei
- formaat: formaat size groesse
- gebied: gebied directory verzeichnis
- grid: grid grid grid % TOBIAS
- 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
- inspringen: inspringen indenting einziehen
- interactie: interactie interaction interaktion
- interlinie: interlinie interlinespace zeilenabstande
- items: items items posten
- kader: kader frame rahmen
- kaderdiepte: kaderdiepte framedepth rahmentiefe
- kaderhoek: kaderhoek framecorner rahmenwinkel
- kaderkleur: kaderkleur framecolor rahmenfarbe
- kaderoffset: kaderoffset frameoffset rahmenoffset
- 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 bodyfont fliesstext
- label: label label label
- leeg: leeg empty leer
- 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 marking 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
- onder: onder bottom unten
- onderafstand: onderafstand bottomdistance abstandunten
- onderkader: onderkader bottomframe untenrahmen
- onderoffset: onderoffset bottomoffset untenoffset
- onderstatus: onderstatus bottomstatus untenstatus
- onevenmarge: onevenmarge oddmargin ungeraderand
- 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
- palet: palet palet palette
- 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
- reductie: reductie reduction reduktion % --
- 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
- springvolgendein: springvolgendein indentnext ziehefolgendeein % TOBIAS
- stap: stap step schritt
- start: start start start
- status: status state status
- stop: stop stop stop
- straal: straal radius radius
- sub: sub sub unter
- subtitel: subtitel subtitle untertitel
- 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
- 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
-onbekendeverwijzing: verwijzing unknownreference unbekantereferenz
- 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
- xfactor: xfactor xfactor xfaktor
- xmax: xmax xmax xmax
- xoffset: xoffset xoffset xoffset
- xschaal: xschaal xscale xformat
- xstap: xstap xstep xschritt
- yfactor: yfactor yfactor yfaktor
- ymax: ymax ymax ymax
- yoffset: yoffset yoffset yoffset
- yschaal: yschaal yscale yformat
- ystap: ystap ystep yschritt
- zelfdepagina: zelfdepagina samepage selbeseite
- zij: zij side objektabstand
-
-\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
- achtergrond: achtergrond background hintergrund
- achteruit: achteruit backward backward % TOBIAS
- actie: actie action aktion % TOBIAS
- afsluiter: afsluiter stopper trenner
- alles: alles all alles
- altijd: altijd always immer
- autointro: autointro autointro autointro
- 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
- commando: commando command befehl
- commandos: commandos commands befehle
- concept: concept concept konzept
- dag: dag day tag
- datum: datum date datum
- definitief: definitief final endfassung
- diepte: diepte depth tiefe
- dubbelzijdig: dubbelzijdig doublesided doppelseitig
- eerste: eerste first erste
- elk: elk each jede
- enkelzijdig: enkelzijdig singlesided einzelseitig
- even: even even gerade
- extern: extern external extern
- file: file file datei
- flexibel: flexibel flexible flexibel
- forceer: forceer force zwinge
- gebruikt: gebruikt used verwende
- geen: geen none kein
- geenmarkering: geenmarkering nomarking keinebeschriftung
- geenwit: geenwit nowhite keinweiss
- geroteerd: geroteerd rotated rotated % - TOBIAS
- gespiegeld: gespiegeld mirrored mirrored % - TOBIAS
- globaal: globaal global global
- grid: grid grid grid % TOBIAS
- groot: groot big gross
- grotevoorkeur: grotevoorkeur bigpreference grosszuegig
- halveregel: halveregel halfline halbezeile % TOBIAS
- handhaaf: handhaaf keep behalte
- hangend: hangend hanging haengend
- herhaal: herhaal repeat wiederholen
- herstel: herstel fix stellewiederher
- hier: hier here hier
- hoofd: hoofd header kopfzeile
- hoog: hoog high hoch
- hoogte: hoogte height hoehe
- horizontaal: horizontaal horizontal horizontal
- huidige: huidige current aktuell
- inlinker: inlinker inleft imlinken
- inmarge: inmarge inmargin imrand
- inrechter: inrechter inright imrechten
- intekst: intekst intext imtext
- intro: intro intro intro
- its: its its its
- 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
- laag: laag low tief
- laatste: laatste last letzte
- label: label label label
- lang: lang tall lang
- leeg: leeg empty leer
- letter: letter character buchstabe
- Letter: Letter Character Buchstabe
- Letters: Letters Characters Buchstaben
- letters: letters characters buchstaben
- liggend: liggend landscape landscape % - TOBIAS
- lijn: lijn line linie
- linker: linker left linker
- linkermarge: linkermarge leftmargin linkerrand
- linkerpagina: linkerpagina leftpage linkerseite
- linkerrand: linkerrand leftedge linkekante
- links: links left links
- lokaal: lokaal local lokal
- lokale: lokale 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
- negatief: negatief negative negativ % - TOBIAS
- niet: niet not nicht
- nooit: nooit never nie
- normaal: normaal normal normal
- nummer: nummer number nummer
- offset: offset offset offset
- 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
- papier: papier paper papier % - TOBIAS
- scherm: papier screen bildschirm % - TOBIAS
- passend: passend fit passend
- per: per by pro
- postscript: postscript postscript postscript
- programma: programma program programm
- punt: punt dot punkt
- rand: rand edge kante
- raster: raster screen raster
- recht: recht right rechts
- rechter: rechter right rechter
- rechtermarge: rechtermarge rightmargin rechterrand
- rechterpagina: rechterpagina rightpage rechterseite
- 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
- roteer: roteer rotate drehe
- 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 strict streng
- sub: sub sub sub
- sym: sym sym sym
- symbool: symbool symbol symbol
- tekst: tekst text text
- terug: terug backward rueckwaerts
- test: test test test
- type: type type tippen
- uit: uit off aus
- URL: URL URL URL
- 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
- vooruit: vooruit forward forward % TOBIAS
- vorige: vorige previous vorig
- waarde: waarde value wert
- week: week week woche
- WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG
- weekdag: weekdag weekday wochentag
- willekeurig: willekeurig random random % - TOBIAS
- wit: wit white weiss
- zeer: zeer very sehr
- zeersoepel: zeersoepel verytolerant sehrtolerant
- zeerstreng: zeerstreng verystrict 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
- sx: sx
- sy: sy
- 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 calligraphic 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 calligraphic 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 begin anfang
- eindvan: eindvan end ende
-
- gekoppelde: gekoppelde coupled verknuepft
- in: in - ein
- instellingen: instellingen setups setups % -
- 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
-
- uitstellen: uitstellen postponing verschieben
- verbergen: verbergen hiding verbergen
-
-\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
- SaveDocument: BewaarDocument SaveDocument SaveDocument % TOBIAS
- ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe
- PrintDocument: PrintDocument PrintDocument DruckeDokument
- SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen
- SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen
-
- StartMovie: StartFilm StartMovie StartMovie
- StopMovie: StopFilm StopMovie StopMovie
- PauseMovie: PauzeerFilm PauseMovie PauseMovie
- ResumeMovie: HervatFilm ResumeMovie ResumeMovie
-
- ResetForm: ResetFormulier ResetForm ResetForm % TOBIAS
- SubmitForm: VerzendFormulier SubmitForm SubmitForm % TOBIAS
-
-\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
+%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}
+
+\startlogginginterface context.con
+
+%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 Next we introduce some general label bound variables:
+
+\startvariables dutch english german
+
+ oppagina: oppagina atpage aufseite
+ hierboven: hierboven hencefore vorher
+ hieronder: hieronder hereafter nachher
+
+\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
+
+ sectionlevel: 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 bodypart haupttext
+ hoofdteksten: hoofdteksten bodymatter haupttexte
+ inleiding: inleiding frontpart einleitung
+ inleidingen: inleidingen frontmatter einleitungen
+ uitleiding: uitleiding backpart epilog
+ uitleidingen: uitleidingen backmatter 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 formulae 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 intermezzi 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
+
+ voorwit: voorwit spacebefore vorspatium
+ nawit: nawit spaceafter nachspatium
+ zijvoorwit: zijvoorwit sidespacebefore nebenvorspatium
+ zijnawit: zijnawit sidespaceafter nebennachspatium
+
+ aan: aan to zu
+ aanduiding: aanduiding indicator indikator
+ achtergrond: achtergrond background hintergrund
+ achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe
+ achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel
+ achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe
+ achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset
+ achtergrondraster: achtergrondraster backgroundscreen hintergrundraster
+ achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius
+ adres: adres address adresse
+ 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
+ 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 topstate statusoben
+ breedte: breedte width breite
+ bron: bron source quelle
+ commando: commando command befehl
+ commandos: commandos commands befehle
+ contrastkleur: contrastkleur contrastcolor kontrastfarbe
+ 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
+ evenmarge: evenmarge evenmargin geraderand
+ expansie: expansie expansion expansion
+ factor: factor factor faktor
+ file: file file datei
+ formaat: formaat size groesse
+ gebied: gebied directory verzeichnis
+ grid: grid grid gritter
+ 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 headerstate kopfzeilenstatus
+ hoogte: hoogte height hoehe
+ huidige: huidige current aktuell
+ in: in in in
+ inspringen: inspringen indenting einziehen
+ interactie: interactie interaction interaktion
+ interlinie: interlinie interlinespace zeilenabstande
+ items: items items posten
+ kader: kader frame rahmen
+ kaderdiepte: kaderdiepte framedepth rahmentiefe
+ kaderhoek: kaderhoek framecorner rahmenwinkel
+ kaderkleur: kaderkleur framecolor rahmenfarbe
+ kaderoffset: kaderoffset frameoffset rahmenoffset
+ kaderstraal: kaderstraal frameradius rahmenradius
+ kantlijn: kantlijn marginedge marginalkante
+ kantlijntekst: kantlijntekst marginedgetext marginalkantetext
+ klein: klein small klein
+ kleur: kleur color farbe
+ kolom: kolom column spalte
+ kolomafstand: kolomafstand columndistance spaltenabstand
+ kopkleur: kopkleur headcolor kopffarbe
+ kopletter: kopletter headstyle kopfstil
+ kopna: kopna afterhead nachkopf
+ kopoffset: kopoffset veroffset kopfoffset
+ koppeling: koppeling coupling verknuepfung
+ kopvoor: kopvoor beforehead vorkopf
+ kopwit: kopwit topspace kopfspatium
+ korps: korps bodyfont fliesstext
+ label: label label label
+ leeg: leeg empty leer
+ letter: letter style stil
+ lijn: lijn rule linie
+ lijndikte: lijndikte rulethickness liniendicke
+ lijnkleur: lijnkleur rulecolor linienfarbe
+ lijst: lijst list liste
+ linkerbreedte: linkerbreedte leftwidth linkerbreite
+ linkerkader: linkerkader leftframe linkerrahmen
+ linkerkleur: linkerkleur leftcolor linkerfarbe
+ linkerletter: linkerletter leftstyle linkerstil
+ 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
+ marge: marge margin marginalie
+ margeafstand: margeafstand margindistance marginalabstand
+ margetekst: margetekst margintext marginaltext
+ markering: markering marking beschriftung
+ markleur: markleur marcolor beschrfarbe
+ marletter: marletter marstyle beschrstil
+ 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 nummernstil
+ nummerscheider: nummerscheider numberseparator nummernseperator
+ object: object object objekt
+ offset: offset offset offset
+ onder: onder bottom unten
+ onderafstand: onderafstand bottomdistance abstandunten
+ onderkader: onderkader bottomframe untenrahmen
+ onderoffset: onderoffset bottomoffset untenoffset
+ onderstatus: onderstatus bottomstate untenstatus
+ onevenmarge: onevenmarge oddmargin ungeraderand
+ op: op at bei
+ optie: optie option option
+ pagina: pagina page seite
+ paginacommando: paginacommando pagecommand seitenbefehl
+ paginakleur: paginakleur pagecolor seitenfarbe
+ paginaletter: paginaletter pagestyle seitenstil
+ paginanummer: paginanummer pagenumber seitennummer
+ paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung
+ palet: palet palet palette
+ 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
+ rechterbreedte: rechterbreedte rightwidth rechterbreite
+ rechterkader: rechterkader rightframe rechterrahmen
+ rechterkleur: rechterkleur rightcolor rechterfarbe
+ rechterletter: rechterletter rightstyle rechterstil
+ 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
+ reductie: reductie reduction reduktion
+ 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 horoffset rumpfabstand
+ rugwit: rugwit backspace rumpfspatium
+ schaal: schaal scale format
+ scheider: scheider separator seperator
+ scherm: scherm display bildschirm
+ scope: scope scope bereich
+ sectie: sectie section abschnitt
+ sectienummer: sectienummer sectionnumber abschnittsnummer
+ soort: soort family familie
+ spatie: spatie space spatium
+ spatiering: spatiering spacing spatiumausgleich
+ springvolgendein: springvolgendein indentnext ziehefolgendeein
+ stap: stap step schritt
+ start: start start start
+ status: status state status
+ stop: stop stop stop
+ straal: straal radius radius
+ sub: sub sub unter
+ subtitel: subtitel subtitle untertitel
+ symbool: symbool symbol symbol
+ symboolset: symboolset symbolset symbolset
+ symkleur: symkleur symcolor symfarbe
+ symletter: symletter symstyle symstil
+ synoniem: synoniem synonym synonym
+ synoniemkleur: synoniemkleur synonymcolor synonymfarbe
+ synoniemletter: synoniemletter synonymstyle synonymstil
+ 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 textstil
+ tekstscheider: tekstscheider textseparator textseparator
+ tekststatus: tekststatus textstate textstatus
+ titel: titel title titel
+ titeluitlijnen: titeluitlijnen aligntitle titelausrichten
+ tolerantie: tolerantie tolerance toleranz
+ tussen: tussen inbetween zwischen
+ type: type type typ
+ uitlijnen: uitlijnen align ausrichtung
+ urlspatie: urlspatie urlspace urlspatium
+ urlvariant: urlvariant urlalternative urlalternative
+ van: van from von
+ variant: variant alternative alternative
+ verhoog: verhoog increment erhoehen
+ verhoognummer: verhoognummer incrementnumber nummererhoehen
+ verwijzing: verwijzing reference referenz
+ onbekendeverwijzing: onbekendeverwijzing unknownreference unbekantereferenz
+ voet: voet footer fusszeile
+ voetafstand: voetafstand footerdistance fusszeilenabstand
+ voetstatus: voetstatus footerstate fusszeilenstatus
+ voffset: voffset voffset voffset
+ volgende: volgende next folgende
+ voor: voor before vor
+ voorcommando: voorcommando commandbefore vorbefehl
+ vorige: vorige previous vorige
+ vorigenummer: vorigenummer previousnumber vorigenummer
+ wijze: wijze way art
+ wit: wit white weiss
+ xfactor: xfactor xfactor xfaktor
+ xmax: xmax xmax xmax
+ xoffset: xoffset xoffset xoffset
+ xschaal: xschaal xscale xformat
+ xstap: xstap xstep xschritt
+ yfactor: yfactor yfactor yfaktor
+ ymax: ymax ymax ymax
+ yoffset: yoffset yoffset yoffset
+ yschaal: yschaal yscale yformat
+ ystap: ystap ystep yschritt
+ zelfdepagina: zelfdepagina samepage selbeseite
+ zij: zij side objektabstand
+
+veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe
+ veldkaderkleur: veldkaderkleur fieldframecolor feldrahmenfarbe
+ veldoffset: veldoffset fieldoffset feldoffset
+
+ openactie: openactie openaction oeffenaktion
+ sluitactie: sluitactie closeaction schliessenaktion
+
+ klikin: klikin clickin klickin
+ klikuit: klikuit clickout klickaus
+ gebiedin: gebiedin regionin regionin
+ gebieduit: gebieduit regionout regionaus
+ natoets: natoets afterkey nachtaste
+ formatteer: formatteer format formatieren
+ valideer: valideer validate validieren
+ bereken: bereken calculate berechnen
+
+\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
+ achtergrond: achtergrond background hintergrund
+ achteruit: achteruit backward rueckwaerts
+ actie: actie action aktion
+ afsluiter: afsluiter stopper trenner
+ alles: alles all alles
+ altijd: altijd always immer
+ autointro: autointro autointro autointro
+ 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
+ commando: commando command befehl
+ commandos: commandos commands befehle
+ concept: concept concept konzept
+ dag: dag day tag
+ datum: datum date datum
+ default: default default default
+ definitief: definitief final endfassung
+ diepte: diepte depth tiefe
+ dubbelzijdig: dubbelzijdig doublesided doppelseitig
+ eerste: eerste first erste
+ elk: elk each jede
+ enkelzijdig: enkelzijdig singlesided einzelseitig
+ ergens: ergens somewhere irgendwo
+ nergens: nergens nowhere nirgens
+ even: even even gerade
+ extern: extern external extern
+ file: file file datei
+ flexibel: flexibel flexible flexibel
+ forceer: forceer force zwinge
+ gebruikt: gebruikt used verwende
+ geen: geen none kein
+ geenmarkering: geenmarkering nomarking keinebeschriftung
+ geenwit: geenwit nowhite keinweiss
+ geroteerd: geroteerd rotated gedreht
+ gespiegeld: gespiegeld mirrored gespiegelt
+ globaal: globaal global global
+ grid: grid grid gritter
+ groot: groot big gross
+ grotevoorkeur: grotevoorkeur bigpreference grosszuegig
+ grijs: grijs gray grau
+ halveregel: halveregel halfline halbezeile
+ handhaaf: handhaaf keep behalte
+ hangend: hangend hanging haengend
+ herhaal: herhaal repeat wiederholen
+ herstel: herstel fix stellewiederher
+ hier: hier here hier
+ hoofd: hoofd header kopfzeile
+ hoog: hoog high hoch
+ hoogte: hoogte height hoehe
+ horizontaal: horizontaal horizontal horizontal
+ huidige: huidige current aktuell
+ italic: italic italic italic
+ inlinker: inlinker inleft imlinken
+ inmarge: inmarge inmargin imrand
+ inrechter: inrechter inright imrechten
+ intekst: intekst intext imtext
+ intro: intro intro intro
+ its: its its its
+ ja: ja yes ja
+ jaar: jaar year jahr
+ kader: kader frame rahmen
+ kantlijn: kantlijn marginedge marginalkante
+ kap: kap cap kap
+ kapitaal: kapitaal capital versalien
+ kenmerk: kenmerk referral merkmal
+ klein: klein small klein
+ kleinnormaal: kleinnormaal smallnormal kleinnormal
+ kleinschuin: kleinschuin smallslanted kleingeneigt
+ kleinschuinvet: kleinschuinvet smallslantedbold kleingeneigtfett
+ kleinitalic: kleinitalic smallitalic kleinitalic
+ kleinitalicvet: kleinitalicvet smallitalicbold kleinitalicfett
+ kleintype: kleintype smalltype kleintippen
+ kleinvet: kleinvet smallbold kleinfett
+ kleinvetschuin: kleinvetschuin smallboldslanted kleinfettgeneigt
+ kleinvetitalic: kleinvetitalic smallbolditalic kleinfettitalic
+ kleur: kleur color farbe
+ kolommen: kolommen columns spalten
+ kop: kop head kopf
+ laag: laag low tief
+ laatste: laatste last letzte
+ label: label label label
+ lang: lang tall lang
+ leeg: leeg empty leer
+ Letter: Letter Character Buchstabe
+ letter: letter character buchstabe
+ Letters: Letters Characters Buchstaben
+ letters: letters characters buchstaben
+ liggend: liggend landscape querformat
+ lijn: lijn rule linie
+ linkermarge: linkermarge leftmargin linkerrand
+ linkerpagina: linkerpagina leftpage linkerseite
+ 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
+ na: na after nach
+ naam: naam name name
+ naast: naast opposite gegenueber
+ nee: nee no nein
+ negatief: negatief negative negativ
+ niet: niet not nicht
+ nooit: nooit never nie
+ normaal: normaal normal normal
+ nummer: nummer number nummer
+ offset: offset offset offset
+ onbekend: onbekend unknown unbekannt
+ onder: onder bottom unten
+ oneven: oneven odd ungerade
+ opelkaar: opelkaar packed gepackt
+ opmaak: opmaak markup umbruch
+ opmarge: opmarge atmargin amrand
+ overlay: overlay overlay overlay
+ pagina: pagina page seite
+ paginanummer: paginanummer pagenumber seitennummer
+ papier: papier paper papier
+ scherm: scherm display bildschirm
+ passend: passend fit passend
+ per: per by pro
+ postscript: postscript postscript postscript
+ programma: programma program programm
+ punt: punt dot punkt
+ ran: ran ran ran
+ rand: rand edge kante
+ raster: raster screen raster
+ recht: recht rectangular rechteckig
+ rechtermarge: rechtermarge rightmargin rechterrand
+ rechterpagina: rechterpagina rightpage rechterseite
+ rechterrand: rechterrand rightedge 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
+ grieks: grieks greek greek
+ Grieks: Grieks Greek Greek
+ rond: rond round rund
+ roteer: roteer rotate drehe
+ ruim: ruim broad breit
+ schuin: schuin slanted geneigt
+ schuinvet: schuinvet slantedbold geneigtfett
+ italicvet: italicvet italicbold italicfett
+ sectienummer: sectienummer sectionnumber abschnittsnummer
+ smal: smal narrow schmall
+ soepel: soepel tolerant tolerant
+ standaard: standaard standard standard
+ start: start start start
+ stop: stop stop stop
+ streng: streng strict streng
+ sub: sub sub unter
+ sym: sym sym sym
+ symbool: symbool symbol symbol
+ tekst: tekst text text
+ back: terug back zurueck
+ test: test test test
+ tussen: tussen inbetween zwischen
+ type: type type tippen
+ uit: uit off aus
+ url: url url url
+ URL: URL URL URL
+ vast: vast fixed fest
+ los: los loose lose
+ verder: verder continue fortsetzten
+ vertikaal: vertikaal vertical vertikal
+ vet: vet bold fett
+ vetschuin: vetschuin boldslanted fettgeneigt
+ vetitalic: vetitalic bolditalic fettitalic
+ viertal: viertal quadruple viertel
+ voet: voet footer fusszeile
+ volgende: volgende next folgende
+ voor: voor before vor
+ voorkeur: voorkeur preference einstellung
+ voorlopig: voorlopig temporary temporaer
+ vooruit: vooruit forward vorwaerts
+ vorige: vorige previous vorig
+ waarde: waarde value wert
+ week: week week woche
+ weekdag: weekdag weekday wochentag
+ WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG
+ willekeurig: willekeurig random zufaellig
+ wit: wit white weiss
+ zeer: zeer very sehr
+ zeersoepel: zeersoepel verytolerant sehrtolerant
+ zeerstreng: zeerstreng verystrict sehrstreng
+ zie: zie see sieh
+
+ smallcaps: smallcaps smallcaps smallcaps
+
+ eerstepagina: eerstepagina firstpage ersteseite
+ vorigepagina: vorigepagina previouspage vorigeseite
+ volgendepagina: volgendepagina nextpage folgendeseite
+ laatstepagina: laatstepagina lastpage letzteseite
+ eerstesubpagina: eerstesubpagina firstsubpage ersteunterseite
+ vorigesubpagina: vorigesubpagina previoussubpage vorigeunterseite
+ volgendesubpagina: volgendesubpagina nextsubpage folgendeunterseite
+ laatstesubpagina: laatstesubpagina lastsubpage letzteunterseite
+
+ alleenleesbaar: alleenleesbaar readonly nurlesbar
+ verplicht: verplicht required obligatorisch
+ beschermd: beschermd protected geschuetzt
+ gesorteerd: gesorteerd sorted sortiert
+ nietbeschikbaar: nietbeschikbaar unavailable nichtverfuegbar
+ verborgen: verborgen hidden versteckt
+ printbaar: printbaar printable druckbar
+
+\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
+ sx: sx
+ sy: sy
+ 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
+
+\startvariables dutch english german
+
+ calligraphic: calligrafie calligraphic kalligraphie
+ handwritten: handschrift handwritten handschrift
+ sansserif: schreefloos sansserif grotesk
+ roman: romaan roman antiqua
+ teletype: teletype teletype fernschreiber
+
+ type: type type tippen
+
+ serif: serif serif serif
+ regular: regular regular regular
+ support: support support support
+ sans: sans sans sans
+ mono: mono mono mono
+
+\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 begin anfang
+ buffer: buffer buffer puffer
+ commentaar: commentaar comment kommentar
+ eindvan: eindvan end ende
+ formule: formule formula formel
+ gekoppelde: gekoppelde coupled verknuepft
+ haal: haal get get
+ huidigelokale: huidigelokale currentlocal aktuelllokal
+ in: in - ein
+ instellingen: instellingen setups einstellungen
+ interactiemenu: interactiemenu interactionmenu interaktionsmenue
+ laad: laad load laden
+ leeg: leeg empty leer
+ lege: lege empty leer
+% TOBIAS, what does this auf in auflisten mean?
+ lijst: lijst list auflisten
+ lijstmet: lijstmet listof auflistenvon
+ lokale: lokale local lokal
+ opmaak: opmaak makeup umbruch
+ plaats: plaats place platziere
+ reserveer: reserveer reserve reservieren
+ start: start start start
+ stel: stel setup stelle
+ stop: stop stop stop
+ tabelkop: tabelkop tablehead tabellenueberschrift
+ tabelstaart: tabelstaart tabletail tabellenende
+ tabulate: tabulatie tabulate tabulator
+ tekst: tekst text text
+ type: type type type
+ uitstellen: uitstellen postponing verschieben
+ verbergen: verbergen hiding verbergen
+ verhoog: verhoog increment erhoehen
+ volgende: volgende next folgende
+ volledige: volledige complete vollende
+ vorige: vorige previous vorige
+ vorigelokale: vorigelokale previouslocal voriglokal
+ zie: zie see sieh
+
+ gegeven: gegeven fact gegeben
+ legenda: legenda legend legende
+
+\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
+ SaveDocument: BewaarDocument SaveDocument SpeichereDokument
+ ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe
+ PrintDocument: PrintDocument PrintDocument DruckeDokument
+ SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen
+ SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen
+
+ StartMovie: StartFilm StartMovie StartFilm
+ StopMovie: StopFilm StopMovie StopFilm
+ PauseMovie: PauzeerFilm PauseMovie PauseFilm
+ ResumeMovie: HervatFilm ResumeMovie FortsetzenFilm
+
+ SaveForm: BewaarFormulier SaveForm SpeicheFormular
+ LoadForm: LaadFormulier LoadForm LadeFormular
+ ResetForm: ResetFormulier ResetForm ZuruecksetzenFormular
+ SubmitForm: VerzendFormulier SubmitForm VersendeFormular
+
+ HideField: VerbergVeld HideField VerbergeFeld
+ ShowField: ToonVeld ShowField ZeigeFeld
+
+\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
+\stopvariables
+
+%D \stopcompressdefinitions
+
+\stoplogginginterface
+
+\endinput
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index 2519fb092..5bd104cde 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -1,1149 +1,1292 @@
-%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{\setevalue{\??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%
- {\let#2\empty
- \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}}%
- \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 beginvan: begin beginvan
-%D eindvan: end 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>}%
- \resetvalue{\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
+%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} \def\!!to {to}
+
+%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{\setevalue{\??prefix#1}{\@@prefix#1}}
+
+%D \macros
+%D {selectinterface,
+%D defaultinterface, currentinterface, currentresponses}
+%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{english}
+
+ \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
+ \let\selectinterface\relax}
+
+\else
+
+ \def\selectinterface%
+ {\writestatus{interface}{defining \currentinterface\space interface}%
+ \writeline
+ \writestatus{interface}{using \currentresponses\space messages}%
+ \writeline
+ \let\selectinterface\relax}
+
+\fi
+
+\ifx\currentinterface\undefined \let\currentinterface=\defaultinterface \fi
+\ifx\currentresponses\undefined \let\currentresponses=\defaultinterface \fi
+
+%D \macros
+%D {startinterface}
+%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
+
+\def\startinterface #1
+ {\doifinsetelse{\currentinterface}{#1}
+ {\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%
+ {\let#2\empty
+ \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}}%
+ \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
+ {\definemessageconstant{#2}% handy for modules
+ \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 not 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 A slightly faster alternative:
+
+\beginTEX
+
+\def\dosetvalue#1#2#3%
+ {\@EA\ifx\csname\c!prefix!#2\endcsname\relax
+ \@EA\def\csname#1#2\endcsname{#3}%
+ \else
+ \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\dosetevalue#1#2#3%
+ {\@EA\ifx\csname\c!prefix!#2\endcsname\relax
+ \@EA\edef\csname#1#2\endcsname{#3}%
+ \else
+ \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
+\def\docopyvalue#1#2#3%
+ {\@EA\ifx\csname\c!prefix!#3\endcsname\relax
+ \@EA\@EA\@EA\def\@EA
+ \csname\@EA#1\@EA#3\@EA
+ \endcsname\@EA{\csname#2#3\endcsname}%
+ \else
+ \@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}
+
+\endTEX
+
+\beginETEX \protected
+
+\def\dosetvalue#1#2#3%
+ {\ifcsname\c!prefix!#2\endcsname
+ \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \else
+ \@EA\def\csname#1#2\endcsname{#3}%
+ \fi}
+
+\def\dosetevalue#1#2#3%
+ {\ifcsname\c!prefix!#2\endcsname
+ \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}%
+ \else
+ \@EA\edef\csname#1#2\endcsname{#3}%
+ \fi}
+
+\def\docopyvalue#1#2#3%
+ {\ifcsname\c!prefix!#3\endcsname
+ \@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}%
+ \else
+ \@EA\@EA\@EA\def\@EA
+ \csname\@EA#1\@EA#3\@EA
+ \endcsname\@EA{\csname#2#3\endcsname}%
+ \fi}
+
+\endETEX
+
+%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.
+
+%D The next few macros come into action when we generate
+%D interface log files:
+
+\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi
+
+\newif\iflogginginterface
+
+\def\flushinterfaceelementline%
+ {\iflogginginterface
+ \immediate\write\scratchwrite{\interfaceelementline}%
+ \let\interfaceelementline\empty
+ \fi}
+
+\def\saveinterfaceelementline#1%
+ {\iflogginginterface
+ \edef\interfaceelementline{\interfaceelementline#1\space}%
+ \fi}
+
+\def\startlogginginterface #1 %
+ {\logginginterfacetrue
+ \let\interfaceelementline\empty
+ \immediate\openout\scratchwrite=./#1\relax}
+
+\def\stoplogginginterface%
+ {\flushinterfaceelementline
+ \immediate\closeout\scratchwrite
+ \logginginterfacefalse}
+
+%D By default we don't log at all.
+
+\def\startlogginginterface #1 {}
+\def\stoplogginginterface {}
+
+%D These logging commands are used in the next macros.
+
+\def\nointerfaceobject{-}
+
+\def\startinterfaceobjects#1#2%
+ {\!!counta=1
+ \let\dogetinterfaceobject\dogetinterfacetemplate
+ \let\dowithinterfaceelement#1%
+ \def\dodogetinterfaceobjects%
+ {\ifx\next#2%
+ \flushinterfaceelementline
+ \flushinterfaceelementline
+ \let\next\gobbleoneargument
+ \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]%
+ {\saveinterfaceelementline{#1}%
+ \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]%
+ \else
+ \saveinterfaceelementline{#1}%
+ \fi}
+
+\let\interfaceelementline\empty
+
+\def\dogetinterfaceelement[#1:#2#3]%
+ {\ifx#2:%
+ \!!countb=0
+ \def\!!stringa{#1}%
+ \flushinterfaceelementline
+ \else
+ \advance\!!countb by 1
+ \saveinterfaceelementline{#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
+ \doifnot{#1}{#2}
+ {\checksetvalue{\c!prefix!#2}{#1}%
+ \setvalue{\c!prefix!#2}{#1}}}}
+
+\def\setinterfacevariable#1#2%
+ {\doifelse{#2}{\nointerfaceobject}
+ {\debuggerinfo{variable}{#1 defined as #1 by default}%
+ \checksetvalue{\v!prefix!#1}{#1}%
+ \setvalue{\v!prefix!#1}{#1}}
+ {\debuggerinfo{variable}{#1 defined as #2}%
+ \checksetvalue{\v!prefix!#1}{#2}%
+ \setvalue{\v!prefix!#1}{#2}}}
+
+\def\checksetvalue#1#2%
+ {\doifdefined{#1}{\doifvaluesomething{#1}{\doifnotvalue{#1}{#2}
+ {\writestatus{problems}{set #1 to #2 overloads \getvalue{#1}}%
+ \wait}}}}
+
+\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 beginvan: begin beginvan
+%D eindvan: end 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>}%
+ \resetvalue{\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.
+
+\beginTEX
+
+\def\interfaced#1%
+ {\expandafter\ifx\csname\c!prefix!#1\endcsname\relax
+ #1%
+ \else
+ \csname\c!prefix!#1\endcsname
+ \fi}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\interfaced#1%
+ {\ifcsname\c!prefix!#1\endcsname
+ \csname\c!prefix!#1\endcsname
+ \else
+ #1%
+ \fi}
+
+\endETEX
+
+%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.
+
+%D Out of convenience we define the banners here.
+
+\def\contextbanner%
+ {ConTeXt
+ ver: \contextversion \space
+ fmt: \formatversion \space
+ int: \currentinterface\space
+ mes: \currentresponses}
+
+\def\showcontextbanner%
+ {\writeline\writestring{\contextbanner}\writeline}
+
+\edef\formatversion%
+ {\ifx\normalyear \undefined\the\year \else\the\normalyear \fi.%
+ \ifx\normalmonth\undefined\the\month\else\the\normalmonth\fi.%
+ \ifx\normalday \undefined\the\day \else\the\normalday \fi}
+
+\ifx\contextversion\undefined \def\contextversion{unknown} \fi
+
+\ifx\undefined\normaldump
+ \let\normaldump\dump \def\dump{\showcontextbanner\normaldump}
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index 62bb7f858..2a38e4ff4 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -1,576 +1,609 @@
-%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}
-
-\definesystemconstant {skewchar}
-\definesystemconstant {hyphenchar}
-
-%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 {vwa} % automatic (illustrations)
-\definesystemconstant {vwb} % automatic (illustrations)
-
-\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 {form} {:m:} % form reference
-\definereferenceconstant {syst} {:s:} % system reference
-
-\definereferenceconstant {from} {:f:} % from list reference
-\definereferenceconstant {to} {:t:} % to list reference
-
-\definereferenceconstant {object} {:o:} % tex objects
-\definereferenceconstant {driver} {:d:} % driver objects
-
-\definereferenceconstant {java} {:j:} % java scripts
-
-%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 {fs} % FileSynonym
-\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 {it} % stelInTerliniein
-\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 {sa} % ScAle
-\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 {su} % SetUp
-\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 {xy} % schaal
-\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 {s} {s}
-
-\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 {sysfilename} {cont-sys}
-\definefileconstant {oldfilename} {cont-old}
-\definefileconstant {newfilename} {cont-new}
-\definefileconstant {filfilename} {cont-fil}
-\definefileconstant {optfilename} {cont-opt}
-
-%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-}
-\definefileconstant {moduleprefix} {m-}
-\definefileconstant {styleprefix} {s-}
-
-%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 {nn} {nn}
-
-\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
+%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 {usenglish} \definesystemconstant {us}
+\definesystemconstant {ukenglish} \definesystemconstant {uk}
+\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}
+\definesystemconstant {czech} \definesystemconstant {cz}
+\definesystemconstant {slovak} \definesystemconstant {sk}
+
+%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 {files}
+\definemessageconstant {figures}
+\definemessageconstant {floatblocks}
+\definemessageconstant {fonts}
+\definemessageconstant {encodings}
+\definemessageconstant {interactions}
+\definemessageconstant {javascript}
+\definemessageconstant {layouts}
+\definemessageconstant {linguals}
+\definemessageconstant {references}
+\definemessageconstant {specials}
+\definemessageconstant {structures}
+\definemessageconstant {symbols}
+\definemessageconstant {systems}
+\definemessageconstant {textblocks}
+\definemessageconstant {versions}
+\definemessageconstant {verbatims}
+
+%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}
+\def\!!to {to}
+
+%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}
+
+\definesystemconstant {skewchar}
+\definesystemconstant {hyphenchar}
+\definesystemconstant {encoding}
+\definesystemconstant {mapping}
+\definesystemconstant {patterns}
+
+%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 {from}
+\definesystemconstant {to}
+\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 {vwa} % automatic (illustrations)
+\definesystemconstant {vwb} % automatic (illustrations)
+
+\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 {form} {:m:} % form reference
+\definereferenceconstant {syst} {:s:} % system reference
+
+\definereferenceconstant {from} {:f:} % from list reference
+\definereferenceconstant {to} {:t:} % to list reference
+
+\definereferenceconstant {object} {:o:} % object reference
+\definereferenceconstant {driver} {:d:} % driver object reference
+
+\definereferenceconstant {java} {:j:} % java scripts
+
+%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 {bo} % BlankO (definitions)
+\definesystemvariable {bs} % SelecteerBlokken
+\definesystemvariable {bt} % BuTton
+\definesystemvariable {bu} % BUffer
+\definesystemvariable {bv} % Brieven
+\definesystemvariable {by} % Per
+\definesystemvariable {cc} % Comment
+\definesystemvariable {ci} % CItaat
+\definesystemvariable {cl} % kleur (CoLor setup)
+\definesystemvariable {co} % COmbinaties
+\definesystemvariable {cr} % kleur (ColoR)
+\definesystemvariable {cv} % ConVersie
+\definesystemvariable {da} % DAte
+\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 {fd} % FielD
+\definesystemvariable {fg} % FiGuurmaten
+\definesystemvariable {ff} % FontFile
+\definesystemvariable {fi} % FIle
+\definesystemvariable {fl} % Floats
+\definesystemvariable {fm} % ForMules
+\definesystemvariable {ft} % FonTs
+\definesystemvariable {fp} % FilegroeP
+\definesystemvariable {fs} % FileSynonym
+\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 {it} % stelInTerliniein
+\definesystemvariable {iv} % stelInvulLijnenin
+\definesystemvariable {ka} % KAntlijn
+\definesystemvariable {kd} % KaDerteksten
+\definesystemvariable {kj} % KopJes (floats)
+\definesystemvariable {kk} % Kapitalen
+\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 {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 {sa} % ScAle
+\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 {su} % SetUp
+\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 {tt} % TabulaTe
+\definesystemvariable {ty} % TYpe
+\definesystemvariable {ui} % UItvoer
+\definesystemvariable {ur} % URl
+\definesystemvariable {ve} % VErsie
+\definesystemvariable {vn} % VoetNoten
+\definesystemvariable {wr} % WitRuimte
+\definesystemvariable {xy} % schaal
+\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 {s} {s}
+
+\defineinterfaceconstant {t} {t}
+\defineinterfaceconstant {h} {h}
+\defineinterfaceconstant {b} {b}
+
+\defineinterfaceconstant {rgb} {rgb}
+\defineinterfaceconstant {cmyk} {cmyk}
+
+\defineinterfacevariable {rgb} {rgb}
+\defineinterfacevariable {cmyk} {cmyk}
+
+\defineinterfacevariable {s} {s}
+
+%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 {sysfilename} {cont-sys}
+\definefileconstant {oldfilename} {cont-old}
+\definefileconstant {newfilename} {cont-new}
+\definefileconstant {filfilename} {cont-fil}
+\definefileconstant {optfilename} {cont-opt}
+
+%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 {colorprefix} {colo-}
+\definefileconstant {encodingprefix} {enco-}
+\definefileconstant {fontprefix} {font-}
+\definefileconstant {symbolprefix} {symb-}
+\definefileconstant {javascriptprefix} {java-}
+\definefileconstant {languageprefix} {lang-}
+\definefileconstant {specialprefix} {spec-}
+\definefileconstant {moduleprefix} {m-}
+\definefileconstant {styleprefix} {s-}
+\definefileconstant {privateprefix} {p-}
+
+%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 {nn} {nn}
+
+\defineinterfaceconstant {x} {x}
+\defineinterfaceconstant {xx} {xx}
+
+\defineinterfaceconstant {em} {em}
+
+\defineinterfaceconstant {mi} {mi}
+\defineinterfaceconstant {sy} {sy}
+\defineinterfaceconstant {ex} {ex}
+\defineinterfaceconstant {mr} {mr}
+
+\defineinterfaceconstant {ma} {ma}
+\defineinterfaceconstant {mb} {mb}
+\defineinterfaceconstant {mc} {mc}
+
+%D For figure inclusion we need:
+
+\defineinterfaceconstant {tif} {tif}
+\defineinterfaceconstant {eps} {eps}
+\defineinterfaceconstant {mps} {mps}
+\defineinterfaceconstant {jpg} {jpg}
+\defineinterfaceconstant {pdf} {pdf}
+\defineinterfaceconstant {png} {png}
+\defineinterfaceconstant {mov} {mov}
+\defineinterfaceconstant {tex} {tex}
+\defineinterfaceconstant {tmp} {tmp}
+
+%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
diff --git a/tex/context/base/patch.tex b/tex/context/base/patch.tex
new file mode 100644
index 000000000..4a086f423
--- /dev/null
+++ b/tex/context/base/patch.tex
@@ -0,0 +1,60 @@
+In this file the most important changes are reported. Some changes will
+go unnoticed, others do influence the results slightly and/or solve real
+bugs. Changes to mechanisms under construction or revision are reported
+in the documentation or not mentioned at all. I'm quite sure that I
+forget to mention many patches.
+
+ 1 mai 1998: depth of \underbar limited to \dp\strutbox, prevent unequal
+ baseline distances
+ 3 mai 1998: \splittopskip settings added in supp-box routines, else
+ funny baselinedistances in numbered/underbared paragraphs
+ 3 mai 1998: \parskip corrections added in shapebox routines, else empty
+ lines at top of (some) page(s)
+ 5 mai 1998: the quote optimizations didn't work out all right in fonts
+ other than the CMR ones, therefore we revert to the default
+ ligatures
+ 6 mai 1998: missing references were already turned into fake ones (to
+ prevent further messages) but testing is more strict now
+ 6 mai 1998: empty/dummy menu items repaired, this bug was introduced while
+ extending the cross reference mechanism
+ 7 mai 1998: pretty switch in verbatim repaired
+ 7 mai 1998: center too wide floats
+ 7 mai 1998: bug removed in pagenumber prefix (unsafe optimization); non
+ dutch settings were not yet supported
+20 mai 1998: decoupling of object reference mechanism
+20 mai 1998: restore active characters (e.g. in pretty
+ printing mode) in the pagebody routine, just to
+ enable || in headers and footers
+20 mai 1998: field support added and reshufled spec-tpd/spec-pdf
+26 mai 1998: nested underbar works again
+27 mai 1998: text annotations finally supported
+27 mai 1998: \oninterlineskip corrected for negative baselinekips
+
+12 june 1998: extended external figure mechanism
+22 june 1998: more subtle \startoverlay..\stopoverlay
+23 june 1998: \allowbreak added in \placelist
+24 june 1998: style= didn't work yet in english/german
+28 june 1998: probably unnoticed glitch removed in special reset
+
+ 3 july 1998: now in \framed[width=fit,height=<dimen>,align=middle]
+ the automatic calculation option also obeys vertical
+ alignment
+10 july 1998: rounded corners could not be turned off (recently
+ introduced bug)
+24 july 1998: \DV added to columns due to gaps in lines
+31 july 1998: zero level counters now also reset at sectionblock
+ boundaries
+
+14 august 1998: some missing english/german translations added
+14 august 1998: displaymath spacing optimized and made cleaner
+20 august 1998: again some missing translations added
+28 august 1998: unknown figures could lead to missing
+ inclusion, (recently introduced bug)
+28 august 1998: chained references could interfere with direct
+ destinations (lists); extra reset added
+
+11 september 1998: flush topfloats added to forced float flushing,
+ else disappearing floats
+11 september 1998: recently introduced bug in synonyms
+ removed, concerning style switch
+3 october 1998: \seeindex did not flush entry level
diff --git a/tex/context/base/plain.tex b/tex/context/base/plain.tex
deleted file mode 100644
index 6a1e5acbc..000000000
--- a/tex/context/base/plain.tex
+++ /dev/null
@@ -1,1236 +0,0 @@
-% 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/ppchtex.noc b/tex/context/base/ppchtex.noc
new file mode 100644
index 000000000..c8aa54fa2
--- /dev/null
+++ b/tex/context/base/ppchtex.noc
@@ -0,0 +1,230 @@
+%D \module
+%D [ file=ppchtex (m-chemie),
+%D version=1997.03.19,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
+%D author=Hans Hagen,
+%D date=\huidigedatum,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten},
+%D suggestions={Tobias Burnus, Dirk Kuypers \& 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.
+
+% Copyright Notice / 1995-1997
+%
+% This module is part of the ConTeXt distribution. This
+% macropackage will be put in the public domain as soon as the
+% source is fully documented.
+%
+% This module is to be used as a whole and may not be adapted
+% without knowledge of the authors. No separate parts may be
+% distributed.
+%
+% Non-commercial (educational) institutions are hereby granted
+% to use this module. Commercial use is only permitted after
+% written permission.
+%
+% Errors can be reported to the authors and will be solved as
+% soon as possible. Suggestions are welcome.
+%
+% copyright : PRAGMA
+% author : Hans Hagen
+% address : Postbox 125
+% 8000 AC Zwolle
+% The Netherlands
+% telephone : 038 4 229 775
+% e-mail : pragma@pi.net
+
+%D This module facilitates the use of \PPCHTEX\ in macro
+%D packages other than \CONTEXT. One of the features of
+%D \CONTEXT\ is that the user interface can be in any
+%D language. This language is defined at loading time.
+%D
+%D This module is indeed a surrogate one and is only a poor
+%D man's alternative to the more extensive \type{mult-***}
+%D modules of \CONTEXT. The extra overhead in terms of macros
+%D and functionality that these modules offer is only useful
+%D in \CONTEXT.
+%D
+%D Two interfaces are supported here, but others can easily be
+%D defined. This module expects the general system macros to be
+%D loaded as wel as a interface switch \type{\ifalternativeinterface}
+%D to be set.
+
+%D First we load some auxiliary macro's:
+
+\input supp-mis.tex \let\writestatus\undefined
+\input syst-gen.tex
+
+%D after which we can go on with:
+
+\unprotect
+
+%D 0 = english
+%D 1 = dutch
+%D 2 = german
+
+\ifx\interfacenumber\undefined
+ \chardef\interfacenumber=0
+\fi
+
+\def\definesystemvariable #1 %
+ {\setvalue{??#1}{@@#1}}
+
+\def\definesystemconstant #1 %
+ {\setvalue{s!#1}{#1}}
+
+\def\definevariable #1 #2 #3 %
+ {\ifcase\interfacenumber
+ \setvalue{v!#2}{#1}
+ \or
+ \setvalue{v!#2}{#2}
+ \or
+ \setvalue{v!#2}{#3}
+ \fi}
+
+\def\defineconstant #1 #2 #3 %
+ {\ifcase\interfacenumber
+ \setvalue{c!#2}{#2}
+ \setvalue{c!#1}{#2}
+ \or
+ \setvalue{c!#2}{#2}
+ \or
+ \setvalue{c!#2}{#2}
+ \setvalue{c!#3}{#2}
+ \fi}
+
+\def\definecommand #1 #2 #3 %
+ {\ifcase\interfacenumber
+ % core commands are english
+ \or
+ \doifnot{#1}{#2}{\setvalue{#2}{\getvalue{#1}}}
+ \or
+ \doifnot{#1}{#3}{\setvalue{#3}{\getvalue{#1}}}
+ \fi}
+
+\long\def\startcommands#1\stopcommands%
+ {}
+
+\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}
+
+\defineconstant axis assenstelsel achsen
+\defineconstant top boven oben
+\defineconstant width breedte breite
+\defineconstant size formaat groesse
+\defineconstant number getal nummer
+\defineconstant height hoogte hoehe
+\defineconstant frame kader rahmen
+\defineconstant bodyfont korps fliesstext
+\defineconstant style letter schriftstil
+\defineconstant left links links
+\defineconstant offset offset offset
+\defineconstant bottom onder unten
+\defineconstant option optie option
+\defineconstant location plaats platz
+\defineconstant right rechts rechts
+\defineconstant resolution resolutie aufloesung
+\defineconstant scale schaal format
+\defineconstant status status status
+\defineconstant text tekst text
+\defineconstant textsize tekstformaat textgroesse
+\defineconstant alternative variant alternative
+\defineconstant x x x
+\defineconstant y y y
+
+\definevariable on aan an
+\definevariable big groot gross
+\definevariable intext intekst imtext
+\definevariable small klein klein
+\definevariable medium middel mittel
+\definevariable fit passend passend
+\definevariable start start start
+\definevariable stop stop stop
+\definevariable test test test
+\definevariable off uit aus
+
+\definecommand definechemical definieerchemie definierechemie
+\definecommand setupchemical stelchemiein stellechemieein
+\definecommand chemical chemie chemie
+\definecommand tochemical naarchemie zurchemie
+\definecommand startchemical startchemie startchemie
+\definecommand stopchemical stopchemie stopchemie
+\definecommand toptext boventekst textueber
+\definecommand bottext ondertekst textunter
+\definecommand midtext middentekst textmitte
+
+\protect
+
+%D After those definitions we actually load \PPCHTEX:
+
+\input ppchtex.tex
+
+%D We also change some setup values. Let's hope that the next
+%D setups forever suits \LATEX.
+
+\unprotect
+
+\ifx\bodyfontsize\undefined
+ \ifx\f@size\undefined
+ \ifx\@ptsize\undefined
+ \setupchemical[\c!korps=11pt]
+ \else
+ \setupchemical[\c!korps=1\@ptsize pt]
+ \fi
+ \else
+ \setupchemical[\c!korps=\f@size pt]
+ \fi
+\else
+ \setupchemical[\c!korps=\bodyfontsize]
+\fi
+
+\ifx\mathrm\undefined
+ \setupchemical[\c!letter=\rm]
+\else
+ \setupchemical[\c!letter=\mathrm]
+\fi
+
+\ifx\outputresolution\undefined
+ \setupchemical[\c!resolutie=300]
+\else
+ \setupchemical[\c!resolutie=\outputresolution]
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex
new file mode 100644
index 000000000..b9f2dcbee
--- /dev/null
+++ b/tex/context/base/ppchtex.tex
@@ -0,0 +1,3272 @@
+% option=test => boxes
+% dummy => file
+% final => file / local run
+%
+% constante van phantom in definitie ONE: \setchemicaltextwidth 300
+
+%D \module
+%D [ file=ppchtex (m-chemie),
+%D version=1997.03.19,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX),
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten},
+%D suggestions={Tobias Burnus, Dirk Kuypers \& 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.
+
+% Copyright Notice / 1995-1999
+%
+% This module is part of the ConTeXt distribution. This
+% macropackage will be put in the public domain as soon as the
+% source is fully documented.
+%
+% This module is to be used as a whole and may not be adapted
+% without knowledge of the authors. No separate parts may be
+% distributed.
+%
+% Non-commercial (educational) institutions are hereby granted
+% to use this module. Commercial use is only permitted after
+% written permission.
+%
+% Errors can be reported to the authors and will be solved as
+% soon as possible. Suggestions are welcome.
+%
+% copyright : PRAGMA
+% author : Hans Hagen
+% address : Postbox 125
+% 8000 AC Zwolle
+% The Netherlands
+% telephone : 038 4 229 775
+% e-mail : pragma@pi.net
+
+% Deze module ondersteunt het zetten van chemische
+% (structuur)formules. Hoewel de macro' zijn afgestemd op
+% CONTEXT, zijn ze ook buiten deze zetomgeving te gebruiken.
+%
+% Dit is, afgezien van updates, de definitieve versie van
+% PPCHTEX. Gebruikersgemak, eenvoud, flexibiliteit, en
+% snelheid zijn inmiddels redelijk geoptimaliseerd. Dit neemt
+% niet weg dat hier en daar nog verbetering mogelijk is. Dit
+% zal dan ook nog gebeuren.
+%
+% Volgende versies zullen tenminste dezelfde functionaliteit
+% hebben. We houden ons natuurlijk het recht voor de kwaliteit
+% van de output te verbeteren. Daarnaast staan nog op het
+% wensenlijstje:
+%
+% - optimaliseren in termen van proces-tijd
+% - aanpassen naamgeving van interne macro's
+% - toevoegen van functionaliteit
+% - in \x!-vorm omzetten van GIVES, TB enz.
+%
+% De mix tussen engels en nederlands lijkt soms verwarrend.
+% Meestal zijn verborgen macro's engels en zichtbare macro's
+% nederlands. Het gebruik van [ ] en { } sluit aan op andere
+% Context-macro's. Hetzelfde geldt voor instellingen en
+% \start-\stop-constructies.
+%
+% De schijnbaar overbodige \bgroup-\egroup constructie
+% garandeert aansluiting bij de Context-macro's voor het
+% plaatsen van figuren, tabellen en andere floats.
+%
+% Binnen Context worden de macro's geladen met
+% \gebruikextras[chemie]. Daarbij wordt een passende melding
+% getoont. Buiten Context genereren we een melding:
+
+\doifundefined{gebruikextras}
+ {\writestatus{loading}{Context Chemical Macro's / 1996.3.1}}
+
+% Er kan gebruik worden gemaakt van PiCTeX of PStricks. Een
+% van deze pakketten moet van te voren zijn geladen.
+%
+% \input prepictex.tex (i.g.v. LaTeX)
+% \input pictex.tex
+% \input postpictex.tex (i.g.v. LaTeX)
+%
+% of:
+%
+% \input multido.tex
+% \input pstricks.tex
+% \input pst-plot.tex
+%
+% In \CONTEXT\ kan men de modules m-pictex en m-pstricks
+% gebruiken. De eerste module laad of efficiente wijze PiCTeX
+% en de tweede module koppelt het PSTRICKS kleurmechanisme
+% aan dat van \CONTEXT.
+%
+
+% PSTricks: {-\chemicalangle} instead of {*0}, which produces
+% faulty ps code when \chemicalangle=0
+
+\startcommands dutch english german
+
+ gotochemical: naarchemie gotochemical zurchemie
+ setupchemical: stelchemiein setupchemical stellechemieein
+ startchemical: startchemie startchemical startchemie
+ stopchemical: stopchemie stopchemical stopchemie
+ definechemical: definieerchemie definechemical definierechemie
+ chemical: chemie chemical chemie
+ toptext: boventekst toptext textueber
+ bottext: ondertekst bottext textunter
+ midtext: middentekst midtext textmitte
+
+\stopcommands
+
+\doifundefined{fiverm} % In the more recent LaTeX versions
+ {\font\fiverm=cmr5 } % \fiverm is no longer (pre)defined.
+
+\doifdefinedelse{beginpicture} % PiCTeX
+ {\doifdefinedelse{startMPdrawing}
+ {\chardef\chemicaldrawingmode=2 } % MetaPost
+ {\chardef\chemicaldrawingmode=0 }} % raw
+ {\doifdefinedelse{psaxes}
+ {\chardef\chemicaldrawingmode=1 } % PSTricks
+ {\chardef\chemicaldrawingmode=3 }} % unknown
+
+\ifcase\chemicaldrawingmode
+ \writestatus{ppchtex}{using PiCTeX}
+\or
+ \writestatus{ppchtex}{using PSTricks (still experimental)}
+ \writestatus{ppchtex}{automatic sizing not (yet) supported}
+\or
+ \writestatus{ppchtex}{using PiCTeX and MetaPost}
+\else
+ \writestatus{ppchtex}{load PiCTeX (+pre/post) or PSTricks (+pst_plot) first}
+ \bgroup
+ \read16 to \exit
+ \egroup
+ \expandafter\endinput
+\fi
+
+% De onderstaande help-informatie (%I) kan worden opgeroepen
+% in TeXEdit. De daaropvolgende setup-informatie (%S) kan
+% nadat zij is uit deze file is gefilterd met TeXUtil, in
+% handleidingen worden gebruikt. In deze file opgenomen
+% documentatie (%D en %M) kan worden gebruikt voor een
+% technische handleiding. Met %T kunnen templates worden
+% gedefinieerd voor TeXEdit.
+
+%I n=Chemie
+%I c=\stelchemiein,\chemie
+%I
+%I Chemische formules kunnen worden gezet met behulp van de
+%I onderstaande commando's:
+%I
+%I buiten $ en $$ :
+%I
+%I \chemie[segmenten][symbolen]
+%I
+%I \startchemie[instellingen]
+%I \chemie...
+%I \chemie...
+%I \stopchemie
+%I
+%I en binnen $ en $$:
+%I
+%I \chemie{}{}
+%I
+%I Voor tekst, uitleg en voorbeelde verwijzen we vooralsnog
+%I naar de handleiding.
+%P
+%I Het gedrag van de macro's kan worden ingesteld met:
+%I
+%I \stelchemiein[breedte=,hoogte=,links=,rechts=,boven=,
+%I onder=,korps=,schaal=,status=,assenstelsel=,kader=,
+%I variant=,optie=,formaat=,tekstformaat=,resolutie=,
+%I offset=,letter=]
+%I
+%I Structuren kunnen worden voorgedefinieerd met het commando
+%I
+%I \definieerchemie[naam]{\chemie...}
+
+%S \startsetup
+%S \command
+%S [\!stelchemiein]
+%S \type
+%S [\c!vars!]
+%S \variable
+%S [\c!breedte]
+%S [\c!number!,\v!passend]
+%S [0]
+%S \variable
+%S [\c!hoogte]
+%S [\c!number!,\v!passend]
+%S [0]
+%S \variable
+%S [\c!links]
+%S [\c!number!]
+%S [0]
+%S \variable
+%S [\c!rechts]
+%S [\c!number!]
+%S [0]
+%S \variable
+%S [\c!boven]
+%S [\c!number!]
+%S [0]
+%S \variable
+%S [\c!onder]
+%S [\c!number!]
+%S [0]
+%S \variable
+%S [\c!resolutie]
+%S [\c!number!]
+%S [\outputresolution]
+%S \variable
+%S [\c!korps]
+%S [10pt,11pt,12pt]
+%S [\bodyfontsize]
+%S \variable
+%S [\c!schaal]
+%S [\v!klein,\v!middel,\v!groot]
+%S [\v!middel]
+%S \variable
+%S [\c!formaat]
+%S [\v!klein,\v!middel,\v!groot]
+%S [\v!groot]
+%S \variable
+%S [\c!tekstformaat]
+%S [\v!klein,\v!middel,\v!groot]
+%S [\v!groot]
+%S \variable
+%S [\c!status]
+%S [\v!start,\v!stop]
+%S [\v!start]
+%S \variable
+%S [\c!kader]
+%S [\v!aan,\v!uit]
+%S [\v!uit]
+%S \variable
+%S [\c!assenstelsel]
+%S [\v!aan,\v!uit]
+%S [\v!uit]
+%S \variable
+%S [\c!optie]
+%S [\v!test]
+%S []
+%S \variable
+%S [\c!variant]
+%S [1,2]
+%S [1]
+%S \variable
+%S [\c!offset]
+%S [HIGH,LOW]
+%S [LOW]
+%S \variable
+%S [\c!letter]
+%S [\c!command!]
+%S [\rm]
+%S \stopsetup
+
+%S \startsetup
+%S \command
+%S [\v!startchemie]
+%S \type
+%S [\c!vars!\c!stp!]
+%S \inheritvariable
+%S [\v!stelchemiein]
+%S []
+%S \stopsetup
+
+%S \startsetup
+%S \command
+%S [\v!chemie]
+%S \type
+%S [\c!vals!\c!vals!]
+%S \value
+%S [\c!list!]
+%S []
+%S \value
+%S [\c!list!]
+%S []
+%S \stopsetup
+
+%S \startsetup
+%S \command
+%S [definieerchemie]
+%S \type
+%S [\c!val!\c!arg!]
+%S \value
+%S [\c!text!]
+%S []
+%S \stopsetup
+
+\unprotect
+
+% Om te voorkomen dat sub- en superscripts botsen passen we
+% wat fontdimen's aan (Knuth, The TeXBook, p179). Helaas
+% kunnen deze instellingen niet lokaal worden gehouden door
+% groeperen, vandaar dat een en ander moet worden geset ‚n
+% gereset.
+%
+% Er dient een relatie te worden gelegd met de afmetingen
+% van de letters. In een eerdere versie werden daartoe de
+% \fontdimen's opgehoogd. Omdat dit problemen gaf bij
+% scaled fonts, is bij nader inzien gekozen voor de
+% onderstaande oplossing, waarbij de nieuwe waarden worden
+% afgeleid van de x-height (\fontdimen5). De factor 0.70
+% is min of meer experimenteel vastgesteld. Soms worden de
+% regels iets verder uit elkaar gezet. Jammer. Italic fonts
+% hebben grotere cijfers en vallen min of meer uit de boot.
+
+\newif\ifloweredsubscripts
+
+% Due to some upward incompatibality of LaTeX to LaTeX2.09
+% and/or LaTeX2e we had to force \@@chemicalletter. Otherwise
+% some weird \nullfont error comes up.
+
+\def\beginlatexmathmodehack%
+ {\ifmmode
+ \let\endlatexmathmodehack=\relax
+ \else
+ \def\endlatexmathmodehack{$}$\@@chemicalletter
+ \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}
+
+\def\doresetsubscripts%
+ {\resetsubscripts}
+
+\def\sethighsubscripts%
+ {\resetsubscripts
+ \let\dosetsubscripts=\relax}
+
+\def\setlowsubscripts%
+ {\def\dosetsubscripts{\setsubscripts}}
+
+\setlowsubscripts
+
+\newcount\horchemical % t.z.t. \newcounter
+\newcount\verchemical % t.z.t. \newcounter
+\newcount\txtchemical % t.z.t. \newcounter
+\newcount\levchemical % t.z.t. \newcounter
+
+\newif\ifinchemical \inchemicalfalse
+\newif\iffixedchemical \fixedchemicalfalse
+
+\newbox\chemicalsymbols
+
+% Eigenlijk moeten de constanten en variabelen in cont-nl.tex
+% staan. Dit pakket is echter relatief onafhankelijk van CONTEXT.
+
+\definesystemvariable {chemical}
+
+\definesystemconstant {chemical}
+
+\definesystemconstant {translate}
+\definesystemconstant {distance}
+\definesystemconstant {mirror}
+\definesystemconstant {rotate}
+\definesystemconstant {substitute}
+\definesystemconstant {angle}
+
+\definesystemconstant {executechemical}
+\definesystemconstant {chemicaltextelement}
+\definesystemconstant {chemicallinesegment}
+\definesystemconstant {chemicalcircsegment}
+
+\def\chemicalspace {\quad}
+
+% begin van experiment:
+%
+% De onderstaande twee macro's kunnen worden gebruikt voor
+% bijvoorbeeld een interactiemechanisme.
+%
+% \localgotochemical {verwijzing} {tekst}
+% \localthisischemical {verwijzing}
+
+\def\dowithchemical%
+ {}
+
+\doifdefinedelse{@@iastatus}
+ {\def\localgotochemical#1#2{\naarbox{#2}[#1]}%
+ \def\localthisischemical#1{\pagereference[#1]}}
+ {\def\localgotochemical#1{}%
+ \def\localthisischemical#1{}}
+
+% eind van experiment
+
+\def\setchemicalmaximum #1
+ {\def\maxchemical{#1}}
+
+\def\doifchemicalnumber#1#2#3%
+ {\doifnumberelse{#1}
+ {\ifnum#1>\maxchemical
+ \writestatus{ppchtex}{number #1 is skipped}%
+ \else
+ #3%
+ \fi}
+ {\unknownchemical{#2}}}%
+
+\newif\ifsmallchemicaltext
+
+\def\setupchemicalformat[#1]%
+ {\processaction
+ [\getvalue{#1\c!formaat}]
+ [ \v!klein=>\def\@@localchemicalformat%
+ {\scriptscriptstyle},
+ \v!middel=>\def\@@localchemicalformat%
+ {\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi},
+ \v!groot=>\def\@@localchemicalformat
+ {\ifsmallchemicaltext\scriptstyle\else\textstyle\fi},
+ \s!unknown=>\def\@@localchemicalformat%
+ {\getvalue{#1\c!formaat}}]%
+ \processaction
+ [\getvalue{#1\c!tekstformaat}]
+ [ \v!klein=>\def\@@localchemicalstyle%
+ {\scriptscriptstyle},
+ \v!middel=>\def\@@localchemicalstyle%
+ {\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi},
+ \v!groot=>\def\@@localchemicalstyle%
+ {\ifsmallchemicaltext\scriptstyle\else\textstyle\fi},
+ \s!unknown=>\def\@@localchemicalstyle%
+ {\getvalue{#1\c!tekstformaat}}]%
+ \processaction
+ [\getvalue{#1\c!schaal}]
+ [ \v!klein=>\def\@@localchemicalscale{500},
+ \v!middel=>\def\@@localchemicalscale{625},
+ \v!groot=>\def\@@localchemicalscale{750},
+ \s!unknown=>\def\@@localchemicalscale{\getvalue{#1\c!schaal}}]}
+
+\def\@@currentchemicalformat%
+ {\ifinchemical
+ \@@localchemicalformat
+ \else
+ \@@localchemicalstyle
+ \fi}
+
+\def\dosetupchemical[#1]%
+ {\getparameters[\??chemical\s!chemical][#1]%
+ \doifelse{\@@chemicalchemicaloffset}{LOW}
+ {\setlowsubscripts}
+ {\sethighsubscripts}%
+ \setupchemicalformat[\??chemical\s!chemical]}
+
+\def\setupchemical%
+ {\dosingleargument\dosetupchemical}
+
+\def\@@chemicalletter% % $inner-style$
+ {\@@chemicalchemicalletter} % $$outer-style$$
+
+\def\@@writechemicalstatus#1#2%
+ {}
+
+\def\@@beginchemicallocalpicture%
+ {\ifcase\chemicaldrawingmode
+ \beginpicture
+ \or
+ \pspicture(0,0)(0,0) % is this permitted ?
+ \or
+ \pushMPdrawing
+ \startMPdrawing
+ prologues := 1 ;
+ u := 10*\@@chemicalunit;
+ bboxmargin := 0pt ;
+ pickup pencircle scaled 2u ; % ???
+ \stopMPdrawing
+ \beginpicture
+ \fi}
+
+\def\@@endchemicallocalpicture#1#2%
+ {\ifcase\chemicaldrawingmode
+ \endpicture
+ \or
+ \endpspicture
+ \or
+ \resetchemicalcoordinates
+ \setbox2=\hbox{\getMPdrawing}%
+ \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
+ \put {\box2} at 0 0
+ \endpicture
+ \popMPdrawing
+ \fi}
+
+\def\@@beginchemicalpicture#1#2#3#4%
+ {\ifnum\chemicaldrawingmode=1
+ \pspicture(#1,#3)(#2,#4)%
+ \def\account##1##2{}%
+ \psaxes[axesstyle=none,labels=none,ticks=none](#1,#3)(#2,#4)%
+ \else
+ \beginpicture
+ \setplotarea
+ x from {#1} to {#2},
+ y from {#3} to {#4}
+ \iffixedchemical
+ \accountingon
+ \def\account##1##2%
+ {\put {} at {##1} {##2} }%
+ \else
+ \accountingoff
+ \def\account##1##2{}%
+ \fi
+ \fi
+ \ignorespaces}
+
+\def\@@endchemicalpicture%
+ {\ifcase\chemicaldrawingmode
+ \put {\box\chemicalsymbols} at 0 0 % elders
+ \endpicture
+ \or
+ \rput(0,0){\box\chemicalsymbols}%
+ \endpspicture
+ \or
+ \put {\box\chemicalsymbols} at 0 0 % elders
+ \ifMPdrawingdone
+ \resetchemicalcoordinates
+ \setbox2=\hbox{\getMPdrawing}%
+ \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
+ \put {\box2} at 0 0 %
+ \fi
+ \endpicture
+ \fi}
+
+\def\@@setchemicalcoordinatesystem#1%
+ {\edef\@@chemicalunit{#1}%
+ \ifcase\chemicaldrawingmode
+ \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
+ \or
+ \psset{unit=\@@chemicalunit}%
+ \or
+ \setcoordinatesystem units <\@@chemicalunit,\@@chemicalunit> %
+ \startMPdrawing
+ prologues := 1 ;
+ u := 10*#1;
+ bboxmargin := 0pt ;
+ pickup pencircle scaled 2u ; % ???
+ \stopMPdrawing
+ \fi}
+
+\def\@@setchemicalaxis#1#2#3#4%
+ {\ifcase\chemicaldrawingmode
+ \axis
+ bottom shiftedto y=0
+ ticks from {#1} to {#2} by 500 /
+ \axis
+ left shiftedto x=0
+ ticks from {#3} to {#4} by 500 / %
+ \or
+ \psaxes[labels=none,Dx=500,Dy=500](0,0)(#1,#3)(#2,#4)%
+ \or
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x1 := \MPdivten[#1]u ; x2 := \MPdivten[#2]u;
+ y1 := \MPdivten[#3]u ; y2 := \MPdivten[#4]u;
+ draw z1--(x2,y1)--z2--(x1,y2)--cycle ;
+ d := 50u ; dd := 10u ;
+ draw (x1,0)--(x2,0) ;
+ draw (0,y1)--(0,y2) ;
+ for i=d step -d until x1: draw (i,dd)--(i,-dd) ; endfor ;
+ for i=d step d until x2: draw (i,dd)--(i,-dd) ; endfor ;
+ for i=d step -d until y1: draw (-dd,i)--(dd,i) ; endfor ;
+ for i=d step d until y2: draw (-dd,i)--(dd,i) ; endfor ;
+ \stopMPdrawing
+ \fi}
+
+\def\@@setsecondchemicalplotsymbol%
+ {\ifcase\chemicaldrawingmode
+ \!!widtha=50.8mm
+ \divide\!!widtha by \@@chemicalresolutie\relax
+ \plotsymbolspacing=\!!widtha
+ \setplotsymbol({\vrule\!!height\!!widtha\!!width\!!widtha})%
+ \fi}
+
+% Something for Dirk:
+
+\newcount \currentchemical
+
+%\newif \ifskipchemical
+%
+\def\setchemicaldimensions#1#2#3%
+ {\bgroup
+ \global\advance\currentchemical by 1
+ \dimen0=#1\relax
+ \dimen2=#2\relax
+ \dimen4=#3\relax
+ \setxvalue{chemical::\the\currentchemical}%
+ {\noexpand\docommando{\the\dimen0}{\the\dimen2}{\the\dimen4}}%
+ \egroup}
+%
+%\def\getchemicaldimensions#1#2#3%
+% {\global\advance\currentchemical by 1
+% \def\docommando##1##2##3%
+% {#1=##1\relax#2=##2\relax#3=##3\relax}%
+% \doifdefinedelse{chemical::\the\currentchemical}
+% {\getvalue{chemical::\the\currentchemical}}
+% {\docommando{6cm}{4cm}{0cm}}}
+%
+%\def\savechemicaldimensions%
+% {\bgroup
+% \writestatus{ppchtex}{saving dimensions in ppchtex.dim}%
+% \def\docommando##1##2##3%
+% {\immediate\write\scratchwrite
+% {\noexpand\setchemicaldimensions{##1}{##2}{##3}}}%
+% \immediate\openout\scratchwrite=ppchtex.dim
+% \scratchcounter=0
+% \loop
+% \ifnum\scratchcounter<\currentchemical
+% \advance\scratchcounter by 1
+% \getvalue{chemical::\the\scratchcounter}%
+% \repeat
+% \immediate\closeout\scratchwrite
+% \egroup}
+%
+%\def\loadchemicaldimensions% oh, how nice it would be to use
+% {\bgroup % one of the context read commands
+% \global\currentchemical=0
+% \immediate\openin\scratchread=./ppchtex.dim
+% \ifeof\scratchread
+% \immediate\closein\scratchread
+% \global\skipchemicalfalse
+% \else
+% \immediate\closein\scratchread
+% \input ./ppchtex.dim\relax
+% \ifnum\currentchemical>0
+% \writestatus{ppchtex}{loading dimensions from ppchtex.dim}%
+% \global\skipchemicaltrue
+% \else
+% \global\skipchemicalfalse
+% \fi
+% \global\currentchemical=0
+% \global\let\savechemicaldimensions=\relax
+% \fi
+% \egroup
+% \global\let\loadchemicaldimensions=\relax}
+
+\ifx\normalchemicalframe\undefined
+ \let\normalchemicalframe\hbox % hook for educational purposes
+\fi
+
+\unexpanded\def\complexstartchemical[#1]%
+ {\copyparameters
+ [\??chemical][\??chemical\s!chemical]
+ [\c!breedte,\c!hoogte,\c!links,\c!rechts,\c!boven,\c!onder,
+ \c!korps,\c!formaat,\c!schaal,\c!status,\c!kader,\c!assenstelsel,
+ \c!plaats,\c!optie,\c!variant,\c!resolutie,\c!offset,\c!letter]%
+ \getparameters
+ [\??chemical]
+ [#1]%
+ %
+ \setupchemicalformat[\??chemical]%
+ %
+ \ifnum\chemicaldrawingmode=2
+ \resetMPdrawing
+ \fi
+ %
+ \doif{\@@chemicalvariant}{2}
+ {\@@setsecondchemicalplotsymbol}%
+ %
+ \!!counta=250000
+ \divide\!!counta by \@@localchemicalscale
+ \!!widtha=\@@chemicalkorps
+ \divide\!!widtha by \!!counta
+ \@@setchemicalcoordinatesystem{\the\!!widtha}%
+ %
+ % \!!counta = -x \!!countc = -y
+ % \!!countb = +x \!!countd = +y
+ %
+ \def\calculateaxis##1##2##3##4##5%
+ {##1=##3\relax
+ ##2=##4\relax
+ \ifnum##5=0
+ \ifnum##3=0
+ \ifnum##4=0
+ ##1=2000
+ ##2=2000
+ \fi
+ \fi
+ \else
+ \ifnum##3=0
+ \ifnum##4=0
+ ##1=##5\relax
+ \divide##1 by 2
+ ##2=##1\relax
+ \else
+ ##1=##5\relax
+ \advance##1 by -##2\relax
+ \fi
+ \else
+ \ifnum##4=0
+ ##2=##5\relax
+ \advance##2 by -##1\relax
+ \fi
+ \fi
+ \fi}%
+ \fixedchemicalfalse
+ \doif{\@@chemicalbreedte}{\v!passend}
+ {\edef\@@chemicalbreedte%
+ {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
+ \fixedchemicaltrue}%
+ \doif{\@@chemicalhoogte}{\v!passend}
+ {\edef\@@chemicalhoogte%
+ {\ifnum\chemicaldrawingmode=1 2000 \else 1 \fi}%
+ \fixedchemicaltrue}%
+ \doifelse{\@@chemicalplaats}{\v!intekst}
+ {\!!counta=0 \!!countb=0
+ \!!counta=0 \!!countd=0 }
+ {\calculateaxis
+ {\!!counta}{\!!countb}
+ {\@@chemicallinks}{\@@chemicalrechts}{\@@chemicalbreedte}%
+ \calculateaxis
+ {\!!countc}{\!!countd}
+ {\@@chemicalonder}{\@@chemicalboven}{\@@chemicalhoogte}}%
+ %
+ \edef\@@chemheight {\the\!!countc}%
+ \edef\@@chemdepth {\the\!!countd}%
+ \edef\@@chemicalboven{\the\!!countc}%
+ \edef\@@chemicalonder{\the\!!countd}%
+ %
+ \doifinsetelse{\v!aan}{\@@chemicalkader,\@@chemicalassenstelsel}
+ {\def\@@chemicalborder{\chemicalframe}}
+ {\def\@@chemicalborder{\normalchemicalframe}}%
+ %
+ \setbox0=\hbox\bgroup % this was a \vbox which took \hsize
+ %
+ \@@beginchemicalpicture
+ {-\the\!!counta}{\the\!!countb}
+ {-\the\!!countc}{\the\!!countd}%
+ \doif{\@@chemicalstatus}{\v!start}
+ {\doif{\@@chemicalassenstelsel}{\v!aan}
+ {\@@setchemicalaxis
+ {-\the\!!counta}{\the\!!countb}
+ {-\the\!!countc}{\the\!!countd}}}%
+ \doifelse{\@@chemicaloptie}{\v!test}
+ {\def\@@writechemicalstatus##1##2%
+ {\convertargument##2\to\ascii
+ \writestatus{##1}{\ascii}}}
+ {\def\@@writechemicalstatus##1##2{}}%
+ \ignorespaces}
+
+\def\dostartchemical%
+ {\catcode`\^=\@@superscript% t.b.v. \enableduplication
+ \catcode`\_=\@@subscript % t.b.v. de zekerheid
+ \begingroup
+ \inchemicaltrue
+ \def\toptext##1{\gdef\thetoptext{##1}\ignorespaces}\toptext{}%
+ \def\bottext##1{\gdef\thebottext{##1}\ignorespaces}\bottext{}%
+ \def\midtext##1{\gdef\themidtext{##1}\ignorespaces}\midtext{}%
+ \def\@@chemicalpostponed{}%
+ \complexorsimpleempty\startchemical}
+
+\def\startchemical%
+ {\bgroup % t.b.v. ungrouped floats
+% \loadchemicaldimensions
+% \ifskipchemical
+% \def\dostartchemical%
+% {\def\dummy[####1]{}\dosingleempty\dummy}%
+% \def\chemical%
+% {\def\dummy[####1][####2][####3]{}\dotripleempty\dummy}%
+% \def\toptext##1{}%
+% \def\midtext##1{}%
+% \def\bottext##1{}%
+% \fi
+ \dostartchemical}
+
+\def\stopchemical%
+ {%\ifskipchemical
+ % \getchemicaldimensions{\dimen0}{\dimen2}{\dimen4}%
+ % \dimen8=\dimen2\advance\dimen8 by \dimen4
+ % \setbox0=\vbox to \dimen8
+ % {\vss\hbox to \dimen0{\hss\the\currentchemical\hss}\vss}%
+ % \wd0=\dimen0\ht0=\dimen2\dp0=\dimen4
+ % \chemicalframe{\box0}%
+ %\else
+ \checkchemicalpicture
+ \@@endchemicalpicture
+ \egroup
+ \ifnum\chemicaldrawingmode=1
+ \dimen0=\@@chemicalunit
+ \setbox0=\hbox{\lower\@@chemdepth\dimen0\box0}%
+ \ht0=\@@chemheight\dimen0
+ \dp0=\@@chemdepth\dimen0
+ \fi
+ \dimen0=\ht0
+ \advance\dimen0 by \dp0
+ \inchemicalfalse % enables \chemie{} in text
+ \setbox4=\alignedchemical\themidtext
+ \setbox6=\alignedchemical\thetoptext
+ \setbox8=\alignedchemical\thebottext
+ \setbox4=\hbox to \wd0
+ {\strut\hss$\vcenter{\box4}$\hss}%
+ \setbox2=\vbox to \dimen0
+ {\hbox to \wd0{\strut\hss\box6\hss}
+ \vfill
+ \hbox to \wd0{\strut\hss\box8\hss}
+ \vss}% disables the depth
+ \wd0=0pt \wd4=0pt
+ \ht2=\ht0 \dp2=\dp0
+ \ht4=\ht0 \dp4=\dp0
+ %\setchemicaldimensions{\wd2}{\ht2}{\dp2}%
+ \@@chemicalborder{\box0\box4\box2}% text on top of chemicals
+ \endgroup
+ %\fi
+ \ignorespaces
+ \egroup} % t.b.v. ungrouped floats
+
+\def\alignedchemical#1%
+ {\vtop
+ {\def\par{\egroup\hbox\bgroup\strut}%
+ \let\\=\par
+ \let\endgraf=\par
+ \hbox\bgroup\strut#1\egroup}}
+
+% \setchemicalcoordinates{#1}{#2}
+%
+% #1: verplaatsing in x-richting
+% #2: verplaatsing in y-richting
+
+\newif\ifchemicaldirection
+
+\def\checkchemicaldirection#1#2%
+ {\ifchemicaldirection
+ % \ifnum#1>0 \advance\horchemical by +\chemicaldirection \fi
+ % \ifnum#1<0 \advance\horchemical by -\chemicaldirection \fi
+ % \ifnum#2>0 \advance\verchemical by +\chemicaldirection \fi
+ % \ifnum#2<0 \advance\verchemical by -\chemicaldirection \fi
+ \ifnum#1>0 \advance\horchemical by -\chemicaldirection \fi
+ \ifnum#1<0 \advance\horchemical by +\chemicaldirection \fi
+ \ifnum#2>0 \advance\verchemical by -\chemicaldirection \fi
+ \ifnum#2<0 \advance\verchemical by +\chemicaldirection \fi
+ \chemicaldirectionfalse
+ \fi}
+
+\def\processchemicaldirection%
+ {\chemicaldirectiontrue\processchemicaltranslate}
+
+\def\setchemicalcoordinates#1#2%
+ {\advance\horchemical by #1\relax
+ \advance\verchemical by #2\relax
+ \checkchemicaldirection{#1}{#2}%
+ \!!counta=-\horchemical\edef\chemicalxoffset{\the\!!counta}%
+ \!!countb=-\verchemical\edef\chemicalyoffset{\the\!!countb}%
+ \ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
+ \fi}
+
+\def\resetchemicalcoordinates%
+ {\horchemical=0
+ \verchemical=0
+ \edef\chemicalxoffset{0}%
+ \edef\chemicalyoffset{0}%
+ \ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \setcoordinatesystem point at 0 0
+ \fi}
+
+\def\restorechemicalcoordinates%
+ {%\writestatus{ppchtex}{restoring \the\horchemical,\the\verchemical}%
+ \edef\chemicalxoffset{\the\horchemical}%
+ \edef\chemicalyoffset{\the\verchemical}%
+ \ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \setcoordinatesystem point at {\the\horchemical} {\the\verchemical}
+ \fi}
+
+\def\setchemicaltranslate #1 #2 #3
+ {\setvalue{\s!translate#1}{\setchemicalcoordinates{#2}{#3}}}
+
+\def\processchemicaltranslate#1%
+ {\def\doprocess[##1##2]%
+ {\doifchemicalnumber{##1}{MOV#1}
+ {\ifnum##1=0
+ \def\chemicaloffset{0}% incompatible change
+ \resetchemicalcoordinates
+ \else
+ \getvalue{\s!translate##1}%
+ \dochemicaloffset{##1}%
+ \def\chemicaloffset{0}%
+ \fi}}%
+ \doprocess[#1]}
+
+\def\setchemicaldistance #1
+ {\setvalue{\s!distance1}{\setchemicalcoordinates{-#1}{ 0}}%
+ \setvalue{\s!distance2}{\setchemicalcoordinates{ 0}{ #1}}%
+ \setvalue{\s!distance3}{\setchemicalcoordinates{ #1}{ 0}}%
+ \setvalue{\s!distance4}{\setchemicalcoordinates{ 0}{-#1}}}
+
+\def\setchemicaldirection #1
+ {\def\chemicaldirection{#1}}
+
+\def\processchemicaldistance#1%
+ {\def\doprocess[##1##2]%
+ {\doifchemicalnumber{##1}{ADJ#1}
+ {\ifnum##1=0
+ \resetchemicalcoordinates
+ \else
+ \def\@@chemicalpostponed{\getvalue{\s!distance##1}}%
+ \@@chemicalpostponed
+ \fi}}%
+ \doprocess[#1]}
+
+\def\setchemicalsubstitute #1
+ {\setvalue{\s!substitute1}{\setchemicalcoordinates{-#1}{ 0}}%
+ \setvalue{\s!substitute2}{\setchemicalcoordinates{ 0}{ #1}}%
+ \setvalue{\s!substitute3}{\setchemicalcoordinates{ #1}{ 0}}%
+ \setvalue{\s!substitute4}{\setchemicalcoordinates{ 0}{-#1}}}
+
+\def\processchemicalsubstitute#1%
+ {\def\doprocess[##1##2]%
+ {\doifchemicalnumber{##1}{SUB#1}
+ {\ifnum##1=0
+ \resetchemicalcoordinates
+ \else
+ \def\@@chemicalpostponed{\getvalue{\s!substitute##1}}%
+ \@@chemicalpostponed
+ \fi}}%
+ \doprocess[#1]}
+
+% Het is mogelijk een offset of move meerdere malen uit te
+% voeren, door een nummer voor het commando te plaatsen.
+
+\def\chemicalrepeat {1}
+
+\def\redoprocesschemical[#1#2]%
+ {\doifinstringelse{#1}{0123456789.}
+ {\edef\chemicalrepeat{\chemicalrepeat#1}%
+ \redoprocesschemical[#2]}
+ {\processchemical[#1#2]%
+ \def\chemicalrepeat{1}}}
+
+\def\doprocesschemical[#1#2]#3%
+ {\doifinstringelse{#1}{0123456789.}
+ {\def\chemicalrepeat{#1}%
+ \redoprocesschemical[#2]}
+ {#3}}
+
+% \dochemicaloffset{#1}
+%
+% #1: binding
+
+\def\chemicaloffset{0}
+
+\def\processchemicaloffset#1%
+ {\dimen0=62500 sp % real calc on cardinals
+ \dimen0=\chemicalrepeat\dimen0
+ \divide\dimen0 by \@@localchemicalscale
+ \!!counta=\dimen0
+ \def\doprocess[##1##2]%
+ {\doifinstringelse{##1}{128}
+ {\edef\chemicaloffset{\the\!!counta}}
+ {\doifinstringelse{##1}{456}
+ {\edef\chemicaloffset{-\the\!!counta}}
+ {\doifelse{##1}{0}
+ {\edef\chemicaloffset{0}}
+ {\unknownchemical{OFF#1}}}}}%
+ \doprocess[#1]}
+
+\def\dochemicaloffset#1%
+ {\ifnum\chemicaloffset=0
+ \def\undochemicaloffset{}%
+ \else
+ \setchemicalcoordinates{-\chemicaloffset}{0}%
+ \def\undochemicaloffset%
+ {\setchemicalcoordinates{\chemicaloffset}{0}%
+ \def\undochemicaloffset{}}%
+ \fi}
+
+\def\processchemicalphantom#1#2%
+ {\setbox0=\hbox
+ {\def\splitoff##1????{##1}%
+ $\@@chemicalletter{\@@localchemicalformat\splitoff#2}$}%
+ \dimen0=.25\wd0
+ \divide\dimen0 by \@@localchemicalscale
+ \!!counta=\dimen0
+ \doifinstringelse{#1}{128}
+ {\edef\chemicaloffset{\the\!!counta}}
+ {\doifinstringelse{#1}{456}
+ {\edef\chemicaloffset{-\the\!!counta}}
+ {\doifelse{#1}{0}
+ {\edef\chemicaloffset{0}}
+ {\unknownchemical{OF#1:#2}}}}}
+
+% \dosetchemicalrotation{#1}{#2}
+%
+% #1: cos(phi)
+% #2: sin(phi)
+
+\def\chemicalrotation {1}
+\def\chemicalangle {0}
+\def\chemicalxoffset {0}
+\def\chemicalyoffset {0}
+
+\def\setchemicalmirror#1%
+ {\setvalue{\s!mirror#1}{*}}
+
+\def\resetchemicalmirror#1%
+ {\resetvalue{\s!mirror#1}}
+
+\def\togglechemicalmirror#1%
+ {\doifelse{\getvalue{\s!mirror#1}}{*}
+ {\resetchemicalmirror{#1}}
+ {\setchemicalmirror{#1}}}
+
+\def\setchemicalrotation #1 #2 #3 #4 #5 #6 #7 #8 #9
+ {\setvalue{\s!rotate1.#1}{\dosetchemicalrotation{#2}{#3}}%
+ \setvalue{\s!rotate2.#1}{\dosetchemicalrotation{#4}{#5}}%
+ \setvalue{\s!rotate3.#1}{\dosetchemicalrotation{#6}{#7}}%
+ \setvalue{\s!rotate4.#1}{\dosetchemicalrotation{#8}{#9}}}
+
+\def\setchemicalangle #1 #2 #3 #4 #5
+ {\setvalue{\s!angle1.#1}{\dosetchemicalangle{#2}}%
+ \setvalue{\s!angle2.#1}{\dosetchemicalangle{#3}}%
+ \setvalue{\s!angle3.#1}{\dosetchemicalangle{#4}}%
+ \setvalue{\s!angle4.#1}{\dosetchemicalangle{#5}}}
+
+\def\chemicalrotate[#1]%
+ {\doifdefinedelse{\s!mirror#1}
+ {\getvalue{\s!rotate\chemicalrotation.#1\getvalue{\s!mirror#1}}%
+ \getvalue{\s!angle\chemicalrotation.#1\getvalue{\s!mirror#1}}}
+ {\getvalue{\s!rotate\chemicalrotation.#1}%
+ \getvalue{\s!angle\chemicalrotation.#1}}}
+
+\def\dosetchemicalangle#1% zwak zie onder
+ {\def\chemicalangle{#1}}
+
+\def\dosetchemicalrotation#1#2%
+ {\ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \startrotation by {#1} {#2} %% \stoprotation (t.b.v. testen)
+ \fi}
+
+\def\doresetchemicalrotation%
+ {\ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \stoprotation
+ \fi}
+
+\def\processchemicalrotation#1%
+ {\def\doprocess[##1##2]%
+ {\doifnumberelse{##1}
+ {\def\chemicalrotation{##1}}
+ {\unknownchemical{ROT#1}}}%
+ \doprocess[#1]}
+
+% \filtertextelement[#1][#2][#3][#4]
+%
+% #1: volgnummer
+% #2: offset in uitlijningen
+% #3: lijst met uitlijningen -> \chemicalloca
+% #4: lijst met teksten -> \chemicaltext
+
+\def\setchemicallocation#1%
+ {\doifelse{#1}{}
+ {\edef\chemicalloca{c}}
+ {\edef\chemicalloca{#1}}}
+
+\newif\iffixedchemicaltext
+
+\def\filterchemicaltextelement[#1][#2][#3][#4]%
+ {\ifchemicaltextconstant
+ \def\chemicaltext{#4}%
+ \setchemicallocation{}%
+ \else
+ \ifnum#1=0\relax
+ \setchemicallocation{}%
+ \else
+ \iffixedchemicaltext
+ \!!counta=#2
+ \else
+ \!!counta=\chemicalrotation
+ \advance\!!counta by -1
+ \multiply\!!counta by #2
+ \advance\!!counta by #1
+ \fi
+ \getfromcommalist[#3][\the\!!counta]%
+ \setchemicallocation\commalistelement
+ \fi
+ \ifchemicalpicture
+ \let\chemicaltext=\relax
+ \else
+ \advance\txtchemical by 1
+ \getfromcommalist[#4][\txtchemical]%
+ \let\chemicaltext=\commalistelement
+ \fi
+ \fi
+ \fixedchemicaltextfalse}
+
+% \putchemicaltext{#1}{#2}
+%
+% #1 : x-coordinaat
+% #2 : y-coordinaat
+%
+% \chemicaltext en \chemicalloca worden met \gettextelement
+% opgehaald uit de tweede set bij \chemie
+%
+% Ten behoeve van testdoeleinden wordt gebruik gemaakt van
+% \chemicalframe in plaats van het meer sjieke, maar tevens
+% meer trage \framed.
+
+\ifx\ruledhbox\undefined
+ \def\chemicalframe#1%
+ {\hbox
+ {\vrule\hskip-.4pt
+ \vbox{\hrule\vskip-.4pt\hbox{#1}\vskip-.4pt\hrule}%
+ \hskip-.4pt\vrule}}
+\else
+ \def\chemicalframe#1%
+ {\ruledhbox{#1}}
+\fi
+
+\def\doputchemicaltext#1 [#2] at #3 #4 %
+ {\ifnum\chemicaldrawingmode=1
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\expanded{\rput[#2]{-\chemicalangle}(#3,#4){#1}}}%
+ \else
+ \put {#1} [#2] at {#3} {#4} %
+ \fi}
+
+\def\dodoifsinglelocation#1#2\\#3%
+ {\ifx#2\relax#3\fi}
+
+\def\doifsinglelocationelse#1%
+ {\expandafter\dodoifsinglelocationelse#1\relax\\}
+
+\def\putchemicaltext#1#2%
+ {\enablechemicalspecials
+ \ifchemicalpicture
+ \setchemicalpicture{#1}{#2}%
+ \else
+ \doifelse{\@@chemicaloptie}{\v!test}
+ {\def\@@chemicalframe{\chemicalframe}}
+ {\def\@@chemicalframe{}}%
+ \dosetsubscripts
+ \setbox2=\hbox{$\@@chemicalletter{\@@localchemicalformat \chemicaltext}$}%
+ \setbox4=\hbox{$\@@chemicalletter{\@@localchemicalformat C_2^2}$}%
+ \setbox6=\hbox{$\@@chemicalletter{\@@localchemicalformat O}$}% or C
+ \doresetsubscripts
+ \doifnot{\@@chemicalplaats}{\v!intekst}
+ {\ht2=\ht4
+ \dp2=\dp4}%
+ \setbox2=\hbox{\@@chemicalframe{\box2}}%
+ \ifdim\wd2>\wd6
+ \doifelse{#1}{0}
+ {\doifnot{#2}{0}{\wd2=\wd6}}
+ {%\doifsinglelocation\chemicalloca
+ {\doifinset{\chemicalloca}{t,b}{\wd2=\wd6}}}% common ?
+ \fi
+ \expanded
+ {\doputchemicaltext
+ {\noexpand\dowithchemical{\copy2}} % per se \copy2 i.p.v. \box2
+ [\chemicalloca] at {#1} {#2} }
+ \nomoreaccounting
+ \fi
+ \disablechemicalspecials}
+
+\def\setchemicaltextelement #1 #2 #3
+ {\setvalue{\s!chemicaltextelement#1}{\putchemicaltext{#2}{#3}}}
+
+\def\getchemicalfixedtextelement%
+ {\fixedchemicaltexttrue
+ \getchemicaltextelement}
+
+\def\getchemicaltextelement[#1][#2][#3][#4][#5]%
+ {\filterchemicaltextelement[#2][#3][#4][#5]%
+ \doifelse{#2}{0}
+ {\dochemicaloffset{#2}% % incompatible change
+ \putchemicaltext{0}{0}%
+ \undochemicaloffset} % incompatible change
+ {\chemicalrotate[#2]%
+ \dochemicaloffset{#2}%
+ \def\chemicaltextelementnumber{#2}%
+ \getvalue{\s!chemicaltextelement#1}%
+ \getvalue{\s!chemicaltextelement#11}%
+ \getvalue{\s!chemicaltextelement#12}%
+ \getvalue{\s!chemicaltextelement#13}%
+ \undochemicaloffset}}
+
+\def\processchemicaltextelement#1#2#3#4#5%
+ {\def\doprocess[##1##2##3##4##5]%
+ {\doifelse{##1}{?}
+ {\doprocess[1..\maxchemical ????]}
+ {\doifchemicalnumber{##1}{#1#2}
+ {\doifelse{##2##3}{..}
+ {\doifchemicalnumber{##4}{#1#2}
+ {\getchemicaltextelement[#1][##1][#4][#5][#3]%
+ \doifnot{##1}{##4}
+ {\!!counta=##1\relax
+ \advance\!!counta by 1
+ \edef\nextsegment{\the\!!counta}%
+ \doprocess[\nextsegment..##4##5]}}}
+ {\getchemicaltextelement[#1][##1][#4][#5][#3]%
+ \doifnot{##2}{?}{\doprocess[##2##3##4##5]}}}}}%
+ \doprocess[#2]%
+ \smallchemicaltextfalse}
+
+\def\processchemicalsmalltextelement%
+ {\smallchemicaltexttrue\processchemicaltextelement}
+
+\def\processchemicalsmalltextconstant%
+ {\smallchemicaltexttrue\processchemicaltextconstant}
+
+\def\processchemicalunrotatedtextelement#1#2#3#4#5#6%
+ {\bgroup
+ \xdef\@@xxx{0}%
+ \xdef\@@yyy{0}%
+ \def\putchemicaltext##1##2%
+ {\xdef\@@xxx{##1}%
+ \xdef\@@yyy{##2}}%
+ \getvalue{\s!chemicaltextelement#1}%
+ \egroup
+ \bgroup
+ \def\doputchemicaltext##1 [##2] at ##3 ##4 %
+ {\ifnum\chemicaldrawingmode=1
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\rput{-\chemicalangle}(\@@xxx,\@@yyy){\expanded{\rput[##2](##3,##4){##1}}}}%
+ \else
+ \put
+ {\stoprotation \setcoordinatesystem point at 0 0
+ \expanded{\put {##1} [##2] at {##3} {##4} }}
+ at {\@@xxx} {\@@yyy}
+ \fi}%
+ \processchemicaltextelement{#2}{#3}{#4}{#5}{#6}%
+ \egroup}
+
+\newif\ifchemicaltextconstant
+
+\def\processchemicaltextconstant#1#2#3#4%
+ {\chemicaltextconstanttrue
+ \let\@@oldchemicalframe=\@@chemicalframe
+ \let\@@chemicalframe=\relax
+ \processchemicaltextelement{#1}{#2}{#3}{#4}{}%
+ \let\@@chemicalframe=\@@oldchemicalframe
+ \chemicaltextconstantfalse}
+
+% \plotchemicalline{#1}{#2}{#3}{#4}
+%
+% #1: x-coordinaat beginpunt
+% #2: y-coordinaat beginpunt
+% #3: x-coordinaat eindpunt
+% #4: y-coordinaat eindpunt
+
+\chardef\chemicallinetype=0
+
+\def\doplotchemicalline%
+ {\!!counte=\!!countc \advance\!!counte by -\!!counta
+ \!!countf=\!!countd \advance\!!countf by -\!!countb
+ \bgroup
+ \ifcase\chemicaldrawingmode
+ \ifcase\chemicallinetype
+ % 0 : normal line
+ \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
+ \or
+ % 1 : normal arrow
+ \arrow <5pt> [.2,.67] from {\!!counta} {\!!countb} to {\!!countc} {\!!countd}
+ \or
+ % 2 : reverse arrow
+ \arrow <5pt> [.2,.67] from {\!!countc} {\!!countd} to {\!!counta} {\!!countb}
+ \or
+ % 3 : unrotated line
+ \put {\stoprotation \setcoordinatesystem point at 0 0
+ \plot 0 0 {\!!counte} {\!!countf} /}
+ [\chemicallineposition] at {\!!counta} {\!!countb}
+ \else
+ % 4 : dashed line
+ \findlength {\plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /}%
+ \setdashesnear <2pt> for <\totalarclength>%
+ \plot {\!!counta} {\!!countb} {\!!countc} {\!!countd} /%
+ \fi
+ \or
+ \ifcase\chemicallinetype
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
+ \or
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psline{->}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
+ \or
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psline{<-}(\!!counta,\!!countb)(\!!countc,\!!countd)}%
+ \or
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\expanded{\rput[\chemicallineposition]{-\chemicalangle}%
+ (\!!counta,\!!countb){\psline(0,0)(\!!counte,\!!countf)}}}%
+ \else
+ \psset{linestyle=dashed}%
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psline(\!!counta,\!!countb)(\!!countc,\!!countd)}%
+ \fi
+ \or
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x0 := \MPdivten[\chemicalxoffset]u ;
+ y0 := \MPdivten[\chemicalyoffset]u ;
+ x1 := \MPdivten[\the\!!counta]u ;
+ y1 := \MPdivten[\the\!!countb]u ;
+ x2 := \MPdivten[\the\!!countc]u ;
+ y2 := \MPdivten[\the\!!countd]u ;
+ x3 := \MPdivten[\the\!!counte]u ;
+ y3 := \MPdivten[\the\!!countf]u ;
+ \ifcase\chemicallinetype
+ % 0 : normal line
+ draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \or
+ % 1 : normal arrow
+ drawarrow ((z1--z2) rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \or
+ % 2 : reverse arrow
+ drawarrow ((z2--z1) rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \or
+ % 3 : unrotated line % nog \chemicalineposition: t/b
+ draw (origin--z3)
+ shifted (z1 rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \else
+ % 4 : dashed line
+ draw ((z1--z2) rotatedaround(origin,-\chemicalangle))
+ shifted z0 dashed evenly ;
+ \fi
+ \stopMPdrawing
+ \fi
+ \egroup
+ \account\!!counta\!!countb
+ \account\!!countc\!!countd}
+
+\def\plotchemicalline#1#2#3#4%
+ {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
+ \doplotchemicalline}
+
+\def\plotchemicalzline#1#2#3#4%
+ {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
+ \ifnum\chemicaldrawingmode=2
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x0 := \MPdivten[\chemicalxoffset]u ;
+ y0 := \MPdivten[\chemicalyoffset]u ;
+ x1 := \MPdivten[\the\!!counta]u ;
+ y1 := \MPdivten[\the\!!countb]u ;
+ x2 := \MPdivten[\the\!!countc]u ;
+ y2 := \MPdivten[\the\!!countd]u ;
+ filldraw ((
+ \ifnum\chemicalangle>180
+ z1--z2
+ \else\ifnum\chemicalangle<90
+ z1--(z2 shifted (-2u,+2u))--(z2 shifted (+2u,-2u))
+ \else\ifnum\chemicalangle=90
+ (z1 shifted (-2u,+2u))--(z1 shifted (+2u,-2u))--
+ (z2 shifted (+2u,+2u))--(z2 shifted (-2u,-2u))
+ \else
+ (z1 shifted (+2u,+2u))--(z1 shifted (-2u,-2u))--z2
+ \fi\fi\fi
+ --cycle) rotatedaround(origin,-\chemicalangle)) shifted z0 ;
+ \stopMPdrawing
+ \else
+ \doplotchemicalline
+ \ifnum\chemicalangle>180 \else
+ \ifnum\chemicalangle=90
+ \advance\!!counta by -20 \advance\!!countc by -20
+ \doplotchemicalline
+ \advance\!!counta by 40 \advance\!!countc by 40
+ \else\ifnum\chemicalangle<90
+ \advance\!!countc by -20 \advance\!!countd by +20
+ \doplotchemicalline
+ \advance\!!countc by +40 \advance\!!countd by -40
+ \else
+ \advance\!!counta by 20 \advance\!!countb by 20
+ \doplotchemicalline
+ \advance\!!counta by -40 \advance\!!countb by -40
+ \fi\fi
+ \fi
+ \doplotchemicalline
+ \fi}
+
+\def\plotchemicaldeltaline#1#2#3#4%
+ {\!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
+ \ifnum\chemicaldrawingmode=2
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x0 := \MPdivten[\chemicalxoffset]u ;
+ y0 := \MPdivten[\chemicalyoffset]u ;
+ x1 := \MPdivten[\the\!!counta]u ;
+ y1 := \MPdivten[\the\!!countb]u ;
+ x2 := \MPdivten[\the\!!countc]u ;
+ y2 := \MPdivten[\the\!!countd]u ;
+ filldraw ((z1--(z2 rotatedaround(z1,5))--(z2 rotatedaround(z1,-5))
+ --cycle) rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \stopMPdrawing
+ \account{#1}{#2}%
+ \account{#3}{#4}%
+ \else
+ \doplotchemicalline
+ \advance\!!countc by 16 \advance\!!countd by -21
+ \doplotchemicalline
+ \advance\!!countc by -4 \advance\!!countd by 7
+ \doplotchemicalline
+ \advance\!!countc by -4 \advance\!!countd by 7
+ \doplotchemicalline
+ \advance\!!countc by -8 \advance\!!countd by 14
+ \doplotchemicalline
+ \advance\!!countc by -4 \advance\!!countd by 7
+ \doplotchemicalline
+ \advance\!!countc by -4 \advance\!!countd by 7
+ \doplotchemicalline
+ \advance\!!countc by -4 \advance\!!countd by 7
+ \doplotchemicalline
+ \fi}
+
+\def\setchemicallinesegment #1 #2 #3 #4 #5
+ {\setvalue{\s!chemicallinesegment#1}{\plotchemicalline{#2}{#3}{#4}{#5}}}
+
+\def\getchemicallinesegment[#1][#2]%
+ {\chemicalrotate[#1]%
+ \dochemicaloffset{#1}%
+ \getvalue{\s!chemicallinesegment#2}%
+ \getvalue{\s!chemicallinesegment#21}%
+ \getvalue{\s!chemicallinesegment#22}%
+ \undochemicaloffset}
+
+\def\getprivatechemicallinesegment[#1][#2]%
+ {\chemicalrotate[#1]%
+ \getvalue{\s!chemicallinesegment#2#1}}
+
+\def\doprocesschemicallinesegment#1#2#3#4#5%
+ {\chardef\chemicallinetype=#1
+ \def\chemicallineposition{#2}%
+ \def\doprocess[##1##2##3##4##5]%
+ {\doifelse{##1}{?}
+ {\doprocess[1..\maxchemical ????]}
+ {\doifchemicalnumber{##1}{#4#5}
+ {\doifelse{##2##3}{..}
+ {\doifchemicalnumber{##4}{#4#5}
+ {#3[##1][#4]%
+ \doifnot{##1}{##4}
+ {\!!counta=##1\relax
+ \advance\!!counta by 1
+ \edef\nextsegment{\the\!!counta}%
+ \doprocess[\nextsegment..##4##5]}}}
+ {#3[##1][#4]%
+ \doifnot{##2}{?}
+ {\doprocess[##2##3##4##5]}}}}}%
+ \doprocess[#5]}
+
+\def\processchemicallinesegment%
+ {\doprocesschemicallinesegment0c\getchemicallinesegment}
+
+\def\processchemicalzlinesegment#1#2%
+ {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
+ \bgroup
+ \def\plotchemicalline{\plotchemicalzline}%
+ \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
+ \egroup}
+
+\def\processchemicaldeltalinesegment#1#2%
+ {%\doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
+ \bgroup
+ \def\plotchemicalline{\plotchemicaldeltaline}%
+ \doprocesschemicallinesegment0c\getchemicallinesegment{#1}{#2}%
+ \egroup}
+
+\def\processprivatechemicallinesegment%
+ {\doprocesschemicallinesegment0c\getprivatechemicallinesegment}
+
+\def\processchemicaldownarrowsegment%
+ {\doprocesschemicallinesegment1c\getchemicallinesegment}
+
+\def\processchemicaluparrowsegment%
+ {\doprocesschemicallinesegment2c\getchemicallinesegment}
+
+\def\processchemicalunrotatedlinesegment#1%
+ {\doprocesschemicallinesegment3{#1}\getchemicallinesegment}
+
+\def\processchemicaldashedlinesegment%
+ {\doprocesschemicallinesegment4c\getchemicallinesegment}
+
+\def\processchemicalopenend#1#2%
+ {\doprocesschemicallinesegment0c\doprocesschemicalopenend{#1}{#2}}
+
+\def\doprocesschemicalopenend[#1][#2]%
+ {\chemicalrotate[#1]%
+ \dochemicaloffset{#1}%
+ \ifcase\chemicaldrawingmode
+ \beginpicture
+ \setquadratic\plot
+ 300 0 400 0
+ 500 0 550 75
+ 600 0 650 -75
+ 700 0 750 75
+ 800 0 850 -75
+ 900 0 950 0
+ 1050 0 /
+ \endpicture
+ \or
+ \rput{\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psline(300,0)(500,0)%
+ \rput(500,0){\psplot[yunit=75,plotstyle=curve]{0}{720}{x sin}}%
+ \psline(950,0)(1050,0)}%
+ \or
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x0 := \MPdivten[\chemicalxoffset]u ;
+ y0 := \MPdivten[\chemicalyoffset]u ;
+ draw
+ (((30.0u,0)--(50.0u,0){up}..(55.0u,7.5u)..
+ (60.0u,0)..(65.0u,-7.5u)..(70.0u,0)..
+ (75.0u,7.5u)..(80.0u,0)..(85.0u,-7.5u)..{up}
+ (90.0u,0)--(105.0u,0)) rotatedaround(origin,-\chemicalangle))
+ shifted z0 ;
+ \stopMPdrawing
+ \fi
+ \undochemicaloffset}
+
+% \plotchemicalcircle{#1}{#2}{#3}{#4}
+%
+% #1: lengte van de boog in graden
+% #2: x-coordinaat eindpunt
+% #3: y-coordinaat eindpunt
+
+\newif\ifchemicaldotted
+
+\def\plotchemicalcircle#1#2#3#4#5#6%
+ {\bgroup
+ \ifcase\chemicaldrawingmode
+ \ifchemicaldotted
+ \findlength{\circulararc {#4} degrees from {#5} {#6} center at {0} {0} }%
+ \divide\totalarclength by 6
+ \def\b{\the\totalarclength}%
+ \divide\totalarclength by 2
+ \def\a{\the\totalarclength}%
+ \setdashpattern <\a,\b,\b,\b,\b,\b,\a>
+ \fi
+ \circulararc {#4} degrees from {#5} {#6} center at {0} {0} %
+ \or
+ \ifchemicaldotted
+ \psset{linestyle=dashed}%
+ \fi
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\psarc(0,0){#3}{#1}{#2}}%
+ \or
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ r := \MPdivten[#3]*2u;
+ x0 := \MPdivten[\chemicalxoffset]u ;
+ y0 := \MPdivten[\chemicalyoffset]u ;
+ draw ((subpath (#1/45,#2/45) of (fullcircle scaled (r)))
+ rotatedaround (origin,\chemicalangle+150))
+ shifted z0 \ifchemicaldotted dashed withdots \fi ;
+ \stopMPdrawing
+ \fi
+ \egroup}
+
+\def\setchemicalcircsegment #1 #2 #3 #4 #5 #6 #7
+ {\setvalue{\s!chemicalcircsegment#1}{\plotchemicalcircle{#2}{#3}{#4}{#5}{#6}{#7}}}
+
+\def\getchemicalcircsegment[#1][#2]%
+ {\chemicalrotate[#1]%
+ \getvalue{\s!chemicalcircsegment#2}}
+
+\def\doprocesschemicalcircsegment#1#2%
+ {\def\doprocess[##1##2##3##4##5]%
+ {\doifelse{##1}{?}
+ {\doprocess[1..\maxchemical ????]}
+ {\doifchemicalnumber{##1}{#1#2}
+ {\doifelse{##2##3}{..}
+ {\doifchemicalnumber{##4}{#1#2}
+ {\getchemicalcircsegment[##1][#1]%
+ \doifnot{##1}{##4}
+ {\!!counta=##1\relax
+ \advance\!!counta by 1
+ \edef\nextsegment{\the\!!counta}%
+ \doprocess[\nextsegment..##4##5]}}}
+ {\getchemicalcircsegment[##1][#1]%
+ \doifnot{##2}{?}
+ {\doprocess[##2##3##4##5]}}}}}%
+ \doprocess[#2]}
+
+\def\processchemicalcircsegment%
+ {\chemicaldottedfalse\doprocesschemicalcircsegment}
+
+\def\processchemicaldottsegment%
+ {\chemicaldottedtrue\doprocesschemicalcircsegment}
+
+\let\endchemicalpicture = \relax
+\let\checkchemicalpicture = \relax
+\let\nomoreaccounting = \relax
+
+\newif\ifchemicalpicture
+
+\def\beginchemicalpicture#1% NO PSTRICKS SUPPORT YET
+ {\checkchemicalpicture
+ \bgroup % DOES NOT HANDLE AUTOWIDTH/HEIGHT
+ \chemicalpicturetrue
+ \processchemical[#1]}
+
+\def\setchemicalpicture#1#2%
+ {\chemicalpicturefalse
+ \def\endchemicalpicture%
+ {\@@endchemicallocalpicture{#1}{#2}%
+ \egroup
+ \ifnum\chemicaldrawingmode=1
+ \rput
+ {\chemicalangle}(\chemicalxoffset,\chemicalyoffset)%
+ {\expanded{\rput[\chemicalloca]{-\chemicalangle}(#1,#2){\box\nextbox}}}%
+ \else
+ \expanded{\put{\box\nextbox}[\chemicalloca] at {#1} {#2} }
+ \fi
+ \egroup}%
+ \def\checkchemicalpicture%
+ {\ifx\endchemicalpicture\relax \else
+ \writestatus{ppchtex}{missing end of picture (PE)}%
+ \endchemicalpicture
+ \fi}%
+ \setbox\nextbox=\hbox\bgroup
+ \@@beginchemicallocalpicture
+ % alternatief: gewoon accounting, en zelf l,r afhandelen
+ \ifnum\chemicaldrawingmode=1
+ % njet
+ \else
+ \accountingon
+ \let\nomoreaccounting=\accountingoff
+ \fi}
+
+\def\doskipchemical[#1][#2]%
+ {{\tt[ppchtex]}}
+
+\def\skipchemical%
+ {\dodoubleargument\doskipchemical}
+
+\def\complexchemical% met \expandafter
+ {\ifinchemical
+ \expandafter\dochemical
+ \else
+ \writestatus{ppchtex}{the [][]-alternative is not permitted here}%
+ \expandafter\skipchemical
+ \fi}
+
+\newif\ifinnerchemical
+
+\def\dosimplechemical#1#2#3%
+ {\doifdefinedelse{\??chemical\c!plaats}
+ {\writestatus{ppchtex}{the {}{}-alternative is not permitted here}}
+ {\ifinnerchemical
+ \let\chemicalsign = \chemicalinnersign
+ \let\chemicalmolecule = \chemicalinnermolecule
+ \let\chemicalsinglearrow = \chemicalsingleinnerarrow
+ \let\chemicaldoublearrow = \chemicaldoubleinnerarrow
+ \let\chemicaltwintiparrow = \chemicaltwintipinnerarrow
+ \else
+ \let\chemicalsign = \chemicaloutersign
+ \let\chemicalmolecule = \chemicaloutermolecule
+ \let\chemicalsinglearrow = \chemicalsingleouterarrow
+ \let\chemicaldoublearrow = \chemicaldoubleouterarrow
+ \let\chemicaltwintiparrow = \chemicaltwintipouterarrow
+ \fi
+ \disablechemicalspecials
+ \unexpandedprocessallactionsinset
+ [#1]
+ [ HIGH=>\sethighsubscripts,
+ LOW=>\setlowsubscripts,
+ PLUS=>\chemicalsign{+},
+ GIVES=>\chemicalsinglearrow{#2}{#3},
+ EQUILIBRIUM=>\chemicaldoublearrow{#2}{#3},
+ MESOMERIC=>\chemicaltwintiparrow{#2}{#3},
+ SINGLE=>\singlechemicalbond,
+ DOUBLE=>\doublechemicalbond,
+ TRIPLE=>\triplechemicalbond,
+ +=>\chemicalsign{+},
+ ->=>\chemicalsinglearrow{#2}{#3},
+ <->=>\chemicaldoublearrow{#2}{#3},
+ <>=>\chemicaltwintiparrow{#2}{#3},
+ -=>\singlechemicalbond,
+ --=>\doublechemicalbond,
+ ---=>\triplechemicalbond,
+ \s!unknown=>\enablechemicalspecials
+ \chemicalmolecule{\commalistelement}{#2}{#3}]}}
+
+%\def\dosimplechemicalA#1#2#3%
+% {\let\chemicalspace=\relax
+% \def\dodosimplechemical##1%
+% {\dosimplechemical{##1}{}{}}%
+% \@EA\processcommalist\@EA[\@@chemicalchemicaloffset,#1]\dodosimplechemical
+% \egroup}
+
+\def\dosimplechemicalA#1#2#3% % evt: {#1,\relax}
+ {\let\chemicalspace=\relax
+ \@EA\dosimplechemical\@EA{\@@chemicalchemicaloffset,#1}{#2}{#3}%
+ \egroup}
+
+\def\dosimplechemicalB#1#2#3%
+ {\dosimplechemical{#1}{#2}{#3}%
+ \egroup}
+
+\def\dosimplechemicalC#1#2#3%
+ {$\simplechemical{#1}{#2}{#3}$%
+ \egroup} % erbij
+
+\def\simplechemical%
+ {\ifinner
+ \innerchemicaltrue
+ \else
+ \innerchemicalfalse
+ \fi
+ \bgroup
+ \catcode`\^=\@@superscript % t.b.v. \enableduplication
+ \catcode`\_=\@@subscript % t.b.v. de zekerheid
+ \ifmmode
+ \ifinnerchemical
+ \def\next{\dotriplegroupempty\dosimplechemicalA}%
+ \else
+ \def\next{\dotriplegroupempty\dosimplechemicalB}%
+ \fi
+ \else
+ \def\next{\dotriplegroupempty\dosimplechemicalC}%
+ \fi
+ \next}
+
+\definecomplexorsimple\chemical
+
+\def\dogotochemical#1#2%
+ {\def\dowithchemical% % experiment
+ {\localgotochemical{#1}}% % experiment
+ \chemical} % experiment
+
+\def\gotochemical% % experiment
+ {\dosingleargument\dogotochemical} % experiment
+
+\def\dododochemical#1[#2][#3]% % experiment
+ {\def\simpledododochemical% % experiment
+ {#1[#2][#3]}% % experiment
+ \def\complexdododochemical[##1]% % experiment
+ {\def\dowithchemical% % experiment
+ {\localthisischemical{#2}}% % experiment
+ #1[#3][##1]}% % experiment
+ \complexorsimple\dododochemical} % experiment
+
+\def\dodochemical[#1][#2]%
+ {\ignorespaces
+ \ifinchemical
+ \drawchemical[#1][#2]%
+ \ignorespaces
+ \else
+ \startchemical[\c!plaats=\v!intekst]%
+ \drawchemical[#1][#2]%
+ \expandafter\stopchemical
+ \fi
+ \ignorespaces}
+
+\def\dochemical[#1]%
+ {\def\simpledochemical%
+ {\@@writechemicalstatus{ppchtex}{[#1][]}%
+ \dodochemical[#1][]}%
+ %
+ \def\complexdochemical[##1]%
+ {\@@writechemicalstatus{ppchtex}{[#1][##1]}%
+ \txtchemical=0%
+ \dodochemical[#1][##1]}%
+ %
+ \def\complexdochemical[##1]% % experiment
+ {\@@writechemicalstatus{ppchtex}{[#1][##1]}% % experiment
+ \txtchemical=0% % experiment
+ \dododochemical\dodochemical[#1][##1]}% % experiment
+ %
+ \complexorsimple\dochemical}
+
+% \processlocalchemicals{#1}
+%
+% #1: commando's
+
+\def\dodoprocesschemical#1%
+ {\processchemical[#1????]}
+
+\def\processlocalchemicals#1%
+ {\processcommalist[#1]\dodoprocesschemical}
+
+% \drawchemical[#1][#2]
+%
+% #1: bindingen enz.
+% #2: atomen enz.
+
+\def\localdodochemical[#1][#2]%
+ {\@@writechemicalstatus{ppchtex}{[#1][#2]}%
+ %\bgroup % koppelen en afmetingen gaat fout, vandaar:
+ \advance\levchemical by 1
+ \letvalue{\??chemical\s!unknown\the\levchemical}\unknownchemical
+ \setevalue{\??chemical\c!tekst\the\levchemical}{\the\txtchemical}%
+ \txtchemical=0
+ \dodochemical[#1][#2]%
+ \@EA\txtchemical\@EA\csname\??chemical\c!tekst\the\levchemical\endcsname
+ \@EA\let\@EA\unknownchemical\csname\??chemical\s!unknown\the\levchemical\endcsname
+ \advance\levchemical by -1
+ %\egroup
+ \ignorespaces}
+
+\def\drawchemical[#1][#2]%
+ {\ignorespaces
+ \def\dodochemical[##1][##2]%
+ {\drawchemical[##1][##2]%
+ \ignorespaces}%
+ \def\dochemical[##1]%
+ {\def\simpledochemical%
+ {\@@writechemicalstatus{ppchtex}{[##1][#2]}%
+ \dodochemical[##1][#2]%
+ \ignorespaces}%
+ \def\complexdochemical[####1]%
+ {\dododochemical\localdodochemical[##1][####1,#2]}%
+ \complexorsimple\dochemical}%
+ \doif{\@@chemicalstatus}{\v!start}
+ {\doifelse{\chemicalname}{\s!unknown}
+ {\getvalue{\s!executechemical\defaultchemical}[#2]}
+ {\getvalue{\s!executechemical\chemicalname}[#2]}%
+ \def\unknownchemical##1%
+ {\processunknownchemical[##1][#2]}%
+ \processcommalist[\@@chemicaloffset,#1]\dodoprocesschemical}%
+ \ignorespaces}
+
+\def\chemicaloxidation#1#2#3%
+ {\chemicaltop
+ {\ifnum#20=0
+ 0%
+ \else
+ #1\expandafter\uppercase\expandafter{\romannumeral#2}%
+ \fi}
+ {#3}}
+
+\def\chemicaltfraction{\ifinchemical.60\else.8\fi}
+\def\chemicalbfraction{\ifinchemical.45\else.6\fi}
+\def\chemicallfraction{\ifinchemical.1\else.1\fi}
+\def\chemicalrfraction{\ifinchemical.1\else.1\fi}
+
+\def\chemicaltighttext%
+ {\def\chemicaltfraction{\ifinchemical.3\else.6\fi}%
+ \def\chemicalbfraction{\ifinchemical.2\else.4\fi}%
+ \def\chemicallfraction{\ifinchemical0\else0\fi}%
+ \def\chemicalrfraction{\ifinchemical0\else0\fi}}
+
+\def\dochemicaltop#1#2#3#4%
+ {\vbox
+ {\baselineskip=\chemicaltfraction\baselineskip \lineskip0pt
+ \halign
+ {#1###2\cr
+ $\@@chemicalletter{\scriptscriptstyle#3}$\cr
+ $\@@chemicalletter{\@@currentchemicalformat#4}$\cr}}}
+
+\def\dochemicalbottom#1#2#3#4%
+ {\vtop
+ {\baselineskip=\chemicalbfraction\baselineskip \lineskip0pt
+ \halign
+ {#1###2\cr
+ $\@@chemicalletter{\@@currentchemicalformat#4}$\cr
+ $\@@chemicalletter{\scriptscriptstyle#3}$\cr}}}
+
+\def\chemicalleft#1#2%
+ {\hbox
+ {$\@@chemicalletter{\scriptscriptstyle#1}$%
+ $\@@chemicalletter{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
+
+\def\chemicalright#1#2%
+ {\hbox
+ {$\@@chemicalletter{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
+ $\@@chemicalletter{\scriptscriptstyle#1}$}}
+
+\def\chemicalcentered#1%
+ {\setbox0=\hbox{$\@@chemicalletter{\scriptscriptstyle#1}$}%
+ \setbox2=\hbox{$\@@chemicalletter{\@@currentchemicalformat C}$}%
+ \dimen0=.5\ht2
+ \advance\dimen0 by -.5\ht0
+ \advance\dimen0 by \dp0
+ \raise\dimen0\box0}
+
+\def\chemicalleftcentered#1#2%
+ {\hbox
+ {\chemicalcentered{#1}%
+ $\@@chemicalletter{\@@currentchemicalformat\hskip\chemicallfraction em#2}$}}
+
+\def\chemicalrightcentered#1#2%
+ {\hbox
+ {$\@@chemicalletter{\@@currentchemicalformat#2\hskip\chemicalrfraction em}$%
+ \chemicalcentered{#1}}}
+
+\def\chemicaltop {\dochemicaltop \hss \hss }
+\def\chemicallefttop {\dochemicaltop \relax \hss }
+\def\chemicalrighttop {\dochemicaltop \hss \relax}
+\def\chemicalbottom {\dochemicalbottom \hss \hss }
+\def\chemicalleftbottom {\dochemicalbottom \relax \hss }
+\def\chemicalrightbottom {\dochemicalbottom \hss \relax}
+
+\def\chemicaltopleft #1{\chemicalleft {\chemicallefttop {#1}{}}}
+\def\chemicalbottomleft #1{\chemicalleft {\chemicalleftbottom{#1}{}}}
+\def\chemicaltopright #1{\chemicalright{\chemicallefttop {#1}{}}}
+\def\chemicalbottomright#1{\chemicalright{\chemicalleftbottom{#1}{}}}
+
+\def\chemicalsmashedleft#1%
+ {\bgroup
+ \setbox0=\hbox{$\@@chemicalletter{\@@currentchemicalformat C}$}%
+ \setbox2=\hbox{$\@@chemicalletter{\@@currentchemicalformat#1}$}%
+ \wd2=\wd0
+ \box2
+ \egroup}
+
+\def\chemicalsmashedmiddle#1%
+ {\bgroup
+ \setbox0=\hbox{$\@@chemicalletter{\@@currentchemicalformat C}$}%
+ \setbox2=\hbox{$\@@chemicalletter{\@@currentchemicalformat#1}$}%
+ \hbox{\hskip-.5\wd2\hskip.5\wd0\box2}
+ \egroup}
+
+\def\chemicalsmashedright#1%
+ {\bgroup
+ \setbox0=\hbox{$\@@chemicalletter{\@@currentchemicalformat C}$}%
+ \setbox2=\hbox{$\@@chemicalletter{\@@currentchemicalformat#1}$}%
+ \hbox to \wd0{\hskip-\wd2\hskip\wd0\box2}%
+ \egroup}
+
+\def\+{\tabalign} % is \long in Plain
+
+\def\chemicalforever#1#2%
+ {\bgroup
+ \setbox0=\hbox{$\@@chemicalletter{\scriptscriptstyle\hskip-.15em#2}$}%
+ \wd0=0pt
+ \big#1_{\hskip.1em\box0}%
+ \egroup}
+
+\def\disablechemicalspecials%
+ {\def\+##1{##1}\def\-##1{##1}%
+ \def\[{[}\def\]{]}%
+ \def\1{}\def\2{}\def\3{}\def\4{}\def\5{}\def\6{}\def\7{}%
+ \def\X{}%
+ \def\T{}\def\B{}\def\L{}\def\R{}\def\LC{}\def\RC{}%
+ \def\TL{}\def\BL{}\def\TR{}\def\BR{}%
+ \def\LT{}\def\LB{}\def\RT{}\def\RB{}%
+ \def\SL{}\def\SM{}\def\SR{}}
+
+\def\enablechemicalspecials%
+ {\def\+{\dodoublegroupempty\chemicaloxidation{+}}% {} needed!
+ \def\-{\dodoublegroupempty\chemicaloxidation{-}}% {} needed!
+ \def\[{\dodoublegroupempty\chemicalforever {[}}% {} needed!
+ \def\]{\dodoublegroupempty\chemicalforever {]}}% {} needed!
+ \def\1{\chemicaloxidation\relax1}%
+ \def\2{\chemicaloxidation\relax2}%
+ \def\3{\chemicaloxidation\relax3}%
+ \def\4{\chemicaloxidation\relax4}%
+ \def\5{\chemicaloxidation\relax5}%
+ \def\6{\chemicaloxidation\relax6}%
+ \def\7{\chemicaloxidation\relax7}%
+ \def\X{\chemicaltighttext}%
+ \def\T{\chemicaltop}%
+ \def\B{\chemicalbottom}%
+ \def\L{\chemicalleft}%
+ \def\LC{\chemicalleftcentered}%
+ \def\R{\chemicalright}%
+ \def\RC{\chemicalrightcentered}%
+ \def\TL{\chemicaltopleft}%
+ \def\BL{\chemicalbottomleft}%
+ \def\TR{\chemicaltopright}%
+ \def\BR{\chemicalbottomright}%
+ \def\LT{\chemicallefttop}%
+ \def\LB{\chemicalleftbottom}%
+ \def\RT{\chemicalrighttop}%
+ \def\RB{\chemicalrightbottom}%
+ \def\SL{\chemicalsmashedleft}%
+ \def\SM{\chemicalsmashedmiddle}%
+ \def\SR{\chemicalsmashedright}}
+
+% \reversechemical#1#2#3
+%
+% #1: prefix
+% #2: volgnummer enz
+% #3: tegengestelde volgnummers
+
+\def\reversechemical#1#2#3%
+ {\def\doprocess[##1##2]%
+ {\doifchemicalnumber{##1}{#1#2}%
+ {\getfromcommalist[#3][##1]%
+ \let\reversechemicalaction=\commalistelement
+ \processchemical[#1\reversechemicalaction##2]}}%
+ \doprocess[#2]}
+
+% \processunknownchemical[#1????][#2]
+%
+% #1: bindingen enz.
+% #2: atomen enz.
+
+\def\defaultchemical%
+ {SIX}
+
+\def\processunknownchemical[#1????][#2]%
+ {\processaction
+ [#1]
+ [ SAVE=>\executechemicalSAVE,
+ RESTORE=>\executechemicalRESTORE,
+ HIGH=>\sethighsubscripts,
+ LOW=>\setlowsubscripts,
+ \s!default=>,
+ \s!unknown=>\doifdefinedelse{\s!executechemical#1}
+ {\def\chemicalrotation{1}%
+ \def\chemicaloffset{0}%
+ \doifdefined{\s!executechemical#1}
+ {\getvalue{\s!executechemical#1}[#2]}%
+ \@@chemicalpostponed}
+ {\getpredefinedchemical{#1}}]}
+
+\newcount\chemicalstack % tzt \newwounter
+
+\setvalue{\s!chemical\c!x1}{0}
+\setvalue{\s!chemical\c!y1}{0}
+
+\def\executechemicalSAVE%
+ {%\writestatus{ppchtex}{saving \the\horchemical,\the\verchemical}%
+ \advance\chemicalstack by 1
+ \letvalue {\s!chemical n\the\chemicalstack}=\chemicalname
+ %\letvalue {\s!chemical p\the\chemicalstack}=\@@chemicalpostponed
+ \setevalue{\s!chemical x\the\chemicalstack}{\the\horchemical}%
+ \setevalue{\s!chemical y\the\chemicalstack}{\the\verchemical}}
+
+\def\restorechemicalvalues#1%
+ {\let\oldprocesschemical=\processchemical
+ \doifdefined{\s!executechemical#1}{\getvalue{\s!executechemical#1}[]}%
+ \let\processchemical=\oldprocesschemical}
+
+\def\executechemicalRESTORE%
+ {\ifnum\chemicalstack=0\relax
+ \horchemical=\getvalue{\s!chemical x1}\relax
+ \verchemical=\getvalue{\s!chemical y1}\relax
+ \else
+ \restorechemicalvalues{\getvalue{\s!chemical n\the\chemicalstack}}%
+ %\@EA\let\@EA\@@chemicalpostponed\@EA=\csname\s!chemical p\the\chemicalstack\endcsname
+ \let\@@chemicalpostponed=\relax
+ \horchemical=\getvalue{\s!chemical x\the\chemicalstack}\relax
+ \verchemical=\getvalue{\s!chemical y\the\chemicalstack}\relax
+ \advance\chemicalstack by -1
+ \fi
+ \restorechemicalcoordinates}
+
+% De onderstaande macro's zijn verantwoordelijk voor het zetten
+% van de + en pijlen. De +, en dus ook de pijlen, worden omhoog
+% gehaald. Dit oogt m.i. fraaier.
+
+\def\chemicalraise#1#2%
+ {{\setbox0=\hbox{$#1+$}%
+ \raise\dp0\hbox{$#1#2$}}}
+
+\def\chemicalinnersign#1%
+ {\chemicalraise{\@@localchemicalstyle}{#1}}
+
+\def\chemicaloutersign#1%
+ {\chemicalraise{}{#1}}
+
+\def\chemicalsingleinnerarrow#1#2%
+ {\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}
+
+\def\chemicaldoubleinnerarrow#1#2%
+ {\lower.2ex\hbox
+ {\setbox0=\hbox{$\@@localchemicalstyle\longrightarrow$}%
+ \setbox2=\hbox{$\@@localchemicalstyle\longleftarrow$}%
+ \wd0=0pt\raise\ht0\box0\box2}}
+
+\def\chemicaltwintipinnerarrow#1#2%
+ {\hbox
+ {\setbox0=\hbox{\chemicalraise{\@@localchemicalstyle}{\longrightarrow}}%
+ \setbox2=\hbox{\chemicalraise{\@@localchemicalstyle}{\longleftarrow}}%
+ \wd0=0pt\box0\box2}}
+
+\def\dochemicalouterarrow#1#2#3%
+ {\bgroup
+ \setbox0=\hbox{$\longrightarrow$}%
+ \setbox2=\hbox{$\@@chemicalletter{\scriptstyle\quad#2\quad}$}%
+ \setbox4=\hbox{$\@@chemicalletter{\scriptstyle\quad#3\quad}$}%
+ \dimen2=\wd0 % \dimen0 is used elsewhere
+ \ifdim\wd2>\dimen2 \dimen0=\wd2 \fi
+ \ifdim\wd4>\dimen2 \dimen0=\wd4 \fi
+ \chemicaloutermolecule
+ {#1}
+ {\ifdim\ht2>\!!zeropoint\box2\fi} % expands to \empty in test
+ {\ifdim\ht4>\!!zeropoint\box4\fi}% % expands to \empty in test
+ \egroup}
+
+\def\chemicalsingleouterarrow%
+ {\dochemicalouterarrow
+ {\hbox to \dimen2{\rightarrowfill}}}
+
+\def\chemicaldoubleouterarrow%
+ {\dochemicalouterarrow
+ {\lower.5\ht0\vbox
+ {\offinterlineskip
+ \hbox to \dimen2{\rightarrowfill}
+ \hbox to \dimen2{\leftarrowfill}}}}
+
+\def\chemicaltwintipouterarrow%
+ {\dochemicalouterarrow
+ {\hbox
+ {\hbox to \dimen2{\rightarrowfill}%
+ \hskip-\dimen2
+ \hbox to \dimen2{\leftarrowfill}}}}
+
+\def\chemicalinnermolecule#1#2#3% #3 vergeten
+ {\chemicalspace
+ %\mathop % onnodig en genereert spatie aan het begin van een regel
+ {\dosetsubscripts
+ \hbox{$\@@chemicalletter{\@@localchemicalstyle\strut#1}$}%
+ \doresetsubscripts}%
+ \chemicalspace}
+
+\def\chemicaloutermolecule#1#2#3%
+ {\chemicalspace
+ \setbox0=\hbox % else the font is reset
+ {\dosetsubscripts
+ \hbox{$\@@chemicalletter{\strut#1}$}%
+ \doresetsubscripts}%
+ \mathop{\box0}%
+ \doifnot{#2}{}
+ {_{\@@chemicalletter{\strut\ifthirdargument#3\else#2\fi}}}%
+ \doifnot{#3}{}
+ {^{\@@chemicalletter{\strut\ifthirdargument#2\else#3\fi}}}%
+ \chemicalspace}
+
+\def\chemicalsinglepicturearrow#1%
+ {\lower.5ex\hbox
+ {$\chemicalspace
+ \buildrel
+ \@@chemicalletter{\scriptstyle\quad#1\quad}%
+ \over{\overrightarrow
+ {\hphantom{\@chemicalletter{\scriptstyle\quad#1\quad}}}}%
+ \chemicalspace$}}
+
+\def\chemicaldoublepicturearrow#1%
+ {\lower.5ex\hbox
+ {$\chemicalspace
+ \buildrel
+ \@@chemicalletter{\scriptstyle\quad#1\quad}%
+ \over{\overrightarrow{\overleftarrow
+ {\hphantom{\@@chemicalletter{\scriptstyle\quad#1\quad}}}}}%
+ \chemicalspace$}}
+
+% Bij de in-line bindingen wordt gebruik gemaakt van
+% een \hrule. De maatvoering wordt bepaald door een
+% kunstmatige em (\wd0).
+
+\def\somechemicalbond%
+ {\hrule width \wd0 height .4pt}
+
+\def\dochemicalbonds#1#2#3%
+ {{\setbox0=\hbox
+ {$\@@chemicalletter{\@@localchemicalstyle M}$}%
+ \vbox to \ht0
+ {\hsize\wd0
+ \vskip.1\wd0#1\vfill#2\vfill#3\vskip.1\wd0}}}
+
+\def\singlechemicalbond%
+ {\dochemicalbonds{}{\somechemicalbond}{}}
+
+\def\doublechemicalbond%
+ {\dochemicalbonds{\somechemicalbond}{}{\somechemicalbond}}
+
+\def\triplechemicalbond%
+ {\dochemicalbonds{\somechemicalbond}{\somechemicalbond}{\somechemicalbond}}
+
+% In plaats van \def\naam{\chemie[...]...} kan beter gebruik
+% worden gemaakt van het commando
+%
+% \definieerchemie[naam]{commando's}
+%
+% De naam krijgt, om problemen met bestaande macro's te
+% voorkomen, een prefix. Bij het ophalen van een commando
+% worden beide definities afgehandeld.
+
+\def\dodefinechemical[#1]#2%
+ {\doifdefined{\??chemical#1}
+ {\writestatus{ppchtex}{chemical definition #1 is redefined}}%
+ \setvalue{\??chemical#1}{#2}}
+
+\def\definechemical%
+ {\dosingleargument\dodefinechemical}
+
+\def\getpredefinedchemical#1%
+ {\doifdefinedelse{\??chemical#1}
+ {\getvalue{\??chemical#1}}
+ {\doifdefinedelse{#1}
+ {\getvalue{#1}}
+ {\writestatus{ppchtex}{unknown chemical definition #1}}}}
+
+% Hieronder zijn de definities van de structuren opgenomen. De
+% naam van de structuur is als volgt opgebouwd:
+%
+% \executechemicalNUMBER[#1]
+%
+% waarbij [#1] betrekking heeft op de tekstelementen van \chemie,
+% de [tweede lijst] dus.
+%
+% De aan \chemie[#1][#2] meegegeven lijst van segmenten wordt
+% deels door de in \execute gedefinieerde macro's afgehandeld,
+% deels door algemene macro's. Segmenten hebben de vorm:
+%
+% [+|-|]identifier[X|XYZ|X..Y]
+%
+% Voorbeelden van segmenten zijn:
+%
+% R1
+% R1..4
+% R135
+% -R1
+% +R35
+
+\setchemicalmaximum 0
+
+\def\processchemical[#1]%
+ {\unknownchemical{#1}}
+
+\def\setchemicalname#1 %
+ {\def\chemicalname{#1}}
+
+\let\chemicalname=\s!unknown
+
+% Vooruitlopend op een gedetailleerde documentatie, zijn hier
+% vast enkele gebruikte afmetingen:
+%
+% lengte radikalen : 500
+% afstand radikalen : 100
+% afstand dubbele radikalen : 260
+% afstand substituenten : +125
+
+\def\executechemicalONE[#1]%
+ {\setchemicalname ONE
+ %
+ \setchemicalmaximum 8
+ \setchemicaldistance 0
+ \setchemicalsubstitute 625
+ \setchemicaldirection 303
+ %
+ \setchemicalrotation 1 1 0 1 0 1 0 1 0
+ \setchemicalrotation 2 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707
+ \setchemicalrotation 3 0 -1 0 -1 0 -1 0 -1
+ \setchemicalrotation 4 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707 -0.707
+ \setchemicalrotation 5 -1 0 -1 0 -1 0 -1 0
+ \setchemicalrotation 6 -0.707 0.707 -0.707 0.707 -0.707 0.707 -0.707 0.707
+ \setchemicalrotation 7 0 1 0 1 0 1 0 1
+ \setchemicalrotation 8 0.707 0.707 0.707 0.707 0.707 0.707 0.707 0.707
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 45 135 225 315
+ \setchemicalangle 3 90 180 270 0
+ \setchemicalangle 4 135 225 315 45
+ \setchemicalangle 5 180 270 0 90
+ \setchemicalangle 6 225 315 45 135
+ \setchemicalangle 7 270 0 90 180
+ \setchemicalangle 8 315 45 135 225
+ %
+ \setchemicaltranslate 1 -1000 0
+ \setchemicaltranslate 2 -1000 1000
+ \setchemicaltranslate 3 0 1000
+ \setchemicaltranslate 4 1000 1000
+ \setchemicaltranslate 5 1000 0
+ \setchemicaltranslate 6 1000 -1000
+ \setchemicaltranslate 7 0 -1000
+ \setchemicaltranslate 8 -1000 -1000
+ %
+ \setchemicallinesegment SB 300 0 700 0
+ \setchemicallinesegment DB1 300 50 700 50
+ \setchemicallinesegment DB2 300 -50 700 -50
+ %
+ \setchemicallinesegment EP 200 125 200 -125
+ \setchemicaltextelement ES 200 0
+ \setchemicaltextelement ED1 200 50
+ \setchemicaltextelement ED2 200 -50
+ \setchemicaltextelement ET1 200 75
+ \setchemicaltextelement ET2 200 0
+ \setchemicaltextelement ET3 200 -75
+ \setchemicaltextelement HB1 300 0
+ \setchemicaltextelement HB2 475 0
+ \setchemicaltextelement HB3 650 0
+ %
+ \setchemicaltextelement Z 800 0
+ \setchemicaltextelement RZ 950 0
+ \setchemicaltextelement ZN 500 0
+ \setchemicaltextelement ZTN 500 150
+ \setchemicaltextelement ZBN 500 -150
+ %
+ \def\processchemical[##1##2##3##4##5]%
+ {\doprocesschemical[##1##2##3##4##5]
+ {\processaction
+ [##1##2##3##4##5]
+ [ PB:##4##5=>\beginchemicalpicture{##4##5},
+ PE????=>\endchemicalpicture,
+ SUB##4##5=>\processchemicalsubstitute{##4##5},
+ ADJ##4##5=>\processchemicaldistance{##4##5},
+ MOV##4##5=>\processchemicaltranslate{##4##5},
+ DIR##4##5=>\processchemicaldirection{##4##5},
+ OFF##4##5=>\processchemicaloffset{##4##5},
+CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
+ LDD##4##5=>\processchemicaldashedlinesegment{DB1}{##4##5}%
+ \processchemicallinesegment{DB2}{##4##5},
+ RDD##4##5=>\processchemicallinesegment{DB1}{##4##5}%
+ \processchemicaldashedlinesegment{DB2}{##4##5},
+ OF##3:##5=>\processchemicalphantom{##3}{##5},
+ OE##3##4##5=>\processchemicalopenend{OE}{##3##4##5},
+ EP##3##4##5=>\processchemicallinesegment{EP}{##3##4##5},
+ ES##3##4##5=>\processchemicaltextconstant{ES}{##3##4##5}{\hbox{$\cdot$}}{0},
+ ED##3##4##5=>\processchemicaltextconstant{ED}{##3##4##5}{\hbox{$\cdot$}}{0},
+ ET##3##4##5=>\processchemicaltextconstant{ET}{##3##4##5}{\hbox{$\cdot$}}{0},
+ HB##3##4##5=>\processchemicaltextconstant{HB}{##3##4##5}{\hbox{$\cdot$}}{0},
+ SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
+ DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
+ SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
+ BB##3##4##5=>\processchemicaldeltalinesegment{SB}{##3##4##5},
+ SD##3##4##5=>\processchemicaldashedlinesegment{SB}{##3##4##5},
+ TB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5}%
+ \processchemicallinesegment{DB}{##3##4##5},
+ CZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{0}{},
+ ZTN##4##5=>\processchemicalsmalltextconstant{ZTN}{##4##5}{\chemicaltextelementnumber}{0},
+ ZTT##4##5=>\processchemicalsmalltextelement{ZTN}{##4##5}{#1}{0}{},
+ ZBN##4##5=>\processchemicalsmalltextconstant{ZBN}{##4##5}{\chemicaltextelementnumber}{0},
+ ZBT##4##5=>\processchemicalsmalltextelement{ZBN}{##4##5}{#1}{0}{},
+ ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
+ ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
+ Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}
+ {l,l,t,r,r,r,b,l},
+ \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}}
+
+\def\executechemicalTHREE[#1]%
+ {\setchemicalname THREE
+ %
+ \setchemicalmaximum 3
+ \setchemicaldistance 289
+ \setchemicalsubstitute 952
+ %
+ \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
+ \setchemicalrotation 2 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
+ \setchemicalrotation 3 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 120 210 300 30
+ \setchemicalangle 3 240 330 60 150
+ %
+ \setchemicaltranslate 1 -1000 0
+ \setchemicaltranslate 2 0 1000
+ \setchemicaltranslate 3 1000 0
+ \setchemicaltranslate 4 0 -1000
+ %
+ \setchemicallinesegment B 577 0 -289 -500
+ \setchemicallinesegment SB 352 -130 -64 -370
+ \setchemicallinesegment -SB 352 -130 -289 -500
+ \setchemicallinesegment +SB 577 0 -64 -370
+ \setchemicallinesegment DB1 327 -87 -89 -327
+ \setchemicallinesegment DB2 377 -172 -39 -413
+ \setchemicallinesegment R 577 0 1077 0
+ \setchemicallinesegment -R 577 0 1010 250
+ \setchemicallinesegment +R 577 0 1010 -250
+ \setchemicallinesegment ER1 577 50 1077 50
+ \setchemicallinesegment ER2 577 -50 1077 -50
+ \setchemicallinesegment SR 837 0 1077 0
+ \setchemicallinesegment -SR 802 130 1010 250
+ \setchemicallinesegment +SR 802 -130 1010 -250
+ \setchemicallinesegment DR1 837 50 1077 50
+ \setchemicallinesegment DR2 837 -50 1077 -50
+ %
+ \setchemicaltextelement Z 577 0
+ \setchemicaltextelement RZ 1177 0
+ \setchemicaltextelement -RZ 1097 300
+ \setchemicaltextelement +RZ 1097 -300
+ \setchemicaltextelement CRZ 1077 0
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\processaction
+ [##1##2##3##4]
+ [ ROT##4=>\processchemicalrotation{##4},
+ MOV##4=>\processchemicaltranslate{##4},
+ SUB##4=>\processchemicalsubstitute{##4},
+ ADJ##4=>\processchemicaldistance{##4},
+ -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{3}
+ {l,t,r, l,r,l, r,b,l, r,l,r},
+ +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{3}
+ {l,r,b, r,r,l, r,l,t, l,l,r},
+ -SB##4=>\processchemicallinesegment{-SB}{##4},
+ +SB##4=>\processchemicallinesegment{+SB}{##4},
+ -SR##4=>\processchemicallinesegment{-SR}{##4},
+ +SR##4=>\processchemicallinesegment{+SR}{##4},
+ CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}
+ {},
+ DB##3##4=>\processchemicallinesegment{DB}{##3##4},
+ DR##3##4=>\processchemicallinesegment{DR}{##3##4},
+ RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{3}
+ {l,r,r, t,r,l, r,l,l, b,l,r},
+ ER##3##4=>\processchemicallinesegment{ER}{##3##4},
+ SB##3##4=>\processchemicallinesegment{SB}{##3##4},
+ SR##3##4=>\processchemicallinesegment{SR}{##3##4},
+ -R##3##4=>\processchemicallinesegment{-R}{##3##4},
+ +R##3##4=>\processchemicallinesegment{+R}{##3##4},
+ B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
+ R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
+ Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+\def\executechemicalFOUR[#1]%
+ {\setchemicalname FOUR
+ %
+ \setchemicalmaximum 4
+ \setchemicaldistance 500
+ \setchemicalsubstitute 0
+ %
+ \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
+ \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
+ \setchemicalrotation 3 -1 0 0 1 1 0 0 -1
+ \setchemicalrotation 4 0 1 1 0 0 -1 -1 0
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 90 180 270 0
+ \setchemicalangle 3 180 270 0 90
+ \setchemicalangle 4 270 0 90 180
+ %
+ \setchemicaltranslate 1 -1000 0
+ \setchemicaltranslate 2 0 1000
+ \setchemicaltranslate 3 1000 0
+ \setchemicaltranslate 4 0 -1000
+ %
+ \setchemicallinesegment B 500 500 500 -500
+ \setchemicallinesegment SB 500 240 500 -240
+ \setchemicallinesegment -SB 500 240 500 -500
+ \setchemicallinesegment +SB 500 500 500 -240
+ \setchemicallinesegment DB1 450 240 450 -240
+ \setchemicallinesegment DB2 550 240 550 -240
+ \setchemicallinesegment EB 360 300 360 -300
+ \setchemicallinesegment R 500 500 854 854
+ \setchemicallinesegment -R 500 500 500 1000
+ \setchemicallinesegment +R 500 500 1000 500
+ \setchemicallinesegment ER1 465 535 819 889
+ \setchemicallinesegment ER2 535 465 889 819
+ \setchemicallinesegment SR 684 684 854 854
+ \setchemicallinesegment -SR 500 760 500 1000
+ \setchemicallinesegment +SR 760 500 1000 500
+ \setchemicallinesegment DR1 649 719 819 889
+ \setchemicallinesegment DR2 719 649 889 819
+ %
+ \setchemicaltextelement Z 500 500
+ \setchemicaltextelement RZ 925 925
+ \setchemicaltextelement -RZ 500 1100
+ \setchemicaltextelement +RZ 1100 500
+ \setchemicaltextelement CRZ 1038 1038
+ %
+ \setchemicaltextelement ZN 350 350
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\processaction
+ [##1##2##3##4]
+ [ PB:##4=>\beginchemicalpicture{##4},
+ PE????=>\endchemicalpicture,
+ ROT##4=>\processchemicalrotation{##4},
+ SUB##4=>\processchemicalsubstitute{##4},
+ ADJ##4=>\processchemicaldistance{##4},
+ MOV##4=>\processchemicaltranslate{##4},
+ -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{4}
+ {b,l,t,r, l,t,r,b, t,r,b,l, r,b,l,t},
+ +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{4}
+ {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
+ -SB##4=>\processchemicallinesegment{-SB}{##4},
+ +SB##4=>\processchemicallinesegment{+SB}{##4},
+ -SR##4=>\processchemicallinesegment{-SR}{##4},
+ +SR##4=>\processchemicallinesegment{+SR}{##4},
+ CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
+ ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
+ ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
+ DB##3##4=>\processchemicallinesegment{DB}{##3##4},
+ DR##3##4=>\processchemicallinesegment{DR}{##3##4},
+ EB##3##4=>\processchemicallinesegment{EB}{##3##4},
+ ER##3##4=>\processchemicallinesegment{ER}{##3##4},
+ RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{4}
+ {lb,lt,rt,rb, lt,rt,rb,lb, rt,rb,lb,lt, rb,lb,lt,rt},
+ SB##3##4=>\processchemicallinesegment{SB}{##3##4},
+ SR##3##4=>\processchemicallinesegment{SR}{##3##4},
+ -R##3##4=>\processchemicallinesegment{-R}{##3##4},
+ +R##3##4=>\processchemicallinesegment{+R}{##3##4},
+ B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
+ R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
+ Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+\def\executechemicalFIVE[#1]%
+ {\setchemicalname FIVE
+ %
+ \setchemicalmaximum 5
+ \setchemicaldistance 688
+ \setchemicalsubstitute 1226
+ %
+ \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
+ \setchemicalrotation 2 0.309 -0.951 -0.951 -0.309 -0.309 0.940 0.951 0.309
+ \setchemicalrotation 3 -0.809 -0.588 -0.588 0.809 0.809 0.588 0.588 -0.809
+ \setchemicalrotation 4 -0.809 0.588 0.588 0.809 0.809 -0.588 -0.588 -0.809
+ \setchemicalrotation 5 0.309 0.951 0.951 -0.309 -0.309 -0.951 -0.951 0.309
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 72 162 252 342
+ \setchemicalangle 3 144 234 324 54
+ \setchemicalangle 4 216 306 36 126
+ \setchemicalangle 5 288 18 108 198
+ %
+ \setchemicaltranslate 1 -1376 0
+ \setchemicaltranslate 2 -425 1304
+ \setchemicaltranslate 3 1113 809
+ \setchemicaltranslate 4 1113 -809
+ \setchemicaltranslate 5 -425 -1304
+ %
+ \setchemicallinesegment A 1188 500 1188 -500
+ \setchemicallinesegment B 688 500 688 -500
+ \setchemicallinesegment S -263 808 688 -500
+ \setchemicallinesegment SS -116 606 541 -298
+ \setchemicallinesegment -SS -263 808 541 -298
+ \setchemicallinesegment +SS -116 606 688 -500
+ \setchemicallinesegment SB 688 240 688 -240
+ \setchemicallinesegment -SB 688 240 688 -500
+ \setchemicallinesegment +SB 688 500 688 -240
+ \setchemicallinesegment DB1 638 240 638 -240
+ \setchemicallinesegment DB2 738 240 738 -240
+ \setchemicallinesegment EB 548 340 548 -340
+ \setchemicallinesegment R 688 500 1093 794
+ \setchemicallinesegment -R 688 500 688 1000
+ \setchemicallinesegment +R 688 500 1163 345
+ \setchemicallinesegment ER1 659 540 1064 834
+ \setchemicallinesegment ER2 727 460 1122 754
+ \setchemicallinesegment SR 898 653 1093 794
+ \setchemicallinesegment -SR 688 760 688 1000
+ \setchemicallinesegment +SR 935 420 1163 345
+ \setchemicallinesegment DR1 869 693 1064 834
+ \setchemicallinesegment DR2 927 613 1122 754
+ %
+ \setchemicaltextelement Z 688 500
+ \setchemicaltextelement RZ 1188 863
+ \setchemicaltextelement -RZ 688 1100
+ \setchemicaltextelement +RZ 1258 315
+ \setchemicaltextelement CRZ 1323 947
+ %
+ \setchemicalcircsegment C -36 36 590 72 475 -345
+ \setchemicalcircsegment CC -72 0 590 72 182 -561
+ %
+ \setchemicaltextelement ZN 468 350
+ \setchemicaltextelement RN 860 625 % 1.25 Z
+ \setchemicaltextelement RTN 785 728 % .12 / 103 75
+ \setchemicaltextelement RBN 935 522
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\processaction
+ [##1##2##3##4]
+ [ FRONT????=>{\executechemicalFIVEFRONT[#1]},
+ PB:##4=>\beginchemicalpicture{##4},
+ PE????=>\endchemicalpicture,
+ ROT##4=>\processchemicalrotation{##4},
+ SUB##4=>\processchemicalsubstitute{##4},
+ ADJ##4=>\processchemicaldistance{##4},
+ MOV##4=>\processchemicaltranslate{##4},
+ -RZ##4=>\processchemicaltextelement{-RZ}{##4}{#1}{5}
+ {b,l,t,r,r, l,t,r,r,l, t,r,r,l,l, r,b,l,t,r},
+ +RZ##4=>\processchemicaltextelement{+RZ}{##4}{#1}{5}
+ {l,t,r,r,b, t,r,r,l,l, r,r,l,l,r, b,l,l,r,r},
+ -SB##4=>\processchemicallinesegment{-SB}{##4},
+ +SB##4=>\processchemicallinesegment{+SB}{##4},
+ -SR##4=>\processchemicallinesegment{-SR}{##4},
+ +SR##4=>\processchemicallinesegment{+SR}{##4},
+ -RD##4=>\processchemicaldashedlinesegment{-R}{##4},
+ +RD##4=>\processchemicaldashedlinesegment{+R}{##4},
+ -RB##4=>\processchemicaldeltalinesegment{-R}{##4},
+ +RB##4=>\processchemicaldeltalinesegment{+R}{##4},
+ CRZ##4=>\processchemicaltextelement{CRZ}{##4}{#1}{0}{},
+RTN##4=>\processchemicaltextconstant{RTN}{##4}{\chemicaltextelementnumber}{0},
+RTT##4=>\processchemicaltextelement{RTN}{##4}{#1}{0}{},
+RBN##4=>\processchemicaltextconstant{RBN}{##4}{\chemicaltextelementnumber}{0},
+RBT##4=>\processchemicaltextelement{RBN}{##4}{#1}{0}{},
+ -SS##4=>\processchemicallinesegment{-SS}{##4},
+ +SS##4=>\processchemicallinesegment{+SS}{##4},
+ CCD##4=>\processchemicaldottsegment{CC}{##4},
+ SS##3##4=>\processchemicallinesegment{SS}{##3##4},
+ RD##3##4=>\processchemicaldashedlinesegment{R}{##3##4},
+ RB##3##4=>\processchemicaldeltalinesegment{R}{##3##4},
+ ZN##3##4=>\processchemicaltextconstant{ZN}{##3##4}{\chemicaltextelementnumber}{0},
+ ZT##3##4=>\processchemicaltextelement{ZN}{##3##4}{#1}{0}{},
+RN##3##4=>\processchemicaltextconstant{RN}{##3##4}{\chemicaltextelementnumber}{0},
+RT##3##4=>\processchemicaltextelement{RN}{##3##4}{#1}{0}{},
+ AU##3##4=>\processchemicaluparrowsegment{A}{##3##4},
+ AD##3##4=>\processchemicaldownarrowsegment{A}{##3##4},
+ CC##3##4=>\processchemicalcircsegment{CC}{##3##4},
+ CD##3##4=>\processchemicaldottsegment{C}{##3##4},
+ DB##3##4=>\processchemicallinesegment{DB}{##3##4},
+ DR##3##4=>\processchemicallinesegment{DR}{##3##4},
+ EB##3##4=>\processchemicallinesegment{EB}{##3##4},
+ ER##3##4=>\processchemicallinesegment{ER}{##3##4},
+ RZ##3##4=>\processchemicaltextelement{RZ}{##3##4}{#1}{5}
+ {l,l,r,r,r, l,r,r,b,l, r,r,b,l,t, r,l,l,t,r},
+ SB##3##4=>\processchemicallinesegment{SB}{##3##4},
+ SR##3##4=>\processchemicallinesegment{SR}{##3##4},
+ -R##3##4=>\processchemicallinesegment{-R}{##3##4},
+ +R##3##4=>\processchemicallinesegment{+R}{##3##4},
+ B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
+ C##2##3##4=>\processchemicalcircsegment{C}{##2##3##4},
+ R##2##3##4=>\processchemicallinesegment{R}{##2##3##4},
+ S##2##3##4=>\processchemicallinesegment{S}{##2##3##4},
+ Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+\def\executechemicalSIX[#1]%
+ {\setchemicalname SIX
+ %
+ \setchemicalmaximum 6
+ \setchemicalsubstitute 1375
+ \setchemicaldistance 866
+ %
+ \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
+ \setchemicalrotation 2 0.5 -0.866 -0.866 -0.5 -0.5 0.866 0.866 0.5
+ \setchemicalrotation 3 -0.5 -0.866 -0.866 0.5 0.5 0.866 0.866 -0.5
+ \setchemicalrotation 4 -1 0 0 1 1 0 0 -1
+ \setchemicalrotation 5 -0.5 0.866 0.866 0.5 0.5 -0.866 -0.866 -0.5
+ \setchemicalrotation 6 0.5 0.866 0.866 -0.5 -0.5 -0.866 -0.866 0.5
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 60 150 240 330
+ \setchemicalangle 3 120 210 300 30
+ \setchemicalangle 4 180 270 0 90
+ \setchemicalangle 5 240 330 60 150
+ \setchemicalangle 6 300 30 120 210
+ %
+ \setchemicaltranslate 1 -1732 0
+ \setchemicaltranslate 2 -866 1500
+ \setchemicaltranslate 3 866 1500
+ \setchemicaltranslate 4 1732 0
+ \setchemicaltranslate 5 866 -1500
+ \setchemicaltranslate 6 -866 -1500
+ %
+ \setchemicallinesegment A 1386 500 1386 -500
+ \setchemicallinesegment S 0 1000 866 -500
+ \setchemicallinesegment SS 125 783 741 -283
+ \setchemicallinesegment -SS 0 1000 741 -283
+ \setchemicallinesegment +SS 125 783 866 -500
+ \setchemicallinesegment B 866 500 866 -500
+ \setchemicallinesegment SB 866 240 866 -240
+ \setchemicallinesegment -SB 866 240 866 -500
+ \setchemicallinesegment +SB 866 500 866 -240
+ \setchemicallinesegment DB1 816 240 816 -240
+ \setchemicallinesegment DB2 916 240 916 -240
+ \setchemicallinesegment EB 726 340 726 -340
+ \setchemicallinesegment R 866 500 1299 750
+ \setchemicallinesegment -R 866 500 866 1000
+ \setchemicallinesegment +R 866 500 1299 250
+ \setchemicallinesegment ER1 841 543 1274 793
+ \setchemicallinesegment ER2 891 457 1324 707
+ \setchemicallinesegment SR 1091 630 1299 750
+ \setchemicallinesegment -SR 866 740 866 1000
+ \setchemicallinesegment +SR 1091 370 1299 250
+ \setchemicallinesegment DR1 1066 673 1274 793
+ \setchemicallinesegment DR2 1116 588 1324 707
+ \setchemicallinesegment MID1 0 1000 -150 200
+ \setchemicallinesegment MID2 0 -1000 -150 -200
+ \setchemicallinesegment MIDS1 0 1000 -180 0
+ \setchemicallinesegment MIDS2 0 -1000 -180 0
+ %
+ \setchemicalcircsegment C -30 30 700 60 600 -346
+ \setchemicalcircsegment CC -60 0 700 60 350 -606
+ %
+ \setchemicaltextelement Z 866 500
+ \setchemicaltextelement RZ 1386 800
+ \setchemicaltextelement -RZ 866 1100
+ \setchemicaltextelement +RZ 1386 200
+ \setchemicaltextelement CRZ 1524 880
+ \setchemicaltextelement MIDZ -150 0
+ %
+ \setchemicaltextelement ZN 589 350
+ \setchemicaltextelement RN 1083 625 % 1.25 Z
+ \setchemicaltextelement RTN 1008 755 % .12 / 130 75
+ \setchemicaltextelement RBN 1158 495
+ %
+ \def\processchemical[##1##2##3##4##5]%
+ {\processaction
+ [##1##2##3##4##5]
+ [ FRONT????=>{\executechemicalSIXFRONT[#1]},
+ MID????=>\processchemicallinesegment{MID}{1????},
+ MIDS????=>\processchemicallinesegment{MIDS}{1????},
+ MIDZ????=>\processchemicaltextelement{MIDZ}{1????}{#1}{0}{},
+ PB:##4##5=>\beginchemicalpicture{##4##5},
+ PE????=>\endchemicalpicture,
+ ROT##4##5=>\processchemicalrotation{##4##5},
+ SUB##4##5=>\processchemicalsubstitute{##4##5},
+ ADJ##4##5=>\processchemicaldistance{##4##5},
+ MOV##4##5=>\processchemicaltranslate{##4##5},
+ -RZ##4##5=>\processchemicaltextelement{-RZ}{##4##5}{#1}{6}
+ {b,l,l,t,r,r, l,l,r,r,r,l, t,r,r,b,l,l, r,r,l,l,l,r},
+ +RZ##4##5=>\processchemicaltextelement{+RZ}{##4##5}{#1}{6}
+ {l,t,r,r,b,l, r,r,r,l,l,l, r,b,l,l,t,r, l,l,l,r,r,r},
+ -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
+ +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
+ -SR##4##5=>\processchemicallinesegment{-SR}{##4##5},
+ +SR##4##5=>\processchemicallinesegment{+SR}{##4##5},
+ -RD##4##5=>\processchemicaldashedlinesegment{-R}{##4##5},
+ +RD##4##5=>\processchemicaldashedlinesegment{+R}{##4##5},
+ -RB##4##5=>\processchemicaldeltalinesegment{-R}{##4##5},
+ +RB##4##5=>\processchemicaldeltalinesegment{+R}{##4##5},
+ CRZ##4##5=>\processchemicaltextelement{CRZ}{##4##5}{#1}{0}{},
+ -SS##4##5=>\processchemicallinesegment{-SS}{##4##5},
+ +SS##4##5=>\processchemicallinesegment{+SS}{##4##5},
+ CCD##4##5=>\processchemicaldottsegment{CC}{##4##5},
+RTN##4##5=>\processchemicaltextconstant{RTN}{##4##5}{\chemicaltextelementnumber}{0},
+RTT##4##5=>\processchemicaltextelement{RTN}{##4##5}{#1}{0}{},
+RBN##4##5=>\processchemicaltextconstant{RBN}{##4##5}{\chemicaltextelementnumber}{0},
+RBT##4##5=>\processchemicaltextelement{RBN}{##4##5}{#1}{0}{},
+ SS##3##4##5=>\processchemicallinesegment{SS}{##3##4##5},
+ RD##3##4##5=>\processchemicaldashedlinesegment{R}{##3##4##5},
+ RB##3##4##5=>\processchemicaldeltalinesegment{R}{##3##4##5},
+ ZN##3##4##5=>\processchemicaltextconstant{ZN}{##3##4##5}{\chemicaltextelementnumber}{0},
+ ZT##3##4##5=>\processchemicaltextelement{ZN}{##3##4##5}{#1}{0}{},
+RN##3##4##5=>\processchemicaltextconstant{RN}{##3##4##5}{\chemicaltextelementnumber}{0},
+RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{},
+ AU##3##4##5=>\processchemicaluparrowsegment{A}{##3##4##5},
+ AD##3##4##5=>\processchemicaldownarrowsegment{A}{##3##4##5},
+ CD##3##4##5=>\processchemicaldottsegment{C}{##3##4##5},
+ CC##3##4##5=>\processchemicalcircsegment{CC}{##3##4##5},
+ DB##3##4##5=>\processchemicallinesegment{DB}{##3##4##5},
+ EB##3##4##5=>\processchemicallinesegment{EB}{##3##4##5},
+ ER##3##4##5=>\processchemicallinesegment{ER}{##3##4##5},
+ RZ##3##4##5=>\processchemicaltextelement{RZ}{##3##4##5}{#1}{6}
+ {l,l,t,r,r,b, l,r,r,r,l,l, r,r,b,l,l,t, r,l,l,l,r,r},
+ SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
+ SR##3##4##5=>\processchemicallinesegment{SR}{##3##4##5},
+ DR##3##4##5=>\processchemicallinesegment{DR}{##3##4##5},
+ -R##3##4##5=>\processchemicallinesegment{-R}{##3##4##5},
+ +R##3##4##5=>\processchemicallinesegment{+R}{##3##4##5},
+ B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
+ C##2##3##4##5=>\processchemicalcircsegment{C}{##2##3##4##5},
+ R##2##3##4##5=>\processchemicallinesegment{R}{##2##3##4##5},
+ S##2##3##4##5=>\processchemicallinesegment{S}{##2##3##4##5},
+ Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
+
+\def\executechemicalEIGHT[#1]%
+ {\setchemicalname EIGHT
+ %
+ \setchemicalmaximum 8
+ %\setchemicalsubstitute 1307
+ \setchemicaldistance 1207
+ %
+ \setchemicalrotation 1 .707 .707 - - - - - -
+ \setchemicalrotation 2 0 1 - - - - - -
+ \setchemicalrotation 3 -.707 .707 - - - - - -
+ \setchemicalrotation 4 -1 0 - - - - - -
+ \setchemicalrotation 5 -.707 -.707 - - - - - -
+ \setchemicalrotation 6 0 -1 - - - - - -
+ \setchemicalrotation 7 .707 -.707 - - - - - -
+ \setchemicalrotation 8 1 0 - - - - - -
+ %
+ \setchemicalangle 1 45 - - -
+ \setchemicalangle 2 90 - - -
+ \setchemicalangle 3 135 - - -
+ \setchemicalangle 4 180 - - -
+ \setchemicalangle 5 225 - - -
+ \setchemicalangle 6 270 - - -
+ \setchemicalangle 7 315 - - -
+ \setchemicalangle 8 0 - - -
+ %
+ \setchemicaltranslate 1 -2414 0
+ \setchemicaltranslate 2 -1706 1706
+ \setchemicaltranslate 3 0 2414
+ \setchemicaltranslate 4 1706 1706
+ \setchemicaltranslate 5 2414 0
+ \setchemicaltranslate 6 1706 -1706
+ \setchemicaltranslate 7 0 -2414
+ \setchemicaltranslate 8 -1706 -1706
+ %
+ \setchemicallinesegment B 1207 500 1207 -500
+ \setchemicallinesegment SB 1207 240 1207 -240
+ \setchemicallinesegment -SB 1207 240 1207 -500
+ \setchemicallinesegment +SB 1207 500 1207 -240
+ %
+ \setchemicaltextelement Z 1207 500
+ %
+ \def\processchemical[##1##2##3##4##5]%
+ {\processaction
+ [##1##2##3##4##5]
+ [ PB:##4##5=>\beginchemicalpicture{##4##5},
+ PE????=>\endchemicalpicture,
+ %SUB##4##5=>\processchemicalsubstitute{##4##5},
+ ADJ##4##5=>\processchemicaldistance{##4##5},
+ MOV##4##5=>\processchemicaltranslate{##4##5},
+ -SB##4##5=>\processchemicallinesegment{-SB}{##4##5},
+ +SB##4##5=>\processchemicallinesegment{+SB}{##4##5},
+ SB##3##4##5=>\processchemicallinesegment{SB}{##3##4##5},
+ B##2##3##4##5=>\processchemicallinesegment{B}{##2##3##4##5},
+ Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
+
+\def\executechemicalFIVEFRONT[#1]%
+ {\executechemicalFIVE[]%
+ %
+ \setchemicalname FIVEFRONT
+ %
+ \setchemicallinesegment -R 688 500 688 100
+ \setchemicallinesegment +R 688 500 688 900
+ %
+ \setchemicaltextelement -RZ 0 -1300
+ \setchemicaltextelement +RZ 0 1300
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\def\chemicalrotation{2}%
+ \processaction
+ [##1##2##3##4]
+ [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{5}
+ {,,,,, t,t,t,t,t},
+ +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{5}
+ {,,,,, b,b,b,b,b},
+ -SB##4=>\processchemicallinesegment{-SB}{##4},
+ +SB##4=>\processchemicallinesegment{+SB}{##4},
+ SB##3##4=>\processchemicallinesegment{SB}{##3##4},
+ -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
+ +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
+ BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
+ R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
+ \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
+ B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
+ Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+\def\executechemicalSIXFRONT[#1]%
+ {\executechemicalSIX[]%
+ %
+ \setchemicalname SIXFRONT
+ %
+ \setchemicallinesegment -R 866 500 866 100
+ \setchemicallinesegment +R 866 500 866 900
+ %
+ \setchemicaltextelement -RZ 0 -1300
+ \setchemicaltextelement +RZ 0 1300
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\def\chemicalrotation{2}%
+ \processaction
+ [##1##2##3##4]
+ [ -RZ##4=>\processchemicalunrotatedtextelement{Z}{-RZ}{##4}{#1}{6}
+ {,,,,,, t,t,t,t,t,t},
+ +RZ##4=>\processchemicalunrotatedtextelement{Z}{+RZ}{##4}{#1}{6}
+ {,,,,,, b,b,b,b,b,b},
+ -SB##4=>\processchemicallinesegment{-SB}{##4},
+ +SB##4=>\processchemicallinesegment{+SB}{##4},
+ SB##3##4=>\processchemicallinesegment{SB}{##3##4},
+ -R##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##3##4},
+ +R##3##4=>\processchemicalunrotatedlinesegment{b}{+R}{##3##4},
+ BB##3##4=>\processchemicalzlinesegment{B}{##3##4},
+ R##2##3##4=>\processchemicalunrotatedlinesegment{t}{-R}{##2##3##4}%
+ \processchemicalunrotatedlinesegment{b}{+R}{##2##3##4},
+ B##2##3##4=>\processchemicallinesegment{B}{##2##3##4},
+ Z##2##3##4=>\processchemicaltextelement{Z}{##2##3##4}{#1}{0}{},
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+% 1 : 0
+% 2 : -115
+% 3* : -195
+% 3 : -165
+% 4 : -245
+
+\def\executechemicalCARBON[#1]%
+ {\setchemicalname CARBON
+ %
+ \setchemicalmaximum 4
+ \setchemicaldistance 0
+ \setchemicalsubstitute 0
+ %
+ \setchemicalrotation 1 1 0 0 -1 -1 0 0 1
+ \setchemicalrotation 2 -0.423 -0.906 -0.906 0.423 0.423 0.906 0.906 -0.423
+ \setchemicalrotation 3 -0.966 -0.259 -0.259 0.966 0.966 0.259 0.259 -0.966
+ \setchemicalrotation 3* -0.966 0.259 0.259 0.966 0.966 -0.259 -0.259 -0.966
+ \setchemicalrotation 4 -0.423 0.906 0.906 0.423 0.423 -0.906 -0.906 -0.423
+ %
+ \setchemicalangle 1 0 90 180 270
+ \setchemicalangle 2 115 205 295 25
+ \setchemicalangle 3 165 255 345 75
+ \setchemicalangle 3* 195 285 15 105
+ \setchemicalangle 4 245 335 65 155
+ %
+ \setchemicaltranslate 1 -1500 0
+ \setchemicaltranslate 2 0 1500
+ \setchemicaltranslate 3 1500 0
+ \setchemicaltranslate 4 0 -1500
+ %
+ \setchemicallinesegment B1 500 0 1000 0
+ \setchemicallinesegment B2 300 0 1000 0
+ \setchemicallinesegment B3 500 0 1000 0
+ \setchemicallinesegment B4 300 0 1000 0
+ %
+ \setchemicaltextelement Z 1100 0
+ %
+ \setchemicalcircsegment C 0 360 500 360 0 -500
+ %
+ \def\processchemical[##1##2##3##4##5]%
+ {\processaction
+ [##1##2##3##4##5]
+ [ MIR????=>\setchemicalmirror{3},
+ -MIR????=>\resetchemicalmirror{3},
+ *MIR????=>\togglechemicalmirror{3},
+ CB????=>\processlocalchemicals{B,C,Z},
+ C????=>\processchemicalcircsegment{C}{1????},
+ -ROT##5=>\reversechemical{ROT}{##5}{3,4,1,2},
+ ROT##4##5=>\processchemicalrotation{##4##5},
+ MOV##4##5=>\processchemicaltranslate{##4##5},
+ CB##3##4##5=>\processlocalchemicals
+ {ROT##3,C,B,Z2..4,
+ MOV##3,*MIR,-ROT##3,C,B,Z2..4},
+ B##2##3##4##5=>\processprivatechemicallinesegment{B}{##2##3##4##5},
+ Z##2##3##4##5=>\processchemicaltextelement{Z}{##2##3##4##5}{#1}{4}
+ {l,t,r,b, t,r,b,l, r,b,l,t, b,l,t,r},
+ \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
+
+% 1: 45 2: -90 3: -225
+% 4: -45 5: -135 6: -270
+
+\newif\ifNEWMANstagger \NEWMANstaggertrue
+
+\def\executechemicalNEWMANSTAGGER%
+ {\NEWMANstaggertrue\executechemicalNEWMAN}
+
+\def\executechemicalNEWMANECLIPSE%
+ {\NEWMANstaggerfalse\executechemicalNEWMAN}
+
+\def\executechemicalNEWMAN[#1]%
+ {\setchemicalname NEWMAN
+ %
+ \setchemicalmaximum 6
+ \setchemicaldistance 0
+ \setchemicalsubstitute 0
+ %
+ \ifNEWMANstagger
+ \setchemicalrotation 1 0.707 0.707 0.707 -0.707 -0.707 -0.707 -0.707 0.707
+ \setchemicalrotation 2 0 -1 -1 0 0 1 1 0
+ \setchemicalrotation 3 -0.707 0.707 0.707 0.707 0.707 -0.707 -0.707 -0.707
+ \else
+ \setchemicalrotation 1 .866 -.5 -.5 -.866 -.866 .5 .5 .866
+ \setchemicalrotation 2 -.259 .966 .966 .259 .259 -.966 -.966 -.259
+ \setchemicalrotation 3 -.5 -.866 -.866 .5 .5 .866 .866 -.5
+ \fi
+ \setchemicalrotation 4 0.707 -0.707 -0.707 -0.707 -0.707 0.707 0.707 0.707
+ \setchemicalrotation 5 -0.707 -0.707 -0.707 0.707 0.707 0.707 0.707 -0.707
+ \setchemicalrotation 6 0 1 1 0 0 -1 -1 0
+ %
+ \ifNEWMANstagger
+ \setchemicalangle 1 315 45 135 225
+ \setchemicalangle 2 90 180 270 0
+ \setchemicalangle 3 225 315 45 135
+ \else
+ \setchemicalangle 1 30 120 210 300
+ \setchemicalangle 2 255 345 75 165
+ \setchemicalangle 3 120 210 300 30
+ \fi
+ \setchemicalangle 4 45 135 225 315
+ \setchemicalangle 5 135 225 315 45
+ \setchemicalangle 6 270 0 90 180
+ %
+ \setchemicaltranslate 1 -1500 0
+ \setchemicaltranslate 2 0 1500
+ \setchemicaltranslate 3 1500 0
+ \setchemicaltranslate 4 0 -1500
+ %
+ \setchemicallinesegment B1 0 0 1000 0
+ \setchemicallinesegment B2 0 0 1000 0
+ \setchemicallinesegment B3 0 0 1000 0
+ \setchemicallinesegment B4 500 0 1000 0
+ \setchemicallinesegment B5 500 0 1000 0
+ \setchemicallinesegment B6 500 0 1000 0
+ %
+ \setchemicaltextelement Z 1100 0
+ %
+ \setchemicalcircsegment C 0 360 500 360 0 -500
+ %
+ \def\processchemical[##1##2##3##4]%
+ {\processaction
+ [##1##2##3##4]
+ [STAGGER????=>{\executechemicalNEWMANSTAGGER[#1]},
+ ECLIPSE????=>{\executechemicalNEWMANECLIPSE[#1]},
+ B????=>\processlocalchemicals{B1..6},
+ CB????=>\processlocalchemicals{B1..6,C,Z1..6},
+ C????=>\processchemicalcircsegment{C}{1????},
+ ROT##4=>\processchemicalrotation{##4},
+ MOV##4=>\processchemicaltranslate{##4},
+ B##2##3##4=>\processprivatechemicallinesegment{B}{##2##3##4},
+ Z##2##3##4=>\ifNEWMANstagger
+ \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
+ {l,t,r,l,r,b, l,r,l,r,r,l, r,b,l,r,l,t, r,l,r,l,l,r}%
+ \else
+ \processchemicaltextelement{Z}{##2##3##4}{#1}{6}
+ {l,r,t,t,r,b, t,b,r,r,b,l, r,l,b,b,l,t, b,t,l,l,t,r}%
+ \fi,
+ \s!unknown=>\unknownchemical{##1##2##3##4}]}}
+
+\def\executechemicalCHAIR[#1]% smaller
+ {\setchemicalname CHAIR
+ %
+ \setchemicalmaximum 6
+ %
+ \setchemicallinesegment B1 1600 800 2800 -800
+ \setchemicallinesegment B2 2800 -800 800 0
+ \setchemicallinesegment B3 800 0 -1600 -800
+ \setchemicallinesegment B4 -1600 -800 -2800 800
+ \setchemicallinesegment B5 -2800 800 -800 0
+ \setchemicallinesegment B6 -800 0 1600 800
+ %
+ \setchemicallinesegment +R1 1600 800 1600 1600
+ \setchemicallinesegment +R2 2800 -800 2800 -1600
+ \setchemicallinesegment +R3 800 0 800 800
+ \setchemicallinesegment +R4 -1600 -800 -1600 -1600
+ \setchemicallinesegment +R5 -2800 800 -2800 1600
+ \setchemicallinesegment +R6 -800 0 -800 -800
+ %
+ \setchemicallinesegment -R1 1600 800 2350 522 % 750 278
+ \setchemicallinesegment -R2 2800 -800 3493 -400
+ \setchemicallinesegment -R3 800 0 1329 -600 % 528 600
+ \setchemicallinesegment -R4 -1600 -800 -2350 -522 % 750 278
+ \setchemicallinesegment -R5 -2800 800 -3493 400
+ \setchemicallinesegment -R6 -800 0 -1329 600 % 528 600
+ %
+ \setchemicaltextelement +RZ1 1600 1800
+ \setchemicaltextelement +RZ2 2800 -1800
+ \setchemicaltextelement +RZ3 800 1000
+ \setchemicaltextelement +RZ4 -1600 -1800
+ \setchemicaltextelement +RZ5 -2800 1800
+ \setchemicaltextelement +RZ6 -800 -1000
+ %
+ \setchemicaltextelement -RZ1 2538 453 % 200 lang
+ \setchemicaltextelement -RZ2 3666 -300
+ \setchemicaltextelement -RZ3 1460 -750
+ \setchemicaltextelement -RZ4 -2538 -453
+ \setchemicaltextelement -RZ5 -3666 300
+ \setchemicaltextelement -RZ6 -1460 750
+ %
+ \def\processchemical[##1##2##3##4##5]%
+ {\def\chemicalrotation{1}%
+ \processaction
+ [##1##2##3##4##5]
+ [ B????=>\processlocalchemicals{B1,B2,B3,B4,B5,B6},
+ -R????=>\processlocalchemicals{-R1,-R2,-R3,-R4,-R5,-R6},
+ +R????=>\processlocalchemicals{+R1,+R2,+R3,+R4,+R5,+R6},
+ B##2????=>{\getchemicallinesegment[0][B##2]},
+ -RZ##4????=>{\getchemicalfixedtextelement[-RZ##4][1][##4][l,l,tc,r,r,bc][#1]},
+ +RZ##4????=>{\getchemicalfixedtextelement[+RZ##4][1][##4][c][#1]},
+ -R##3????=>{\getchemicallinesegment[0][-R##3]},
+ +R##3????=>{\getchemicallinesegment[0][+R##3]},
+ \s!unknown=>\unknownchemical{##1##2##3##4##5}]}}
+
+\def\executechemicalarrow#1#2[#3]%
+ {\dogetcommalistelement1\from#3\to\toptext
+ \dogetcommalistelement2\from#3\to\bottext
+ \def\dochemicaltext##1%
+ {\dosetsubscripts%
+ $\@@chemicalletter{\@@localchemicalformat\strut##1}$%
+ \doresetsubscripts}%
+ \doifelse{\@@chemicalplaats}{\v!intekst}%
+ {#1{\dochemicaltext\toptext}}%
+ {\setbox\chemicalsymbols=\hbox
+ {\box\chemicalsymbols
+ \vbox{\halign{##\cr
+ \hbox to 3em{\hss\dochemicaltext{\toptext}\hss}\cr
+ #2%
+ \hbox to 3em{\hss\dochemicaltext{\bottext}\hss}\cr}}}}}
+
+\def\executechemicalGIVES%
+ {\executechemicalarrow
+ {\chemicalsinglepicturearrow}% nodig
+ {\rightarrowfill\cr}}
+
+\def\executechemicalEQUILIBRIUM%
+ {\executechemicalarrow
+ {\chemicaldoublepicturearrow}% nodig
+ {\rightarrowfill\cr\leftarrowfill\cr}}
+
+\def\executechemicalMESOMERIC%
+ {\executechemicalarrow
+ {\chemicalsinglepicturearrow}% nodig
+ {$\leftarrow\hskip-1em$\rightarrowfill\cr}}
+
+\def\executechemicalsign#1[#2]%
+ {\doifelse{\@@chemicalplaats}{\v!intekst}
+ {\dosetsubscripts
+ $\@@chemicalletter{\@@localchemicalformat#1}$%
+ \doresetsubscripts}
+ {\setbox\chemicalsymbols=\hbox
+ {\box\chemicalsymbols
+ \dosetsubscripts
+ $\@@chemicalletter{\@@localchemicalformat#1}$%
+ \doresetsubscripts}}}
+
+\def\executechemicalPLUS%
+ {\executechemicalsign{+}}
+
+\def\executechemicalMINUS%
+ {\executechemicalsign{-}}
+
+\def\executechemicalEQUAL%
+ {\executechemicalsign{=}}
+
+\def\executechemicalSPACE[#1]%
+ {\doifnot{\@@chemicalplaats}{\v!intekst}%
+ {\setbox\chemicalsymbols=\hbox
+ {\box\chemicalsymbols
+ \quad}}}
+
+\def\executechemicalCHEM[#1]%
+ {\doifnot{\@@chemicalplaats}{\v!intekst}%
+ {\setbox\chemicalsymbols=\hbox
+ {\box\chemicalsymbols
+ $\@@chemicalletter{\@@localchemicalformat#1}$}}}
+
+\def\executechemicalTEXT[#1]%
+ {\doifnot{\@@chemicalplaats}{\v!intekst}%
+ {\setbox\chemicalsymbols=\hbox
+ {\box\chemicalsymbols#1}}}
+
+%\def\executechemicalLOW[#1]%
+% {\setlowsubscripts}
+%
+%\def\executechemicalHIGH[#1]%
+% {\sethighsubscripts}
+
+\def\putchemicalrule#1#2#3#4%
+ {\ifcase\chemicaldrawingmode
+ \putrule from {#1} {#2} to {#3} {#4}
+ \or
+ \psline(#1,#2)(#3,#4)%
+ \or
+ \bgroup
+ \!!counta=#1\!!countb=#2\!!countc=#3\!!countd=#4\relax
+ \global\MPdrawingdonetrue
+ \startMPdrawing
+ x1 := \MPdivten[\the\!!counta]u ;
+ y1 := \MPdivten[\the\!!countb]u ;
+ x2 := \MPdivten[\the\!!countc]u ;
+ y2 := \MPdivten[\the\!!countd]u ;
+ draw z1--z2 ;
+ \stopMPdrawing
+ \egroup
+ \fi}
+
+\def\executechemicalcomplex#1%
+ {\bgroup
+ \putchemicalrule {0} {-\@@chemicalonder} {0} {\@@chemicalboven}%
+ \putchemicalrule {0} {\@@chemicalboven} {#1150} {\@@chemicalboven}%
+ \putchemicalrule {0} {-\@@chemicalonder} {#1150} {-\@@chemicalonder}%
+ \egroup}
+
+\def\executechemicalOPENCOMPLEX[#1]%
+ {\executechemicalcomplex+\ignorespaces
+ \executechemicalSPACE[]}
+
+\def\executechemicalCLOSECOMPLEX[#1]%
+ {\executechemicalSPACE[]%
+ \executechemicalcomplex-\ignorespaces}
+
+% nog niet door midden as!
+
+\def\executechemicalverticalsymbol#1#2%
+ {\executechemicalTEXT
+ [$\left#1\relax
+ \dimen0=\@@chemicalunit
+ \scratchcounter=\@@chemicalboven
+ \advance\scratchcounter by \@@chemicalonder
+ \dimen0=\scratchcounter\dimen0
+ \vcenter to \dimen0{}
+ \dimen2=\@@chemicalunit
+ \dimen2=\@@chemicalrechts\dimen0
+ \vcenter{\leftskip1em\hsize\dimen2\relax\strut#2\strut}%
+ \right.$]}%
+
+\def\executechemicalUPARROW[#1]%
+ {\executechemicalverticalsymbol\uparrow{#1}}
+
+\def\executechemicalDOWNARROW[#1]%
+ {\executechemicalverticalsymbol\downarrow{#1}}
+
+\def\executechemicalUPDOWNARROW[#1]%
+ {\executechemicalverticalsymbol\updownarrow{#1}}
+
+\setupchemical
+ [\c!breedte=0,
+ \c!hoogte=0,
+ \c!links=0,
+ \c!rechts=0,
+ \c!boven=0,
+ \c!onder=0,
+ \c!korps=\the\bodyfontsize,
+ \c!resolutie=\outputresolution,
+ \c!schaal=\v!middel,
+ \c!formaat=\v!middel,
+ \c!tekstformaat=\v!groot,
+ \c!kader=\v!uit,
+ \c!assenstelsel=\v!uit,
+ \c!status=\v!start,
+ \c!letter=\rm,
+ \c!plaats=,
+ \c!optie=,
+ \c!offset=LOW,
+ \c!variant=1]
+
+% Tijdelijk plaatsen we deze extra macro's hier.
+%
+% mathontop: \mtop {} {}
+% textontop: \ttop {} {}
+
+\def\putontop#1#2%
+ {\vbox
+ {\halign
+ {\strut\hss##\hss\cr
+ #1\cr
+ #2\cr}}}
+
+\def\ttop#1#2%
+ {\putontop{\tx#1}{#2}}
+
+\def\mtop#1#2%
+ {\vbox
+ {\offinterlineskip
+ \halign
+ {\hss##\hss\cr
+ $\scriptscriptstyle#1$\cr
+ \noalign{\vskip.5ex}%
+ $#2$\cr}}}
+
+\def\ctop#1#2%
+ {\vbox
+ {\offinterlineskip
+ \halign
+ {\hss##\hss\cr
+ $\@@chemicalletter{\@@localchemicalformat\scriptscriptstyle#1}$\cr
+ \noalign{\vskip.5ex}%
+ $\@@chemicalletter{\@@localchemicalformat#2}$\cr}}}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/reich.tex b/tex/context/base/reich.tex
new file mode 100644
index 000000000..3be5ae42e
--- /dev/null
+++ b/tex/context/base/reich.tex
@@ -0,0 +1,11 @@
+\citaat {Heavy smoke}
+\citaat {Stand by, stand by}
+\citaat {It's full a' smoke}
+\citaat {Full a' smoke}
+\citaat {Urgent}
+\citaat {Guns, knives or weapons on ya?}
+\citaat {Wha' were ya doin'?}
+\citaat {Be careful}
+\citaat {Where you go}
+\citaat {Careful}
+\citaat {Stand by}
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
new file mode 100644
index 000000000..a07103387
--- /dev/null
+++ b/tex/context/base/s-abr-01.tex
@@ -0,0 +1,147 @@
+%D \module
+%D [ file=s-abr-01,
+%D version=1996.01.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 1,
+%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
+
+\stelsorterenin[logo][\c!letter=\v!kapitaal]
+
+\setupcapitals[\c!titel=\v!nee]
+
+\protect
+
+\logo [ACROBAT] {Acrobat}
+\logo [AMSTEX] {\AmSTeX}
+\logo [AMS] {ams}
+\logo [ANSI] {ansi}
+\logo [ASCIITEX] {ascii\TeX}
+\logo [ASCII] {ascii}
+\logo [CMR] {cmr}
+\logo [CMYK] {cmyk}
+\logo [CONTEXT] {\ConTeXt}
+\logo [CTAN] {ctan}
+\logo [CWEB] {cweb}
+\logo [DISTILLER] {distiller}
+\logo [DVIPSONE] {dvipsone}
+\logo [DVIPS] {dvips}
+\logo [DVISCR] {dviscr}
+\logo [DVIWINDO] {dviwindo}
+\logo [DVI] {dvi}
+\logo [EC] {ec}
+\logo [EMACS] {emacs}
+\logo [EMTEX] {em\TeX}
+\logo [EPS] {eps}
+\logo [ETEX] {\eTeX}
+\logo [FDF] {fdf}
+\logo [FGBBS] {fgbbs}
+\logo [GHOSTSCRIPT]{GhostScript}
+\logo [GHOSTVIEW] {GhostView}
+\logo [GS] {GhostScript}
+\logo [HTML] {html}
+\logo [IBM] {ibm}
+\logo [INRSTEX] {inrs\TeX}
+\logo [JAVASCRIPT] {JavaScript}
+\logo [JAVA] {Java}
+\logo [JPG] {jpg}
+\logo [LAMSTEX] {\LamSTeX}
+\logo [LATEXTE] {\LaTeX2e}
+\logo [LATEXTN] {\LaTeX2.09}
+\logo [LATEX] {\LaTeX}
+\logo [MAPS] {Maps}
+\logo [METAFONT] {\MetaFont}
+\logo [METAPOST] {\MetaPost}
+\logo [MODULA] {Modula}
+\logo [MOV] {mov}
+\logo [MPS] {mps}
+\logo [MSDOS] {msdos}
+\logo [MSWINDOWS] {MSWindows}
+\logo [NTG] {ntg}
+\logo [NTS] {nts}
+\logo [PDFETEX] {pdf-\eTeX}
+\logo [PDFTEX] {pdf\TeX}
+\logo [PDF] {pdf}
+\logo [PERL] {Perl}
+\logo [PICTEX] {\PiCTeX}
+\logo [PLAIN] {\kap{PLAIN}}
+\logo [PNG] {png}
+\logo [POSTSCRIPT] {PostScript}
+\logo [PPCHTEX] {\PPCHTeX}
+\logo [PRAGMA] {Pragma ADE}
+\logo [PRESS] {press}
+\logo [PRIFIL] {prifil}
+\logo [PSCHECK] {pscheck}
+\logo [PSTOPAGE] {pstopage}
+\logo [PSTRICKS] {pstricks}
+\logo [PS] {PostScript}
+\logo [RGB] {rgb}
+\logo [SGML] {sgml}
+\logo [SI] {si}
+\logo [TABLE] {\TaBlE}
+\logo [TEXADRES] {\TeX adress}
+\logo [TEXBASE] {\TeX base}
+\logo [TEXEDIT] {\TeX edit}
+\logo [TEXEXEC] {\TeX exec}
+\logo [TEXFORM] {\TeX form}
+\logo [TEXNL] {\kap{TEX-NL}}
+\logo [TEXSPELL] {\TeX spell}
+\logo [TEXUTIL] {\TeX util}
+\logo [TEX] {\TeX}
+\logo [TFM] {tfm}
+\logo [TIFFINFO] {tiffinfo}
+\logo [TIFFTAGS] {tifftags}
+\logo [TIFF] {tiff}
+\logo [TIF] {tif}
+\logo [TPIC] {tpic}
+\logo [TUGBOAT] {TugBoat}
+\logo [TUGBOAT] {TugNews}
+\logo [TUGNEWS] {Tug News}
+\logo [TUG] {tug}
+\logo [URI] {uri}
+\logo [URL] {url}
+\logo [USA] {usa}
+\logo [WDT] {wdt}
+\logo [XML] {xml}
+\logo [XINDY] {Xindy}
+\logo [YandY] {y\&y}
+
+\def\SystemSpecialA#1{$\langle\it#1\rangle$}
+\def\SystemSpecialB#1{{\tttf<#1>}}
+
+\def\CATCODE {\SystemSpecialA{catcode}}
+\def\CATCODES {\SystemSpecialA{catcodes}}
+\def\DIMENSION {\SystemSpecialA{dimension}}
+\def\DIMENSIONS {\SystemSpecialA{dimensions}}
+\def\COUNTER {\SystemSpecialA{counter}}
+\def\COUNTERS {\SystemSpecialA{counters}}
+\def\HBOX {\SystemSpecialA{hbox}}
+\def\HBOXES {\SystemSpecialA{hboxes}}
+\def\VBOX {\SystemSpecialA{vbox}}
+\def\VBOXES {\SystemSpecialA{vboxes}}
+\def\BOX {\SystemSpecialA{box}}
+\def\BOXES {\SystemSpecialA{boxes}}
+\def\TOKENLIST {\SystemSpecialA{token list}}
+\def\TOKENLISTS {\SystemSpecialA{token lists}}
+\def\NEWLINE {\SystemSpecialA{newline}}
+\def\SKIP {\SystemSpecialA{skip}}
+\def\SKIPS {\SystemSpecialA{skips}}
+\def\MUSKIP {\SystemSpecialA{muskip}}
+\def\MUSKIPS {\SystemSpecialA{muskips}}
+\def\MARK {\SystemSpecialA{mark}}
+\def\MARKS {\SystemSpecialA{marks}}
+
+\def\SPACE {\SystemSpecialB{space}}
+\def\EOF {\SystemSpecialB{eof}}
+\def\TAB {\SystemSpecialB{tab}}
+\def\NEWPAGE {\SystemSpecialB{newpage}}
+\def\NEWLINE {\SystemSpecialB{newline}}
+
+\endinput
diff --git a/tex/context/base/s-abr-02.tex b/tex/context/base/s-abr-02.tex
new file mode 100644
index 000000000..e071131b9
--- /dev/null
+++ b/tex/context/base/s-abr-02.tex
@@ -0,0 +1,24 @@
+%D \module
+%D [ file=s-abr-02,
+%D version=1996.01.01,
+%D title=\CONTEXT\ Style File,
+%D subtitle=General Abbreviations 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.
+
+\usemodule[abr-01]
+
+\unprotect
+
+\stelsorterenin[logo][\c!letter=\v!smallcaps]
+
+\setupcapitals[\c!titel=\v!nee]
+
+\protect
+
+\endinput
diff --git a/tex/context/base/s-faq-00.tex b/tex/context/base/s-faq-00.tex
new file mode 100644
index 000000000..60b96e860
--- /dev/null
+++ b/tex/context/base/s-faq-00.tex
@@ -0,0 +1,93 @@
+%D \module
+%D [ file=s-faq-00,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Common 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.
+
+\usemodule[abr-01]
+
+\defineblock[question]
+\defineblock[answer]
+
+\def\ScreenFAQ {fs-\TagOfFAQ-\LanguageOfFAQ}
+\def\PaperFAQ {fp-\TagOfFAQ-\LanguageOfFAQ}
+\def\FileNameOfFAQ {fa-\TagOfFAQ-\LanguageOfFAQ}
+
+\language
+ [\HyphenationOfFAQ]
+
+\setupwhitespace
+ [big]
+
+\setupbodyfont
+ [ams]
+
+\setuptolerance
+ [tolerant]
+
+\setupregister
+ [index]
+ [indicator=no]
+
+\setupframedtexts
+ [width=\hsize]
+
+\setupblock
+ [question]
+ [before=\startframedtext,
+ after=\stopframedtext]
+
+\setupblock
+ [answer]
+ [after=\EndAnswer]
+
+\def\EndAnswer {}
+
+\def\AuthorOfFAQ {}
+\def\IndexOfFAQ {}
+
+\def\FrequentlyAskedQuestion#1#2%
+ {\pagina
+ \doglobal\increment\CurrentNOfFAQ
+ \pagereference[faq:\CurrentNOfFAQ]
+ \gdef\IndexOfFAQ{#1}
+ \gdef\AuthorOfFAQ{#2}}
+
+\newcounter\CurrentNOfFAQ
+
+\setuplabeltext [nl] [FAQ=Vaak gestelde vragen]
+\setuplabeltext [du] [FAQ=Oft gestellte Fragen]
+\setuplabeltext [en] [FAQ=Frequently Asked Questions]
+
+\setuplabeltext [nl] [about=over]
+\setuplabeltext [du] [about=zu]
+\setuplabeltext [en] [about=about]
+
+\setuplabeltext [nl] [version=Versie]
+\setuplabeltext [du] [version=Version]
+\setuplabeltext [en] [version=Version]
+
+\setuplabeltext [nl] [goback=terug]
+\setuplabeltext [du] [goback=zur\"uck]
+\setuplabeltext [en] [goback=go back]
+
+\setuplabeltext [nl] [paper=papier]
+\setuplabeltext [du] [paper=Papier]
+\setuplabeltext [en] [paper=paper]
+
+\setuplabeltext [nl] [faqs=FAQ's]
+\setuplabeltext [du] [faqs=FAQs]
+\setuplabeltext [en] [faqs=FAQ's]
+
+\setuplabeltext [nl] [index=index]
+\setuplabeltext [du] [index=Index]
+\setuplabeltext [en] [index=index]
+
+\endinput
diff --git a/tex/context/base/s-faq-01.tex b/tex/context/base/s-faq-01.tex
new file mode 100644
index 000000000..46535cb77
--- /dev/null
+++ b/tex/context/base/s-faq-01.tex
@@ -0,0 +1,178 @@
+%D \module
+%D [ file=s-faq-01,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Interactive Version,
+%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.
+
+\usemodule[faq-00]
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [topspace=.5cm,
+ backspace=.5cm,
+ margin=0pt,
+ height=fit,
+ header=0pt,
+ width=fit,
+ footer=0pt,
+ bottomdistance=12pt,
+ bottom=18pt]
+
+\setupinteractionscreen
+ [width=fit,
+ height=fit,
+ option=max]
+
+\setupinteraction
+ [state=start,
+ page=yes,
+ color=red,
+ menu=on]
+
+\setupcolors
+ [state=start]
+
+\setupbackgrounds
+ [page]
+ [offset=3pt]
+
+\setupbackgrounds
+ [text,bottom]
+ [text]
+ [background=screen]
+
+\setupframedtexts
+ [background=color,
+ backgroundcolor=white,
+ framecolor=red]
+
+\useexternaldocument
+ [paperfaq]
+ [\PaperFAQ]
+ []
+
+\setupregister
+ [index]
+ [coupling=yes]
+
+\coupleregister
+ [index]
+
+\defineinteractionmenu [bottom 1] [bottom] [state=stop]
+\defineinteractionmenu [bottom 2] [bottom] [state=stop]
+
+\setupinteractionmenu
+ [bottom, bottom 1, bottom 2]
+ [background=color,
+ backgroundcolor=white,
+ color=black,
+ framecolor=red,
+ dummy=yes,
+ middle=\hskip1em,
+ distance=overlay]
+
+\setupinteractionmenu
+ [bottom 1]
+ [{\hfill},
+ {\labeltext{paper}[paperfaq::]},
+ {\labeltext{goback}[PreviousJump]},
+ {\labeltext{faqs}[faqs]},
+ {\labeltext{index}[index]},
+ {\gobackwardcharacter[previouspage]},
+ {\goforwardcharacter[nextpage]}]
+
+\setupinteractionmenu
+ [bottom 2]
+ [{\CurrentIndexOfFAQ},
+ {\hfill},
+ {\labeltext{paper}[paperfaq::faq:\CurrentNOfFAQ]},
+ {\labeltext{goback}[PreviousJump]},
+ {\labeltext{faqs}[faqs]},
+ {\labeltext{index}[index]},
+ {\gobackwardcharacter[previouspage]},
+ {\goforwardcharacter[nextpage]}]
+
+\def\CurrentIndexOfFAQ%
+ {\bgroup
+ \setupinteraction[color=]%
+ \menubox[bottom]{\let\index\coupledindex\IndexOfFAQ}%
+ \egroup}
+
+\setupinteractionmenu
+ [bottom 1]
+ [state=start]
+
+\def\EndAnswer%
+ {\vfill
+ \bgroup
+ \tfx\setstrut
+ \framed
+ [framecolor=red,
+ background=color,
+ backgroundcolor=white]
+ {\AuthorOfFAQ}
+ \egroup}
+
+\def\TitlePage%
+ {\startstandardmakeup
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{FAQ}}
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{about} \NameOfFAQ}
+ \blank[3*big]
+ \midaligned{\bfb \labeltext{version}: \currentdate}
+ \blank[3*big]
+ \midaligned{\tta \ListOfFAQ}
+ \vfill
+ \midaligned{\tta pragma@pi.net}
+ \blank[3*big]
+ \stopstandardmakeup}
+
+\def\FileWithFAQs%
+ {\setupinteractionmenu[bottom 1][state=stop]
+ \setupinteractionmenu[bottom 2][state=start]
+ \page
+ \input \FileNameOfFAQ \relax
+ \page
+ \setupinteractionmenu[bottom 2][state=stop]
+ \setupinteractionmenu[bottom 1][state=start]}
+
+\def\IndexPage%
+ {\page
+ \def\CurrentIndexOfFAQ{}
+ \def\NameOfFAQ{}
+ \pagereference[index]
+ \placeregister[index]
+ \page}
+
+\def\BeginFAQ%
+ {\doglobal\increment\CurrentNOfFAQ
+ \setbox0=\vbox\bgroup
+ \setupframedtexts[before=,after=,linecorrection=off]
+ \startframedtext}
+
+\def\EndFAQ%
+ {\stopframedtext
+ \egroup
+ \button[frame=off,offset=overlay]{\copy0}[faq:\CurrentNOfFAQ]
+ \vskip6pt}
+
+\def\AllFAQs%
+ {\page
+ \def\CurrentIndexOfFAQ{}
+ \def\NameOfFAQ{}
+ \newcounter\CurrentNOfFAQ
+ \setupblock[question][before=\BeginFAQ,after=\EndFAQ]
+ \pagereference[faqs]
+ \useblocks[question]}
+
+\endinput
diff --git a/tex/context/base/s-faq-02.tex b/tex/context/base/s-faq-02.tex
new file mode 100644
index 000000000..ad2e568c1
--- /dev/null
+++ b/tex/context/base/s-faq-02.tex
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=s-faq-02,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ Paper Version,
+%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.
+
+\usemodule[faq-00]
+
+\setuplayout
+ [header=0pt]
+
+\setuppagenumbering
+ [location=]
+
+\setupfootertexts
+ [\labeltext{FAQ}: \NameOfFAQ\IndexOfFAQ][pagenumber]
+
+\def\EndAnswer%
+ {\blank[2*big]
+ \page[no]
+ (\AuthorOfFAQ)}
+
+\def\TitlePage%
+ {\startstandardmakeup
+ \midaligned{\bfd \labeltext{FAQ}}
+ \blank[3*big]
+ \midaligned{\bfd \labeltext{about} \NameOfFAQ}
+ \blank[3*big]
+ \midaligned{\bfb \labeltext{version}: \currentdate}
+ \blank[3*big]
+ \midaligned{\tta \ListOfFAQ}
+ \vfill
+ \midaligned{\tta pragma@pi.net}
+ \blank[3*big]
+ \stopstandardmakeup}
+
+\def\FileWithFAQs%
+ {\page
+ \input \FileNameOfFAQ \relax
+ \page}
+
+\def\IndexPage%
+ {\page
+ \setupfootertexts[\labeltext{index}][]
+ \placeregister[index]}
+
+\endinput
diff --git a/tex/context/base/s-faq-03.tex b/tex/context/base/s-faq-03.tex
new file mode 100644
index 000000000..10d55b993
--- /dev/null
+++ b/tex/context/base/s-faq-03.tex
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=s-faq-03,
+%D version=1997.21.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=FAQ General Framework,
+%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.
+
+\def\PDFscreenFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
+ {\def\NameOfFAQ {#1}
+ \def\TagOfFAQ {#2}
+ \def\LanguageOfFAQ {#3}
+ \def\HyphenationOfFAQ {#4}
+ \def\ListOfFAQ {#5}
+ \usemodule[faq-01]
+ \starttext
+ \TitlePage
+ \FileWithFAQs
+ \IndexPage
+ \AllFAQs
+ \stoptext}
+
+\def\PDFpaperFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
+ {\def\NameOfFAQ {#1}
+ \def\TagOfFAQ {#2}
+ \def\LanguageOfFAQ {#3}
+ \def\HyphenationOfFAQ {#4}
+ \def\ListOfFAQ {#5}
+ \usemodule[faq-02]
+ \starttext
+ \TitlePage
+ \FileWithFAQs
+ \IndexPage
+ \stoptext}
+
+\def\DVIpaperFAQ \name #1 \tag #2 \language #3 \hyphenation #4 \list #5
+ {\def\NameOfFAQ {#1}
+ \def\TagOfFAQ {#2}
+ \def\LanguageOfFAQ {#3}
+ \def\HyphenationOfFAQ {#4}
+ \def\ListOfFAQ {#5}
+ \usemodule[faq-02]
+ \starttext
+ \TitlePage
+ \FileWithFAQs
+ \IndexPage
+ \stoptext}
+
+\endinput
diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex
new file mode 100644
index 000000000..357f25aaa
--- /dev/null
+++ b/tex/context/base/s-map-01.tex
@@ -0,0 +1,613 @@
+%D \module
+%D [ file=s-map-01,
+%D version=1998.05.05,
+%D title=\CONTEXT\ Style File,
+%D subtitle=\MAPS\ basis stijl,
+%D author={Taco Hoekwater \& Hans Hagen},
+%D date=\currentdate,
+%D copyright={NTG / MAPS}]
+
+%D In deze file wordt zowel de dubbelzijdig als de enkelzijdige
+%D layout van de \MAPS\ gedefinieerd. Naast deze file
+%D zijn|/|komen wat aanvullende stijlen voor specifieke
+%D doeleinden beschikbaar.
+
+%D Normaal gesproken wordt met \type{\stelinterliniein} de
+%D interlinie voor het gehele document ingesteld op een
+%D zodanige wijze dat deze voor elk korps vergelijkbaar is. In
+%D de \MAPS\ gebruiken we echter per korps een verschillende
+%D specificatie. De daadwerkelijke definities gebeuren in de
+%D file \type{font-map.tex}.
+
+\unprotect
+
+\definebodyfontenvironment
+ [7pt]
+ [\c!interlinie=8pt,
+ \c!groot=8pt,
+ \c!klein=6pt]
+
+\definebodyfontenvironment
+ [8pt]
+ [\c!interlinie=9pt,
+ \c!groot=9pt,
+ \c!klein=7pt]
+
+\definebodyfontenvironment
+ [9pt]
+ [\c!interlinie=11pt,
+ \c!groot=10pt,
+ \c!klein=8pt]
+
+\definebodyfontenvironment
+ [22pt]
+ [\c!interlinie=22pt,
+ \c!groot=22pt,
+ \c!klein=17pt,
+ \c!x=17pt]
+
+%D Met de instellingen \type{groot} en \type{klein} leggen we
+%D vast naar welk korps wordt overgegaan als we aan
+%D \type{\switchnaarkorps} de trefwoorden \type{klein} of
+%D \type{groot} meegeven. Met \type{x} geven we de maat aan van
+%D de pseudo klein||kapitalen. De \MAPS\ wordt gezet in 9pt.
+
+\setupbodyfont
+ [map,mty,9pt]
+
+%D We gebruiken echte small caps:
+
+\stelsorterenin
+ [logo]
+ [\c!letter=\v!smallcaps]
+
+\setupcapitals
+ [\c!titel=\v!nee]
+
+%D De \MAPS\ heeft de breedte van een A4||tje maar is iets
+%D minder hoog. We definieren daarom een wat afwijkend
+%D papierformaat en projecteren dat op A4.
+
+\definieerpapierformaat % \definepapersize
+ [maps]
+ [\c!breedte=21cm,
+ \c!hoogte=26.4cm]
+
+\stelpapierformaatin % \setuppapersize
+ [maps]
+ [a4]
+
+%D Artikelen in de \MAPS\ worden breed danwel in twee kolommen
+%D gezet. Vooralsnog beperken we de definitie van de layout tot
+%D de een||koloms opmaak.
+
+\stellayoutin
+ [\c!breedte=28pc,
+ \c!marge=9pc,
+ \c!margeafstand=1pc,
+ \c!rugwit=1in,
+ \c!kopwit=1.8cm,
+ \c!regels=53,
+ \c!hoofd=35pt,
+ \c!voet=35pt]
+
+\stelkolommenin
+ [\c!afstand=1pc]
+
+%D Later zullen we zonodig nog instelleb dat de \MAPS\ op een
+%D grid wordt gezet. Het zetten op een grid is voor \TEX\ niet
+%D triviaal, en de ondersteuning in \CONTEXT\ is dan ook
+%D enigzins experimenteel. De \MAPS\ is in die zin een soort
+%D continue testcase.
+
+%D De \MAPS\ wordt vanzelfsprekend dubbelzijdig gezet. Verderop
+%D gaan het paginanummer expliciet plaatsen, vandaar dat we
+%D hier de plaats niet specificeren.
+
+\stelnummeringin
+ [\c!plaats=,
+ \c!variant=\v!dubbelzijdig]
+
+%D De hoofd- en voetregels worden gezet in een sans serif.
+%D Het instellen op layout niveau is efficienter dan op elk
+%D regel niveau.
+
+\stellayoutin
+ [\c!letter=\ss]
+
+%D In principe hebben we 4 verschillende soorten witruimte,
+%D afhankelijk van het al dan niet op grid en/of in
+%D kolommen zetten. We definieren daarom drie soorten wit:
+
+\definieerblanko [mapsvoor] [groot]
+\definieerblanko [mapstussen] [groot]
+\definieerblanko [mapsna] [mapsvoor]
+
+%D Waar nodig springen we in. We willen echter niet inspringen
+%D na een witruimte, vandaar het trefwoord \type{volgende}.
+
+\stelinspringenin
+ [\v!volgende,9.5pt]
+
+%D Hoewel niet strikt noodzakelijk, definities en dergelijke
+%D worden namelijk omgeven door witruimte, stellen we ook hier
+%D in dat we na zo'n definitie niet willen inspringen.
+
+\steldoordefinierenin
+ [\c!springvolgendein=\v!nee]
+
+\steldoornummerenin
+ [\c!springvolgendein=\v!nee]
+
+%D We lijnen netjes uit, behalve in opsommingen, waar we
+%D rechts raffelen. Ook hier springen we niet in na een
+%D opsomming.
+
+\stelopsommingin
+ [\v!elk]
+ [\c!springvolgendein=\v!nee,
+ \c!uitlijnen=\v!rechts]
+
+%D Nu we toch met opsommingen bezig zijn, introduceren we
+%D meteen een nieuw symbool, een vierkantje. We tekenen dit
+%D symbool met behulp van de macros van de visuele debugger.
+
+\def\MapsSymbool%
+ {\hbox
+ {\boxrulewidth=.4pt
+ \raise.2ex\ruledvbox
+ {\phantom{\vrule width .75ex height .75ex}}}}
+
+%D Vervolgens definieren we dit stukje zetwerk als symbool:
+
+\definesymbol
+ [MapsSymbool]
+ [\MapsSymbool]
+
+%D en koppelen het aan de opsommingen op het eerste niveau.
+
+\stelopsommingin
+ [1]
+ [\c!symbool=MapsSymbool]
+
+%D Ook passen we de breedte aan het inspringen aan en
+%D plaatsen we de verschillende items op elkaar. De afstand
+%D speelt vooral een rol als we ruimer willen zetten.
+
+\stelopsommingin
+ [\v!elk]
+ [\c!breedte=9.5pt,
+ \c!afstand=0pt]
+
+\stelopsommingin
+ [1]
+ [\v!opelkaar]
+
+%M % Nodig voor documenteren:
+%M
+%M \unprotect
+%M
+%M \doordefinieren
+%M [MapsBegrip]
+%M [\c!plaats=\v!hangend,
+%M \c!afstand=.75em,
+%M \c!marge=\v!standaard]
+%M
+%M \protect
+
+%D Hoewel auteurs zelf nieuwe begrippen en dergelijke kunnen
+%D definieren, introduceren we een klasse standaard begrippen,
+%D namelijk \type{\MapsBegrip}. Men kan dus een begrip als
+%D volgt definieren:
+%D
+%D \startbuffer
+%D \MapsBegrip {MAPS} Het periodiek van de \NTG\ dat twee maal
+%D per jaar verschijnt.
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D en krijgt dan:
+%D
+%D \haalbuffer
+
+\doordefinieren
+ [MapsBegrip]
+ [\c!plaats=\v!hangend,
+ \c!afstand=.75em,
+ \c!marge=\v!standaard]
+
+%D Om ruimte te sparen, omringen we verbatim niet met hele lege
+%D regels, maar met halve.
+
+\setuptyping
+ [\c!optie=\v!kleur,
+ \c!blanko=mapstussen,
+ \c!voor={\blanko[mapsvoor]},
+ \c!na={\blanko[mapsna]}]
+
+%D Speciaal voor erg brede verbatim teksten, definieren we
+%D een brede variant. Deze steekt alleen op de linkerbladzijden
+%D in de marge.
+
+\definetyping
+ [breedtypen]
+
+\setuptyping
+ [breedtypen]
+ [\c!onevenmarge=-6pc]
+
+%D En dan nu wat echte macro definities. Samenvattingen en
+%D trefwoorden worden links danwel rechts uitgelijnd gezet.
+%D Omdat sommige artikelen ook nog andere introducerende toeters
+%D en bellen hebben, definieren we een algemene macro.
+
+\def\startWhatever#1%
+ {\witruimte
+ \snaptogrid\vbox\bgroup
+ \forgetall
+ \steluitlijnenin[\v!rechts]
+ \parfillskip 0pt plus 1 fill
+ \steltolerantiein[\v!zeersoepel]
+ \stelinspringenin[\v!geen]
+ {\ssbf#1}\par
+ \switchtobodyfont[8pt]
+ \ss\tf
+ \ignorespaces}
+
+\def\stopWhatever%
+ {\par
+ \egroup
+ \blanko[\v!regel]}
+
+%D De macro \type{\snaptogrid} is hier essentieel en zorgt
+%D ervoor dat de tekst op het grid wordt gezet, ondanks de
+%D afwijkende spatiering.
+
+\def\Whatever#1#2%
+ {\startWhatever{#1}#2\stopWhatever}
+
+\def\defineWhatever#1#2%
+ {\setvalue{\e!start#1}{\startWhatever{#2}}
+ \setvalue {\e!stop#1}{\stopWhatever}
+ \setvalue {#1}{\Whatever{#2}}}
+
+\defineWhatever{Abstract}{abstract}
+\defineWhatever{Keywords}{keywords}
+
+%D Een samenvatting ziet er nu als volgt uit:
+%D
+%D \starttypen
+%D \startAbstract ..... \stopAbstract
+%D \stoptypen
+%D
+%D of korter:
+%D
+%D \starttypen
+%D \Abstract{...}
+%D \stoptypen
+%D
+%D Ook hebben we de beschikking over:
+%D
+%D \starttypen
+%D \startWhatever{....} ..... \stopWhatever
+%D \stoptypen
+
+%D We zullen de artikelen per stuk verwerken. Elk artikel heeft
+%D z'n eigen kenmerken, die, zoals we later zullen zien, worden
+%D ingesteld aan heb begin van een artikel:
+%D
+%D \starttypen
+%D \startBijdrage[instellingen]
+%D .....
+%D .....
+%D \stopBijdrage
+%D \stoptypen
+%D
+%D Hieronder is te zien wat de standaard instellingen zijn:
+
+\def\MapsTypering[#1]%
+ {\getparameters
+ [Maps]
+ [Jaar=1999,
+ Periode=Voorjaar,
+ Categorie=Bijlage,
+ Nummer=F,
+ Pagina=43,
+ Titel=Publish or Perish,
+ Subtitel=,
+ Auteur=M.A.P.S. Auteur,
+ Adres=,
+ Email=maps@ntg.nl,
+ Kolommen=\v!nee,
+ Grid=\v!ja,
+ #1]}
+
+%D In het adres en bij de auteur kan men \type{\\} gebruiken
+%D om naar een nieuwe regel over te gaan. Voor de zekerheid
+%D initialiseren we deze instellingen met:
+
+\MapsTypering[Categorie=Voorbeeld]
+
+%D De instellingen zijn beschikbaar als \type{\MapsVariabele}.
+%D In de onderstaande definities van de hoofd- en voetregels
+%D zien we de instellingen terug (de prefix \type{\unexpanded}
+%D zorgt ervoor dat we straffeloos kunnen testen):
+
+\unexpanded\def\LinkerKolomTekst#1%
+ {\rlap{\hbox to 10pc{\hfill#1}}}
+
+\unexpanded\def\RechterKolomTekst#1%
+ {\llap{\hbox to 10pc{#1\hfill}}}
+
+\edef\AuteurScheider{, }
+
+\unexpanded\def\AuteurNamen#1%
+ {{\let\\=\AuteurScheider#1}}
+
+\stelhoofdtekstenin
+ [\MapsTitel]
+ [\LinkerKolomTekst{\MapsCategorie\ \MapsNummer}]
+ [\RechterKolomTekst{\MapsCategorie\ \MapsNummer}]
+ [\AuteurNamen{\MapsAuteur}]
+
+\stelvoettekstenin
+ [\MapsPeriode\ \MapsJaar]
+ [\LinkerKolomTekst{\pagenumber}]
+ [\RechterKolomTekst{\pagenumber}]
+ [MAPS]
+
+%D Voetnoten worden onderaan de bladzijde gezet, of, in geval
+%D van kolommen, in de tweede kolom. We definieren een wat
+%D afwijkende lijn als scheider:
+
+\def\VoetNootLijn%
+ {\strut\vrule height .4pt depth 0pt width 9.25pc
+ \vskip0pt}
+
+\setupfootnotes
+ [\c!korps=8pt,
+ \c!plaats=\v!kolommen,
+ \c!lijn=\VoetNootLijn,
+ \c!voor=\blanko,
+ \c!letter=\v!schuin,
+ \c!nummercommando=]
+
+%D De voetnoot zelf stellen we in met:
+
+\setupfootnotedefinition
+ [\c!plaats=\v!aansluitend,
+ \c!breedte=\v!passend,
+ \c!kopletter=\v!normaal,
+ \c!afstand=.5em]
+
+%D We komen nu aan de wat lastiger macros. Het eerste dat een
+%D bijdrage definitie doet, is nagaan of we in kolommen zetten.
+%D Afhankelijk van de situatie, laden we wat aanvullende
+%D definities. De titelpgina heeft geen hoofdregels en de
+%D titel wordt automatisch gezet.
+
+\def\Bericht{Bericht}
+
+\newif\ifMapsInKolommen
+
+\def\dostartBijdrage[#1]%
+ {\pagina
+ \MapsTypering[#1]
+ \doifelse{\MapsKolommen}{\v!nee}
+ {\MapsInKolommenfalse}
+ {\MapsInKolommentrue}
+ \ifMapsInKolommen
+ \haalbuffer[s-maps-1] % see later on
+ \fi
+ \stelhoofdin[\c!status=\v!leeg]
+ \stelpaginanummerin[\c!nummer=\MapsPagina]
+ \stellayoutin[\c!grid=\MapsGrid]
+ \ifgridsnapping % nog controleren
+ \stelblankoin[\v!regel]
+ \definieerblanko[mapsvoor][\v!halveregel]
+ \definieerblanko[mapstussen][\v!regel]
+ \else
+ \stelblankoin[\v!halveregel]
+ \definieerblanko[\v!middel][\v!halveregel]
+ \definieerblanko[mapsvoor][\v!halveregel]
+ \definieerblanko[mapstussen][\v!halveregel]
+ \fi
+ \snaptogrid\vbox
+ \bgroup
+ \switchtobodyfont[ss,22pt]%\ss
+ \bgroup
+ \topskip 0pt
+ \forgetall
+ \ifMapsInKolommen \steluitlijnenin[\v!links] \fi
+ \noindent\tf\MapsAffiliatieA
+ \ifx\MapsCategorie\Bericht
+ ~\strut
+ \else
+ \MapsCategorie~\MapsNummer
+ \fi
+ \par \kern -.5pt
+ \egroup
+ \bgroup
+ \forgetall
+ \kern 7.5pt
+ \ifMapsInKolommen \steluitlijnenin[\v!links] \fi
+ {\bf\MapsTitel\par}
+ {\bfx\MapsSubtitel\par}
+ \blanko[\v!regel]
+ \kern 3.5pt
+ \egroup
+ \egroup
+ \ifMapsInKolommen\startkolommen\fi
+ \MapsAffiliatieB}
+
+\def\startBijdrage%
+ {\starttekst
+ \dosingleempty\dostartBijdrage}
+
+\def\stopBijdrage%
+ {\ifMapsInKolommen\stopkolommen\fi
+ \stoptekst}
+
+%D De affiliatie wordt in de marge gezet. De wat gecompliceerde
+%D definitie zorgt er voor dat de bovenkant van de eerste
+%D regels uitlijnen. Met \type{\getpagestatus} kunnen we
+%D vaststellen of we op een rechterbladzijde zitten.
+
+\unexpanded\def\MapsAffiliatieA%
+ {\ifMapsInKolommen \else
+ \snaptogrid\vbox\bgroup
+ \setbox0=\hbox{X}%
+ \dimen0=\ht0
+ \switchtobodyfont[9pt,\v!reset]%
+ \setbox0=\hbox{X}%
+ \advance\dimen0 by -\ht0
+ \getpagestatus
+ \ifodd\MapsPagina \rightpagetrue \fi
+ \setbox0=\vtop
+ {\hsize\margebreedte
+ \forgetall
+ \let\\=\par
+ \ifrightpage\raggedright\else\raggedleft\fi
+ \parfillskip 0pt plus \margebreedte
+ \strut\MapsAuteur\\
+ \MapsAdres\\ % kan leeg zijn
+ \strut\tttf\MapsEmail}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \ifrightpage
+ \rlap{\kern\zetbreedte\kern\margeafstand\raise\dimen0\box0}%
+ \else
+ \llap{\raise\dimen0\box0\kern\margeafstand}%
+ \fi
+ \global\let\Affiliatie=\relax
+ \egroup
+ \fi}
+
+\unexpanded\def\MapsAffiliatieB%
+ {\ifMapsInKolommen
+ \snaptogrid\vbox\bgroup
+ \forgetall
+ \ss
+ \let\\=\par
+ \strut\MapsAuteur\\
+ \MapsAdres\\ % kan leeg zijn
+ \strut\tttf\MapsEmail\\
+ \egroup
+ \fi}
+
+%D De verschillende koppen worden zo efficient mogelijk gezet.
+%D Let ook hier weer op de halve regels, waardoor gridsnapping
+%D eenvoudiger is.
+
+\stelkopin
+ [\v!paragraaf]
+ [\c!letter=\bfa,
+ \c!voor={\blanko[\v!halveregel]},
+ \c!na={\blanko[\v!halveregel]}]
+
+\stelkopin
+ [\v!sub\v!paragraaf]
+ [\c!letter=\bf,
+ \c!voor=\blanko,
+ \c!na=]
+
+\stelkopin
+ [\v!sub\v!sub\v!paragraaf]
+ [\c!letter=\bf,
+ \c!variant=\v!tekst,
+ \c!voor=\blanko,
+ \c!na=]
+
+%D De plaats van de figuren en het lettertype waarin de
+%D bijschriften worden gezet stellen we in met:
+
+\stelplaatsblokkenin
+ [\c!plaats=\v!links]
+
+\stelblokkopjesin
+ [\c!letter=\sstf,
+ \c!tussen=]
+
+%D Gezien het brede karakter van de \MAPS\ gebruiken we andere
+%D waarden voor links geraffeld uitlijnen.
+
+\def\raggedleft%
+ {\setraggedness\leftraggedness
+ \setraggedskips{1fill}{0em}{.3333em}{.5em}{1fil}{\parindent}}
+
+%D Standaard gebruikt \CONTEXT\ kleur bij pretty verbatim
+%D printing. In the \MAPS\ gebruiken we echter fonts:
+
+\def\beginofpretty[#1]%
+ {\bgroup
+ \def\COMMONprettyone {\ttsl}%
+ \def\COMMONprettytwo {\ttbf}%
+ \def\COMMONprettythree{}%
+ \def\COMMONprettyfour {}%
+ \getvalue{COMMON#1}}
+
+\def\endofpretty%
+ {\egroup}
+
+%D We zijn (heel) wat toleranter in het uitlijnen:
+
+\steltolerantiein
+ [\v!zeersoepel]
+
+%D We misbruiken het buffer mechanisme om enkele eerder
+%D gedefinieerde instellingen te veranderen in geval van zetten
+%D in kolommen.
+
+\startbuffer[s-maps-1]
+
+%D In kolom||mode gebruiken we geen marge en hebben dus wat
+%D meer breedte ter beschikking.
+
+\stellayoutin
+ [\c!breedte=38pc]
+
+\stelhoofdtekstenin
+ [\MapsTitel]
+ [\MapsCategorie\ \MapsNummer]
+ [\MapsCategorie\ \MapsNummer]
+ [\MapsAuteur]
+
+\stelvoettekstenin
+ [\MapsPeriode\ \MapsJaar]
+ [\pagenumber]
+ [\pagenumber]
+ [MAPS]
+
+%D In kolom||mode plaatsen we de inleidingen rechts met een
+%D raffelige linkerkantlijn.
+
+\def\startWhatever#1%
+ {\witruimte
+ \snaptogrid\vbox\bgroup
+ \forgetall
+ \steluitlijnenin[\v!links]
+ \steltolerantiein[\v!zeersoepel]
+ \stelinspringenin[\v!geen]
+ \switchtobodyfont[8pt]
+ \noindent{\ssbf#1}\par
+ \ss\tf
+ \ignorespaces}
+
+\def\stopWhatever%
+ {\par
+ \egroup
+ \vbox{\strut}
+ \noindentation}
+
+%D Tot zover de twee||koloms instelingen.
+
+\stopbuffer
+
+%D Enkele \LATEX\ conversie macro's:
+
+\let\verb=\type
+
+\def\mailadres#1{{\tt#1}}
+
+\endinput
diff --git a/tex/context/base/s-pre-01.tex b/tex/context/base/s-pre-01.tex
new file mode 100644
index 000000000..79e988266
--- /dev/null
+++ b/tex/context/base/s-pre-01.tex
@@ -0,0 +1,374 @@
+%D \module
+%D [ file=s-pre-01,
+%D version=1997.07.22,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 1,
+%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 environment can be used to typeset interactive
+%D presentations. This module was first used at the 1997 \TUG\
+%D meeting.
+
+%D \macros
+%D {language}
+%D
+%D Because this module is defined in english, we default to the
+%D english hyphenation patterns and labels too.
+
+\language
+ [en]
+
+%D \macros
+%D {setupbodyfont,setuplayout}
+%D
+%D For screen reading, a Lucida Bright font looks nice. We use
+%D a 14.4 point bodyfont for the main text, but switch back to
+%D 12 points for ornaments.
+
+\setupbodyfont
+ [lbr,14.4pt]
+
+\setuplayout
+ [style={\switchtobodyfont[12pt]}]
+
+%D \macros
+%D {setupcolors,definecolor}
+%D
+%D Screen presentations without color just look dull, so we
+%D enable color support. We define ourselves a yellowish
+%D backgroundcolor and a not too dark blue interactioncolor.
+
+\setupcolors
+ [state=start]
+
+\definecolor [backgroundcolor] [r=1, g=1, b=.7]
+\definecolor [interactioncolor] [r=.1, g=.5, b=.8]
+
+%D \macros
+%D {setuppapersize,setuplayout,setupinteractionscreen}
+%D
+%D
+%D We use a nice large screen, and dedicate the right edge and
+%D bottom part to navigational tools. We automatically set
+%D the width and height of the page and start up full screen.
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [topspace=12pt,
+ header=0pt,
+ height=fit,
+ footer=0pt,
+ bottomdistance=8pt,
+ bottom=10pt,
+ backspace=12pt,
+ margin=0pt,
+ width=fit,
+ edgedistance=12pt,
+ rightedge=96pt]
+
+\setupinteractionscreen
+ [option=max,
+ width=600pt,
+ height=450pt]
+
+%D \macros
+%D {setupbackgrounds}
+%D
+%D We set the pagecolor to yellow except the part of the screen
+%D that is used to display the running text. By seting the
+%D offset to 3pt the text will not touch the yellow parts. We
+%D do not set the depth.
+
+\setupbackgrounds
+ [page]
+ [background=color,
+ backgroundcolor=backgroundcolor,
+ offset=3pt]
+
+\setupbackgrounds
+ [text][text]
+ [background=color,
+ backgroundcolor=white]
+
+%D I considered the next setup too, but finaly decided to
+%D comment it out.
+%D
+%D \starttypen
+%D \setupbackgrounds
+%D [bottom][text]
+%D [frame=on,
+%D framecolor=white]
+%D \stoptypen
+
+%D \macros
+%D {setupinteractions}
+%D
+%D We did not enable interactive text support yet, so let's do
+%D that now. We force page reference to circumvent problems
+%D with named destinations in buggy viewers.
+
+\setupinteraction
+ [page=yes,
+ state=start]
+
+%D \macros
+%D {setupbottomtexts}
+%D
+%D At the bottom of the screen we show two navigational bars.
+%D At the left we show the subpage bar, at the right we use a
+%D non default backward|/|forward bar.
+
+\setupbottomtexts
+ [\InteractionBar]
+ [\InteractionButtons]
+
+%D \macros
+%D {interactionbar}
+%D
+%D The left bar gets a white border (on the yellow background).
+%D Because we don't want to typeset an empty frame when no
+%D subpage bar is shown, we check for the number of subpages.
+
+\def\InteractionBar%
+ {\ifnum\nofsubpages>1
+ \framed
+ [framecolor=white,linethickness=1pt,
+ height=\bottomheight,strut=no]
+ {\interactionbar[alternative=e,height=1ex]}
+ \fi}
+
+%D \macros
+%D {setupinteractionbar, interactionbuttons}
+%D
+%D The right hand buttons enable us to jump backward and forward,
+%D as well as to the previous and next jump. We also enable to
+%D close the presentation.
+
+\setupinteractionbar
+ [framecolor=white,linethickness=1pt,
+ height=\bottomheight,strut=no]
+
+\def\InteractionButtons%
+ {\interactionbuttons
+ [width=15em]
+ [PreviousJump,NextJump,
+ firstpage,
+ firstsubpage,previouspage,nextpage,lastsubpage,
+ lastpage,
+ CloseDocument]}
+
+%D \macros
+%D {StartTitlePage, TitlePage}
+%D
+%D The titlepage is rather simple and can be typeset in two
+%D ways:
+%D
+%D \starttypen
+%D \StartTitlePage
+%D text \\ text \\ text
+%D \StopTitlepage
+%D \stoptypen
+%D
+%D or more straightforward:
+%D
+%D \starttypen
+%D \TitlePage{text\\text\\text}
+%D \stoptypen
+%D
+%D The first alternative can be used for more complicated
+%D title pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {TitlePage, Topics, Topic, Subject}
+%D
+%D A presentation after loading this module looks like:
+%D
+%D \starttypen
+%D \TitlePage {About Whatever\\Topics}
+%D
+%D \Topics {Todays Talk}
+%D
+%D \Topic {Some topic}
+%D
+%D \Subject {Alfa}
+%D
+%D .....
+%D
+%D \Subject {Beta}
+%D
+%D .....
+%D \stoptypen
+
+%D \macros
+%D {definehead}
+%D
+%D The commands \type{\Topic} and \type{\Subject} are defined
+%D as copies of head. We use \type{\Nopic} for internal
+%D purposes.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D We use our own command for typesetting the titles. We hide
+%D sectionnumbers from viewing. Each topic is followed by a
+%D list of subjects that belong to the topic.
+
+\setuphead
+ [Topic, Nopic, Subject]
+ [command=\HeadLine,
+ page=yes,
+ style=\tfb,
+ after=\blank,
+ sectionnumber=no]
+
+\setuphead
+ [Topic]
+ [after=\PlaceSubjectList]
+
+\setuphead
+ [Subject]
+ [continue=no]
+
+%D \macros
+%D {framed, midalined}
+%D
+%D The command used to typeset the head lines is rather simple.
+%D We just center the framed title. The frame macro optimizes
+%D the alignment and at the same time enables us to typset a
+%D nice colored rule.
+
+\def\HeadLine#1#2%
+ {\midaligned
+ {\framed
+ [framecolor=backgroundcolor,linethickness=1pt,
+ width=.8\hsize,align=middle,strut=no]
+ {#2}}}
+
+%D \macros
+%D {setuplist}
+%D
+%D The subject list is automatically placed. We center each
+%D subject line by using one of the default alternatives (g). We
+%D could have said:
+%D
+%D \starttypen
+%D \setuplist
+%D [Subject]
+%D [alternative=none,
+%D command=\SubjectListLine,
+%D interaction=all]
+%D
+%D \def\SubjectListLine#1#2#3%
+%D {\midaligned{#2}}
+%D \stoptypen
+%D
+%D But why should we complicate things when we can say:
+
+\def\PlaceSubjectList%
+ {\blank
+ \determinelistcharacteristics[Subject]
+ \ifnum\utilitylistlength>0
+ \placelist[Subject]
+ \fi}
+
+\setuplist
+ [Subject, Topic]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+%D \macros
+%D {setuptexttexts}
+%D
+%D The topics will be listed in the right edge, using:
+
+\setuptexttexts
+ [edge]
+ [][\TopicList]
+
+%D \macros
+%D {setuplist, placelist}
+%D
+%D The actual topic list is typeset using a \type{\vbox}. We
+%D have to specify \type{criterium=all} because otherwise no
+%D list will be typeset. (By default lists are typeset
+%D locally.)
+
+\def\TopicList%
+ {\vbox to \vsize
+ {\placelist
+ [Topic]
+ [alternative=none,
+ criterium=all,
+ command=\TopicLine]
+ \vss}}
+
+\def\Topics#1% temporary hack
+ {\Nopic{#1}
+ \placelist[Topic][criterium=all]}
+
+%D \macros
+%D {limitatetext}
+%D
+%D Because topic lines can be rather long, so we use \type
+%D {\limitatetext} to limit their length to the width of the
+%D right edge. This macro is part of the support macros.
+
+\def\TopicLine#1#2#3%
+ {\limitatetext{#2}{\rightedgewidth}{...}
+ \par}
+
+%D \macros
+%D {setuptexttexts, button}
+%D
+%D During a presentation, we want to use the cursor to point to
+%D parts of the text. Furthermore we want to be able to jump to
+%D the next page, without too much positioning on buttons.
+%D Therefore we make the text part of the screen into an
+%D invisible button.
+
+\setuptexttexts
+ [\GotoNextPage][]
+
+\def\GotoNextPage
+ {\button[width=\hsize,height=\vsize,frame=off]{}[nextpage]}
+
+%D \macros
+%D {setupsubpagenumber}
+%D
+%D The left bottom navigation bar shows the subpages, which will
+%D be counted by topic.
+
+\setupsubpagenumber
+ [way=byTopic,
+ state=start]
+
+\endinput
diff --git a/tex/context/base/s-pre-02.tex b/tex/context/base/s-pre-02.tex
new file mode 100644
index 000000000..bd61862bd
--- /dev/null
+++ b/tex/context/base/s-pre-02.tex
@@ -0,0 +1,381 @@
+%D \module
+%D [ file=s-pre-02,
+%D version=1998.04.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment 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.
+
+%D This environment can be used to typeset interactive
+%D presentations. This module was first used at the 1998
+%D publishers conference of the European Portable Document
+%D Association.
+
+%D \macros
+%D {setupbodyfont, switchtobodyfont, setuplayout}
+%D
+%D At \PRAGMA\ we prefer using the Lucida Bright fonts, but
+%D one can of course load another typeface.
+
+\setupbodyfont
+ [lbr,14.4pt]
+
+\setuplayout
+ [style={\switchtobodyfont[12pt]}]
+
+%D \macros
+%D {setuppapersize, setuplayout}
+%D
+%D The papersize suits the screen dimensions. The layout is
+%D rather simple. We use the whole width of the screen and only
+%D have navigational tools at the bottom of the screen.
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [backspace=1cm,
+ topspace=1cm,
+ margin=0pt,
+ header=0pt,
+ footer=0pt,
+ bottomdistance=.875cm,
+ bottom=1cm,
+ width=fit,
+ height=fit]
+
+%D \macros
+%D {setupwhitespace, setuptyping}
+%D
+%D We don't have much height, so we use a more cramped
+%D spacing. Verbatim text looks better when indented.
+%D
+
+\setupwhitespace
+ [medium]
+
+\setuptyping
+ [margin=standard]
+
+%D \macros
+%D {definecolor, setupcolors}
+%D
+%D Of course we enable color. We define some logical colors,
+%D of which most default to the same green shade.
+
+\definecolor [Backgrounds] [r= 0, g=.7, b=.4]
+\definecolor [Actions] [Backgrounds]
+\definecolor [Lines] [Actions]
+\definecolor [Page] [r=.8, g=.8, b=.8]
+
+%\definecolor [Actions] [r= 1, g=.9, b=.5]
+%\definecolor [Actions] [r= .1, g=.5, b=.9]
+%\definecolor [Actions] [r= 1, g=.3, b=.1]
+
+\setupcolors
+ [state=start]
+
+%D \macros
+%D {setupinteraction, setupinteractionscreen}
+%D
+%D We still have to enable interaction mode. We go full
+%D screen!
+
+\setupinteraction
+ [state=start,
+ color=Actions]
+
+\setupinteractionscreen
+ [option=max,
+ width=fit,
+ height=fit]
+
+%D \macros
+%D {setupitemize}
+%D
+%D And why not bring some color in itemizations too?
+
+\setupitemize
+ [color=Backgrounds]
+
+%D \macros
+%D {defineoverlay, setupbackgrounds}
+%D
+%D The navigational elements and the backgrounds are
+%D provided by \METAPOST. The next few macros are meant for the
+%D more experienced \CONTEXT\ user.
+
+\MPinclusions{input mp-tool}
+
+\def\MPpagebackground#1#2#3%
+ {\startreusableMPgraphic{pb:#1#2#3}
+ delta := #3 ;
+ fill unitsquare
+ xscaled #1 yscaled #2
+ withcolor \MPcolor{Page};
+ draw unitsquare
+ xscaled (#1-2delta) yscaled (#2-2delta)
+ shifted (delta,delta)
+ withpen pencircle scaled .5delta
+ withcolor \MPcolor{Backgrounds} ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{pb:#1#2#3}}
+
+\defineoverlay
+ [PageBackground]
+ [\MPpagebackground{\overlaywidth}{\overlayheight}{.25cm}]
+
+\setupbackgrounds
+ [page]
+ [background=PageBackground]
+
+%D \macros
+%D {setuptexttexts}
+%D
+%D By clicking on the text area, one goes to the next page.
+
+\def\MPtextbackground#1#2#3%
+ {\startreusableMPgraphic{tx:#1#2#3}
+ delta := #3 ;
+ draw unitsquare
+ xscaled #1 yscaled #2
+ withpen pencircle scaled .5delta
+ withcolor \MPcolor{Backgrounds} ;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{tx:#1#2#3}}
+
+\defineoverlay
+ [TextBackground]
+ [\MPtextbackground{\overlaywidth}{\overlayheight}{.125cm}]
+
+\def\BackgroundButton%
+ {\button
+ [background=TextBackground,
+ backgroundoffset=.25cm,
+ frame=off,
+ height=\vsize,
+ width=\hsize]{}[nextpage]}
+
+\setuptexttexts
+ [\BackgroundButton]
+ []
+
+%D \macros
+%D {setupbottomtexts}
+%D
+%D At the bottom of the screen, we show three buttons. These
+%D direct us to the previous or next jump or exit the document.
+
+\def\MPright#1#2%
+ {\startreusableMPgraphic{rt:#1#2}
+ z1 = ( 0, 0) ;
+ z2 = (#1, .5y3) ;
+ z3 = ( 0, #2) ;
+ path p ; p := z1--z2--z3--cycle;
+ lw = #2/5 ; pickup pencircle scaled lw;
+ filldraw p withcolor \MPcolor{Backgrounds} ;
+ set_outer_boundingbox currentpicture;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{rt:#1#2}}
+
+\def\MPleft#1#2%
+ {\startreusableMPgraphic{lt:#1#2}
+ z1 = (#1, 0) ;
+ z2 = ( 0, .5y3) ;
+ z3 = (#1, #2) ;
+ path p ; p := z1--z2--z3--cycle;
+ lw = #2/5 ; pickup pencircle scaled lw;
+ filldraw p withcolor \MPcolor{Backgrounds} ;
+ set_outer_boundingbox currentpicture;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{lt:#1#2}}
+
+\def\MPcircle#1#2%
+ {\startreusableMPgraphic{ci:#1#2}
+ rx = #1; ry = #2;
+ path p ; p := fullcircle xscaled rx yscaled ry;
+ lw = #2/5 ; pickup pencircle scaled lw;
+ filldraw p withcolor \MPcolor{Backgrounds} ;
+ set_outer_boundingbox currentpicture;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{ci:#1#2}}
+
+\def\MPwhat#1#2%
+ {\startreusableMPgraphic{wh:#1#2} % could be rotated unitsquare
+ z1 = ( 0, 0) ;
+ z2 = ( #1, 0) ;
+ z3 = (.5x2, #2) ;
+ path p ; p := z1--z2--z3--cycle;
+ lw = #2/5 ; pickup pencircle scaled lw;
+ filldraw p withcolor \MPcolor{Backgrounds} ;
+ set_outer_boundingbox currentpicture;
+ \stopreusableMPgraphic
+ \reuseMPgraphic{wh:#1#2}}
+
+\unexpanded\def\BackwardButton%
+ {\naarbox{\MPleft{\the\bottomheight}{\the\bottomheight}}[previouspage]}
+
+\unexpanded\def\ForwardButton%
+ {\naarbox{\MPright{\the\bottomheight}{\the\bottomheight}}[nextpage]}
+
+\unexpanded\def\ExitButton%
+ {\naarbox{\MPcircle{\the\bottomheight}{\the\bottomheight}}[CloseDocument]}
+
+\unexpanded\def\WhateverButton%
+ {\doifreferencefoundelse{Whatever}
+ {\naarbox{\MPwhat{\the\bottomheight}{\the\bottomheight}}[Whatever]}
+ {}}
+
+\def\BottomButton%
+ {\button
+ [frame=off,
+ height=\bottomheight,
+ width=.3\textwidth]{}[Topics]}
+
+\setupbottomtexts
+ [\BottomButton
+ \hfill
+ \WhateverButton
+ \kern2\bottomheight
+ \BackwardButton
+ \kern.5\bottomheight
+ \ExitButton
+ \kern.5\bottomheight
+ \ForwardButton
+ \kern.5\bottomheight]
+ []
+
+%D \macros
+%D {TitlePage, Topics, Topic, Subject}
+%D
+%D A presentation after loading this module looks like:
+%D
+%D \starttypen
+%D \TitlePage {About Whatever\\Topics}
+%D
+%D \Topics {Todays Talk}
+%D
+%D \Topic {Some topic}
+%D
+%D .....
+%D
+%D \Topic {Next Topic}
+%D
+%D .....
+%D \stoptypen
+
+%D \macros
+%D {StartTitlePage, TitlePage}
+%D
+%D The titlepage is rather simple and can be typeset in two
+%D ways:
+%D
+%D \starttypen
+%D \StartTitlePage
+%D text \\ text \\ text
+%D \StopTitlepage
+%D \stoptypen
+%D
+%D or more straightforward:
+%D
+%D \starttypen
+%D \TitlePage{text\\text\\text}
+%D \stoptypen
+%D
+%D The first alternative can be used for more complicated
+%D title pages.
+
+\def\StartTitlePage%
+ {\startstandardmakeup
+ \bfd
+ \setupalign[middle]
+ \vfil
+ \let\\=\vfil}
+
+\def\StopTitlePage%
+ {\vfil\vfil\vfil
+ \stopstandardmakeup}
+
+\def\TitlePage#1%
+ {\StartTitlePage#1\StopTitlePage}
+
+%D \macros
+%D {definehead}
+%D
+%D The commands \type{\Topic} and \type{\Subject} are defined
+%D as copies of head. We use \type{\Nopic} for internal
+%D purposes.
+
+\definehead [Topic] [chapter]
+\definehead [Subject] [section]
+
+\definehead [Nopic] [title]
+
+%D \macros
+%D {setuphead}
+%D
+%D We use our own command for typesetting the titles. We hide
+%D sectionnumbers from viewing. Each topic is followed by a
+%D list of subjects that belong to the topic.
+
+\setuphead
+ [Topic, Nopic]
+ [after={\blank[3*medium]},
+ number=no,
+ style=\tfb,
+ page=yes,
+ alternative=middle]
+
+\setuphead
+ [Subject]
+ [after=\blank,
+ number=no,
+ page=yes,
+ continue=no,
+ style=\tfa]
+
+%D \macros
+%D {setuplist}
+%D
+%D The subject list is automatically placed. We center each
+%D subject line by using one of the default alternatives (g). We
+%D could have said:
+%D
+%D \starttypen
+%D \setuplist
+%D [Subject]
+%D [alternative=none,
+%D command=\SubjectListLine,
+%D interaction=all]
+%D
+%D \def\SubjectListLine#1#2#3%
+%D {\midaligned{#2}}
+%D \stoptypen
+%D
+%D But why should we complicate things when we can say:
+
+\setuplist
+ [Topic,Subject]
+ [alternative=g,
+ interaction=all,
+ before=,
+ after=]
+
+\def\Topics#1%
+ {\determinelistcharacteristics[Topic]
+ \ifcase\utilitylistlength\else
+ \Nopic[Topics]{#1}
+ \startcolumns
+ \placelist[Topic][criterium=all]
+ \stopcolumns
+ \fi}
+
+\def\Subjects%
+ {\placelist[Subject]}
+
+\endinput
diff --git a/tex/context/base/setupa.tex b/tex/context/base/setupa.tex
new file mode 100644
index 000000000..4f834c866
--- /dev/null
+++ b/tex/context/base/setupa.tex
@@ -0,0 +1,685 @@
+\startmessages dutch library: setup
+ title: setup
+ formula: formule
+ number: getal
+ list: lijst
+ dimension: maat
+ mark: markering
+ reference: verwijzing
+ command: commando
+ file: file
+ name: naam
+ text: tekst
+ section: sectie
+ singular: naam enkelvoud
+ plural: naam meervoud
+ matrix: n*m
+ see: zie
+ 1: de karakters < en > zijn globaal actief!
+ 2: -- wordt verwerkt
+ 3: -- is niet gedefinieerd
+ 4: -- wordt nogmaals verwerkt
+\stopmessages
+
+\startmessages english library: setup
+ title: setup
+ formula: formula
+ number: number
+ list: list
+ dimension: dimension
+ mark: mark
+ reference: reference
+ command: command
+ file: file
+ name: name
+ text: text
+ section: section
+ singular: singular name
+ plural: plural name
+ matrix: n*m
+ see: see
+ 1: the characters < and > are globally active!
+ 2: -- is processed
+ 3: -- is undefined
+ 4: -- is processed again
+\stopmessages
+
+\startmessages german library: setup
+ title: Setup
+ formula: Formel
+ number: Nummer
+ list: Liste
+ dimension: Dimension
+ mark: Beschriftung
+ reference: Referenz
+ command: Befehl
+ file: Datei
+ name: Name
+ text: Text
+ section: Abschnitt
+ singular: singular
+ plural: plural
+ matrix: n*m
+ see: siehe
+ 1: Die Zeichen < und > gelten global!
+ 2: -- wird verarbeitet
+ 3: -- ist undefiniert
+ 4: -- ist mehrmals verarbeitet
+\stopmessages
+
+% we need some more constants
+
+\interfacetranslationtrue
+
+\input mult-sys
+\input mult-con
+\input mult-com
+
+% Enkele letter-instellingen
+
+\def\setupnumfont {}
+\def\setuptxtfont {\tttf}
+\def\setupvarfont {\ttsl}
+\def\setupoptfont {\ttsl}
+\def\setupalwcolor {}
+\def\setupoptcolor {darkgray}
+
+% Het onderstaande is nodig om \type af te handelen in
+% argumenten. Standaard gebeurt dit niet.
+
+% Het actief maken en toekennen moet zeer vroeg gebeuren,
+% in ieder geval voordat cont-00a wordt geladen. Zoniet,
+% dan gaat het mis op commando's als \processaction. De
+% mathematische mode en vergelijken van waarden met \if
+% gaat echter wel goed.
+
+% Omdat in een acrobat geen < en > in een label mogen
+% zitten, moeten we deze karakters bij verwijzingen
+% converteren naar wat onschuldiger varianten.
+
+\catcode`\<=\active
+\catcode`\>=\active
+
+\def<{\lesscharacter}
+\def>{\morecharacter}
+
+\def\protectmoreless{\def<{@}\def>{@}}
+
+\showmessage{setup}{1}{}
+
+% \stelsetupin
+% [verwijzing=<0,1,2,3>]
+%
+% \startsetup
+% \command[name]
+% \type[list]
+% \value[values][default]
+% \variable[variable][values][default]
+% \stopsetup
+%
+% \setup{name}
+%
+% \volledigelijstmettexcommandos
+% \plaatslijstmettexcommandos
+%
+% \c!val! [a]
+% \c!vals! [a,b,c]
+%
+% \c!var! [x=]
+% \c!vars! [x=,y=,z=]
+%
+% \c!trip! [x:y:z]
+% \c!trips! [x:y:z,..]
+%
+% \c!arg! {..}
+% \c!args! {..,..,..}
+%
+% \c!wrd! {..}
+% \c!wrds! {.. .. ..}
+%
+% \c!idx! {..}
+% \c!idxs! {..+..+..}
+%
+% \c!mat! $..$
+% \c!dis! $$..$$
+%
+% \c!pos! (x)
+% \c!poss! (x,y)
+%
+% \c!nop! ...
+%
+% \c!fil! ...
+%
+% \c!stp! \stop...
+%
+% \c!ref! [ref]
+% \c!refs! [ref,..]
+%
+% \c!par! \par
+%
+% \c!cmd! \commando
+%
+% \c!opt! optioneel
+% \c!alwint! altijd interactief
+% \c!optint! optioneel interactief
+%
+% \c!dest! {..[refs]}
+% \c!dests! {..[refs]},..
+%
+% \c!one! #1
+% \c!two! #2
+% \c!three! #3
+%
+% \c!font! fontspecificatie
+%
+% \c!sep! \\
+
+\unprotect
+
+\def\@@setup {@@setup}
+\def\c!stp {}
+\def\c!setupref {stp}
+\def\??stp {@@stp}
+
+\def\c!command!%
+ {{\setupvarfont\getmessage{setup}{command}}}
+
+\def\c!dimension!%
+ {{\setupvarfont\getmessage{setup}{dimension}}}
+
+\def\c!filename!%
+ {{\setupvarfont\getmessage{setup}{file}}}
+
+\def\c!identifier!%
+ {{\setupvarfont\getmessage{setup}{name}}}
+
+\def\c!character!%
+ {{\setupvarfont\getmessage{setup}{character}}}
+
+\def\c!marker!%
+ {{\setupvarfont\getmessage{setup}{mark}}}
+
+\def\c!number!%
+ {{\setupvarfont\getmessage{setup}{number}}}
+
+\def\c!reference!%
+ {{\setupvarfont\getmessage{setup}{reference}}}
+
+\def\c!plural!%
+ {{\setupvarfont\getmessage{setup}{plural}}}
+
+\def\c!singular!%
+ {{\setupvarfont\getmessage{setup}{singular}}}
+
+\def\c!text!%
+ {{\setupvarfont\getmessage{setup}{text}}}
+
+\def\c!formula!%
+ {{\setupvarfont\getmessage{setup}{formula}}}
+
+\def\c!font!%
+ {{\setupvarfont\getmessage{setup}{file}}}
+
+\def\c!matrix!%
+ {{\setupvarfont\getmessage{setup}{matrix}}}
+
+\def\c!list!%
+ {{\setupvarfont\getmessage{setup}{list}}}
+
+\def\c!section!%
+ {{\setupvarfont\getmessage{setup}{section}}}
+
+\def\c!noargument!%
+ {{\setupvarfont\texescape\getmessage{setup}{command}}}
+
+\def\c!oneargument!%
+ {{\setupvarfont\texescape\getmessage{setup}{command}\#1}}
+
+\def\c!twoarguments!%
+ {{\setupvarfont\texescape\getmessage{setup}{command}\#1\#2}}
+
+\def\c!threearguments!%
+ {{\setupvarfont\texescape\getmessage{setup}{command}\#1\#2\#3}}
+
+\def\c!repeat! {\c!opt!{{\setupvarfont n}*}}
+\def\c!arg! {\leftargument\c!dots!\rightargument}
+\def\c!args! {\leftargument..,\c!dots!,..\rightargument}
+\def\c!dis! {\$\$\c!dots!\$\$}
+\def\c!idx! {\leftargument\c!dots!\rightargument}
+\def\c!idxs! {\leftargument..+\c!dots!+..\rightargument}
+\def\c!mat! {\$\c!dots!\$}
+\def\c!nop! {\c!dots!}
+\def\c!fil! {~\c!dots!~}
+\def\c!pos! {(\c!dots!)}
+\def\c!poss! {(\c!dots!,\c!dots!)}
+\def\c!sep! {\texescape\texescape}
+\def\c!ref! {[{\setupvarfont ref}]}
+\def\c!refs! {[{\setupvarfont ref},..]}
+\def\c!val! {[\c!dots!]}
+\def\c!vals! {[..,\c!dots!,..]}
+\def\c!var! {[..=..]}
+\def\c!vars! {[..,..=..,..]}
+\def\c!cmd! {\c!noargument!}
+\def\c!dest! {[\leftargument..\c!ref!\rightargument]}
+\def\c!dests! {[..,\leftargument..\c!refs!\rightargument,..]}
+\def\c!trip! {[x:y:z=]}
+\def\c!trips! {[x:y:z=,..]}
+\def\c!wrd! {\leftargument\c!dots!\rightargument}
+\def\c!wrds! {\leftargument.. \c!dots!\ ..\rightargument}
+\def\c!par! {\texescape par}
+\def\c!opt! #1{{\setupoptfont{#1}}}
+
+\let\redefinesetupconstants=\relax
+
+% Test:
+
+\newif\ifbreaksetup
+\def\breaksetup{\ifbreaksetup\allowbreak\fi}
+
+\def\c!repeat! {\breaksetup\c!opt!{{\setupvarfont n}*}\breaksetup}
+\def\c!arg! {\breaksetup\leftargument\c!dots!\rightargument\breaksetup}
+\def\c!args! {\breaksetup\leftargument..,\breaksetup,\c!dots!,\breaksetup..\rightargument\breaksetup}
+\def\c!dis! {\breaksetup\$\$\c!dots!\$\$\breaksetup}
+\def\c!idx! {\breaksetup\leftargument\c!dots!\rightargument\breaksetup}
+\def\c!idxs! {\breaksetup\leftargument..+\breaksetup\c!dots!+\breaksetup..\rightargument\breaksetup}
+\def\c!mat! {\breaksetup\$\c!dots!\$\breaksetup}
+\def\c!nop! {\breaksetup\c!dots!\breaksetup}
+\def\c!fil! {\breaksetup~\c!dots!~\breaksetup}
+\def\c!pos! {\breaksetup(\c!dots!)\breaksetup}
+\def\c!poss! {\breaksetup(\c!dots!,\c!dots!)\breaksetup}
+\def\c!sep! {\breaksetup\texescape\texescape\breaksetup}
+\def\c!ref! {\breaksetup[{\setupvarfont ref}]\breaksetup}
+\def\c!refs! {\breaksetup[{\setupvarfont ref},\breaksetup..]\breaksetup}
+\def\c!val! {\breaksetup[\c!dots!]\breaksetup}
+\def\c!vals! {\breaksetup[..,\breaksetup\c!dots!,\breaksetup..]\breaksetup}
+\def\c!var! {\breaksetup[..=..]\breaksetup}
+\def\c!vars! {\breaksetup[..,\breaksetup..=..,\breaksetup..]\breaksetup}
+\def\c!cmd! {\breaksetup\c!noargument!\breaksetup}
+\def\c!dest! {\breaksetup[\leftargument..\breaksetup\c!ref!\rightargument]\breaksetup}
+\def\c!dests! {\breaksetup[..,\breaksetup\leftargument..\breaksetup\c!refs!\rightargument,\breaksetup..]\breaksetup}
+\def\c!trip! {\breaksetup[x:y:z=]\breaksetup}
+\def\c!trips! {\breaksetup[x:y:z=,\breaksetup..]\breaksetup}
+\def\c!wrd! {\breaksetup\leftargument\c!dots!\rightargument\breaksetup}
+\def\c!wrds! {\breaksetup\leftargument.. \breaksetup\c!dots!\ \breaksetup..\rightargument\breaksetup}
+\def\c!par! {\breaksetup\texescape par\breaksetup}
+\def\c!opt! #1{{\setupoptfont{#1}}}
+
+\definieerregister
+ [texmacro]
+ [texmacros]
+
+\definieersorteren
+ [texcommando]
+ [texcommandos]
+
+\stelsorterenin
+ [texcommando]
+ [\c!commando=\@@stpcommando,
+ \c!criterium=\@@stpcriterium]
+
+\definieersorteren
+ [elktexcommando]
+ [alletexcommandos]
+
+\stelsorterenin
+ [elktexcommando]
+ [\c!commando=\@@stpcommando,
+ \c!criterium=\v!alles]
+
+% verwijzing: 0 geen verwijzingen plaatsen / wel genereren
+% 1 alleen bij zie plaatsen / wel genereren
+% 2 alle verwijzingen plaatsen / niet genereren
+% 3 bij zie commando klikken / wel genereren
+
+\newif\ifv!numberingdots!
+\newif\ifv!alwaysinteractive!
+\newif\ifv!optionalinteractive!
+
+\newcount\v!dotnumber!
+
+\def\c!dots!%
+ {\ifv!numberingdots!
+ \global\advance\v!dotnumber! by 1\relax
+ .{\setupnumfont\the\v!dotnumber!}.%
+ \else
+ ...%
+ \fi}
+
+\def\writesetupparbox#1%
+ {\hbox to \@@stpbreedte{\strut#1\hss}}%
+
+\def\writesetupparameter#1#2%
+ {\doifcommonelse{#1}{#2}
+ {\underbar{#1} }
+ {#1 }}%
+
+\def\writesetupparametervalues#1#2#3%
+ {\bgroup
+ \def\dowritesetupparameter##1%
+ {\writesetupparameter{##1}{#3}}%
+ \veryraggedright
+ \noindent
+ \hangindent=\@@stpbreedte
+ \writesetupparbox{\getinterfaceconstant{#1}}%
+ \processcommalist[#2]\dowritesetupparameter
+ \doifcommonelse{#3}{#2}{}{\underbar{#3}}%
+ \endgraf
+ \egroup}
+
+\def\writesetupparameters#1#2%
+ {\doifnot{#1}{}
+ {\bgroup
+ \def\dowritesetupparameter##1%
+ {\writesetupparameter{##1}{#2}}%
+ \indent
+ \veryraggedright
+ \hangindent=\@@stpbreedte
+ \writesetupparbox{\c!dots!}%
+ \processcommalist[#1]\dowritesetupparameter
+ \endgraf
+ \egroup}}
+
+% #1=list #3=default
+
+\def\setupvalue[#1]#2[#3]%
+ {\writesetupparameters{#1}{#3}}
+
+% #1=name #3=list #5=default
+
+\def\doifsystemconstantelse#1%
+ {\convertargument*\v!\to\asciia
+ \convertargument*#1\to\asciib
+ \doifinstringelse\asciia\asciib}
+
+\def\setupvariable[#1]#2[#3]#4[#5]%
+ {\doifcommonelse{\c!command!,\c!dimension!,\c!number!,\c!text!}{#3}
+ {\doifsystemconstantelse{#5}
+ {\writesetupparametervalues{#1}{#3}{#5}}
+ {\writesetupparametervalues{#1}{#3}{}}}
+ {\writesetupparametervalues{#1}{#3}{#5}}}
+
+\unexpanded\def\inheritsetup#1%
+ {\setsetupreference#1\to\currentsetupinheritance
+ \ifcase\@@stpverwijzing
+ \texescape#1% % njet
+ \or
+ {\op{p}[\currentsetupinheritance]: \texescape#1}% zonder { } probleem
+ \or
+ {\op{p}[\currentsetupinheritance]: \texescape#1}% nog eens uitzoeken
+ \or
+ {\naar{\tttf\texescape#1}[\currentsetupinheritance]}%
+ \fi}
+
+% #1=name
+
+\def\inheritsetupvalues[#1]#2[#3]%
+ {\bgroup
+ \ConvertToConstant\doifelse{#3}{}{\def\next{}}{\def\next{: }}%
+ \def<<{\setupvarfont}\def>>{}%
+ \protectmoreless
+ \value[\getmessage{setup}{see} \inheritsetup{#1}\next#3][]%
+ \egroup}
+
+% #1=name
+
+\def\inheritsetupvariables[#1]#2[#3]%
+ {\bgroup
+ \ConvertToConstant\doifelse{#3}{}{\def\next{}}{\def\next{: }}%
+ \def<<{\setupvarfont}\def>>{}%
+ \protectmoreless
+ \variable[..=..][\getmessage{setup}{see} \inheritsetup{#1}\next#3][]%
+ \egroup}
+
+\def\stelsetupin%
+ {\dodoubleargument\getparameters[\??stp]}
+
+\def\dowritetexcommand#1<<#2>>#3\\%
+ {\texescape#1{\setupvarfont#2}#3}
+
+\def\writetexcommand#1%
+ {\setuptxtfont
+ \doifinstringelse{<<}{#1}
+ {\dowritetexcommand#1\\}
+ {\texescape#1}}
+
+\xdef\currentsetupreference {}
+\xdef\currentsetupinheritance {}
+
+\def\subsetupreference#1{@#1@}
+
+\let\subsetup=\subsetupreference
+
+\def\setsetupreference#1\to#2%
+ {\bgroup
+ \protectmoreless
+ \let\subsetup=\subsetupreference
+ \xdef#2{\c!setupref:#1}%
+ \egroup}
+
+\def\setsetupnumber#1\to#2%
+ {\bgroup
+ \xdef#2{\c!setupref:#1}%
+ \egroup}
+
+\def\checkparametervalues#1#2#3%
+ {\setbox0=\hbox{\getinterfaceconstant{#1}}%
+ \ifdim\wd0\morecharacter\dimen0\relax
+ \dimen0=\wd0
+ \fi}
+
+\def\checkparameters#1#2%
+ {\setbox0=\hbox{\c!dots!}%
+ \ifdim\wd0\morecharacter\dimen0\relax
+ \dimen0=\wd0
+ \fi}
+
+\def\dointeractivesetupsymbol#1%
+ {\color
+ [#1]
+ {\raise.15ex\hbox{$\gobackwardcharacter\hskip.5em\goforwardcharacter$}}}
+
+\def\dointeractivesetup%
+ {\ifv!alwaysinteractive!
+ \dointeractivesetupsymbol\setupalwcolor
+ \fi
+ \ifv!optionalinteractive!
+ \dointeractivesetupsymbol\setupoptcolor
+ \fi}
+
+\@EA\def\@EA\c!dostp!\e!start#1<<#2>>#3\\%
+ {\breaksetup~...~\breaksetup\texescape\e!stop#1{\setupvarfont#2}}%
+
+\defineframedtext
+ [setuptext]
+ [\c!breedte=\hsize,
+ \c!hoogte=\v!passend,
+ \c!offset=0.75em]
+
+\newif\ifshortsetup
+
+\def\dosetupreference%
+ {\doifundefinedelse{done::\currentsetupreference}
+ {\pagereference[\currentsetupnumber]%
+ \pagereference[\currentsetupreference]%
+ \setgvalue{done::\currentsetupreference}{}}
+ {\showmessage{setup}{4}{\currentsetupreference}}}
+
+\def\doprocesssetup\number[#1]\command[#2]\type[#3]#4%
+ {\bgroup
+ \showmessage{setup}{2}{#2}%
+ \ifshortsetup\else\breaksetupfalse\fi
+ \let\value=\setupvalue
+ \let\variable=\setupvariable
+ \let\inheritvalues=\inheritsetupvalues
+ \let\inheritvariables=\inheritsetupvariables
+ \@EA\def\@EA\c!stp!\@EA{\@EA\c!dostp!#2<<>>\\}%
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \startsetuptext
+ \stelwitruimtein[\v!geen]%
+ \bgroup
+ \def<{}%
+ \def>{}%
+ \edef\firstcommand{#2*}%
+ \let<=\lesscharacter
+ \let>=\morecharacter
+ \edef\secondcommand{#2}%
+ \expanded{\texmacro[\firstcommand]{\noexpand\tex{\secondcommand}}}%
+ \egroup
+ \global\v!dotnumber!=0
+ \global\v!numberingdots!true
+ \global\v!alwaysinteractive!false
+ \global\v!optionalinteractive!false
+ \def\c!alwint!{\global\v!alwaysinteractive!true}%
+ \def\c!optint!{\global\v!optionalinteractive!true}%
+ \setbox0=\hbox{\redefinesetupconstants#3}%
+ \ifnum\v!dotnumber!<2
+ \global\v!numberingdots!false
+ \fi
+ \global\v!dotnumber!=0
+ \ifbreaksetup
+ \hangafter1
+ \hangindent1em
+ \veryraggedright
+ \else
+ \hbox to \hsize
+ \fi
+ {\let\subsetup=\gobbleoneargument
+ \redefinesetupconstants
+ \setuptxtfont\setstrut\strut
+ \writetexcommand{#2}#3%
+ \ifbreaksetup\hfill\else\hss\fi
+ \ifnum\@@stpverwijzing>0
+ \dointeractivesetup
+ \fi
+ \setsetupnumber #1\to\currentsetupnumber
+ \setsetupreference#2\to\currentsetupreference
+ \ifcase\@@stpverwijzing
+ \dosetupreference
+ \or
+ \dosetupreference
+ \or
+ \hskip1em
+ \doifreferencefoundelse{\currentsetupreference}
+ {\bf\op[\currentsetupreference]}
+ {\setupvarfont nog niet beschreven}%
+ \or
+ \dosetupreference
+ \fi}
+ \ifbreaksetup
+ \endgraf
+ \fi
+ \ifshortsetup \else
+ \switchtobodyfont[\v!klein]%
+ \setuptxtfont
+ \redefinesetupconstants
+ \global\v!dotnumber!=0
+ \setbox0=\vbox
+ {\dimen0=\!!zeropoint
+ \let\writesetupparametervalues=\checkparametervalues
+ \let\writesetupparameters=\checkparameters
+ #4\relax
+ \ifdim\dimen0<2.5em
+ \dimen0=2.5em
+ \fi
+ \advance\dimen0 by 2em
+ \xdef\@@stpbreedte{\the\dimen0}}%
+ \global\v!dotnumber!=0
+ \setbox0=\vbox{#4}%
+ \ifdim\wd0>\!!zeropoint
+ \blanko
+ \unvbox0
+ \fi
+ \fi
+ \stopsetuptext
+ \egroup}
+
+\newcounter\currentsetupnumber
+
+\def\startsetup#1\command[#2]#3\type[#4]#5\stopsetup%
+ {\bgroup
+ \def<{}%
+ \def>{}%
+ \doglobal\increment\currentsetupnumber\relax
+ \def\!!stringa{\@@setup#2}%
+ \expandafter\setgvalue\expandafter\!!stringa\expandafter
+ {\expandafter\doprocesssetup
+ \expandafter\number\expandafter[\currentsetupnumber]%
+ \command[#2]%
+ \type[#4]%
+ {#5}}%
+ \edef\firstcommand{#2*}%
+ \let<=\lesscharacter
+ \let>=\morecharacter
+ \edef\secondcommand{#2}%
+ % 'elk' comes first, else no 'gebruikt' entries are written
+ \expanded{\elktexcommando[\firstcommand]{\secondcommand}}%
+ % this uggly hack prevents messages
+ \let\showmessage=\gobblethreearguments
+ % here 'elk' is overruled
+ \expanded{\texcommando[\firstcommand]{\secondcommand}}%
+ \egroup}
+
+\def\dosetup#1%
+ {\protect
+ \@@stpvoor
+ \bgroup
+ \def<{}%
+ \def>{}%
+ \xdef\globalsetupname{#1}%
+ \gebruikcommandos{#1*}%
+ \egroup
+ \doifdefinedelse{\@@setup\globalsetupname}
+ {\getvalue{\@@setup\globalsetupname}}
+ {\bgroup
+ \showmessage{setup}{3}{#1}%
+ \setuptxtfont [setup \makemessage{setup}{3}{#1}]\endgraf
+ \egroup}%
+ \@@stpna}
+
+\def\setup%
+ {\shortsetupfalse
+ \unprotect\dosetup}
+
+\def\shortsetup%
+ {\shortsetuptrue
+ \unprotect\dosetup}
+
+\def\startsetupfile%
+ {\unprotect
+ \def\currentsetupnumber{0}}
+
+\def\stopsetupfile%
+ {\protect
+ \def\currentsetupnumber{}
+ \endinput}
+
+\let\documenteduntilhere=\relax
+
+\definieerblok [dutch, english, german]
+\verbergblokken [dutch, english, german]
+
+\stelsetupin
+ [\c!voor=,
+ \c!na=,
+ \c!commando=\setup,
+ \c!verwijzing=0,
+ \c!criterium=\v!gebruikt]
+
+\def\plaatssetup%
+ {\getvalue{\e!plaats\e!lijstmet texcommandos}}
+
+\def\plaatselkesetup% for fun purposes only
+ {\bgroup
+ \stelsetupin[\c!verwijzing=2]%
+ \setupreferencing[\c!status=\v!stop]%
+ \getvalue{\e!plaats\e!lijstmet alletexcommandos}%
+ \egroup}
+
+\let\setupsetup = \stelsetupin
+\let\placesetup = \plaatssetup
+\let\placeeverysetup= \plaatselkesetup
+
+\protect
+
+\endinput
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
new file mode 100644
index 000000000..64815e19c
--- /dev/null
+++ b/tex/context/base/setupb.tex
@@ -0,0 +1,7862 @@
+% nieuw: oncomment plaatssamengesteldelijst
+
+% nog 'reductie=ja/nee' in \setupcolors
+
+\startsetupfile
+
+% lang-ini
+
+\startsetup
+ \command
+ [\y!installlanguage]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!spatiering]
+ [\v!opelkaar,\v!ruim]
+ [\v!opelkaar]
+ \variable
+ [\s!lefthyphenmin]
+ [\c!dimension!]
+ [2]
+ \variable
+ [\s!righthyphenmin]
+ [\c!dimension!]
+ [2]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!stop]
+ \variable
+ [\c!leftsentence]
+ [\c!command!]
+ [---]
+ \variable
+ [\c!rightsentence]
+ [\c!command!]
+ [---]
+ \variable
+ [\c!leftsubsentence]
+ [\c!command!]
+ [---]
+ \variable
+ [\c!rightsubsentence]
+ [\c!command!]
+ [---]
+ \variable
+ [\c!leftquote]
+ [\c!command!]
+ [`]
+ \variable
+ [\c!rightquote]
+ [\c!command!]
+ [']
+ \variable
+ [\c!leftquotation]
+ [\c!command!]
+ [``]
+ \variable
+ [\c!rightquotation]
+ [\c!command!]
+ ['']
+ \variable
+ [\c!default]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuplanguage]
+ \type
+ [\c!val!\c!vars!]
+ \inheritvariables
+ [\y!installlanguage]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!language]
+ \type
+ [\c!val!]
+ \value
+ [\s!nl,\s!fr,\s!en,\s!uk,\s!de,\s!sp,\s!cz,..]
+ [\s!nl]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!mainlanguage]
+ \type
+ [\c!val!]
+ \value
+ [\s!nl,\s!fr,\s!en,\s!uk,\s!de,\s!sp,\s!cz,..]
+ [\s!nl]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!translate]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!identifier!]
+ [\c!text!]
+ []
+\stopsetup
+
+% enco-ini
+
+\startsetup
+ \command
+ [\y!useencoding]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% spec-ini
+
+\startsetup
+ \command
+ [\y!usespecials]
+ \type
+ [\c!vals!]
+ \value
+ [\c!reset,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!defineoutput]
+ \type
+ [\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupoutput]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% font-ini
+
+\startsetup
+ \command
+ [\y!definebodyfontenvironment]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [5pt,...,12pt,\s!default]
+ []
+ \variable
+ [\s!text]
+ [\c!dimension!]
+ []
+ \variable
+ [\s!script]
+ [\c!dimension!]
+ []
+ \variable
+ [\s!scriptscript]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!x]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!xx]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!klein]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!groot]
+ [\c!dimension!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupbodyfontenvironment]
+ \type
+ [\c!val!\c!vars!]
+ \inheritvalues
+ [\y!setupbodyfont]
+ []
+ \inheritvariables
+ [\y!setupbodyfont]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showbodyfontenvironment]
+ \type
+ [\c!vals!]
+ \inheritvalues
+ [\y!setupbodyfont]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definebodyfont]
+ \type
+ [\c!vals!\c!val!\c!vars!]
+ \value
+ [5pt,...,12pt,\s!default]
+ []
+ \value
+ [\c!rm,\c!ss,\c!tt,\c!mm,\c!hw,\c!cg]
+ []
+ \variable [\c!tf] [\c!font!] []
+ \variable [\c!bf] [\c!font!] []
+ \variable [\c!sl] [\c!font!] []
+ \variable [\c!it] [\c!font!] []
+ \variable [\c!bs] [\c!font!] []
+ \variable [\c!bi] [\c!font!] []
+ \variable [\c!sc] [\c!font!] []
+ \variable [\c!ex] [\c!font!] []
+ \variable [\c!mi] [\c!font!] []
+ \variable [\c!sy] [\c!font!] []
+ \variable [\c!ma] [\c!font!] []
+ \variable [\c!mb] [\c!font!] []
+ \variable [\c!mc] [\c!font!] []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showbodyfont]
+ \type
+ [\c!vals!]
+ \inheritvalues
+ [\y!setupbodyfont]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupbodyfont]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!,
+ \v!serif,\v!regular,\v!roman,
+ \v!sans,\v!support,\v!sansserif,
+ \v!mono,\v!type,\v!teletype,
+ \v!handwritten,\v!calligraphic,
+ 5pt,...,12pt]
+ [sau,ibm,12pt,\v!serif]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!switchtobodyfont]
+ \type
+ [\c!vals!]
+ \value
+ [5pt,...,12pt,\v!klein,\v!groot,\v!globaal]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definefont]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!font!]
+ []
+\stopsetup
+
+% colo-ini
+
+\startsetup
+ \command
+ [\y!setupcolor]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ [\v!rgb]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupcolors]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop,\v!globaal,\v!lokaal]
+ [\v!stop]
+ \variable
+ [\c!conversie]
+ [\v!ja,\v!nee,\v!altijd]
+ [\v!ja]
+ \variable
+ [\c!reductie]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!rgb]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!cmyk]
+ [\v!ja,\v!nee]
+ [\v!ja]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definecolor]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!r]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!g]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!b]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!c]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!m]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!y]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!k]
+ [\c!text!]
+ [0]
+ \variable
+ [\c!s]
+ [\c!text!]
+ [0]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startcolor]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!color]
+ \type
+ [\c!val!\c!arg!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!graycolor]
+ \type
+ [\c!val!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showcolor]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definepalet]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!identifier!]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuppalet]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definecolorgroup]
+ \type
+ [\c!val!\c!opt!\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!rgb,\v!cmyk,\v!grijs,\v!s]
+ [\v!rgb]
+ \value
+ [\c!trips!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showpalet]
+ \type
+ [\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!horizontaal,\v!vertikaal,\v!naam,\v!waarde]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showcolorgroup]
+ \type
+ [\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!horizontaal,\v!vertikaal,\v!naam,\v!waarde,\v!nummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!comparepalet]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!comparecolorgroup]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command [\y!showmakeup]
+ \type []
+\stopsetup
+
+% core-ver
+
+\startsetup
+ \command
+ [\y!setuptype]
+ \type
+ [\c!var!]
+ \variable
+ [\c!spatie]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!optie]
+ [\v!schuin,\v!normaal,\v!geen]
+ [\v!geen]
+\stopsetup
+
+\startsetup
+ \command [\y!type]
+ \type [\c!arg!]
+ \value [\c!text!][]
+\stopsetup
+
+\startsetup
+ \command [\y!typ]
+ \type [\c!arg!]
+ \value [\c!text!][]
+\stopsetup
+
+\startsetup
+ \command [\y!tex]
+ \type [\c!arg!]
+ \value [\c!text!][]
+\stopsetup
+
+\startsetup
+ \command [\y!arg]
+ \type [\c!arg!]
+ \value [\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definetyping]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\v!file,\v!typen,\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setuptyping]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuptyping]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \value
+ [\v!file,\v!typen,\c!identifier!]
+ []
+ \variable
+ [\c!spatie]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!pagina]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!optie]
+ [\v!schuin,\v!normaal,\v!commandos,\v!kleur,\v!geen]
+ [\v!geen]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!marge]
+ [\c!dimension!,\v!standaard]
+ [0pt]
+ \variable
+ [\c!evenmarge]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!onevenmarge]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!blanko]
+ [\c!dimension!,\v!klein,\v!middel,\v!groot,\v!standaard,\v!halveregel,\v!regel]
+ [\v!regel]
+ \variable
+ [\c!escape]
+ [\c!character!]
+ [/]
+ \variable
+ [\c!springvolgendein]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!palet]
+ [\c!identifier!]
+ [colorpretty]
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\v!typen]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!typefile]
+ \type
+ [\c!arg!]
+ \value
+ [\c!filename!]
+ []
+\stopsetup
+
+% core-not
+
+\startsetup
+ \command
+ [\y!setupfootnotes]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!cijfers]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!tekst]
+ \variable
+ [\c!plaats]
+ [\v!pagina,\v!tekst,\v!kolommen]
+ [\v!pagina]
+ \variable
+ [\c!lijn]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ [\v!klein]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [.125em]
+ \variable
+ [\c!kolomafstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!margeafstand]
+ [\c!dimension!]
+ [.5em]
+ \variable
+ [\c!n]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!nummercommando]
+ [\c!oneargument!]
+ [] % \hoog
+ \inheritvariables
+ [\y!framed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupfootnotedefinition]
+ \type
+ [\c!vars!]
+ \inheritvariables
+ [\y!doordefinieren]
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!footnote]
+ \type[\c!opt!\c!ref!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!note]
+ \type[\c!optint!\c!ref!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startlocalfootnotes]
+ \type
+ [\c!stp!]
+ \inheritvariables
+ [\y!setupfootnotes]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!placelocalfootnotes]
+ \type
+ [\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!setupfootnotes]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!placefootnotes]
+ \type
+ [\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!setupfootnotes]
+ []
+\stopsetup
+
+% core-fnt / core-con
+
+\startsetup
+ \command
+ [\y!setupunderbar]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!variant]
+ [a,b,c]
+ [a]
+ \variable
+ [\c!lijndikte]
+ [\c!dimension!]
+ [\lijndikte]
+\stopsetup
+
+\startsetup
+ \command[\y!underbar]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!underbars]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!overbar]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!overbars]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!overstrike]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!overstrikes]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!romannumerals]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Romannumerals]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!numbers]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!character]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Character]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!characters]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Characters]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\v!mediaeval] % geen \y!mediaeval
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!month]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!MONTH]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!weekday]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!WEEKDAY]
+ \type[\c!arg!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupcapitals]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!titel]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!sc]
+ [\v!ja,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command[\y!kap]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!nokap]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!KAP]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Kap]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Kaps]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!WORD]
+ \type[\c!wrd!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!WORDS]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Word]
+ \type[\c!wrd!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!Words]
+ \type[\c!wrds!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!stretched]
+ \type[\c!wrd!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definesymbol]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definefiguresymbol]
+ \type
+ [\c!val!\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+ \inheritvariables
+ [\y!externalfigure]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!symbol]
+ \type
+ [\c!opt!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startsymbolset]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupsymbolset]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!usesymbols]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showsymbolset]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!defineconversion]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!command!,\c!text!] % eigenlijk texts
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!convertnumber]
+ \type
+ [\c!arg!\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!number!]
+ []
+\stopsetup
+
+% lang-lab
+
+\startsetup
+ \command
+ [\y!setupheadtext]
+ \type
+ [\c!opt!\c!val!\c!var!]
+ \value
+ [\s!nl,\s!fr,\s!en,\s!uk,\s!de,\s!sp,\s!cz,..]
+ [\s!nl]
+ \variable
+ [\c!identifier!]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuplabeltext]
+ \type
+ [\c!opt!\c!val!\c!var!]
+ \value
+ [\s!nl,\s!fr,\s!en,\s!uk,\s!de,\s!sp,\s!cz,..]
+ [\s!nl]
+ \variable
+ [\c!identifier!]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!headtext]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!labeltext]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+% core-rul
+
+\startsetup
+ \command
+ [\y!setupmarginrules]
+ \type
+ [\c!var!]
+ \variable
+ [\c!niveau]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!dikte]
+ [\c!dimension!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startmarginrule]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!marginrule]
+ \type
+ [\c!val!\c!arg!]
+ \value
+ [\c!number!]
+ []
+\stopsetup
+
+% \startsetup
+% \command
+% [\y!setuprules]
+% \type
+% [\c!var!]
+% \variable
+% [\c!dikte]
+% [\v!klein,\v!middel,\v!groot,\c!dimension!]
+% [\v!middel]
+% \variable
+% [\c!voor]
+% [\c!command!]
+% []
+% \variable
+% [\c!na]
+% [\c!command!]
+% []
+% \stopsetup
+
+\startsetup
+ \command
+ [\y!setuplinewidth]
+ \type
+ [\c!val!]
+ \value
+ [\c!dimension!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupframed]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!hoogte]
+ [\v!passend,\v!ruim,\c!dimension!]
+ [\v!ruim]
+ \variable
+ [\c!breedte]
+ [\v!passend,\v!ruim,\c!dimension!]
+ [\v!ruim]
+ \variable
+ [\c!offset]
+ [\v!geen,\v!overlay,\c!dimension!]
+ [1em]
+ \variable
+ [\c!plaats]
+ [\v!laag,\v!diepte]
+ []
+ \variable
+ [\c!optie]
+ [\v!geen,\v!leeg]
+ [\v!geen]
+ \variable
+ [\c!strut]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!uitlijnen]
+ [\v!nee,\v!links,\v!rechts,\v!midden,\v!normaal]
+ [\v!nee]
+ \variable
+ [\c!onder]
+ [\c!command!]
+ [\vss]
+ \variable
+ [\c!boven]
+ [\c!command!]
+ []
+ \variable
+ [\c!kader]
+ [\v!aan,\v!uit]
+ [\v!aan]
+ \variable
+ [\c!bovenkader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!onderkader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!linkerkader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!rechterkader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!kaderoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!kaderdiepte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!kaderhoek]
+ [\v!rond,\v!recht]
+ [\v!recht]
+ \variable
+ [\c!kaderstraal]
+ [\c!dimension!]
+ [.5\korpsgrootte]
+ \variable
+ [\c!kaderkleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!achtergrond]
+ [\v!raster,\v!kleur,\v!geen]
+ [\v!geen]
+ \variable
+ [\c!achtergrondraster]
+ [\c!number!]
+ [0.9]
+ \variable
+ [\c!achtergrondkleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!achtergrondoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!achtergronddiepte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!achtergrondhoek]
+ [\v!rond,\v!recht]
+ [\v!recht]
+ \variable
+ [\c!achtergrondstraal]
+ [\c!dimension!]
+ [.5\korpsgrootte]
+ \variable
+ [\c!diepte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!hoek]
+ [\v!rond,\v!recht]
+ [\v!recht]
+ \variable
+ [\c!straal]
+ [\c!dimension!]
+ [.5\korpsgrootte]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!framed]
+ \type
+ [\c!opt!\c!vars!\c!arg!]
+ \inheritvariables
+ [\y!setupframed]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!inframed]
+ \type
+ [\c!opt!\c!vars!\c!arg!]
+ \inheritvariables
+ [\y!setupframed]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!thinrules]
+ \type
+ [\c!opt!\c!var!]
+ \inheritvariables
+ [\y!setupthinrules]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupthinrules]
+ \type
+ [\c!var!]
+ \variable
+ [\c!afstand]
+ [\v!klein,\v!middel,\v!groot]
+ [\v!middel]
+ \variable
+ [\c!n]
+ [\c!number!]
+ [3]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ [.5\linewidth]
+ \variable
+ [\c!diepte]
+ [\c!dimension!]
+ [.5\linewidth]
+\stopsetup
+
+\startsetup
+ \command[\y!hairline]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!thinrule]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!defineframedtext]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setupframedtexts]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!defineframed]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setupframedtexts]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupframedtexts]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!klein...,\c!command!] % \v!kap
+ [\v!vet]
+ \variable
+ [\c!links]
+ [\c!command!]
+ [\hfill]
+ \variable
+ [\c!rechts]
+ [\c!command!]
+ [\hfill]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!binnen]
+ [\c!command!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+% \startsetup
+% \command
+% [\y!startframedtext]
+% \type
+% [\c!opt!\c!val!\c!opt!\c!vars!\c!stp!]
+% \value
+% [\v!links,\v!rechts,\v!midden]
+% []
+% \inheritvariables
+% [\y!setupframedtexts]
+% []
+% \stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!framedtext>>]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vars!\c!stp!]
+ \value
+ [\v!links,\v!rechts,\v!midden]
+ []
+ \inheritvariables
+ [\y!setupframedtexts]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!framedtext>>]
+ \type
+ [\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!setupframedtexts]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startbackground]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!background]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupbackground]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!linkeroffset]
+ [\c!dimension!]
+ [.5\korpsgrootte]
+ \variable
+ [\c!rechteroffset]
+ [\c!dimension!]
+ [.5\korpsgrootte]
+ \variable
+ [\c!bovenoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!onderoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fillinrules]
+ \type
+ [\c!opt!\c!vars!\c!arg!\c!opt!\c!arg!]
+ \inheritvariables
+ [\y!setupfillinrules]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fillintext]
+ \type
+ [\c!opt!\c!vars!\c!arg!\c!opt!\c!arg!\c!par!]
+ \inheritvariables
+ [\y!setupfillinrules]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupfillinrules]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!breedte]
+ [\v!passend,\c!dimension!]
+ [\v!ruim]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!n]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fillinline]
+ \type
+ [\c!opt!\c!vars!\c!nop!\c!par!]
+ \inheritvariables
+ [\y!setupfillinlines]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupfillinlines]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [3cm]
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [3cm]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuptextrules]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!inmarge]
+ [\v!links]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [2em]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [2em]
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ []
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!lijnkleur]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!textrule]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!arg!]
+ \value
+ [\v!boven,\v!onder]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!starttextrule]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!arg!\c!stp!]
+ \value
+ [\v!boven,\v!onder]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!blackrule]
+ \type
+ [\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!setupblackrules]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!blackrules]
+ \type
+ [\c!vars!]
+ \inheritvariables
+ [\y!setupblackrules]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupblackrules]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\v!max]
+ [1.5em]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!max]
+ [1ex]
+ \variable
+ [\c!diepte]
+ [\c!dimension!,\v!max]
+ [0pt]
+ \variable
+ [\c!variant]
+ [\c!a,\c!b]
+ [\c!a]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [.25ex]
+ \variable
+ [\c!n]
+ [\c!number!]
+ [1]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!defineoverlay]
+ \type
+ [\c!vals!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!command!]
+ []
+\stopsetup
+
+\documenteduntilhere
+
+\startsetup
+ \command
+ [\y!usemodule]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!reset]
+ \type[\c!vals!]
+ \value[\c!identifier!][]
+\stopsetup
+
+\startsetup
+ \command[\y!geentest]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!startdeelomgeving]
+ \type[\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupsystem]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!resolutie]
+ [\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!usepath]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!,\v!reset]
+ [.]
+\stopsetup
+
+\startsetup
+ \command[\y!laag]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!hoog]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!laho]
+ \type[\c!arg!\c!arg!]
+ \value[\c!text!][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!toonkader]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!toonopbouw]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!regellinks]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!regelrechts]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!regelmidden]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!woordrechts]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!inmarge]
+ \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+ \value[+,-,\v!laag][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!inanderemarge]
+ \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+ \value[+,-,\v!laag][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!inlinker]
+ \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+ \value[+,-,\v!laag][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!inrechter]
+ \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+ \value[+,-,\v!laag][]
+ \value[\c!text!][]
+\stopsetup
+
+%\startsetup
+% \command[\y!oplinker]
+% \type[\c!arg!]
+% \value[\c!text!][]
+%\stopsetup
+
+\startsetup
+ \command[\y!kolom]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!toonstruts]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!tooninstellingen]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!toonlayout]
+ \type[]
+\stopsetup
+
+% \startsetup
+% \command[\y!margetitel]
+% \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+% \value[+,-,\v!laag][]
+% \value[\c!text!][]
+% \stopsetup
+
+% \startsetup
+% \command[\y!margewoord]
+% \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+% \value[+,-,\v!laag][]
+% \value[\c!text!][]
+% \stopsetup
+
+\startsetup
+ \command[\y!margetekst]
+ \type[\c!opt!\c!val!\c!opt!\c!ref!\c!arg!]
+ \value[+,-,\v!laag][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelmargeblokkenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!inmarge,\v!links,\v!midden,\v!rechts]
+ [\v!inmarge]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!midden,\v!rechts,\v!nee]
+ []
+ \variable
+ [\c!boven]
+ [\c!command!]
+ []
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!onder]
+ [\c!command!]
+ [\vfill]
+ \variable
+ [\c!links]
+ [\c!command!]
+ []
+ \variable
+ [\c!rechts]
+ [\c!command!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startmargeblok]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command[\v!deel]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!titel]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!hoofdstuk]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!paragraaf]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!sub\v!paragraaf]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!sub\v!sub\v!paragraaf]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!onderwerp]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!sub\v!onderwerp]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!sub\v!sub\v!onderwerp]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\v!bijlage]
+ \type[\c!opt!\c!refs!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!in]
+ \type[\c!optint!\c!arg!\c!optint!\c!arg!\c!ref!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!op]
+ \type[\c!optint!\c!arg!\c!optint!\c!arg!\c!ref!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!over]
+ \type[\c!optint!\c!arg!\c!ref!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!somewhere]
+ \type[\c!arg!\c!arg!\c!ref!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!atpage]
+ \type[\c!ref!]
+\stopsetup
+
+\startsetup
+ \command[\y!ref]
+ \type[\c!val!\c!ref!]
+ \value[t,p,r,s,e][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!textreference]
+ \type[\c!ref!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!pagereference]
+ \type[\c!ref!]
+\stopsetup
+
+\startsetup
+ \command[\y!reference]
+ \type[\c!ref!\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!usereferences]
+ \type[\c!vals!]
+ \value[\c!filename!][]
+\stopsetup
+
+\startsetup
+ \command[\y!definereference]
+ \type[\c!val!\c!refs!]
+ \value[\c!identifier!][]
+ \value[\c!text!][]
+\stopsetup
+
+% rudiment
+%
+% \startsetup
+% \command[\y!definieerhbox]
+% \type[\c!val!\c!val!]
+% \value[\c!identifier!][]
+% \value[\c!number!][]
+% \stopsetup
+
+\startsetup
+ \command[\y!hl]
+ \type[\c!val!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!vl]
+ \type[\c!val!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!omlaag]
+ \type[\c!val!]
+ \value[\c!dimension!][]
+\stopsetup
+
+\startsetup
+ \command[\y!witruimte]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!geenwitruimte]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!crlf]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!space]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!fixedspaces]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!nospace]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!opelkaar]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!herhaal]
+ \type[\c!val!]
+ \value[\c!repeat!\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steldoordefinierenin]
+ \type
+ [\c!opt!\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!breedte]
+ [\v!passend,\v!ruim,\c!dimension!]
+ [8em]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!monster]
+ [\c!text!]
+ []
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!midden,\v!rechts]
+ []
+ \variable
+ [\c!marge]
+ [\v!standaard,\v!ja,\v!nee,\c!dimension!]
+ []
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!boven,\v!aanelkaar,
+ \v!inmarge,\v!inlinker,\v!inrechter,\v!hangend]
+ [\v!links]
+ \variable
+ [\c!hang]
+ [\v!passend,\v!ruim,\c!number!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!springvolgendein]
+ [\v!ja,\v!nee]
+ [\v!ja]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steldoornummerenin]
+ \type
+ [\c!opt!\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!doordefinieren]
+ []
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!boven,\v!aanelkaar,
+ \v!inmarge,\v!inlinker,\v!inrechter,\v!hangend]
+ [\v!boven]
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!niveaus]
+ [\c!number!]
+ [3]
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!cijfers]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!tekst]
+ \variable
+ [\c!blokwijze]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!sectienummer]
+ [\v!ja,\v!nee]
+ []
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ [.]
+ \variable
+ [\c!afsluiter]
+ [\c!text!]
+ []
+ \variable
+ [\c!koppeling]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!nummer]
+ [\v!nee,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!doornummeren]
+ \type
+ [\c!vals!\c!opt!\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!steldoornummerenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!doornummering>>]
+ \type
+ [\c!optint!\c!nop!\c!par!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!doornummering>>]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!doordefinieren]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!steldoordefinierenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!doordefinitie>>]
+ \type
+ [\c!arg!\c!nop!\c!par!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!doordefinitie>>]
+ \type
+ [\c!arg!\c!stp!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steldoorspringenin]
+ \type
+ [\c!opt!\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!breedte]
+ [\v!passend,\c!dimension!]
+ [\v!passend]
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!monster]
+ [\c!text!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ [{ : }]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!doorspringen]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!steldoorspringenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!doorsprong>>]
+ \type
+ [\c!nop!\c!par!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!doorlabelen]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!plaats]
+ [\v!inmarge,\v!intekst]
+ [\v!intekst]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!hoofdstuk]
+ \variable
+ [\c!blokwijze]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ []
+ \variable
+ [\c!kopkleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!doorlabel>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelkolommenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!n]
+ [\c!number!]
+ []
+ \variable
+ [\c!lijn]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!tolerantie]
+ [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
+ [\v!soepel]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1.5em]
+ \variable
+ [\c!balanceren]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!uitlijnen]
+ [\v!ja,\v!nee,\v!tekst]
+ [\v!tekst]
+ \variable
+ [\c!blanko]
+ [\v!vast,\v!halveregel,\v!regel,\v!flexibel,\v!groot,\v!middel,\v!klein]
+ [\v!vast,\v!regel]
+ \variable
+ [\c!optie]
+ [\v!achtergrond]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startkolommen]
+ \type
+ [\c!opt!\c!vars!\c!stp!]
+ \inheritvariables
+ [\y!stelkolommenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieertekst]
+ \type
+ [\c!val!\c!val!\c!val!\c!opt!\c!val!\c!opt!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!hoofd,\v!voet]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelhoofdin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \variable
+ [\c!status]
+ [\v!normaal,\v!stop,\v!start,\v!leeg,\v!hoog,\v!geen,
+ \v!geenmarkering,\c!identifier!]
+ [\v!normaal]
+ \variable
+ [\c!strut]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!linkerletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!rechterletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!linkerbreedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!rechterbreedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelvoetin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \inheritvalues
+ [\y!stelhoofdin]
+ []
+ \inheritvariables
+ [\y!stelhoofdin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steltekstin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \inheritvalues
+ [\y!stelhoofdin]
+ []
+ \inheritvariables
+ [\y!stelhoofdin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelbovenin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \inheritvalues
+ [\y!stelhoofdin]
+ []
+ \inheritvariables
+ [\y!stelhoofdin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelonderin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \inheritvalues
+ [\y!stelhoofdin]
+ []
+ \inheritvariables
+ [\y!stelhoofdin]
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!geenhoofdenvoetregels]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command[\y!geenbovenenonderregels]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelhoofdtekstenin]
+ \type
+ [\c!opt!\c!val!\c!val!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelvoettekstenin]
+ \type
+ [\c!opt!\c!val!\c!val!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelteksttekstenin]
+ \type
+ [\c!opt!\c!val!\c!val!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelboventekstenin]
+ \type
+ [\c!opt!\c!val!\c!val!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelondertekstenin]
+ \type
+ [\c!opt!\c!val!\c!val!\c!val!]
+ \value
+ [\v!tekst,\v!marge,\v!rand]
+ [\v!tekst]
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+ \value
+ [\c!text!,\c!section!,\v!datum,\c!marker!,\v!paginanummer]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieermarkering]
+ \type
+ [\c!val!\c!opt!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!koppelmarkering]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!ontkoppelmarkering]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!resetmarkering]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelmarkeringin]
+ \type
+ [\c!val!\c!var!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!scheider]
+ [\c!command!]
+ [---]
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!marking]
+ \type
+ [\c!val!\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!haalmarkering]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!eerste,\v!laatste,\v!vorige,\v!beide,\v!alles]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!geenmarkering]
+ \type
+ [\c!arg!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stellayoutin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\v!passend,\v!midden]
+ [15cm]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!passend,\v!midden]
+ [25cm]
+ \variable
+ [\c!rugwit]
+ [\c!dimension!]
+ [2.5cm]
+ \variable
+ [\c!kopwit]
+ [\c!dimension!]
+ [2.5cm]
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [2.5cm]
+ \variable
+ [\c!linkermarge]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!rechtermarge]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!hoofd]
+ [\c!dimension!]
+ [2.0cm]
+ \variable
+ [\c!voet]
+ [\c!dimension!]
+ [2.0cm]
+ \variable
+ [\c!boven]
+ [\c!dimension!]
+ [2.0cm]
+ \variable
+ [\c!onder]
+ [\c!dimension!]
+ [2.0cm]
+ \variable
+ [\c!linkerrand]
+ [\c!dimension!]
+ [3cm]
+ \variable
+ [\c!rechterrand]
+ [\c!dimension!]
+ [3cm]
+ \variable
+ [\c!hoofdafstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!voetafstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!bovenafstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!onderafstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!linkermargeafstand]
+ [\c!dimension!]
+ [12pt]
+ \variable
+ [\c!rechtermargeafstand]
+ [\c!dimension!]
+ [12pt]
+ \variable
+ [\c!linkerrandafstand]
+ [\c!dimension!]
+ [12pt]
+ \variable
+ [\c!rechterrandafstand]
+ [\c!dimension!]
+ [12pt]
+ \variable
+ [\c!rugoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!kopoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!markering]
+ [\v!aan,\v!uit,\v!kleur]
+ [\v!uit]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!midden,\v!rechts,\v!onder,\v!boven,
+ \v!enkelzijdig,\v!dubbelzijdig]
+ [\v!enkelzijdig]
+ \variable
+ [\c!schaal]
+ [\c!dimension!]
+ [1]
+ \variable
+ [\c!nx]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!ny]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!dx]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!dy]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!regels]
+ [\c!number!]
+ []
+ \variable
+ [\c!grid]
+ [\v!ja,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!paslayoutaan]
+ \type
+ [\c!opt!\c!vals!\c!vars!]
+ \value
+ [\c!number!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!max]
+ []
+ \variable
+ [\c!regels]
+ [\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!toongrid]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsopgrid]
+ \type
+ [\c!opt!\c!val!\c!arg!]
+ \inheritvalues
+ [\y!verplaatsopgrid]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!verplaatsopgrid]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\v!boven,\v!beide,\v!onder]
+ [\v!beide]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startproject]
+ \type
+ [\c!fil!\c!stp!]
+ \value
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startomgeving]
+ \type
+ [\c!fil!\c!stp!]
+ \value
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startprodukt]
+ \type
+ [\c!fil!\c!stp!]
+ \value
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startonderdeel]
+ \type
+ [\c!fil!\c!stp!]
+ \value
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!geenfilesmeer]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelinterliniein]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vars!]
+ \value
+ [\v!reset,\v!klein,\v!middel,\v!groot,\v!aan,\v!uit]
+ [\v!klein]
+ \variable
+ [\v!hoogte]
+ [\c!number!]
+ [0.72]
+ \variable
+ [\v!diepte]
+ [\c!number!]
+ [0.28]
+ \variable
+ [\v!regel]
+ [\c!dimension!]
+ [2.8ex]
+ \variable
+ [\v!boven]
+ [\c!number!]
+ [1.0]
+ \variable
+ [\v!onder]
+ [\c!number!]
+ [0.4]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelnummeringin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!variant]
+ [\v!enkelzijdig,\v!dubbelzijdig]
+ [\v!enkelzijdig]
+ \variable
+ [\c!plaats]
+ [\v!hoofd,\v!voet,
+ \v!links,\v!rechts,\v!midden,
+ \v!marge,\v!kantlijn,\v!inlinker,\v!inrechter]
+ [\v!midden]
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!cijfers]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!links]
+ [\c!text!]
+ []
+ \variable
+ [\c!rechts]
+ [\c!text!]
+ []
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!deel]
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!nummerscheider]
+ [\c!text!]
+ [--]
+ \variable
+ [\c!tekstscheider]
+ [\c!text!]
+ []
+ \variable
+ [\c!section!\c!nummer]
+ [\v!ja,\v!nee]
+ []
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ [--]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!commando]
+ [\c!oneargument!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsmallerin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!links]
+ [\c!dimension!]
+ [1.5em]
+ \variable
+ [\c!rechts]
+ [\c!dimension!]
+ [1.5em]
+ \variable
+ [\c!midden]
+ [\c!dimension!]
+ [1.5em]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieer]
+ \type
+ [\c!opt!\c!val!\c!cmd!\c!arg!]
+ \value
+ [\c!number!]
+ [0]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikcommandos]
+ \type
+ [\c!arg!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerstartstop]
+ \type
+ [\c!val!\c!vars!]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!commandos]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelkoppenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!sectienummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!variant]
+ [\v!normaal,\v!inmarge,\v!midden,\v!tekst]
+ [\v!normaal]
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ [.]
+ \variable
+ [\c!commando]
+ [\c!twoarguments!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelblokkopjesin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!boven,\v!onder,\v!geen,\v!hoog,\v!laag,\v!midden]
+ [\v!onder]
+ \variable
+ [\c!breedte]
+ [\v!passend,\v!max,\c!dimension!]
+ [\v!passend]
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!nummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ %\variable
+ % [\c!voor]
+ % [\c!command!]
+ % [\blanko]
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []% {\blanko[\v!middel]}]
+ %\variable
+ % [\c!na]
+ % [\c!command!]
+ % [\blanko]
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!midden,\v!rechts,\v!nee]
+ []
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!cijfers]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!tekst]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelblokkopjein]
+ \type
+ [\c!val!\c!vars!]
+ \inheritvariables
+ [\y!stelblokkopjesin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelplaatsblokkenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!midden]
+ [\v!midden]
+ \variable
+ [\c!breedte]
+ [\v!passend,\c!dimension!]
+ [\v!passend]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!voorwit]
+ [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen]
+ []
+ \variable
+ [\c!nawit]
+ [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen]
+ []
+ \variable
+ [\c!zijvoorwit]
+ [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen]
+ []
+ \variable
+ [\c!zijnawit]
+ [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,\v!geen]
+ []
+ \variable
+ [\c!nboven]
+ [\c!number!]
+ [2]
+ \variable
+ [\c!nonder]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!nregels]
+ [\c!number!]
+ [4]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelplaatsblokkensplitsenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!letter]
+ \variable
+ [\c!regels]
+ [\c!number!]
+ [3]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!splitsplaatsblok]
+ \type
+ [\c!opt!\c!vars!\c!arg!\c!arg!]
+ \inheritvariables
+ [\y!stelplaatsblokkensplitsenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelnaastplaatsenin]
+ \type
+ [\c!var!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!stop]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startnaast]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelkoppeltekenin]
+ \type
+ [\c!var!]
+ \variable
+ [\c!teken]
+ [--,---,-,~,),(,=,/]
+ [--]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelpositionerenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!overlay]
+ [\v!start]
+ \variable
+ [\c!eenheid]
+ [\s!cm,\s!pt,\s!em,\s!mm,\s!ex,\s!sp,\s!in]
+ [\s!cm]
+ \variable
+ [\c!factor]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!schaal]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!offset]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!xstap]
+ [\v!absoluut,\v!relatief]
+ [\v!absoluut]
+ \variable
+ [\c!ystap]
+ [\v!absoluut,\v!relatief]
+ [\v!absoluut]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startpositioneren]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!rooster]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!x]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!y]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!nx]
+ [\c!number!]
+ [10]
+ \variable
+ [\c!ny]
+ [\c!number!]
+ [10]
+ \variable
+ [\c!dx]
+ [\c!number!]
+ [0.5]
+ \variable
+ [\c!dy]
+ [\c!number!]
+ [0.5]
+ \variable
+ [\c!xstap]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!ystap]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!offset]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!factor]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!schaal]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!eenheid]
+ [\s!cm,\s!pt,\s!em,\s!mm,\s!ex,\s!sp,\s!in]
+ [\s!cm]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!midden]
+ [\v!links]
+\stopsetup
+
+
+\startsetup
+ \command
+ [\y!pagina]
+ \type
+ [\c!vals!]
+ \value
+ [\v!ja,\v!opmaak,\v!nee,\v!voorkeur,\v!grotevoorkeur,
+ \v!links,\v!rechts,\v!blokkeer,\v!laatste,\v!viertal,
+ \v!even,\v!oneven,\v!blanko,\v!leeg,\v!reset]
+ [\v!ja]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupreferencing]
+ \type
+ [\c!var!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!section!\c!nummer]
+ [\v!ja,\v!nee]
+ []
+ \variable
+ [\c!prefix]
+ [+,-,\c!text!]
+ []
+ \variable
+ [\c!interactie]
+ [\v!label,\v!tekst,\v!alles,\v!symbool]
+ [\v!alles]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!links]
+ [\c!command!]
+ []
+ \variable
+ [\c!rechts]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupurl]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!type]
+ \variable
+ [\c!urlvariant]
+ [\v!geen,\v!beide,\v!voor,\v!na]
+ [\v!beide]
+ \variable
+ [\c!urlspatie]
+ [\v!ja,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!schrijfnaarreferentielijst]
+ \type
+ [\c!val!\c!arg!\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsreferentielijst]
+ \type
+ [\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerreferentielijst]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelreferentielijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelreferentielijstin]
+ \type
+ [\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!criterium]
+ [\c!section!,\v!lokaal,\v!vorige,\v!alles]
+ [\v!alles]
+ \variable
+ [\c!commando]
+ [\c!command!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!schrijfnaarlijst]
+ \type
+ [\c!val!\c!arg!\c!arg!]
+ \value
+ [\c!section!,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!schrijftussenlijst]
+ \type
+ [\c!val!\c!arg!]
+ \value
+ [\c!section!,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!geenlijst]
+ \type
+ [\c!arg!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatslijst]
+ \type
+ [\c!vals!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stellijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!bepaallijstkenmerken]
+ \type
+ [\c!vals!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stellijstin]
+ []
+\stopsetup
+
+% nieuw:
+
+% \startsetup
+% \command
+% [\y!plaatssamengesteldelijst]
+% \type
+% [\c!val!\c!opt!\c!vars!]
+% \value
+% [\c!identifier!]
+% []
+% \inheritvariables
+% [\y!stelsamengesteldelijstin]
+% []
+% \stopsetup
+
+\startsetup
+ \command
+ [\y!definieerlijst]
+ \type
+ [\c!val!\c!opt!\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stellijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stellijstin]
+ \type
+ [\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!variant]
+ [\c!a,\c!b,\c!c,\c!d,\v!geen]
+ [\c!b]
+ \variable
+ [\c!koppeling]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!criterium]
+ [\c!section!,\v!lokaal,\v!vorige,\v!alles]
+ [\v!lokaal]
+ \variable
+ [\c!paginaovergangen]
+ [\c!list!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!nummerletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!tekstletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!paginaletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!commando]
+ [\c!threearguments!]
+ []
+ \variable
+ [\c!nummercommando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!tekstcommando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!paginacommando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!interactie]
+ [\v!sectienummer,\v!tekst,\v!paginanummer,\v!alles]
+ [\v!sectienummer]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!links]
+ [\c!text!]
+ []
+ \variable
+ [\c!rechts]
+ [\c!text!]
+ []
+ \variable
+ [\c!label]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!prefix]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!paginanummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!section!\c!nummer]
+ [\v!ja,\v!nee]
+ []
+ \variable
+ [\c!titeluitlijnen]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!marge]
+ [\c!dimension!]
+ [3em]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [3em]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!passend,\v!ruim]
+ [\v!ruim]
+ \variable
+ [\c!diepte]
+ [\c!dimension!,\v!passend,\v!ruim]
+ [\v!ruim]
+ \variable
+ [\c!offset]
+ [\c!dimension!]
+ [.25em]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [0em]
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ []
+ \variable
+ [\c!symbool]
+ [\v!geen,1,2,3,...]
+ []
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!nee,\v!commando]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieersamengesteldelijst]
+ \type
+ [\c!val!\c!vals!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!list!]
+ []
+ \inheritvariables
+ [\y!stelsamengesteldelijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsamengesteldelijstin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!niveau]
+ [1,2,3,4,\c!section!,\v!huidige]
+ [4]
+ \inheritvariables
+ [\y!stellijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!plaats<<\y!samengesteldelijst>>]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelsamengesteldelijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!volledige<<\y!samengesteldelijst>>]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelsamengesteldelijstin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelnummerenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!hoofdstuk]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelformulesin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts]
+ [\v!rechts]
+ \variable
+ [\c!links]
+ [\c!text!]
+ [{(}]
+ \variable
+ [\c!rechts]
+ [\c!text!]
+ [{)}]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!publicatie]
+ \type
+ [\c!ref!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelpublicatiesin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!variant]
+ [\c!apa,\v!normaal]
+ [\c!apa]
+ \inheritvariables
+ [\y!steldoornummerenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelregelsin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!inspringen]
+ [\v!ja,\v!nee,\v!even,\v!oneven]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startregels]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelregelnummerenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins,
+ \v!tekst]
+ [\v!cijfers]
+ \variable
+ [\c!start]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!stap]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [2ex]
+ \variable
+ [\c!plaats]
+ [\v!intekst,\v!inmarge]
+ [\v!inmarge]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!prefix]
+ [\c!text!]
+ []
+ \variable
+ [\c!refereren]
+ [\v!aan,\v!uit]
+ [\v!aan]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startregelnummeren]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\v!verder]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startregel]
+ \type
+ [\c!ref!\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!eenregel]
+ \type
+ [\c!ref!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!inregel]
+ \type
+ [\c!ref!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelinmargein]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \value
+ [\v!links,\v!rechts,\c!number!]
+ []
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!beide]
+ [\v!beide]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!uitlijnen]
+ [\v!binnen,\v!buiten,\v!links,\v!rechts,\v!midden,\v!normaal,\v!nee,\v!ja]
+ [\v!binnen]
+ \variable
+ [\c!regel]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!scheider]
+ [\c!text!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelpaginanummerin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!nummer]
+ [\c!number!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop,\v!handhaaf]
+ [\v!start]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsubpaginanummerin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!wijze]
+ [\v!per\v!tekst,\v!per\c!section!]
+ [\v!per\v!deel]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop,\v!geen]
+ [\v!stop]
+\stopsetup
+
+%\startsetup \command[\y!paginanummer] \type[] \stopsetup
+%\startsetup \command[\y!subpaginanummer] \type[] \stopsetup
+%\startsetup \command[\y!aantalsubpaginas] \type[] \stopsetup
+%\startsetup \command[\y!totaalaantalpaginas] \type[] \stopsetup
+
+\startsetup
+ \command
+ [\y!stelblankoin]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\v!normaal,\v!standaard,\v!regel,\c!dimension!,
+ \v!groot,\v!middel,\v!klein,
+ \v!vast,\v!flexibel]
+ [\v!normaal]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerblanko]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvalues
+ [\y!stelblankoin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerpapierformaat]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!number!]
+ [297mm]
+ \variable
+ [\c!hoogte]
+ [\c!number!]
+ [210mm]
+ \variable
+ [\c!schaal]
+ [\c!dimension!]
+ [1]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelpapierformaatin]
+ \type
+ [\c!vals!\c!opt!\c!vals!]
+ \value
+ [A3,A4,A5,A6,CD,\c!identifier!,
+ \v!liggend,\v!gespiegeld,\v!geroteerd,90,180,270]
+ [A4]
+ \value
+ [A3,A4,A5,A6,\c!identifier!,
+ \v!liggend,\v!gespiegeld,\v!geroteerd,\v!negatief,90,180,270]
+ [A4]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelarrangerenin]
+ \type
+ [\c!vals!]
+ \value
+ [2*8,2*4,2*2,2UP,2DOWN,
+ \v!gespiegeld,\v!geroteerd,\v!dubbelzijdig,\v!negatief,90,180,270]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!toonprint]
+ \type
+ [\c!vals!\c!vals!\c!vars!]
+ \inheritvariables
+ [\y!stelpapierformaatin]
+ []
+ \inheritvariables
+ [\y!stelpapierformaatin]
+ []
+ \inheritvariables
+ [\y!stellayoutin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerbeeldmerk]
+ \type
+ [\c!val!\c!val!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!boven,\v!hoofd,\v!voet,\v!onder]
+ []
+ \value
+ [\v!geen,
+ \v!linkerrand,\v!linkermarge,
+ \v!links,\v!midden,\v!rechts,
+ \v!rechtermarge,\v!rechterrand]
+ []
+ \variable
+ [\c!commando]
+ [\c!command!,\c!text!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!stop]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsbeeldmerken]
+ \type
+ [\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelwitruimtein]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\v!geen,\v!klein,\v!middel,\v!groot,\v!regel,\v!vast,\v!herstel,\c!dimension!]
+ [\v!geen]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelinspringenin]
+ \type
+ [\c!vals!]
+ \value
+ [\v!geen,\v!klein,\v!middel,\v!groot,\v!volgende,\v!eerste,\c!dimension!]
+ [\v!geen]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieersectieblok]
+ \type
+ [\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelsectieblokin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsectieblokin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!nummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!pagina]
+ [\v!ja,\v!rechts]
+ [\v!rechts]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieersectie]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsectiein]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!conversie]
+ [\v!cijfers,\v!letters,\v!Letters,\v!romeins,\v!Romeins]
+ [\v!cijfers]
+ \variable
+ [\c!vorigenummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelkopin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!section!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ []
+ \variable
+ [\c!tekstletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ []
+ \variable
+ [\c!nummerletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ []
+ \variable
+ [\c!nummer]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!eigennummer]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!pagina]
+ [\v!links,\v!rechts,\v!ja]
+ []
+ \variable
+ [\c!doorgaan]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!hoofd]
+ [\v!geen,\v!leeg,\v!hoog,\v!geenmarkering]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!variant]
+ [\v!normaal,\v!inmarge,\v!midden,\v!tekst]
+ [\v!normaal]
+ \variable
+ [\c!commando]
+ [\c!twoarguments!]
+ []
+ \variable
+ [\c!nummercommando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!tekstcommando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!prefix]
+ [+,-,\c!text!]
+ []
+ \variable
+ [\c!plaatskop]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!verhoognummer]
+ [\v!ja,\v!nee,\c!filename!]
+ [\v!ja]
+ \variable
+ [\c!springvolgendein]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!file]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!commando,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelkopnummerin]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!section!]
+ []
+ \value
+ [\c!number!,+\c!number!,-\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!kopnummer]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\c!section!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!bepaalkopnummer]
+ \type
+ [\c!val!]
+ \value
+ [\c!section!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!huidigekopnummer]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!volgende<<\y!sectie>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerkop]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!section!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelopsommingin]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vals!\c!opt!\c!vars!]
+ \value
+ [\c!number!,\v!elk]
+ []
+ \value
+ [\v!standaard,\c!repeat!\v!ruim,\c!repeat!\v!aanelkaar,\v!opelkaar,
+ \v!afsluiter,\v!aansluitend,\v!opmarge,\v!inmarge,\v!autointro
+ \v!los]
+ [\v!standaard]
+ \variable
+ [\c!marge]
+ [\v!nee,\v!standaard,\c!dimension!]
+ [0pt]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [1.5em]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [0.5em]
+ \variable
+ [\c!factor]
+ [\c!number!]
+ [0]
+ \variable
+ [\c!items]
+ [\c!number!]
+ [4]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!kopvoor]
+ [\c!command!]
+ []
+ \variable
+ [\c!kopna]
+ [\c!command!]
+ []
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!marletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!type]
+ \variable
+ [\c!symletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!afsluiter]
+ [\c!text!]
+ [.]
+ \variable
+ [\c!n]
+ [\c!number!]
+ []
+ \variable
+ [\c!symbool]
+ [\c!number!]
+ []
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!rechts,\v!normaal]
+ [\v!normaal]
+ \variable
+ [\c!springvolgendein]
+ [\v!ja,\v!nee]
+ [\v!ja]
+\stopsetup
+
+%\startsetup
+% \command
+% [\y!symbol]
+% \type
+% [\c!val!]
+% \value
+% [\c!number!]
+% []
+%\stopsetup
+
+\startsetup
+ \command
+ [\y!startopsomming]
+ \type
+ [\c!opt!\c!vals!\c!opt!\c!vars!\c!stp!]
+ \value
+ [a,A,KA,n,N,m,r,R,KR,\c!number!,\v!verder,
+ \v!standaard,\c!repeat!\v!ruim,\c!repeat!\v!aanelkaar,\v!opelkaar,
+ \v!afsluiter,\v!aansluitend,\v!opmarge,\v!inmarge,\v!intro,\v!kolommen]
+ [\v!standaard]
+ \inheritvariables
+ [\y!stelopsommingin]
+ []
+\stopsetup
+
+\startsetup \command[\y!som] \type[\c!opt!\c!refs!] \stopsetup
+\startsetup \command[\y!but] \type[\c!alwint!\c!ref!] \stopsetup
+\startsetup \command[\y!its] \type[\c!opt!\c!refs!] \stopsetup
+\startsetup \command[\y!ran] \type[\c!arg!] \stopsetup
+\startsetup \command[\y!kop] \type[\c!opt!\c!refs!] \stopsetup
+\startsetup \command[\y!mar] \type[\c!opt!\c!refs!] \stopsetup
+\startsetup \command[\v!sub] \type[\c!opt!\c!refs!] \stopsetup % no \y!sub
+\startsetup \command[\y!sym] \type[\c!arg!] \stopsetup
+\startsetup \command[\y!nop] \type[] \stopsetup
+
+\startsetup
+ \command
+ [\y!definieerregister]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!plural!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelregisterin]
+ \type
+ [\c!val!\c!opt!\c!val!\c!vars!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!n]
+ [\c!number!]
+ [2]
+ \variable
+ [\c!balanceren]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!uitlijnen]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!paginaletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!tekstletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!aanduiding]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!koppeling]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!section!\c!nummer]
+ [\v!ja,\v!nee]
+ []
+ \variable
+ [\c!criterium]
+ [\c!section!,\v!lokaal,\v!alles]
+ [\v!deel]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!symbool]
+ [1,2,...,\c!n,\c!a,...,\v!geen]
+ []
+ \variable
+ [\c!interactie]
+ [\v!paginanummer,\v!tekst]
+ [\v!paginanummer]
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!commando,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!refereren]
+ [\v!aan,\v!uit]
+ [\v!aan]
+ \variable
+ [\c!commando]
+ [\c!oneargument!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!register>>]
+ \type
+ [\c!opt!\c!val!\c!idxs!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!register>>]
+ \type
+ [\c!opt!\c!val!\c!idxs!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!schrijfnaarregister]
+ \type
+ [\c!val!\c!opt!\c!val!\c!idxs!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!gekoppelde<<\y!register>>]
+ \type
+ [\c!opt!\c!val!\c!idx!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!koppelregister]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!zie<<\y!register>>]
+ \type
+ [\c!opt!\c!val!\c!arg!\c!idxs!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!volledige<<\y!register>>]
+ \type
+ [\c!optint!\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!stelregisterin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!plaats<<\y!register>>]
+ \type
+ [\c!optint!\c!opt!\c!vars!]
+ \inheritvariables
+ [\y!stelregisterin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieersynoniemen]
+ \type
+ [\c!val!\c!val!\c!val!\c!opt!\c!val!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!plural!]
+ []
+ \value
+ [\c!command!]
+ []
+ \value
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsynoniemenin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!tekstletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!kap]
+ \variable
+ [\c!synoniemletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!boven,\v!aanelkaar,
+ \v!inmarge,\v!inlinker,\v!inrechter]
+ [\v!links]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [5em]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!criterium]
+ [\v!alles,\v!gebruikt]
+ [\v!gebruikt]
+ \variable
+ [\c!conversie]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!commando,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!synoniem>>]
+ \type
+ [\c!opt!\c!val!\c!arg!\c!arg!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!volledige\e!lijstmet<<\y!synoniemen>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!plaats\e!lijstmet<<\y!synoniemen>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command[\e!laad<<\y!synoniemen>>]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieersorteren]
+ \type
+ [\c!val!\c!val!\c!opt!\c!val!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!plural!]
+ []
+ \value
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsorterenin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!commando]
+ [\c!oneargument!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!criterium]
+ [\v!alles,\v!gebruikt]
+ [\v!gebruikt]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!expansie]
+ [\v!ja,\v!commando,\v!nee]
+ [\v!nee]
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!sorteer>>]
+ \type
+ [\c!val!\c!arg!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!volledige\e!lijstmet<<\y!sorteren>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!plaats\e!lijstmet<<\y!sorteren>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command[\e!laad<<\y!sorteren>>]
+ \type[]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieeropmaak]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelopmaakin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startopmaak]
+ \type
+ [\c!val!\c!opt!\c!vars!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelopmaakin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelopmaakin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [\zetbreedte]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ [\teksthoogte]
+ \variable
+ [\c!voffset]
+ [\c!dimension!]
+ [\!!zeropoint]
+ \variable
+ [\c!hoffset]
+ [\c!dimension!]
+ [\!!zeropoint]
+ \variable
+ [\c!pagina]
+ [\v!links,\v!ja,\v!rechts]
+ []
+ \variable
+ [\c!commandos]
+ [\c!command!]
+ []
+ \variable
+ [\c!dubbelzijdig]
+ [\v!ja,\v!nee,\v!leeg]
+ [\v!leeg]
+ \variable
+ [\c!hoofdstatus]
+ [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering]
+ [\v!leeg]
+ \variable
+ [\c!voetstatus]
+ [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering]
+ [\v!leeg]
+ \variable
+ [\c!tekststatus]
+ [\v!normaal,\v!stop,\v!start,\v!leeg,\v!geen,\v!geenmarkering]
+ [\v!leeg]
+ \variable
+ [\c!bovenstatus]
+ [\v!stop,\v!start]
+ [\v!stop]
+ \variable
+ [\c!onderstatus]
+ [\v!stop,\v!start]
+ [\v!stop]
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!naam>>\e!opmaak] % \tf
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!versie]
+ \type
+ [\c!val!]
+ \value
+ [\v!definitief,\v!concept,\v!voorlopig]
+ [\v!definitief]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!currentdate]
+ \type
+ [\c!vals!]
+ \value
+ [\v!dag,\v!maand,\v!MAAND,\v!weekdag,\v!WEEKDAG,\v!jaar,
+ dd,mm,jj,yy,d,m,j,y,\v!kenmerk]
+ [\v!dag,\v!maand,\v!jaar]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!date]
+ \type
+ [\c!opt!\c!vars!\c!vals!]
+ \variable
+ [d]
+ [\c!number!]
+ []
+ \variable
+ [m]
+ [\c!number!]
+ []
+ \variable
+ [y]
+ [\c!number!]
+ []
+ \inheritvalues
+ [\y!currentdate]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!kenmerkdatum]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!inspringen]
+ \type
+ [\c!vals!]
+ \value
+ [\v!nooit,\v!niet,\v!nee,\v!ja,\v!altijd,\v!eerste,\v!volgende]
+ [\v!nooit]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!nietinspringen]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!blanko]
+ \type
+ [\c!opt!\c!vals!]
+ \value
+ [\c!repeat!\v!klein,\c!repeat!\v!middel,\c!repeat!\v!groot,
+ \v!geenwit,\v!back,\v!wit,\v!blokkeer,\v!forceer,\v!reset,
+ \v!regel,\v!halveregel,\v!formule,\v!vast,\v!flexibel]
+ [\v!groot]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startopelkaar]
+ \type
+ [\c!opt!\c!val!\c!stp!] % tzt \c!vals!
+ \value
+ [\v!blanko]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startvanelkaar]
+ \type
+ [\c!stp!]
+\stopsetup
+
+% \startsetup
+% \command
+% [\y!startregelcorrectie]
+% \type
+% [\c!opt!\c!val!\c!stp!]
+% \value
+% [\v!klein,\v!middel,\v!groot,\v!blanko]
+% []
+% \stopsetup
+%
+% beter:
+
+\startsetup
+ \command
+ [\y!startregelcorrectie]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!corrigeerwitruimte]
+ \type
+ [\c!arg!]
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!uitstellen]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startlocal]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startsmaller]
+ \type
+ [\c!opt!\c!vals!\c!stp!]
+ \value
+ [\c!repeat!\v!links,\c!repeat!\v!midden,\c!repeat!\v!rechts]
+ [\v!midden]
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!verbergen]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steluitlijnenin]
+ \type
+ [\c!val!]
+ \value
+ [\v!breedte,\v!links,\v!rechts,\v!midden,\v!binnen,\v!buiten,
+ \v!ruim,\v!hoogte,\v!onder,\v!regel,\v!reset]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startuitlijnen]
+ \type
+ [\c!stp!\c!opt!\c!val!]
+ \inheritvariables
+ [\y!steluitlijnenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelspatieringin]
+ \type
+ [\c!val!]
+ \value
+ [\v!ruim,\v!opelkaar]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steltolerantiein]
+ \type
+ [\c!vals!]
+ \value
+ [\v!horizontaal,\v!vertikaal,
+ \v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
+ [\v!zeerstreng]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!soortpagina]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!verwerkpagina]
+ \type
+ [\c!vals!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!ja,\v!nee]
+ [\v!ja]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!koppelpagina]
+ \type
+ [\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!optie]
+ [\v!dubbelzijdig]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!positioneer]
+ \type
+ [\c!poss!\c!arg!]
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupscreens]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!methode]
+ [\v!punt,\v!lijn,\v!extern]
+ [\v!extern]
+ \variable
+ [\c!resolutie]
+ [\c!number!]
+ [508]
+ \variable
+ [\c!factor]
+ [\c!number!]
+ [8]
+ \variable
+ [\c!raster]
+ [\c!number!]
+ [0.95]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelachtergrondenin]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vals!\c!vars!]
+ \value
+ [\v!boven,\v!hoofd,\v!tekst,\v!voet,\v!onder,
+ \v!pagina,\v!linkerpagina,\v!rechterpagina]
+ []
+ \value
+ [\v!linkerrand,\v!linkermarge,\v!tekst,\v!rechtermarge,\v!rechterrand]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop,\v!herhaal]
+ [\v!start]
+ \variable
+ [\c!commando]
+ [\c!command!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!buffer]
+ \type
+ [\c!opt!\c!val!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!haalbuffer]
+ \type
+ [\c!opt!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!typebuffer]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerbuffer]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelbufferin]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerblok]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!geenblokkenmeer]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!verbergblokken]
+ \type
+ [\c!vals!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!handhaafblokken]
+ \type
+ [\c!vals!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!alles,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikblokken]
+ \type
+ [\c!vals!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!verwerkblokken]
+ \type
+ [\c!vals!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!selecteerblokken]
+ \type
+ [\c!vals!\c!opt!\c!vals!\c!opt!\c!var!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!criterium]
+ [\v!alles,\c!section!]
+ [\v!alles]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelblokin]
+ \type
+ [\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!binnen]
+ [\c!command!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+% \variable
+% [\c!scope]
+% [\v!globaal,\v!lokaal]
+% [\v!globaal]
+ \variable
+ [\c!file]
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!formule]
+ \type
+ [\c!stp!]
+ \value
+ [\c!formula!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!mathematics]
+ \type
+ [\c!arg!]
+ \value
+ [\c!formula!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsformule]
+ \type
+ [\c!opt!\c!refs!\c!nop!\c!dis!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!formula!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatssubformule]
+ \type
+ [\c!opt!\c!refs!\c!nop!\c!dis!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!formula!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!plaats<<\y!blok>>]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!refs!\c!arg!\c!arg!]
+ \value
+ [\v!links,\v!rechts,\v!hier,\v!boven,\v!onder,
+ \v!inlinker,\v!inrechter,\v!inmarge,\v!marge,
+ \v!pagina,\v!naast,\v!altijd,\v!forceer,\v!lang]
+ [\v!hier]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!reserveer<<\y!blok>>]
+ \type
+ [\c!opt!\c!vars!\c!opt!\c!val!\c!opt!\c!refs!\c!arg!]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!kader]
+ [\v!aan,\v!uit]
+ []
+ \value
+ [\v!links,\v!rechts,\v!hier,\v!boven,\v!onder,
+ \v!inlinker,\v!inrechter,\v!inmarge,\v!marge,
+ \v!pagina,\v!naast,\v!altijd,\v!forceer]
+ [\v!hier]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerplaatsblok]
+ \type
+ [\c!val!\c!val!]
+ \value
+ [\c!singular!]
+ []
+ \value
+ [\c!plural!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelplaatsblokin]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!paginaovergangen]
+ [\c!list!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!blok>>\e!tekst]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!ref!\c!arg!\c!arg!\c!stp!]
+ \value
+ [\v!links,\v!rechts,\v!hoog,\v!midden,\v!laag,\c!offset,\v!lang]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command[\e!plaats\e!lijstmet<<\y!blokken>>]
+ \type[\c!optint!]
+\stopsetup
+
+\startsetup
+ \command[\e!volledige\e!lijstmet<<\y!blokken>>]
+ \type[\c!optint!]
+\stopsetup
+
+% pragma4.tex
+
+\startsetup
+ \command
+ [\y!label]
+ \type
+ [\c!val!\c!arg!\c!arg!\c!arg!\c!arg!\c!arg!\c!arg!]
+ \value
+ [\v!smal,\v!breed]
+ [\v!breed]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!kenmerk]
+ \type
+ [\c!vars!]
+ \variable
+ [bet]
+ [\c!text!]
+ []
+ \variable
+ [ken]
+ [\c!text!]
+ []
+ \variable
+ [dat]
+ [\c!text!]
+ []
+ \variable
+ [van]
+ [\c!text!]
+ []
+ \variable
+ [aan]
+ [\c!text!]
+ []
+ \variable
+ [ref]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!selecteerpapier]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!soort]
+ [1,2]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!koppelpapier]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% pragma5.tex
+
+\startsetup
+ \command[\y!chem]
+ \type[\c!arg!\c!arg!\c!arg!]
+ \value[\c!text!][]
+ \value[\c!text!][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!breuk]
+ \type[\c!arg!\c!arg!]
+ \value[\c!text!][]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command[\y!punten]
+ \type[\c!val!]
+ \value[\c!number!][]
+\stopsetup
+
+\startsetup
+ \command[\y!woonplaats]
+ \type[\c!arg!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!items]
+ \type
+ [\c!opt!\c!vars!\c!args!]
+ \inheritvariables
+ [\y!stelitemsin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelitemsin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts,\v!inmarge,\v!boven,\v!onder]
+ [\v!links]
+ \variable
+ [\c!symbool]
+ [1,2,...,\c!n,\c!a,...,\c!text!,\v!geen]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [\hsize]
+ \variable
+ [\c!n]
+ [\c!number!,\v!onbekend]
+ [\v!onbekend]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ [{\blanko[\v!middel]}]
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!rechts,\v!midden,\v!marge]
+ [\v!midden]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startcitaat]
+ \type
+ [\c!vals!\c!stp!]
+ \value
+ [\c!repeat!\v!links,\c!repeat!\v!midden,\c!repeat!\v!rechts]
+ [\v!midden]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!citaat]
+ \type
+ [\c!arg!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!citeer]
+ \type
+ [\c!arg!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelciterenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!toevoegen]
+ \type
+ [\c!val!]
+ \value
+ [\v!klein,\v!middel,\v!groot]
+ [\v!middel]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieeralineas]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!n]
+ [\c!number!]
+ [2]
+ \variable
+ [\c!lijn]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!hoogte]
+ [\v!passend,\c!dimension!]
+ [\v!passend]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!binnen]
+ [\c!command!]
+ []
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!tolerantie]
+ [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
+ [\v!soepel]
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!rechts,\v!midden]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [<<\y!alinea>>]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start<<\y!alinea>>]
+ \type
+ [\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelalineasin]
+ \type
+ [\c!val!\c!opt!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!number!,\v!elk]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!rechts,\v!midden,\c!breedte]
+ [\c!breedte]
+ \variable
+ [\c!tolerantie]
+ [\v!zeerstreng,\v!streng,\v!soepel,\v!zeersoepel]
+ [\v!soepel]
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!binnen]
+ [\c!command!]
+ []
+ \variable
+ [\c!commando]
+ [\c!command!]
+ []
+ \variable
+ [\c!lijn]
+ [\v!aan,\v!uit]
+ [\v!uit]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steltabin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!monster]
+ [\c!text!]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!kopletter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!plaats]
+ [\v!links,\v!rechts]
+ [\v!links]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!tab]
+ \type
+ [\c!arg!\c!nop!\c!par!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+% pragma6.tex
+
+\startsetup
+ \command
+ [\y!startdocument]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!brieven]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!labels]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelbrievenin]
+ \type
+ [\c!vals!]
+ \value
+ [\v!formeel,\v!informeel,\v!rekening,\v!ls,
+ \v!hoog,\v!midden,\v!laag]
+ [\v!formeel,\v!laag]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsheetsin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!variant]
+ [\c!number!]
+ []
+ \variable
+ [\c!tekst]
+ [\c!text!]
+ []
+ \variable
+ [\c!formaat]
+ [\v!klein,\v!middel,\v!groot]
+ [\v!middel]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!normaal]
+ \variable
+ [\c!nummer]
+ [\c!number!,\v!aansluitend]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!sheet]
+ \type
+ [\c!val!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelstickersin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!variant]
+ [a]
+ []
+ \variable
+ [\c!n]
+ [\c!number!,\v!alles]
+ [\c!val!]
+ \variable
+ [\c!plaats]
+ [\v!marge,\v!links,\v!rechts,\v!midden]
+ [\v!links]
+\stopsetup
+
+% *.tex
+
+\startsetup
+ \command
+ [\y!definetabulate]
+ \type
+ [\c!val!\c!opt!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!tabulate]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vars!\c!stp!]
+ \value
+ [\c!text!]
+ []
+ \inheritvariables
+ [\y!useexternalfigure]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setuptabulate]
+ \type
+ [\c!opt!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!eenheid]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!inspringen]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!voor]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!na]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [\c!binnen]
+ [\c!command!]
+ [\blanko]
+ \variable
+ [EQ]
+ [\c!text!]
+ [:]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!steltabellenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!afstand]
+ [\v!klein,\v!middel,\v!groot]
+ [\v!middel]
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ []
+ \variable
+ [HL]
+ [\c!number!,\v!klein,\v!middel,\v!groot,\v!geen]
+ [\v!middel]
+ \variable
+ [VL]
+ [\c!number!,\v!klein,\v!middel,\v!groot,\v!geen]
+ [\v!middel]
+ \variable
+ [\c!commandos]
+ [\c!command!]
+ []
+ \variable
+ [\c!achtergrond]
+ [\v!raster,\v!kleur,\v!geen]
+ [\v!geen]
+ \variable
+ [\c!achtergrondraster]
+ [\c!number!]
+ [0.9]
+ \variable
+ [\c!achtergrondkleur]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!starttabel]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!text!,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikexternefiles]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ []
+ \variable
+ [\c!file]
+ [\c!filename!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikexternefile]
+ \type
+ [\c!val!\c!val!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!filename!]
+ []
+ \variable
+ [\c!korps]
+ [5pt,...,12pt,\v!klein,\v!groot]
+ []
+\stopsetup
+
+% \startsetup
+% \command
+% [\y!presetexternfiguur]
+% \type
+% [\c!val!\c!vars!]
+% \value
+% [\c!filename!]
+% []
+% \variable
+% [t]
+% [eps,mps,pdf,tif,jpg,png]
+% []
+% \variable
+% [w]
+% [\c!dimension!]
+% []
+% \variable
+% [h]
+% [\c!dimension!]
+% []
+% \variable
+% [s]
+% [\c!number!]
+% []
+% \variable
+% [t]
+% [\c!text!]
+% []
+% \stopsetup
+
+\startsetup
+ \command
+ [\y!useexternalfigure]
+ \type
+ [\c!opt!\c!val!\c!val!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!filename!]
+ []
+ \variable
+ [\c!schaal]
+ [\c!number!]
+ [1000]
+ \variable
+ [\c!factor]
+ [\v!max,\v!passend,\v!ruim]
+ []
+ \variable
+ [\c!bfactor]
+ [\c!number!,\v!max,\v!ruim,\v!passend]
+ []
+ \variable
+ [\c!hfactor]
+ [\c!number!,\v!max,\v!ruim,\v!passend]
+ []
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!kader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!preset]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!preview]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!object]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!type]
+ [\c!eps,\c!mps,\c!pdf,\c!tif,\c!png,\c!jpg,\c!mov,\c!tex]
+ []
+ \variable
+ [\c!methode]
+ [\c!eps,\c!mps,\c!pdf,\c!tif,\c!png,\c!jpg,\c!mov,\c!tex]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!externalfigure]
+ \type
+ [\c!val!\c!vars!]
+ \value
+ [\c!filename!]
+ []
+ \inheritvariables
+ [\y!useexternalfigure]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupexternalfigures]
+ \type
+ [\c!var!]
+ \variable
+ [\c!optie]
+ [\v!kader,\v!leeg,\v!test]
+ []
+ \variable
+ [\c!object]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!hokjes]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!ymax]
+ [\c!number!]
+ [24]
+ \variable
+ [\c!xmax]
+ [\c!number!]
+ []
+ \variable
+ [\c!gebied]
+ [\c!text!]
+ []
+ \variable
+ [\c!plaats]
+ [\v!lokaal,\v!globaal]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showexternalfigures]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!naam]
+ \type
+ [\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!legenda]
+ \type
+ [\c!opt!\c!val!\tex{leg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\tex{leg}\c!stp!]
+ \value
+ [\v!twee]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!gegeven]
+ \type
+ [\tex{geg}\c!nop!\c!sep!\c!nop!\c!sep!\c!nop!\c!sep!\tex{geg}\c!stp!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!roteer]
+ \type
+ [\c!opt!\c!vars!\c!arg!]
+ \inheritvariables
+ [\y!stelroterenin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelroterenin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!rotatie]
+ [\c!number!]
+ [90]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!spiegel]
+ \type
+ [\c!arg!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!schaal]
+ \type
+ [\c!opt!\c!vars!\c!arg!]
+ \variable
+ [\c!sx]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!sy]
+ [\c!number!]
+ [1]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelcombinatiesin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!voor]
+ [\c!commando]
+ []
+ \variable
+ [\c!tussen]
+ [\c!commando]
+ []
+ \variable
+ [\c!na]
+ [\c!commando]
+ []
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!passend]
+ [\v!passend]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\v!passend]
+ [\v!passend]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startcombinatie]
+ \type
+ [\c!val!\c!stp!]
+ \value
+ [\c!matrix!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsnaastelkaar]
+ \type
+ [\c!arg!\c!arg!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!plaatsonderelkaar]
+ \type
+ [\c!arg!\c!arg!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startoverlay]
+ \type
+ [\c!arg!\c!arg!\c!stp!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+% pragma8.tex
+
+% \verwerkkontakten[naam,groep][actie][]
+% \verwerkfiguren[][overzicht][]
+
+\startsetup
+ \command
+ [\y!startoverzicht]
+ \type
+ [\c!vals!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% core-01d.tex
+
+\startsetup
+ \command
+ [\y!stelinteractieschermin]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\v!passend,\v!max]
+ [\papierbreedte]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\v!passend,\v!max]
+ [\papierhoogte]
+ \variable
+ [\c!rugwit]
+ [\c!dimension!]
+ [\rugwit]
+ \variable
+ [\c!kopwit]
+ [\c!dimension!]
+ [\kopwit]
+ \variable
+ [\c!rugoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!kopoffset]
+ [\c!dimension!]
+ [0pt]
+\stopsetup
+
+\startsetup
+ \command[\y!scherm]
+ \type[\c!alwint!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelpaginaovergangenin]
+ \type
+ [\c!opt!\c!vals!]
+ \value
+ [\v!reset,
+ %dissolve,box,split,blinds,wipe,glitter,
+ %vertical,horizontal,in,out,east,west,north,south,
+ \c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelinteractiein]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!stop]
+ \variable
+ [\c!menu]
+ [\v!aan,\v!uit]
+ [\v!uit]
+ \variable
+ [\c!pagina]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!openactie]
+ [\c!reference!]
+ []
+ \variable
+ [\c!sluitactie]
+ [\c!reference!]
+ []
+% \variable
+% [\c!scherm]
+% [\v!normaal,\v!passend,\v!hoogte \v!breedte]
+% [\v!normaal]
+ \variable
+ [\c!strut]
+ [\v!ja,\v!nee]
+ [\v!ja]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ [1em]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!diepte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!]
+ [\v!vet]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!contrastkleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!symboolset]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!titel]
+ [\c!text!]
+ []
+ \variable
+ [\c!subtitel]
+ [\c!text!]
+ []
+ \variable
+ [\c!auteur]
+ [\c!text!]
+ []
+ \variable
+ [\c!datum]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelinteractiemenuin]
+ \type
+ [\c!alwint!\c!vals!\c!opt!\c!vars!\c!opt!\c!dests!]
+ \value
+ [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []
+ \variable
+ [\c!links]
+ [\c!command!]
+ []
+ \variable
+ [\c!rechts]
+ [\c!command!]
+ []
+ \variable
+ [\c!midden]
+ [\c!command!]
+ []
+ \variable
+ [\c!status]
+ [\v!start,\v!stop,\v!geen]
+ [\v!start]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...\c!command!]
+ [\v!vet]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!afstand]
+ [\v!overlay,\c!dimension!]
+ []
+ \variable
+ [\c!zelfdepagina]
+ [\v!ja,\v!leeg,\v!nee,\v!geen]
+ []
+ \variable
+ [\c!onbekendeverwijzing]
+ [\v!ja,\v!leeg,\v!nee,\v!geen]
+ []
+ \variable
+ [\c!linkeroffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!rechteroffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!bovenoffset]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!onderoffset]
+ [\c!dimension!]
+ [0pt]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerinteractiemenu]
+ \type
+ [\c!alwint!\c!val!\c!opt!\c!val!\c!opt!\c!vars!]
+ \value
+ [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!]
+ []
+ \value
+ [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelinteractiemenuin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!interactiemenu]
+ \type
+ [\c!alwint!\c!val!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!blokkeerinteractiemenu]
+ \type
+ [\c!alwint!\c!val!\c!refs!]
+ \value
+ [\v!links,\v!rechts,\v!boven,\v!onder,\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikexterndocument]
+ \type
+ [\c!alwint!\c!val!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!file]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!gebruikURL]
+ \type
+ [\c!alwint!\c!val!\c!val!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!file]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!coupledocument]
+ \type
+ [\c!alwint!\c!val!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!file]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command[\y!uit]
+ \type[\c!alwint!\c!ref!]
+ \value[\c!text!][]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!interactiebalk]
+ \type
+ [\c!alwint!\c!vars!]
+ \inheritvariables
+ [\y!stelinteractiebalkin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!interactiebuttons]
+ \type
+ [\c!alwint!\c!opt!\c!vars!\c!vals!]
+ \inheritvariables
+ [\y!stelinteractiebalkin]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% \interactiebalk[reset]
+
+\startsetup
+ \command
+ [\y!stelinteractiebalkin]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \variable
+ [\c!variant]
+ [a,b,c,d,e,f,g]
+ [b]
+ \variable
+ [\c!symbool]
+ [\v!ja,\v!nee]
+ [\v!nee]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\c!hoogte,\v!passend]
+ [3cm]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!,\c!hoogte,\v!passend]
+ [\v!ruim]
+ \variable
+ [\c!diepte]
+ [\c!dimension!]
+ [0pt]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!stap]
+ [\c!number!,\v!klein,\v!middel,\v!groot]
+ [1]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!synchroniseer]
+ \type
+ [\c!alwint!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startsynchronisatie]
+ \type
+ [\c!alwint!\c!stp!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsynchronisatiebalkin]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!variant]
+ [\v!pagina,\v!lokaal]
+ [\v!pagina]
+ \variable
+ [\c!breedte]
+ [\c!dimension!,\c!hoogte,\v!passend]
+ [3cm]
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ [.5em]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ [\v!vet]
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!synchronisatiebalk]
+ \type
+ [\c!alwint!\c!val!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \variable
+ [\c!variant]
+ [\v!pagina,\v!lokaal]
+ [\v!pagina]
+ \inheritvariables
+ [\y!stelsynchronisatiebalkin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelsynchronisatiein]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!stop]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerprofiel]
+ \type
+ [\c!alwint!\c!vals!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelprofielenin]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!optie]
+ [\v!test]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startprofiel]
+ \type
+ [\c!alwint!\c!vals!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!volgprofiel]
+ \type
+ [\c!alwint!\c!arg!\c!val!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!placebookmarks]
+ \type
+ [\c!opt!\c!vals!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!bookmark]
+ \type
+ [\c!opt!\c!val!\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!startversie]
+ \type
+ [\c!alwint!\c!vals!\c!stp!]
+ \value
+ [\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelversiesin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!nummer]
+ [\c!number!]
+ [1]
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vet\v!schuin,\v!type,\v!kap,\v!klein...,\c!command!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!markeerversie]
+ \type
+ [\c!alwint!]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!selecteerversie]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerversie]
+ \type
+ [\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!number!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!volgversie]
+ \type
+ [\c!alwint!\c!arg!\c!val!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!volgprofielversie]
+ \type
+ [\c!alwint!\c!arg!\c!val!\c!val!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definieerprogramma]
+ \type
+ [\c!alwint!\c!val!\c!val!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelprogrammasin]
+ \type
+ [\c!alwint!\c!vars!]
+ \variable
+ [\c!gebied]
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!programma]
+ \type
+ [\c!alwint!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+% pragma11.tex
+
+\startsetup
+ \command
+ [\y!startfigure]
+ \type
+ [\c!alwint!\c!val!\c!val!\c!vars!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!filename!]
+ []
+ \variable
+ [\c!factor]
+ [\c!number!]
+ []
+ \variable
+ [\c!kader]
+ [\v!aan,\v!uit]
+ [\v!uit]
+\stopsetup
+
+\startsetup
+ \command
+ [\y!referring\subsetup{\v!figuur}]
+ \type
+ [\c!poss!\c!poss!\c!val!]
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!marking\subsetup{\v!figuur}]
+ \type
+ [\c!poss!\c!poss!\c!val!]
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!remark]
+ \type
+ [\c!poss!\c!poss!\c!vars!\c!arg!]
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \value
+ [\c!number!]
+ []
+ \inheritvariables
+ [\y!setupframed]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!naar]
+ \type
+ [\c!alwint!\c!arg!\c!alwint!\c!arg!\c!refs!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!naarbox]
+ \type
+ [\c!alwint!\c!arg!\c!refs!]
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!button]
+ \type
+ [\c!alwint!\c!opt!\c!vars!\c!arg!\c!refs!]
+ \inheritvariables
+ [\y!stelbuttonsin]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelbuttonsin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!status]
+ [\v!start,\v!stop]
+ [\v!start]
+ \inheritvariables
+ [\y!setupframed]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!menubutton]
+ \type
+ [\c!alwint!\c!opt!\c!val!\c!opt!\c!vars!\c!arg!\c!refs!]
+ \inheritvariables
+ [\y!setupframed]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!stelcommentaarin]
+ \type
+ [\c!vars!]
+ \variable
+ [\c!breedte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!hoogte]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\e!start\e!commentaar]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vars!\c!stp!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelcommentaarin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!commentaar]
+ \type
+ [\c!opt!\c!val!\c!opt!\c!vars!\c!arg!]
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!stelcommentaarin]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definefield]
+ \type
+ [\c!val!\c!val!\c!val!\c!vals!\c!opt!\c!val!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ [radio,check,push,line,text,popup,choice,combo]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definesubfield]
+ \type
+ [\c!val!\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!copyfield]
+ \type
+ [\c!val!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!clonefield]
+ \type
+ [\c!val!\c!vals!\c!val!\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!field]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fitfield]
+ \type
+ [\c!val!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fillinfield]
+ \type
+ [\c!opt!\c!val!\c!arg!]
+ \value
+ [\c!text!]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!tooltip]
+ \type
+ [\c!opt!\c!val!\c!arg!]
+ \value
+ [\v!links,\v!rechts,\v!midden]
+ []
+ \value
+ [\c!text!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!showfields]
+ \type
+ [\c!opt!\c!vals!]
+ \value
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!logfields]
+ \type
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupfield]
+ \type
+ [\c!val!\c!vals!\c!vars!\c!vars!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!label,\v!horizontaal,\v!vertikaal,\v!kader]
+ []
+ \inheritvariables
+ [\y!framed]
+ []
+ \inheritvariables
+ [\y!setupfields]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!setupfields]
+ \type
+ [\c!vals!\c!val!\c!vars!\c!vars!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\v!label,\v!horizontaal,\v!vertikaal,\v!kader]
+ []
+ \inheritvariables
+ [\y!framed]
+ []
+ \variable
+ [\c!n]
+ [\c!number!]
+ []
+ \variable
+ [\c!afstand]
+ [\c!dimension!]
+ []
+ \variable
+ [\c!voor]
+ [\c!command!]
+ []
+ \variable
+ [\c!na]
+ [\c!command!]
+ []
+ \variable
+ [\c!tussen]
+ [\c!command!]
+ []
+ \variable
+ [\c!kleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!letter]
+ [\v!normaal,\v!vet,\v!schuin,\v!vetschuin,\v!type]
+ [\v!normaal]
+ \variable
+ [\c!uitlijnen]
+ [\v!links,\v!midden,\v!rechts]
+ []
+ \variable
+ [\c!optie]
+ [\v!alleenleesbaar,\v!verplicht,\v!beschermd,\v!gesorteerd,
+ \v!nietbeschikbaar, \v!verborgen,\v!printbaar]
+ []
+ \variable
+ [\c!klikin]
+ [\c!reference!]
+ []
+ \variable
+ [\c!klikuit]
+ [\c!reference!]
+ []
+ \variable
+ [\c!gebiedin]
+ [\c!reference!]
+ []
+ \variable
+ [\c!gebieduit]
+ [\c!reference!]
+ []
+ \variable
+ [\c!natoets]
+ [\c!reference!]
+ []
+ \variable
+ [\c!formatteer]
+ [\c!reference!]
+ []
+ \variable
+ [\c!valideer]
+ [\c!reference!]
+ []
+ \variable
+ [\c!bereken]
+ [\c!reference!]
+ []
+ \variable
+ [\c!veldoffset]
+ [\c!dimension!]
+ [\!!zeropoint]
+ \variable
+ [\c!veldkaderkleur]
+ [\c!identifier!]
+ []
+ \variable
+ [\c!veldachtergrondkleur]
+ [\c!identifier!]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!definefieldstack]
+ \type
+ [\c!val!\c!vals!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setupfields]
+ []
+\stopsetup
+
+\startsetup
+ \command
+ [\y!fieldstack]
+ \type
+ [\c!val!\c!opt!\c!vals!\c!opt!\c!vars!]
+ \value
+ [\c!identifier!]
+ []
+ \value
+ [\c!identifier!]
+ []
+ \inheritvariables
+ [\y!setupfields]
+ []
+\stopsetup
+
+
+\stopsetupfile
diff --git a/tex/context/base/spec-dvi.tex b/tex/context/base/spec-dvi.tex
new file mode 100644
index 000000000..2459c604c
--- /dev/null
+++ b/tex/context/base/spec-dvi.tex
@@ -0,0 +1,67 @@
+%D \module
+%D [ file=spec-dvi,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Generic \TEX\ Solutions,
+%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 {dostartobject,
+%D dostopobject,
+%D doinsertobject}
+%D {}
+%D
+%D Reuse of object is not supported by the \DVI\ format. We
+%D therefore just duplicate them using boxes.
+
+\startspecials[tex]
+
+\newbox\DVIobjects \newcounter\DVIobjectcounter
+
+\definespecial\dostartobject#1#2#3#4#5%
+ {\setbox\nextbox=\vbox\bgroup
+ \def\dodostopobject%
+ {\egroup
+ \doglobal\increment\DVIobjectcounter
+ \global\setbox\DVIobjects=\vbox
+ {\offinterlineskip
+ \forgetall
+ \unvbox\DVIobjects
+ \setbox\nextbox=\hbox{\box\nextbox}
+ \wd\nextbox=\!!zeropoint
+ \dp\nextbox=\!!zeropoint
+ \ht\nextbox=\!!onepoint
+ \allowbreak
+ \box\nextbox}%
+ \dosetobjectreference{#1}{#2}{\DVIobjectcounter}}}
+
+\definespecial\dostopobject%
+ {\dodostopobject}
+
+\definespecial\doinsertobject#1#2%
+ {\bgroup
+ \dogetobjectreference{#1}{#2}\DVIobjectreference
+ \splittopskip\!!zeropoint
+ \setbox0=\copy\DVIobjects
+ \dimen0=\DVIobjectreference pt
+ \advance\dimen0 by -\!!onepoint
+ \setbox2=\vsplit0 to \dimen0
+ \ifdim\ht0>\!!onepoint
+ \setbox0=\vsplit0 to \!!onepoint
+ \fi
+ \unvbox0\setbox0=\lastbox\unhbox0
+ \egroup}
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
new file mode 100644
index 000000000..470296e9d
--- /dev/null
+++ b/tex/context/base/spec-fdf.tex
@@ -0,0 +1,1663 @@
+%D \module
+%D [ file=spec-fdf,
+%D version=1998.05.18,
+%D title=\CONTEXT\ \PDF\ Macros,
+%D subtitle=Adobe \PDF/\FDF\ version 2.1,
+%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 {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.
+%D
+%D The \ACROBAT\ programs are not bug free. By setting the next
+%D switch, we will at least try to prevent problems.
+
+\newif\ifovercomePDFbugs \overcomePDFbugstrue
+
+\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
+ {\ifovercomePDFbugs'\fi\PDFdestination\ifovercomePDFbugs'\fi}}%
+ \egroup}
+
+%D \macros
+%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 {doPDFdestination,
+%D doPDFaction,
+%D doPDFannotation,
+%D doPDFtextannotation,
+%D doPDFannotationobject,
+%D doPDFdictionaryobject,
+%D doPDFarrayobject,
+%D doPDFaddtocatalog,
+%D doPDFpageattribute,
+%D doPDFpagesattribute,
+%D doPDFbookmark,
+%D defaultobjectreference,
+%D doPDFgetobjectreference}
+%D
+%D This module deals with \PDF\ support, including fill||in
+%D forms. Before we present the largely unreadable bunch of
+%D macros, we introduce the here||not||defined low level
+%D interface macros. These must be provided by the special
+%D drivers \type{pdf} (\ACROBAT) and \type{tpd} (\PDFTEX).
+%D
+%D \starttypen
+%D \doPDFdestination name #1
+%D \doPDFaction width #1 height #2 action #3
+%D \doPDFannotation width #1 height #2 data #3 % 'negative'
+%D \doPDFtextannotation width #1 height #2 data #3 % 'positive'
+%D \doPDFannotationobject class #1 name #2 width #3 height #4 data #5
+%D \doPDFdictionaryobject class #1 name #2 data #3
+%D \doPDFarrayobject class #1 name #2 data #3
+%D \doPDFaddtocatalog #1
+%D \doPDFpageattribute #1
+%D \doPDFpagesattribute #1
+%D \doPDFbookmark level #1 n #2 text #3 page #4 open #5
+%D
+%D \defaultobjectreference #1#2 % class name
+%D \doPDFgetobjectreference #1#2#3 % class name \PDFobjectreference
+%D \stoptypen
+%D
+%D The keywords reflect their use. For the moment we stick to
+%D keywords, because that way at we get an indication of what
+%D we're doing.
+
+\startspecials[fdf]
+
+%D Due to the fact that \PDFTEX\ has a different concept of
+%D page attributes, we need:
+
+\let\doPDFresetpageattributes=\relax
+
+\appendtoks\doPDFresetpageattributes\to\everyshipout
+
+\ifx\PDFcode\undefined
+ \ifx\pdfliteral\undefined
+ \def\PDFcode#1{\message{[ignored pdfliteral: #1]}}
+ \else
+ \let\PDFcode=\pdfliteral
+ \fi
+\fi
+
+%D \macros
+%D {doPDFsetupscreen}
+%D
+%D Opposite to \DVI\ drivers, \PDF\ ones must know which what
+%D page dimensions they are dealing. We also use the
+%D opportunity to launch full screen.
+
+\def\doPDFsetupscreen#1#2#3#4#5#6% watch the extra argument
+ {\bgroup
+ \!!widtha=#4sp
+ \advance\!!widtha by #2sp
+ \!!heighta=-#5sp
+ \!!heightb=#1% extra argument
+ \advance\!!heightb by -#3sp
+ \advance\!!heighta by \!!heightb
+ \ScaledPointsToWholeBigPoints{#2}\left
+ \ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom
+ \ScaledPointsToWholeBigPoints{\number\!!widtha}\width
+ \ScaledPointsToWholeBigPoints{\number\!!heightb}\height
+ \doPDFpagesattribute
+ {/CropBox [\left\space\bottom\space\width\space\height]}%
+ \doPDFaddtocatalog
+ {/PageMode \ifcase#6 /UseNone \else /FullScreen\fi}%
+ \egroup}
+
+%D \macros
+%D {doPDFsetupopenaction,doPDFsetupcloseaction}
+%D
+%D Setting the open and close actions is kind of fuzzy
+%D because action chains are derived from the reference
+%D mechanism.
+
+% \def\doPDFsetopenaction% some day a real reference
+% {\doPDFaddtocatalog
+% {/OpenAction << /S /ResetForm
+% /Next << /S /GoTo /D [0\PDFpageviewwrd] >> >>}}
+
+\let\lastPDFaction\empty
+
+\def\doPDFsetupopenaction%
+ {\doPDFaddtocatalog{/OpenAction \lastPDFaction}}
+
+\def\doPDFsetupcloseaction%
+ {\doPDFaddtocatalog{/CloseAction \lastPDFaction}}
+
+%D \macros
+%D {doPDFstartthisislocation}
+%D
+%D Next we define the macros that deal with hyperreferencing,
+%D graphic inclusion and general document features. These are
+%D the olderst ones. I won't comment much because one needs
+%D knowledge of \PDF\ itself, and explaning \PDF\ is beyond
+%D this documentation.
+
+\def\doPDFstartthisislocation#1%
+ {\bgroup
+ \setPDFdestination{#1}%
+ \doifsomething{\PDFdestination}
+ {\doPDFdestination name {\PDFdestination}}%
+ \egroup}
+
+%D \macros
+%D {doPDFstartgotolocation,
+%D doPDFstartgotorealpage,
+%D doPDFstartgotoJS}
+%D
+%D The goto macros use the switch \type{\ifsecondaryreference}
+%D to determine if actions should be linked.
+
+\def\doPDFstartgotolocation#1#2#3#4#5#6%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\setPDFdestination{#5}%
+ \doifelsenothing{\PDFdestination}
+ {\let\action\empty}
+ {\doifelsenothing{#4}
+ {\let\PDFfile\empty}
+ {\doifparentfileelse{#4}
+ {\let\PDFfile\empty}
+ {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
+ \edef\action%
+ {/S /GoTo\PDFfile\space /D (\PDFdestination)}}}
+ {\doifelsenothing{#4}
+ {\let\PDFfile\empty
+ \let\PDFdestination\empty}
+ {\uppercasestring/#4\to\PDFfile
+ \setPDFdestination{#5}%
+ \doifsomething{\PDFdestination}
+ {\edef\PDFdestination{\URLhash\PDFdestination}}}%
+ \edef\action
+ {/S /URI /URI (#3\PDFfile\PDFdestination)}}%
+ \ifx\action\empty\else
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi
+ \fi
+ \egroup}
+
+\def\doPDFstartgotorealpage#1#2#3#4#5%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\scratchcounter=0#5\relax
+ \ifnum\scratchcounter>0
+ \advance\scratchcounter by -1
+ \edef\PDFdestination{\the\scratchcounter}%
+ \doifelsenothing{#4}
+ {\let\PDFfile\empty}
+ {\doifparentfileelse{#4}
+ {\let\PDFfile\empty}
+ {\uppercasestring R /F (#4.pdf)\to\PDFfile}}% /GotoR
+ \edef\action%
+ {/S /GoTo\PDFfile\space
+ /D [\PDFdestination\PDFpageviewwrd]}%
+ \else
+ \let\action\empty
+ \fi}
+ {\doifelsenothing{#4}
+ {\let\PDFfile\empty}
+ {\uppercasestring/#4\to\PDFfile}%
+ \edef\action%
+ {/S /URI /URI (#3\PDFfile)}}%
+ \ifx\action\empty\else
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi
+ \fi
+ \egroup}
+
+\def\doPDFstartgotoJS#1#2#3%
+ {\bgroup
+ \doPSsanitizeJScode#3\to\sanitizedJScode
+ \edef\action%
+ {/S /JavaScript /JS (\sanitizedJScode)}%
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi
+ \egroup}
+
+%D \macros
+%D {doPDFstartexecutecommand}
+%D
+%D At the cost of much auxiliary placeholders, we can pretty
+%D fast convert the command asked for. This is how \PDF\
+%D looks like.
+
+\def\PDFmoviecode%
+ {/Movie
+ /T (movie \ifx\argumentA\empty\currentmovie\else\argumentA\fi)
+ /Operation\space}
+
+\def\PDFexecutestart {\PDFmoviecode /Play}
+\def\PDFexecutestop {\PDFmoviecode /Stop}
+\def\PDFexecutepause {\PDFmoviecode /Pause}
+\def\PDFexecuteresume {\PDFmoviecode /Resume}
+
+\def\PDFformcode#1%
+ {\doFDFiffieldset{#1}/Fields [\doFDFgetfieldset{#1}]\fi}
+
+\chardef\PDFsubmitformat=0 % 0=FDF 1=HTML
+
+\def\PDFexecuteimport {/Named /N /AcroForm:ImportFDF}
+\def\PDFexecuteexport {/Named /N /AcroForm:ExportFDF}
+\def\PDFexecutereset {/ResetForm \PDFformcode\argumentA}
+\def\PDFexecutesubmit {/SubmitForm \PDFformcode\argumentB
+ /F (\argumentA)
+ /Flags \ifnum\PDFsubmitformat=1 12\fi}
+ %/Flags \ifnum\PDFsubmitformat=1 4\fi}
+
+\def\PDFexecutehide {/Hide /T (\argumentA) /H true}
+\def\PDFexecuteshow {/Hide /T (\argumentA) /H false}
+
+\def\PDFexecutefirst {/Named /N /FirstPage}
+\def\PDFexecuteprevious {/Named /N /PrevPage}
+\def\PDFexecutenext {/Named /N /NextPage}
+\def\PDFexecutelast {/Named /N /LastPage}
+\def\PDFexecutebackward {/Named /N /GoBack}
+\def\PDFexecuteforward {/Named /N /GoForward}
+\def\PDFexecuteprint {/Named /N /Print}
+\def\PDFexecuteexit {/Named /N /Quit}
+\def\PDFexecuteclose {/Named /N /Close}
+\def\PDFexecutesave {/Named /N /Save}
+\def\PDFexecutehelp {/Named /N /HelpUserGuide}
+\def\PDFexecuteswap {/Named /N /FullScreen}
+\def\PDFexecutesearch {/Named /N /Find}
+\def\PDFexecutesearchagain {/Named /N /FindAgain}
+
+\def\doPDFstartexecutecommand#1#2#3#4%
+ {\doifdefined{PDFexecute#3}
+ {\bgroup
+ \@EA\dogetcommalistelement\@EA1\@EA\from#4\to\argumentA
+ \@EA\dogetcommalistelement\@EA2\@EA\from#4\to\argumentB
+ \edef\argument{#4}%
+ \edef\action%
+ {/S \getvalue{PDFexecute#3}}%
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi
+ \egroup}}
+
+%D \macros
+%D {doPDFstartrunprogram}
+%D
+%D Running programs is possible, but rather non portable, and
+%D therefore ill advized.
+
+\def\doPDFstartrunprogram#1#2#3%
+ {\bgroup
+ \edef\string{#3}%
+ \@EA\beforesplitstring\string\at{ }\to\program
+ \@EA\aftersplitstring \string\at{ }\to\parameters
+ \edef\action%
+ {/S /Launch /F (\program) /P (\parameters) /D (.)}%
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi
+ \egroup}
+
+%D \macros
+%D {doPDFstartgotoprofile}
+%D
+%D Far from perfect, but nevertheless present, is the profile
+%D handler. We want to misuse article threads for reder
+%D profiles.
+
+\def\doPDFstartgotoprofile#1#2#3% to be done: file
+ {\bgroup
+ \setPDFdestination{#3}%
+ \doifsomething{\PDFdestination}
+ {\edef\action%
+ {/S /Thread /D (\PDFdestination)}%
+ \ifsecondaryreference
+ \savesecondaryPDFreference\action
+ \else
+ \getsecondaryPDFreferences
+ \doPDFaction
+ width #1 height #2
+ action {\action \secondaryPDFreferences}%
+ \fi}%
+ \egroup}
+
+%D \macros
+%D {doPDFsetpagetransition}
+%D
+%D This array holds a reasonable selection of transitions
+%D (watch out: \type{replace} is not in this list). Most of
+%D the transitions look awful anyway. By the way, \CONTEXT\ is
+%D able to select transitions randomly.
+
+\def\pagetransitions
+ {{split,in,vertical},{split,in,horizontal},
+ {split,out,vertical},{split,out,horizontal},
+ {blinds,horizontal},{blinds,vertical},
+ {box,in},{box,out},
+ {wipe,east},{wipe,west},{wipe,north},{wipe,south},
+ dissolve,
+ {glitter,east},{glitter,south}}
+
+%D Again, we use macros as placeholders for \PDF\ key||value
+%D pairs.
+
+\def\PDFpagesplit {/S /Split }
+\def\PDFpageblinds {/S /Blinds }
+\def\PDFpagebox {/S /Box }
+\def\PDFpagewipe {/S /Wipe }
+\def\PDFpagedissolve {/S /Dissolve }
+\def\PDFpageglitter {/S /Glitter }
+\def\PDFpagereplace {/S /R }
+
+\def\PDFpagehorizontal {/Dm /H }
+\def\PDFpagevertical {/Dm /V }
+\def\PDFpagein {/M /I }
+\def\PDFpageout {/M /O }
+\def\PDFpageeast {/Di 0 }
+\def\PDFpagenorth {/Di 90 }
+\def\PDFpagewest {/Di 180 }
+\def\PDFpagesouth {/Di 270 }
+
+\def\dodoPDFsetpagetransition#1%
+ {\doifdefined{PDFpage#1}
+ {\edef\PDFpagetransitions{\PDFpagetransitions\getvalue{PDFpage#1}}}}
+
+\def\doPDFsetpagetransition#1%
+ {\let\PDFpagetransitions\empty
+ \processcommalist[#1]\dodoPDFsetpagetransition
+ \doPDFpageattribute{/Trans <<\PDFpagetransitions>>}}
+
+%D \macros
+%D {doPDFinsertmov}
+%D
+%D Most of the annotations we use here are of type {\em
+%D link}, but here is another one: the {\em movie} annotation.
+%D The driver module must implement \type {setcurrentmovie}.
+
+\def\doPDFinsertmov#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \setcurrentmovie{#1}%
+ \ScaledPointsToBigPoints{#7}\width
+ \ScaledPointsToBigPoints{#8}\height
+ \edef\pdf@@posterize{\ifcase#9 \or/Poster true\fi}%
+ \doPDFannotation width #7 height #8 data
+ {/Subtype /Movie
+ /T (movie \currentmovie)
+ /Movie << /F (#1)
+ /Aspect [\width\space \height] \pdf@@posterize >>
+ /A << /ShowControls false >>}
+ \egroup}
+
+%D \macros
+%D {doPDFinsertbookmark}
+%D
+%D Well, here is the dreadfull bookmark, rather useless because
+%D only standard encoding is possible, no typography is done,
+%D and a maximum of 32~characters is advized.
+
+\def\doPDFinsertbookmark#1#2#3#4#5% level sublevels text page open=1
+ {\bgroup
+ \sanitizePDFdocencoding#3\to\bookmarktext % uses scratchcounter
+ \scratchcounter=#4%
+ \advance\scratchcounter by -1
+ %\sanitizePDFstring#3\to\bookmarktext
+ \doPDFbookmark level #1 n #2 text {\bookmarktext}
+ page {\the\scratchcounter} open #5
+ \egroup}
+
+%D The next section of this module is dedicated to form
+%D support. These macros are complicated by the fact that
+%D cloning is possible.
+
+%D \macros
+%D {FDFflag...,FDFplus...}
+%D
+%D The \type{/FT} key determines the type of field: text,
+%D button or choice. The latter two come in several disguises,
+%D which are set by flipping bits in the \type{/Ff}. Other bits
+%D are used to set states. Personally I hate this bitty way of
+%D doing things. The next six bit determine the field sub type:
+
+\def\FDFflagMultiLine {4096} % 13
+\def\FDFflagNoToggleToOff {16384} % 15
+\def\FDFflagRadio {32768} % 16
+\def\FDFflagPushButton {65536} % 17
+\def\FDFflagPopUp {131072} % 18
+\def\FDFflagEdit {262144} % 19
+
+%D The next bits (watch how strange the bits are organized)
+%D take care of the states:
+
+\def\FDFflagReadOnly {1} % 1
+\def\FDFflagRequired {2} % 2
+\def\FDFflagNoExport {4} % 3
+\def\FDFflagPassword {8192} % 14
+\def\FDFflagSort {524288} % 20
+
+%D There is a second, again bitset oriented, \type{/F} flag:
+
+\def\FDFplusInvisible {1} % 1
+\def\FDFplusHidden {2} % 2
+\def\FDFplusPrintable {4} % 3
+
+%D \macros
+%D {setFDFswitches}
+%D
+%D The non||type bits are mapped onto user||interface
+%D swithes, to be used later on:
+
+\def\@@FDFflag{FDFflag}
+\def\@@FDFplus{FDFplus}
+
+\letvalue {\@@FDFflag\v!alleenleesbaar}=\FDFflagReadOnly
+\letvalue {\@@FDFflag\v!verplicht}=\FDFflagRequired
+\letvalue {\@@FDFflag\v!beschermd}=\FDFflagPassword
+\letvalue {\@@FDFflag\v!gesorteerd}=\FDFflagSort
+\letvalue {\@@FDFflag\v!nietbeschikbaar}=\FDFflagNoExport
+
+\letvalue {\@@FDFplus\v!verborgen}=\FDFplusHidden
+\letvalue {\@@FDFplus\v!printbaar}=\FDFplusPrintable
+
+%D A set of switches is collected into the flags we mentioned
+%D before by the next macro (we don't handle negations yet,
+%D but do take care of redundancy):
+
+\def\FDFflag{0}
+\def\FDFplus{0}
+
+\def\setFDFswitches[#1]%
+ {\bgroup
+ \!!counta=0
+ \!!countb=0
+ \def\docommando##1%
+ {\doifsomething{##1}
+ {\advance\!!counta by 0\getvalue{\@@FDFflag##1}%
+ \setvalue{\@@FDFflag##1}{0}%
+ \advance\!!countb by 0\getvalue{\@@FDFplus##1}%
+ \setvalue{\@@FDFplus##1}{0}}}%
+ \processcommacommand[#1]\docommando
+ \xdef\FDFflag{\the\!!counta}%
+ \xdef\FDFplus{\the\!!countb}%
+ \egroup}
+
+%D \macros
+%D {setFDFvalues}
+%D
+%D Menu items are passed as an array of \type{(string)}'s and
+%D the content of this array is build with:
+
+\let\FDFvalues\empty
+
+\def\setFDFvalues[#1]%
+ {\let\FDFvalues\empty
+ \def\dodocommando##1=>##2=>##3\end
+ {\doifelsenothing{##2}
+ {\edef\FDFvalues{\FDFvalues [(##1)(##1)] }}
+ {\edef\FDFvalues{\FDFvalues [(##2)(##1)] }}}% ! ##1 is shown
+ \def\docommando##1%
+ {\dodocommando##1=>=>\end}%
+ \@EA\processcommalist\@EA[#1]\docommando}
+
+%D This macro accepts comma separated \type{visual=>result}
+%D pairs.
+
+%D \macros
+%D {setFDFalignment}
+%D
+%D Text and line fields can be entered and showed in three
+%D alternative alingments, indicated by a digit:
+
+\def\FDFalign{0}
+
+\def\setFDFalignment[#1]%
+ {\processaction
+ [#1]
+ [ \v!links=>\edef\FDFalign{2}, % raggedleft
+ \v!midden=>\edef\FDFalign{1}, % raggedcenter
+ \v!rechts=>\edef\FDFalign{0}]} % raggedright
+
+%D \macros
+%D {setFDFattributes}
+%D
+%D The weak part of (at least version 2.1 \PDF) is that only
+%D default fonts are handled well. Another restriction is that
+%D the encoding vector must be the standard \PDF\ document one.
+%D Although the \PDF\ reference explictly states that one could
+%D use the normal text operators, leading is not yet handled.
+%D
+%D For the moment the current \CONTEXT\ font is mapped onto
+%D one best suitable default font. The color attribute is
+%D less problematic and is directly derived from the \CONTEXT\
+%D color.
+
+\def\FDFattributes{/Helv 12 Tf 0 g 14.4 TL}
+
+\def\FDFrm {TiRo} \def\FDFss {Helv} \def\FDFtt {Cour}
+\def\FDFrmtf{TiRo} \def\FDFsstf{Helv} \def\FDFtttf{Cour}
+\def\FDFrmbf{TiBo} \def\FDFssbf{HeBo} \def\FDFttbf{CoBo}
+\def\FDFrmit{TiIt} \def\FDFssit{HeOb} \def\FDFttit{CoOb}
+\def\FDFrmsl{TiIt} \def\FDFsssl{HeOb} \def\FDFttsl{CoOb}
+\def\FDFrmbi{TiBI} \def\FDFssbi{HeBO} \def\FDFttbi{CoBO}
+\def\FDFrmbs{TiBI} \def\FDFssbs{HeBO} \def\FDFttbs{CoBO}
+
+\let\FDFusedfonts=\FDFsstf
+
+\def\setFDFattributes[#1,#2,#3,#4]% style, color, backgroundcolor, framecolor
+ {\bgroup % nog interlinie: n TL
+ \setbox\scratchbox=\hbox
+ \bgroup
+ \doconvertfont{#1}{}%
+ \ScaledPointsToBigPoints{\number\bodyfontsize}\size % x/xx, so better the actual size
+ \doifdefinedelse{FDF\fontstyle\fontalternative}
+ {\xdef\FDFattributes{\getvalue{FDF\fontstyle\fontalternative}}}
+ {\doifdefinedelse{FDF\fontstyle}
+ {\xdef\FDFattributes{\getvalue{FDF\fontstyle}}}
+ {\xdef\FDFattributes{\FDFrm}}}%
+ \doglobal\addtocommalist\FDFattributes\FDFusedfonts
+ \xdef\FDFattributes% move up with "x.y Ts"
+ {/\FDFattributes\space\size\space Tf\space\PDFcolor{#2}}%
+ \doifelsenothing{#3}
+ {\global\let\FDFsurroundings\empty}
+ {\xdef\FDFsurroundings{/BG \FDFcolor{#3}}}%
+ \doifsomething{#4}
+ {\xdef\FDFsurroundings{\FDFsurroundings\space /BC \FDFcolor{#4}}}%
+ \ifx\FDFsurroundings\empty \else
+ \xdef\FDFsurroundings{/MK << \FDFsurroundings\space>>}%
+ \fi
+ \egroup
+ \egroup}
+
+%D \macros
+%D {setFDFactions}
+%D
+%D Depending on the type of the field, one can assign
+%D \JAVASCRIPT\ code to a mouse event or keystroke. The next
+%D preparation macro shows what events are handled.
+
+\let\FDFactions\empty
+
+\def\setFDFactions[#1,#2,#3,#4,#5,#6,#7,#8]%
+ {\global\let\FDFactions\empty
+ \setFDFaction D#1% mousedown
+ \setFDFaction E#3% enterregion
+ \setFDFaction X#4% exitregion
+ \setFDFaction K#5% afterkeystroke
+ \setFDFaction F#6% formatresult
+ \setFDFaction V#7% validateresult
+ \setFDFaction C#8% calculatewhatever
+ \ifx\FDFactions\empty\else
+ \xdef\FDFactions{/AA << \FDFactions >>}% since 1.3 no longer inherited
+ \fi
+ \setFDFaction A#2}% mouseup % becomes U !
+
+%D The event handler becomes something:
+%D
+%D \starttypen
+%D /AA << /D << /S ... >> ... /C << /S ... >>
+%D /A << /S /JavaScript /JS (...) >>
+%D \stoptypen
+
+\def\setFDFaction#1#2%
+ {\bgroup
+ \global\let\sanitizedJScode\empty
+ \def\setFDFaction##1%
+ {\doifreferencefoundelse{##1}
+ {\doifelse{\currentreferencespecial}{JS} % filter non-js
+ {\presetJScode
+ \currentreferenceoperation
+ \currentreferencearguments
+ \doPSsanitizeJScode\JScode\to\JScode
+ \xdef\sanitizedJScode{\sanitizedJScode\space\JScode}}
+ {\invalidreference{##1}}}
+ {\unknownreference{##1}}}%
+ \@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
+ \ifx\sanitizedJScode\empty \else
+ \xdef\FDFactions%
+ {\FDFactions /#1 << /S /JavaScript /JS (\sanitizedJScode) >> }%
+ \fi
+ \egroup}
+
+%D \macros
+%D {testFDFactions}
+%D
+%D This rather confusion prone series of script can be tested
+%D with:
+%D
+%D \starttypen
+%D \testFDFactions
+%D \stoptypen
+%D
+%D which simply redefined the previous macro to one that prints
+%D a message to the console.
+
+\def\testFDFactions%
+ {\def\setFDFaction##1##2%
+ {\doPSsanitizeJScode console.show();console.println("executing:##1");
+ \to\sanitizedJScode
+ \edef\FDFactions%
+ {\FDFactions /##1 << /S /JavaScript /JS (\sanitizedJScode) >> }}}
+
+%D \macros
+%D {registerFDFobject,everylastshipout}
+%D
+%D Officially one needs to embed some general datastructures
+%D that tell the viewer what fields are present in the file, as
+%D well as what resources they use. The next mechanism does that
+%D job automatically when one registers the field.
+
+\def\flushFDFnames%
+ {\ifbuildFDFdictionary
+ \ifx\FDFcollection\empty\else
+ \ifbuildFDFencodingvector
+ \doPDFdictionaryobject class FDF name local:encodingvector data
+ \FDFencodingvector
+ \fi
+ \defineFDFfonts
+ \doPDFarrayobject class FDF name local:fields data \FDFcollection
+ \doPDFgetobjectreference{FDF}{local:fields}\PDFobjectreference
+ \doPDFdictionaryobject class FDF name local:acroform data
+ {/Fields \PDFobjectreference\space
+ /DR << /Font << \FDFfonts >> >>
+ /DA (/Helv 10 Tf 0 g)}%
+ \doPDFgetobjectreference{FDF}{local:acroform}\PDFobjectreference
+ \doPDFaddtocatalog
+ {/AcroForm \PDFobjectreference}%
+ \global\let\FDFcollection\empty
+ \global\let\flushFDFnames\relax
+ \fi
+ \fi}
+
+\let\FDFcollection\empty
+
+\def\registerFDFobject#1%
+ {\ifbuildFDFdictionary
+ \ifx\flushFDFnames\relax
+ \writestatus{FDF}{second run needed for field list (#1)}%
+ \fi
+ \doPDFgetobjectreference{FDF}{#1}\PDFobjectreference
+ \xdef\FDFcollection%
+ {\FDFcollection\space\PDFobjectreference}%
+ \fi}
+
+\prependtoks \flushFDFnames \to \everylastshipout
+
+%D \macros
+%D {defineFDFfonts,
+%D ifbuildFDFdictionary,
+%D ifbuildFDFencodingvector}
+%D
+%D Another datastruture concerns the fonts used. We only
+%D define the fonts we use.
+
+\newif\ifbuildFDFdictionary \buildFDFdictionarytrue
+\newif\ifbuildFDFencodingvector \buildFDFencodingvectortrue
+
+\def\defineFDFfonts%
+ {\let\FDFfonts\empty
+ \processcommacommand[\FDFusedfonts]\defineFDFfont}
+
+\def\defineFDFfont#1%
+ {\ifbuildFDFencodingvector
+ \doPDFgetobjectreference{FDF}{local:encodingvector}\PDFobjectreference
+ \fi
+ \doPDFdictionaryobject class FDF name local:#1 data
+ {/Type /Font
+ /Subtype /Type1
+ /Name /#1
+ \ifbuildFDFencodingvector /Encoding \PDFobjectreference\space\fi
+ /BaseFont /\getvalue{FDFname#1}}%
+ \doPDFgetobjectreference{FDF}{local:#1}\PDFobjectreference
+ \edef\FDFfonts{\FDFfonts \space/#1 \PDFobjectreference}}
+
+%D Another list of constants:
+
+\def\FDFnameTiRo {Times-Roman}
+\def\FDFnameTiBo {Times-Bold}
+\def\FDFnameTiIt {Times-Italic}
+\def\FDFnameTiBI {Times-BoldItalic}
+\def\FDFnameHelv {Helvetica}
+\def\FDFnameHeBo {Helvetica-Bold}
+\def\FDFnameHeOb {Helvetica-Oblique}
+\def\FDFnameHeBO {Helvetica-BoldOblique}
+\def\FDFnameCour {Courier}
+\def\FDFnameCoBo {Courier-Bold}
+\def\FDFnameCoOb {Courier-Oblique}
+\def\FDFnameCoBO {Courier-BoldOblique}
+
+%D And a big one:
+
+\def\FDFencodingvector
+ {/Type /Encoding
+ /Differences
+ [ 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek
+ /ring /tilde
+ 39 /quotesingle
+ 96 /grave
+ 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin
+ /fraction /guilsinglleft /guilsinglright /minus /perthousand
+ /quotedblbase /quotedblleft /quotedblright /quoteleft
+ /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE
+ /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron
+ /zcaron
+ 164 /currency
+ 166 /brokenbar
+ 168 /dieresis /copyright /ordfeminine
+ 172 /logicalnot /.notdef /registered /macron /degree /plusminus
+ /twosuperior /threesuperior /acute /mu
+ 183 /periodcentered /cedilla /onesuperior /ordmasculine
+ 188 /onequarter /onehalf /threequarters 192 /Agrave /Aacute
+ /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave
+ /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex
+ /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde
+ /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls /agrave /aacute
+ /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave
+ /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
+ /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde
+ /odieresis /divide /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis ]}
+
+%D \macros
+%D {currentFDFmode,currentFDFparent,currentFDFkids,currenrFDFroot}
+%D
+%D There are three more quasi global interfacing variables
+%D that need to be set.
+
+\let\currentFDFmode =\fieldlonermode
+\let\currentFDFkids =\empty
+\let\currentFDFparent=\empty
+\let\currentFDFroot =\empty
+
+%D \macros
+%D {dosetfieldstatus}
+%D
+%D And here comes the special that deals with them.
+
+\definespecial\dosetfieldstatus#1#2#3#4%
+ {\chardef\currentFDFmode=#1%
+ \edef\currentFDFparent {#2}%
+ \edef\currentFDFkids {#3}%
+ \edef\currentFDFroot {#4}}
+
+%D \macros
+%D {dosetuppageview}
+%D
+%D Because this command will seldom be called, we can permit
+%D slow action processing. We need three settings, one for
+%D direct \PDF\ inclusion, the other as \PDFTEX\ keyword, an
+%D a last one for form. All determine in what way the
+%D screen is adapted when going to a destination. Watch the
+%D space.
+
+\def\PDFpageviewkey{ fit}
+\def\PDFpageviewwrd{ /Fit}
+\def\PDFpageview {/View [\PDFpageviewwrd] }
+
+\definespecial\dosetuppageview#1%
+ {%\processaction
+ % [#1]
+ % [\v!passend=>\def\PDFpageviewkey{ fit}%
+ % \def\PDFpageviewwrd{ /Fit},
+ % \v!breedte=>\def\PDFpageviewkey{ fith}% % watch the v-h
+ % \def\PDFpageviewwrd{ /FitH}, % swapping here
+ % \v!hoogte=>\def\PDFpageviewkey{ fitv}% % and here and
+ % \def\PDFpageviewwrd{ /FitV}, % here too
+ % \v!geen=>\def\PDFpageviewkey{ xyz}%
+ % \def\PDFpageviewwrd{ /XYZ 0 0 0},
+ % \s!unknown=>\def\PDFpageviewkey{ fitv}%
+ % \def\PDFpageviewwrd{ /FitV}]%
+ }%\edef\PDFpageview{/View [\PDFpageviewwrd] }}
+
+%D \macros
+%D {setFDFkids}
+%D
+%D Clones as well as radiofields (which themselves can have
+%D cloned components) need a list fo kids. The next macro
+%D builds one.
+
+\def\setFDFkids[#1][#2]% tag commalist
+ {\let\FDFkids\empty
+ \def\docommando##1%
+ {\doPDFgetobjectreference{FDF}{#1##1}\PDFobjectreference
+ \edef\FDFkids{\FDFkids\PDFobjectreference\space}}%
+ \@EA\processcommalist\@EA[#2]\docommando}
+
+%D \macros
+%D {doFDFpresetlinefield,doFDFpresettextfield,
+%D doFDFpresetchoicefield,doFDFpresetpopupfield,doFDFpresetcombofield,
+%D doFDFpresetpushfield,doFDFpresetcheckfield,
+%D doFDFpresetradiofield,doFDFpresetradiorecord}
+%D
+%D I would say: read the \PDF\ reference manual first and see
+%D what happens here next. Lucky us that they have so much in
+%D common.
+
+\def\doFDFpresetlinefield#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \setFDFswitches[#7]%
+ \setFDFattributes[#6]%
+ \setFDFalignment[#8]%
+ \setFDFactions[#9]%
+ \ifcase\currentFDFmode
+ \doPDFannotationobject class FDF name #1 width #2 height #3 data
+ {/Subtype /Widget /T (#1) /FT /Tx
+ /MaxLen \ifcase0#5 1000 \else#5 \fi
+ /DV (#4) /V ()
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ /Q \FDFalign\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \setFDFkids[kids:][\currentFDFkids]%
+ \doPDFdictionaryobject class FDF name #1 data
+ {/T (#1) /FT /Tx
+ /MaxLen \ifcase0#5 1000 \else#5 \fi
+ /Kids [\FDFkids]
+ /DV (#4) /V ()
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ /Q \FDFalign\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ /Q \FDFalign\space
+ \FDFactions}%
+ \or
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference
+ /F \FDFplus}%
+ \fi
+ \egroup}
+
+\def\doFDFpresettextfield#1#2#3#4#5#6#7#8#9%
+ {\doFDFpresetlinefield{#1}{#2}{#3}{#4}{#5}{#6}{MultiLine,#7}{#8}{#9}}
+
+\def\doFDFpresetchoicefield#1#2#3#4#5#6#7#8%
+ {\bgroup
+ \setFDFswitches[#6]%
+ \setFDFattributes[#5]%
+ \setFDFvalues[#7]%
+ \setFDFactions[#8]%
+ \ifcase\currentFDFmode
+ \doPDFannotationobject class FDF name #1 width #2 height #3 data
+ {/Subtype /Widget
+ /T (#1) /FT /Ch
+ /DV (#4) /V ()
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ /Opt [\FDFvalues]
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \setFDFkids[kids:][\currentFDFkids]%
+ \doPDFdictionaryobject class FDF name #1 data
+ {/T (#1) /FT /Ch
+ /Kids [\FDFkids]
+ /DV (#4) /V ()
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ /Opt [\FDFvalues]
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ /DA (\FDFattributes)
+ \FDFsurroundings\space
+ \FDFactions}%
+ \or
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference
+ /F \FDFplus}%
+ \fi
+ \egroup}
+
+\def\doFDFpresetpopupfield#1#2#3#4#5#6#7#8%
+ {\doFDFpresetchoicefield{#1}{#2}{#3}{#4}{#5}{PopUp,#6}{#7}{#8}}
+
+\def\doFDFpresetcombofield#1#2#3#4#5#6#7#8%
+ {\doFDFpresetchoicefield{#1}{#2}{#3}{#4}{#5}{PopUp,Edit,#6}{#7}{#8}}
+
+\newif\ifFDFvalues
+
+\def\doFDFpresetpushcheckfield#1#2#3#4#5#6#7%
+ {\bgroup
+ \setFDFswitches[#5]%
+ \setFDFactions[#7]%
+ \ifcase\currentFDFmode
+ \doFDFappearance{On}{#6}%
+ \doFDFdefault{#6}{#4}%
+ \doPDFannotationobject class FDF name #1 width #2 height #3 data
+ {/Subtype /Widget /T (#1) /FT /Btn
+ \ifFDFvalues /DV (\FDFdefault) /V ()\fi
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ \FDFappearance\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \doFDFdefault{#6}{#4}%
+ \setFDFkids[kids:][\currentFDFkids]%
+ \doPDFdictionaryobject class FDF name #1 data
+ {/T (#1) /FT /Btn
+ /Kids [\FDFkids]
+ \ifFDFvalues /DV (\FDFdefault) /V ()\fi
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \doFDFappearance{On}{#6}%
+ \doFDFdefault{#6}{#4}%
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference\space
+ /Ff \FDFflag\space
+ /F \FDFplus\space
+ \FDFappearance\space
+ \FDFactions}%
+ \or
+ \doFDFappearance{On}{#6}%
+ \doFDFdefault{#6}{#4}%
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference\space
+ /F \FDFplus\space
+ \FDFappearance}%
+ \fi
+ \egroup}
+
+\def\doFDFpresetpushfield#1#2#3#4#5#6#7%
+ {\FDFvaluesfalse
+ \doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{PushButton,#5}{#6}{#7}}
+
+\def\doFDFpresetcheckfield#1#2#3#4#5#6#7%
+ {\FDFvaluestrue
+ \doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
+
+\def\doFDFpresetradiofield#1#2#3#4#5#6#7%
+ {\bgroup
+ \setFDFswitches[#4]%
+ \setFDFactions[#7]%
+ \ifcase\currentFDFmode
+ \doFDFappearance{#1}{#6}%
+ \doPDFgetobjectreference{FDF}{#5}\PDFobjectreference
+ \doPDFannotationobject class FDF name #1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference\space
+ /F \FDFplus\space
+ \FDFappearance\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \setFDFkids[kids:][\currentFDFkids]%
+ \doPDFgetobjectreference{FDF}{#5}\PDFobjectreference
+ \doPDFdictionaryobject class FDF name #1 data
+ {/Parent \PDFobjectreference\space
+ /Kids [\FDFkids]
+ /F \FDFplus\space
+ \FDFactions}%
+ \registerFDFobject{#1}%
+ \or
+ \doFDFappearance{#1}{#6}%
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference\space
+ /F \FDFplus\space
+ \FDFappearance\space
+ \FDFactions}%
+ \or
+ \doFDFappearance{#1}{#6}%
+ \doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
+ \global\objectreferencingtrue
+ \doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
+ {/Subtype /Widget
+ /Parent \PDFobjectreference\space
+ /F \FDFplus\space
+ \FDFappearance\space}
+ \fi
+ \egroup}
+
+\def\doFDFpresetradiorecord#1#2#3#4#5%
+ {\bgroup
+ \setFDFswitches[Radio,NoToggleToOff,#3]%
+ \setFDFkids[][#4]%
+ \setFDFactions[#5]%
+ \doPDFdictionaryobject class FDF name #1 data
+ {/Subtype /Widget /FT /Btn /T (#1) /Rect [0 0 0 0]
+ /DV /#2 % /V ()
+ /H /N
+ /Ff \FDFflag\space /F \FDFplus\space /Kids [\FDFkids]
+ \FDFactions}%
+ \egroup}
+
+%D At the cost of some more references, we can save bytes,
+%D by sharing appearance dictionaries. Surprise:
+
+\def\dodoFDFappearance#1#2%
+ {\ifx#2\empty\else
+ \dogetcommacommandelement1\from#2\to\commalistelement
+ \ifx\commalistelement\empty\else
+ \doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
+ \edef\N{\N /#1 \PDFobjectreference\space}%
+ \fi
+ \dogetcommacommandelement2\from#2\to\commalistelement
+ \ifx\commalistelement\empty\else
+ \doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
+ \edef\R{\R /#1 \PDFobjectreference\space}%
+ \fi
+ \dogetcommacommandelement3\from#2\to\commalistelement
+ \ifx\commalistelement\empty\else
+ \doPDFgetobjectreference{SYM}\commalistelement\PDFobjectreference
+ \edef\D{\D /#1 \PDFobjectreference\space}%
+ \def\FDFappearance{/H /P}%
+ \fi
+ \fi}
+
+\def\redoFDFappearance#1%
+ {\ifx#1\empty\else
+ \dogetcommacommandelement1\from#1\to\commalistelement
+ \dogetcommacommandelement3\from\commalistelement\to\commalistelement
+ \ifx\commalistelement\empty\else
+ \def\FDFappearance{/H /P}%
+ \fi
+ \fi}
+
+\def\doFDFappearance#1#2%
+ {\dogetcommacommandelement1\from#2,\to\yes
+ \dogetcommacommandelement2\from#2,\to\no
+ \def\FDFappearance{/H /N}%
+ \doifobjectfoundelse{FDF}{ap:#1:\yes:\no}
+ {\redoFDFappearance\yes
+ \redoFDFappearance\no}
+ {\presetobject{FDF}{ap:#1:\yes:\no}% funny hack
+ \let\N\empty\let\R\empty\let\D\empty
+ \dodoFDFappearance{#1}\yes
+ \dodoFDFappearance{Off}\no
+ \doPDFdictionaryobject class FDF name {ap:#1:\yes:\no} data
+ {\ifx\N\empty\else /N <<\N>>\fi
+ \ifx\R\empty\else /R <<\R>>\fi
+ \ifx\D\empty\else /D <<\D>>\fi}}%
+ \doPDFgetobjectreference{FDF}{ap:#1:\yes:\no}\PDFobjectreference
+ \edef\FDFappearance{\FDFappearance /AP \PDFobjectreference}}
+
+\def\doFDFdefault#1#2%
+ {\dogetcommacommandelement1\from#1,\to\commalistelement
+ \dogetcommacommandelement1\from\commalistelement\to\commalistelement
+ \doifelse{\commalistelement}{#2} % kan ook met \ifx
+ {\def\FDFdefault{On}}{\def\FDFdefault{Off}}}
+
+%D The three appearances {\em normal}, \type{roll over} and
+%D \type{push down} are passed as comma separated triplets,
+%D that is, the second argument can look like:
+%D
+%D \starttypen
+%D {yes,ok,fine},{no,rubish,awful}
+%D \stoptypen
+
+%D \macros
+%D {doFDFdefinefieldset,doFDFgetfieldset,doFDFiffieldset}
+%D
+%D Field sets, the ones we use in submitting and resetting
+%D fields, are implemented using the next low level specials:
+%D
+%D \starttypen
+%D \doFDFdefinefieldset{TAG}{name,name,...}
+%D \doFDFgetfieldset{TAG}
+%D \doFDFiffieldset{TAG}
+%D \stoptypen
+
+\def\doFDFdefinefieldset#1#2% tag commalist
+ {\let\FDFfieldset\empty
+ \def\docommando##1%
+ {\doPDFgetobjectreference{FDF}{##1}\PDFobjectreference
+ \edef\FDFfieldset{\FDFfieldset\PDFobjectreference\space}}%
+ \processcommacommand[#2]\docommando % nb: command
+ \setevalue{FDF:set:#1}{\FDFfieldset}}
+
+\def\doFDFgetfieldset#1%
+ {\getvalue{FDF:set:#1}}
+
+\def\doFDFiffieldset#1%
+ {\ifundefined{FDF:set:#1}\else}
+
+%D In the goto specials we took care of secondary references.
+%D Here we define the macros used.
+
+\def\doPDFresetgotowhereever%
+ {\global\let\secondaryPDFreferences\empty}
+
+\doPDFresetgotowhereever % just to be sure
+
+\def\savesecondaryPDFreference#1%
+ {\setxvalue{PDF-SR:\the\nofsecondaryreferences}{#1}}
+
+\def\getsecondaryPDFreferences%
+ {\ifnum\nofsecondaryreferences>0
+ %\doifdefined{PDF-SR:\the\nofsecondaryreferences}
+ \xdef\secondaryPDFreferences%
+ {/Next << \getvalue{PDF-SR:\the\nofsecondaryreferences}\space
+ \secondaryPDFreferences >>}%
+ \global\advance\nofsecondaryreferences by -1
+ \expandafter\getsecondaryPDFreferences
+ \fi}
+
+%D \macros
+%D {loadFDFfields, showFDFfields,
+%D getFDFfield, setFDFfield}
+%D
+%D Once filled in, we can export or submit the field in the
+%D \FDF\ file format. Such a file can be loaded by
+%D
+%D \starttypen
+%D \loadFDFfields{fiel-ini}
+%D \stoptypen
+%D
+%D or inspected by
+%D
+%D \starttypen
+%D \showFDFfields{fiel-ini}
+%D \stoptypen
+%D
+%D After both commands, one can use
+%D
+%D \starttypen
+%D \getFDFfield{name}
+%D \setFDFfield{name}{value}
+%D \stoptypen
+%D
+%D to inspect and overrule the data.
+%D
+%D By default \CONTEXT\ calls the perl script \type{fdf2tex}.
+%D This script reads the \type{fdf} file and produces a file
+%D named \type{filename.fdt}. If one disables the call to this
+%D script, by saying:
+%D
+%D \starttypen
+%D \runFDFconverterfalse
+%D \stoptypen
+%D
+%D or when \CONTEXT\ cannot find the \type{fdt} file, it tries
+%D to interpret the \type{fdf} file directly. Both mechanisms
+%D are rather crude.
+
+\newif\ifrunFDFconverter \runFDFconvertertrue
+
+%D The \PERL\ script produces a file formatted as:
+%D
+%D \starttypen
+%D \beginFDFobject
+%D \beginFDFdata
+%D \beginFDFfields
+%D \FDFfield[name=,value=]
+%D \endFDFfields
+%D \endFDFdata
+%D \endFDFobject
+%D \stoptypen
+%D
+%D One reason for using key value pairs is that we cannot be
+%D sure or the order in which the name and value are given
+%D (actually the reverse).
+
+\def\PERLloadFDFfields#1%
+ {\bgroup
+ \global\let\allFDFfields\empty
+ \ifrunFDFconverter
+ \executesystemcommand{fdf2tex #1}%
+ \let\beginFDFobject=\relax \let\endFDFobject=\relax
+ \let\beginFDFdata =\relax \let\endFDFdata =\relax
+ \let\beginFDFfields=\relax \let\endFDFfields=\relax
+ \def\FDFfield[##1]%
+ {\getparameters[FDF][##1]%
+ \doglobal\addtocommalist\FDFname\allFDFfields
+ \global\setFDFfield{\FDFname}{\FDFvalue}}%
+ \ReadFile{#1.fdt}%
+ \fi
+ \egroup}
+
+%D The next macro does the same job, but now in the \TEX\ way
+%D of doing things. Easy eh?
+
+\bgroup
+
+\catcode`\/=\@@other
+\global\let\normalslash=/
+\catcode`\/=\@@escape
+
+\gdef\TEXloadFDFfields#1%
+ {\bgroup
+ \setbox0=\hbox
+ {\global\let\allFDFfields\empty
+ \scratchcounter=0
+ \escapechar=-1
+ \catcode`\/=\@@escape
+ \catcode`\(=\@@begingroup
+ \catcode`\)=\@@endgroup
+ \catcode`\%=\@@letter
+ \let/A =\relax \let/AS =\relax \let/Kids=\relax \let/Fields=\relax
+ \let/F =\relax \let/ID =\relax \let/SetF=\relax \let/setFf =\relax
+ \let/Ff=\relax \let/Opt=\relax \let/ClrF=\relax \let/ClrFf =\relax
+ \let/AP=\relax \let/FDF=\relax \let/Root=\relax
+ \def/T##1{\check\Title{##1}}
+ \def/V{\bgroup\catcode`\/=\@@other\futurelet\next/doV}
+ \def/doV{\ifx\next\normalslash\@EA/doVb\else\@EA/doVa\fi}
+ \def/doVa##1{\egroup\check\Value{##1}}
+ \def/doVb##1##2 {\egroup\check\Value{##2}} % watch the space
+ \def\check##1##2%
+ {\def##1{##2}
+ \advance\scratchcounter by 1
+ \ifodd\scratchcounter \else
+ \convertcommand\Title\to\asciiA
+ \global\setFDFfield{\asciiA}{\Value}
+ \doglobal\addtocommalist\Title\allFDFfields
+ \fi}
+ \ReadFile{#1.fdf}}%
+ \egroup}
+
+\egroup
+
+%D Whatever mechanism is used, the next macros can be used to
+%D fetch the values.
+
+\def\getFDFfield#1%
+ {\getvalue{FDFfield::#1}}
+
+\def\setFDFfield#1#2%
+ {\setevalue{FDFfield::#1}{#2}}
+
+%D Of course the fields are only present when the file is
+%D loaded.
+
+\def\loadFDFfields#1%
+ {\PERLloadFDFfields{#1}%
+ \ifx\allFDFfields\empty
+ \TEXloadFDFfields{#1}%
+ \fi}
+
+\def\showFDFfields#1%
+ {\bgroup
+ \loadFDFfields{#1}
+ \def\docommando##1{\par##1 = \getFDFfield{##1}\par}%
+ \processcommacommand[\allFDFfields]\docommando
+ \egroup}
+
+%D \macros
+%D {sanitizePDFdocencoding}
+%D
+%D We already dealt with the encoding vector. Conversion from
+%D \TEX\ \ASCII\ encoding to the other one, is accomplished by
+%D the next few macros. Wach out: we don't group here.
+
+%D This will be reimplemented using the mapping mechsnism.
+
+\long\def\sanitizePDFdocencoding#1\to#2%
+ {\enablePDFcrlf
+ \enablePDFdocencoding
+ \edef#2{#1}}
+
+\bgroup
+\catcode`\^^M=\@@active
+\gdef\enablePDFcrlf%
+ {\def\\{\string\r}%
+ \def\par{\\\\}%
+ \catcode`\^^M=\@@active
+ \let^^M=\\}
+\egroup
+
+% \def\enablePDFdocencoding%
+% {\def\"##1{\if##1A\string ^^c4\else\if##1a\string ^^e4\else
+% \if##1E\string ^^cb\else\if##1e\string ^^eb\else
+% \if##1I\string ^^cf\else\if##1i\string ^^ef\else
+% \if##1O\string ^^d6\else\if##1o\string ^^f6\else
+% \if##1U\string ^^dc\else\if##1u\string ^^fc\else
+% \if##1y\string ^^ff\else
+% \string\"##1%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \def\'##1{\if##1A\string ^^c1\else\if##1a\string ^^e1\else
+% \if##1E\string ^^c9\else\if##1e\string ^^e9\else
+% \if##1I\string ^^cd\else\if##1i\string ^^ed\else
+% \if##1O\string ^^d3\else\if##1o\string ^^f3\else
+% \if##1U\string ^^da\else\if##1u\string ^^fa\else
+% \if##1Y\string ^^dd\else\if##1y\string ^^fd\else
+% \string\'##1%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \def\^##1{\if##1A\string ^^c2\else\if##1a\string ^^e2\else
+% \if##1E\string ^^ca\else\if##1e\string ^^ea\else
+% \if##1I\string ^^ce\else\if##1i\string ^^ee\else
+% \if##1O\string ^^d4\else\if##1o\string ^^f4\else
+% \if##1U\string ^^db\else\if##1u\string ^^fb\else
+% \string\^##1%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \def\`##1{\if##1A\string ^^c0\else\if##1a\string ^^e0\else
+% \if##1E\string ^^c8\else\if##1e\string ^^e8\else
+% \if##1I\string ^^cc\else\if##1i\string ^^ec\else
+% \if##1O\string ^^d2\else\if##1o\string ^^f2\else
+% \if##1U\string ^^d9\else\if##1u\string ^^f9\else
+% \string\`##1%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \def\~##1{\if##1A\string ^^c3\else\if##1a\string ^^e3\else
+% \if##1N\string ^^d1\else\if##1n\string ^^f1\else
+% \if##1O\string ^^d5\else\if##1o\string ^^f5\else
+% \string\~##1%\string
+% \fi\fi\fi\fi\fi\fi}%
+% \def\,##1{\if##1C\string ^^c7\else\if##1c\string ^^e7\else
+% \string\,##1%
+% \fi\fi}%
+% \def\<##1{\if##1<\string ^^ab\else
+% \string\<##1%
+% \fi}%
+% \def\>##1{\if##1>\string ^^bb\else
+% \string\>##1%
+% \fi}%
+% \def\AE{\string ^^c6}\def\ae{\string ^^e6}%
+% \def\oA{\string ^^c5}\def\oa{\string ^^e5}%
+% \def\oe{\string ^^9c}\def\ss{\string ^^df}}%
+
+\def\enablePDFdocencoding%
+ {\setencoding[pdfdoc]\simplifycommands}
+
+%D A bit out of place, but useful:
+
+\newevery\everysetfield\relax
+
+\appendtoks \enablePDFcrlf \to \everysetfield
+\appendtoks \enablePDFdocencoding \to \everysetfield
+
+%D \macros
+%D {doPDFinsertcomment}
+%D
+%D An example its use is the next special, one that deals with
+%D text annotations.
+
+\long\def\doPDFinsertcomment#1#2#3#4#5#6% title width height color open data
+ {\bgroup
+ \doifelsenothing{#1}
+ {\let\PDFidentifier\empty}
+ {\def\PDFidentifier{/T (#1)}}%
+ \doifelsenothing{#4}
+ {\let\PDFattributes\empty}
+ {\def\PDFattributes{/C \FDFcolor{#4}}}%
+ \sanitizePDFdocencoding#6\to\PDFdata
+ \doPDFtextannotation width #2 height #3 data
+ {/Subtype /Text
+ \ifcase#5 \else/Open false\fi
+ /Contents (\PDFdata)
+ \PDFidentifier
+ \PDFattributes}%
+ \egroup}
+
+%D Hooked into \CONTEXT, this special supports
+%D
+%D \starttypen
+%D \startcomment
+%D hello beautiful\\world
+%D \stopcomment
+%D
+%D \startcomment[hello]
+%D de \'e\'erste keer
+%D the f\'irst time
+%D \stopcommen
+%D
+%D \startcommentaar[hallo][kleur=groen,breedte=4cm,hoogte=3cm]
+%D first
+%D
+%D second
+%D \stopcommentaar
+%D \stoptypen
+%D
+%D So, special characters, forced linebreaks using \type{\\}
+%D and \type{\par} are handled in the appropriate way.
+
+%D \macros
+%D {doPDFovalbox}
+%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\doPDFovalcalc#1#2#3%
+ {\dimen2=#1sp
+ \advance\dimen2 by #2\relax
+ \ScaledPointsToBigPoints{\number\dimen2}#3}
+
+\def\doPDFovalbox#1#2#3#4#5#6#7%
+ {\bgroup
+ \dimen0=#4sp\divide\dimen0 by 2
+ \doPDFovalcalc{0} {+\dimen0}\xmin
+ \doPDFovalcalc{#1}{-\dimen0}\xmax
+ \doPDFovalcalc{#2}{-\dimen0}\ymax
+ \doPDFovalcalc{-#3}{+\dimen0}\ymin
+ \advance\dimen0 by #5sp
+ \doPDFovalcalc{0} {+\dimen0}\xxmin
+ \doPDFovalcalc{#1}{-\dimen0}\xxmax
+ \doPDFovalcalc{#2}{-\dimen0}\yymax
+ \doPDFovalcalc{-#3}{+\dimen0}\yymin
+ \doPDFovalcalc{#4}{0pt}\stroke
+ \doPDFovalcalc{#5}{0pt}\radius
+ \edef\dostroke{#6}%
+ \edef\dofill{#7}%
+ \setbox0=\hbox
+ {\ifnum\dostroke\dofill>0
+ \PDFcode
+ {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}%
+ \fi}%
+ \wd0=#1sp\ht0=#2sp\dp0=#3sp\box0
+ \egroup}
+
+%D \macros
+%D {doPDFstartgraymode,doPDFstopgraymode,
+%D doPDFstartrgbcolormode,doPDFstartcmykcolormode,doPDFstartgraycolormode,
+%D doPDFstopcolormode}
+%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.
+
+\def\doPDFstartgraymode#1%
+ {\PDFcode{#1 g #1 G}}
+
+\def\doPDFstopgraymode%
+ {\PDFcode{0 g 0 G}}
+
+\def\doPDFstartrgbcolormode#1#2#3%
+ {\PDFcode{#1 #2 #3 rg #1 #2 #3 RG}}
+
+\def\doPDFstartcmykcolormode#1#2#3#4%
+ {\PDFcode{#1 #2 #3 #4 k #1 #2 #3 #4 K}}
+
+\def\doPDFstartgraycolormode#1%
+ {\PDFcode{#1 g #1 G}}
+
+\def\doPDFstopcolormode%
+ {\PDFcode{0 g 0 G}}
+
+%D \macros
+%D {doPDFstartrotation,doPDFstoprotation}
+%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 \type{q}'s take care of grouping.
+
+\def\doPDFstartrotation#1%
+ {\PDFcode{q}%
+ \processaction
+ [#1]
+ [ 90=>\PDFcode{ 0 1 -1 0 0 0 cm},
+ 180=>\PDFcode{-1 0 0 -1 0 0 cm},
+ 270=>\PDFcode{ 0 -1 1 0 0 0 cm},
+ 360=>\PDFcode{ 1 0 0 1 0 0 cm}]}
+
+\def\doPDFstoprotation%
+ {\PDFcode{Q}}
+
+%D \macros
+%D {doPDFstartscaling,doPDFstopscaling}
+%D
+%D Scaling is rather straightforward:
+
+\def\doPDFstartscaling#1#2%
+ {\PDFcode{q #1\space 0 0 #2\space 0 0 cm}}
+
+\def\doPDFstopscaling%
+ {\PDFcode{Q}}
+
+%D \macros
+%D {doPDFstartmirroring,doPDFstopmirroring}
+%D
+%D Mirroring is implemented in a similar way:
+
+\def\doPDFstartmirroring%
+ {\PDFcode{-1 0 0 1 0 0 cm}}
+
+\def\doPDFstopmirroring%
+ {\PDFcode{-1 0 0 1 0 0 cm}}
+
+%D \macros
+%D {doPDFstartnegative,doPDFstopnegative}
+%D
+%D When producing output for an image setter, sometimes negative
+%D output is needed.
+
+\def\doPDFstartnegative%
+ {\writestatus{system}{negative not yet supported}}
+
+\def\doPDFstopnegative%
+ {}
+
+%D And that was all.
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex
index b26f067f1..000f35841 100644
--- a/tex/context/base/spec-ini.tex
+++ b/tex/context/base/spec-ini.tex
@@ -1,958 +1,1212 @@
-%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}}%
- \makeshortfilename[\f!specialprefix\currentspecialfile]%
- \showmessage{\m!specials}{5}{\currentspecialfile}%
- \startreadingfile
- \readsysfile{\shortfilename}{}{}%
- \stopreadingfile
- \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
-
-%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}
-%D {xscale} {yscale} {x} {y} {w} {h}
-%D {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 {dostartscaling,
-%D dostopscaling}
-%D {}
-%D
-%D Scaling is also supported:
-%D
-%D \starttypen
-%D \dostartscaling {x} {y} ... \dostopscaling
-%D \stoptypen
-%D
-%D Like the previous one, these specials are of category
-%D \type{or}.
-
-\installspecial [\dostartscaling] [or] [2]
-\installspecial [\dostopscaling] [or] [0]
-
-%D \macros
-%D {dostartmirroring,
-%D dostopmirroring}
-%D {}
-%D
-%D And indeed, mirroring is there too:
-%D
-%D \starttypen
-%D \dostartmirroring {x} {y} ... \dostopmirroring
-%D \stoptypen
-%D
-%D Again these specials are installed as category \type{or}.
-
-\installspecial [\dostartmirroring] [or] [0]
-\installspecial [\dostopmirroring] [or] [0]
-
-%D \macros
-%D {dostartnegative,
-%D dostopnegative}
-%D {}
-%D
-%D When producing output for an image setter, negating the
-%D page comes into view. Here are the tools:
-
-\installspecial [\dostartnegative] [or] [0]
-\installspecial [\dostopnegative] [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 {dostartgotoJS, doflushJSpreamble}
-%D
-%D
-%D Rather special is the option to include and execute
-%D JavaScript code. This is a typical \PDF\ option.
-%D
-%D \starttypen
-%D \dostartgotoJS {w} {h} {script}
-%D \stoptypen
-%D
-%D This not so standard \TEX\ feature should be used with
-%D care. Preamble scripts are flushed by
-%D
-%D \doflushJSpreamble {script}
-
-\installspecial [\dostartgotoJS] [and] [3]
-\installspecial [\dostopgotoJS] [and] [0]
-\installspecial [\doflushJSpreamble][and] [1]
-
-%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 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 {dogetobjectreference}
-% %D
-% %D For very special purposes, one can ask for the internal
-% %D reference to the object. Beware!
-%
-% \installspecial [\dogetobjectreference] [or] [2]
-%
-% %D The first argument is the name, the second a macro that
-% %D gets the assiciated value.
-
-%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] [4]
-\installspecial [\doendofprofile] [and] [0]
-
-%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 \macros
-%D {dosetpagetransition}
-%D
-%D In presentations, fancy page transitions can, at least for a
-%D short moment, let the audience focus at the screen. Like the
-%D previous one, this special is very \PDF.
-%D
-%D \starttypen
-%D \dosetpagetransition{dissolve}
-%D \stoptypen
-%D
-%D Transitions have symbolic names, like dissolve, box, split,
-%D blinds, wipe and glitter.
-
-\installspecial [\dosetpagetransition] [or] [1]
-
-%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
+%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
+ 7: onbekende driver --
+\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
+ 7: unknown driver --
+\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
+ 7: unbekante Driver --
+\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 \macros
+%D {everyresetspecials}
+%D
+%D Now what will this one do? We'll see in a few lines.
+
+\newevery \everyresetspecials \relax
+
+%D \macros
+%D {jobsuffix}
+%D
+%D By default, \TEX\ produces \DVI\ files which can be
+%D converted to other filetypes. Sometimes it is handy to
+%D know what the target file will be. In other driver
+%D modules we wil set \type {\jobsuffix} to \type {pdf}.
+
+\def\jobsuffix{dvi}
+
+\appendtoks \def\jobsuffix{dvi} \to \everyresetspecials
+
+%D A rather fundamental difference between special and direct
+%D settings is that the latter don't interfere with typesetting
+%D but must be set before the first shipout, while the specials
+%D must be packaged in the shipped out box in such a way that
+%D they don't interfere.
+
+\newif\ifspecialbasedsettings \specialbasedsettingstrue
+
+\appendtoks \specialbasedsettingstrue \to \everyresetspecials
+
+%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 can have overlap in low level macros, a
+%D mechanism of inheritance is implemented. The libraries
+%D defined as second argument are loaded first.
+%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@@}
+
+\let\currentspecial =\empty
+\let\currentspecialfile=\empty
+\let\preloadedspecials =\empty
+
+%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.
+
+% to fuzzy and error prone
+%
+% \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}
+% {\let\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}
+
+\def\dostartspecials[#1][#2]%
+ {\doifsomething{#2}
+ {\processcommalist[#2]\dousespecials}%
+ \doifelsenothing{#1}
+ {\let\currentspecial\s!unknown}
+ {\def\currentspecial{#1}}%
+ \unprotect
+ \addtocommalist{\currentspecial}\preloadedspecials}
+
+\def\startspecials%
+ {\pushmacro\currentspecial
+ \dodoubleempty\dostartspecials}
+
+\def\stopspecials%
+ {\popmacro\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. Special reset actions |<|look in \type{spec-mis}
+%D for an example|>| can be assigned to the token register
+%D \type{\everyresetspecials}.
+
+\let\@@allspecials=\empty
+
+\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%
+ {\the\everyresetspecials
+ \def\docommando##1%
+ {\letvalue{\@@speclst@@##1}\empty}%
+ \processcommacommand[\@@allspecials]\docommando
+ \ifx\preloadedspecials\empty \else
+ \showmessage{\m!specials}{3}{\preloadedspecials}%
+ \let\preloadedspecials\empty
+ \fi}
+
+%D \macros
+%D {definespecial}
+%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}}%
+ \makeshortfilename[\f!specialprefix\currentspecialfile]%
+ \showmessage{\m!specials}{5}{\currentspecialfile}%
+ \startreadingfile
+ \readsysfile{\shortfilename}{}{}%
+ \stopreadingfile
+ \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 \macros
+%D {doifspecialavailableelse}
+%D
+%D For testing purposes (this was first needed when object
+%D support was implemented) we have:
+%D
+%D \starttypen
+%D \doifspecialavailableelse\specialcommand{true}{false}
+%D \stoptypen
+%D
+%D e.g:
+%D
+%D \starttypen
+%D \doifspecialavailableelse\doinsertobject{...}{...}
+%D \stoptypen
+
+\def\doifspecialavailableelse#1#2#3%
+ {\doifelsevaluenothing{\@@speclst@@\string#1}{#3}{#2}}
+
+% %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.
+
+%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-tpd \NC
+%D \tttf \PDF \NC
+%D \NC
+%D Han The Thanh \NC
+%D (pdftex) \NC\MR
+%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 rokicki \NC
+%D \tttf postscript \NC
+%D Thomas Rokicki \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,label}
+%D {xscale} {yscale} {x} {y} {w} {h}
+%D {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 {dostartscaling,
+%D dostopscaling}
+%D {}
+%D
+%D Scaling is also supported:
+%D
+%D \starttypen
+%D \dostartscaling {x} {y} ... \dostopscaling
+%D \stoptypen
+%D
+%D Like the previous one, these specials are of category
+%D \type{or}.
+
+\installspecial [\dostartscaling] [or] [2]
+\installspecial [\dostopscaling] [or] [0]
+
+%D \macros
+%D {dostartmirroring,
+%D dostopmirroring}
+%D {}
+%D
+%D And indeed, mirroring is there too:
+%D
+%D \starttypen
+%D \dostartmirroring {x} {y} ... \dostopmirroring
+%D \stoptypen
+%D
+%D Again these specials are installed as category \type{or}.
+
+\installspecial [\dostartmirroring] [or] [0]
+\installspecial [\dostopmirroring] [or] [0]
+
+%D \macros
+%D {dostartnegative,
+%D dostopnegative}
+%D {}
+%D
+%D When producing output for an image setter, negating the
+%D page comes into view. Here are the tools:
+
+\installspecial [\dostartnegative] [or] [0]
+\installspecial [\dostopnegative] [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 dosetupopenaction, dosetupclosaction,
+%D dosetupinteraction,
+%D dosetupscreen,
+%D dosetupviewmode}
+%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.
+%D
+%D \starttypen
+%D \dosetupstartaction
+%D \dosetupstopaction
+%D \stoptypen
+%D
+%D These two setup the actions to be executed when the document
+%D is opened and closed.
+%D
+%D The next command sets up the screen. It takes five
+%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.
+%D
+%D \starttypen
+%D \dosetuppageview {keyword}
+%D \stoptypen
+%D
+%D For the moment we only support \type{fit}.
+
+\installspecial [\dosetupinteraction] [and] [0]
+\installspecial [\dosetupopenaction] [and] [0]
+\installspecial [\dosetupcloseaction] [and] [0]
+\installspecial [\dosetupscreen] [and] [5]
+\installspecial [\dosetuppageview] [and] [1]
+
+%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 {dostartgotoJS, doflushJSpreamble}
+%D
+%D
+%D Rather special is the option to include and execute
+%D JavaScript code. This is a typical \PDF\ option.
+%D
+%D \starttypen
+%D \dostartgotoJS {w} {h} {script}
+%D \stoptypen
+%D
+%D This not so standard \TEX\ feature should be used with
+%D care. Preamble scripts are flushed by
+%D
+%D \doflushJSpreamble {script}
+
+\installspecial [\dostartgotoJS] [and] [3]
+\installspecial [\dostopgotoJS] [and] [0]
+\installspecial [\doflushJSpreamble][and] [1]
+
+%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 \macro
+%D {doresetgotowhereever}
+%D
+%D These and others need:
+
+\installspecial [\doresetgotowhereever] [and] [0]
+
+%D \macros
+%D {dostartexecutecommand, dostopexecutecommand}
+%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 At least the next commands are supported (more examples
+%D can be found in \type {spec-fdf.tex}:
+%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 Options are to be passed as a comma separated list of
+%D assignments.
+
+\installspecial [\dostartexecutecommand] [and] [4]
+\installspecial [\dostopexecutecommand] [and] [0]
+
+%D \macros
+%D {dostartobject,
+%D dostopobject,
+%D doinsertobject}
+%D
+%D Reuse of object can reduce the output filesize
+%D considerably. Reusable objects are implemented with:
+%D
+%D \starttypen
+%D \dostartobject{class}{name}{width}{height}{depth}
+%D some typeset material
+%D \dostopobject
+%D \stoptypen
+%D
+%D \starttypen
+%D \doinsertobject{class}{name}
+%D \stoptypen
+%D
+%D The savings can be huge in interactive texts.
+
+\installspecial [\dostartobject] [or] [5]
+\installspecial [\dostopobject] [or] [0]
+\installspecial [\doinsertobject] [or] [2]
+
+% %D \macros
+% %D {dogetobjectreference}
+% %D
+% %D For very special purposes, one can ask for the internal
+% %D reference to the object. Beware!
+%
+% \installspecial [\dogetobjectreference] [or] [3]
+%
+% %D The first argument is the name, the second a macro that
+% %D gets the assiciated value.
+
+%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] [4]
+\installspecial [\doendofprofile] [and] [0]
+
+%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 \macros
+%D {dosetpagetransition}
+%D
+%D In presentations, fancy page transitions can, at least for a
+%D short moment, let the audience focus at the screen. Like the
+%D previous one, this special is very \PDF.
+%D
+%D \starttypen
+%D \dosetpagetransition{dissolve}
+%D \stoptypen
+%D
+%D Transitions have symbolic names, like dissolve, box, split,
+%D blinds, wipe and glitter.
+
+\installspecial [\dosetpagetransition] [or] [1]
+
+%D \macros
+%D {dopresettextfield,dopresetlinefield,
+%D dopresetchoicefield,dopresetpopupfield,dopresetcombofield,
+%D dopresetbuttonfield,dopresetcheckfield,
+%D dopresetradiofield,dopresetradiorecord}
+%D
+%D The special drivers are programmed independant from their
+%D calling macros are thereby use the standard \TEX\ way of
+%D passing parameters. Unfortunately fields often have more
+%D than nine characteristics, so we pack some arguments in one.
+%D
+%D \starttypen
+%D \dopresettextfield / \dopresetlinefield
+%D {name} {width} {height} {default} {length}
+%D {style,color} {options} {alignment} {actions}
+%D
+%D \dopresetchoicefield / \dopresetpopupfield / \dopresetcombofield
+%D {name} {width} {height} {default}
+%D {style,color} {options} {values} {actions}
+%D
+%D \dopresetpushfield
+%D {name} {width} {height} {default}
+%D {options} {values} {actions}
+%D
+%D \dopresetcheckfield
+%D {name} {width} {height} {default}
+%D {options} {values} {actions}
+%D
+%D \dopresetradiofield
+%D {name} {width} {height}
+%D {options} {parent} {values} {actions}
+%D
+%D \dopresetradiorecord
+%D {name} {top} {options} {kids} {actions}
+%D \stoptypen
+
+\installspecial [\dopresetlinefield] [or] [9]
+\installspecial [\dopresettextfield] [or] [9]
+\installspecial [\dopresetchoicefield] [or] [8]
+\installspecial [\dopresetpopupfield] [or] [8]
+\installspecial [\dopresetcombofield] [or] [8]
+\installspecial [\dopresetpushfield] [or] [7]
+\installspecial [\dopresetcheckfield] [or] [7]
+\installspecial [\dopresetradiofield] [or] [7]
+\installspecial [\dopresetradiorecord] [or] [5]
+
+%D \macros
+%D {dodefinefieldset,dogetfieldset,doiffieldset}
+%D
+%D Field sets, used in resetting and submitting, are handled
+%D by:
+
+\installspecial [\dodefinefieldset] [or] [2]
+\installspecial [\dogetfieldset] [or] [1]
+\installspecial [\doiffieldset] [or] [1]
+
+%D \macros
+%D {dosetfieldstatus}
+%D
+%D For practical reasons we set some field characteristics
+%D using:
+%D
+%D \starttypen
+%D \dosetfieldstatus {mode} {parent} {kids} {root}
+%D \stoptypen
+
+\installspecial [\dosetfieldstatus] [or] [4]
+
+%D with:
+
+\def\fieldlonermode {0} % no \chardef here
+\def\fieldparentmode{1} % no \chardef here
+\def\fieldchildmode {2} % no \chardef here
+\def\fieldcopymode {3} % no \chardef here
+
+%D \macros
+%D {doinsertcomment}
+%D
+%D Not so much out ot need, but to be complete, we also
+%D implement text annotations, so called comment:
+%D
+%D \starttypen
+%D \doinsertcomment
+%D {title} {width} {height} {color} {open} {data}
+%D \stoptypen
+
+\installspecial[\doinsertcomment] [and] [6]
+
+%D So far for the installation. For quite some time the
+%D \CONTEXT\ way of specifying the output format has been:
+%D
+%D \starttypen
+%D \usespecials[ps,yy,win,pdf]
+%D \stoptypen
+%D
+%D Because at \PRAGMA\ we use \DVIPSONE, this was a suitable
+%D setting, but with \CONTEXT\ going public, the next sequence
+%D is more suitable for \DVIPS\ users:
+%D
+%D \starttypen
+%D \usespecials[reset,ps,tr,pdf]
+%D \stoptypen
+%D
+%D On the other hand, for \PDFTEX\ we needed:
+%D
+%D \starttypen
+%D \usespecials[tpd]
+%D \stoptypen
+%D
+%D To simplify things, I decided to provide a higher level
+%D command.
+%D
+%D \starttypen
+%D \defineoutput[name][specials]
+%D \setupoutput[name,...]
+%D \stoptypen
+%D
+%D In a few lines, we will see some examples.
+
+\def\defineoutput%
+ {\dodoubleargument\dodefineoutput}
+
+\def\dodefineoutput[#1][#2]%
+ {\setvalue{\??ui#1}{#2}}
+
+\def\dosetupoutput#1%
+ {\doifdefinedelse{\??ui#1}
+ {\processcommacommand[\getvalue{\??ui#1}]\dousespecials}
+ {\doifdefinedelse{\@@specfil@@#1}
+ {\dousespecials{#1}}
+ {\showmessage{\m!specials}{7}{#1}}}}
+
+\def\setupoutput[#1]%
+ {\resetspecials\processcommacommand[#1]\dosetupoutput}
+
+%D Some suitable definitions are:
+
+\defineoutput [dvipsone] [dvi,ps,yy]
+\defineoutput [dviwindo] [dvi,ps,yy,win]
+\defineoutput [dvips] [dvi,ps,tr]
+\defineoutput [dviview] [dvi,ps,tr,dv]
+\defineoutput [pdftex] [tpd]
+\defineoutput [pdf] [tpd]
+\defineoutput [acrobat] [pdf,ps,tr] % use: [acrobat,dvipsone]
+
+%D Please let me know if we need more. From now on we default
+%D to:
+
+\setupoutput [dvips]
+
+%D We don't enable \ACROBAT, because pure \POSTSCRIPT\ is not
+%D that strong on objects and \PDFTEX\ does a better job.
+%D Some reasonable alternatives are:
+%D
+%D \starttypen
+%D \setupoutput [dvipsone,acrobat]
+%D \setupoutput [dviwindo,acrobat]
+%D \stoptypen
+%D
+%D Although, better is:
+%D
+%D \starttypen
+%D \setupoutput [pdftex]
+%D \stoptypen
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex
index 21f099c7b..b5bfc0cbf 100644
--- a/tex/context/base/spec-mis.tex
+++ b/tex/context/base/spec-mis.tex
@@ -1,137 +1,89 @@
-%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.
-%D
-%D The \ACROBAT\ programs are not bug free. By setting the next
-%D switch, we will at least try to prevent problems.
-
-\newif\ifovercomePDFbugs \overcomePDFbugstrue
-
-\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
- {\ifovercomePDFbugs'\fi\PDFdestination\ifovercomePDFbugs'\fi}}%
- \egroup}
-
-%D \macros
-%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 \macros
-%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}}}
- {\doifdefinedelse{\fileinsertionclass#2}
- {\def\next{\getvalue{\fileinsertionclass#2}}}
- {\def\next{\gobbleeightarguments}}}%
- \next{#4}}
-
-\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
+%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 {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 \macros
+%D {dodoinsertfile,dofileinsertion,
+%D definefileinsertion,doiffileinsertionsupported}
+%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,#5]%
+ {\def\fileinsertionclass{do#1insert}%
+ \doifdefinedelse{\fileinsertionclass#3}
+ {\def\next{\getvalue{\fileinsertionclass#3}}}
+ {\doifdefinedelse{\fileinsertionclass#2}
+ {\def\next{\getvalue{\fileinsertionclass#2}}}
+ {\def\next{\gobbleninearguments}}}%
+ \next{#4}{#5}}
+
+\def\dodoinsertfile#1#2#3%
+ {\dododoinsertfile[#1][#2][#3]}
+
+\def\definefileinsertion#1#2%
+ {\addtocommalist{#2}\supportedfileinsertions
+ \setvalue{do#1insert#2}}
+
+\def\dofileinsertion#1#2%
+ {\getvalue{do#1insert#2}}
+
+\newevery \everyresetspecials \relax
+
+\appendtoks \let\supportedfileinsertions\empty \to \everyresetspecials
+
+\let\supportedfileinsertions\empty
+
+\def\doiffileinsertionsupportedelse#1%
+ {\ExpandBothAfter\doifinstringelse{#1}{\c!tex,\c!tmp,\supportedfileinsertions}}
+
+%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
diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex
index 0500eb7d2..1a39e3b23 100644
--- a/tex/context/base/spec-pdf.tex
+++ b/tex/context/base/spec-pdf.tex
@@ -1,494 +1,481 @@
-%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
-
-% /Border -> /B, evt meer indirecte objecten!
-
-%D \macros
-%D {dosetupinteraction,
-%D dosetupscreen,
-%D dosetupidentity,
-%D dostartthisislocation,
-%D dostartgotolocation,
-%D dostartgotorealpage,
-%D doflushJSpreamble,
-%D dostartgotoJS,
-%D dostartcommand,
-%D dostartgotoprofile,
-%D dobeginofprofile,
-%D doendofprofile,
-%D dostartrunprogram,
-%D dostartobject,
-%D dostopobject,
-%D doinsertobject,
-%D doinsertbookmark,
-%D dosetpagetransition}
-%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%
- {\bgroup
- \setPDFdestination{#1}%
- \doifsomething{\PDFdestination}
- {\special
- {\@@insertpostscriptretain
- [/Dest /\PDFdestination\space
- /View [/Fit]
- /DEST
- pdfmark}}%
- \egroup}
-
-\definespecial\dostartgotolocation#1#2#3#4#5#6%
- {\bgroup
- \ScaledPointsToBigPoints{#1}\width
- \ScaledPointsToBigPoints{#2}\height
- \doifelsenothing{#3}
- {\setPDFdestination{#5}%
- \doifsomething{\PDFdestination}
- {\doifelsenothing{#4}
- {\!!doneafalse}
- {\doifparentfileelse{#4}
- {\!!doneafalse}
- {\!!doneatrue}}%
- \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
- /Subtype /Link
- /ANN
- pdfmark}}}
- {\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}
- {\doifnot{0#5}{0}
- {\doifelsenothing{#4}
- {\!!doneafalse}
- {\doifparentfileelse{#4}
- {\!!doneafalse}
- {\!!doneatrue}}%
- \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\dostartgotoJS#1#2#3%
- {\bgroup
- \ifx\doPSsanitizeJScode\undefined \else
- \ScaledPointsToBigPoints{#1}\width
- \ScaledPointsToBigPoints{#2}\height
- \doPSsanitizeJScode{#3}%
- \special
- {\@@insertpostscriptretain
- [/Rect [0 0 \width\space \height]
- /Border [0 0 0]
- /Action << /Subtype /JavaScript /JS (\sanitizedJScode) >>
- /Subtype /Link
- /ANN
- pdfmark}%
- \fi
- \egroup}
-
-\definespecial\doflushJSpreamble#1%
- {\bgroup
- \ifx\doPSsanitizeJScode\undefined \else
- \special
- {\@@insertpostscriptretain
- [ /_objdef{initialize}
- /type /dict
- /OBJ pdfmark}%
- \let\compositeJScode=\empty
- \def\docommando##1%
- {\special
- {\@@insertpostscriptretain
- [ /_objdef{JS:##1} /type /dict /OBJ pdfmark}%
- \expanded{\doPSsanitizeJScode{\getJSpreamble{##1}}}%
- \special
- {\@@insertpostscriptretain
- [ {JS:##1} << /S /JavaScript /JS (\sanitizedJScode) >> /PUT pdfmark}%
- \edef\compositeJScode%
- {\compositeJScode\space (##1) {JS:##1}}}%
- \processcommalist[#1]\docommando
- \special
- {\@@insertpostscriptretain
- [ {initialize} << /JavaScript << /Names [ \compositeJScode ] >> >> /PUT pdfmark
- [ {Catalog} << /Names {initialize} >> /PUT pdfmark}%
- \fi
- \egroup}
-
-\def\PDFexecutestart {/Movie /T (movie \currentmovie) /Operation /Play}
-\def\PDFexecutestop {/Movie /T (movie \currentmovie) /Operation /Stop}
-\def\PDFexecutepause {/Movie /T (movie \currentmovie) /Operation /Pause}
-\def\PDFexecuteresume {/Movie /T (movie \currentmovie) /Operation /Resume}
-
-\def\PDFexecutefirst {/Named /N /First}
-\def\PDFexecuteprevious {/Named /N /Prev}
-\def\PDFexecutenext {/Named /N /Next}
-\def\PDFexecutelast {/Named /N /Last}
-\def\PDFexecutebackward {/Named /N /GoBack}
-\def\PDFexecuteforward {/Named /N /GoForward}
-\def\PDFexecuteprint {/Named /N /Print}
-\def\PDFexecuteexit {/Named /N /Quit}
-\def\PDFexecuteclose {/Named /N /Close}
-\def\PDFexecutesave {/Named /N /Save}
-\def\PDFexecutehelp {/Named /N /HelpUserGuide}
-\def\PDFexecuteswap {/Named /N /FullScreen}
-\def\PDFexecutesearch {/Named /N /Find}
-\def\PDFexecutesearchagain {/Named /N /FindAgain}
-
-\definespecial\dostartexecutecommand#1#2#3#4%
- {\doifdefined{PDFexecute#3}
- {\bgroup
- \ScaledPointsToBigPoints{#1}\width
- \ScaledPointsToBigPoints{#2}\height
- \special
- {\@@insertpostscriptretain
- [/Subtype /Link
- /Action <</Subtype \getvalue{PDFexecute#3}>>
- /Rect [0 0 \width\space \height]
- /Border [0 0 0]
- /ANN
- pdfmark}%
- \egroup}}
-
-\definespecial\dostopexecutecommand%
- {}
-
-\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
- \edef\string{#3}%
- \@EA\beforesplitstring\string\at{ }\to\program
- \@EA\aftersplitstring \string\at{ }\to\parameters
- \special
- {\@@insertpostscriptretain
- [/Action /Launch
- /File (\program)
- /Params (\parameters)
- /Rect [0 0 \width\space \height]
- /Border [0 0 0]
- /Subtype /Link
- /ANN
- pdfmark}%
- \egroup}
-
-\definespecial\dostartgotoprofile#1#2#3%
- {\bgroup
- \doifsomething{#3}
- {\ScaledPointsToBigPoints{#1}\width
- \ScaledPointsToBigPoints{#2}\height
- \special
- {\@@insertpostscriptretain
- [/Action /Article
- /Dest (#3)
- /Rect [0 0 \width\space \height]
- /Border [0 0 0]
- /View [/Fit]
- /Subtype /Link
- /ANN
- pdfmark}}%
- \egroup}
-
-\def\dobeginofprofile#1#2#3#4% label width height page
- {\bgroup
- \doifnot{0#4}{0}
- {\ScaledPointsToBigPoints{#2}\width
- \ScaledPointsToBigPoints{#3}\height
- \doifelsenothing{#1}
- {\!!doneatrue}
- {\!!doneafalse}%
- \special
- {\@@insertpostscriptretain
- [/Title (#1)
- /Rect [0 0 \width\space\height]
- \if!!donea /Page #4 \fi
- /ARTICLE
- pdfmark}}%
- \egroup}
-
-\def\doendofprofile%
- {}
-
-\newcounter\currentmovie
-
-\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}%
- \doglobal\increment\currentmovie
- \special
- {\@@insertpostscriptretain
- [/Type /Annot
- /Subtype /Movie
- /Rect [0 0 \width\space \height]
- /Movie <</T (movie \currentmovie) /F (#1) /Aspect [\width\space \height] \pdf@@posterize>>
- /A <</ShowControls false>>
- /ANN
- pdfmark}%
- \egroup}
-
-\let\doyyinsertmov=\docommoninsertmov
-\let\dotrinsertmov=\docommoninsertmov
-
-\definespecial\dostartobject#1#2#3#4%
- {\bgroup
- \setbox\nextbox=\hbox\bgroup
- \bgroup
- \ScaledPointsToBigPoints{#2}\width
- \ScaledPointsToBigPoints{#3}\height
- \ScaledPointsToBigPoints{#4}\depth
- \escapechar=-1
- \setPDFdestination{#1}%
- \dosetobjectreference{#1}{\PDFdestination}%
- \special
- {\@@insertpostscriptretain
- [/BBox [0 -\depth\space \width\space \height]
- /_objdef {\PDFdestination}
- /BP pdfmark}%
- \egroup}
-
-\definespecial\dostopobject%
- {\special
- {\@@insertpostscriptretain
- [/EP pdfmark}%
- \egroup
- \smashbox\nextbox
- \flushatshipout{\box\nextbox}%
- \egroup}
-
-\definespecial\doinsertobject#1%
- {\hbox
- {\dogetobjectreference{#1}\objectreference
- \ifx\objectreference\empty \else
- \special
- {\@@insertpostscriptretain
- [{\objectreference} /SP pdfmark}%
- \fi}}
-
-\definespecial\doinsertbookmark#1#2#3#4#5% level sublevels text page open (1)
- {\bgroup
- \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}%
- \egroup}
-
-\def\PDFpagesplit {/S /Split }
-\def\PDFpageblinds {/S /Blinds }
-\def\PDFpagebox {/S /Box }
-\def\PDFpagewipe {/S /Wipe }
-\def\PDFpagedissolve {/S /Dissolve }
-\def\PDFpageglitter {/S /Glitter }
-\def\PDFpagereplace {/S /R }
-
-\def\PDFpagehorizontal {/Dm /H }
-\def\PDFpagevertical {/Dm /V }
-\def\PDFpagein {/M /I }
-\def\PDFpageout {/M /O }
-\def\PDFpageeast {/Di 0 }
-\def\PDFpagenorth {/Di 90 }
-\def\PDFpagewest {/Di 180 }
-\def\PDFpagesouth {/Di 270 }
-
-\def\dosetPDFpagetransition#1%
- {\doifdefined{PDFpage#1}
- {\edef\PDFpagetransitions{\PDFpagetransitions\getvalue{PDFpage#1}}}}
-
-\def\dosetpagetransition#1%
- {\let\PDFpagetransitions=\empty
- \processcommalist[#1]\dosetPDFpagetransition
- \expanded{\global\noexpand\pdfpageattr{/Trans <<\PDFpagetransitions>>}}}
-
-\def\pagetransitions % replace not in this list
- {{split,in,vertical},{split,in,horizontal},{split,out,vertical},{split,out,horizontal},
- {blinds,horizontal},{blinds,vertical},
- {box,in},{box,out},
- {wipe,east},{wipe,west},{wipe,north},{wipe,south},
- dissolve,
- {glitter,east},{glitter,south}}
-
-\stopspecials
-
-\protect
-
-\endinput
+%D \module
+%D [ file=spec-pdf,
+%D version=1997.09.20,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Adobe \ACROBAT\ version 2.1,
+%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.
+
+% funny things: mail to yeny: "please geen auto-crlf in special"
+
+\unprotect
+
+%D This driver is build on top of the general \PDF\ macros,
+%D as defined in \type{spec-fdf}, so we inherit that one.
+
+\startspecials[pdf][fdf]
+
+%D \macros
+%D {dosetupinteraction,
+%D doPDFsetopenaction,doPDFsetcloseaction}
+%D
+%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
+%D be put somewhere, e.g.\ in the startup directory of
+%D \DISTILLER. To overcome problems, we always embed the fonts,
+%D 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\dosetupopenaction {\doPDFsetupopenaction}
+\definespecial\dosetupcloseaction{\doPDFsetupcloseaction}
+
+%D \macros
+%D {dostartthisislocation}
+%D
+%D We share a lot of macros with the \PDFTEX\ driver. First
+%D the one that handles named destinations.
+
+\definespecial\dostartthisislocation {\doPDFstartthisislocation}
+
+%D \macros
+%D {doresetgotowhereever,
+%D dostartgotolocation,dostartgotorealpage,dostartgotoJS,
+%D dostartexecutecommand,dostartrunprogram,dostartgotoprofile}
+%D
+%D The next specials are responsible for handling references.
+%D Each goto handler can handle multiple references.
+
+\definespecial\doresetgotowhereever {\doPDFresetgotowhereever}
+\definespecial\dostartgotolocation {\doPDFstartgotolocation}
+\definespecial\dostartgotorealpage {\doPDFstartgotorealpage}
+\definespecial\dostartgotoJS {\doPDFstartgotoJS}
+\definespecial\dostartexecutecommand{\doPDFstartexecutecommand}
+\definespecial\dostartrunprogram {\doPDFstartrunprogram}
+\definespecial\dostartgotoprofile {\doPDFstartgotoprofile}
+
+%D \macros
+%D {doflushJSpreamble}
+%D
+%D Thanks to the fact that \DISTILLER\ cannot handle multiple
+%D names entries in the document catalog, for the moment we
+%D have to misuse the page attributes. Beware, the preambles
+%D must be packed.
+
+\definespecial\doflushJSpreamble#1%
+ {\bgroup
+ \ifoneJSpreamble
+ \edef\sanitizedJScode{\getJSpreamble{#1}}%
+ \expandafter\doPSsanitizeJScode\sanitizedJScode\to\sanitizedJScode
+ \special % nota bene, the page starts at 1
+ {\@@insertpostscriptretain
+ [ /_objdef{JS:#1} /type /dict /OBJ pdfmark
+ [ {JS:#1} << /S /JavaScript /JS (\sanitizedJScode) >> /PUT pdfmark
+ [ {Page1} << /AA << /O {JS:#1} >> >> /PUT pdfmark}%
+ \else % temporary message
+ \writestatus{\m!specials}{Acrobat workaround needed: please pack JS preambles}%
+ \fi
+ \egroup}
+
+%D \macros
+%D {dostarthide,dostophide}
+%D
+%D Hopefully some day hiding navigational things when
+%D printing \PDF\ files will be supported properly.
+
+\definespecial\dostarthide%
+ {\special
+ {\@@insertpostscriptretain
+ [ /DataSource (false \iftrue\string{\else}\fi)
+ /PS
+ pdfmark}}
+
+\definespecial\dostophide%
+ {\special
+ {\@@insertpostscriptretain
+ [ /DataSource (\iffalse{\else\string}\fi if)
+ /PS
+ pdfmark}}
+
+%D \macros
+%D {dosetupscreen,
+%D dosetupidentity}
+%D
+%D We can set up the page dimensions, full screen start up
+%D mode and identify the file with:
+
+\definespecial\dosetupscreen{\doPDFsetupscreen\printpapierhoogte}
+
+\definespecial\dosetupidentity#1#2#3#4#5%
+ {\bgroup
+ \enablePDFdocencoding
+ \special
+ {\@@insertpostscriptretain
+ [ /Title (#1)
+ /Subject (#2)
+ /Author (#3)
+ /Creator (#4)
+ /ModificationDate (#5)
+ /DOCINFO
+ pdfmark}%
+ \egroup}
+
+%D \macros
+%D {dobeginofprofile,doendofprofile}
+%D
+%D Profile support is still far from perfect. This is
+%D especially due to the fact that the specification of
+%D threads are sort of fuzzy and depend on the viewer.
+
+\definespecial\dobeginofprofile#1#2#3#4% label width height page
+ {\bgroup
+ \setPDFdestination{#1}%
+ \doifsomething{\PDFdestination}
+ {\ScaledPointsToBigPoints{#2}\width
+ \ScaledPointsToBigPoints{#3}\height
+ \special
+ {\@@insertpostscriptretain
+ [ /Title (\PDFdestination)
+ /Rect [0 0 \width\space\height]
+ /ARTICLE
+ pdfmark}}%
+ \egroup}
+
+\definespecial\doendofprofile%
+ {}
+
+%D Apart from movies, graphic inclusion is handled in the
+%D \POSTSCRIPT\ drivers. We just link the movie annotation
+%D handled to the file inclusion system.
+
+\def\setcurrentmovie{\xdef\currentmovie}
+
+\definefileinsertion{yy}{mov}{\doPDFinsertmov}
+\definefileinsertion{tr}{mov}{\doPDFinsertmov}
+
+%D \macros
+%D {dostartobject,dostopobject,
+%D doinsertobject}
+%D
+%D Objects, those nice reusable pieces of text and graphics,
+%D are handled by three specials:
+
+\definespecial\dostartobject#1#2#3#4#5%
+ {\bgroup
+ \setbox\nextbox=\hbox\bgroup
+ \bgroup
+ \ScaledPointsToBigPoints{#3}\width
+ \ScaledPointsToBigPoints{#4}\height
+ \ScaledPointsToBigPoints{#5}\depth
+ \dosetobjectreference{#1}{#2}{#1::#2}%
+ \special
+ {\@@insertpostscriptretain
+ [ /BBox [0 -\depth\space \width\space \height]
+ /_objdef {#1::#2}
+ /BP
+ pdfmark}%
+ \egroup}
+
+\definespecial\dostopobject%
+ {\special
+ {\@@insertpostscriptretain
+ [ /EP
+ pdfmark}%
+ \egroup
+ \smashbox\nextbox
+ \flushatshipout{\box\nextbox}%
+ \egroup}
+
+\definespecial\doinsertobject#1#2%
+ {\hbox
+ {\dogetobjectreference{#1}{#2}\PDFobjectreference
+ \ifx\PDFobjectreference\empty \else
+ \special
+ {\@@insertpostscriptretain
+ [ {\PDFobjectreference}
+ /SP
+ pdfmark}%
+ \fi}}
+
+%D \macros
+%D {doinsertbookmark}
+%D
+%D Although personally I never use bookmarks, \CONTEXT\ does
+%D support them, due to user requests.
+
+\definespecial\doinsertbookmark {\doPDFinsertbookmark}
+
+%D \macros
+%D {dosetpagetransition}
+%D
+%D Page transitions, again a user wish, is taken care of by:
+
+\definespecial\dosetpagetransition{\doPDFsetpagetransition}
+
+%D \macros
+%D {doinsertcomment}
+%D
+%D I never needed (and used) one until now, but here is the
+%D text annotation special:
+
+\definespecial\doinsertcomment{\doPDFinsertcomment}
+
+%D \macros
+%D {dopresetlinefield,dopresettextfield,
+%D dopresetchoicefield,dopresetpopupfield,dopresetcombofield,
+%D dopresetpushfield,dopresetcheckfield,
+%D dopresetradiofield,dopresetradiorecord}
+%D
+%D There is nothing enervating to the next few mappings.
+
+\definespecial\dopresetlinefield {\doFDFpresetlinefield}
+\definespecial\dopresettextfield {\doFDFpresettextfield}
+\definespecial\dopresetchoicefield{\doFDFpresetchoicefield}
+\definespecial\dopresetpopupfield {\doFDFpresetpopupfield}
+\definespecial\dopresetcombofield {\doFDFpresetcombofield}
+\definespecial\dopresetpushfield {\doFDFpresetpushfield}
+\definespecial\dopresetcheckfield {\doFDFpresetcheckfield}
+\definespecial\dopresetradiofield {\doFDFpresetradiofield}
+\definespecial\dopresetradiorecord{\doFDFpresetradiorecord}
+
+%D \macros
+%D {dodefinefieldset,dogetfieldset,doiffieldset}
+%D
+%D Field sets, used in resetting and submitting, are handled
+%D by:
+
+\definespecial\dodefinefieldset{\doFDFdefinefieldset}
+\definespecial\dogetfieldset {\doFDFgetfieldset}
+\definespecial\doiffieldset {\doFDFiffieldset}
+
+%D \macros
+%D {doPDFdestination}
+%D
+%D Last we implement the low level pdfmark macros. The
+%D definitions are rather verbose. First the destination
+%D macro.
+
+\def\doPDFdestination name #1%
+ {\special
+ {\@@insertpostscriptretain
+ [ /Dest /#1\space
+ \PDFpageview
+ /DEST
+ pdfmark}}
+
+%D \macros
+%D {doPDFaction,doPDFannotation,doPDFannotationobject,
+%D ifsharePDFactions}
+%D
+%D We have three alternative annotation macros. The first
+%D handles the goto ones, the second takes care of for instance
+%D movies and the third is used in fields.
+
+\newcount\nofPDFsimilar
+
+\newif\ifsharePDFactions \sharePDFactionstrue
+
+% \def\doPDFaction width #1 height #2 action #3%
+% {\bgroup
+% \ScaledPointsToBigPoints{#1}\width
+% \ScaledPointsToBigPoints{#2}\height
+% \ifnum\similarreference=1
+% %\ifsharePDFactions
+% % \global\advance\nofPDFsimilar by 1
+% % \special
+% % {\@@insertpostscriptretain
+% % [ /_objdef {PDF::sim:\the\nofPDFsimilar} /type /dict /OBJ pdfmark
+% % [ {PDF::sim:\the\nofPDFsimilar} << #3 >> /PUT pdfmark}%
+% % \xdef\lastFDFaction{{PDF::sim:\the\nofPDFsimilar}}%
+% %\else
+% \xdef\lastFDFaction{<<#3>>}%
+% %\fi
+% \fi
+% \special
+% {\@@insertpostscriptretain
+% [ \ifcase\similarreference
+% /Action <<#3>>
+% \else
+% /Action \lastFDFaction\space
+% \fi
+% /Rect [0 0 \width\space \height]
+% /Border [0 0 0]
+% /Subtype /Link
+% /ANN
+% pdfmark}%
+% \egroup}
+
+\def\doPDFaction width #1 height #2 action #3%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \ifcase\similarreference\relax
+ \xdef\lastPDFaction{<<#3>>}%
+ \or
+ %\ifsharePDFactions
+ % \global\advance\nofPDFsimilar by 1
+ % \special
+ % {\@@insertpostscriptretain
+ % [ /_objdef {PDF::sim:\the\nofPDFsimilar} /type /dict /OBJ pdfmark
+ % [ {PDF::sim:\the\nofPDFsimilar} << #3 >> /PUT pdfmark}%
+ % \xdef\lastPDFaction{{PDF::sim:\the\nofPDFsimilar}}%
+ %\else
+ \xdef\lastPDFaction{<<#3>>}%
+ %\fi
+ \fi
+ \ifcollectreferenceactions \else
+ \special
+ {\@@insertpostscriptretain
+ [ /Action \lastPDFaction\space
+ /Rect [0 0 \width\space \height]
+ /Border [0 0 0]
+ /Subtype /Link
+ /ANN
+ pdfmark}%
+ \fi
+ \egroup}
+
+\def\doPDFannotation width #1 height #2 data #3%
+ {\bgroup
+ \ScaledPointsToBigPoints{#1}\width
+ \ScaledPointsToBigPoints{#2}\height
+ \special
+ {\@@insertpostscriptretain
+ [ /Rect [0 0 \width\space \height] #3
+ /ANN
+ pdfmark}%
+ \egroup}
+
+\let\doPDFtextannotation=\doPDFannotation
+
+\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5%
+ {\bgroup
+ \ScaledPointsToBigPoints{#3}\width
+ \ScaledPointsToBigPoints{#4}\height
+ \special
+ {\@@insertpostscriptretain
+ [ /_objdef {#1::#2}
+ /Rect [0 0 \width\space \height] #5
+ /ANN
+ pdfmark}%
+ \egroup
+ \dosetobjectreference{#1}{#2}{#1::#2}}
+
+%D \macros
+%D {doPDFdictionaryobject,doPDFarrayobject}
+%D
+%D These two macros are used to build low level objects.
+
+\def\doPDFdictionaryobject class #1 name #2 data #3%
+ {\special
+ {\@@insertpostscriptretain
+ [ /_objdef {#1::#2} /type /dict /OBJ pdfmark
+ [ {#1::#2} << #3 >> /PUT pdfmark}%
+ \dosetobjectreference{#1}{#2}{#1::#2}}
+
+\def\doPDFarrayobject class #1 name #2 data #3%
+ {\special
+ {\@@insertpostscriptretain
+ [ /_objdef {#1::#2} /type /array /OBJ pdfmark
+ [ {#1::#2} 0 [#3] /PUTINTERVAL pdfmark}%
+ \dosetobjectreference{#1}{#2}{#1::#2}}
+
+%D \macros
+%D {doPDFaddtocatalog,doPDFpageattribute,doPDFpagesattribute}
+%D
+%D Next come our housekeeping macros.
+
+\def\doPDFaddtocatalog#1%
+ {\special
+ {\@@insertpostscriptretain
+ [ {Catalog} << #1 >>
+ /PUT
+ pdfmark}}
+
+\def\doPDFpageattribute#1%
+ {\special
+ {\@@insertpostscriptretain
+ [ {ThisPage} #1
+ /PUT
+ pdfmark}}
+
+\def\doPDFpagesattribute#1%
+ {\special
+ {\@@insertpostscriptretain
+ [ #1
+ /PAGES
+ pdfmark}}
+
+\let\doPDFresetpageattributes=\relax
+
+%D \macros
+%D {doPDFbookmark}
+%D
+%D This is how we force bookmarks entries in the file.
+
+\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
+ {\special
+ {\@@insertpostscriptretain
+ [ /Page #4\space
+ \ifcase#2 \else/Count \ifcase#5-\fi#2 \fi
+ \PDFpageview
+ /Title (#3)
+ /OUT
+ pdfmark}}
+
+%D \macros
+%D {defaultobjectreference,doPDFgetobjectreference}
+%D
+%D The object references are \type{{named}}, that is, no hard
+%D coded numbers are needed (opposite to \PDFTEX).
+
+\def\defaultobjectreference#1#2{#1::#2}
+
+\def\doPDFgetobjectreference#1#2#3%
+ {\dogetobjectreference{#1}{#2}#3%
+ \ifx#3\empty\else\edef#3{{#3}}\fi}
+ %\edef#3{\ifx#3\empty null\else{#3}\fi}}
+
+%D Done.
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-ps.tex b/tex/context/base/spec-ps.tex
index 513c4ed02..08e6aa448 100644
--- a/tex/context/base/spec-ps.tex
+++ b/tex/context/base/spec-ps.tex
@@ -1,196 +1,197 @@
-%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,dostoprotation,
-%D dostartscaling,dostopscaling,
-%D dostartmirroring,dostopmirroring,
-%D dostartnegative,dostopnegative,
-%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% straight from the YandY manual
- {\special
- {\@@insertpostscriptliteral
- gsave currentpoint currentpoint translate
- #1 rotate neg exch neg exch translate}}
-
-\definespecial\dostoprotation%
- {\special
- {\@@insertpostscriptliteral
- currentfont currentpoint grestore moveto setfont}}
-
-\definespecial\dostartscaling#1#2% conforming the YandY manual
- {\special
- {\@@insertpostscriptliteral
- gsave currentpoint currentpoint translate
- #1\space #2\space scale neg exch neg exch translate}}
-
-\definespecial\dostopscaling%
- {\special
- {\@@insertpostscriptliteral
- currentfont currentpoint grestore moveto setfont}}
-
-\definespecial\dostartmirroring% some translate and exch stuff from YandY
- {\special
- {\@@insertpostscriptliteral
- gsave currentpoint currentpoint translate
- [-1 0 0 1 0 0] concat neg exch neg exch translate}}
-
-\definespecial\dostopmirroring%
- {\special
- {\@@insertpostscriptliteral
- currentfont currentpoint grestore moveto setfont}}
-
-\definespecial\dostartnegative%
- {\special
- {\@@insertpostscriptliteral
- gsave {1 exch sub} settransfer}}
-
-\definespecial\dostopnegative%
- {\special
- {\@@insertpostscriptliteral
- grestore}}
-
-%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}
-
-\def\dosomeovalbox#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}%
- \setbox0=\hbox
- {\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}}%
- \wd0=#1sp\ht0=#2sp\dp0=#3sp\box0
- \egroup}
-
-%D The indirect call permits a (rather) dirty hack, needed
-%D for \DVIPS\ support.
-
-\definespecial\doovalbox%
- {\dosomeovalbox}
-
-\stopspecials
-
-\endinput
- \ No newline at end of file
+%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,dostoprotation,
+%D dostartscaling,dostopscaling,
+%D dostartmirroring,dostopmirroring,
+%D dostartnegative,dostopnegative,
+%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% straight from the YandY manual
+ {\special
+ {\@@insertpostscriptliteral
+ gsave currentpoint currentpoint translate
+ #1 rotate neg exch neg exch translate}}
+
+\definespecial\dostoprotation%
+ {\special
+ {\@@insertpostscriptliteral
+ currentfont currentpoint grestore moveto setfont}}
+
+\definespecial\dostartscaling#1#2% conforming the YandY manual
+ {\special
+ {\@@insertpostscriptliteral
+ gsave currentpoint currentpoint translate
+ #1\space #2\space scale neg exch neg exch translate}}
+
+\definespecial\dostopscaling%
+ {\special
+ {\@@insertpostscriptliteral
+ currentfont currentpoint grestore moveto setfont}}
+
+\definespecial\dostartmirroring% some translate and exch stuff from YandY
+ {\special
+ {\@@insertpostscriptliteral
+ gsave currentpoint currentpoint translate
+ [-1 0 0 1 0 0] concat neg exch neg exch translate}}
+
+\definespecial\dostopmirroring%
+ {\special
+ {\@@insertpostscriptliteral
+ currentfont currentpoint grestore moveto setfont}}
+
+\definespecial\dostartnegative%
+ {\special
+ {\@@insertpostscriptliteral
+ gsave {1 exch sub} settransfer}}
+
+\definespecial\dostopnegative%
+ {\special
+ {\@@insertpostscriptliteral
+ grestore}}
+
+%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}
+
+\def\dosomeovalbox#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}%
+ \setbox0=\hbox
+ {\ifnum\dostroke\dofill>0
+ \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}%
+ \fi}%
+ \wd0=#1sp\ht0=#2sp\dp0=#3sp\box0
+ \egroup}
+
+%D The indirect call permits a (rather) dirty hack, needed
+%D for \DVIPS\ support.
+
+\definespecial\doovalbox%
+ {\dosomeovalbox}
+
+\stopspecials
+
+\endinput
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index bab5561ee..e54b6aee2 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -1,670 +1,661 @@
-%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.
-
-% /Border -> /B, evt meer indirecte objecten!
-
-%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\pdftexversion\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
-%\pdfthreadhoffset=\maxdimen
-%\pdfthreadvoffset=\maxdimen
-
-%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.
-
-\newcounter\currentmovie
-
-\def\dotpdinsertmov#1#2#3#4#5#6#7#8%
- {\bgroup
- \ScaledPointsToBigPoints{#6}\width
- \ScaledPointsToBigPoints{#7}\height
- \edef\pdf@@posterize{\ifcase#8 \or/Poster true\fi}%
- \doglobal\increment\currentmovie
- \pdfannot
- width #6sp
- height -#7sp
- depth 0pt
- {/Border [0 0 0]
- /Subtype /Movie
- /Movie <</T (movie \currentmovie) /F (#1) /Aspect [\width\space \height\space] \pdf@@posterize>>
- /A <</ShowControls false>>}%
- \egroup}
-
-%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}%
- \setbox0=\hbox
- {\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}}%
- \wd0=#1sp\ht0=#2sp\dp0=#3sp\box0
- \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 {dostartscaling,dostopscaling}
-%D
-%D Scaling is rather straightforward:
-
-\definespecial\dostartscaling#1#2%
- {\pdfliteral{q #1\space 0 0 #2\space 0 0 cm}}
-
-\definespecial\dostopscaling%
- {\pdfliteral{Q}}
-
-%D \macros
-%D {dostartmirroring,dostopmirroring}
-%D
-%D Mirroring is implemented in a similar way:
-
-\definespecial\dostartmirroring%
- {\pdfliteral{-1 0 0 1 0 0 cm}}
-
-\definespecial\dostopmirroring%
- {\pdfliteral{-1 0 0 1 0 0 cm}}
-
-%D \macros
-%D {dostartnegative,dostopnegative}
-%D
-%D When producng output for an image setter, sometimes
-%D negative output is needed.
-
-\definespecial\dostartnegative%
- {\writestatus{system}{negative not yet supported}}
-
-\definespecial\dostopnegative%
- {}
-
-%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,dostartgotoJS}
-%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%
- {}
-
-\definespecial\dostartthisislocation#1%
- {\bgroup
- \setPDFdestination{#1}%
- \doifsomething{\PDFdestination}
- {\pdfdest name {\PDFdestination} fit}%
- \egroup}
-
-%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}
- {\setPDFdestination{#5}%
- \doifsomething{\PDFdestination}
- {\doifelsenothing{#4}
- {\!!doneafalse}
- {\doifparentfileelse{#4}
- {\!!doneafalse}
- {\!!doneatrue}}%
- \pdfannotlink
- width #1sp
- height #2sp
- depth 0pt
- attr {/Border [0 0 0]}
- goto \if!!donea file {#4.pdf} \fi name {\PDFdestination}%
- \pdfendlink}}
- {\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
- user {/Subtype /Link
- /Border [0 0 0]
- /A << /Type /Action
- /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 {/Fit}%
- \pdfendlink}
- {\doifelsenothing{#4}
- {\let\PDFfile=\empty}
- {\edef\PDFfile{/#4}}%
- \pdfannotlink
- width #1sp
- height #2sp
- depth 0pt
- user {/Subtype /Link
- /Border [0 0 0]
- /A << /Type /Action
- /S /URI
- /URI (#3\PDFfile)>>}%
- \pdfendlink}%
- \egroup}
-
-\definespecial\dostartgotoJS#1#2#3%
- {\bgroup
- \ifx\doPSsanitizeJScode\undefined \else
- \doPSsanitizeJScode{#3}%
- \pdfannotlink
- width #1sp
- height #2sp
- depth 0pt
- user {/Subtype /Link
- /Border [0 0 0]
- /A << /Type /Action
- /S /JavaScript
- /JS (\sanitizedJScode) >>}%
- \pdfendlink
- \fi
- \egroup}
-
-%D {\em Tijdelijk hier!}
-
-\definespecial\doflushJSpreamble#1%
- {\bgroup
- \ifx\doPSsanitizeJScode\undefined \else
- \let\compositeJScode=\empty
- \def\docommando##1%
- {\expanded{\doPSsanitizeJScode{\getJSpreamble{##1}}}%
- \pdfobj{<< /S /JavaScript /JS (\sanitizedJScode) >>}%
- \edef\compositeJScode%
- {\compositeJScode\space (##1) \the\pdflastobj\space 0 R}}%
- \processcommalist[#1]\docommando
- \pdfobj{<< /JavaScript << /Names [ \compositeJScode ] >> >>}%
- \pdfcatalog{/Names \the\pdflastobj\space 0 R}%
- \fi
- \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%
- \pdfcatalog{} openaction goto page 1 {/Fit}%
- \else
- \pdfcatalog{/PageMode /FullScreen} openaction goto page 1 {/Fit}%
- \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.
-
-\def\PDFexecutestart {/Movie /T (movie \currentmovie) /Operation /Play}
-\def\PDFexecutestop {/Movie /T (movie \currentmovie) /Operation /Stop}
-\def\PDFexecutepause {/Movie /T (movie \currentmovie) /Operation /Pause}
-\def\PDFexecuteresume {/Movie /T (movie \currentmovie) /Operation /Resume}
-
-\def\PDFexecutefirst {/Named /N /First}
-\def\PDFexecuteprevious {/Named /N /Prev}
-\def\PDFexecutenext {/Named /N /Next}
-\def\PDFexecutelast {/Named /N /Last}
-\def\PDFexecutebackward {/Named /N /GoBack}
-\def\PDFexecuteforward {/Named /N /GoForward}
-\def\PDFexecuteprint {/Named /N /Print}
-\def\PDFexecuteexit {/Named /N /Quit}
-\def\PDFexecuteclose {/Named /N /Close}
-\def\PDFexecutesave {/Named /N /Save}
-\def\PDFexecutehelp {/Named /N /HelpUserGuide}
-\def\PDFexecuteswap {/Named /N /FullScreen}
-\def\PDFexecutesearch {/Named /N /Find}
-\def\PDFexecutesearchagain {/Named /N /FindAgain}
-
-\definespecial\dostartexecutecommand#1#2#3#4%
- {\doifdefined{PDFexecute#3}
- {\bgroup
- \ScaledPointsToBigPoints{#1}\width
- \ScaledPointsToBigPoints{#2}\height
- \pdfannotlink
- width #1sp
- height #2sp
- depth 0pt
- user {/Subtype /Link
- /A <</S \getvalue{PDFexecute#3}>>
- /Border [0 0 0]}%
- \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)
- /Creator (#4)
- /Producer (pdfTeX)}}
-
-%D \macros
-%D {dostartrunprogam}
-%D
-%D Although possible, running applications is not yet
-%D implemented here.
-
-\definespecial\dostartrunprogram#1#2#3%
- {\bgroup
- \edef\string{#3}%
- \@EA\beforesplitstring\string\at{ }\to\program
- \@EA\aftersplitstring \string\at{ }\to\parameters
- \pdfannotlink
- width #1sp
- height #2sp
- depth 0pt
- user {/Subtype /Link
- /A <</S /Launch /F (\program) /P (\parameters)>>
- /Border [0 0 0]}%
- \pdfendlink
- \egroup}
-
-%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#4%
- {\doifsomething{#1}
- {\pdfthread name {#1}}}
-
-\definespecial\doendofprofile%
- {\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)
- {\bgroup
- \sanitizePDFstring#3\to\bookmarktext
- \pdfoutline
- goto page #4\space
- \ifnum#2>0 count \ifcase#5-\fi#2\fi\space
- {\bookmarktext}%
- \egroup}
-
-%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%
- {\bgroup
- \setbox\nextbox=\vbox\bgroup
- \def\dodostopobject%
- {\egroup
- \pdfform\nextbox
- \scratchcounter=\pdflastform
- \dosetobjectreference{#1}{\the\pdflastform}}}%
-
-\definespecial\dostopobject%
- {\dodostopobject
- \egroup}
-
-\definespecial\doinsertobject#1%
- {\bgroup
- \dogetobjectreference{#1}\objectreference
- \pdfrefform\objectreference
- \egroup}
-
-%D \macros
-%D {dosetpagetransitions}
-%D
-%D Page transitions only make sence in presentations. They are
-%D passed as raw \PDF\ code to the page object. This
-%D implementation looks much like the one in \type{spec-pdf}.
-
-\def\PDFpagesplit {/S /Split }
-\def\PDFpageblinds {/S /Blinds }
-\def\PDFpagebox {/S /Box }
-\def\PDFpagewipe {/S /Wipe }
-\def\PDFpagedissolve {/S /Dissolve }
-\def\PDFpageglitter {/S /Glitter }
-\def\PDFpagereplace {/S /R }
-
-\def\PDFpagehorizontal {/Dm /H }
-\def\PDFpagevertical {/Dm /V }
-\def\PDFpagein {/M /I }
-\def\PDFpageout {/M /O }
-\def\PDFpageeast {/Di 0 }
-\def\PDFpagenorth {/Di 90 }
-\def\PDFpagewest {/Di 180 }
-\def\PDFpagesouth {/Di 270 }
-
-\def\dosetPDFpagetransition#1%
- {\doifdefined{PDFpage#1}
- {\edef\PDFpagetransitions{\PDFpagetransitions\getvalue{PDFpage#1}}}}
-
-\def\dosetpagetransition#1%
- {\let\PDFpagetransitions=\empty
- \processcommalist[#1]\dosetPDFpagetransition
- \expanded{\global\noexpand\pdfpageattr{/Trans <<\PDFpagetransitions>>}}}
-
-\def\pagetransitions % replace not in this list
- {{split,in,vertical},{split,in,horizontal},{split,out,vertical},{split,out,horizontal},
- {blinds,horizontal},{blinds,vertical},
- {box,in},{box,out},
- {wipe,east},{wipe,west},{wipe,north},{wipe,south},
- dissolve,
- {glitter,east},{glitter,south}}
-
-%D The expansion is needed because else the \type{\pdfpageattr}
-%D token list flushes an unexpanded \type{\csname}. The
-%D \type{\global} is needed because the assignment can take
-%D place deeply buried (for instance in the \type{\shipout}
-%D box.
-
-\stopspecials
-
-\protect
-
-\endinput
+%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.
+
+% funny things: negative height by \pdfannot
+% immediate versus deferred
+
+%D \macros
+%D {jobsuffix}
+%D
+%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 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.
+%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\pdftexversion\undefined \endinput \else \unprotect \fi
+
+%D For the time being \type {\pdfimage} is redefined in
+%D versions older than 12s. In the new syntax, the filename
+%D is surrounded by braces.
+
+\ifnum\pdftexversion<13
+ \let\normalpdfimage\pdfimage
+ \def\grabpdfimage#1#2{\normalpdfimage#1 #2\relax}
+ \def\pdfimage#1#{\grabpdfimage{#1}}
+\fi
+
+%D We default to 300 dots per inch image resolution.
+
+\ifx\pdfimageresolution\undefined % < version 14
+ \newcount\pdfimageresolution
+\fi
+
+\pdfimageresolution=300
+
+%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. We also have to
+%D make sure no other specials are supported, else \PDFTEX\
+%D will keep on telling us that we're wrong. We also load the
+%D general \PDF\ macros that are shared between this driver and
+%D the \ACROBAT\ one.
+
+\startspecials[tpd][reset,fdf]
+
+%D This means that by saying
+%D
+%D \starttypen
+%D \usespecials[tpd]
+%D \stoptypen
+%D
+%D we get ourselves full \PDF\ output.
+
+%D For some internal testing we need to know the output
+%D suffix.
+
+\def\jobsuffix{pdf}
+
+%D We don't use specials here, which means that we must flush
+%D settings before the page is shipped out.
+
+\specialbasedsettingsfalse
+
+%D Some more internal settings.
+
+\appendtoks \pdfoutput=0 \to \everyresetspecials
+
+\pdfoutput =1 % we reset that one with \everyresetspecials
+\pdfcompresslevel=9 % apart from debugging, no reason for value 0
+
+% \pdfthreadhoffset=\maxdimen
+% \pdfthreadvoffset=\maxdimen
+
+%D Just in case we mimmick specials, we have to make sure no
+%D default specials end up in the process.
+
+\let\defaultspecial=\gobbleoneargument
+
+\appendtoks \let\defaultspecial\normalspecial \to \everyresetspecials
+
+\let\PDFcode=\pdfliteral
+
+%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:
+
+\definespecial\dosetuppaper#1#2#3%
+ {\global\pdfpagewidth =#2\relax
+ \global\pdfpageheight=#3\relax}
+
+%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 Currently we support \type{pdf} for \PDF\ files, \type{mps}
+%D for \METAPOST\ graphics, \type{png} and \type{jpg} for
+%D bitmap graphics.
+
+\definefileinsertion{tpd}{mps}#1#2#3#4#5#6#7#8#9%
+ {\hbox
+ {\convertMPcolors{#1}%
+ \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\xscale
+ \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale
+ \convertMPtoPDF{#1}\xscale\yscale}}
+
+%D The old, \TEX\ base \PDF\ insertion macro:
+%D
+%D \starttypen
+%D \def\dotpdinsertpdf#1#2#3#4#5#6#7#8#9%
+%D {\beforesplitstring#1\at.\to\filename
+%D \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\xscale
+%D \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale
+%D \convertPDFtoPDF{\filename.pdf}\xscale\yscale{#5sp}{#6sp}{#7sp}{#8sp}}
+%D \stoptypen
+%D
+%D superseded by
+
+\definefileinsertion{tpd}{pdf}{\dopdfimage}
+\definefileinsertion{tpd}{png}{\dopdfimage}
+\definefileinsertion{tpd}{jpg}{\dopdfimage}
+% \definefileinsertion{tpd}{tif}{\dopdfimage} % unstable
+
+%D The main file insertion macro is as follows. Because
+%D \PDFTEX\ does not support arbitrary suffixes, we double
+%D check on a user supplied filename, because \PDFTEX\ chokes
+%D on unknown suffixes.
+
+\def\doifvalidpdfimagefileelse#1%
+ {\edef\filesuffix{#1}%
+ \doloop
+ {\@EA\aftersplitstring\filesuffix\at.\to\temp
+ \ifx\temp\empty
+ \exitloop
+ \else
+ \let\filesuffix\temp
+ \fi}%
+ \doiffileinsertionsupportedelse{\filesuffix}}
+
+\def\dopdfimage#1#2#3#4#5#6#7#8#9%
+ {\doiffileelse{#1}
+ {\bgroup
+ \doifvalidpdfimagefileelse{#1}
+ {\pdfimage
+ \ifcase#7 \else \!!width #7sp\fi
+ \ifcase#8 \else \!!height #8sp\fi
+ {#1}}
+ {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}%
+ \egroup}
+ {\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}}
+
+%D As we will see now, \PDFTEX\ not only directly supports
+%D \type{mps}, \type{png}, \type{pdf}, \type{jpg} but also
+%D \type{mov}. In \CONTEXT\ we support movie inserts in a way
+%D similar to figure inclusion. The next macro calls the
+%D general \PDF\ one.
+
+\def\setcurrentmovie#1%
+ {\doglobal\increment\currentmovie}
+
+\definefileinsertion{tpd}{mov}{\doPDFinsertmov}
+
+%D \macros
+%D {measureTPDfiguresizetrue}
+%D
+%D Because \PDFTEX\ measures the figure itself, we can use
+%D this feature to bypass the normal prescan. Watch the
+%D double check on the suffix. Else \PDFTEX\ would choke.
+
+\newif\ifmeasureTPDfiguresize \measureTPDfiguresizetrue
+
+\def\dogetTPDfiguresize#1#2#3#4#5#6%
+ {\ifmeasureTPDfiguresize
+ #3=\!!zeropoint
+ #4=\!!zeropoint
+ \doifvalidpdfimagefileelse{#2}
+ {\global\setbox\foundexternalfigure=\vbox{\pdfimage{#2}}%
+ #5=\wd\foundexternalfigure
+ #6=\ht\foundexternalfigure}
+ {#5=\!!zeropoint
+ #6=\!!zeropoint}%
+ \else
+ #1{#2}{#3}{#4}{#5}{#6}% \normaldogetfiguresize...
+ \fi}
+
+\let\normaldogetfiguresizepdf=\dogetfiguresizepdf
+\let\normaldogetfiguresizepng=\dogetfiguresizepng
+\let\normaldogetfiguresizetif=\dogetfiguresizetif
+\let\normaldogetfiguresizejpg=\dogetfiguresizejpg
+
+\def\dogetfiguresizepdf{\dogetTPDfiguresize\normaldogetfiguresizepdf}
+\def\dogetfiguresizepng{\dogetTPDfiguresize\normaldogetfiguresizepng}
+\def\dogetfiguresizetif{\dogetTPDfiguresize\normaldogetfiguresizetif}
+\def\dogetfiguresizejpg{\dogetTPDfiguresize\normaldogetfiguresizejpg}
+
+%D \macros
+%D {doovalbox}
+%D
+%D Drawing frames with round corners is inherited from the
+%D main module.
+
+\definespecial\doovalbox%
+ {\doPDFovalbox}
+
+%D \macros
+%D {dostartgraymode,dostopgraymode,
+%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,
+%D dostopcolormode,
+%D dostartrotation,dostoprotation,
+%D dostartscaling,dostopscaling,
+%D dostartmirroring,dostopmirroring,
+%D dostartnegative,dostopnegative}
+%D
+%D These are implemented in the main \PDF\ module.
+
+\definespecial\dostartgraymode {\doPDFstartgraymode}
+\definespecial\dostopgraymode {\doPDFstopgraymode}
+\definespecial\dostartrgbcolormode {\doPDFstartrgbcolormode}
+\definespecial\dostartcmykcolormode {\doPDFstartcmykcolormode}
+\definespecial\dostartgraycolormode {\doPDFstartgraycolormode}
+\definespecial\dostopcolormode {\doPDFstopcolormode}
+\definespecial\dostartrotation {\doPDFstartrotation}
+\definespecial\dostoprotation {\doPDFstoprotation}
+\definespecial\dostartscaling {\doPDFstartscaling}
+\definespecial\dostopscaling {\doPDFstopscaling}
+\definespecial\dostartmirroring {\doPDFstartmirroring}
+\definespecial\dostopmirroring {\doPDFstopmirroring}
+\definespecial\dostartnegative {\doPDFstartnegative}
+\definespecial\dostopnegative {\doPDFstopnegative}
+
+%D \macros
+%D {dosetupinteraction,
+%D dosetupopenaction,dosetupcloseaction}
+%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}}
+
+\definespecial\dosetupopenaction {\doPDFsetupopenaction}
+\definespecial\dosetupcloseaction{\doPDFsetupcloseaction}
+
+%D \macros
+%D {doresetgotowhereever,
+%D dostartthisisrealpage,dostartthisislocation,
+%D dostartgotorealpage,dostartgotolocation,dostartgotoJS}
+%D
+%D The interactions macros are the core of this module. We
+%D support both page destinations and named ones. We don't
+%D need the \type{\stop}||alternatives. We also don't need
+%D to set the special that sets the real page number.
+
+\definespecial\doresetgotowhereever {\doPDFresetgotowhereever}
+\definespecial\dostartthisislocation{\doPDFstartthisislocation}
+
+%D When going to a location, we obey the time and space saving
+%D boolean \type{\ifusepagedestination}. Named destinations are
+%D stripped and made robust. This all happens in the macros
+%D called for.
+
+\definespecial\dostartgotolocation{\doPDFstartgotolocation}
+\definespecial\dostartgotorealpage{\doPDFstartgotorealpage}
+\definespecial\dostartgotoJS {\doPDFstartgotoJS}
+
+%D \macros
+%D {doflushJSpreamble}
+%D
+%D It does not make sense to duplicate common \JAVASCRIPT\
+%D functions, and therefore they can be predefined and must be
+%D output separately. Currently this special is not shared
+%D with the \ACROBAT\ one, simply because \DISTILLER\ does not
+%D yet support something \type{\pdfnames}.
+
+% \oneJSpreamblefalse % buggy in acrobat
+
+\definespecial\doflushJSpreamble#1%
+ {\bgroup
+ \let\compositeJScode=\empty
+ \def\docommando##1%
+ {\edef\sanitizedJScode{\getJSpreamble{##1}}%
+ \@EA\doPSsanitizeJScode\sanitizedJScode\to\sanitizedJScode
+ \pdfobj {<< /S /JavaScript /JS (\sanitizedJScode) >>}%
+ \edef\compositeJScode%
+ {\compositeJScode\space (##1) \the\pdflastobj\space 0 R}}%
+ \processcommalist[#1]\docommando
+ \pdfobj{<< /Names [ \compositeJScode ] >>}%
+ \pdfnames{/JavaScript \the\pdflastobj\space 0 R}%
+ \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. Because \PDFTEX\ and
+%D \ACROBAT\ handle setting the page dimensions in a
+%D different way, we do not share this special.
+
+\definespecial\dosetupscreen{\doPDFsetupscreen\pdfpageheight}
+
+%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{\doPDFstartexecutecommand}
+
+%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%
+ {\bgroup
+ \enablePDFdocencoding
+ \pdfinfo
+ {/Title (#1)
+ /Subject (#2)
+ /Author (#3)
+ /Creator (#4)
+ /Producer (pdfTeX)}%
+ \egroup}
+
+%D \macros
+%D {dostartrunprogam}
+%D
+%D We can run a program form within a document, although this
+%D feature is rather weak, due to path problems and buggy
+%D argument passing.
+
+\definespecial\dostartrunprogram{\doPDFstartrunprogram}
+
+%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{\doPDFstartgotoprofile}
+
+%D Some day, I'll reimplement threading in a useful way.
+%D Currently the viewers handle threads rather diffuse.
+
+\definespecial\dobeginofprofile#1#2#3#4%
+ {\setPDFdestination{#1}%
+ \doifsomething{\PDFdestination}
+ {\pdfthread name {\PDFdestination}}}
+
+\definespecial\doendofprofile%
+ {\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. Look at the macro called for
+%D to see how funny these bookmarks are defined.
+
+\definespecial\doinsertbookmark{\doPDFinsertbookmark}
+
+%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#5%
+ {\bgroup
+ \setbox\nextbox=\vbox\bgroup
+ \def\dodostopobject%
+ {\egroup
+ %\immediate
+ \pdfform\nextbox
+ \dosetobjectreference{#1}{#2}{\the\pdflastform}}}%
+
+\definespecial\dostopobject%
+ {\dodostopobject
+ \egroup}
+
+\definespecial\doinsertobject#1#2%
+ {\bgroup
+ \dogetobjectreference{#1}{#2}\PDFobjectreference
+ \pdfrefform\PDFobjectreference
+ \egroup}
+
+%D \macros
+%D {dosetpagetransition}
+%D
+%D Page transitions only make sence in presentations. They are
+%D passed as raw \PDF\ code to the page object. Take a look
+%D at the implementation to get an impression of the rubish
+%D passed on.
+
+\definespecial\dosetpagetransition{\doPDFsetpagetransition}
+
+%D The expansion is needed because else the \type{\pdfpageattr}
+%D token list flushes an unexpanded \type{\csname}. The
+%D \type{\global} is needed because the assignment can take
+%D place deeply buried (for instance in the \type{\shipout}
+%D box.
+
+%D \macros
+%D {doinsertcomment}
+%D
+%D Text annotation, or comments, are provided too:
+
+\definespecial\doinsertcomment{\doPDFinsertcomment}
+
+%D \macros
+%D {dopresetlinefield,dopresettextfield,
+%D dopresetchoicefield,dopresetpopupfield,dopresetcombofield,
+%D dopresetpushfield,dopresetcheckfield,
+%D dopresetradiofield,dopresetradiorecord}
+%D
+%D \PDF\ offers extensive field support. The next bunch of
+%D definitions map the specials.
+
+\definespecial\dopresetlinefield {\doFDFpresetlinefield}
+\definespecial\dopresettextfield {\doFDFpresettextfield}
+\definespecial\dopresetchoicefield{\doFDFpresetchoicefield}
+\definespecial\dopresetpopupfield {\doFDFpresetpopupfield}
+\definespecial\dopresetcombofield {\doFDFpresetcombofield}
+\definespecial\dopresetpushfield {\doFDFpresetpushfield}
+\definespecial\dopresetcheckfield {\doFDFpresetcheckfield}
+\definespecial\dopresetradiofield {\doFDFpresetradiofield}
+\definespecial\dopresetradiorecord{\doFDFpresetradiorecord}
+
+%D \macros
+%D {dodefinefieldset,dogetfieldset,doiffieldset}
+%D
+%D Field sets, needed for reset and submit handling, are
+%D taken care of by:
+
+\definespecial\dodefinefieldset{\doFDFdefinefieldset}
+\definespecial\dogetfieldset {\doFDFgetfieldset}
+\definespecial\doiffieldset {\doFDFiffieldset}
+
+%D \macros
+%D {doPDFdestination}
+%D
+%D Finally we implement some low level macros to deal with
+%D flushing \PDF\ code. First we handle the named destinations.
+
+\def\doPDFdestination name #1%
+ {\pdfdest name {#1}\PDFpageviewkey}
+
+%D \macros
+%D {doPDFaction,doPDFannotation,doPDFtextannotation,
+%D ifsharePDFactions}
+%D
+%D Next we handle annotations. All link annotations are
+%D implemented using the action dictionary. This enables us to
+%D use multiple actions. The second macro is for instance
+%D used for movie inclusion.
+
+\newif\ifsharePDFactions \sharePDFactionstrue
+
+% \def\doPDFaction width #1 height #2 action #3%
+% {\ifnum\similarreference=1
+% \ifsharePDFactions
+% \pdfobj{<<#3>>}\xdef\ lastPDFaction{\the\pdflastobj\space0 R}%
+% \else
+% \xdef\lastPDFaction{<<#3>>}%
+% \fi
+% \fi
+% \pdfannotlink
+% width #1sp height #2sp depth 0sp
+% user {/Subtype /Link
+% /Border [0 0 0]
+% /A \ifcase\similarreference<<#3>>\else\lastPDFaction\fi}%
+% \pdfendlink}
+
+\def\doPDFaction width #1 height #2 action #3%
+ {\ifcase\similarreference\relax
+ \xdef\lastPDFaction{<<#3>>}%
+ \or
+ \ifsharePDFactions
+ \pdfobj{<<#3>>}\xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \else
+ \xdef\lastPDFaction{<<#3>>}%
+ \fi
+ \fi
+ \ifcollectreferenceactions \else
+ \pdfannotlink
+ width #1sp height #2sp depth 0sp
+ user {/Subtype /Link
+ /Border [0 0 0]
+ /A \lastPDFaction}%
+ \pdfendlink
+ \fi}
+
+\def\doPDFannotation width #1 height #2 data #3%
+ {\pdfannot width #1sp height -#2sp depth 0sp {#3}}
+
+\def\doPDFtextannotation width #1 height #2 data #3%
+ {\pdfannot width #1sp height #2sp depth 0sp {#3}}
+
+%D \macros
+%D {doPDFannotationobject}
+%D
+%D For field support we need annotation objects. Although in
+%D many cases we can do without indirect references (and use
+%D the last annotation object number directly), we take the
+%D save route.
+
+\def\doPDFannotationobject class #1 name #2 width #3 height #4 data #5%
+ {\pdfannot width #3sp height -#4sp depth 0sp {#5}%
+ \dosetobjectreference{#1}{#2}{\the\pdflastannot}}
+
+%D \macros
+%D {doPDFaddtocatalog,doPDFpageattribute,doPDFpagesattribute}
+%D
+%D Next some simple ones. Watch the global directive and the
+%D expansion in the page attribute macro.
+
+\def\doPDFaddtocatalog%
+ {\pdfcatalog}
+
+\def\doPDFpageattribute#1%
+ {\expanded{\global\pdfpageattr{\the\pdfpageattr#1}}}
+
+\def\doPDFpagesattribute#1%
+ {\expanded{\global\pdfpagesattr{\the\pdfpagesattr#1}}}
+
+\def\doPDFresetattributes%
+ {\global\pdfpageattr{}%
+ \global\pdfpagesattr{}}
+
+\appendtoks\doPDFresetattributes\to\everyaftershipout
+
+%D \macros
+%D {doPDFbookmark}
+%D
+%D Well, isn't the next one ugly? Thanks to the \PDF\
+%D standard.
+
+% obsolete cq. buggy in pdfTeX
+%
+% \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
+% {\pdfoutline
+% goto page #4\space
+% \ifcase#2 \else count \ifcase#5-\fi#2 \fi
+% {#3}}
+
+\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5%
+ {\pdfoutline
+ user {<</S /GoTo /D [#4\PDFpageviewwrd]>>}%
+ \ifcase#2 \else count \ifcase#5-\fi#2 \fi
+ {#3}}
+
+%D \macros
+%D {doPDFdictionaryobject,doPDFarrayobject}
+%D
+%D Where \PDFTEX\ has only one object primitive, optionally a
+%D stream one, \ACROBAT\ has several operators.
+
+\def\doPDFdictionaryobject class #1 name #2 data #3%
+ {\flushatshipout
+ {\pdfobj{<< #3 >>}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
+
+\def\doPDFarrayobject class #1 name #2 data #3%
+ {\flushatshipout
+ {\pdfobj{[ #3 ]}\dosetobjectreference{#1}{#2}{\the\pdflastobj}}}
+
+%D \macros
+%D {defaultobjectreference,doPDFgetobjectreference}
+%D
+%D Because in \PDFTEX\ we have to construct the object
+%D references \type{N 0 R}, we can default to the non existing
+%D zero object number.
+
+\def\defaultobjectreference#1#2%
+ {0}
+
+\def\doPDFgetobjectreference#1#2#3%
+ {\dogetobjectreference{#1}{#2}#3%
+ \edef#3{\ifx#3\empty null\else#3\space0 R\fi}}
+
+%D Now we can finish this module.
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-tr.tex b/tex/context/base/spec-tr.tex
index d8400786d..ed997545f 100644
--- a/tex/context/base/spec-tr.tex
+++ b/tex/context/base/spec-tr.tex
@@ -1,82 +1,101 @@
-%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 Especially the rotation proved to be incompatible with
-%D the default \POSTSCRIPT\ special driver. Many thanks to
-%D Gilbert van den Dobbelsteen for testing and hacking the
-%D \DVIPS\ source and pinpointing the problem.
-
-%D \macros
-%D {doinsertfile}
-%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}
-
-%D \macros
-%D {dostartrotation}
-%D
-%D Because \DVIPS\ uses a reverse rotation scheme, we have
-%D to add an extra \type{neg} to the default \POSTSCRIPT\
-%D rotation definition:
-
-\definespecial\dostartrotation#1% straight from the YandY manual / 1st neg added
- {\special
- {\@@insertpostscriptliteral
- gsave currentpoint currentpoint translate
- #1 neg rotate neg exch neg exch translate}}
-
-\definespecial\dostoprotation%
- {\special
- {\@@insertpostscriptliteral
- currentfont currentpoint grestore moveto setfont}}
-
-%D Drawing ovals in \DVIPS\ is complicated by the fact that
-%D the colors get reset. Therefore we need a more literal
-%D approach and therefore scale to local units. By redefining
-%D the retain constant into a macro, we can use the already
-%D present \POSTSCRIPT\ definition (see \type{spec-ps}).
-
-\definespecial\doovalbox#1#2#3#4#5#6#7%
- {\bgroup
- \edef\@@insertpostscriptretain gsave%
- {\@@insertpostscriptliteral
- gsave
- Resolution 72 div
- VResolution 72 div neg scale currentpoint translate}%
- \dosomeovalbox{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
- \egroup}
-
-\stopspecials
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=spec-tr,
+%D version=1996.01.25,
+%D title=\CONTEXT\ Special Macros,
+%D subtitle=Thomas Rokicki'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 Especially the rotation proved to be incompatible with
+%D the default \POSTSCRIPT\ special driver. Many thanks to
+%D Gilbert van den Dobbelsteen for testing and hacking the
+%D \DVIPS\ source and pinpointing the problem.
+
+%D \macros
+%D {doinsertfile}
+%D
+%D We overrule the figure||insertion special. Things should
+%D be more accurate, but maybe someday \onbekend
+
+\startspecials[rokicki]
+
+\def\@@insertpostscriptliteral {ps: }
+\def\@@insertpostscriptretain {" }
+
+%\definefileinsertion{tr}{eps}#1#2#3#4#5#6#7#8#9%
+% {\ScaledPointsToBigPoints{#5}\width
+% \ScaledPointsToBigPoints{#6}\height
+% \special
+% {psfile=#1
+% hscale=#3\space
+% vscale=#4\space
+% hoffset=\width\space
+% voffset=\height}}
+
+%D Ugly but useful:
+
+\definefileinsertion{tr}{eps}#1#2#3#4#5#6#7#8#9%
+ {\ScaledPointsToWholeBigPoints{#7}\width
+ \ScaledPointsToWholeBigPoints{#8}\height
+ \special
+ {PSfile="#1"\space
+ llx=\EPSllx\space
+ lly=\EPSlly\space
+ urx=\EPSurx\space
+ ury=\EPSury\space
+ rwi=\width0\space
+ rhi=\height0}}
+
+\definefileinsertion{tr}{mps}#1#2#3#4#5#6#7#8#9%
+ {\hbox
+ {\includeMPfonts{#1}%
+ \convertMPcolors{#1}%
+ \dofileinsertion{tr}{eps}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}}
+
+\definespecial\doinsertfile#1#2#3#4#5#6#7#8#9%
+ {\bgroup
+ \dodoinsertfile{tr}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
+ \egroup}
+
+%D \macros
+%D {dostartrotation}
+%D
+%D Because \DVIPS\ uses a reverse rotation scheme, we have
+%D to add an extra \type{neg} to the default \POSTSCRIPT\
+%D rotation definition:
+
+\definespecial\dostartrotation#1% straight from the YandY manual / 1st neg added
+ {\special
+ {\@@insertpostscriptliteral
+ gsave currentpoint currentpoint translate
+ #1 neg rotate neg exch neg exch translate}}
+
+\definespecial\dostoprotation%
+ {\special
+ {\@@insertpostscriptliteral
+ currentfont currentpoint grestore moveto setfont}}
+
+%D Drawing ovals in \DVIPS\ is complicated by the fact that
+%D the colors get reset. Therefore we need a more literal
+%D approach and therefore scale to local units. By redefining
+%D the retain constant into a macro, we can use the already
+%D present \POSTSCRIPT\ definition (see \type{spec-ps}).
+
+\definespecial\doovalbox#1#2#3#4#5#6#7%
+ {\bgroup
+ \edef\@@insertpostscriptretain gsave%
+ {\@@insertpostscriptliteral
+ gsave
+ Resolution 72 div
+ VResolution 72 div neg scale currentpoint translate}%
+ \dosomeovalbox{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
+ \egroup}
+
+\stopspecials
+
+\endinput
diff --git a/tex/context/base/spec-win.tex b/tex/context/base/spec-win.tex
index 674d694cd..d8d3e0c7e 100644
--- a/tex/context/base/spec-win.tex
+++ b/tex/context/base/spec-win.tex
@@ -1,90 +1,94 @@
-%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
- "#5"}}
- {}% 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
- \ifnum0#5=0 \else
- page: #5
- \fi}}
- {}% nog uri afhandelen
- \egroup}
-
-\definespecial\dostartthisislocation#1%
- {\special{mark: "#1"}}
-
-\definespecial\dostartthisisrealpage#1%
- {}
-
-\definespecial\dostartrunprogram#1#2#3%
- {\special{button: #1 #2 launch: #3}}
-
-\let\doyandyinsertmov = \docommoninsertmov
-\let\dotrinsertmov = \docommoninsertmov
-
-\stopspecials
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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 Remark: chained references are not yet implemented.
+
+%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}}%
+ %\hsmash{[l:#5]}%
+ \special
+ {button:
+ #1 #2
+ \if!!donea
+ file: #4,
+ \fi
+ "#5"}}
+ {}% nog uri afhandelen
+ \egroup}
+
+\definespecial\dostartgotorealpage#1#2#3#4#5%
+ {\bgroup
+ \doifelsenothing{#3}
+ {\doifelsenothing{#4}
+ {\!!doneafalse}
+ {\doifparentfileelse{#4}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ %\hsmash{[p:#5]}%
+ \special
+ {button:
+ #1 #2
+ \if!!donea
+ file: #4,
+ \fi
+ \ifnum0#5=0 \else
+ page: #5
+ \fi}}
+ {}% nog uri afhandelen
+ \egroup}
+
+\definespecial\dostartthisislocation#1%
+ {%\hsmash{[m:#1]}%
+ \special{mark: "#1"}}
+
+\definespecial\dostartthisisrealpage#1%
+ {}
+
+\definespecial\dostartrunprogram#1#2#3%
+ {\special{button: #1 #2 launch: #3}}
+
+\let\doyandyinsertmov = \docommoninsertmov
+\let\dotrinsertmov = \docommoninsertmov
+
+\stopspecials
+
+\protect
+
+\endinput
diff --git a/tex/context/base/spec-yy.tex b/tex/context/base/spec-yy.tex
index 885c6be01..324ec1db9 100644
--- a/tex/context/base/spec-yy.tex
+++ b/tex/context/base/spec-yy.tex
@@ -1,73 +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
+%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]
+
+\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}}
+
+\definefileinsertion{yy}{eps}#1#2#3#4#5#6#7#8#9%
+ {\ScaledPointsToBigPoints{#5}\width
+ \ScaledPointsToBigPoints{#6}\height
+ \special
+ {psfile=#1
+ hscale=#3\space
+ vscale=#4\space
+ hoffset=\width \space
+ voffset=\height}}
+
+\definefileinsertion{yy}{mps}#1#2#3#4#5#6#7#8#9%
+ {\hbox
+ {\includeMPfonts{#1}%
+ \convertMPcolors{#1}%
+ \dofileinsertion{yy}{eps}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}}
+
+\definefileinsertion{yy}{tif}#1#2#3#4#5#6#7#8#9%
+ {\special{insertimage: #1 #7 #8}}
+
+\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
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index fb9e1e2d1..87c2c78f7 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -1,1108 +1,1560 @@
-% 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% weg hier
- {\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
-%D A slower but more versatile implementation is:
-%D
-%D \starttypen
-%D \long\def\dowithnextbox#1#2%
-%D {\long\def\dodowithnextbox{#1}%
-%D \ifx#2\hbox
-%D \afterassignment\dododowithnextbox
-%D \else\ifx#2\vbox
-%D \afterassignment\dododowithnextbox
-%D \else\ifx#2\vtop
-%D \afterassignment\dododowithnextbox
-%D \else\ifx#2\vcenter
-%D \afterassignment\dododowithnextbox
-%D \else
-%D \afterassignment\dodowithnextbox
-%D \fi\fi\fi\fi
-%D \setbox\nextbox#2}
-%D \stoptypen
-%D
-%D This alternative also accepts \type{\box0} and alike, but
-%D we don't really need this functionality now.
-
-%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}
-
-\let\beginshapebox=\beginofshapebox
-\let\endshapebox =\endofshapebox
-
-\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,betweenisolatedwords}
-%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.
-%D
-%D Normally the isolated words are separated by space, but
-%D one can overrule this separator by changing the next macros.
-
-\def\betweenisolatedwords%
- {\hskip\fontdimen2\font\!!plus\fontdimen3\font\!!minus\fontdimen4\font}
-
-\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 % outer \hbox needed
- {\unvbox4 % for nested use
- \setbox4=\lastbox
- \hbox{#2{\hbox{\unhbox4}}}}}%
- \ifdim\ht2>\!!zeropoint \betweenisolatedwords \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 {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.
-%D
-%D Men kan het proces van breken enigzins beinvloeden met de
-%D volgende twee swithes:
-
-\newif\ifalignrigidcolumns
-\newif\ifstretchrigidcolumns
-
-%D De eerste switch bepaald het uitlijnen, de tweede rekt de
-%D individuele kolommen op naar \type{\vsize}.
-
-\def\setrigidcolumnhsize#1#2#3%
- {\hsize=#1\relax
- \scratchdimen=-#2\relax
- \multiply\scratchdimen by #3\relax
- \advance\scratchdimen by #2\relax
- \advance\hsize by \scratchdimen
- \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
- \tabskip\!!zeropoint
- \splittopskip=\ht\strutbox
- %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
- %\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
- \scratchdimen=1pt
- \divide\scratchdimen by \rigidcolumns
- \expanded{\scratchdimen=\withoutpt{\the\scratchdimen}\ht\rigidcolumnbox}%
- \advance\scratchdimen by \ht\strutbox
- \valign{##\vfill\cr\dorigidcolumnsplits}}%
- \fi}
-
-\def\dorigidcolumnsplits%
- {\ifnum\rigidcolumns>0
- \setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen
- \ifalignrigidcolumns
- \vbox to \ifstretchrigidcolumns\vsize\else\scratchdimen\fi
- {\unvbox\scratchbox}%
- \else
- \vbox{\unvbox\scratchbox}%
- \fi
- \doglobal\decrement\rigidcolumns
- \cr
- \ifnum\rigidcolumns>0\noalign{\hfil}\fi
- \expandafter\dorigidcolumnsplits
- \fi}
-
-%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
- \ No newline at end of file
+%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 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 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 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 {doiftextelse, doiftext}
+%D
+%D When \type {\doifelse} cum suis hopelessly fail, for
+%D instance because we pass data, we can fall back on the next
+%D macro:
+%D
+%D \starttypen
+%D \doiftextelse {data} {then branch} {else branch}
+%D \doiftext {data} {then branch}
+%D \stoptypen
+
+\def\doiftextelse#1#2#3%
+ {\bgroup
+ \setbox0=\hbox{#1}%
+ \ifdim\wd0>\!!zeropoint
+ \egroup#2%
+ \else
+ \egroup#3%
+ \fi}
+
+\def\doiftext#1#2%
+ {\doiftextelse{#1}{#2}{}}
+
+%D \macros
+%D {dowithnextbox,
+%D nextbox}
+%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}
+
+% Better but first to be checked:
+%
+%\long\def\dowithnextbox#1%
+% {\bgroup\long\def\dodowithnextbox{#1\egroup}%
+% \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
+%D A slower but more versatile implementation is:
+%D
+%D \starttypen
+%D \long\def\dowithnextbox#1#2%
+%D {\long\def\dodowithnextbox{#1}%
+%D \ifx#2\hbox
+%D \afterassignment\dododowithnextbox
+%D \else\ifx#2\vbox
+%D \afterassignment\dododowithnextbox
+%D \else\ifx#2\vtop
+%D \afterassignment\dododowithnextbox
+%D \else\ifx#2\vcenter
+%D \afterassignment\dododowithnextbox
+%D \else
+%D \afterassignment\dodowithnextbox
+%D \fi\fi\fi\fi
+%D \setbox\nextbox#2}
+%D \stoptypen
+%D
+%D This alternative also accepts \type{\box0} and alike, but
+%D we don't really need this functionality now.
+
+%D \macros
+%D {beginofshapebox,
+%D reshapebox, doreshapebox,
+%D flushshapebox,
+%D innerflushshapebox,
+%D shapebox,
+%D ifreshapingbox}
+%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}
+
+\let\beginshapebox=\beginofshapebox
+\let\endshapebox =\endofshapebox
+
+\def\flushshapebox%
+ {\ifdim\ht\newshapebox=\!!zeropoint\relax
+ \else
+ % make \prevdepth legal
+ % \par before the next \vskip gives far worse results
+ \ifdim\parskip>\!!zeropoint\vskip\parskip\else\par\fi
+ % and take a look
+ \ifdim\prevdepth=-1000pt
+ \prevdepth=\!!zeropoint
+ \fi
+ \ifdim\prevdepth<\!!zeropoint\relax
+ % something like a line or a signal or ...
+ \donetrue
+ \else\ifinner
+ % not watertight and not ok
+ \donefalse
+ \else\ifdim\pagegoal=\maxdimen
+ \donetrue
+ \else
+ % give the previous line a normal depth
+ \donetrue
+ \vbox{\forgetall\strut}\nobreak\kern-\lineheight % geen \vskip
+ \vskip-\dp\strutbox
+ \fi\fi\fi
+ \unvcopy\newshapebox\relax
+ % \prevdepth=0pt and \dp\newshapebox depend on last line
+ \kern-\dp\newshapebox\relax
+ % now \prevdepth=0pt
+ \ifdone
+ \kern\dp\strutbox
+ \prevdepth\dp\strutbox
+ \fi
+ \fi}
+
+%D In real inner situations we can use:
+%D
+%D \starttypen
+%D \flushinnershapebox
+%D \stoptypen
+%D
+%D This one is used in \type{\framed}.
+
+\def\innerflushshapebox%
+ {\ifdim\ht\newshapebox=\!!zeropoint\relax
+ \else
+ \unvcopy\newshapebox\relax
+ \kern-\dp\newshapebox\relax
+ \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 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
+ {\splittopskip=\openstrutheight
+ \vsplit0 to \baselineskip}}%
+ #2%
+ \fi
+ \loop
+ \setbox2=\hbox
+ {\splittopskip=\openstrutheight
+ \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 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 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. This is about the third version.
+
+\ifx\fakecompoundhyphen\undefined \let\fakecompoundhyphen\relax \fi
+
+\unexpanded\def\limitatetext%
+ {\bgroup
+ \dowithnextbox\dolimitatetext\hbox}
+
+\def\dolimitatetext#1#2%
+ {\doifelsenothing{#1}
+ {\unhbox\nextbox}
+ {\fakecompoundhyphen
+ \scratchdimen=#1\relax
+ \ifdim\wd\nextbox>\scratchdimen
+ \setbox\scratchbox=\hbox{ #2}%
+ \advance\scratchdimen by -\wd\scratchbox
+ \setbox\nextbox=\vbox
+ {\hsize=\scratchdimen
+ \hfuzz\maxdimen
+ \veryraggedright
+ \strut\unhbox\nextbox}%
+ \setbox\nextbox=\vbox % if omitted: missing brace reported
+ {\splittopskip=\openstrutheight
+ \setbox\nextbox=\vsplit\nextbox to \ht\strutbox
+ \unvbox\nextbox
+ \setbox\nextbox=\lastbox
+ \global\setbox1=\hbox
+ {\unhbox\nextbox\unskip\kern\!!zeropoint\box\scratchbox\unskip}}%
+ \unhbox1
+ \else
+ \unhbox\nextbox
+ \fi}%
+ \egroup}
+
+%D \macros
+%D {processisolatedwords,
+%D betweenisolatedwords,nothingbetweenisolatedwords}
+%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.
+%D
+%D Normally the isolated words are separated by space, but
+%D one can overrule this separator by changing the next macros.
+%D
+%D When needed, spacing can be suppressed by \type
+%D {\nothingbetweenisolatedwords}.
+
+\newif\ifisolatedwords
+
+\def\betweenisolatedwords%
+ {\hskip\currentspaceskip}
+
+\def\setbetweenisolatedwords#1%
+ {\gdef\localbetweenisolatedwords{#1}}
+
+\def\processisolatedwords#1#2%
+ {\bgroup
+ \fakecompoundhyphen
+ \mindermeldingen
+ \forgetall
+ \global\let\localbetweenisolatedwords\betweenisolatedwords
+ \setbox0=\hbox
+ {\ignorespaces#1%
+ \xdef\isolatedlastskip{\the\lastskip}}%
+ \setbox2=\vbox
+ {%\hyphenpenalty10000 % this one fails in \url breaking,
+ \lefthyphenmin=\!!maxcard % but this trick works ok, due to them
+ \righthyphenmin=\!!maxcard % total>63, when no hyphenation is done
+ \hsize\!!zeropoint
+ \unhcopy0}% == #1
+ \ifdim\ht0=\ht2
+ \isolatedwordsfalse
+ #2{\unhcopy0}% == #2{#1}
+ \else
+ \isolatedwordstrue
+ \setbox0=\hbox
+ {\ignorespaces
+ \loop
+ \setbox4=\hbox
+ {\splittopskip=\openstrutheight
+ \vsplit2 to \baselineskip}%
+ \hbox
+ {\unhbox4\unskip % recently added
+ \setbox4=\lastbox
+ \vbox % outer \hbox needed
+ {\unvbox4 % for nested use
+ \setbox4=\lastbox
+ \hbox{#2{\hbox{\unhbox4}}}}}%
+ \ifdim\ht2>\!!zeropoint \localbetweenisolatedwords \repeat
+ \unskip}%
+ \unhbox0\unskip\hskip\isolatedlastskip
+ \fi
+ \egroup}
+
+%D \macros
+%D {sbox}
+%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, centerednextbox}
+%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 surrounding 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 For those who don't want to deal with \type {\hsize}
+%D and \type {\vsize}, we have:
+%D
+%D \starttypen
+%D \centerednextbox width 2bp height 2bp
+%D {\framed[width=100bp,height=100bp]{}}
+%D \stoptypen
+%D
+%D Do you see what we call this one \type {next}?
+
+\def\centerednextbox#1#%
+ {\bgroup
+ \dowithnextbox
+ {\hsize\wd\nextbox
+ \vsize\ht\nextbox
+ \centeredbox#1{\box\nextbox}%
+ \egroup}
+ \hbox}
+
+%D \macros
+%D {centerbox}
+%D
+%D Centering on the available space is done by:
+%D
+%D \starttypen
+%D \centeredbox <optional specs> {content}
+%D \stoptypen
+%D
+%D When omitted, the current \type {\hsize} and \type
+%D {\vsize} are used. Local dimensions are supported.
+
+\def\centerbox#1#% optional height +/-dimen width +/-dimen
+ {\bgroup
+ \dowithnextbox
+ {\setlocalhsize
+ \setbox0=\hbox{\vrule\!!width\!!zeropoint#1}%
+ \setbox2=\vbox{\hrule\!!height\!!zeropoint#1}%
+ \hsize\ifdim\wd0=\!!zeropoint\hsize\else\wd0\fi
+ \vsize\ifdim\ht2=\!!zeropoint\vsize\else\ht2\fi
+ \vbox to \vsize{\vss\hbox to \hsize{\hss\box\nextbox\hss}\vss}%
+ \egroup}%
+ \hbox}
+
+%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}
+%D \stoptypen
+%D
+%D Both these macros are for instance used in typesetting
+%D footnotes.
+%D
+%D Men kan het proces van breken enigzins beinvloeden met de
+%D volgende twee swithes:
+
+\newif\ifalignrigidcolumns
+\newif\ifstretchrigidcolumns
+
+%D De eerste switch bepaald het uitlijnen, de tweede rekt de
+%D individuele kolommen op naar \type{\vsize}.
+
+\def\setrigidcolumnhsize#1#2#3%
+ {\hsize=#1\relax
+ \global\chardef\rigidcolumns=#3\relax
+ \scratchdimen=-#2\relax
+ \multiply\scratchdimen by #3\relax
+ \advance\scratchdimen by #2\relax
+ \advance\hsize by \scratchdimen
+ \divide\hsize by #3\relax}
+
+\def\rigidcolumnbalance#1%
+ {\global\chardef\rigidcolumnbox=#1\relax
+ \ifnum\rigidcolumns=1
+ \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox
+ \else
+ \line
+ {\vbadness=10000
+ \tabskip\!!zeropoint
+ \splittopskip=\openstrutheight
+ %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
+ %\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
+ \scratchdimen=1pt
+ \divide\scratchdimen by \rigidcolumns
+ \expanded{\scratchdimen=\withoutpt{\the\scratchdimen}\ht\rigidcolumnbox}%
+ \advance\scratchdimen by \ht\strutbox
+ \valign{##\vfill\cr\dorigidcolumnsplits}}%
+ \fi}
+
+\def\dorigidcolumnsplits%
+ {\ifnum\rigidcolumns>0
+ \setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen
+ \ifalignrigidcolumns
+ \vbox to \ifstretchrigidcolumns\vsize\else\scratchdimen\fi
+ {\unvbox\scratchbox}%
+ \else
+ \vbox{\unvbox\scratchbox}%
+ \fi
+ \doglobal\decrement\rigidcolumns
+ \cr
+ \ifnum\rigidcolumns>0\noalign{\hfil}\fi
+ \expandafter\dorigidcolumnsplits
+ \fi}
+
+%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 % \doloop { .. \exitloop .. }
+ \setbox2=\lastbox
+ \ifhbox2
+ \setbox0=\hbox{\box2\unhbox0}%
+ \repeat}
+
+\def\removehboxes%
+ {\setbox0=\lastbox
+ \ifhbox0
+ {\removehboxes}%
+ \unhbox0
+ \fi}
+
+%D \macros
+%D {unhhbox}
+%D
+%D The next macro is used in typesetting inline headings.
+%D Let's first look at the macro and then show an example.
+
+\newbox \unhhedbox
+\newbox \hhbox
+\newdimen \lasthhboxwidth
+\newskip \hhboxindent
+
+\def\unhhbox#1\with#2%
+ {\bgroup
+ \mindermeldingen
+ \forgetall
+ \setbox\unhhedbox=\vbox{\hskip\hhboxindent\strut\unhbox#1}% => \hsize
+ \doloop
+ {\setbox\hhbox=\vsplit\unhhedbox to \lineheight
+ \ifvoid\unhhedbox
+ \setbox\hhbox=\hbox{\strut\hboxofvbox\hhbox}%
+ \fi
+ \ht\hhbox=\ht\strutbox
+ \dp\hhbox=\dp\strutbox
+ \ifdim\hhboxindent=\!!zeropoint\else
+ \setbox\hhbox=\hbox{\hskip-\hhboxindent\box\hhbox}%
+ \hhboxindent=\!!zeropoint
+ \fi
+ \global\lasthhboxwidth=\wd\hhbox
+ #2\relax
+ \ifvoid\unhhedbox
+ \exitloop
+ \else
+ \hskip\!!zeropoint \!!plus \!!zeropoint
+ \fi}%
+ \egroup}
+
+\def\dohboxofvbox%
+ {\setbox0=\vbox{\unvbox\scratchcounter\global\setbox1=\lastbox}%
+ \unhbox1
+ \egroup}
+
+\def\hboxofvbox%
+ {\bgroup
+ \afterassignment\dohboxofvbox
+ \scratchcounter=}
+
+%D This macro can be used to break a paragraph apart and treat
+%D each line seperately, for instance, making it clickable. The
+%D main complication is that we want to be able to continue the
+%D paragraph, something that's needed in the in line section
+%D headers.
+%D
+%D \startbuffer
+%D \setbox0=\hbox{\input tufte \relax}
+%D \setbox2=\hbox{\input knuth \relax}
+%D \unhhbox0\with{\ruledhbox{\box\hhbox}}
+%D \hskip1em plus 1em minus 1em
+%D \hhboxindent=\lasthhboxwidth
+%D \advance\hhboxindent by \lastskip
+%D \unhhbox2\with{\ruledhbox{\box\hhbox}}
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D This piece of text was typeset by saying:
+%D
+%D \typebuffer
+%D
+%D Not that nice a definition, but effective. Note the stretch
+%D we've build in the line that connects the two paragraphs.
+
+%D \macros
+%D {doifcontent}
+%D
+%D When processing depends on the availability of content, one
+%D can give 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.
+
+%D \macros
+%D {processboxes}
+%D
+%D The next macro gobble boxes and is for instance used for
+%D overlays. First we show the general handler.
+
+\newbox\processbox
+
+\def\processboxes#1%
+ {\bgroup
+ \def\doprocessbox{#1}% #1 can be redefined halfway
+ \setbox\processbox=\box\voidb@x
+ \afterassignment\dogetprocessbox\let\next=}
+
+\def\endprocessboxes%
+ {\ifhmode\unskip\fi
+ \box\processbox
+ \next
+ \egroup}
+
+\def\dogetprocessbox%
+ {\ifx\next\bgroup
+ \expandafter\dodogetprocessbox
+ \else
+ \expandafter\endprocessboxes
+ \fi}
+
+\def\dodogetprocessbox%
+ {\dowithnextbox
+ {\ifhmode\unskip\fi\doprocessbox % takes \nextbox makes \processbox
+ \afterassignment\dogetprocessbox\let\next=}
+ \hbox\bgroup}
+
+%D \macros
+%D {startoverlay}
+%D
+%D We can overlay boxes by saying:
+%D
+%D \startbuffer
+%D \startoverlay
+%D {\omlijnd{hans}}
+%D {\omlijnd[breedte=3cm]{ton}}
+%D {\omlijnd[hoogte=2cm]{oeps}}
+%D \stopoverlay
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D shows up as:
+%D
+%D \leavevmode\haalbuffer
+
+% \def\dooverlaybox%
+% {\ifhmode\unskip\fi
+% \ifdim\ht\nextbox>\ht\processbox
+% \setbox\processbox=\vbox to \ht\nextbox
+% {\vss\box\processbox\vss}%
+% \else
+% \setbox\nextbox=\vbox to \ht\processbox
+% {\vss\box\nextbox\vss}%
+% \fi
+% \scratchdimen=\wd
+% \ifdim\wd\nextbox>\wd\processbox
+% \nextbox
+% \else
+% \processbox
+% \fi
+% \setbox\processbox=\hbox to \scratchdimen
+% {\hbox to \scratchdimen{\hss\box\processbox\hss}%
+% \hskip-\scratchdimen
+% \hbox to \scratchdimen{\hss\box\nextbox\hss}}}
+%
+% \def\startoverlay%
+% {\bgroup
+% \let\stopoverlay\egroup
+% \processboxes\dooverlaybox}
+
+\def\dooverlaybox%
+ {\ifhmode\unskip\fi
+ \scratchdimen=\dp
+ \ifdim\dp\nextbox>\dp\processbox
+ \nextbox
+ \else
+ \processbox
+ \fi
+ \ifdim\ht\nextbox>\ht\processbox
+ \setbox\processbox=\vbox to \ht\nextbox
+ {\dp\processbox=\!!zeropoint\vss\box\processbox\vss}%
+ \else
+ \setbox\nextbox=\vbox to \ht\processbox
+ {\dp\nextbox=\!!zeropoint\vss\box\nextbox\vss}%
+ \fi
+ \dp\nextbox=\scratchdimen
+ \dp\processbox=\scratchdimen
+ \scratchdimen=\wd
+ \ifdim\wd\nextbox>\wd\processbox
+ \nextbox
+ \else
+ \processbox
+ \fi
+ \setbox\processbox=\hbox to \scratchdimen
+ {\hbox to \scratchdimen{\hss\box\processbox\hss}%
+ \hskip-\scratchdimen
+ \hbox to \scratchdimen{\hss\box\nextbox\hss}}}
+
+\def\startoverlay%
+ {\bgroup
+ \let\stopoverlay\egroup
+ \processboxes\dooverlaybox}
+
+% %D \macros
+% %D {starthspread}
+% %D
+% %D In a similar way we can build a horizontal box, spread
+% %D over the available width.
+% %D
+% %D \startbuffer
+% %D \starthspread
+% %D {hans}
+% %D {ton}
+% %D {oeps}
+% %D \stophspread
+% %D
+% %D \stopbuffer
+% %D
+% %D \typebuffer
+% %D
+% %D shows up as:
+% %D
+% %D \leavevmode\haalbuffer
+%
+% \def\dohspread%
+% {\box\nextbox
+% \def\dohspread{\hfil\box\nextbox}}
+%
+% \def\starthspread%
+% {\hbox to \hsize \bgroup
+% \let\stophspread\egroup
+% \processboxes\dohspread}
+
+%D \macros
+%D {fakebox}
+%D
+%D The next macro is a rather silly one, but saves space.
+%D
+%D \starttypen
+%D \hbox{\fakebox0}
+%D \stoptypen
+%D
+%D returns an empty box with the dimensions of the box
+%D specified, here being zero.
+
+\def\dofakebox%
+ {\setbox\scratchbox=\null
+ \wd\scratchbox=\wd\scratchcounter
+ \ht\scratchbox=\ht\scratchcounter
+ \dp\scratchbox=\dp\scratchcounter
+ \ifhbox\scratchcounter\hbox\else\vbox\fi{\box\scratchbox}%
+ \egroup}
+
+\def\fakebox%
+ {\bgroup
+ \afterassignment\dofakebox\scratchcounter}
+
+%D \macros
+%D {lbox,rbox,cbox,tbox,bbox}
+%D
+%D Here are some convenient alternative box types:
+%D
+%D \starttypen
+%D \lbox{text ...}
+%D \cbox{text ...}
+%D \rbox{text ...}
+%D \stoptypen
+%D
+%D Are similar to \type {\vbox}, which means that they also
+%D accept something like \type{to 3cm}, but align to the left,
+%D middle and right. These box types can be used to typeset
+%D paragraphs.
+
+\def\lbox{\lrcbox\raggedleft}
+\def\cbox{\lrcbox\raggedcenter}
+\def\rbox{\lrcbox\raggedright}
+
+\def\lrcbox#1#2#%
+ {\vbox#2\bgroup
+ \let\\=\endgraf
+ \forgetall#1\let\next=}
+
+%D The alternatives \type {\tbox} and \type {\bbox} can be used
+%D to properly allign boxes, like in:
+%D
+%D \startbuffer
+%D \starttabel[|||]
+%D \HL
+%D \VL \tbox{\externfiguur[koe][hoogte=3cm,kader=aan]} \VL top aligned \VL\SR
+%D \HL
+%D \VL \bbox{\externfiguur[koe][hoogte=3cm,kader=aan]} \VL bottom aligned \VL\SR
+%D \HL
+%D \stoptabel
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D The positioning depends on the strut settings:
+%D
+%D \haalbuffer
+
+\def\tbox{\tbbox\ht\dp}
+\def\bbox{\tbbox\dp\ht}
+
+\def\tbbox#1#2%
+ {\hbox\bgroup
+ \dowithnextbox
+ {\scratchdimen=\ht\nextbox
+ \advance\scratchdimen\dp\nextbox
+ \advance\scratchdimen-#1\strutbox
+ #1\nextbox=#1\strutbox
+ #2\nextbox=\scratchdimen
+ \setbox\nextbox=\hbox
+ {\lower\dp\nextbox\box\nextbox}%
+ #1\nextbox=#1\strutbox
+ #2\nextbox=\scratchdimen
+ \box\nextbox
+ \egroup}
+ \hbox}
+
+%D Some new, still undocumented features:
+
+% 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% weg hier
+ {\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}
+
+% Handy:
+
+\def\removedepth%
+ {\ifvmode\ifdim\prevdepth>\!!zeropoint
+ \kern-\prevdepth
+ \fi\fi}
+
+% 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}
+
+%D Also new:
+%D
+%D \startbuffer
+%D \normbox[1cm][bba]{m} % b(efore) a(fter) v(box) s(trut) f(rame)
+%D \normbox[1cm][bba]{m}
+%D \normbox[1cm][bba]{m}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \haalbuffer
+%
+% \def\dodonormbox#1#2#3#4#5#6#7%
+% {\doifnumberelse{#1}
+% {\dimen0=#1}{\setbox0=#3{#1}\dimen0=#50}%
+% \doifinstringelse{f}{#2}
+% {\let\next#4}{\let\next#3}%
+% \next to \dimen0
+% {\counttoken b\in#2\to\!!counta\dorecurse{\!!counta}{#6}#6%
+% #7\nextbox
+% \counttoken a\in#2\to\!!counta\dorecurse{\!!counta}{#6}#6}}
+%
+% \def\donormbox[#1][#2]%
+% {\bgroup
+% \doifinstringelse{v}{#2}
+% {\let\next\vbox}
+% {\let\next\hbox}%
+% \dowithnextbox
+% {\ifvbox\nextbox
+% \let\\=\par
+% \dodonormbox{#1}{#2}\vbox\ruledvbox\ht\vfil\unvbox
+% \else
+% \let\\=\space
+% \dodonormbox{#1}{#2}\hbox\ruledhbox\wd\hfil\unhbox
+% \fi
+% \egroup}%
+% \next}
+%
+% \def\normbox%
+% {\dodoubleempty\donormbox}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex
new file mode 100644
index 000000000..0698f1332
--- /dev/null
+++ b/tex/context/base/supp-eps.tex
@@ -0,0 +1,129 @@
+%D \module
+%D [ file=supp-eps,
+%D version=1998.05.06,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=\EPS\ tools,
+%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.
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+
+%D The macros in this module are rather old and were originally
+%D part of the figure inclusion macros. When \PDFTEX\ started
+%D to support \PDF\ inclusion, where some accompanying macros
+%D were put in \type{supp-pdf}, I considered it more suitable
+%D to give the \EPS\ macros their own module.
+
+\writestatus{loading}{Context Support Macros / PDF}
+
+%D \macros
+%D {dogetEPSboundingbox}
+%D
+%D The predecessors of the following macro's are derived from
+%D Thomas Rockicky's macro's. They are rewritten to a more
+%D compact form, made a bit more robust and also handle the
+%D \type{HiResBoundingBox} and \type{ExactBoundingBox} that
+%D are sometimes 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
+%D are 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 typesetting sources and putting eps coded logos into
+%D a heading. Temporary restoring the \CATCODES\ is done in
+%D the calling routine.
+
+\unprotect
+
+\let\EPSllx\!!zeropoint \let\MPllx\EPSllx % just in case these
+\let\EPSlly\!!zeropoint \let\MPlly\EPSlly % are used while running
+\let\EPSurx\!!zeropoint \let\MPurx\EPSurx % in fast mode we set
+\let\EPSury\!!zeropoint \let\MPury\EPSury % them to 0pt.
+
+\def\dogetEPSboundingbox#1#2#3#4#5%
+ {\bgroup
+ \global\chardef\EPSfound=0
+ \global\chardef\EPScreator=0
+ \uncatcodespecials
+ \def\doprocessEPSline%
+ {\expandafter\checkEPSboundingbox\fileline:. \end}%
+ \doprocessfile\scratchread{#1}\doprocessEPSline
+ \egroup
+ \ifnum\EPSfound>0
+ \dimen0=1bp\relax
+ #2=\EPSllx\dimen0
+ #4=\EPSurx\dimen0
+ \advance#4 by -\EPSllx\dimen0
+ #3=\EPSlly\dimen0
+ #5=\EPSury\dimen0
+ \advance#5 by -\EPSlly\dimen0
+ \else
+ #2=\!!zeropoint
+ #3=\!!zeropoint
+ #4=\!!zeropoint
+ #5=\!!zeropoint
+ \fi
+ \global\let\MPllx\EPSllx \global\let\MPlly\EPSlly
+ \global\let\MPurx\EPSurx \global\let\MPury\EPSury}
+
+\bgroup
+\catcode`\%=\@@other
+\global\let\EPSpercenttag =%
+\gdef\EPSboundingboxtag {%BoundingBox}
+\gdef\EPShiresboundingboxtag{%HiResBoundingBox}
+\gdef\EPSexactboundingboxtag{%ExactBoundingBox}
+\gdef\EPScreatortag {%Creator}
+\gdef\EPSmetaposttag { MetaPost :. }
+\egroup
+
+\long\def\checkEPSboundingbox#1#2:#3\end%
+ {\ifx#1\EPSpercenttag
+ \def\!!stringa{#2}%
+ \ifx\!!stringa\EPScreatortag
+ \def\!!stringa{#3}%
+ \global\chardef\EPScreator=\ifx\!!stringa\EPSmetaposttag1 \else0 \fi
+ \else\ifx\!!stringa\EPSboundingboxtag
+ \getEPSboundingbox #3 . . . \end
+ \global\chardef\EPSfound=1
+ \else\ifx\!!stringa\EPShiresboundingboxtag
+ \getEPSboundingbox #3 . . . \end
+ \global\chardef\EPSfound=2
+ \dofinishfile
+ \else\ifx\!!stringa\EPSexactboundingboxtag
+ \getEPSboundingbox #3 . . . \end
+ \global\chardef\EPSfound=2
+ \dofinishfile
+ \fi\fi\fi\fi
+ \else\ifnum\EPSfound>0
+ \dofinishfile
+ \fi\fi}
+
+\def\getEPSboundingbox #1 #2 #3 #4 #5\end%
+ {\gdef\EPSllx{#1}%
+ \ifx\EPSllx\empty
+ \getEPSboundingbox #2 #3 #4 #5 .\end
+ \else
+ \gdef\EPSlly{#2}%
+ \gdef\EPSurx{#3}%
+ \gdef\EPSury{#4}%
+ \fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex
index 72fde6175..d1d3e399b 100644
--- a/tex/context/base/supp-fil.tex
+++ b/tex/context/base/supp-fil.tex
@@ -1,405 +1,440 @@
-%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 {doonlyonce, 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 execution and
-%D loading by using one of both:
-%D
-%D \starttypen
-%D \doonlyonce{actions}
-%D \doloadonce{filename}
-%D \stoptypen
-%D
-%D This command obeys the standard method for locating files.
-
-\long\def\doonlyonce#1#2%
- {\doifundefined{@@@#1@@@}{\setgvalue{@@@#1@@@}{}#2}}
-
-\def\doinputonce#1%
- {\doonlyonce{#1}{\doiffileelse{#1}{\normalinput #1\relax}{}}}
-
-%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}
-
-% \newcounter\readingfilelevel
-%
-% \def\startreadingfile%
-% {\ifnum\readingfilelevel=0
-% \edef\doreadingfilecharacters%
-% {\catcode`"=\the\catcode`"\relax
-% \catcode`<=\the\catcode`<\relax
-% \catcode`>=\the\catcode`>\relax}%
-% \catcode`"=\@@other
-% \catcode`<=\@@other
-% \catcode`>=\@@other
-% \let\stopreadingfile=\dostopreadingfile
-% \fi
-% \increment\readingfilelevel}
-%
-% \def\dostopreadingfile%
-% {\ifnum\readingfilelevel=1
-% \doreadingfilecharacters
-% \fi
-% \decrement\readingfilelevel}
-
-\def\normalless {<} % geen \let !
-\def\normalmore {>} % geen \let !
-\def\normalequal{=} % geen \let !
-
-\newcounter\readingfilelevel
-
-\def\popfilecharacter#1#2%
- {\ifnum\catcode`#1=\@@other \ifnum#2=\@@other \else
- \message{[popping catcode #1 to #2]}%
- \catcode`#1=#2\relax
- \fi \fi}
-
-\def\pushfilecharacter#1%
- {\ifnum\catcode`#1=\@@other \else
- \message{[pushing catcode #1 from \the\catcode`#1]}%
- \catcode`#1=\@@other
- \fi}
-
-\def\startreadingfile%
- {\doglobal\increment\readingfilelevel
- \setxvalue{popfilecharacters::\readingfilelevel}%
- {\noexpand\popfilecharacter{"}{\the\catcode`"}%
- \noexpand\popfilecharacter{<}{\the\catcode`<}%
- \noexpand\popfilecharacter{>}{\the\catcode`>}}%
- \pushfilecharacter{"}%
- \pushfilecharacter{<}%
- \pushfilecharacter{>}}
-
-\def\stopreadingfile%
- {\getvalue{popfilecharacters::\readingfilelevel}%
- \doglobal\decrement\readingfilelevel}
-
-\protect
-
-\endinput
+%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 {normalwrite, normalimmediate}
+%D
+%D We save a few primitives first.
+
+\let\normalwrite\write
+\let\normalimmediate\immediate
+
+%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.
+
+\ifx\undefined\scratchread \newread \scratchread \fi
+\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi
+
+%D \macros
+%D {doprocessfile,fileline,fileprocessedtrue,dofinishfile}
+%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. One can halfway step out using
+%D \type{\dofinishfile} and ise \type{\iffileprocessed} to
+%D see if indeed some content was found.
+
+\newif\iffileprocessed
+
+\def\doprocessfile#1#2#3%
+ {\openin#1=#2\relax
+ \ifeof#1%
+ \fileprocessedfalse
+ \closein#1\relax
+ \else
+ \fileprocessedtrue
+ \gdef\dofinishfile%
+ {\closein#1\relax
+ \global\let\doprocessline=\relax}%
+ \gdef\doprocessline%
+ {\ifeof#1%
+ \dofinishfile
+ \else
+ \global\read#1 to \fileline
+ #3\relax
+ \expandafter\doprocessline
+ \fi}%
+ \expandafter\doprocessline
+ \fi}
+
+%D \macros
+%D {pathplusfile}
+%D
+%D Use \type{\pathplusfile} to compose a full file name, like
+%D in:
+%D
+%D \starttypen
+%D \pathplusfile{path}{file}
+%D \stoptypen
+%D
+%D By default, this expands into {\tt \pathplusfile{path}{file}}.
+
+\def\pathplusfile#1#2{#1/#2}
+
+%D \macros
+%D {readfile,ReadFile,maxreadlevel,
+%D normalinput}
+%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{\pathplusfile{\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,
+%D readfixfile,readsetfile}
+%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% current path, no backtracking
+ {\newcounter\readlevel
+ \doreadfile{\pathplusfile{\f!currentpath}{#1}}}
+
+\def\readlocfile#1% current path, backtracking
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{\pathplusfile{\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% current path, obeys tex search
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{#1}}
+
+%D Of the last two, \type{\readfixfile} searches on the
+%D directory specified and backtracks too, while
+%D \type{\readsetfile} does only search on the specified path.
+
+\def\readfixfile#1#2% specified path, backtracking
+ {\let\readlevel=\maxreadlevel
+ \doreadfile{\pathplusfile{#1}{#2}}}
+
+\def\readsetfile#1#2% specified path, no backtracking
+ {\newcounter\readlevel
+ \doreadfile{\pathplusfile{#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 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}{\pathplusfile{\f!parentpath}{#2}}%
+ \fi
+ \fi}
+
+\def\openjobin#1#2%
+ {\newcounter\readlevel
+ \doopenin{#1}{\pathplusfile{\f!currentpath}{#2}}}
+
+\def\opensysin#1#2%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{#2}}
+
+\def\openlocin#1#2%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{\pathplusfile{\f!currentpath}{#2}}}
+
+\def\openfixin#1#2#3%
+ {\let\readlevel=\maxreadlevel
+ \doopenin{#1}{\pathplusfile{#2}{#3}}}
+
+%D \macros
+%D {doiffileelse,doiflocfileelse}
+%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{\pathplusfile{\f!currentpath}{#1}}}
+
+%D \macros
+%D {doonlyonce, doinputonce}
+%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 execution and
+%D loading by using one of both:
+%D
+%D \starttypen
+%D \doonlyonce{actions}
+%D \doloadonce{filename}
+%D \stoptypen
+%D
+%D This command obeys the standard method for locating files.
+
+\long\def\doonlyonce#1#2%
+ {\doifundefined{@@@#1@@@}{\setgvalue{@@@#1@@@}{}#2}}
+
+\def\doinputonce#1%
+ {\doonlyonce{#1}{\doiffileelse{#1}{\normalinput #1\relax}{}}}
+
+%D \macros
+%D {doifparentfileelse}
+%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}
+
+% \newcounter\readingfilelevel
+%
+% \def\startreadingfile%
+% {\ifnum\readingfilelevel=0
+% \edef\doreadingfilecharacters%
+% {\catcode`"=\the\catcode`"\relax
+% \catcode`<=\the\catcode`<\relax
+% \catcode`>=\the\catcode`>\relax}%
+% \catcode`"=\@@other
+% \catcode`<=\@@other
+% \catcode`>=\@@other
+% \let\stopreadingfile=\dostopreadingfile
+% \fi
+% \increment\readingfilelevel}
+%
+% \def\dostopreadingfile%
+% {\ifnum\readingfilelevel=1
+% \doreadingfilecharacters
+% \fi
+% \decrement\readingfilelevel}
+
+\def\normalless {<} % geen \let !
+\def\normalmore {>} % geen \let !
+\def\normalequal{=} % geen \let !
+
+\newcounter\readingfilelevel
+
+\def\popfilecharacter#1#2%
+ {\ifnum\catcode`#1=\@@other \ifnum#2=\@@other \else
+ \message{[popping catcode #1 to #2]}%
+ \catcode`#1=#2\relax
+ \fi \fi}
+
+\def\pushfilecharacter#1%
+ {\ifnum\catcode`#1=\@@other \else
+ \message{[pushing catcode #1 from \the\catcode`#1]}%
+ \catcode`#1=\@@other
+ \fi}
+
+\def\startreadingfile%
+ {\doglobal\increment\readingfilelevel
+ \setxvalue{popfilecharacters::\readingfilelevel}%
+ {\noexpand\popfilecharacter{"}{\the\catcode`"}%
+ \noexpand\popfilecharacter{<}{\the\catcode`<}%
+ \noexpand\popfilecharacter{>}{\the\catcode`>}}%
+ \pushfilecharacter{"}%
+ \pushfilecharacter{<}%
+ \pushfilecharacter{>}}
+
+\def\stopreadingfile%
+ {\getvalue{popfilecharacters::\readingfilelevel}%
+ \doglobal\decrement\readingfilelevel}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex
index a5a49732e..95a402fc1 100644
--- a/tex/context/base/supp-fun.tex
+++ b/tex/context/base/supp-fun.tex
@@ -1,428 +1,447 @@
-%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
-
-%D This module implements some typographics tricks that can
-%D be fun when designing document layouts. The examples use
-%D macros that are typical to \CONTEXT, but non \CONTEXT\
-%D users can use the drop caps and first line treatment
-%D macros without problems. This module will be extended
-%D when the need for more of such tricks arises.
-
-\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
-
-\writestatus{loading}{Context Support Macros / Fun Stuff}
-
-%D \macros
-%D {DroppedCaps}
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[green]} {cmbx12} {2.2\baselineskip} {2pt} {\baselineskip} {2}
-%D Let's start
-%D \stopbuffer
-%D
-%D \haalbuffer with dropped caps, those blown up first
-%D characters of a paragraph. It's hard to implement a general
-%D mechanism that suits all situations, but dropped caps are so
-%D seldomly used that we can permit ourselves a rather user
-%D unfriendly implementation.
-%D
-%D \typebuffer
-%D
-%D As we will see, there are 7 different settings involved. The
-%D first argument takes a command that is used to do whatever
-%D fancy things we want to do, but normally this one will be
-%D empty. The second argument takes the font. Because we're
-%D dealing with something very typographic, there is no real
-%D reason to adopt complicated font switching schemes, a mere
-%D name will do. Font encodings can bring no harm, because the
-%D alphanumeric characters are nearly always located at their
-%D natural position in the encoding vector.
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[red]} {cmbx12} {\baselineskip} {0pt} {0pt} {1}
-%D This simple
-%D \stopbuffer
-%D
-%D \haalbuffer case shows us what happens when we apply minimal
-%D values. Here we used:
-%D
-%D \typebuffer
-%D
-%D \startbuffer
-%D \DroppedCaps
-%D {\color[red]} {cmbx12} {2\baselineskip} {0pt} {\baselineskip} {2}
-%D In this ugly
-%D \stopbuffer
-%D
-%D \haalbuffer example the third argument tells
-%D this macro that we want a dropped capital scaled to the
-%D baseline distance. The two zero point arguments are the
-%D horizontal and vertical offsets and the last arguments
-%D determines the hanging indentation. In this paragraph we
-%D set the height to two times the baselinedistance and use
-%D two hanging lines:
-%D
-%D \typebuffer
-%D
-%D Here, the first character is moved down one baseline. Here
-%D we also see why the horizontal offset is important. The
-%D first example (showing the~L) sets this to a few points and
-%D also used a slightly larger height.
-%D
-%D Of course common users (typist) are not supposed to see this
-%D kind of fuzzy definitions, but fortunately \TEX\ permits us
-%D to hide them in macros. Using a macro also enables us to
-%D garantee consistency throughout the document:
-%D
-%D \startbuffer
-%D \def\MyDroppedCaps%
-%D {\DroppedCaps
-%D {\color[green]} {cmbx12} {5\baselineskip} {3pt} {3\baselineskip} {4}}
-%D
-%D \MyDroppedCaps The implementation
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D \haalbuffer of the general macro is rather simple and only
-%D depends on the arguments given and the dimensions of the
-%D strut box. We explicitly load the font, which is no problem
-%D because \TEX\ does not load a font twice. We could have
-%D combined some arguments, like the height, vertical offset
-%D and the number of lines, but the current implementation
-%D proved to be the most flexible. One should be aware of the
-%D fact that the offsets depend on the design of the glyphs
-%D used.
-
-\def\DroppedCaps#1#2#3#4#5#6#7%
- {\par
- \vskip#6\baselineskip
- \penalty-200
- \vskip-#6\baselineskip
- \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}
-
-%D Before we go to the next topic, we summarize this command:
-%D
-%D \starttypen
-%D \DroppedCaps {command} {font} {height} {hoffset} {voffset} {lines}
-%D \stoptypen
-
-%D \macros
-%D {TreatFirstLine}
-%D
-%D \startbuffer
-%D \TreatFirstLine {\sc} {} {} {}
-%D Instead of limiting its action to one token, the next macro
-%D treats the whole first line. This paragraph was typeset by
-%D saying:
-%D \stopbuffer
-%D
-%D \haalbuffer
-%D
-%D \typebuffer
-%D
-%D \startbuffer
-%D \TreatFirstLine {\startcolor[red]\bf} {\stopcolor} {} {}
-%D The combined color and font effect is also possible,
-%D although one must be careful in using macros that accumulate
-%D grouping, but the commands used here are pretty save in that
-%D respect.
-%D \stopbuffer
-%D
-%D \haalbuffer
-%D
-%D \typebuffer
-%D
-%D Before we explain the third and fourth argument, we show the
-%D implementation. Those who know a bit about the way \TEX\ treats
-%D tokens, will probably see in one glance that this
-%D alternative works all right for most text||only situations
-%D in which there is enough text available for the first line,
-%D but that more complicated things will blow. One has to live
-%D with that.
-
-\def\TreatFirstLine#1#2#3#4% before, after, first, next
- {\leavevmode
- \bgroup
- \forgetall
- \bgroup
- #1%
- \setbox0=\box\voidb@x
- \setbox2=\box\voidb@x
- \def\grabfirstline##1 %
- {\setbox2=\hbox
- {\ifvoid0
- {#3{\ignorespaces##1}}%
- \else
- \unhcopy0\ {#4{##1}}%
- \fi}%
- \ifdim\wd2=\!!zeropoint
- \setbox0=\box\voidb@x
- \setbox2=\box\voidb@x
- \let\next=\grabfirstline
- \else\ifdim\wd2>\hsize
- \hbox to \hsize{\strut\unhbox0}#2\egroup
- \break##1\
- \egroup
- \let\next=\relax
- \else
- \setbox0=\box2
- \let\next=\grabfirstline
- \fi\fi
- \next}%
- \grabfirstline}
-
-%D \startbuffer
-%D \gdef\FunnyCommand
-%D {\getrandomfloat\FunnyR{0}{1}%
-%D \getrandomfloat\FunnyG{0}{1}%
-%D \getrandomfloat\FunnyB{0}{1}%
-%D \definecolor[FunnyColor][r=\FunnyR,g=\FunnyG,b=\FunnyB]%
-%D \color[FunnyColor]}
-%D
-%D \TreatFirstLine {\bf} {} {\FunnyCommand} {\FunnyCommand}
-%D The third and fourth argument can be used to gain special effects on
-%D the individual words. Of course one needs to know
-%D \stopbuffer
-%D
-%D \haalbuffer
-%D a bit more about the macro package used to get real nice effects,
-%D but this example probably demonstrates the principles well.
-%D
-%D \typebuffer
-%D
-%D Like in dropped caps case, one can hide such treatments in a
-%D macro, like:
-%D
-%D \starttypen
-%D \def\MyTreatFirstLine%
-%D {\TreatFirstLine {\bf} {} {\FunnyCommand} {\FunnyCommand}}
-%D \stoptypen
-
-%D \macros
-%D {reshapebox}
-%D
-%D \startbuffer
-%D \beginofshapebox
-%D When using \CONTEXT, one can also apply this funny command to whole lines
-%D by using the reshape mechanism. Describing this interesting mechanism falls
-%D outside the scope of this module, so we only show the trick. This is an
-%D example of low level \CONTEXT\ functionality: it's all there, and it's
-%D stable, but not entirely meant for novice users.
-%D \endofshapebox
-%D
-%D \reshapebox{\FunnyCommand{\box\shapebox}} \flushshapebox
-%D \stopbuffer
-%D
-%D \haalbuffer
-%D
-%D \typebuffer
-%D
-%D This mechanism permits hyphenation and therefore gives
-%D better results than the previously discussed macro
-%D \type{\TreatFirstLine}.
-
-%D \macros
-%D {TreatFirstCharacter}
-%D
-%D \startbuffer
-%D \TreatFirstCharacter {\bf\color[green]} Just to be
-%D \stopbuffer
-%D
-%D \haalbuffer complete we also offer a very simple one
-%D character alternative, that is not that hard to understand:
-
-\def\TreatFirstCharacter#1#2% command, character
- {{#1{#2}}}
-
-%D A previous paragraph started with:
-%D
-%D \typebuffer
-
-%D \macros
-%D {StackCharacters}
-%D
-%D The next hack deals with vertical stacking.
-
-\def\StackCharacters#1#2#3#4% sequence vsize vskip command
- {\vbox #2
- {\forgetall
- \baselineskip0pt
- \def\StackCharacter##1{#4{##1}\cr\noalign{#3}}%
- \halign{\hss##\hss&##\cr\handletokens#1\with\StackCharacter\cr}}}
-
-%D \startbuffer
-%D \StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}
-%D \stopbuffer
-%D
-%D Such a stack looks like:
-%D
-%D \startregelcorrectie
-%D \hbox to \hsize
-%D {$\hss\bfd
-%D \vcenter{\StackCharacters{TEX} {}{\vskip.2ex}{\FunnyCommand}}%
-%D \hss
-%D \vcenter{\StackCharacters{CON} {}{\vskip.2ex}{\FunnyCommand}}
-%D \hss
-%D \vcenter{\StackCharacters{TEXT} {}{\vskip.2ex}{\FunnyCommand}}
-%D \hss
-%D \vcenter{\StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}}
-%D \hss$}
-%D \stopregelcorrectie
-%D
-%D and is typeset by saying:
-%D
-%D \typebuffer
-%D
-%D An alternative would have been
-%D
-%D \starttypen
-%D \StackCharacters{CONTEXT}{to 5cm}{\vfill}{\FunnyCommand}
-%D \stoptypen
-
-%D \macros
-%D {processtokens}
-%D
-%D At a lower level horizontal and vertical manipulations are
-%D already supported by:
-%D
-%D \starttypen
-%D \processtokens {begin} {between} {end} {space} {text}
-%D \stoptypen
-%D
-%D \startbuffer[a]
-%D \processtokens
-%D {\hbox to .5\hsize\bgroup} {\hfill} {\egroup}
-%D {\space} {LET'S HAVE}
-%D \stopbuffer
-%D
-%D \startbuffer[b]
-%D \processtokens
-%D {\vbox\bgroup\raggedcenter\hsize1em} {\vskip.25ex} {\egroup}
-%D {\strut} {FUN}
-%D \stopbuffer
-%D
-%D This macro is able to typeset:
-%D
-%D \leavevmode\hbox to \hsize
-%D {$\hfil\hfil
-%D \vcenter{\bf\haalbuffer[a]}%
-%D \hfil
-%D \vcenter{\bfd\haalbuffer[b]}%
-%D \hfil\hfil$}
-%D
-%D which was specified as:
-%D
-%D \typebuffer[a]
-%D \typebuffer[b]
-
-%D \macros
-%D {NormalizeFontHeight, NormalizeFontWidth}
-%D
-%D Next we introduce some font manipulation macros. When we
-%D want to typeset some text spread in a well defined area, it
-%D can be considered bad practice to manipulate character and
-%D word spacing. In such situations the next few macros can be
-%D of help:
-%D
-%D \starttypen
-%D \NormalizeFontHeight \name {sample text} {height} {font}
-%D \NormalizeFontWidth \name {sample text} {width} {font}
-%D \stoptypen
-%D
-%D These are implemented using an auxilliary macro:
-
-\def\NormalizeFontHeight%
- {\NormalizeFontSize\ht}
-
-\def\NormalizeFontWidth%
- {\NormalizeFontSize\wd}
-
-\def\NormalizeFontSize#1#2#3#4#5%
- {\setbox0=\hbox{\font\temp=#5 at 10pt\temp#3}%
- \dimen0=#10
- \dimen2=10000pt
- \divide\dimen2 by \dimen0
- \dimen4=#4
- \divide\dimen4 by 1000
- \dimen4=\number\dimen2\dimen4
- \edef\NormalizedFontSize{\the\dimen4}%
- \font#2=#5 at \NormalizedFontSize}
-
-%D Consider for instance:
-%D
-%D \startbuffer
-%D \NormalizeFontHeight \temp {X} {2\baselineskip} {cmr10}
-%D
-%D {\temp To Be Or Not To Be}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This shows up as (we also show the baselines):
-%D
-%D {\showbaselines\haalbuffer}
-%D
-%D The horizontal counterpart is:
-%D
-%D \startbuffer
-%D \NormalizeFontWidth \temp {This Sentence Fits} {\hsize} {cmr10}
-%D
-%D \hbox{\temp This Sentence Fits}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D \startregelcorrectie
-%D \ruledhbox{\haalbuffer}
-%D \stopregelcorrectie
-%D
-%D The calculated font scale is avaliable in the macro
-%D \type{\NormalizedFontSize}.
-%D
-%D One can of course combine these macros with the ones
-%D described earlier, like in:
-%D
-%D \starttypen
-%D \NormalizeFontHeight \NicelyDroppedFont {X} {2\baselineskip} {cmbx12}
-%D
-%D \def\NicelyDroppedCaps%
-%D {\DroppedCaps
-%D {\kleur[groen]}
-%D {\NicelyDroppedFont}
-%D {2pt}
-%D {\baselineskip}
-%D {2}}
-%D \stoptypen
-%D
-%D It's up to the reader to test this one.
-
-\protect
-
-\endinput
+%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
+
+%D This module implements some typographics tricks that can
+%D be fun when designing document layouts. The examples use
+%D macros that are typical to \CONTEXT, but non \CONTEXT\
+%D users can use the drop caps and first line treatment
+%D macros without problems. This module will be extended
+%D when the need for more of such tricks arises.
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+
+\writestatus{loading}{Context Support Macros / Fun Stuff}
+
+\ifx\definefont\undefined
+ \def\definefont[#1][#2]{\expandafter\font\csname#1\endcsname=#2\relax}
+\fi
+
+%D \macros
+%D {DroppedCaps}
+%D
+%D \startbuffer
+%D \DroppedCaps
+%D {\color[green]} {cmbx12}
+%D {2.2\baselineskip} {2pt} {\baselineskip} {2}
+%D Let's start
+%D \stopbuffer
+%D
+%D \haalbuffer with dropped caps, those blown up first
+%D characters of a paragraph. It's hard to implement a general
+%D mechanism that suits all situations, but dropped caps are so
+%D seldomly used that we can permit ourselves a rather user
+%D unfriendly implementation.
+%D
+%D \typebuffer
+%D
+%D As we will see, there are 7 different settings involved. The
+%D first argument takes a command that is used to do whatever
+%D fancy things we want to do, but normally this one will be
+%D empty. The second argument takes the font. Because we're
+%D dealing with something very typographic, there is no real
+%D reason to adopt complicated font switching schemes, a mere
+%D name will do. Font encodings can bring no harm, because the
+%D alphanumeric characters are nearly always located at their
+%D natural position in the encoding vector.
+%D
+%D \startbuffer
+%D \DroppedCaps
+%D {\color[red]} {cmbx12}
+%D {\baselineskip} {0pt} {0pt} {1}
+%D This simple
+%D \stopbuffer
+%D
+%D \haalbuffer case shows us what happens when we apply minimal
+%D values. Here we used:
+%D
+%D \typebuffer
+%D
+%D \startbuffer
+%D \DroppedCaps
+%D {\color[red]} {cmbx12}
+%D {2\baselineskip} {0pt} {\baselineskip} {2}
+%D In this ugly
+%D \stopbuffer
+%D
+%D \haalbuffer example the third argument tells
+%D this macro that we want a dropped capital scaled to the
+%D baseline distance. The two zero point arguments are the
+%D horizontal and vertical offsets and the last arguments
+%D determines the hanging indentation. In this paragraph we
+%D set the height to two times the baselinedistance and use
+%D two hanging lines:
+%D
+%D \typebuffer
+%D
+%D Here, the first character is moved down one baseline. Here
+%D we also see why the horizontal offset is important. The
+%D first example (showing the~L) sets this to a few points and
+%D also used a slightly larger height.
+%D
+%D Of course common users (typist) are not supposed to see this
+%D kind of fuzzy definitions, but fortunately \TEX\ permits us
+%D to hide them in macros. Using a macro also enables us to
+%D garantee consistency throughout the document:
+%D
+%D \startbuffer
+%D \def\MyDroppedCaps%
+%D {\DroppedCaps
+%D {\color[green]} {cmbx12}
+%D {5\baselineskip} {3pt} {3\baselineskip} {4}}
+%D
+%D \MyDroppedCaps The implementation
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer of the general macro is rather simple and only
+%D depends on the arguments given and the dimensions of the
+%D strut box. We explicitly load the font, which is no problem
+%D because \TEX\ does not load a font twice. We could have
+%D combined some arguments, like the height, vertical offset
+%D and the number of lines, but the current implementation
+%D proved to be the most flexible. One should be aware of the
+%D fact that the offsets depend on the design of the glyphs
+%D used.
+
+\def\DroppedCaps#1#2#3#4#5#6#7%
+ {\par
+ \vskip#6\baselineskip
+ \penalty-200
+ \vskip-#6\baselineskip
+ \setbox0=\hbox
+ {\definefont[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{\forgetall\box0}%
+ \nobreak}
+
+%D Before we go to the next topic, we summarize this command:
+%D
+%D \starttypen
+%D \DroppedCaps
+%D {command} {font}
+%D {height} {hoffset} {voffset} {lines}
+%D \stoptypen
+
+%D \macros
+%D {TreatFirstLine}
+%D
+%D \startbuffer
+%D \TreatFirstLine {\sc} {} {} {}
+%D Instead of limiting its action to one token, the next macro
+%D treats the whole first line. This paragraph was typeset by
+%D saying:
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D \typebuffer
+%D
+%D \startbuffer
+%D \TreatFirstLine {\startcolor[red]\bf} {\stopcolor} {} {}
+%D The combined color and font effect is also possible,
+%D although one must be careful in using macros that accumulate
+%D grouping, but the commands used here are pretty save in that
+%D respect.
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D \typebuffer
+%D
+%D Before we explain the third and fourth argument, we show the
+%D implementation. Those who know a bit about the way \TEX\
+%D treats tokens, will probably see in one glance that this
+%D alternative works all right for most text||only situations
+%D in which there is enough text available for the first line,
+%D but that more complicated things will blow. One has to live
+%D with that. A workaround is rather trivial but obscures the
+%D principles used.
+
+\def\TreatFirstLine#1#2#3#4% before, after, first, next
+ {\leavevmode
+ \bgroup
+ \forgetall
+ \bgroup
+ #1%
+ \setbox0=\box\voidb@x
+ \setbox2=\box\voidb@x
+ \def\grabfirstline##1 %
+ {\setbox2=\hbox
+ {\ifvoid0
+ {#3{\ignorespaces##1}}%
+ \else
+ \unhcopy0\ {#4{##1}}%
+ \fi}%
+ \ifdim\wd2=\!!zeropoint
+ \setbox0=\box\voidb@x
+ \setbox2=\box\voidb@x
+ \let\next=\grabfirstline
+ \else\ifdim\wd2>\hsize
+ \hbox to \hsize{\strut\unhbox0}#2\egroup
+ \break##1\
+ \egroup
+ \let\next=\relax
+ \else
+ \setbox0=\box2
+ \let\next=\grabfirstline
+ \fi\fi
+ \next}%
+ \grabfirstline}
+
+%D \startbuffer
+%D \gdef\FunnyCommand
+%D {\getrandomfloat\FunnyR{0}{1}%
+%D \getrandomfloat\FunnyG{0}{1}%
+%D \getrandomfloat\FunnyB{0}{1}%
+%D \definecolor[FunnyColor][r=\FunnyR,g=\FunnyG,b=\FunnyB]%
+%D \color[FunnyColor]}
+%D
+%D \TreatFirstLine {\bf} {} {\FunnyCommand} {\FunnyCommand}
+%D The third and fourth argument can be used to gain special
+%D effects on the individual words. Of course one needs ...
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D to know a bit more about the macro package used to get real
+%D nice effects, but this example probably demonstrates the
+%D principles well.
+%D
+%D \typebuffer
+%D
+%D Like in dropped caps case, one can hide such treatments in a
+%D macro, like:
+%D
+%D \starttypen
+%D \def\MyTreatFirstLine%
+%D {\TreatFirstLine{\bf}{}{\FunnyCommand}{\FunnyCommand}}
+%D \stoptypen
+
+%D \macros
+%D {reshapebox}
+%D
+%D \startbuffer
+%D \beginofshapebox
+%D When using \CONTEXT, one can also apply this funny command
+%D to whole lines by using the reshape mechanism. Describing
+%D this interesting mechanism falls outside the scope of this
+%D module, so we only show the trick. This is an example of
+%D low level \CONTEXT\ functionality: it's all there, and it's
+%D stable, but not entirely meant for novice users.
+%D \endofshapebox
+%D
+%D \reshapebox{\FunnyCommand{\box\shapebox}} \flushshapebox
+%D \stopbuffer
+%D
+%D \haalbuffer
+%D
+%D \typebuffer
+%D
+%D This mechanism permits hyphenation and therefore gives
+%D better results than the previously discussed macro
+%D \type{\TreatFirstLine}.
+
+%D \macros
+%D {TreatFirstCharacter}
+%D
+%D \startbuffer
+%D \TreatFirstCharacter{\bf\color[green]} Just to be
+%D \stopbuffer
+%D
+%D \haalbuffer complete we also offer a very simple one
+%D character alternative, that is not that hard to understand:
+
+\def\TreatFirstCharacter#1#2% command, character
+ {{#1{#2}}}
+
+%D A previous paragraph started with:
+%D
+%D \typebuffer
+
+%D \macros
+%D {StackCharacters}
+%D
+%D The next hack deals with vertical stacking.
+
+\def\StackCharacters#1#2#3#4% sequence vsize vskip command
+ {\vbox #2
+ {\forgetall
+ \baselineskip0pt
+ \def\StackCharacter##1{#4{##1}\cr\noalign{#3}}%
+ \halign
+ {\hss##\hss&##\cr
+ \handletokens#1\with\StackCharacter\cr}}}
+
+%D \startbuffer
+%D \StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}
+%D \stopbuffer
+%D
+%D Such a stack looks like:
+%D
+%D \startregelcorrectie
+%D \hbox to \hsize
+%D {$\hss\bfd
+%D \vcenter{\StackCharacters{TEX} {}{\vskip.2ex}{\FunnyCommand}}%
+%D \hss
+%D \vcenter{\StackCharacters{CON} {}{\vskip.2ex}{\FunnyCommand}}
+%D \hss
+%D \vcenter{\StackCharacters{TEXT} {}{\vskip.2ex}{\FunnyCommand}}
+%D \hss
+%D \vcenter{\StackCharacters{CONTEXT}{}{\vskip.2ex}{\FunnyCommand}}
+%D \hss$}
+%D \stopregelcorrectie
+%D
+%D and is typeset by saying:
+%D
+%D \typebuffer
+%D
+%D An alternative would have been
+%D
+%D \starttypen
+%D \StackCharacters {CONTEXT} {to 5cm} {\vfill} {\FunnyCommand}
+%D \stoptypen
+
+%D \macros
+%D {processtokens}
+%D
+%D At a lower level horizontal and vertical manipulations are
+%D already supported by:
+%D
+%D \starttypen
+%D \processtokens {begin} {between} {end} {space} {text}
+%D \stoptypen
+%D
+%D \startbuffer[a]
+%D \processtokens
+%D {\hbox to .5\hsize\bgroup} {\hfill}
+%D {\egroup} {\space} {LET'S HAVE}
+%D \stopbuffer
+%D
+%D \startbuffer[b]
+%D \processtokens
+%D {\vbox\bgroup\raggedcenter\hsize1em}
+%D {\vskip.25ex} {\egroup} {\strut} {FUN}
+%D \stopbuffer
+%D
+%D This macro is able to typeset:
+%D
+%D \leavevmode\hbox to \hsize
+%D {$\hfil\hfil
+%D \vcenter{\bf\haalbuffer[a]}%
+%D \hfil
+%D \vcenter{\bfd\haalbuffer[b]}%
+%D \hfil\hfil$}
+%D
+%D which was specified as:
+%D
+%D \typebuffer[a]
+%D \typebuffer[b]
+
+%D \macros
+%D {NormalizeFontHeight, NormalizeFontWidth}
+%D
+%D Next we introduce some font manipulation macros. When we
+%D want to typeset some text spread in a well defined area, it
+%D can be considered bad practice to manipulate character and
+%D word spacing. In such situations the next few macros can be
+%D of help:
+%D
+%D \starttypen
+%D \NormalizeFontHeight \name {sample text} {height} {font}
+%D \NormalizeFontWidth \name {sample text} {width} {font}
+%D \stoptypen
+%D
+%D These are implemented using an auxilliary macro:
+
+\def\NormalizeFontHeight%
+ {\NormalizeFontSize\ht}
+
+\def\NormalizeFontWidth%
+ {\NormalizeFontSize\wd}
+
+\def\NormalizeFontSize#1#2#3#4#5%
+ {\bgroup
+ \dimen0=#4% #4 can be \ht0 or so
+ \setbox0=\hbox{\definefont[temp][#5 at 10pt]\temp#3}%
+ \dimen2=#10 % #1 is \wd or \ht
+ \dimen4=10000pt
+ \divide\dimen4 by \dimen2
+ \divide\dimen0 by 1000
+ \dimen0=\number\dimen4\dimen0
+ \definefont[temp][#5 at \the\dimen0]%
+ \temp
+ \expandafter
+ \egroup
+ \expandafter\font\expandafter#2\expandafter=\fontname\font\relax}
+
+%D Consider for instance:
+%D
+%D \startbuffer
+%D \NormalizeFontHeight \tmp {X} {2\baselineskip} {cmr10}
+%D
+%D {\tmp To Be Or Not To Be}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This shows up as (we also show the baselines):
+%D
+%D {\showbaselines\haalbuffer}
+%D
+%D The horizontal counterpart is:
+%D
+%D \startbuffer
+%D \NormalizeFontWidth \tmp {This Line Fits} {\hsize} {cmr10}
+%D
+%D \hbox{\tmp This Line Fits}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D The calculated font scale is avaliable in the macro
+%D \type{\NormalizedFontSize}.
+%D
+%D \startregelcorrectie
+%D \ruledhbox{\haalbuffer}
+%D \stopregelcorrectie
+%D
+%D One can of course combine these macros with the ones
+%D described earlier, like in:
+%D
+%D \starttypen
+%D \NormalizeFontHeight {text} \DroppedFont {2\baselineskip} {cmbx12}
+%D
+%D \def\NicelyDroppedCaps%
+%D {\DroppedCaps
+%D {\kleur[groen]}
+%D {\DroppedFont}
+%D {2pt}
+%D {\baselineskip}
+%D {2}}
+%D \stoptypen
+%D
+%D It's up to the reader to test this one.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-ini.tex b/tex/context/base/supp-ini.tex
index d409365a1..857d3d512 100644
--- a/tex/context/base/supp-ini.tex
+++ b/tex/context/base/supp-ini.tex
@@ -1,19 +1,18 @@
-%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
+%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
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index e64967aef..a709da662 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -1,687 +1,927 @@
-%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}&#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% {{#4}} keeps move local
- {\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
+%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}&#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
+
+\writestatus{loading}{Context Support Macros / Language Options}
+
+%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 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.
+
+\beginTEX
+
+\def\installdiscretionaries#1#2#3%
+ {\convertargument#1\to\ascii
+ \setevalue{mathmodediscretionary\string#1}{\ascii}%
+ \setvalue{textmodediscretionary\string#1}{#3}%
+ \catcode`#1=\@@active
+ \scratchcounter=\the\uccode`~
+ \uccode`~=`#1
+ \uppercase{\unexpanded\def~{\discretionarycommand~}}%
+ \uccode`~=\scratchcounter}
+
+\endTEX
+
+\beginETEX \detokenize
+
+\def\installdiscretionaries#1#2#3%
+ {\setevalue{mathmodediscretionary\string#1}{\detokenize{#1}}%
+ \setvalue{textmodediscretionary\string#1}{#3}%
+ \catcode`#1=\@@active
+ \scratchcounter=\the\uccode`~
+ \uccode`~=`#1
+ \uppercase{\unexpanded\def~{\discretionarycommand~}}%
+ \uccode`~=\scratchcounter}
+
+\endETEX
+
+\def\dohandlemathmodebar#1%
+ {\getvalue{mathmodediscretionary\string#1}}
+
+\def\discretionarycommand%
+ {\relax\ifmmode
+ \expandafter\dohandlemathmodebar
+ \else
+ \expandafter\dotextmodediscretionary
+ \fi}
+
+%D The next piece of code is a torture test for this previous
+%D macro. The \type {\relax} before the \type {\ifmmode} is
+%D needed because of the alignment scanner (in \ETEX\ this
+%D problem is not present because there a protected macro is
+%D not expanded. Thanks to Tobias Burnus for providing this
+%D example.
+%D
+%D \startformule
+%D \left|f(x_n)-{1\over2}\right| =
+%D {\cases{|{1\over2}-x_n| &for $0\le x_n < {1\over2}$\cr
+%D |x_n-{1\over2}| &for ${1\over2}<x_n\le1$ \cr}}
+%D \stopformule
+
+%D \macros
+%D {defineactivecharacter}
+%D
+%D In \type {lang-ger.tex} we define some language specific
+%D commands for german input, like:
+%D
+%D \starttyping
+%D \startlanguagespecifics[de]
+%D \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary}
+%D \stoplanguagespecifics
+%D \stoptyping
+%D
+%D Occasionally we have to redefine such an active character,
+%D like in:
+%D
+%D \starttyping
+%D \startencoding[pdfdoc]
+%D \startlanguagespecifics[de]
+%D \defineactivecharacter " {\"}
+%D \stoplanguagespecifics
+%D \stopencoding
+%D \stoptyping
+%D
+%D Here is the command we used:
+
+\def\defineactivecharacter #1 #2%
+ {\catcode`#1=\@@active
+ \scratchcounter=\the\uccode`~
+ \uccode`~=`#1\relax
+ \def\next{#2}%
+ \uppercase{\let~\next}%
+ \uccode`~=\scratchcounter}
+
+%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
+ \prewordbreak
+ \discretionary{\hbox{\betweendiscretionary}}{}{\hbox{\betweendiscretionary}}%
+ \postwordbreak
+ \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 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 \macros
+%D {fakecompoundhyphen}
+%D
+%D In headers and footers as well as in active pieces of text
+%D we need a dirty hack. Try to imagine what is needed to
+%D savely break the next text across a line and at the same
+%D time make the words interactive.
+%D
+%D \starttypen
+%D \goto{Some||Long||Word}
+%D \stoptypen
+
+\def\currentspaceskip%
+ {\fontdimen2\font\!!plus\fontdimen3\font\!!minus\fontdimen4\font\relax}
+
+\def\fakecompoundhyphen%
+ {\def|##1|{\compoundhyphen\nobreak\hskip-\currentspaceskip\allowbreak}}
+
+%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 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
+ \prewordbreak
+ \discretionary{\hbox{\betweendiscretionary}}{}{\hbox{\betweendiscretionary}}%
+ \postwordbreak
+ \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 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% {{#4}} keeps move local
+ {\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
+ \def\next{\getvalue{\@nc@\string#1}}% better
+ \else
+ \def\next{\dodohandlecompoundcharacter#1}%
+ \fi\fi\fi
+ \next}%
+ \futurelet\next\dohandlecompoundcharacter}
+
+\def\dodohandlecompoundcharacter#1#2%
+ {\def\dododohandlecompoundcharacter% Keep it here and
+ {\ifx\next\bgroup % preserve spaces!
+ \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.
+
+\beginTEX
+
+\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}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\long\def\handlecompoundcharacterone#1#2%
+ {\ifx#1#2%
+ \def\next{\getvalue{\@nc@\string#1}\getvalue{\@nc@\string#2}}%
+ \else\ifcsname\@cc@\string#1\string#2\endcsname
+ \def\next{\getvalue{\@cc@\string#1\string#2}}%
+ \else
+ \def\next{\getvalue{\@nc@\string#1}#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\ifcsname\@cs@\string#1\string#2\string#3\endcsname
+ \def\next{\getvalue{\@cs@\string#1\string#2\string#3}}%
+ \else\ifcsname\@cc@\string#1\string#2\endcsname
+ \def\next{\getvalue{\@cc@\string#1\string#2}#3}%
+ \else
+ \def\next{\getvalue{\@nc@\string#1}#2#3}%
+ \fi\fi\fi
+ \next}
+
+\endETEX
+
+%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}
+
+%D \macros
+%D {hyphenatedurl}
+%D
+%D For those who want to put full \URL's in a text, we offer
+%D
+%D \startbuffer
+%D \hyphenatedurl{http://optimist.optimist/optimist/optimist.optimist#optimist}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D which breaks at the appropriate places. Watch the \type{#}
+%D hack.
+%D
+%D When passed as argument, lik ein \type {\goto}, one needs
+%D to substitute a \type {\\} for each \type{#}.
+%D
+%D \startbuffer
+%D \hyphenatedurl{http://this.is.a.rather/strange/reference#indeed}
+%D \stopbuffer
+%D
+%D \typebuffer
+
+\ifx\\\undefined \let\\\crlf \fi
+
+\chardef\urlsplitmode=1
+
+% 0 => don't split
+% 1 => . : na, rest voor
+% 2 => alles na
+% 3 => alles voor
+
+\unexpanded\def\hyphenatedurl#1%
+ {\bgroup
+ \obeyhyphens
+ \def\splitbefore##1%
+ {\setbox\scratchbox=\hbox{##1{}{}}%
+ \ifcase\urlsplitmode
+ \box\scratchbox
+ \or
+ \postwordbreak\box\scratchbox\prewordbreak
+ \or
+ \prewordbreak\discretionary{\box\scratchbox}{}{\box\scratchbox}\prewordbreak
+ \else
+ \postwordbreak\box\scratchbox\prewordbreak
+ \fi}%
+ \def\splitafter##1%
+ {\ifcase\urlsplitmode
+ ##1%
+ \or
+ \prewordbreak\discretionary{##1}{}{##1}\prewordbreak
+ \or
+ \prewordbreak\discretionary{##1}{}{##1}\prewordbreak
+ \else
+ \prewordbreak\discretionary{}{##1}{##1}\prewordbreak
+ \fi}%
+ \def\flushurl%
+ {\savedurl\let\savedurl\empty}%
+ \def\\%
+ {\spliturl\#}%
+ \let~\~%
+ \let\savedurl\empty
+ \handletokens#1\with\scanurl
+ \egroup}
+
+\bgroup
+\catcode`\#=12\gdef\hashletter {#}
+\catcode`\_=12\gdef\underscoreletter {_}
+\catcode`\~=12\gdef\tildeletter {~}
+\catcode`\%=12\gdef\percentletter {%}
+\catcode`\?=12\gdef\questionmarkletter{?}
+\catcode`\@=12\gdef\atletter {@}
+\egroup
+
+\def\scanurl#1%
+ {\ifx#1\~%
+ \flushurl\splitbefore{\~{}}%
+ \else\ifx#1\#%
+ \flushurl\splitbefore\#%
+ \else\ifx#1\&%
+ \flushurl\splitbefore\&%
+ \else\ifx#1\%%
+ \flushurl\splitbefore\%%
+ \else\ifx#1\_%
+ \flushurl\splitbefore\_%
+ \else\if\noexpand#1\relax
+ #1%
+ \else\ifnum\catcode`#1=8
+ \flushurl\splitbefore\_%
+ \else\ifnum\catcode`#1=6
+ \flushurl\splitbefore\#%
+ \else\if#1\tildeletter
+ \flushurl\splitbefore\~%
+ \else\if#1\percentletter
+ \flushurl\splitbefore\%%
+ \else\if#1\underscoreletter
+ \flushurl\splitbefore\_%
+ \else\if#1\questionmarkletter
+ \flushurl\splitafter\questionmarkletter
+ \else\if#1\atletter
+ \flushurl\splitafter\atletter
+ \else\if#1+%
+ \flushurl\splitafter+%
+ \else\if#1:%
+ \flushurl\splitafter:%
+ \else\if#1.%
+ \flushurl\splitafter.%
+ \else\if#1/%
+ \edef\savedurl{\savedurl/}%
+ \else
+ \ifx\savedurl\empty\else
+ \splitbefore\savedurl
+ \let\savedurl\empty
+ \fi
+ #1%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+%D \macros
+%D {hyphenatedfile}
+%D
+%D For the moment we treat filenames in a similar way,
+%D
+%D \starttypen
+%D \hyphenatedfile{here/there/filename.suffix}
+%D \stoptypen
+
+\let\hyphenatedfile\hyphenatedurl
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.tex
new file mode 100644
index 000000000..4c4641c30
--- /dev/null
+++ b/tex/context/base/supp-mat.tex
@@ -0,0 +1,157 @@
+%D \module
+%D [ file=supp-mat,
+%D version=1998.09.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Math,
+%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 For practical reasons, I decided to move some math things to
+%D a support module. There is nothing spectacular here.
+
+\writestatus{loading}{Context Support Macros / Math}
+
+\unprotect
+
+%D \macros
+%D {mathematics, startmathmode}
+%D
+%D The \type{$} can be both an begin and end math character.
+%D This can lead to confusing and errorprone situations when
+%D macros insert \type{$}. When for instance we have defined:
+%D
+%D \starttypen
+%D \def\MyPlus{$\,+\,$}
+%D \stoptypen
+%D
+%D the sequence \type{$x^2 \MyPlus y^2 = r^2$} will expand to:
+%D
+%D \starttypen
+%D $x^2 $\,+\,$ y^2 = r^2$
+%D \stoptypen
+%D
+%D Here the \type{\,} are given outside math mode and \TEX\ will
+%D definitely complain about this. A more save definition would
+%D have been:
+%D
+%D \starttypen
+%D \def\MyPlus{\mathematics{\,+\,}}
+%D \stoptypen
+%D
+%D Which is implemented as:
+
+\def\mathematics#1%
+ {\ifmmode#1\else$#1$\fi}
+
+\def\startmathmode%
+ {\ifmmode
+ \let\stopmathmode=\relax
+ \else
+ $\def\stopmathmode{$}% \let\stopmathmode=$
+ \fi}
+
+%D \macros
+%D {dimension, nodimension}
+%D
+%D The next few macros are used for typesetting dimensions in
+%D such a way that spacing is acceptable. I won't spend much
+%D words on these macros, because they will be overloaded in
+%D the units module.
+
+\newsignal\dimensionsignal
+
+\def\dimensiontypeface {\tf}
+\def\dimensionhalfspace {\,}
+
+\unexpanded\def\dimension#1%
+ {\def\dodimensionsignal{\kern\dimensionsignal}%
+ \ifdim\lastskip=\!!zeropoint\relax
+ \ifdim\lastkern=\!!zeropoint\relax
+ \ifmmode
+ \mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \mathematics{\dimensiontypeface#1}%
+ \fi
+ \else\ifdim\lastkern=\dimensionsignal
+ \mathematics{\dimensionhalfspace\dimensiontypeface#1}%
+ \else
+ \unkern\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi\fi
+ \else
+ \unskip\mathematics{\dimensionhalfspace\dimensionhalfspace\dimensiontypeface#1}%
+ \fi
+ \dodimensionsignal}
+
+\unexpanded\def\nodimension#1%
+ {\unskip#1\global\let\dodimensionsignal\relax}
+
+%D \macros
+%D {super, suber}
+%D
+%D \TEX\ uses \type{^} and \type{_} for entering super- and
+%D subscript mode. We want however a bit more control than
+%D normally provided, and therefore provide \type {\super}
+%D and \type{suber}.
+
+\global\let\normalsuper=^
+\global\let\normalsuber=_
+
+\newcount\supsubmode
+
+\newevery\everysupsub \EverySupSub
+
+\appendtoks \advance\supsubmode by 1\relax \to \everysupsub
+
+% \def\dodosuper#1{\normalsuper{\the\everysupsub#1}}
+% \def\dodosuber#1{\normalsuber{\the\everysupsub#1}}
+%
+% \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi}
+% \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi}
+%
+% \def\super{\futurelet\next\dosuper}
+% \def\suber{\futurelet\next\dosuber}
+
+\def\super#1{\normalsuper{\the\everysupsub#1}}
+\def\suber#1{\normalsuber{\the\everysupsub#1}}
+
+%D \macros
+%D {enablesupsub}
+%D
+%D We can let \type {^} and \type {_} act like \type {\super}
+%D and \type {\suber} by saying \type {\enablesupsub}.
+
+\bgroup
+\catcode`\^=\@@active
+\catcode`\_=\@@active
+\gdef\enablesupsub%
+ {\catcode`\^=\@@active
+ \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
+ \catcode`\_=\@@active
+ \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}}
+\egroup
+
+%D \macro
+%D {restoremathstyle}
+%D
+%D We can pick up the current math style by calling \type
+%D {\restoremathstyle}.
+
+\def\restoremathstyle%
+ {\ifmmode
+ \ifcase\supsubmode
+ \textstyle
+ \or
+ \scriptstyle
+ \else
+ \scriptscriptstyle
+ \fi
+ \fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
new file mode 100644
index 000000000..954180bfc
--- /dev/null
+++ b/tex/context/base/supp-mis.tex
@@ -0,0 +1,451 @@
+%D \module
+%D [ file=supp-mis,
+%D version=1997.01.04,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Missing (For Generic Use),
+%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 Some support modules are more or less independant. This
+%D module, which is not part of plain \CONTEXT, provides the
+%D missing macros and declarations of registers.
+
+\ifx \undefined \writestatus \else \expandafter \endinput \fi
+
+%D \macros
+%D {ifnocontextobject}
+%D
+%D First we take care of redundant defining. The next set of
+%D macros are a bit complicated by the fact that Plain
+%D \TEX\ defines the \type{\new}||macros as being outer.
+%D Furthermore nested \type{\if}'s can get us into
+%D trouble.
+
+\def\definecontextobject%
+ {\iftrue}
+
+\def\gobblecontextobject%
+ {\setbox0=\hbox
+ \bgroup
+ \long\def\gobblecontextobject##1\fi{\egroup}%
+ \expandafter\gobblecontextobject\string}
+
+\long\def\ifnocontextobject#1\do%
+ {\ifx#1\undefined
+ \let\next=\definecontextobject
+ \else
+ %\writestatus{system}{beware of conflicting \string#1}%
+ \let\next=\gobblecontextobject
+ \fi
+ \next}
+
+%D \macros
+%D {beginETEX,beginTEX}
+%D
+%D Outside \CONTEXT\ we will not be \ETEX||aware.
+
+\long\def\beginETEX#1\endETEX{}
+
+\let\beginTEX\relax \let\endTEX\relax
+
+%D \macros
+%D {writestatus}
+%D
+%D We start each module with a message. Normally the output is
+%D formatted, but here we keep things simple.
+
+\ifnocontextobject \writestatus \do
+
+ \def\writestatus#1#2%
+ {\immediate\write16{#1 : #2}}
+
+\fi
+
+%D Lets see if it works.
+
+\writestatus{loading}{Context Support Macros / Missing}
+
+%D \macros
+%D {protect,unprotect}
+%D
+%D Next we present a poor mans alternative for \type{\protect}
+%D and \type{\unprotect}, two commands that enable us to use
+%D the characters \type{@}, \type{!} and \type{?} in macro
+%D names.
+
+\ifnocontextobject \protect \do
+
+ \let\protect=\relax
+
+\fi
+
+\newcount\protectiondepth
+
+\ifnocontextobject \unprotect \do
+
+ \def\unprotect%
+ {\advance\protectiondepth 1
+ \ifnum\protectiondepth=1
+ \let\normalprotect=\protect
+ \def\protect%
+ {\ifnum\protectiondepth>0
+ \advance\protectiondepth -1
+ \ifnum\protectiondepth=0
+ \doprotect
+ \let\protect=\normalprotect
+ \fi
+ \fi}
+ \edef\doprotect%
+ {\catcode`\noexpand @=\the\catcode`@\relax
+ \catcode`\noexpand !=\the\catcode`!\relax
+ \catcode`\noexpand ?=\the\catcode`?\relax}
+ \catcode`@=11
+ \catcode`!=11
+ \catcode`?=11
+ \fi}
+
+\fi
+
+%D We start using this one it at once.
+
+\unprotect
+
+%D \macros
+%D {scratch...,if...,next...}
+%D
+%D We need some scratch registers. Users are free to use them,
+%D but can never be sure of their value once another macro is
+%D called. We only allocate things when they are yet
+%D undefined. This way we can't mess up other macro packages,
+%D but of course previous definitions can mess up our modules.
+
+\ifnocontextobject \scratchcounter \do \newcount \scratchcounter \fi
+\ifnocontextobject \scratchdimen \do \newdimen \scratchdimen \fi
+\ifnocontextobject \scratchskip \do \newskip \scratchskip \fi
+\ifnocontextobject \scratchmuskip \do \newmuskip \scratchmuskip \fi
+\ifnocontextobject \scratchbox \do \newbox \scratchbox \fi
+\ifnocontextobject \scratchread \do \newread \scratchread \fi
+\ifnocontextobject \scratchwrite \do \newwrite \scratchwrite \fi
+
+\ifnocontextobject \nextbox \do \newbox \nextbox \fi
+
+\ifnocontextobject \nextdepth \do \newdimen \nextdepth \fi
+
+\ifnocontextobject \CONTEXTtrue \do \newif\ifCONTEXT \fi
+\ifnocontextobject \donetrue \do \newif\ifdone \fi
+\ifnocontextobject \eightbitcharacterstrue \do \newif\ifeightbitcharacters \fi
+\ifnocontextobject \MPdrawingdonetrue \do \newif\ifMPdrawingdone \fi
+
+%D \macros
+%D {@@...}
+%D
+%D We use symbolic name for \CATCODES. They can only be used
+%D when we are in unprotected state.
+
+\ifnocontextobject \@@escape \do \chardef\@@escape = 0 \fi
+\ifnocontextobject \@@begingroup \do \chardef\@@begingroup = 1 \fi
+\ifnocontextobject \@@endgroup \do \chardef\@@endgroup = 2 \fi
+\ifnocontextobject \@@endofline \do \chardef\@@endofline = 5 \fi
+\ifnocontextobject \@@ignore \do \chardef\@@ignore = 9 \fi
+\ifnocontextobject \@@space \do \chardef\@@space = 10 \fi
+\ifnocontextobject \@@letter \do \chardef\@@letter = 11 \fi
+\ifnocontextobject \@@other \do \chardef\@@other = 12 \fi
+\ifnocontextobject \@@active \do \chardef\@@active = 13 \fi
+\ifnocontextobject \@@comment \do \chardef\@@comment = 14 \fi
+
+%D \macros
+%D {everyline,EveryLine,EveryPar}
+%D
+%D In \CONTEXT\ we use \type{\everypar} for special purposes
+%D and provide \type{\EveryPar} as an alternative. The same
+%D goes for \type{\everyline} and \type{\EveryLine}.
+
+\ifnocontextobject \everyline \do \newtoks\everyline \fi
+\ifnocontextobject \EveryPar \do \let\EveryPar =\everypar \fi
+\ifnocontextobject \EveryLine \do \let\EveryLine=\everyline \fi
+
+%D \macros
+%D {!!...}
+%D
+%D We reserve ourselves some scratch strings (i.e. macros)
+%D and some more counters.
+
+\ifnocontextobject \!!stringa \do \def\!!stringa {} \fi
+\ifnocontextobject \!!stringb \do \def\!!stringb {} \fi
+\ifnocontextobject \!!stringc \do \def\!!stringc {} \fi
+\ifnocontextobject \!!stringd \do \def\!!stringd {} \fi
+
+\ifnocontextobject \!!counta \do \newcount\!!counta {} \fi
+\ifnocontextobject \!!countb \do \newcount\!!countb {} \fi
+
+%D \macros
+%D {!!...}
+%D
+%D The next set of definitions speed up processing a bit.
+%D Furthermore it saves memory.
+
+\ifnocontextobject \!!zeropoint \do \def\!!zeropoint {0pt} \fi
+\ifnocontextobject \!!tenthousand \do \def\!!tenthousand {10000} \fi
+
+\ifnocontextobject \!!width \do \def\!!width {width} \fi
+\ifnocontextobject \!!height \do \def\!!height {height} \fi
+\ifnocontextobject \!!depth \do \def\!!depth {depth} \fi
+
+\ifnocontextobject \!!plus \do \def\!!plus {plus} \fi
+\ifnocontextobject \!!minus \do \def\!!minus {minus} \fi
+\ifnocontextobject \!!to \do \def\!!to {to} \fi
+
+%D \macros
+%D {smashbox}
+%D
+%D The system modules offer a range of smashing macros, of
+%D which we only copied \type{\smashbox}.
+
+\ifnocontextobject \smashbox \do
+
+ \def\smashbox#1%
+ {\wd#1=\!!zeropoint
+ \ht#1=\!!zeropoint
+ \dp#1=\!!zeropoint}
+
+\fi
+
+%D \macros
+%D {dowithnextbox}
+%D
+%D Also without further comment, we introduce a macro that
+%D gets the next box and does something usefull with it.
+%D Because the \type{\afterassignment} is executed inside the
+%D box, we have to use a \type{\aftergroup} too.
+
+\ifnocontextobject \dowithnextbox \do
+
+ \def\dowithnextbox#1%
+ {\def\dodowithnextbox{#1}%
+ \afterassignment\dododowithnextbox
+ \setbox\nextbox}
+
+ \def\dododowithnextbox%
+ {\aftergroup\dodowithnextbox}
+
+\fi
+
+%D \macros
+%D {setvalue,getvalue,letvalue,setgvalue}
+%D
+%D The next two macros expand their argument to
+%D \type{\argument}. The first one is used to define macro's
+%D the second one executes them.
+
+\ifnocontextobject \setvalue \do
+
+ \def\setvalue #1{\expandafter\def\csname#1\endcsname}
+ \def\getvalue #1{\csname#1\endcsname}
+ \def\letvalue #1{\expandafter\let\csname#1\endcsname}
+ \def\setgvalue#1{\expandafter\gdef\csname#1\endcsname}
+
+\fi
+
+%D \macros
+%D {unexpanded}
+%D
+%D The next command can be used as prefixed for commands that
+%D need protection during tests and writing to files. This
+%D is a very \CONTEXT\ specific one.
+
+\ifnocontextobject \unexpanded \do
+
+ \let\unexpanded=\relax
+
+\fi
+
+%D \macros
+%D {convertargument}
+%D
+%D The original one offers a bit more, like global assignment, the
+%D the next implementation is however a bit more byte saving.
+
+\ifnocontextobject \convertargument \do
+
+ \def\doconvertargument#1>{}
+
+ \long\def\convertargument#1\to#2%
+ {\long\def\convertedargument{#1}%
+ \edef#2{\expandafter\doconvertargument\meaning\convertedargument}}
+
+\fi
+
+%D \macros
+%D {forgetall}
+%D
+%D Sometimes we have to disable interference of whatever kind
+%D of skips and mechanisms. The next macro resets some.
+
+\ifnocontextobject \forgetall \do
+
+ \def\forgetall%
+ {\parskip\!!zeropoint
+ \leftskip\!!zeropoint
+ \parindent\!!zeropoint
+ \everypar{}}
+
+\fi
+
+%D \macros
+%D {withoutpt}
+%D
+%D \TEX\ lacks some real datastructure. We can however use
+%D \DIMENSIONS. This kind of trickery is needed when we want
+%D \TEX\ to communicate with the outside world (by means of
+%D \type{\specials}).
+
+\ifnocontextobject \withoutpt \do
+
+ {\catcode`\.=\@@other
+ \catcode`\p=\@@other
+ \catcode`\t=\@@other
+ \gdef\WITHOUTPT#1pt{#1}}
+
+ \def\withoutpt#1%
+ {\expandafter\WITHOUTPT#1}
+
+ \def\ScaledPointsToBigPoints#1#2%
+ {\scratchdimen=#1sp\relax
+ \scratchdimen=.996264\scratchdimen
+ \edef#2{\withoutpt{\the\scratchdimen}}}
+
+\fi
+
+%D \macros
+%D {doprocessfile}
+%D
+%D This macro takes three arguments: the file number, the
+%D filename and a macro that handles the content of a read
+%D line.
+
+\newif\iffileprocessed
+
+\ifnocontextobject \doprocessfile \do
+
+ \def\doprocessfile#1#2#3%
+ {\openin#1=#2\relax
+ \ifeof#1%
+ \fileprocessedfalse
+ \closein#1\relax
+ \else
+ \fileprocessedtrue
+ \gdef\dofinishfile%
+ {\closein#1\relax
+ \global\let\doprocessline=\relax}%
+ \gdef\doprocessline%
+ {\ifeof#1%
+ \dofinishfile
+ \else
+ \global\read#1 to \fileline
+ #3\relax
+ \expandafter\doprocessline
+ \fi}%
+ \expandafter\doprocessline
+ \fi}
+
+\fi
+
+%D \macros
+%D {uncatcodespecials}
+%D
+%D This one is taken from the \TEX\ book. The \CONTEXT\
+%D alternative is a bit different, but we hope this one works
+%D here.
+
+\ifnocontextobject \uncatcodespecials \do
+
+ \def\uncatcodespecials%
+ {\def\do##1{\catcode`##1=12 }\dospecials}
+
+\fi
+
+\ifnocontextobject \setnaturalcatcodes \do
+
+\def\setnaturalcatcodes%
+ {\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other
+ \catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other
+ \catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other
+ \catcode`\*=\@@other \catcode`\/=\@@other
+ \catcode`\-=\@@other \catcode`+=\@@other
+ \catcode`\==\@@other \catcode`\<=\@@other \catcode`\>=\@@other
+ \catcode`\"=\@@other \catcode`\'=\@@other \catcode`\`=\@@other
+ \catcode`\:=\@@other \catcode`\;=\@@other
+ \catcode`\,=\@@other \catcode`\.=\@@other \catcode`\~=\@@other
+ \catcode`\(=\@@other \catcode`\)=\@@other
+ \catcode`\{=\@@other \catcode`\}=\@@other}
+
+\fi
+
+%D \macros
+%D {doglobal}
+%D
+%D Some \CONTEXT\ low level macros can have a \type{\doglobal}
+%D prefix. Let's just forget about that here:
+
+\ifnocontextobject \doglobal \do \let\doglobal=\relax \fi
+
+%D The next obscure one is needed in the generic verbatim
+%D environment. When we end up with more of these, it's time
+%D to load the module \type{syst-gen}.
+
+\ifnocontextobject \doifincsnameelse \do
+
+ \def\dodoifincsnameelse#1#2%
+ {\def\dododoifincsnameelse##1#1##2##3\war%
+ {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
+ \expandafter\dododoifincsnameelse#2#1@@\war}
+
+ \long\def\doifincsnameelse#1#2#3#4%
+ {\edef\@@instring{#1}%
+ \expandafter\dodoifincsnameelse\expandafter{\@@instring}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+\fi
+
+%D \macros
+%D {dostepwiserecurse}
+%D
+%D The next loop macro is a real weak one, and does not offer
+%D the full \CONTEXT\ functionality, let alone nesting, but
+%D for simple purposes, its behaviour is acceptable.
+
+\newcount\recursecounter
+
+\def\dostepwiserecurse#1#2#3#4% very weak and rubishly version
+ {\ifnum#2<#1\relax\else\dodostepwiserecurse{#1}{#2}{#3}{#4}\fi}
+
+\def\dodostepwiserecurse#1#2#3#4% very weak and rubishly version
+ {\recursecounter=#1\relax
+ \loop
+ \edef\recurselevel{\the\recursecounter}%
+ #4\relax
+ \ifnum\recursecounter<#2\relax
+ \advance\recursecounter by #3\relax
+ \repeat}
+
+%D \macros
+%D {twodigitrounding}
+%D
+%D We don't support rounding outside \CONTEXT. Sorry.
+
+\def\twodigitrounding#1{#1}
+
+%D That's it. Please forget this junk and take a look at how
+%D it should be done.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index d3a0e2115..99f16509b 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -1,865 +1,1045 @@
-%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
-
-% The MP generation support is still experimental.
-
-%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:
-
-\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
-
-\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:
-
-\long\def\startMPgraphic#1\stopMPgraphic%
- {\startwritingMPgraphic
- \writeMPgraphic{#1}%
- \stopwritingMPgraphic}
-
-%D \macros
-%D {startMPrun}
-%D
-%D If we just wat to run \METAPOST\ code, that is, not to
-%D explictly generate a figure in terms of \type{beginfig} and
-%D \type{endfig}, we can use:
-%D
-%D \starttypen
-%D \startMPgraphic
-%D \stopMPgraphic
-%D \stoptypen
-%D
-%D \starttypen
-%D \startMPrun
-%D \stopMPrun
-%D \stoptypen
-%D
-%D The next boolean is for internal purposes only.
-
-\newif\ifMPrun \MPrunfalse
-
-\long\def\startMPrun#1\stopMPrun% geeft nog conflicten met nummer!
- {\MPruntrue
- \startwritingMPgraphic
- \writeMPgraphic{#1}%
- \stopwritingMPgraphic
- \MPrunfalse}
-
-%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 \macros
-%D {MPgraphic}
-%D
-%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 \COUNTER. This counter is available
-%D in \type{\MPgraphic}.
-
-\newcount\currentMPgraphic
-
-\def\MPgraphic{0}
-
-%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 \macros
-%D {MPinclusions, startMPinclusions}
-%D
-%D One can include for instance common input commands by
-%D passing them to \type{\MPinclusions}:
-%D
-%D \starttypen
-%D \MPinclusions{input tools}
-%D \stoptypen
-
-\let\theMPinclusions=\empty
-
-\long\def\startMPinclusions#1\stopMPinclusions%
- {\long\def\theMPinclusions{\writeMPgraphic{#1}}}
-
-\long\def\MPinclusions#1%
- {\startMPinclusions#1\stopMPinclusions}
-
-%D \macros
-%D {iflongMPlines}
-%D
-%D When grabbing a graphic deifnition, newlines are turned
-%D into spaces. By default we split the graphic definition
-%D at the colon, but long lines are still possible by
-%D setting the next boolean to true.
-
-\newif\iflongMPlines
-
-\long\def\writeMPgraphic#1%
- {\bgroup
- \iflongMPlines
- \let\par=\empty
- \long\def\flush##1##2\par%
- {\ifx##1\relax \else
- \immediate\write\scratchwrite{##1##2}%
- \expandafter\flush
- \fi}%
- \flush#1\empty\par\relax\par
- \else
- \long\def\flush##1##2;%
- {\ifx##1\relax \else
- \dowriteMPgraphicline##1##2btex\relax etex\end
- \expandafter\flush
- \fi}%
- \flush#1\empty;\relax;%
- \fi
- \egroup}
-
-%D The \type{;} aware method (the \type{\else} branch) also
-%D takes care of \type{btex}||\type{etex} bound data.
-
-\def\dowriteMPgraphicline%
- {\futurelet\next\dodowriteMPgraphicline}
-
-\long\def\dodowriteMPgraphicline#1btex#2#3etex#4\end%
- {\ifx\next\empty\else\ifx\next\relax\else
- \bgroup
- \let\par=\empty
- \ifx#2\relax
- \immediate\write\scratchwrite{#1;}%
- \egroup
- \else
- \convertargument#2#3\to\ascii
- \immediate\write\scratchwrite{#1btex \ascii etex;}%
- \egroup
- \dowriteMPgraphicline#4btex\relax etex\end
- \fi
- \fi\fi}
-
-%D This stripper is suboptimal in the sense that more
-%D \type{;}'s are output than feasible. Anyhow, \METAPOST\
-%D can handle this and users may consider it being a sort
-%D of error prevention bonus.
-
-\def\writeMPgraph%
- {\immediate\write\scratchwrite{mpgraph:=\the\currentMPgraphic;}}
-
-\def\startwritingMPgraphic%
- {\ifrunMPgraphics
- \ifMPrun \else \ifreuseMPgraphics \else
- \global\currentMPgraphic=0
- \fi \fi
- \global\advance\currentMPgraphic by 1
- \xdef\MPgraphic{\the\currentMPgraphic}%
- \immediate\openout\scratchwrite=\MPgraphicfile.mp
- \writeMPgraph
- \theMPinclusions
- \else
- \global\advance\currentMPgraphic by 1
- \xdef\MPgraphic{\the\currentMPgraphic}%
- \ifnum\currentMPgraphic=1
- \immediate\openout\scratchwrite=\MPgraphicfile.mp
- \writeMPgraph
- \theMPinclusions
- \fi
- \fi
- \ifMPrun \else
- \immediate\write\scratchwrite{beginfig(\the\currentMPgraphic);}%
- \fi
- \global\let\flushMPgraphics\dodostopwritingMPgraphic
- \global\let\stopwritingMPgraphic=\dostopwritingMPgraphic}
-
-\def\dostopwritingMPgraphic%
- {\ifMPrun \else
- \immediate\write\scratchwrite{endfig;}%
- \fi
- \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\MPgraphicbox
-
-\def\loadcurrentMPgraphic#1%
- {\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{#1}}
-
-\def\loadMPgraphic#1#2%
- {\setbox\MPgraphicbox=\hbox{\insertMPfile{#1}{#2}}}
-
-\def\placeMPgraphic%
- {\box\MPgraphicbox}
-
-%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
-
-\def\douseMPbox#1%
- {\setobject{#1}
- \vbox
- {\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
- \placeMPgraphic}%
- \setgvalue{#1}%
- {\getobject{#1}}}
-
-\def\nouseMPbox#1%
- {\setxvalue{#1}%
- {\noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
- \noexpand\placeMPgraphic}}
-
-\ifCONTEXT \else \let\douseMPbox=\nouseMPbox \fi
-
-\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
- {\reuseMPgraphicstrue
- \doifundefined{MP:#1}
- {\startMPgraphic#2\stopMPgraphic
- \ifuseMPbox
- \douseMPbox{MP:#1}%
- \else
- \nouseMPbox{MP:#1}%
- \fi}}
-
-\def\reuseMPgraphic#1%
- {\getvalue{MP:#1}}
-
-%D \macros
-%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.
-
-\long\def\startuseMPgraphic#1#2\stopuseMPgraphic%
- {\reuseMPgraphicstrue
- \long\setgvalue{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 This module can be used in \PLAIN\ \TEX too. When using
-%D \DVIPS, just try to process:
-%D
-%D \starttypen
-%D \input supp-mps
-%D
-%D \runMPgraphicstrue
-%D
-%D \def\insertMPfile#1#2%
-%D {\special{psfile=#1}}
-%D
-%D \startuseMPgraphic{1}
-%D prologues := 1;
-%D draw (0,0) withpen pencircle scaled 100;
-%D \stopuseMPgraphic
-%D
-%D \useMPgraphic{1}
-%D \stoptypen
-%D
-%D Don't forget to enable \type{\write18}. When does not say
-%D \type{\runMPgraphicstrue}, the \METAPOST\ scratch file
-%D must be closed by saying
-%D
-%D \starttypen
-%D \flushMPgraphics
-%D \stoptypen
-%D
-%D When using the indirect method, one has to process the file
-%D \type{mpgraph.mp} between two successive \TEX\ runs.
-
-%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 {includeMPfonts, ifincludeMPfonts}
-%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 \includeMPfonts{filename}
-%D \stoptypen
-%D
-%D We can turn of this mechanism with:
-%D
-%D \starttypen
-%D \includeMPfontsfalse
-%D \stoptypen
-
-\newif\ifincludeMPfonts \includeMPfontstrue
-
-\def\includeMPfonts#1%
- {\ifincludeMPfonts
- \bgroup
- \message{[MP fonts #1]}%
- %\uncatcodespecials
- \endlinechar=-1
- \setMPspecials
- \obeyMPspecials
- \setbox0=\hbox
- {\hskip-\maxdimen
- \doprocessfile\scratchread{#1}\handleMPfont}%
- \smashbox0
- \box0
- \egroup
- \fi}
-
-\def\UseMetaPostGraphic {\includeMPfonts} % upward compatible
-\def\DontUseMetaPostGraphics {\includeMPfontsfalse} % upward compatible
-
-%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\dohandleMPfont#1#2\relax%
- {\if#1(%
- \expandafter\includeMPcharacters\fileline\relax
- \fi}
-
-\def\handleMPfont%
- {\expandafter\dohandleMPfont\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
-
-%D \macros
-%D {convertMPcolors,
-%D ifconvertMPcolors,ifreduceMPcolors,ifforceMPcolors}
-%D
-%D When I told the editors that I wanted to use colored
-%D \METAPOST\ graphics in the color issue of the \MAPS, I was
-%D asked to use the \kap{CMYK} colorspace instead of \kap{RGB}
-%D one. However, \METAPOST\ only supports \kap{RGB} colors. I
-%D decided to write a utility to convert the \type
-%D {setrgbcolor} operators into \type {setcmykcolor} ones, and
-%D some experiments showed me that I could best let \TEX\ do it
-%D itself. Here it is:
-%D
-%D There are two booleans that control the conversion process.
-%D These are false by default.
-
-\newif\ifconvertMPcolors
-\newif\ifreduceMPcolors
-\newif\ifforcegrayMPcolors
-
-%D The main macro is calles as:
-%D
-%D \starttypen
-%D \convertMPcolors{filename}
-%D \stoptypen
-%D
-%D When active, this macro returns a message saying if indeed
-%D conversion took place. The old file is overwritten! This
-%D saves time in a succesive passes and can't harm, simply
-%D because MP can generate them anew.
-
-\def\convertMPcolorpath{} % {./}
-\def\convertMPcolorfile{metacmyk.eps}
-
-\def\convertMPcolors#1%
- {\bgroup
- \ifforcegrayMPcolors
- \donetrue
- \else\ifconvertMPcolors
- \donetrue
- \else
- \donefalse
- \fi\fi
- \ifdone
- \message{[MP color conversion #1}%
- \endlinechar=-1
- \uncatcodespecials
- \donefalse
- \immediate\openout\scratchwrite=\convertMPcolorpath\convertMPcolorfile
- \doprocessfile\scratchread{#1}\handleMPcolor
- \immediate\closeout\scratchwrite
- \ifdone
- \immediate\openout\scratchwrite=\convertMPcolorpath#1
- \doprocessfile\scratchread{\convertMPcolorpath \convertMPcolorfile}\handleMPcopy
- \immediate\closeout\scratchwrite
- \message{done]}%
- \else
- \message{not needed]}%
- \fi
- \immediate\openout\scratchwrite=\convertMPcolorpath\convertMPcolorfile
- \immediate\closeout\scratchwrite
- \fi
- \egroup}
-
-%D The process is rather simple: read a line, look for the
-%D \type {setrgbcolor} operator, recalculate the components and
-%D check for gray reduction or black removal, write the result
-%D to a temporary file, and go on. Afterwards, the file is
-%D copied back. We don't have to reduce to gray scales;
-%D \METAPOST\ already takes care of that.
-
-\def\handleMPcolor
- {\expandafter\dohandleMPcolor\fileline setrgbcolor*\\}
-
-\def\dohandleMPcolor#1setrgbcolor#2#3\\%
- {\if#2*%
- \immediate\write\scratchwrite{#1}%
- \else
- \dodohandleMPcolor#1setrgbcolor#2#3\\%
- \fi}
-
-\def\dodohandleMPcolor#1 #2 #3setrgbcolor#4setrgbcolor*\\%
- {\bgroup
- \ifforcegrayMPcolors
- \convertRGBtoGRAY{#1}{#2}{#3}%
- \immediate\write\scratchwrite
- {\@@cl@@s \space setgray #4}%
- \else
- \dimen0=1pt \advance\dimen0 by -#1pt
- \dimen2=1pt \advance\dimen2 by -#2pt
- \dimen4=1pt \advance\dimen4 by -#3pt
- \ifreduceMPcolors
- \dimen6=\dimen0
- \ifdim\dimen2<\dimen6 \dimen6=\dimen2 \fi
- \ifdim\dimen4<\dimen6 \dimen6=\dimen4 \fi
- \advance\dimen0 by -\dimen6
- \advance\dimen2 by -\dimen6
- \advance\dimen4 by -\dimen6
- \else
- \dimen6=\!!zeropoint
- \fi
- \immediate\write\scratchwrite
- {\withoutpt{\the\dimen0} \space
- \withoutpt{\the\dimen2} \space
- \withoutpt{\the\dimen4} \space
- \withoutpt{\the\dimen6} \space setcmykcolor #4}%
- \fi
- \egroup
- \donetrue} % needed for message
-
-\def\handleMPcopy%
- {\immediate\write\scratchwrite{\fileline}}
-
-%D The next macro is needed for forced conversion. This macro
-%D is copied from \type{colo-ini}, just in case one uses this
-%D module outside \CONTEXT.
-
-\ifx\convertRGBtoGRAY\undefined
-
- \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@@s{\realcolorvalue\scratchcounter}}
-
-\fi
-
-%D The next examples show the color conversion macros in
-%D action. These examples also demonstrate in||text \METAPOST\
-%D handling. As we will see, the conversion is hooked into the
-%D \CONTEXT\ color mechanism.
-%D
-%D By setting both \type{rgb} and \type{cmyk} to off, we force
-%D conversion to gray scales using:
-%D
-%D \plaatsformule[-]
-%D \startformule
-%D G = .30r + .59g + .11b
-%D \stopformule
-%D
-%D By using buffers, we keep the \ASCII\ layout clean:
-%D
-%D \startbuffer
-%D \startbuffer[rgb]
-%D \stelkleurenin[rgb=ja,cmyk=nee,reductie=nee,conversie=nee]
-%D \useMPgraphic{hans}
-%D \stopbuffer
-%D
-%D \startbuffer[cmyk]
-%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=nee,conversie=nee]
-%D \useMPgraphic{hans}
-%D \stopbuffer
-%D
-%D \startbuffer[cmy]
-%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=ja,conversie=nee]
-%D \useMPgraphic{hans}
-%D \stopbuffer
-%D
-%D \startbuffer[gray]
-%D \stelkleurenin[rgb=nee,cmyk=nee,reductie=nee,conversie=nee]
-%D \useMPgraphic{hans}
-%D \stopbuffer
-%D \stopbuffer
-%D
-%D \typebuffer
-%D \haalbuffer
-%D
-%D The graphic is rather simple and is generated each time
-%D it's called:
-%D
-%D \global\runMPgraphicstrue
-%D
-%D \startbuffer
-%D \startbuffer[graphic]
-%D \startuseMPgraphic{hans}
-%D width :=\the\tekstbreedte/5;
-%D height := width/4;
-%D fill fullcircle
-%D xscaled width
-%D yscaled height
-%D withcolor (\RedGreenBlue);
-%D \stopuseMPgraphic
-%D \stopbuffer
-%D \stopbuffer
-%D
-%D \typebuffer
-%D \haalbuffer
-%D
-%D Next we combine the four alternative interpretations in a
-%D combination:
-%D
-%D \startbuffer
-%D \startbuffer[result]
-%D \startcombinatie[4]
-%D {\haalbuffer[rgb]} {\tfxx original}
-%D {\haalbuffer[cmyk]} {\ttxx\string\convertMPcolorstrue}
-%D {\haalbuffer[cmy]} {\ttxx\string\reduceMPcolorstrue}
-%D {\haalbuffer[gray]} {\ttxx\string\forcegrayMPcolorstrue}
-%D \stopcombinatie
-%D \stopbuffer
-%D \stopbuffer
-%D
-%D \typebuffer
-%D \haalbuffer
-%D
-%D Finally we call the buffers, using different setting:
-%D
-%D \startbuffer
-%D \plaatsfiguur
-%D {\METAPOST\ color conversions}
-%D {\def\RedGreenBlue{.1,.4,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
-%D \def\RedGreenBlue{.1,.6,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
-%D \def\RedGreenBlue{.4,.1,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
-%D \def\RedGreenBlue{.4,.6,.1}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
-%D \def\RedGreenBlue{.6,.1,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
-%D \def\RedGreenBlue{.6,.4,.1}\haalbuffer[graphic]\haalbuffer[result]}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D \haalbuffer
-%D
-%D By the way, when the \POSTSCRIPT\ file resulting from
-%D this input is converted into \PDF\ and viewed in Acrobat
-%D Reader, one can quite different colors from those
-%D displayed in \GHOSTSCRIPT, which view equals the
-%D \POSTSCRIPT\ originals.
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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
+
+% The MP generation support is still experimental.
+
+%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:
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+\ifx \undefined \startMPgraphic \else \expandafter \endinput \fi
+
+\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:
+
+\long\def\startMPgraphic#1\stopMPgraphic%
+ {\startwritingMPgraphic
+ \writeMPgraphic{#1}%
+ \stopwritingMPgraphic}
+
+%D \macros
+%D {startMPrun}
+%D
+%D If we just wat to run \METAPOST\ code, that is, not to
+%D explictly generate a figure in terms of \type{beginfig} and
+%D \type{endfig}, we can use:
+%D
+%D \starttypen
+%D \startMPgraphic
+%D \stopMPgraphic
+%D \stoptypen
+%D
+%D \starttypen
+%D \startMPrun
+%D \stopMPrun
+%D \stoptypen
+%D
+%D The next booleans are for internal purposes only.
+
+% some day a bit more more clear:
+%
+% run directly/run afterwards/run external defined
+% insert directly/insert whenever
+% use object/don't use objects
+
+\newif\ifMPgraphics \MPgraphicstrue
+\newif\ifMPrun \MPrunfalse
+
+\ifCONTEXT
+
+ \long\def\dostartMPrun#1#2\stopMPrun%
+ {\bgroup
+ \MPruntrue
+ \doifsomething{#1}{\def\MPgraphicfile{#1}}%
+ \startwritingMPgraphic
+ \writeMPgraphic{#2}%
+ \stopwritingMPgraphic
+ \egroup}
+
+ \def\startMPrun%
+ {\dosinglegroupempty\dostartMPrun}
+
+\else
+
+ \long\def\startMPrun#1\stopMPrun%
+ {\MPruntrue
+ \startwritingMPgraphic
+ \writeMPgraphic{#1}%
+ \stopwritingMPgraphic
+ \MPrunfalse}
+
+\fi
+
+%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,ifinsertMPgraphics}
+%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 \runMPgraphicsfalse
+\newif\ifinsertMPgraphics \insertMPgraphicstrue
+
+%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{mp\ifMPrun run\else graph\fi}
+
+%D \macros
+%D {MPgraphic}
+%D
+%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 \COUNTER. This counter is available
+%D in \type{\MPgraphic}.
+
+\newcount\currentMPgraphic
+
+\def\MPgraphic{0}
+
+% %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 \reuseMPgraphicstrue
+
+%D The three macros responsible for writing the graphic
+%D implement both schemes.
+
+%D \macros
+%D {MPinclusions, startMPinclusions}
+%D
+%D One can include for instance common input commands by
+%D passing them to \type{\MPinclusions}:
+%D
+%D \starttypen
+%D \MPinclusions{input tools}
+%D \stoptypen
+
+\let\theMPinclusions=\empty
+
+\long\def\startMPinclusions#1\stopMPinclusions%
+ {\long\def\theMPinclusions{\writeMPgraphic{#1}}}
+
+\long\def\MPinclusions#1%
+ {\startMPinclusions#1\stopMPinclusions}
+
+%D \macros
+%D {iflongMPlines}
+%D
+%D When grabbing a graphic deifnition, newlines are turned
+%D into spaces. By default we split the graphic definition
+%D at the colon, but long lines are still possible by
+%D setting the next boolean to true.
+
+\newwrite\MPwrite
+
+\newif\iflongMPlines
+
+\long\def\writeMPgraphic#1%
+ {\bgroup
+ \iflongMPlines
+ \let\par=\empty
+ \long\def\flush##1##2\par%
+ {\ifx##1\relax \else
+ \immediate\write\MPwrite{##1##2}%
+ \expandafter\flush
+ \fi}%
+ \flush#1\empty\par\relax\par
+ \else
+ \long\def\flush##1##2;%
+ {\ifx##1\relax \else
+ \dowriteMPgraphicline##1##2btex\relax etex\MPend
+ \expandafter\flush
+ \fi}%
+ \flush#1\empty;\relax;%
+ \fi
+ \egroup}
+
+%D The \type{;} aware method (the \type{\else} branch) also
+%D takes care of \type{btex}||\type{etex} bound data.
+
+\def\dowriteMPgraphicline%
+ {\futurelet\next\dodowriteMPgraphicline}
+
+\long\def\dodowriteMPgraphicline#1btex#2#3etex#4\MPend%
+ {\ifx\next\empty\else\ifx\next\relax\else
+ \bgroup
+ \let\par=\empty
+ \ifx#2\relax
+ \immediate\write\MPwrite{#1;}%
+ \egroup
+ \else
+ \convertargument#2#3\to\ascii
+ \immediate\write\MPwrite{#1btex \ascii etex;}%
+ \egroup
+ \dowriteMPgraphicline#4btex\relax etex\MPend
+ \fi
+ \fi\fi}
+
+%D This stripper is suboptimal in the sense that more
+%D \type{;}'s are output than feasible. Anyhow, \METAPOST\
+%D can handle this and users may consider it being a sort
+%D of error prevention bonus.
+
+\def\writeMPgraph%
+ {\immediate\write\MPwrite{mpgraph:=\the\currentMPgraphic;}}
+
+\def\startwritingMPgraphic%
+ {\ifMPrun \else
+ \global\advance\currentMPgraphic by 1
+ \fi
+ \ifrunMPgraphics
+ \xdef\MPgraphic{\the\currentMPgraphic}%
+ \immediate\openout\MPwrite=\MPgraphicfile.mp
+ \writeMPgraph
+ \setMPrandomseed
+ \theMPinclusions
+ \else
+ \xdef\MPgraphic{\the\currentMPgraphic}%
+ \ifnum\currentMPgraphic=1
+ \immediate\openout\MPwrite=\MPgraphicfile.mp
+ \writeMPgraph
+ \setMPrandomseed
+ \theMPinclusions
+ \fi
+ \fi
+ \ifMPrun \else
+ \immediate\write\MPwrite{beginfig(\the\currentMPgraphic);}%
+ \fi
+ \global\let\flushMPgraphics\dodostopwritingMPgraphic
+ \global\let\stopwritingMPgraphic=\dostopwritingMPgraphic}
+
+\def\dostopwritingMPgraphic%
+ {\ifMPrun \else
+ \immediate\write\MPwrite{endfig;}%
+ \fi
+ \ifrunMPgraphics
+ \dodostopwritingMPgraphic
+ \fi}
+
+\def\dodostopwritingMPgraphic%
+ {\ifnum\currentMPgraphic>0
+ \donetrue
+ \else\ifMPrun
+ \donetrue
+ \else
+ \donefalse
+ \fi\fi
+ \ifdone
+ \immediate\write\MPwrite{end.}%
+ \immediate\closeout\MPwrite
+ \runMPgraphic{\MPgraphicfile}%
+ \fi
+ \global\let\flushMPgraphics=\relax}
+
+\let\stopwritingMPgraphic=\relax
+\let\flushMPgraphics =\relax
+
+%D \macros
+%D {setMPrandomseed}
+%D
+%D Did you notice the random seed initialization? This is
+%D needed because \METAPOST\ has a rather poor initialization,
+%D which in some implementations depends on the time in
+%D minutes. So, in quick successive runs, random is not that
+%D random.
+
+\newif\ifsetMPrandomseed % false by default
+
+\def\setMPrandomseed%
+ {\ifsetMPrandomseed \ifx\getrandomnumber\undefined \else
+ \getrandomnumber\localMPseed{0}{4095}%
+ \writeMPgraphic{randomseed := \localMPseed ;}%
+ \fi\fi}
+
+%D This feature has become optional. Thanks to Fabrice Popineau,
+%D \METAPOST\ can now do a far better job!
+
+%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\MPgraphicbox
+
+\def\doloadcurrentMPgraphic#1%
+ {\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{#1}}
+
+\ifCONTEXT
+ \def\loadcurrentMPgraphic{\dosinglegroupempty\doloadcurrentMPgraphic}
+\else
+ \let\loadcurrentMPgraphic\doloadcurrentMPgraphic
+\fi
+
+\def\loadMPgraphic#1#2%
+ {\setbox\MPgraphicbox=\hbox
+ {\ifinsertMPgraphics\insertMPfile{#1}{#2}\fi}}
+
+\def\placeMPgraphic%
+ {\box\MPgraphicbox}
+
+%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 \useMPboxtrue
+
+\def\douseMPbox#1%
+ {\setobject{MP}{#1}
+ \vbox
+ {\forgetall
+ \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
+ \placeMPgraphic}%
+ \setgvalue{#1}%
+ {\getobject{MP}{#1}}}
+
+\def\nouseMPbox#1%
+ {\setxvalue{#1}%
+ {\noexpand\forgetall
+ \noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
+ \noexpand\placeMPgraphic}}
+
+\ifCONTEXT \else \let\douseMPbox=\nouseMPbox \fi
+\ifCONTEXT \else \let\doifobjectssupportedelse=\relax \fi
+
+% \long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
+% {%\reuseMPgraphicstrue
+% \doifundefined{MP:#1}
+% {\startMPgraphic#2\stopMPgraphic
+% \doifobjectssupportedelse{}{\useMPboxfalse}%
+% \ifuseMPbox
+% \douseMPbox{MP:#1}%
+% \else
+% \nouseMPbox{MP:#1}%
+% \fi}}
+
+\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic%
+ {\doifundefined{MP:#1}
+ {\setgvalue{MP:#1}%
+ {\startMPgraphic#2\stopMPgraphic
+ \doifobjectssupportedelse{}{\useMPboxfalse}%
+ \ifuseMPbox
+ \douseMPbox{MP:#1}%
+ \else
+ \nouseMPbox{MP:#1}%
+ \fi
+ \getvalue{MP:#1}}}}
+
+\def\reuseMPgraphic#1%
+ {\getvalue{MP:#1}}
+
+%D \macros
+%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.
+
+\long\def\startuseMPgraphic#1#2\stopuseMPgraphic%
+ {%\reuseMPgraphicstrue
+ \long\setgvalue{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=\c!mps,\c!object=\v!nee,#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 This module can be used in \PLAIN\ \TEX too. When using
+%D \DVIPS, just try to process:
+%D
+%D \starttypen
+%D \input supp-mps
+%D
+%D \runMPgraphicstrue
+%D
+%D \def\insertMPfile#1#2%
+%D {\special{psfile=#1}}
+%D
+%D \startuseMPgraphic{1}
+%D prologues := 1;
+%D draw (0,0) withpen pencircle scaled 100;
+%D \stopuseMPgraphic
+%D
+%D \useMPgraphic{1}
+%D \stoptypen
+%D
+%D Don't forget to enable \type{\write18}. When does not say
+%D \type{\runMPgraphicstrue}, the \METAPOST\ scratch file
+%D must be closed by saying
+%D
+%D \starttypen
+%D \flushMPgraphics
+%D \stoptypen
+%D
+%D When using the indirect method, one has to process the file
+%D \type{mpgraph.mp} between two successive \TEX\ runs.
+
+%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 {includeMPfonts, ifincludeMPfonts}
+%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 \includeMPfonts{filename}
+%D \stoptypen
+%D
+%D We can turn of this mechanism with:
+%D
+%D \starttypen
+%D \includeMPfontsfalse
+%D \stoptypen
+
+\newif\ifincludeMPfonts \includeMPfontstrue
+
+\def\includeMPfonts#1%
+ {\ifincludeMPfonts
+ \bgroup
+ \message{[MP fonts #1]}%
+ %\uncatcodespecials
+ \endlinechar=-1
+ \setMPspecials
+ \obeyMPspecials
+ \setbox0=\hbox
+ {\hskip-\maxdimen
+ \doprocessfile\scratchread{#1}\handleMPfont}%
+ \smashbox0
+ \box0
+ \egroup
+ \fi}
+
+\def\UseMetaPostGraphic {\includeMPfonts} % upward compatible
+\def\DontUseMetaPostGraphics {\includeMPfontsfalse} % upward compatible
+
+%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\dohandleMPfont#1#2\relax%
+ {\if#1(%
+ \expandafter\includeMPcharacters\fileline\relax
+ \fi}
+
+\def\handleMPfont%
+ {\expandafter\dohandleMPfont\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\setnaturalcatcodes
+ \catcode`\%=\@@active
+ \catcode`\[=\@@active
+ \catcode`\]=\@@active
+ \catcode`\{=\@@active
+ \catcode`\}=\@@active
+ \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
+%D
+%D \starttypen
+%D \def\includeMPcharacters(#1) #2 #3 #4\relax%
+%D {\font\temp=#2 at #3bp\temp#1}
+%D \stoptypen
+%D
+%D While processing some \TUG~98 proceedings, I also had to
+%D deal with:
+%D
+%D \starttypen
+%D /nfont {10 div dup scale 10} def
+%D (T) ANTTB 7.13086 nfont fshow
+%D \stoptypen
+%D
+%D which comes to rounding sizes. This is something
+%D experimental.
+
+\def\PSnfont{nfont}
+
+\def\includeMPcharacters(#1) #2 #3 #4#5#6#7#8#9\relax%
+ {\edef\temp{#4#5#6#7#8}%
+ \ifx\temp\PSnfont % round font size (to pt)
+ \scratchdimen=#3pt
+ \ifdim\scratchdimen<1pt
+ \def\size{1pt}%
+ \else
+ \advance\scratchdimen by .5pt
+ \def\size##1.##2\relax{\def\size{##1pt}}%
+ \expandafter\size\the\scratchdimen\relax
+ \fi
+ \else
+ \edef\size{#3bp}%
+ \fi
+ \font\temp=#2 at \size
+ \temp\if#1 \char32\else#1\fi}
+
+%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][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-2][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-3][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-4][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-5][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-6][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-7][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-8][kader=aan,breedte=.2\hsize]} {}
+%D {\externfiguur[mp-exa-9][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
+
+%D \macros
+%D {convertMPcolors,
+%D ifconvertMPcolors,ifreduceMPcolors,ifforceMPcolors}
+%D
+%D When I told the editors that I wanted to use colored
+%D \METAPOST\ graphics in the color issue of the \MAPS, I was
+%D asked to use the \kap{CMYK} colorspace instead of \kap{RGB}
+%D one. However, \METAPOST\ only supports \kap{RGB} colors. I
+%D decided to write a utility to convert the \type
+%D {setrgbcolor} operators into \type {setcmykcolor} ones, and
+%D some experiments showed me that I could best let \TEX\ do it
+%D itself. Here it is:
+%D
+%D There are two booleans that control the conversion process.
+%D These are false by default.
+
+\newif\ifconvertMPcolors
+\newif\ifreduceMPcolors
+\newif\ifforcegrayMPcolors
+
+%D The main macro is called as:
+%D
+%D \starttypen
+%D \convertMPcolors{filename}
+%D \stoptypen
+%D
+%D When active, this macro returns a message saying if indeed
+%D conversion took place. The old file is overwritten! This
+%D saves time in a succesive passes and can't harm, simply
+%D because MP can generate them anew.
+
+\def\convertMPcolorpath{}
+\def\convertMPcolorfile{metacmyk.eps}
+
+\def\convertMPcolors#1%
+ {\bgroup
+ \ifforcegrayMPcolors
+ \donetrue
+ \else\ifconvertMPcolors
+ \donetrue
+ \else
+ \donefalse
+ \fi\fi
+ \ifdone
+ \message{[MP color conversion #1}%
+ \endlinechar=-1
+ \uncatcodespecials
+ \donefalse
+ \immediate\openout\scratchwrite=\convertMPcolorpath\convertMPcolorfile
+ \doprocessfile\scratchread{#1}\handleMPcolor
+ \immediate\closeout\scratchwrite
+ \ifdone
+ \immediate\openout\scratchwrite=\convertMPcolorpath#1
+ \doprocessfile\scratchread{\convertMPcolorpath \convertMPcolorfile}\handleMPcopy
+ \immediate\closeout\scratchwrite
+ \message{done]}%
+ \else
+ \message{not needed]}%
+ \fi
+ \immediate\openout\scratchwrite=\convertMPcolorpath\convertMPcolorfile
+ \immediate\closeout\scratchwrite
+ \fi
+ \egroup}
+
+%D The process is rather simple: read a line, look for the
+%D \type {setrgbcolor} operator, recalculate the components and
+%D check for gray reduction or black removal, write the result
+%D to a temporary file, and go on. Afterwards, the file is
+%D copied back. We don't have to reduce to gray scales;
+%D \METAPOST\ already takes care of that.
+
+\def\handleMPcolor
+ {\expandafter\dohandleMPcolor\fileline setrgbcolor*\\}
+
+\def\dohandleMPcolor#1setrgbcolor#2#3\\%
+ {\if#2*%
+ \immediate\write\scratchwrite{#1}%
+ \else
+ \dodohandleMPcolor#1setrgbcolor#2#3\\%
+ \fi}
+
+\def\dodohandleMPcolor#1 #2 #3setrgbcolor#4setrgbcolor*\\%
+ {\bgroup
+ \ifforcegrayMPcolors
+ \convertRGBtoGRAY{#1}{#2}{#3}%
+ \immediate\write\scratchwrite
+ {\@@cl@@s \space setgray #4}%
+ \else
+ \dimen0=1pt \advance\dimen0 by -#1pt
+ \dimen2=1pt \advance\dimen2 by -#2pt
+ \dimen4=1pt \advance\dimen4 by -#3pt
+ \ifreduceMPcolors
+ \dimen6=\dimen0
+ \ifdim\dimen2<\dimen6 \dimen6=\dimen2 \fi
+ \ifdim\dimen4<\dimen6 \dimen6=\dimen4 \fi
+ \advance\dimen0 by -\dimen6
+ \advance\dimen2 by -\dimen6
+ \advance\dimen4 by -\dimen6
+ \else
+ \dimen6=\!!zeropoint
+ \fi
+ \immediate\write\scratchwrite
+ {\withoutpt{\the\dimen0} \space
+ \withoutpt{\the\dimen2} \space
+ \withoutpt{\the\dimen4} \space
+ \withoutpt{\the\dimen6} \space setcmykcolor #4}%
+ \fi
+ \egroup
+ \donetrue} % needed for message
+
+\def\handleMPcopy%
+ {\immediate\write\scratchwrite{\fileline}}
+
+%D The next macro is needed for forced conversion. This macro
+%D is copied from \type{colo-ini}, just in case one uses this
+%D module outside \CONTEXT.
+
+\ifx\convertRGBtoGRAY\undefined
+
+ \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@@s{\realcolorvalue\scratchcounter}}
+
+\fi
+
+%D The next examples show the color conversion macros in
+%D action. These examples also demonstrate in||text \METAPOST\
+%D handling. As we will see, the conversion is hooked into the
+%D \CONTEXT\ color mechanism.
+%D
+%D By setting both \type{rgb} and \type{cmyk} to off, we force
+%D conversion to gray scales using:
+%D
+%D \plaatsformule[-]
+%D \startformule
+%D G = .30r + .59g + .11b
+%D \stopformule
+%D
+%D By using buffers, we keep the \ASCII\ layout clean:
+%D
+%D \startbuffer
+%D \startbuffer[rgb]
+%D \stelkleurenin[rgb=ja,cmyk=nee,reductie=nee,conversie=nee]
+%D \useMPgraphic{hans}
+%D \stopbuffer
+%D
+%D \startbuffer[cmyk]
+%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=nee,conversie=nee]
+%D \useMPgraphic{hans}
+%D \stopbuffer
+%D
+%D \startbuffer[cmy]
+%D \stelkleurenin[rgb=nee,cmyk=ja,reductie=ja,conversie=nee]
+%D \useMPgraphic{hans}
+%D \stopbuffer
+%D
+%D \startbuffer[gray]
+%D \stelkleurenin[rgb=nee,cmyk=nee,reductie=nee,conversie=nee]
+%D \useMPgraphic{hans}
+%D \stopbuffer
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \haalbuffer
+%D
+%D The graphic is rather simple and is generated each time
+%D it's called:
+%D
+%D \global\runMPgraphicstrue
+%D
+%D \startbuffer
+%D \startbuffer[graphic]
+%D \startuseMPgraphic{hans}
+%D width :=\the\tekstbreedte/5;
+%D height := width/4;
+%D fill fullcircle
+%D xscaled width
+%D yscaled height
+%D withcolor (\RedGreenBlue);
+%D \stopuseMPgraphic
+%D \stopbuffer
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \haalbuffer
+%D
+%D Next we combine the four alternative interpretations in a
+%D combination:
+%D
+%D \startbuffer
+%D \startbuffer[result]
+%D \startcombinatie[4]
+%D {\haalbuffer[rgb]} {\tfxx original}
+%D {\haalbuffer[cmyk]} {\ttxx\string\convertMPcolorstrue}
+%D {\haalbuffer[cmy]} {\ttxx\string\reduceMPcolorstrue}
+%D {\haalbuffer[gray]} {\ttxx\string\forcegrayMPcolorstrue}
+%D \stopcombinatie
+%D \stopbuffer
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \haalbuffer
+%D
+%D Finally we call the buffers, using different setting:
+%D
+%D \startbuffer
+%D \plaatsfiguur
+%D {\METAPOST\ color conversions}
+%D {\def\RedGreenBlue{.1,.4,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
+%D \def\RedGreenBlue{.1,.6,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
+%D \def\RedGreenBlue{.4,.1,.6}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
+%D \def\RedGreenBlue{.4,.6,.1}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
+%D \def\RedGreenBlue{.6,.1,.4}\haalbuffer[graphic]\haalbuffer[result]\vskip6pt
+%D \def\RedGreenBlue{.6,.4,.1}\haalbuffer[graphic]\haalbuffer[result]}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D \haalbuffer
+%D
+%D By the way, when the \POSTSCRIPT\ file resulting from
+%D this input is converted into \PDF\ and viewed in Acrobat
+%D Reader, one can quite different colors from those
+%D displayed in \GHOSTSCRIPT, which view equals the
+%D \POSTSCRIPT\ originals.
+
+%D \macros
+%D {experimental}
+%D
+%D Some experimental macros:
+%D
+%D \starttypen
+%D \startMPdrawing
+%D \stopMPdrawing
+%D \pushMPdrawing
+%D \popMPdrawing
+%D \resetMPdrawing
+%D \ifMPdrawingdone
+%D \MPdivten[number]
+%D \stoptypen
+%D
+%D These macros are used in \PPCHTEX.
+
+\let\MPdrawingdata\empty
+
+\newif\ifMPdrawingdone \MPdrawingdonefalse
+\newif\ifMPshiftdrawing \MPshiftdrawingtrue
+
+\def\resetMPdrawing%
+ {\global\let\MPdrawingdata\empty
+ \global\MPdrawingdonefalse}
+
+\def\pushMPdrawing%
+ {\pushmacro\MPdrawingdata
+ \global\let\MPdrawingdata\empty}
+
+\def\popMPdrawing%
+ {\popmacro\MPdrawingdata}
+
+\def\getMPdrawing%
+ {\ifMPdrawingdone
+ \bgroup
+ \setbox0=\hbox
+ {\expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic
+ \loadcurrentMPgraphic\empty
+ \placeMPgraphic}%
+ \ifMPshiftdrawing
+ \dimen0=\MPllx bp
+ \dimen2=\MPlly bp
+ \hbox{\hskip\dimen0\raise\dimen2\box0}%
+ \else
+ \box0
+ \fi
+ \egroup
+ \fi}
+
+\long\def\startMPdrawing#1\stopMPdrawing%
+ {\long\xdef\MPdrawingdata{\MPdrawingdata#1}}
+
+\def\MPdivten[#1]%
+ {\@EA\@EA\@EA\doMPdivten\@EA\@EA\@EA[\@EA#1]}
+
+\def\doMPdivten[#1]%
+ {\ifnum#1> 9999 \dodoMPdivtenB#1\else
+ \ifnum#1> 999 \dodoMPdivtenC#1\else
+ \ifnum#1> 99 \dodoMPdivtenD#1\else
+ \ifnum#1> 9 \dodoMPdivtenE#1\else
+ \ifnum#1> 0 \dodoMPdivtenF#1\else
+ \ifnum#1<-9999 \dodoMPdivtenA#1\else
+ \ifnum#1< -999 \dodoMPdivtenB#1\else
+ \ifnum#1< -99 \dodoMPdivtenC#1\else
+ \ifnum#1< -9 \dodoMPdivtenD#1\else
+ \ifnum#1< 0 \dodoMPdivtenE#1\else
+ 0\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+\def\dodoMPdivtenA#1#2#3#4#5#6{#1#2#3#4#5.#6}
+\def\dodoMPdivtenB #1#2#3#4#5{#1#2#3#4.#5}
+\def\dodoMPdivtenC #1#2#3#4{#1#2#3.#4}
+\def\dodoMPdivtenD #1#2#3{#1#2.#3}
+\def\dodoMPdivtenE #1#2{#1.#2}
+\def\dodoMPdivtenF #1{.#1}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-mrk.tex b/tex/context/base/supp-mrk.tex
index 287d4bbec..f04cb4829 100644
--- a/tex/context/base/supp-mrk.tex
+++ b/tex/context/base/supp-mrk.tex
@@ -1,299 +1,502 @@
-%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
+%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.
+%D
+%D This module was changed on behalf of \ETEX. The main
+%D extension is that \type{\get..} and alike is used instead of
+%D direct calls. The \TEX\ based multiple marks needs to store
+%D the mark data but \ETEX\ uses a different approach.
+
+\writestatus{loading}{Context Support Macros / Marks}
+
+\unprotect
+
+\beginTEX
+
+%D This implementation is more or less compatible with the
+%D other \type {\new} macros in \PLAIN\ \TEX. A mark is
+%D defined by:
+%D
+%D \starttypen
+%D \newmark\name
+%D \stoptypen
+%D
+%D and can be called upon with:
+%D
+%D \starttypen
+%D \gettopmark \name % or \topname
+%D \getbotmark \name % or \botname
+%D \getfirstmark\name % or \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.
+
+\let\allmarks=\empty
+
+%D \macros
+%D {expandmarks}
+%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 mark 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,resetmark}
+%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\definenewmark#1#2%
+ {\bgroup
+ \makemarknames{#1}%
+ #2%
+ \global\letvalue{\@@marktop@@ \markname}\empty
+ \global\letvalue{\@@markfirst@@\markname}\empty
+ \global\letvalue{\@@markbot@@ \markname}\empty
+ \setgvalue{\marklist}{\domark0{}}% beware of halfway definitions
+ \long\gdef#1{\addmarker#1}%
+ \egroup}
+
+\def\newmark#1%
+ {\definenewmark#1{\doglobal\addtocommalist\markname\allmarks}}
+
+\let\setmark\empty
+\let\resetmark\newmark
+
+%D Some more natural interfacing macros:
+
+\def\gettopmark #1{\getvalue{\@@marktop@@ \strippedcsname#1}}
+\def\getbottommark #1{\getvalue{\@@markbot@@ \strippedcsname#1}}
+\def\getfirstmark #1{\getvalue{\@@markfirst@@\strippedcsname#1}}
+\def\getsplitbottommark#1{\getvalue{\@@markbot@@ \strippedcsname#1}}
+\def\getsplitfirstmark #1{\getvalue{\@@markfirst@@\strippedcsname#1}}
+
+\let\getbotmark \getbottommark
+\let\getsplitbotmark\getsplitbottommark
+\let\getsplittopmark\getsplitfirstmark
+
+%D Don't ask me, but sometimes we need more control over
+%D updating the marks, thereby we have:
+
+\def\newpersistentmark#1% for an example see core-grd.tex
+ {\definenewmark#1\relax}
+
+%D \macros
+%D {setmark}
+%D
+%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 \setmark\mymark{some text} % or \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
+ \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}% one level
+ \setxvalue{\marklist}%
+ {\the\!!toksa
+ \noexpand\domark
+ \the\currentmarker{\the\!!toksb}}%
+ \fi
+ \egroup}
+
+%D \macros
+%D {getmarks,getallmarks,
+%D getsplitmarks,getallsplitmarks}
+%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[\allmarks]\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[\allmarks]\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 \macros
+%D {noninterferingmarks}
+%D
+%D Marks can interfere badly with for instance postprocessing
+%D paragraphs, for instance when we want to grab the last box
+%D using \type {\lastbox}, when at the same time using colors.
+
+\def\noninterferingmarks%
+ {\let\savednormalmark\normalmark
+ \let\noninterferingmarks\relax
+ \def\normalmark##1%
+ {\ifhmode\prewordbreak\hbox\fi{\savednormalmark{##1}}}}
+
+%D This macro is for instance used in the inline headings
+%D postprocessing, as needed when we want to make those
+%D clickable.
+
+\endTEX
+
+%D Right from the beginning, \CONTEXT\ supported more than one
+%D mark, using an extended version of Jim Fox multiple mark
+%D mechanism. In \ETEX\ we can however directly access more
+%D marks than we will ever need.
+
+\beginETEX \marks \topmarks \botmarks \firstmarks
+
+\let\normalmark = \mark
+\let\normaltopmark = \topmark
+\let\normalbotmark = \botmark
+\let\normalfirstmark = \firstmark
+\let\normalsplitbotmark = \splitbotmark
+\let\normalsplitfirstmark = \splitfirstmark
+
+\let\normalmarks\marks
+
+%D The 100\% compatible solution is:
+%D
+%D \starttypen
+%D \def\@@marktop@@ {top}
+%D \def\@@markbot@@ {bot}
+%D \def\@@markfirst@@ {first}
+%D \def\@@marksplitbot@@ {splitbot}
+%D \def\@@marksplitfirst@@ {splitfirst}
+%D
+%D \def\newmark#1% temporary 5 \cs's, will be rewritten ; global needed
+%D {\newmarks#1%
+%D \setxvalue{\@@marktop@@ \strippedcsname#1}{\noexpand\topmarks \the#1 }%
+%D \setxvalue{\@@markbot@@ \strippedcsname#1}{\noexpand\botmarks \the#1 }%
+%D \setxvalue{\@@markfirst@@ \strippedcsname#1}{\noexpand\firstmarks\the#1 }%
+%D \setxvalue{\@@marksplitbot@@ \strippedcsname#1}{\noexpand\splitbotmarks \the#1 }%
+%D \setxvalue{\@@marksplitfirst@@\strippedcsname#1}{\noexpand\splitfirstmarks\the#1 }%
+%D \xdef#1{\noexpand\donormalmarks{\the#1}}}
+%D
+%D \def\gettopmark #1{\getvalue{\@@marktop@@ \strippedcsname#1}}
+%D \def\getbottommark #1{\getvalue{\@@markbot@@ \strippedcsname#1}}
+%D \def\getfirstmark #1{\getvalue{\@@markfirst@@ \strippedcsname#1}}
+%D \def\getsplitbottommark#1{\getvalue{\@@marksplitbot@@ \strippedcsname#1}}
+%D \def\getsplitfirstmark #1{\getvalue{\@@marksplitfirst@@\strippedcsname#1}}
+%D
+%D \def\getsplitmarks#1%
+%D {\setvalue{\@@markbot@@\strippedcsname#1}%
+%D {\getvalue{\@@marksplitbot@@\strippedcsname#1}}%
+%D \setvalue{\@@marktop@@\strippedcsname#1}%
+%D {\getvalue{\@@marksplitfirst@@\strippedcsname#1}}%
+%D \setvalue{\@@markfirst@@\strippedcsname#1}%
+%D {\getvalue{\@@marksplitfirst@@\strippedcsname#1}}}
+%D
+%D \def\noninterferingmarks%
+%D {\let\saveddonormalmarks\donormalmarks
+%D \let\noninterferingmarks\relax
+%D \long\def\donormalmarks##1##2%
+%D {\ifhmode\prewordbreak\hbox\fi{\saveddonormalmarks{##1}{##2}}}}
+%D
+%D \long\def\donormalmarks#1#2%
+%D {\bgroup
+%D \scratchcounter=#1\relax
+%D \ifexpandmarks
+%D \expanded{\normalmarks\scratchcounter{#2}}%
+%D \else
+%D \normalmarks\scratchcounter{#2}%
+%D \fi
+%D \egroup}
+%D
+%D \let\setmark\empty
+%D \def\resetmark#1{#1{}}
+%D \stoptypen
+%D
+%D However, I prefer the less \type{\cs} hungry ones. Beware,
+%D these ones (and the next) do no longer support direct marks.
+
+\newif\ifexpandmarks \expandmarkstrue
+
+\let\newmark \newmarks
+\let\gettopmark \topmarks
+\let\getbottommark \botmarks
+\let\getfirstmark \firstmarks
+\let\getsplitbottommark\splitbotmarks
+\let\getsplitfirstmark \splitfirstmarks
+
+\let\getbotmark \botmarks
+\let\getsplitbotmark \splitbotmarks
+\let\getsplittopmark \splitfirstmarks
+
+\long\def\setmark#1#2%
+ {\ifexpandmarks
+ \expanded{\normalmarks#1{#2}}%
+ \else
+ \normalmarks#1{#2}%
+ \fi}
+
+%D Resetting marks in not compatible with the old method.
+%D Here a node is inserted, which can interfere badly. In
+%D fact, a real \type {\clearmarks\name} is needed.
+
+\def\resetmark#1%
+ {\marks#1{}} % interferes ! test this one on the big manual footers
+
+\def\noninterferingmarks%
+ {\let\savedsetmark\setmark
+ \let\noninterferingmarks\relax
+ \long\def\setmark##1##2%
+ {\ifhmode\prewordbreak\hbox\fi{\savedsetmark{##1}{##2}}}}
+
+\let\getmarks \gobbleoneargument
+\let\getallmarks \relax
+\let\getsplitmarks \gobbleoneargument
+\let\getallsplitmarks\relax
+
+\let\newpersistentmark \newmark % checken
+\newif\ifnofirstmarker % checken
+
+\endETEX
+
+%D For those who want to know the story behind resetting
+%D marks, here are some examples of interference
+%D
+%D \startbuffer
+%D \setbox0=\vbox{test}
+%D \unvbox0\setbox0=\lastbox
+%D \ruledhbox{\unhbox0}
+%D \stopbuffer
+%D
+%D \typebuffer\blanko\haalbuffer\blanko
+%D
+%D \startbuffer
+%D \setbox0=\vbox{test\normalmark{}}
+%D \unvbox0\setbox0=\lastbox
+%D \ruledhbox{\unhbox0}
+%D \stopbuffer
+%D
+%D \typebuffer\blanko\haalbuffer\blanko
+%D
+%D \startbuffer
+%D \setbox0=\vbox{test\hbox{\normalmark{}}}
+%D \unvbox0\setbox0=\lastbox
+%D \ruledhbox{\unhbox0}
+%D \stopbuffer
+%D
+%D \typebuffer\blanko\haalbuffer\blanko
+%D
+%D \startbuffer
+%D \setbox0=\vbox{test\vbox{\normalmark{}}}
+%D \unvbox0\setbox0=\lastbox
+%D \ruledhbox{\unhbox0}
+%D \stopbuffer
+%D
+%D \typebuffer\blanko\haalbuffer\blanko
+
+%D Because we used an indirect call to the mark mechanism
+%D we can redefine the original \type{\mark} command.
+
+\beginTEX
+
+\newmark\mark
+
+\endTEX
+
+%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. This drawback is removed in
+%D \ETEX\ mode.
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-num.tex b/tex/context/base/supp-num.tex
new file mode 100644
index 000000000..48b560d67
--- /dev/null
+++ b/tex/context/base/supp-num.tex
@@ -0,0 +1,201 @@
+%D \module
+%D [ file=supp-lan,
+%D version=1998.05.15,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Number (Digit) 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 Support Macros / Number (Digit) Handling}
+
+\unprotect
+
+%D \macros
+%D {digitmode, digits}
+%D
+%D Depending on \type{\digitmode} the command \type{\digits}
+%D normalizes number patterns depending on the language set.
+%D
+%D \starttypen
+%D This will never be a \digits{1.000.000} seller.
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D I will never grow longer than \digits 1.86 \Meter.
+%D \stoptypen
+%D
+%D The different modes are shown in:
+%D
+%D \startbuffer
+%D / \setdigitmode 1 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D / \setdigitmode 2 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D / \setdigitmode 3 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D / \setdigitmode 4 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D / \setdigitmode 5 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D / \setdigitmode 6 / \digits 12.345,90 / \digits 12.345.000 / \digits 1,23 /
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This is typset as:
+%D
+%D \startregels
+%D \haalbuffer
+%D \stopregels
+
+\chardef\digitinputmode =1
+\chardef\digitoutputmode=1
+
+\def\setdigitmode#1%
+ {\chardef\digitoutputmode#1}
+
+%D The digit modes are:
+%D
+%D \startopsomming[opelkaar]
+%D \som periods \& comma
+%D \som commas \& period
+%D \som thinmuskips \& comma
+%D \som thinmuskips \& period
+%D \som thickmuskips \& comma
+%D \som thickmuskips \& period
+%D \stopopsomming
+
+\let\collecteddigits \empty
+\let\saveddigits \empty
+\let\savedpowerdigits\empty
+\chardef\powerdigits=0
+
+\def\digits%
+ {\bgroup\grabdigit}
+
+\def\grabdigit%
+ {\futurelet\next\scandigit}
+
+\let\normalmath$
+
+\def\scandigit%
+ {\ifx\next\blankspace
+ \let\next\handledigits
+ \else\ifx\next\bgroup
+ \let\next\handledigits
+ \else\ifx\next\egroup
+ \let\next\handledigits
+ \else\ifx\next\normalmath
+ \let\next\handledigits
+ \else
+ \let\next\collectdigit
+ \fi\fi\fi\fi
+ \next}
+
+\long\def\collectdigit#1%
+ {\if\noexpand#1\relax
+ \let\grabdigit\handledigits
+ \else\ifcase\powerdigits
+ \if#1^%
+ \chardef\powerdigits=1
+ \else
+ \doifnumberelse{#1}
+ {\edef\collecteddigits{\collecteddigits\saveddigits#1}%
+ \let\saveddigits\empty}
+ {\def\saveddigits{#1}}%
+ \fi
+ \else
+ \doifnumberelse{#1}
+ {\edef\savedpowerdigits{\savedpowerdigits\saveddigits#1}%
+ \let\saveddigits\empty}
+ {\def\saveddigits{#1}}%
+ \fi\fi
+ \grabdigit}
+
+\def\handledigits%
+ {\ifmmode
+ \dohandledigits
+ \else
+ \dontleavehmode\hbox{$\dohandledigits$}%
+ \fi
+ \saveddigits
+ \egroup}
+
+\def\dohandledigits%
+ {\mathcode`\,="013B
+ \mathcode`\.="013A
+ \expandafter\handletokens\collecteddigits\with\scandigits
+ \ifcase\powerdigits\else\digitpowerseperator^{\savedpowerdigits}\fi}
+
+\def\scandigits#1%
+ {\if#1.\doscandigit1\else
+ \if#1,\doscandigit2\else
+ #1\fi\fi}
+
+\def\doscandigit#1%
+ {\ifnum\digitinputmode=#1\relax
+ \ifcase\digitoutputmode
+ \or .%
+ \or ,%
+ \or \mskip\thinmuskip
+ \or \mskip\thinmuskip
+ \or \mskip\thickmuskip
+ \or \mskip\thickmuskip
+ \fi
+ \else
+ \ifodd\digitoutputmode,\else.\fi
+ \fi}
+
+%D We also permit:
+
+\let\Digits=\digits
+
+%D These macros are complicated by the fact that we also
+%D have to support cases like:
+%D
+%D \starttypen
+%D {\digits1234}
+%D \digits{1234}
+%D \digits 1234\whatever
+%D $\digits 123.222,00$
+%D \digits 123.222,00.
+%D \stoptypen
+%D
+%D The latter case shows us that trailing non digits are to
+%D be passed untreated.
+%D
+%D Another interesting case is:
+%D
+%D \starttypen
+%D \digits 123.222,00^10
+%D \stoptypen
+%D
+%D The seperator is defined as:
+
+\def\digitpowerseperator%
+ {\cdot10}
+
+%D \macros
+%D {digittemplate}
+%D
+%D Users can specify the way they enter those digits by sayon
+%D something like:
+%D
+%D \starttypen
+%D \digittemplate 12.000.000,00 % \digittemplate .,
+%D \stoptypen
+
+\def\digittemplate #1 %
+ {\chardef\digitinputmode=0
+ \handletokens#1\with\scandigittemplate}
+
+\def\scandigittemplate#1%
+ {\if #1.\ifcase\digitinputmode\chardef\digitinputmode=1 \fi% period
+ \else\if#1,\ifcase\digitinputmode\chardef\digitinputmode=2 \fi% comma
+ \fi\fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index caf9d72e4..dae770f16 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1,1172 +1,1304 @@
-%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 \PSsetcmykcolor {setcmykcolor}
-\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 By the way, the \type {setcmykcolor} operator is not
-%D output by \METAPOST\ but can result from converting the
-%D \kap{RGB} color specifications, as implemented in
-%D \type{supp-mps}.
-
-%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\PSsetcmykcolor
- \pdfliteral{\gMPa1 \gMPa2 \gMPa3 \gMPa4 k \gMPa1 \gMPa2 \gMPa3 \gMPa4 K}%
- \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
- \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
+%D \module
+%D [ file=supp-pdf,
+%D version=1998.10.15,
+%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
+\ifx \undefined \convertPDFtoPDF \else \expandafter \endinput \fi
+
+%D This module handles some \PDF\ conversion and insertions
+%D topics. By default, the macros use the \PDFTEX\ primitive
+%D \type{\pdfliteral} when available.
+
+\writestatus{loading}{Context Support Macros / PDF}
+
+\unprotect
+
+\ifx\pdfliteral\undefined
+ \def\PDFcode#1{\message{[ignored pdfliteral: #1]}}
+\else
+ \let\PDFcode=\pdfliteral
+\fi
+
+%D \macros
+%D {convertPDFtoPDF}
+%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 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
+ \PDFcode{\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.
+
+%D \starttypen
+%D \def\startPDFtoPDF%
+%D {\setbox0=\vbox\bgroup
+%D \message{[PDF to PDF \PDFfilename}%
+%D \forgetall
+%D \scratchcounter=0
+%D \let\stopPDFtoPDF=\dostopPDFtoPDF}
+%D
+%D \def\dostopPDFtoPDF%
+%D {\ifnum\scratchcounter<0 \scratchcounter=1 \fi
+%D \message{(\the\scratchcounter\space lines)]}%
+%D \egroup
+%D \wd0=\PDFwidth
+%D \vbox to \PDFheight
+%D {\forgetall
+%D \vfill
+%D \PDFcode{q}%
+%D \PDFcode{1 0 0 1 \PDFxoffset\space \PDFyoffset\space cm}%
+%D \PDFcode{\PDFxscale\space 0 0 \PDFyscale\space 0 0 cm}%
+%D \box0
+%D \PDFcode{Q}}}
+%D
+%D \def\stopPDFtoPDF%
+%D {\message{[PDF to PDF \PDFfilename\space not found]}}
+%D
+%D \def\convertPDFtoPDF#1#2#3#4#5#6#7%
+%D {\bgroup
+%D \def\PDFfilename{#1}%
+%D \def\PDFxscale {#2}%
+%D \def\PDFyscale {#3}%
+%D \setPDFboundingbox{#4}{#5}{#6}{#7}{1}{1}%
+%D \uncatcodespecials
+%D \endlinechar=-1
+%D \let\doprocessPDFline=\handlePDFline
+%D \doprocessfile\scratchread\PDFfilename\doprocessPDFline
+%D \stopPDFtoPDF
+%D \egroup}
+
+\def\convertPDFtoPDF#1#2#3#4#5#6#7%
+ {\message{[PDF to PDF use \string\PDFcode instead]}%
+ \vbox{use the direct method instead}}
+
+%D \macros
+%D {dogetPDFmediabox}
+%D
+%D The next macro can be used to find the mediabox of a \PDF\
+%D illustration.
+%D
+%D \starttypen
+%D \dogetPDFmediabox
+%D {filename}
+%D {new dimen}{new dimen}{new dimen}{new dimen}
+%D \stoptypen
+%D
+%D Beware of dimen clashes: this macro uses the 5~default
+%D scratch registers! When no file or mediabox is found, the
+%D dimensions are zeroed.
+
+\def\dogetPDFmediabox#1#2#3#4#5%
+ {\bgroup
+ \def\PDFxscale{1}%
+ \def\PDFyscale{1}%
+ \uncatcodespecials
+ \endlinechar=-1
+ \def\checkPDFtypepage##1/Type /Page##2##3\done%
+ {\ifx##2\relax
+ \else\if##2s% accept /Page and /Pages
+ \let\doprocessPDFline=\findPDFmediabox
+ \else
+ \let\doprocessPDFline=\findPDFmediabox
+ \fi\fi}%
+ \def\findPDFtypepage%
+ {\expandafter\checkPDFtypepage\fileline/Type /Page\relax\done}%
+ \def\checkPDFmediabox##1/MediaBox##2##3\done%
+ {\ifx##2\relax \else
+ \setPDFmediabox##2##3\done
+ \fileprocessedtrue
+ \fi}%
+ \def\findPDFmediabox%
+ {\expandafter\checkPDFmediabox\fileline/MediaBox\relax\done}%
+ \let\doprocessPDFline=\findPDFtypepage
+ \doprocessfile\scratchread{#1}\doprocessPDFline
+ \egroup
+ \ifx\PDFxoffset\undefined
+ #2=\!!zeropoint #3=\!!zeropoint #4=\!!zeropoint #5=\!!zeropoint
+ \else
+ #2=\PDFxoffset bp #3=\PDFyoffset bp #4=\PDFwidth #5=\PDFheight
+ \fi}
+
+%D \macros
+%D {convertMPtoPDF}
+%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 \PSsetcmykcolor {setcmykcolor}
+\def \PSsetdash {setdash}
+\def \PSgsave {gsave}
+\def \PSgrestore {grestore}
+\def \PStranslate {translate}
+\def \PSscale {scale}
+\def \PSconcat {concat}
+\def \PSdtransform {dtransform}
+
+\def \PSnfont {nfont}
+
+\def \PSBoundingBox {BoundingBox:}
+\def \PSHiResBoundingBox {HiResBoundingBox:}
+\def \PSExactBoundingBox {ExactBoundingBox:}
+\def \PSPage {Page:}
+
+%D By the way, the \type {setcmykcolor} operator is not
+%D output by \METAPOST\ but can result from converting the
+%D \kap{RGB} color specifications, as implemented in
+%D \type{supp-mps}.
+
+%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 }%
+ \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\setnaturalcatcodes
+ \catcode`\%=\@@active
+ \catcode`\[=\@@active
+ \catcode`\]=\@@active
+ \catcode`\{=\@@active
+ \catcode`\}=\@@active
+ \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 %
+ {\ifdone
+ \ifnum\lccode`#1=0
+ \setMPargument{#1#2}%
+ \else
+ \edef\somestring{#1#2}%
+ \ifx\somestring\PSmoveto
+ \edef\lastMPmoveX{\gMPa1}%
+ \edef\lastMPmoveY{\gMPa2}%
+ \pdfliteral{\!MP{\gMPa1} \!MP{\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{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} rg
+ \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} RG}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetcmykcolor
+ \pdfliteral{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} k
+ \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} K}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetgray
+ \pdfliteral{\!MP{\gMPa1} g \!MP{\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{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} 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
+ \fi
+ \else
+ \edef\somestring{#1#2}%
+ \handleMPgraphic{#1#2}%
+ \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
+ \def\handleMPsequence{\handleMPboundingbox1}%
+ \else\ifx\somestring\PSHiResBoundingBox
+ \def\handleMPsequence{\handleMPboundingbox2}%
+ \else\ifx\somestring\PSExactBoundingBox
+ \def\handleMPsequence{\handleMPboundingbox3}%
+ \else\ifx\somestring\PSshowpage
+ \let\handleMPsequence=\finishMPgraphic
+ \else\ifx\somestring\PSPage
+ \let\handleMPsequence=\handleMPpage
+ \else
+ \setMPargument{#1}% kan weg
+ \fi\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 original as well as the recalculated dimensions are
+%D saved for later use.
+
+\newif\ifskipemptyMPgraphic \skipemptyMPgraphicfalse
+
+\chardef\currentMPboundingbox=0
+
+\def\handleMPboundingbox#1#2 #3 #4 #5
+ {\ifnum#1>\currentMPboundingbox
+ \xdef\MPllx{#2}\xdef\MPlly{#3}%
+ \xdef\MPurx{#4}\xdef\MPury{#5}%
+ \dimen0=#2pt\dimen0=-\MPxscale\dimen0
+ \dimen2=#3pt\dimen2=-\MPyscale\dimen2
+ \xdef\MPxoffset{\withoutpt{\the\dimen0}}%
+ \xdef\MPyoffset{\withoutpt{\the\dimen2}}%
+ \dimen0=#2bp\dimen0=-\dimen0
+ \dimen2=#3bp\dimen2=-\dimen2
+ \advance\dimen0 by #4bp
+ \dimen0=\MPxscale\dimen0
+ \xdef\MPwidth{\the\dimen0}%
+ \advance\dimen2 by #5bp
+ \dimen2=\MPyscale\dimen2
+ \xdef\MPheight{\the\dimen2}%
+ \chardef\currentMPboundingbox=#1\relax
+ \fi
+ \nofMParguments=0
+ \let\handleMPsequence=\dohandleMPsequence
+ \let\next=\handleMPsequence
+ \ifskipemptyMPgraphic
+ \ifdim\MPheight=\!!zeropoint\relax\ifdim\MPwidth=\!!zeropoint\relax
+ \def\next{\endinput\finishMPgraphic}%
+ \fi\fi
+ \fi
+ \next}
+
+%D We use the \type{page} comment as a signal that
+%D stackbuilding can be started.
+
+\def\handleMPpage #1 #2
+ {\nofMParguments=0
+ \donetrue
+ \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}}%
+ \ifx\size\PSnfont % round font size (to pt)
+ \advance\nofMParguments by -1
+ \expandafter\scratchdimen\gMPa{\the\nofMParguments}pt
+ \ifdim\scratchdimen<1pt
+ \def\size{1pt}%
+ \else
+ \advance\scratchdimen by .5pt
+ \def\size##1.##2\relax{\def\size{##1pt}}%
+ \expandafter\size\the\scratchdimen\relax
+ \fi
+ \else
+ \edef\size{\size bp}%
+ \fi
+ \advance\nofMParguments by -1
+ \font\temp=\gMPa{\the\nofMParguments} at \size
+ \advance\nofMParguments by -1
+ \temp
+ \ifnum\nofMParguments=1
+ \def\do(##1){##1}%
+ \gMPa1%
+ \else
+ \scratchcounter=1
+ \def\do(##1{\if##1 \char32\else##1\fi}%
+ \gMPa{\the\scratchcounter}\space
+ \def\do{}%
+ \loop
+ \advance\scratchcounter by 1
+ \ifnum\scratchcounter<\nofMParguments
+ \gMPa{\the\scratchcounter}\space
+ \repeat
+ \def\do##1){\if##1 \char32\else##1\fi}%
+ \gMPa{\the\scratchcounter}%
+ \fi
+ \unskip}%
+ \dimen0=\lastMPmoveY bp
+ \advance\dimen0 by \ht0
+ \ScaledPointsToBigPoints{\number\dimen0}\lastMPmoveY
+ \PDFcode{n q 1 0 0 1 \lastMPmoveX\space\lastMPmoveY\space cm}%
+ \dimen0=\ht0
+ \advance\dimen0 by \dp0
+ \box0
+ \vskip-\dimen0
+ \PDFcode{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}%
+ \PDFcode{\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
+ \PDFcode{\gMPa1 w}%
+ \def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}%
+ \else
+ \PDFcode{\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{\!MP{\gMPs1} \!MP{\gMPs2} l}%
+ \or
+ \pdfliteral{\!MP{\gMPs1} \!MP{\gMPs2} \!MP{\gMPs3} \!MP{\gMPs4} \!MP{\gMPs5} \!MP{\gMPs6} c}%
+ \or
+ \pdfliteral{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} l S}%
+ \or
+ \edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \pdfliteral{\!MP{\lastMPmoveX} \!MP{\lastMPmoveY} 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{\!MP{\a} \!MP{\b} l}%
+ \or
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b%
+ \doMPconcat{\gMPs3}\c{\gMPs4}\d%
+ \doMPconcat{\gMPs5}\e{\gMPs6}\f%
+ \pdfliteral{\!MP{\a} \!MP{\b} \!MP{\c} \!MP{\d} \!MP{\e} \!MP{\f} c}%
+ \or
+ \bgroup
+ \noMPtranslate
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
+ \pdfliteral{\!MP{\a} \!MP{\b} l S}%
+ \egroup
+ \or
+ \edef\lastMPmoveX{\gMPs1}%
+ \edef\lastMPmoveY{\gMPs2}%
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b%
+ \pdfliteral{\!MP{\a} \!MP{\b} 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 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\presetMPscale%
+ {\dimen 0=\gMPs1 pt \doMPreducedimen 0
+ \dimen 2=\!!zeropoint
+ \dimen 4=\!!zeropoint
+ \dimen 6=\gMPs2 pt \doMPreducedimen 6
+ \dimen 8=\!!zeropoint
+ \dimen10=\!!zeropoint}
+
+\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
+ \PDFcode{\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
+ \PDFcode{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 cm}%
+ \resetMPstack}
+
+\def\handleMPpathscale%
+ {\presetMPscale
+ \PDFcode{\gMPs1 0 0 \gMPs2 0 0 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{\PDFcode{h}}%
+ \else\ifx\somestring\PSconcat
+ \let\flushMPpath=\flushconcatMPpath
+ \handleMPpathconcat
+ \else\ifx\somestring\PSscale
+ \let\flushMPpath=\flushconcatMPpath
+ \handleMPpathscale
+ \fi\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\processMPtoPDFfile% file xscale yscale
+ {\bgroup
+ \let\finishMPgraphic=\egroup
+ \doprocessMPtoPDFfile}
+
+\ifx\deleteMPgraphic\undefined
+ \def\deleteMPgraphic#1{}
+\fi
+
+\def\doprocessMPtoPDFfile#1#2#3% file xscale yscale
+ {\setMPspecials
+ \catcode`\^^M=\@@endofline
+ \startMPscanning
+ \let\do=\empty
+ \xdef\MPxscale{#2}%
+ \xdef\MPyscale{#3}%
+ \donefalse
+ \let\handleMPsequence=\dohandleMPsequence
+ \message{[MP to PDF #1]}%
+ \input#1\relax
+ \deleteMPgraphic{#1}}
+
+\def\convertMPtoPDF#1#2#3%
+ {\bgroup
+ \setbox0=\vbox\bgroup
+ \forgetall
+ \offinterlineskip
+ \PDFcode{q}%
+ \doprocessMPtoPDFfile{#1}{#2}{#3}}
+
+\def\finishMPgraphic%
+ {\PDFcode{Q}%
+ \egroup
+ \wd0=\MPwidth
+ \vbox to \MPheight
+ {\forgetall
+ \vfill
+ \PDFcode{q \MPxscale\space 0 0 \MPyscale\space
+ \MPxoffset\space \MPyoffset\space cm}%
+ \box0
+ \PDFcode{Q}}%
+ \egroup}
+
+%D \macros
+%D {twodigitMPoutput}
+%D
+%D We can limit the precission to two digits after the comma
+%D by saying:
+%D
+%D \starttypen
+%D \twodigitMPoutput
+%D \stoptypen
+%D
+%D This option only works in \CONTEXT\ combined with \ETEX.
+
+\def\twodigitMPoutput%
+ {\let\!MP\twodigitrounding}
+
+\def\!MP#1{#1}
+
+%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
diff --git a/tex/context/base/supp-spe.tex b/tex/context/base/supp-spe.tex
index 59dabe7df..7c320c50e 100644
--- a/tex/context/base/supp-spe.tex
+++ b/tex/context/base/supp-spe.tex
@@ -1,166 +1,169 @@
-%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{#1 #2}%
- \else
- %\message{[mimmick special #1 with #2]}%
- \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{}
-%D \stoptypen
-%D
-%D But here we default to idle.
-
-\let\normalspecial =\special
-\let\defaultspecial=\special
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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.
+
+
+%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.
+
+\ifx \undefined \writestatus \input supp-mis.tex \relax \fi
+\ifx \undefined \redefinespecial \else \expandafter \endinput \fi
+
+\writestatus{loading}{Context Support Macros / Specials}
+
+\unprotect
+
+%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{#1 #2}%
+ \else
+ %\message{[mimmick special #1 with #2]}%
+ \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{}
+%D \stoptypen
+%D
+%D But here we default to idle.
+
+\let\normalspecial =\special
+\let\defaultspecial=\special
+
+\protect
+
+\endinput
diff --git a/tex/context/base/supp-tpi.tex b/tex/context/base/supp-tpi.tex
index 857d610f6..01c7ee33c 100644
--- a/tex/context/base/supp-tpi.tex
+++ b/tex/context/base/supp-tpi.tex
@@ -1,339 +1,342 @@
-%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\MPgraphicbox \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\MPgraphicbox=\hbox to \!!zeropoint
- {\kern-\wd\MPgraphicbox
- \vbox to \!!zeropoint{\box\MPgraphicbox\vss}\hss}%
- \ht\MPgraphicbox=\!!zeropoint
- \wd\MPgraphicbox=\!!zeropoint
- \dp\MPgraphicbox=\!!zeropoint
- \box\MPgraphicbox
- \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
+%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\MPgraphicbox \input supp-mps \relax \fi
+\ifx\undefined\dogetEPSboundingbox \input supp-eps \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.
+
+% BETER: check for context and include mp-tool.mp
+
+\def\startTPICspecials%
+ {\bgroup
+ \let\startTPICspecials=\relax
+ \aftergroup\stopTPICspecials
+ \startwritingMPgraphic
+ \writeMPgraphic{input mp-tool.mp;}%
+ \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\MPgraphicbox=\hbox to \!!zeropoint
+ {\kern-\wd\MPgraphicbox
+ \vbox to \!!zeropoint{\box\MPgraphicbox\vss}\hss}%
+ \ht\MPgraphicbox=\!!zeropoint
+ \wd\MPgraphicbox=\!!zeropoint
+ \dp\MPgraphicbox=\!!zeropoint
+ \box\MPgraphicbox
+ \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
diff --git a/tex/context/base/supp-vis.tex b/tex/context/base/supp-vis.tex
index 54dc4779b..9a9d14ea9 100644
--- a/tex/context/base/supp-vis.tex
+++ b/tex/context/base/supp-vis.tex
@@ -1,1908 +1,1883 @@
-%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 {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 \macros
-%D {normaloffinterlineskip}
-%D {}
-%D
-%D The next hack is needed because in \CONTEXT\ we redefine
-%D \type{\offinterlineskip}.
-
-\ifx\undefined\normaloffinterlineskip
- \let\normaloffinterlineskip=\offinterlineskip
-\fi
-
-%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
- \normaloffinterlineskip
- \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
-
-\unexpanded\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
-
-\unexpanded\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
-
-\unexpanded\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
-
-\unexpanded\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:
-
-\unexpanded\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 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.
-
-\unexpanded\def\ruledhss%
- {\doruledhfiller\normalhss\normalhfilneg{0}{0}}
-
-\unexpanded\def\ruledhfil%
- {\doruledhfiller\normalhfil\normalhfilneg{10}{-6}}
-
-\unexpanded\def\ruledhfill%
- {\doruledhfiller\normalhfill\normalhfillneg{18}{-14}}
-
-\unexpanded\def\ruledhfilneg%
- {\doruledhfiller\normalhfilneg\normalhfil{-6}{10}}
-
-\unexpanded\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
- \normaloffinterlineskip
- \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.
-
-\unexpanded\def\ruledvss%
- {\doruledvfiller\normalvss\normalvfilneg{2}}
-
-\unexpanded\def\ruledvfil%
- {\doruledvfiller\normalvfil\normalvfilneg{-4}}
-
-\unexpanded\def\ruledvfill%
- {\doruledvfiller\normalvfill\normalvfillneg{-12}}
-
-\unexpanded\def\ruledvfilneg%
- {\doruledvfiller\normalvfilneg\normalvfil{8}}
-
-\unexpanded\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}
-
-\unexpanded\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
- \normaloffinterlineskip
- \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}
-
-\unexpanded\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}
-
-\unexpanded\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
- \normaloffinterlineskip
- \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}
-
-\unexpanded\def\ruledvkern#1%
- {\bgroup
- \let\afterwards=#1\relax
- \afterassignment\doruledvkern
- \scratchskip=}
-
-\unexpanded\def\ruledkern%
- {\ifvmode
- \expandafter\ruledvkern
- \else
- \expandafter\ruledhkern
- \fi
- \normalkern}
-
-%D A a bit more \TEX nice solution is:
-%D
-%D \starttypen
-%D \unexpanded\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}
-
-\unexpanded\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}
-
-\unexpanded\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}
-
-\unexpanded\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}
-
-\unexpanded\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}
-
-\unexpanded\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}
-
-\unexpanded\def\ruledvpenalty%
- {\bgroup
- \afterassignment\doruledvpenalty
- \scratchcounter=}
-
-\unexpanded\def\ruledpenalty%
- {\ifvmode
- \expandafter\ruledvpenalty
- \else
- \expandafter\ruledhpenalty
- \fi}
-
-%D At the cost of some more tokens, a bit more clever
-%D implementation would be:
-%D
-%D \starttypen
-%D \unexpanded\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 bodyfontsize 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
+%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
+%D Depending on my personal needs and those of whoever uses it,
+%D the macros will be improved in terms of visualization,
+%D efficiency and compatibility. These rather low level
+%D visualization macros are supplemented by ones that can
+%D visualize baselines, the page layout and whatever deserves
+%D attention. Most of those macros can be found in \type
+%D {core-vis} and other core modules. Their integration in
+%D \CONTEXT\ prohibits generic applications.
+
+\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
+
+\let\visualvrule\vrule
+\let\visualhrule\hrule
+
+%D \macros
+%D {dontinterfere}
+%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 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 \macros
+%D {normaloffinterlineskip}
+%D
+%D The next hack is needed because in \CONTEXT\ we redefine
+%D \type{\offinterlineskip}.
+
+\ifx\undefined\normaloffinterlineskip
+ \let\normaloffinterlineskip=\offinterlineskip
+\fi
+
+%D \macros
+%D {normalhbox,
+%D normalvbox,normalvtop}
+%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 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 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 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 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 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 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 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 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 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 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 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
+ \normaloffinterlineskip
+ \visualhrule
+ \!!height\boxrulewidth
+ \iftoprule\else\!!width\!!zeropoint\fi
+ \normalvskip-\boxrulewidth
+ \normalhbox to \ruledwidth
+ {\visualvrule
+ \!!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
+ \visualhrule
+ \!!height\boxrulewidth
+ \else
+ \normalhbox
+ {\normalhskip2.5\boxrulewidth
+ \visualvrule
+ \!!height\boxrulewidth
+ \!!width5\boxrulewidth
+ \normalhskip2.5\boxrulewidth}%
+ \fi
+ \fi
+ \normalhfill
+ \visualvrule
+ \!!width\ifrightrule\else0\fi\boxrulewidth}%
+ \normalvskip-\boxrulewidth
+ \visualhrule
+ \!!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 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
+
+\unexpanded\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
+
+\unexpanded\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
+
+\unexpanded\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
+
+\unexpanded\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 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:
+
+\unexpanded\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 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 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 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 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 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 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
+ {\visualvrule
+ \!!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.
+
+\unexpanded\def\ruledhss%
+ {\doruledhfiller\normalhss\normalhfilneg{0}{0}}
+
+\unexpanded\def\ruledhfil%
+ {\doruledhfiller\normalhfil\normalhfilneg{10}{-6}}
+
+\unexpanded\def\ruledhfill%
+ {\doruledhfiller\normalhfill\normalhfillneg{18}{-14}}
+
+\unexpanded\def\ruledhfilneg%
+ {\doruledhfiller\normalhfilneg\normalhfil{-6}{10}}
+
+\unexpanded\def\ruledhfillneg%
+ {\doruledhfiller\normalhfillneg\normalhfill{-14}{18}}
+
+%D \macros
+%D {ruledvss,
+%D ruledvfil,ruledvfilneg,
+%D ruledvfill,ruledvfillneg}
+%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
+ {\visualvrule
+ \!!width#2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth}%
+ \smashbox#1}%
+
+\def\doruledvfiller#1#2#3%
+ {#1#2%
+ \bgroup
+ \dontinterfere
+ \dontcomplain
+ \normaloffinterlineskip
+ \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.
+
+\unexpanded\def\ruledvss%
+ {\doruledvfiller\normalvss\normalvfilneg{2}}
+
+\unexpanded\def\ruledvfil%
+ {\doruledvfiller\normalvfil\normalvfilneg{-4}}
+
+\unexpanded\def\ruledvfill%
+ {\doruledvfiller\normalvfill\normalvfillneg{-12}}
+
+\unexpanded\def\ruledvfilneg%
+ {\doruledvfiller\normalvfilneg\normalvfil{8}}
+
+\unexpanded\def\ruledvfillneg%
+ {\doruledvfiller\normalvfillneg\normalvfill{16}}
+
+%D \macros
+%D {ruledhskip}
+%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
+ \visualvrule
+ \!!width4\testrulewidth
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth}%
+ \else
+ \setbox0=\normalhbox to \ifnegative-\fi\scratchskip
+ {\visualvrule
+ \!!width2\testrulewidth
+ \ifnegative\!!depth\else\!!height\fi16\testrulewidth
+ \cleaders
+ \visualhrule
+ \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
+ \visualvrule
+ \!!width2\testrulewidth
+ \!!height\ifnegative-7\else9\fi\testrulewidth
+ \!!depth\ifnegative9\else-7\fi\testrulewidth
+ \normalhskip 2\testrulewidth}%
+ \normalhfill
+ \fi
+ \visualvrule
+ \!!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}
+
+\unexpanded\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 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
+ \normaloffinterlineskip
+ \investigateskip\scratchskip
+ \ifzero
+ \setbox0=\normalvcue
+ {\visualvrule
+ \!!width32\testrulewidth
+ \!!height2\testrulewidth
+ \!!depth2\testrulewidth}%
+ \else
+ \setbox0=\normalvbox to \ifnegative-\fi\scratchskip
+ {\visualhrule
+ \!!width16\testrulewidth
+ \!!height2\testrulewidth
+ \ifflexible
+ \cleaders
+ \normalhbox to 16\testrulewidth
+ {\normalhss
+ \normalvbox
+ {\normalvskip 2\testrulewidth
+ \visualhrule
+ \!!width2\testrulewidth
+ \!!height2\testrulewidth
+ \normalvskip 2\testrulewidth}%
+ \normalhss}%
+ \normalvfill
+ \else
+ \normalvfill
+ \fi
+ \visualhrule
+ \!!width16\testrulewidth
+ \!!height2\testrulewidth}%
+ \setbox2=\normalvbox to \ht0
+ {\visualhrule
+ \!!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}
+
+\unexpanded\def\ruledvskip%
+ {\bgroup
+ \afterassignment\doruledvskip
+ \scratchskip=}
+
+%D \macros
+%D {ruledkern}
+%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
+ {\visualvrule
+ \!!width\!!zeropoint
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth}%
+ \setbox0=\normalhbox
+ {\normalhskip-4\testrulewidth\box0}%
+ \else
+ \setbox0=\ruledhbox to \ifnegative-\fi\scratchskip
+ {\visualvrule
+ \!!width\!!zeropoint
+ \ifnegative\!!depth\else\!!height\fi16\testrulewidth
+ \ifflexible
+ \normalhskip2\testrulewidth
+ \cleaders
+ \normalhbox
+ {\normalhskip 2\testrulewidth
+ \visualvrule
+ \!!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}
+
+\unexpanded\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
+ \normaloffinterlineskip
+ \investigateskip\scratchskip
+ \boxrulewidth=2\testrulewidth
+ \ifzero
+ \setbox0=\ruledhbox to 32\testrulewidth
+ {\visualvrule
+ \!!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
+ \visualhrule
+ \!!width2\testrulewidth
+ \!!height2\testrulewidth
+ \normalvskip 2\testrulewidth}%
+ \normalhss}%
+ \normalvfill
+ \else
+ \visualvrule
+ \!!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}
+
+\unexpanded\def\ruledvkern#1%
+ {\bgroup
+ \let\afterwards=#1\relax
+ \afterassignment\doruledvkern
+ \scratchskip=}
+
+\unexpanded\def\ruledkern%
+ {\ifvmode
+ \expandafter\ruledvkern
+ \else
+ \expandafter\ruledhkern
+ \fi
+ \normalkern}
+
+%D A a bit more \TEX nice solution is:
+%D
+%D \starttypen
+%D \unexpanded\def\ruledkern%
+%D {\csname ruled\ifvmode v\else h\fi kern\endcsname\normalkern}
+%D \stoptypen
+
+%D \macros
+%D {ruledhglue,ruledvglue}
+%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
+ \visualvrule\!!width\!!zeropoint
+ \normalpenalty\!!tenthousand
+ \ruledhkern\normalhskip\scratchskip
+ \spacefactor=\scratchcounter
+ \egroup}
+
+\unexpanded\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
+ \visualhrule\!!height\!!zeropoint
+ \normalpenalty\!!tenthousand
+ \ruledvkern\normalvskip\scratchskip
+ \prevdepth=\nextdepth
+ \egroup}
+
+\unexpanded\def\ruledvglue%
+ {\bgroup
+ \afterassignment\doruledvglue\scratchskip=}
+
+%D \macros
+%D {ruledmkern,ruledmskip}
+%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
+ {\visualvrule
+ \!!height16\testrulewidth
+ \!!depth16\testrulewidth
+ \!!width\testrulewidth
+ \leaders
+ \visualhrule
+ \!!height\ifpositive16\else-14\fi\testrulewidth
+ \!!depth\ifpositive-14\else16\fi\testrulewidth
+ \normalhfill
+ \ifflexible
+ \normalhskip-\wd0
+ \leaders
+ \visualhrule
+ \!!height\testrulewidth
+ \!!depth\testrulewidth
+ \normalhfill
+ \fi
+ \visualvrule
+ \!!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}
+
+\unexpanded\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}
+
+\unexpanded\def\ruledmskip%
+ {\bgroup
+ \afterassignment\doruledmskip\scratchmuskip=}
+
+%D \macros
+%D {penalty}
+%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
+ \visualvrule
+ \!!width2\testrulewidth
+ \!!height#3\testrulewidth
+ \!!depth#4\testrulewidth
+ \fi
+ \visualvrule
+ \!!width\dimen0
+ \!!height#5\testrulewidth
+ \!!depth#6\testrulewidth
+ \ifnum#2>0
+ \visualvrule
+ \!!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
+ \visualvrule
+ \!!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}
+
+\unexpanded\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
+ {\visualvrule
+ \!!height4\testrulewidth
+ \!!depth4\testrulewidth
+ \!!width\!!zeropoint
+ \visualvrule
+ \!!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}
+
+\unexpanded\def\ruledvpenalty%
+ {\bgroup
+ \afterassignment\doruledvpenalty
+ \scratchcounter=}
+
+\unexpanded\def\ruledpenalty%
+ {\ifvmode
+ \expandafter\ruledvpenalty
+ \else
+ \expandafter\ruledhpenalty
+ \fi}
+
+%D At the cost of some more tokens, a bit more clever
+%D implementation would be:
+%D
+%D \starttypen
+%D \unexpanded\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 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 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 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 bodyfontsize 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
diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex
new file mode 100644
index 000000000..42e950959
--- /dev/null
+++ b/tex/context/base/symb-ini.tex
@@ -0,0 +1,336 @@
+%D \module
+%D [ file=symb-nav,
+%D version=1998.07.20,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Navigational Symbols,
+%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 macros described here used to be part of the \type
+%D {core-con} module. I decided to move them here when
+%D symbolsets saw the light. Let their light shine.
+
+\writestatus{loading}{Context Symbol Libraries / Initialization}
+
+\unprotect
+
+% TOBIAS
+
+\startmessages dutch library: symbols
+ title: symbolen
+ 1: symboolset -- wordt geladen
+\stopmessages
+
+\startmessages english library: symbols
+ title: symbols
+ 1: loading symbolset --
+\stopmessages
+
+\startmessages german library: symbols
+ title: symbole
+ 1: Lade Symboldatei --
+\stopmessages
+
+%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 simply 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]%
+ {\ifx\currentsymbolset\empty
+ \setvalue{\??ss#1}{#2}%
+ \else
+ \doifundefinedelse{\??ss:\currentsymbolset}
+ {\let\currentsymbollist\empty}
+ {\edef\currentsymbollist{\csname\??ss:\currentsymbolset\endcsname}}%
+ \addtocommalist{#1}\currentsymbollist
+ \setvalue{\??ss\currentsymbolset#1}{#2}%
+ \letvalue{\??ss:\currentsymbolset}\currentsymbollist
+ \fi}
+
+\def\definesymbol%
+ {\dodoubleargument\dodefinesymbol}
+
+\def\dosymbol[#1][#2]%
+ {\ifsecondargument
+ \doifdefinedelse{\??ss#1#2}
+ {\getvalue{\??ss#1#2}}
+ {\doifdefinedelse{\??ss#2}{\getvalue{\??ss#2}}{#2}}%
+ \else
+ \doifdefinedelse{\??ss\currentsymbolset#1}
+ {\getvalue{\??ss\currentsymbolset#1}}
+ {\doifdefinedelse{\??ss#1}{\getvalue{\??ss#1}}{#1}}%
+ \fi}
+
+\unexpanded\def\symbol%
+ {\dodoubleempty\dosymbol}
+
+%D \macros
+%D {definefiguresymbol}
+%D
+%D To simplify defining figure symbols, we offer:
+%D
+%D \showsetup{\y!definesymbol}
+%D
+%D By default, such symbols scale along the current bodyfont
+%D size.
+
+\def\defaultsymbolfactor{10}
+
+\def\dodefinefiguresymbol[#1][#2][#3]%
+ {\ifsecondargument
+ \definesymbol[#1][{\externalfigure[#2][\c!symbool=\v!ja,\c!hfactor=\defaultsymbolfactor,#3]}]%
+ \fi}
+
+\def\definefiguresymbol%
+ {\dotripleempty\dodefinefiguresymbol}
+
+%\def\objectsymbol[#1]%
+% {\dopresetfieldsymbol{#1}\dogetfieldsymbol{#1}}
+
+%D \macros
+%D {doifsymboldefinedelse}
+%D
+%D A handy private one:
+
+\def\doifsymboldefinedelse#1#2#3%
+ {\doifdefinedelse{\??ss\currentsymbolset#1}
+ {#2}{\doifdefinedelse{\??ss#1}{#2}{#3}}}
+
+%D \macros
+%D {setupsymbolset,startsymbolset}
+%D
+%D From these macro definitions one can deduce that symbols can
+%D be grouped in symbol sets:
+%D
+%D \starttypen
+%D \startsymbolset [navigation 1]
+%D \definefiguresymbol [Next] [mp-symb.1]
+%D \definefiguresymbol [Prev] [mp-symb.2]
+%D \stopsymbolset
+%D \stoptypen
+%D
+%D Such a symbol can be typeset with:
+%D
+%D \starttypen
+%D \setupsymbolset[navigation 1]\symbol[Next]
+%D \stoptypen
+%D
+%D or simply:
+%D
+%D \starttypen
+%D \symbol[navigation 1][Next]
+%D \stoptypen
+%D
+%D Formally:
+%D
+%D \showsetup{\y!setupsymbolset}
+%D \showsetup{\y!startsymbolset}
+
+\let\currentsymbolset\empty
+
+\def\startsymbolset[#1]%
+ {\def\currentsymbolset{:#1:}}
+
+\def\stopsymbolset%
+ {\let\currentsymbolset\empty}
+
+\let\setupsymbolset\startsymbolset
+
+%D \macros
+%D {showsymbolset}
+%D
+%D \showsetup{\y!showsymbolset}
+
+\def\doshowsymbolset[#1][#2]% looks like \showexternalfigureb
+ {\vbox\bgroup
+ \blanko
+ \getparameters[\??ss][\c!n=5,#2]%
+ \setupsymbolset[#1]%
+ \doifdefined{\??ss:\currentsymbolset}
+ {\global\let\allfigures=\empty
+ \doglobal\newcounter\figurecounter
+ \setupcolors[\c!status=\v!start]% to prevent mps color conversion
+ \mindermeldingen
+ \def\doshowsymbols%
+ {\expanded{\globalprocesscommalist[\getvalue{\??ss:\currentsymbolset}]\noexpand\docommando}}%
+ \def\docommando##1%
+ {\vbox
+ {\forgetall
+ \tttf
+ \halign
+ {\hss\quad####\strut\quad\hss\cr
+ \symbol[##1]\quad{\red\ruledhbox{\black\symbol[##1]}}\cr
+ \tfx##1\cr}}%
+ \doglobal\increment\figurecounter
+ \ifnum\figurecounter=\@@ssn
+ \doglobal\newcounter\figurecounter
+ \def\next{\crcr\noalign{\vskip1ex}}%
+ \else
+ \def\next{&}%
+ \fi
+ \next}%
+ \tabskip=\!!zeropoint \!!plus 1fill
+ \halign to \hsize
+ {&\hss##\hss\cr\doshowsymbols\crcr}}%
+ \blanko
+ \egroup}
+
+\def\showsymbolset%
+ {\dodoubleempty\doshowsymbolset}
+
+%D \macros
+%D {usesymbols}
+%D
+%D \showsetup{\y!usesymbols}
+
+\def\dousesymbols#1%
+ {\makeshortfilename[\f!symbolprefix#1]%
+ \showmessage{\m!symbols}{1}{#1}%
+ \startreadingfile
+ \readsysfile{\shortfilename}{}{}%
+ \stopreadingfile}
+
+\def\usesymbols[#1]%
+ {\processcommalist[#1]\dousesymbols}
+
+%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{\setsmallbodyfont\raise\!!onepoint\hbox{$\bigcirc$}}]
+% \definesymbol [7] [$\bigcirc$]
+% \definesymbol [8] [\hbox{\hsmash{$\sqcup$}$\sqcap$}]
+
+\definesymbol [\v!geen] []
+\definesymbol [bullet] [$\bullet$]
+\definesymbol [dash] [$-$]
+\definesymbol [star] [$\star$]
+\definesymbol [triangle] [$\triangleright$]
+\definesymbol [circle] [$\circ$]
+\definesymbol [medcircle] [\hbox{\setsmallbodyfont\raise\!!onepoint\hbox{$\bigcirc$}}]
+\definesymbol [bigcircle] [$\bigcirc$]
+\definesymbol [square] [\hbox{\hsmash{$\sqcup$}$\sqcap$}]
+
+\definesymbol [1] [{\symbol[bullet]}]
+\definesymbol [2] [{\symbol[dash]}]
+\definesymbol [3] [{\symbol[star]}]
+\definesymbol [4] [{\symbol[triangle]}]
+\definesymbol [5] [{\symbol[circle]}]
+\definesymbol [6] [{\symbol[medcircle]}]
+\definesymbol [7] [{\symbol[bigcircle]}]
+\definesymbol [8] [{\symbol[square]}]
+
+%D Special hyperlinks, namely those to pages or navigational
+%D properties, are associated with symbols.
+
+\definesymbol [\v!eerstepagina] [\gotobegincharacter]
+\definesymbol [\v!vorigepagina] [\gobackwardcharacter]
+\definesymbol [\v!volgendepagina] [\goforwardcharacter]
+\definesymbol [\v!laatstepagina] [\gotoendcharacter]
+\definesymbol [\v!eerstesubpagina] [\gotobegincharacter]
+\definesymbol [\v!vorigesubpagina] [\gobackwardcharacter]
+\definesymbol [\v!volgendesubpagina] [\goforwardcharacter]
+\definesymbol [\v!laatstesubpagina] [\gotoendcharacter]
+\definesymbol [\v!PreviousJump] [\gobackjumpcharacter]
+\definesymbol [\v!NextJump] [\goforjumpcharacter]
+\definesymbol [\v!CloseDocument] [\closecharacter]
+
+\definesymbol [\v!eerste] [{\symbol[\v!eerstepagina]}]
+\definesymbol [\v!vorige] [{\symbol[\v!vorigepagina]}]
+\definesymbol [\v!volgende] [{\symbol[\v!volgendepagina]}]
+\definesymbol [\v!laatste] [{\symbol[\v!laatstepagina]}]
+\definesymbol [\v!ergens] [\gotosomewherecharacter]
+\definesymbol [\v!nergens] [\gonowherecharacter]
+
+\definesymbol [\v!achteruit] [{\symbol[\v!vorigepagina]}]
+\definesymbol [\v!vooruit] [{\symbol[\v!volgendepagina]}]
+
+%D These symbols are taken from the Computer Moders Roman
+%D symbol set or, when present, from the additional symbols of
+%D the American Mathematical Society. Of course one can use
+%D his or her own symbols by redefining them.
+
+\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\gonowherecharacter%
+ {\mathematics{\bullet}}
+
+%\def\gotosomewherecharacter% {} permits ^\...
+% {{\hbox{\hsmash{\gobackwardcharacter}\goforwardcharacter}}}
+
+\def\gotosomewherecharacter%
+ {{\hbox{\hsmash{\symbol[\v!vorige]}\symbol[\v!volgende]}}}
+
+\unexpanded\def\closecharacter%
+ {\dogotocharacter\boxtimes
+ {\ruledhbox{\mathematics{\times}}}
+ {\mathematics{\boxtimes}}}
+
+\def\goforjumpcharacter%
+ {\hbox{\goforwardcharacter \kern-.5em\goforwardcharacter}}
+
+\def\gobackjumpcharacter%
+ {\hbox{\gobackwardcharacter\kern-.5em\gobackwardcharacter}}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/syst-eet.tex b/tex/context/base/syst-eet.tex
new file mode 100644
index 000000000..8d606366f
--- /dev/null
+++ b/tex/context/base/syst-eet.tex
@@ -0,0 +1,270 @@
+% TACO: wordt ook de eerste spatie weggefilterd? Het komt
+% voor dat (om estetische redenen we hebben:
+%
+% \definieerkorps[12pt][rm]
+% [ tf=...,
+% tfa=...]
+%
+% Is evt wel in macro weg te werken, maar ik denk dat het
+% erin moet.
+%
+% vreemd, als 1 item en dan \delitem, number reports niets
+% ipv 0
+%
+% (dat gedoe met die expansie in commalists is niet nodig,
+% ik maak een specials processaction, nu nog incompatible
+% trouwens, komt wel goed.)
+
+\ifx\eeTeXversion\undefined \endinput \fi
+
+\writestatus{loading}{Context System Macros / eeTeX replacements}
+
+\unprotect
+
+%D Test loop
+%D
+%D \starttypen
+%D \dorecurse{20}{{\switchnaarkorps[lbr,10pt]}}
+%D \stoptypen
+%D
+%D \starttabulate[|c|c|c|]
+%D \NC pdftex \NC pdfetex \NC eetex \NC \NR
+%D \HL
+%D \NC 64 sec \NC 54 sec \NC 56/54 sec \NC \NR
+%D \stoptabulate
+%D
+%D Keep in mind that the font mechanism is optimized for
+%D \ETEX\ anyway.
+
+%D \macros
+%D {listsep}
+%D
+%D The list separator is a comma, optionally followed by a
+%D space or something similar.
+
+\listsep{, }
+
+%D \macros
+%D {appendtoks, prependtoks}
+%D
+%D Must deal with:
+%D
+%D \startypen
+%D \appendtoks \bgroup \to \sometoks -> \sometoks={\bgroup}
+%D \appendtoks {oeps}\to \sometoks -> \sometoks={{oeps}}
+%D \appendtoks oeps\to \sometoks -> \sometoks={oeps}
+%D \stoptypen
+
+\def\appendtoks%
+ {\bgroup
+ \let\bgroup\relax
+ \futurelet\scratchtoken\doappendtoks}
+
+\def\doappendtoks%
+ {\ifx\scratchtoken\normalbgroup
+ \egroup\expandafter\dodoappendtoks
+ \else
+ \egroup\expandafter\donoappendtoks
+ \fi}
+
+\def\dodoappendtoks#1\to#2{\dodoglobal\apptoks#2{{#1}}}
+\def\donoappendtoks#1\to#2{\dodoglobal\apptoks#2{#1}}
+
+\def\prependtoks%
+ {\bgroup
+ \let\bgroup\relax
+ \futurelet\scratchtoken\doprependtoks}%
+
+\def\doprependtoks%
+ {\ifx\scratchtoken\bgroup
+ \egroup\expandafter\dodoprependtoks
+ \else
+ \egroup\expandafter\donoprependtoks
+ \fi}
+
+\def\dodoprependtoks#1\to#2{\dodoglobal\pretoks#2{{#1}}}
+\def\donoprependtoks#1\to#2{\dodoglobal\pretoks#2{#1}}
+
+%D \macros
+%D {addtocommalist,removefromcommalist}
+%D
+%D The first one is rather straightforward, but the second
+%D one, well maybe another primitive makes sense.
+
+\def\addtocommalist#1#2%
+ {\redoglobal\einsdef#2{#1}%
+ \dodoglobal\edef#2{#2}}
+
+\def\removefromcommalist#1#2%
+ {\scratchcounter\@EA\itemnumber\@EA#2\@EA{#1}%
+ \redoglobal\delitem#2\scratchcounter to\garbage
+ \dodoglobal\edef#2{#2}}
+
+%D \macros
+%D {getcommalistsize,getfromcommalist}
+%D
+%D Pretty short, these ones. We don't optimize for case 1
+%D and 2.
+
+\def\getcommalistsize[#1]%
+ {\listdef\commalisttokens{#1}%
+ \edef\commalistsize{\number\commalisttokens}}
+
+\def\getfromcommalist[#1]#2[#3]%
+ {\listdef\commalisttokens{#1}%
+ \getitem\commalisttokens#3to\commalistelement}
+
+%D \macros
+%D {dogetparameters}
+%D
+%D We skip the parameter passing.
+
+\def\dogetparameters#1[#2]#3[#4]%
+ {\listdef\commalisttokens{#4}%
+ \ifcase\commalisttokens\else
+ \def\p!dogetparameter##1%
+ {\p!doassign#1[#2][##1==\relax]}%
+ \scanlist\commalisttokens\p!dogetparameter
+ \fi}
+
+% tijdelijk:
+
+\def\dogetparameters#1[#2]#3[#4]%
+ {\listdef\commalisttokens{,#4}% de comma is een hack
+ \writestatus{assign}{\number\commalisttokens::\detokenize{#4}}%
+ \delitem\commalisttokens1to\garbage
+ \writestatus{assign}{\number\commalisttokens}% leeg als 0
+ \ifcase\commalisttokens\else % vreemd
+ \def\p!dogetparameter##1%
+ {\writestatus{assign}{\detokenize{##1}}%
+ \p!doassign#1[#2][##1==\relax]}%
+ \scanlist\commalisttokens\p!dogetparameter
+ \fi}
+
+%D \macros
+%D {doifinsetelse, doifinset, doifnotinset}
+%D
+%D We limit the number of parameter passes and don't share
+%D the common component.
+
+\long\def\doifinsetelse#1#2#3#4%
+ {\elistdef\commalisttokens{#2}%
+ \ifhasitem\commalisttokens{#1}#3\else#4\fi}
+
+\long\def\doifinset#1#2#3%
+ {\elistdef\commalisttokens{#2}%
+ \ifhasitem\commalisttokens{#1}#3\fi}
+
+\long\def\doifnotinset#1#2#3%
+ {\elistdef\commalisttokens{#2}%
+ \ifhasitem\commalisttokens{#1}\else#3\fi}
+
+%D \macros
+%D {doifcommonelse, doifcommon, doifnotcommon}
+%D
+%D Again, we don't share the common component.
+
+\long\def\doifcommonelse#1#2#3#4%
+ {\listdef\commalisttokensa{#1}%
+ \ifcase\commalisttokensa
+ #4%
+ \else
+ \listdef\commalisttokensb{#2}%
+ \ifcase\commalisttokensb
+ #4%
+ \else
+ \ifnum\commalisttokensb>\commalisttokensa
+ \ifsubset\commalisttokensb{#1}#3\else#4\fi
+ \else
+ \ifsubset\commalisttokensa{#2}#3\else#4\fi
+ \fi
+ \fi
+ \fi}
+
+\long\def\doifcommon#1#2#3%
+ {\listdef\commalisttokensa{#1}%
+ \ifcase\commalisttokensa\else
+ \listdef\commalisttokensb{#2}%
+ \ifcase\commalisttokensb\else
+ \ifnum\commalisttokensb>\commalisttokensa
+ \ifsubset\commalisttokensb{#1}#3\fi
+ \else
+ \ifsubset\commalisttokensa{#2}#3\fi
+ \fi
+ \fi
+ \fi}
+
+\long\def\doifnotcommon#1#2#3%
+ {\listdef\commalisttokensa{#1}%
+ \ifcase\commalisttokensa
+ #3%
+ \else
+ \listdef\commalisttokensb{#2}%
+ \ifcase\commalisttokensb
+ #3%
+ \else
+ \ifnum\commalisttokensb>\commalisttokensa
+ \ifsubset\commalisttokensb{#1}\else#3\fi
+ \else
+ \ifsubset\commalisttokensa{#2}\else#3\fi
+ \fi
+ \fi
+ \fi}
+
+%D \macros
+%D {quitcommalist,quitprevcommalist}
+%D
+%D Watch the extra level, needed to quit the macro itself.
+
+%\def\quitcommalist {\quitlist 1 }
+%\def\quitprevcommalist{\quitlist 2 }
+
+%D \macros
+%D {processcommalist, processcommacommand}
+%D
+%D The \type {\ifcase} is needed!
+
+%%%\def\listexpandafter{\@EA\appdef\@EA\commalisttokens\@EA}
+%%%
+%%%\long\def\processcommalist[#1]#2%
+%%% {\listdef\templist{#1}%
+%%% \listdef\commalisttokens{}%
+%%% \scanlist\templist\listexpandafter
+%%% \scanlist\commalisttokens#2}
+%%%
+%%%\def\processcommacommand[#1]#2%
+%%% {\elistdef\templist{#1}%
+%%% \listdef\commalisttokens{}%
+%%% \scanlist\templist\listexpandafter
+%%% \scanlist\commalisttokens#2}
+
+%\long\def\processcommalist[#1]% #2%
+% {\listdef\commalisttokens{#1}%
+% \scanlist\commalisttokens}% #2}
+%
+%\long\def\processcommalist[#1]}% #2%
+% {\elistdef\commalisttokens{#1}%
+% \scanlist\commalisttokens}% #2}
+
+% \def\expandaction#1=>{}
+%
+% \def\processaction[#1]#2[#3]%
+% {\listdef\actionstoprocess{#3}%
+% \edef\!!stringa{#1}%
+% \ifx\!!stringa\empty
+% \scratchcounter=\subitemnumber\actionstoprocess{\s!default=>}%
+% \else
+% \scratchcounter=\subitemnumber\actionstoprocess{\!!stringa=>}%
+% \ifcase\scratchcounter
+% \scratchcounter=\subitemnumber\actionstoprocess{\s!unknown=>}%
+% \fi
+% \fi
+% \ifcase\scratchcounter\else
+% \getitem\actionstoprocess\scratchcounter to\actiontoprocess
+% % wordt \lastsubitem / geen \subitem: name clash
+% \@EA\@EA\@EA\expandaction\@EA\actiontoprocess
+% \fi}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index a5c5ee8a5..03429c64a 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -1,2467 +1,2703 @@
-%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 New:
-
-\def\doglobal%
- {\ifx\redoglobal\relax
- \let\redoglobal\global
- \def\dodoglobal{\resetglobal\global}%
- \else
- \writestatus{system}{global not reset, warn me!}%
- \fi}
-
-\def\saveglobal
- {\let\@@dodoglobal\dodoglobal
- \let\@@redoglobal\redoglobal}
-
-\def\restoreglobal
- {\let\dodoglobal\@@dodoglobal
- \let\redoglobal\@@redoglobal}
-
-%D A very useful application of this macro is \type{\newif},
-%D \TEX's fake boolean type. Not being a primitive,
-%D \type{\global} hopelessly fails here. But a slight
-%D adaption of Knuth's original macro permits:
-%D
-%D \starttypen
-%D \doglobal\newif\iftest
-%D \stoptypen
-%D
-%D Of course one can still say:
-%D
-%D \starttypen
-%D \global\testtrue
-%D \global\testfalse
-%D \stoptypen
-%D
-%D Apart from the prefixes, a few more \type{\expandafters}
-%D are needed:
-
-\def\newif#1%
- {\count@\escapechar
- \escapechar\m@ne
- \expandafter\expandafter\expandafter
- \redoglobal\expandafter\expandafter\expandafter
- \edef\@if#1{true}{\let\noexpand#1\noexpand\iftrue}%
- \expandafter\expandafter\expandafter
- \redoglobal\expandafter\expandafter\expandafter
- \edef\@if#1{false}{\let\noexpand#1\noexpand\iffalse}%
- \dodoglobal\@if#1{false}%
- \escapechar\count@}
-
-%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
- \redoglobal\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 \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 \macros {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
- \dodoglobal#2=#2}
-
-\def\prependtoks#1\to#2%
- {\scratchtoks={#1}%
- \edef\next{\noexpand#2={\the\scratchtoks\the#2}}%
- \next
- \dodoglobal#2=#2}
-
-\def\flushtoks#1%
- {\scratchtoks=#1\relax
- \dodoglobal#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\doifinsetelse{#1}{#2}
- {\resetglobal}
- {\dodoglobal\edef#2{#2,#1}}}}
-
-\def\doremovefromcommalist#1#2#3% nog \doglobal
- {\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 {globalprocesscommalist}
-%D
-%D The commalist processing commands are characterized by the
-%D fact that the way they handle expansion as well as the fact
-%D that they can be nested. This makes them kind of useless for
-%D handling comma lists in alignments. In these situations the
-%D next macro can be of use.
-
-\def\globalprocesscommaitem#1,%
- {\if]#1\else
- \globalcommacommand{#1}%
- \expandafter\globalprocesscommaitem
- \fi}
-
-\def\globalprocesscommalist[#1]#2%
- {\global\let\globalcommacommand=#2%
- \expandafter\globalprocesscommaitem#1,],}
-
-%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 and more robust alternative is one that
-%D manipulates the \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
- \redoglobal#1=#2\relax
- \dodoglobal#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 \macros
-%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 \starttypen
-%D \handletokens some tokens\with \somemacro
-%D \stoptypen
-%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 \macros
-%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 \unprotect\haalbuffer[next]\protect
-%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
- \dododohandletokens{ }%
- \fi
- \ifx#1\end \else
- \dododohandletokens{#1}%
- \expandafter\dohandletokens
- \fi}
-
-\def\dohandletokens%
- {\futurelet\next\dodohandletokens}
-
-\long\def\handletokens#1\with#2%
- {\global\let\dododohandletokens=#2%
- \dohandletokens#1\end}
-
-%D A previous version said \type{\docommando=#2}, but to enable
-%D use in alignments, I decided to use another placeholder, one
-%D that is not sensitive to the global assignment.
-
-%D So our example finaly shows up as:
-%D
-%D \haalbuffer[example]
-
-% %D \macros
-% %D {iftrialtypesetting}
-% %D
-% %D The next boolean is at first sight a strange one. Sometimes
-% %D one does a trial typesetting run, for instance to determine
-% %D dimensions. Some mechanisms, like object inclusion, can fail
-% %D on such trials. Temporary setting the next boolean to true,
-% %D helps a lot.
-%
-% \newif\iftrialtypesetting
-
-%D \macros
-%D {startlocal, startglobal}
-%D
-%D The next four macros are rather self explaining:
-%D
-%D \starttypen
-%D \startlocal
-%D whatever assignments
-%D \stoplocal
-%D
-%D \startglobal
-%D whatever assignments
-%D \stopglobal
-%D \stoptypen
-%D
-%D These macros are meant for those who know the difference
-%D between local and global assignments and are aware of the
-%D possible unwanted side effect
-
-\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\startlocal {\dostartglobaldefs>-}
-\def\stoplocal {\dostopglobaldefs}
-\def\startglobal {\dostartglobaldefs<+}
-\def\stopglobal {\dostopglobaldefs}
-
-\protect
-
-\endinput
- \ No newline at end of file
+%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 {rawgetparameters}
+%D
+%D A raw and dirty alternative for \type {\getparameters}; no
+%D checking is done!
+
+\def\rawgetparameters[#1][#2]% scheelt 5\%
+ {\def\rawparameterprefix{#1}%
+ \expandafter\rawsetparameter#2,]=,}
+
+\def\rawsetparameter#1=#2,%
+ {\if]#1\else
+ \expandafter\def\csname\rawparameterprefix#1\endcsname{#2}%
+ \expandafter\rawsetparameter
+ \fi}%
+
+%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 New:
+
+\def\doglobal%
+ {\ifx\redoglobal\relax
+ \let\redoglobal\global
+ \def\dodoglobal{\resetglobal\global}%
+ \else
+ \writestatus{system}{global not reset, warn me!}%
+ \fi}
+
+\def\saveglobal
+ {\let\@@dodoglobal\dodoglobal
+ \let\@@redoglobal\redoglobal}
+
+\def\restoreglobal
+ {\let\dodoglobal\@@dodoglobal
+ \let\redoglobal\@@redoglobal}
+
+%D A very useful application of this macro is \type{\newif},
+%D \TEX's fake boolean type. Not being a primitive,
+%D \type{\global} hopelessly fails here. But a slight
+%D adaption of Knuth's original macro permits:
+%D
+%D \starttypen
+%D \doglobal\newif\iftest
+%D \stoptypen
+%D
+%D Of course one can still say:
+%D
+%D \starttypen
+%D \global\testtrue
+%D \global\testfalse
+%D \stoptypen
+%D
+%D Apart from the prefixes, a few more \type{\expandafters}
+%D are needed:
+
+\def\newif#1%
+ {\count@\escapechar
+ \escapechar\m@ne
+ \expandafter\expandafter\expandafter
+ \redoglobal\expandafter\expandafter\expandafter
+ \edef\@if#1{true}{\let\noexpand#1\noexpand\iftrue}%
+ \expandafter\expandafter\expandafter
+ \redoglobal\expandafter\expandafter\expandafter
+ \edef\@if#1{false}{\let\noexpand#1\noexpand\iffalse}%
+ \dodoglobal\@if#1{false}%
+ \escapechar\count@}
+
+%D Also new:
+
+\def\define#1%
+ {\ifx#1\undefined
+ \expandafter\def
+ \else
+ \message{[\noexpand#1is already defined]}%
+ \expandafter\def\expandafter\gobbleddefinition
+ \fi#1}
+
+\def\redefine#1%
+ {\ifx#1\undefined\else
+ \message{[\noexpand#1is redefined]}%
+ \fi
+ \def#1}
+
+% \define\hans{hans}
+% \redefine\hans{hans}
+% \define\hans#1[]#2#3{hans}
+
+%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\zerocountervalue{0}
+
+\def\newcounter#1%
+ {\dodoglobal\let#1\zerocountervalue}
+
+\def\dodododoincrement(#1,#2)%
+ {\ifx#1\undefined
+ \redoglobal\let#1\zerocountervalue
+ \else\ifx#1\relax % \csname...\endcsname
+ \redoglobal\let#1\zerocountervalue
+ \fi\fi
+ \scratchcounter=#2\relax
+ \scratchcounter=\incrementsign\scratchcounter
+ \advance\scratchcounter #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%
+ {\ifx#1\undefined
+ \advance\currentsignal by 0.00025pt
+ \edef#1{\the\currentsignal}%
+ \fi}
+
+%D \macros
+%D {newskimen}
+%D
+%D \TEX\ offers 256 \DIMENSIONS\ and \SKIPS. Unfortunately this
+%D amount is too small to suit certain packages. Therefore 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 \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%
+ {\ifcase#2\relax
+ \let\recurselevel\zerocountervalue
+ \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}%
+ \setevalue{\@@irecurse\recursedepth}{\number#1}%
+ \setevalue{\@@nrecurse\recursedepth}{\number#2}%
+ \setevalue{\@@srecurse\recursedepth}{\number#3}%
+ \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\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
+ \global\advance\outerrecurse by -1
+ \edef\recurselevel{\getvalue{\@@irecurse\recursedepth}}%
+ \else
+ \expandafter\dododorecurse
+ \fi}
+
+\def\dorecurse#1%
+ {\dostepwiserecurse{1}{#1}{1}}
+
+%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 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#1\undefined\newtoks#1\fi
+ \ifx#2\relax\else\ifx#2\undefined
+ \@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\fi}
+
+%D This one permits definitions like:
+
+\newevery \everypar \EveryPar
+\newevery \everyline \EveryLine
+
+%D and how about:
+
+\newevery \neverypar \NeveryPar
+
+%D Which we're going to use indeed! When the second argument
+%D equals \type {\relax}, the first token list is created
+%D unless it is already defined.
+
+%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 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.
+
+\beginTEX
+
+\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}}
+
+\endTEX
+
+%D In \ETEX\ we can use \type {\detokenize} and gain some
+%D speed, but in general far less that 1\% for \type
+%D {\convertargument} and nil for \type {\convertcommand}.
+
+\beginETEX \detokenize
+
+\def\convertargument#1\to#2%
+ {\dodoglobal\edef#2{\detokenize{#1}}}
+
+\def\convertcommand#1\to#2%
+ {\@EA\dodoglobal\@EA\edef\@EA#2\@EA{\@EA\detokenize\@EA{#1}}}
+
+\endETEX
+
+%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%
+ {\let\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\p!doifinstringelse}
+
+%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.
+
+\beginTEX
+
+\def\ConvertToConstant#1#2#3%
+ {\expandafter\convertargument\expandafter{#2}\to\!!stringa
+ \expandafter\convertargument\expandafter{#3}\to\!!stringb
+ #1{\!!stringa}{\!!stringb}}
+
+\endTEX
+
+\beginETEX \detokenize
+
+\def\ConvertToConstant#1#2#3%
+ {\edef\!!stringa{\expandafter\detokenize\expandafter{#2}}%
+ \edef\!!stringb{\expandafter\detokenize\expandafter{#3}}%
+ #1{\!!stringa}{\!!stringb}}
+
+\endETEX
+
+%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 modules, 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%
+ {\let\ConvertCommand#1\complexorsimple\ConvertConstantAfter}
+
+%D \macros
+%D {assignifempty}
+%D
+%D We can assign a default value to an empty macro using:
+%D
+%D \starttypen
+%D \assignifempty \macros {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 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 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 {normalbgroup,normalgroup}
+%D
+%D No comment.
+
+\let\normalbgroup\bgroup
+\let\normalegroup\egroup
+
+%D \macros
+%D {appendtoks,prependtoks,flushtoks,dotoks}
+%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.
+%D
+%D A simple implementation, one that does not handle braces
+%D at the outer level, is:
+%D
+%D \starttypen
+%D \def\appendtoks#1\to#2%
+%D {\scratchtoks={#1}%
+%D \edef\next{\noexpand#2={\the#2\the\scratchtoks}}%
+%D \next
+%D \dodoglobal#2=#2}
+%D
+%D \def\prependtoks#1\to#2%
+%D {\scratchtoks={#1}%
+%D \edef\next{\noexpand#2={\the\scratchtoks\the#2}}%
+%D \next
+%D \dodoglobal#2=#2}
+%D \stoptypen
+%D
+%D But here we prefer:
+
+\def\appendtoks%
+ {\bgroup
+ \let\bgroup\relax
+ \futurelet\scratchtoken\doappendtoks}
+
+\def\doappendtoks%
+ {\ifx\scratchtoken\normalbgroup
+ \egroup\expandafter\dodoappendtoks
+ \else
+ \egroup\expandafter\dododoappendtoks
+ \fi}
+
+\def\dodoappendtoks#1%
+ {\dododoappendtoks{{#1}}}
+
+\def\dododoappendtoks#1\to#2%
+ {\scratchtoks={#1}%
+ \edef\scratchtoken{\noexpand#2={\the#2\the\scratchtoks}}%
+ \scratchtoken
+ \dodoglobal#2=#2}
+
+\def\prependtoks%
+ {\bgroup
+ \let\bgroup\relax
+ \futurelet\scratchtoken\doprependtoks}
+
+\def\doprependtoks%
+ {\ifx\scratchtoken\normalbgroup
+ \egroup\expandafter\dodoprependtoks
+ \else
+ \egroup\expandafter\dododoprependtoks
+ \fi}
+
+\def\dodoprependtoks#1%
+ {\dododoprependtoks{{#1}}}
+
+\def\dododoprependtoks#1\to#2%
+ {\scratchtoks={#1}%
+ \edef\scratchtoken{\noexpand#2={\the\scratchtoks\the#2}}%
+ \scratchtoken
+ \dodoglobal#2=#2}
+
+%D Hm.
+
+\def\flushtoks#1%
+ {\scratchtoks=#1\relax
+ \dodoglobal#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%
+ {\global\letvalue{#1}\zerocountervalue} % see earlier
+
+\def\pluscounter#1%
+ {\scratchcounter=\getvalue{#1}\relax
+ \advance\scratchcounter 1
+ \setxvalue{#1}{\the\scratchcounter}}
+
+\def\minuscounter#1%
+ {\scratchcounter=\getvalue{#1}\relax
+ \advance\scratchcounter -1
+ \setxvalue{#1}{\the\scratchcounter}}
+
+\def\resetcounter#1%
+ {\global\letvalue{#1}\zerocountervalue}
+
+\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, one 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 users 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\doifinsetelse{#1}{#2}
+ {\resetglobal}
+ {\dodoglobal\edef#2{#2,#1}}}}
+
+\def\doremovefromcommalist#1#2#3% nog \doglobal
+ {\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 {globalprocesscommalist}
+%D
+%D The commalist processing commands are characterized by the
+%D fact that the way they handle expansion as well as the fact
+%D that they can be nested. This makes them kind of useless for
+%D handling comma lists in alignments. In these situations the
+%D next macro can be of use.
+
+\def\globalprocesscommaitem#1,%
+ {\if]#1\else
+ \globalcommacommand{#1}%
+ \expandafter\globalprocesscommaitem
+ \fi}
+
+\def\globalprocesscommalist[#1]#2%
+ {\global\let\globalcommacommand=#2%
+ \expandafter\globalprocesscommaitem#1,],}
+
+%D \macros
+%D {withoutunit,withoutpt,
+%D PtToCm,
+%D numberofpoints,dimensiontocount}
+%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 and more robust alternative is one that
+%D manipulates the \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
+ \withoutpt{\the\scratchdimen}}
+
+\def\dimensiontocount#1#2%
+ {\scratchdimen=#1\relax
+ \advance\scratchdimen by .5pt
+ #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
+ \redoglobal#1=#2\relax
+ \dodoglobal#2=\scratchdimen}
+
+\def\swapmacros#1#2%
+ {\let\!!stringa=#1\relax
+ \let#1=#2\relax
+ \let#2=\!!stringa\relax}
+
+%D \macros
+%D {pushmacro,popmacro}
+%D
+%D Premature and a bit of beta, we offer:
+%D
+%D \starttypen
+%D \pushmacro\macro
+%D \popmacro\macro
+%D \stoptypen
+
+\def\@s@{@s@}
+
+\def\pushmacro#1% across groups !
+ {\@EA\doglobal\@EA\increment\csname\@s@:\string#1\endcsname
+ \global\@EA\let\csname\csname\@s@:\string#1\endcsname:\string#1\endcsname#1}
+
+\def\popmacro#1%
+ {\global\@EA\let\@EA#1\csname\csname\@s@:\string#1\endcsname:\string#1\endcsname
+ \@EA\doglobal\@EA\decrement\csname\@s@:\string#1\endcsname}
+
+%D \macros
+%D {setlocalhsize}
+%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]% don't change !
+ {\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 Faster:
+
+\def\doifelsevaluesomething#1#2#3%
+ {\expandafter\ifx\csname#1\endcsname\empty#3\else#2\fi}
+
+\def\doifvaluesomething#1#2%
+ {\expandafter\ifx\csname#1\endcsname\empty\else#2\fi}
+
+\def\doifvaluenothing#1#2%
+ {\expandafter\ifx\csname#1\endcsname\empty#2\fi}
+
+%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\p!DOIFINSTRINGELSE#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}
+\def\DOIFINSTRINGELSE {\ExpandBothAfter\p!DOIFINSTRINGELSE}
+
+%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\!!strippedstring{\!!strippedstring##1}%
+ \doifemptyelse{##2}
+ {\let\next=\relax}
+ {\def\next{\dostripcharacter##2\end}}%
+ \next}%
+ \let\!!strippedstring=\empty
+ \edef\!!stringa{#2}%
+ \@EA\dostripcharacter\!!stringa#1\end
+ \let#3=\!!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.
+
+\newif\ifexecuted
+
+\def\executeifdefined#1#2%
+ {\ifundefined{#1}%
+ \executedfalse
+ \def\next{#2}%
+ \else
+ \executedtrue
+ \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
+
+% ISN'T THE NEXT ONE OBSOLETE?
+
+%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\p!doifsomespaceelse##1 ##2##3\war%
+ {\if\noexpand##2@%
+ #3%
+ \else
+ #2%
+ \fi}%
+ \p!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
+ \scratchdimen=.996264\scratchdimen
+ \edef#2{\withoutpt{\the\scratchdimen}}}
+
+\def\ScaledPointsToWholeBigPoints#1#2%
+ {\scratchdimen=#1sp
+ \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 \macros
+%D {uppercasestring,lowercasestring}
+%D
+%D The names tell what they do:
+%D
+%D \starttypen
+%D \uppercasestring somestring\to\somestring
+%D \lowercasestring somestring\to\somestring
+%D \stoptypen
+%D
+%D the first argument may be a \type{\macro}.
+
+\def\uppercasestring#1\to#2%
+ {\edef#2{#1}\@EA\uppercase\@EA{\@EA\dodoglobal\@EA\edef\@EA#2\@EA{#2}}}
+
+\def\lowercasestring#1\to#2%
+ {\edef#2{#1}\@EA\lowercase\@EA{\@EA\dodoglobal\@EA\edef\@EA#2\@EA{#2}}}
+
+%D \macros
+%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 \starttypen
+%D \handletokens some tokens\with \somemacro
+%D \stoptypen
+%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 \macros
+%D {counttoken}
+%D
+%D For the few occasions that 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 \unprotect\haalbuffer[next]\protect
+%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
+ \dododohandletokens{ }%
+ \fi
+ \ifx#1\end \else
+ \dododohandletokens{#1}%
+ \expandafter\dohandletokens
+ \fi}
+
+\def\dohandletokens%
+ {\futurelet\next\dodohandletokens}
+
+\long\def\handletokens#1\with#2%
+ {\global\let\dododohandletokens=#2%
+ \dohandletokens#1\end}
+
+%D A previous version said \type{\docommando=#2}, but to enable
+%D use in alignments, I decided to use another placeholder, one
+%D that is not sensitive to the global assignment.
+
+%D So our example finaly shows up as:
+%D
+%D \haalbuffer[example]
+
+% %D \macros
+% %D {iftrialtypesetting}
+% %D
+% %D The next boolean is at first sight a strange one. Sometimes
+% %D one does a trial typesetting run, for instance to determine
+% %D dimensions. Some mechanisms, like object inclusion, can fail
+% %D on such trials. Temporary setting the next boolean to true,
+% %D helps a lot.
+%
+% \newif\iftrialtypesetting
+
+%D \macros
+%D {startlocal, startglobal}
+%D
+%D The next four macros are rather self explaining:
+%D
+%D \starttypen
+%D \startlocal
+%D whatever assignments
+%D \stoplocal
+%D
+%D \startglobal
+%D whatever assignments
+%D \stopglobal
+%D \stoptypen
+%D
+%D These macros are meant for those who know the difference
+%D between local and global assignments and are aware of the
+%D possible unwanted side effect
+
+\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\startlocal {\dostartglobaldefs>-}
+\def\stoplocal {\dostopglobaldefs}
+\def\startglobal {\dostartglobaldefs<+}
+\def\stopglobal {\dostopglobaldefs}
+
+%D \macros
+%D {twodigitrounding}
+%D
+%D When using \type {\special}s or \type {\pdfliteral}s, it
+%D sometimes makes sense to limit the precission. The next
+%D macro rounds a real number to two digits. It takes one
+%D argument and only works in \ETEX.
+
+\beginTEX
+
+\def\twodigitrounding#1{#1}
+
+\endTEX
+
+\beginETEX
+
+\def\dotwodigitrounding#1.#2#3#4\relax%
+ {\ifx#2*#1\else#1.#2#3\fi}
+
+\def\twodigitrounding#1%
+ {\@EA\@EA\@EA\dotwodigitrounding\@EA\WITHOUTPT
+ \the\dimexpr#1pt+.005pt\relax000.*00\relax}
+
+\endETEX
+
+%D \macros
+%D {processcontent}
+%D
+%D This is the first occasion where \TEX\ and \ETEX\ are no
+%D longer compatible, although in many cases things go ok.
+%D Beware of verbatim, i.e. catcode changes.
+%D
+%D \starttypen
+%D \def\starthans%
+%D {\processcontent{stophans}\test{\message{\test}\wait}}
+%D \stoptypen
+%D
+%D This macro is first used in the tabulation macros.
+
+\def\processcontent#1%
+ {\bgroup\@EA\doprocesscontent\csname#1\endcsname}
+
+%\beginTEX
+
+\def\doprocesscontent#1#2#3%
+ {\long\def\doprocesscontent##1#1%
+ {\egroup\long\def#2{##1}#3}%
+ \doprocesscontent}
+
+%\endTEX
+
+% Hm. Side effect, spaces after \type{\test} in verbatim.
+
+%\beginETEX \scantokens
+%
+%\def\doprocesscontent#1#2#3%
+% {\long\def\doprocesscontent##1#1%
+% {\egroup\long\def#2{\scantokens{##1}}#3}%
+% \doprocesscontent}
+%
+%\endETEX
+
+\protect
+
+\endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index b4dd69fed..049302127 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -1,2723 +1,3215 @@
-%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 First we make sure that some important prefix is defined:
-
-\ifx\doifETEX\undefined \long\def\doifETEX#1\par{} \fi
-\ifx\ifnoETEX\undefined \let\ifnoETEX=\empty \fi
-
-%D \macros
-%D {abortinputifdefined}
-%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 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 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 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 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 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 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
-
-\let\!!stringa=\empty \let\!!stringb=\empty \let\!!stringc=\empty
-\let\!!stringd=\empty \let\!!stringe=\empty \let\!!stringf=\empty
-
-\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 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 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 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 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 \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%
- {\expandafter\let\csname#1\endcsname=\empty}
-
-%D \macros
-%D {donottest,unexpanded}
-%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 \ETEX\ protection is 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:
-
-\ifnoETEX \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}}
-
-\ifnoETEX \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}
-
-\ifnoETEX \def\unexpanded#1%
- {\def\dounexpanded%
- {\ifx\next\bgroup
- \@EA\dosetunexpanded
- \else
- \@EA\docomunexpanded
- \fi#1}%
- \futurelet\next\dounexpanded}
-
-\doifETEX \let\unexpanded=\normalprotected
-
-%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 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}
-
-% NEW:
-
-\doifETEX \def\ifundefined#1%
- {\unless\ifcsname#1\endcsname}
-
-\doifETEX \def\p!doifundefined#1%
- {\let\donottest\dontprocesstest
- \unless\ifcsname#1\endcsname}
-
-%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 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 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 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 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 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 \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][#3]%
- {\edef\!!stringb{#1}%
- \ifx\!!stringb\s!default
- \let\commalistelement\empty
- #2%
- \fi}
-
-\def\v!compareprocessactionB[#1=>#2][#3]%
- {\expandedaction\!!stringb{#1}%
- \ifx\!!stringa\!!stringb
- \def\commalistelement{#3}%
- #2%
- \let\p!doprocessaction\gobbleoneargument
- \else
- \edef\!!stringb{#1}%
- \ifx\!!stringb\s!unknown
- \def\commalistelement{#3}% beware of loops
- #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][#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
- \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
- \fi
- \expandactions}
-
-%D \macros
-%D {unexpandedprocessaction,
-%D unexpandedprocessfirstactioninset,
-%D unexpandedprocessallactionsinset}
-%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 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, doifincsnameelse}
-%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 Sometimes the second argument is passed as a macro. By
-%D postponing the expansion of this macro, we gain quite some
-%D run time, simply because the less tokens we pass, the faster
-%D \TEX\ runs. So finally the definition became:
-
-\def\v!ifinstringelse#1#2%
- {\def\c!ifinstringelse##1#1##2##3\war%
- {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
- \expanded{\c!ifinstringelse#2#1@@\noexpand\war}} % expand #2 here
-
-\long\def\doifinstringelse#1#2#3#4%
- {\edef\@@instring{#1}% expand #1 here
- \@EA\v!ifinstringelse\@EA{\@@instring}{#2}%
- #3%
- \else
- #4%
- \fi}
-
-%D The next alternative proved to be upto twice as fast on
-%D tasks like checking reserved words in pretty verbatim
-%D typesetting! This is mainly due to the fact that passing
-%D (expanded) strings is much slower that passing a macro.
-%D
-%D \starttypen
-%D \doifincsnameelse {substring} {\string} {then ...} {else ...}
-%D \stoptypen
-%D
-%D Where \type{\doifinstringelse} does as much expansion as
-%D possible, the latter alternative does minimal (one level)
-%D expansion.
-
-\def\v!ifincsnameelse#1#2%
- {\def\c!ifincsnameelse##1#1##2##3\war%
- {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
- \@EA\c!ifincsnameelse#2#1@@\war}
-
-\long\def\doifincsnameelse#1#2#3#4%
- {\edef\@@instring{#1}%
- \@EA\v!ifincsnameelse\@EA{\@@instring}{#2}%
- #3%
- \else
- #4%
- \fi}
-
-%D \macros
-%D {doifnumberelse}
-%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\v!ifinstringelse\@EA{\firstcharacter}{1234567890}%
- #2%
- \else
- #3%
- \fi}
-
-%D Before we had \type{\v!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 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).
-%D
-%D The slow alternative looks like:
-%D
-%D \starttypen
-%D \def\makerawcommalist[#1]#2%
-%D {\def\appendtocommalist##1%
-%D {\doifelse{#2}{}
-%D {\edef#2{##1}}
-%D {\edef#2{#2,##1}}}%
-%D \def#2{}%
-%D \processcommalist[#1]\appendtocommalist}
-%D \stoptypen
-%D
-%D But we prefer:
-
-\def\makerawcommalist[#1]#2%
- {\def\appendtocommalist##1%
- {\edef#2{##1}\def\appendtocommalist####1{\edef#2{#2,####1}}}%
- \let#2\empty
- \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 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 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 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 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 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 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 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 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 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
- \def\p!dodogetcommalistsize##1%
- {\advance\scratchcounter by 1 }%
- #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
- \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 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 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 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 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 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 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 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 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 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 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}.
-
-% \chardef\statuswidth=15
-%
-% \def\writestring%
-% {\immediate\write16}
-%
-% \def\writeline%
-% {\writestring{}}
-%
-% \def\dosplitstatus#1#2\end%
-% {\ifx#1?%
-% \loop
-% \advance\scratchcounter by 1
-% \ifnum\scratchcounter<\statuswidth
-% \edef\messagecontentA{\messagecontentA\space}%
-% \repeat
-% \else
-% \advance\scratchcounter by 1
-% \ifnum\scratchcounter<\statuswidth
-% \edef\messagecontentA{\messagecontentA#1}%
-% \fi
-% \dosplitstatus#2\end
-% \fi}
-%
-% \def\writestatus#1#2%
-% {\bgroup
-% \let\messagecontentA=\empty
-% \edef\messagecontentB{#2}% maybe it's \the\scratchcounter
-% \scratchcounter=0
-% \expandafter\dosplitstatus#1?\end
-% \writestring{\messagecontentA\space:\space\messagecontentB}%
-% \egroup}
-
-\chardef\statuswidth=15
-
-\def\writestring%
- {\immediate\write16}
-
-\def\writeline%
- {\writestring{}}
-
-\def\dosplitstatus#1%
- {\advance\scratchcounter by 1
- \ifnum\scratchcounter<\statuswidth
- \edef\messagecontentA{\messagecontentA#1}%
- \expandafter\dosplitstatus
- \else
- \expandafter\nosplitstatus
- \fi}
-
-\def\nosplitstatus#1\end%
- {}
-
-\gdef\writestatus#1#2%
- {\bgroup
- \let\messagecontentA=\empty
- \edef\messagecontentB{#2}% maybe it's \the\scratchcounter
- \scratchcounter=0
- \expandafter\dosplitstatus#1%
- \space\space\space\space\space\space\space
- \space\space\space\space\space\space\space
- \space\space\space\space\space\space\end
- \writestring{\messagecontentA\space:\space\messagecontentB}%
- \egroup}
-
-%D \macros
-%D {debuggerinfo}
-%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
+% nagaan : \ifinstringelse in syst-ext.tex
+% do => p! dodo pp! dododo ppp!
+
+%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 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 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%
+ {\ifcase\protectionlevel
+ \edef\doprotectcharacters%
+ {\catcode`\noexpand @=\the\catcode`@\relax
+ \catcode`\noexpand !=\the\catcode`!\relax
+ \catcode`\noexpand ?=\the\catcode`?\relax}%
+ \catcode`@=11
+ \catcode`!=11
+ \catcode`?=11
+ \let\protect\doprotect
+ \fi
+ \advance\protectionlevel 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 -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 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 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 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 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 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
+
+\let\!!stringa=\empty \let\!!stringb=\empty \let\!!stringc=\empty
+\let\!!stringd=\empty \let\!!stringe=\empty \let\!!stringf=\empty
+
+\newdimen\!!widtha \newdimen\!!heighta \newdimen\!!deptha
+\newdimen\!!widthb \newdimen\!!heightb \newdimen\!!depthb
+
+\newif\if!!donea \newif\if!!doneb \newif\if!!donec
+
+%D \macros
+%D {s!,c!,e!,p!,v!,@@,??}
+%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 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 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 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 \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%
+ {\expandafter\let\csname#1\endcsname\empty}
+
+%D \macros
+%D {donottest,unexpanded}
+%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 \ETEX\ protection is 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:
+
+\beginTEX
+
+\def\dontprocesstest#1%
+ {==}
+
+\def\doprocesstest#1%
+ {#1}
+
+\let\donottest=\doprocesstest
+
+\endTEX
+
+\beginETEX \detokenize
+
+\def\donottest#1{#1}% \detokenize{#1}}
+
+\endETEX
+
+%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 versatile alternative:
+
+\beginTEX
+
+\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}
+
+\endTEX
+
+\beginETEX \protected
+
+\let\unexpanded\normalprotected
+
+\endETEX
+
+%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 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.
+
+\beginTEX
+
+\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}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\ifundefined#1% ongelukkige naam
+ {\unless\ifcsname#1\endcsname}
+
+\def\p!doifundefined#1%
+ {\edef\p!defined{#1}%
+ \@EA\unless\@EA\ifcsname\@EA\detokenize\@EA{\p!defined}\endcsname}
+
+\def\doifundefinedelse#1#2#3%
+ {\edef\p!defined{#1}%
+ \@EA\ifcsname\@EA\detokenize\@EA{\p!defined}\endcsname#3\else#2\fi}
+
+\def\doifdefinedelse#1#2#3%
+ {\edef\p!defined{#1}%
+ \@EA\ifcsname\@EA\detokenize\@EA{\p!defined}\endcsname#2\else#3\fi}
+
+\def\doifundefined#1#2%
+ {\edef\p!defined{#1}%
+ \@EA\ifcsname\@EA\detokenize\@EA{\p!defined}\endcsname\else#2\fi}
+
+\def\doifdefined#1#2%
+ {\edef\p!defined{#1}%
+ \@EA\ifcsname\@EA\detokenize\@EA{\p!defined}\endcsname#2\fi}
+
+\endETEX
+
+%D \macros
+%D {letbeundefined}
+%D
+%D Testing for being undefined comes down to testing on \type
+%D {\relax} when we use \type {\csname}, but when using \type
+%D {\ifx}, we test on being \type {\undefined}! In \ETEX\ we
+%D have \type {\ifcsname} and that way of testing on existance
+%D is not the same as the one described here. Therefore we
+%D introduce:
+
+\beginTEX
+
+\def\letbeundefined#1%
+ {\expandafter\let\csname#1\endcsname\relax}
+
+\endTEX
+
+\beginETEX
+
+\def\letbeundefined#1%
+ {\expandafter\let\csname#1\endcsname\undefined}
+
+\endETEX
+
+%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}.
+
+\beginTEX
+
+\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}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\docheckonedefined#1%
+ {\unless\ifcsname#1\endcsname
+ \donefalse
+ \fi}
+
+\def\doifalldefinedelse#1#2#3%
+ {\begingroup
+ \donetrue
+ \processcommalist[#1]\docheckonedefined
+ \ifdone
+ \endgroup#2%
+ \else
+ \endgroup#3%
+ \fi}
+
+\endETEX
+
+%D \macros
+%D {doif,doifelse,doifnot,
+%D donottest}
+%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.
+
+\beginTEX
+
+\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}
+
+\endTEX
+
+\beginETEX \protected
+
+\long\def\doif#1#2#3%
+ {\edef\!!stringa{#1}\edef\!!stringb{#2}%
+ \ifx\!!stringa\!!stringb#3\fi}
+
+\long\def\doifnot#1#2#3%
+ {\edef\!!stringa{#1}\edef\!!stringb{#2}%
+ \unless\ifx\!!stringa\!!stringb#3\fi}
+
+\long\def\doifelse#1#2#3#4%
+ {\edef\!!stringa{#1}\edef\!!stringb{#2}%
+ \ifx\!!stringa\!!stringb#3\else#4\fi}
+
+\endETEX
+
+%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 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 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\p!checkiteminset##1%
+%D {\doif{#1}{##1}
+%D {\donetrue
+%D \let\p!checkiteminset=\gobbleoneargument}}%
+%D \processcommalist[#2]\p!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}
+%
+% \beginTEX
+%
+% \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}
+%
+% \endTEX
+%
+% \beginETEX \protected
+%
+% \def\p!doifinsetelse#1#2%
+% {\donefalse
+% \edef\!!stringa{#1}%
+% \ifx\!!stringa\empty
+% \else
+% \let\p!docheckiteminset\p!dodocheckiteminset
+% \processcommalist[#2]\p!docheckiteminset
+% \fi
+% \ifdone}
+%
+% \endETEX
+
+\def\p!docheckiteminset#1%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \donetrue
+ \expandafter\quitcommalist
+ \fi}
+
+\beginTEX
+
+\def\p!doifinsetelse#1#2%
+ {\let\donottest\dontprocesstest
+ \donefalse
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \else
+ \processcommalist[#2]\p!docheckiteminset
+ \fi
+ \let\donottest\doprocesstest
+ \ifdone}
+
+\endTEX
+
+\beginETEX \protected
+
+\def\p!doifinsetelse#1#2%
+ {\donefalse
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \else
+ \processcommalist[#2]\p!docheckiteminset
+ \fi
+ \ifdone}
+
+\endETEX
+
+\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 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}
+%
+% \beginTEX
+%
+% \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}
+%
+% \endTEX
+%
+% \beginETEX \protected
+%
+% \def\p!doifcommonelse#1#2%
+% {\donefalse
+% \let\p!dodocommoncheck\p!dododocommoncheck
+% \def\p!docommoncheck##1%
+% {\edef\!!stringa{##1}%
+% \def\commalistelement{##1}%
+% \processcommalist[#2]\p!dodocommoncheck}%
+% \processcommalist[#1]\p!docommoncheck
+% \ifdone}
+%
+% \endETEX
+
+\def\p!dodocommoncheck#1%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \donetrue
+ \expandafter\quitprevcommalist
+ \fi}
+
+\beginTEX
+
+\def\p!doifcommonelse#1#2%
+ {\donefalse
+ \let\donottest\dontprocesstest
+ \def\p!docommoncheck##1%
+ {\edef\!!stringa{##1}%
+ \def\commalistelement{##1}%
+ \processcommalist[#2]\p!dodocommoncheck}%
+ \processcommalist[#1]\p!docommoncheck
+ \let\donottest\doprocesstest
+ \ifdone}
+
+\endTEX
+
+\beginETEX \protected
+
+\def\p!doifcommonelse#1#2%
+ {\donefalse
+ \def\p!docommoncheck##1%
+ {\edef\!!stringa{##1}%
+ \def\commalistelement{##1}%
+ \processcommalist[#2]\p!dodocommoncheck}%
+ \processcommalist[#1]\p!docommoncheck
+ \ifdone}
+
+\endETEX
+
+\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,quitcommalist,
+%D processcommalistwithparameters}
+%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]%
+ \let\nextcommaitem\gobbleoneargument
+ \else
+ \let\nextcommaitem\dododoprocesscommaitem
+ \fi\fi
+ \nextcommaitem}
+
+\def\doprocesscommaitem%
+ {\futurelet\nexttoken\dodoprocesscommaitem}
+
+\def\doprocesscommalistA#1#2]#3%
+ {\global\advance\commalevel 1
+ \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+ {#3{##1}\doprocesscommaitem}%
+ \doprocesscommaitem{#1}#2,]\relax
+ \global\advance\commalevel -1 }
+
+\def\doprocesscommalistB#1]#2%
+ {\global\advance\commalevel 1
+ \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+ {#2{##1}\doprocesscommaitem}%
+ \doprocesscommaitem#1,]\relax
+ \global\advance\commalevel -1 }
+
+%D Empty arguments are not processed. Empty items (\type{,,})
+%D however are treated. We have to check for the special case
+%D \type{[{a,b,c}]}.
+
+\def\docheckcommaitem%
+ {\ifx\nexttoken]%
+ \let\nextcommaitem\gobbletwoarguments
+ \else\ifx\nexttoken\bgroup
+ \let\nextcommaitem\doprocesscommalistA
+ \else
+ \let\nextcommaitem\doprocesscommalistB
+ \fi\fi
+ \nextcommaitem}
+
+\def\processcommalist[%
+ {\futurelet\nexttoken\docheckcommaitem}
+
+%D One way of quitting a commalist halfway is:
+
+% \def\quitcommalist%
+% {\@EA\let\csname\s!next\the\commalevel\endcsname\gobbleoneargument}
+
+\def\quitcommalist%
+ {\bgroup\let\doprocesscommaitem\doquitcommalist}
+
+\def\doquitcommalist#1]%
+ {\egroup}
+
+\def\quitprevcommalist%
+ {\bgroup\let\doprocesscommaitem\doquitprevcommalist}
+
+\def\doquitprevcommalist#1]%
+ {\let\doprocesscommaitem\doquitcommalist}
+
+%D The hack we used for checking the next character
+%D \type {\doifnextcharelse} is also used here.
+
+\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 its limits.
+
+% why the \toks0? still needed?
+
+\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 \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\p!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\p!compareprocessaction[##1=>##2]%
+%D {\edef\!!stringa{##1}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{#1}%
+%D ##2%
+%D \let\p!doprocessaction=\gobbleoneargument
+%D \else\ifx\!!stringa\s!unknown
+%D \def\commalistelement{#1}%
+%D ##2%
+%D \fi\fi}}%
+%D \def\p!doprocessaction##1%
+%D {\p!compareprocessaction[##1]}%
+%D \processcommalist[#3]\p!doprocessaction}
+%D
+%D \def\processfirstactioninset[#1]#2[#3]%
+%D {\doifelse{#1}{}
+%D {\processaction[][#3]}
+%D {\def\p!compareprocessaction[##1=>##2][##3]%
+%D {\edef\!!stringa{##1}%
+%D \edef\!!stringb{##3}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \let\p!doprocessaction=\gobbleoneargument
+%D \let\p!dodoprocessaction=\gobbleoneargument
+%D \else\ifx\!!stringa\s!unknown
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \fi\fi}%
+%D \def\p!doprocessaction##1%
+%D {\def\p!dodoprocessaction####1%
+%D {\p!compareprocessaction[####1][##1]}%
+%D \processcommalist[#3]\p!dodoprocessaction}%
+%D \processcommalist[#1]\p!doprocessaction}}
+%D
+%D \def\processallactionsinset[#1]#2[#3]%
+%D {\doifelse{#1}{}
+%D {\processaction[][#3]}
+%D {\advance\processlevel by 1\relax
+%D \def\p!compareprocessaction[##1=>##2][##3]%
+%D {\edef\!!stringa{##1}%
+%D \edef\!!stringb{##3}%
+%D \ifx\!!stringa\!!stringb
+%D \def\commalistelement{##3}%
+%D ##2%
+%D \let\p!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\p!dodoprocessaction####1%
+%D {\p!compareprocessaction[####1][##1]}%
+%D \processcommalist[#3]\p!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 (again) next implementation is around
+%D 20\%, depending on the application.
+
+\newcount\processlevel
+
+\def\p!compareprocessactionA[#1=>#2][#3]%
+ {\edef\!!stringb{#1}%
+ \ifx\!!stringb\s!default
+ \let\commalistelement\empty
+ #2%
+ \fi}
+
+% \def\p!compareprocessactionB[#1=>#2][#3]%
+% {\expandedaction\!!stringb{#1}%
+% \ifx\!!stringa\!!stringb
+% \def\commalistelement{#3}%
+% #2%
+% \let\p!doprocessaction\gobbleoneargument
+% \else
+% \edef\!!stringb{#1}%
+% \ifx\!!stringb\s!unknown
+% \def\commalistelement{#3}% beware of loops
+% #2%
+% \fi
+% \fi}
+
+% met \quitcommalist tot meer dan 25\% sneller
+
+\def\p!compareprocessactionB[#1=>#2][#3]%
+ {\expandedaction\!!stringb{#1}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#3}%
+ #2%
+ \expandafter\quitcommalist
+ \else
+ \edef\!!stringb{#1}%
+ \ifx\!!stringb\s!unknown
+ \def\commalistelement{#3}% beware of loops
+ #2%
+ \fi
+ \fi}
+
+\beginTEX
+
+\def\processaction[#1]#2[#3]%
+ {\let\donottest\dontprocesstest
+ \expandedaction\!!stringa{#1}%
+ \let\donottest\doprocesstest
+ \ifx\!!stringa\empty
+ \let\p!compareprocessaction\p!compareprocessactionA
+ \else
+ \let\p!compareprocessaction\p!compareprocessactionB
+ \fi
+ \def\p!doprocessaction##1%
+ {\p!compareprocessaction[##1][#1]}%
+ \processcommalist[#3]\p!doprocessaction
+ \expandactions}
+
+\endTEX
+
+\beginETEX \protected
+
+\def\processaction[#1]#2[#3]%
+ {\expandedaction\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \let\p!compareprocessaction\p!compareprocessactionA
+ \else
+ \let\p!compareprocessaction\p!compareprocessactionB
+ \fi
+ \def\p!doprocessaction##1%
+ {\p!compareprocessaction[##1][#1]}%
+ \processcommalist[#3]\p!doprocessaction
+ \expandactions}
+
+\endETEX
+
+% \def\p!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\p!compareprocessactionC[#1=>#2][#3]%
+ {\expandedaction\!!stringa{#1}%
+ \expandedaction\!!stringb{#3}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#3}%
+ #2%
+ \expandafter\quitprevcommalist
+ \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%
+ {\p!compareprocessactionC[####1][##1]}%
+ \processcommalist[#3]\p!dodoprocessaction}%
+ \processcommalist[#1]\p!doprocessaction
+ \fi
+ \expandactions}
+
+% \def\p!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\p!compareprocessactionD[#1=>#2][#3]%
+ {\expandedaction\!!stringa{#1}%
+ \expandedaction\!!stringb{#3}%
+ \ifx\!!stringa\!!stringb
+ \def\commalistelement{#3}%
+ #2%
+ \expandafter\quitcommalist
+ \else
+ \edef\!!stringa{#1}%
+ \ifx\!!stringa\s!unknown
+ \def\commalistelement{#3}%
+ #2%
+ \fi
+ \fi}
+
+\def\doprocessallactionsinset%
+ {\csname\s!do\the\processlevel\endcsname}
+
+\def\processallactionsinset[#1]#2[#3]%
+ {\expandedaction\!!stringa{#1}%
+ \ifx\!!stringa\empty
+ \processaction[][#3]%
+ \else
+ \advance\processlevel 1
+ \expandafter\def\csname\s!do\the\processlevel\endcsname##1%
+ {\def\p!dodoprocessaction####1%
+ {\p!compareprocessactionD[####1][##1]}%
+ \processcommalist[#3]\p!dodoprocessaction}%
+ \processcommalist[#1]\doprocessallactionsinset
+ \advance\processlevel -1
+ \fi
+ \expandactions}
+
+%D \macros
+%D {unexpandedprocessaction,
+%D unexpandedprocessfirstactioninset,
+%D unexpandedprocessallactionsinset}
+%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 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, doifincsnameelse}
+%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\pp!doifinstringelse##1#1##2##3\war%
+%D {\if##2@%
+%D #4%
+%D \else
+%D #3%
+%D \fi}%
+%D \pp!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\pp!doifinstringelse##1#1##2##3\war%
+%D {\if##2@}%
+%D \pp!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 Sometimes the second argument is passed as a macro. By
+%D postponing the expansion of this macro, we gain quite some
+%D run time, simply because the less tokens we pass, the faster
+%D \TEX\ runs. So finally the definition became:
+
+\def\p!doifinstringelse#1#2%
+ {\def\pp!doifinstringelse##1#1##2##3\war%
+ %{\csname\if##2@iffalse\else iftrue\fi\endcsname}%
+ {\csname if\if##2@fals\else tru\fi e\endcsname}%
+ \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here
+
+\long\def\doifinstringelse#1#2#3#4%
+ {\edef\@@@instring{#1}% expand #1 here
+ \@EA\p!doifinstringelse\@EA{\@@@instring}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+%D The next alternative proved to be upto twice as fast on
+%D tasks like checking reserved words in pretty verbatim
+%D typesetting! This is mainly due to the fact that passing
+%D (expanded) strings is much slower that passing a macro.
+%D
+%D \starttypen
+%D \doifincsnameelse {substring} {\string} {then ...} {else ...}
+%D \stoptypen
+%D
+%D Where \type{\doifinstringelse} does as much expansion as
+%D possible, the latter alternative does minimal (one level)
+%D expansion.
+
+\def\p!doifincsnameelse#1#2%
+ {\def\pp!doifincsnameelse##1#1##2##3\war%
+ {\csname\if##2@iffalse\else iftrue\fi\endcsname}%
+ \@EA\pp!doifincsnameelse#2#1@@\war}
+
+\long\def\doifincsnameelse#1#2#3#4%
+ {\edef\@@@instring{#1}%
+ \@EA\p!doifincsnameelse\@EA{\@@@instring}{#2}%
+ #3%
+ \else
+ #4%
+ \fi}
+
+%D \macros
+%D {doifnumberelse}
+%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...}. This macro is a
+%D reather dirty one.
+
+\long\def\doifnumberelse#1#2#3%
+ {\bgroup\donefalse\ifcase1#1\or\or\or\or\or\or\or\or\or\else\donetrue\fi
+ \ifdone\egroup#2\else\egroup#3\fi}
+
+%D The previous implementation was:
+%D
+%D \starttypen
+%D \long\def\doifnumberelse#1#2#3%
+%D {\getfirstcharacter{#1}%
+%D \@EA\p!doifinstringelse\@EA{\firstcharacter}{1234567890}%
+%D #2%
+%D \else
+%D #3%
+%D \fi}
+%D \starttypen
+%D
+%D Before we had \type{\p!doifinstringelse} 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
+%D The current implementation is much faster.
+
+%D \macros
+%D {makerawcommalist,
+%D rawdoinsetelse,
+%D rawprocesscommalist,
+%D rawprocessaction}
+%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).
+%D
+%D The slow alternative looks like:
+%D
+%D \starttypen
+%D \def\makerawcommalist[#1]#2%
+%D {\def\appendtocommalist##1%
+%D {\doifelse{#2}{}
+%D {\edef#2{##1}}
+%D {\edef#2{#2,##1}}}%
+%D \def#2{}%
+%D \processcommalist[#1]\appendtocommalist}
+%D \stoptypen
+%D
+%D But we prefer:
+
+\def\makerawcommalist[#1]#2%
+ {\def\appendtocommalist##1%
+ {\edef#2{##1}\def\appendtocommalist####1{\edef#2{#2,####1}}}%
+ \let#2\empty
+ \processcommalist[#1]\appendtocommalist}
+
+\def\rawprocesscommaitem#1,%
+ {\if]#1\else
+ \csname\s!next\the\commalevel\endcsname{#1}%
+ \expandafter\rawprocesscommaitem
+ \fi}
+
+\def\rawprocesscommalist[#1]#2%
+ {\global\advance\commalevel 1
+ \expandafter\let\csname\s!next\the\commalevel\endcsname#2%
+ \expandafter\rawprocesscommaitem#1,],% \relax
+ \global\advance\commalevel -1 }
+
+\def\rawdoifinsetelse#1#2%
+ {\doifinstringelse{,#1,}{,#2,}}
+
+\def\p!rawprocessaction[#1][#2]%
+ {\def\pp!rawprocessaction##1,#1=>##2,##3\war%
+ {\if##3@\else
+ \def\!!processaction{##2}%
+ \fi}%
+ \pp!rawprocessaction,#2,#1=>,@\war}
+
+\def\rawprocessaction[#1]#2[#3]%
+ {\edef\!!stringa{#1}%
+ \edef\!!stringb{undefined}%
+ \let\!!processaction\!!stringb
+ \ifx\!!stringa\empty
+ \@EA\p!rawprocessaction\@EA[\s!default][#3]%
+ \else
+ \expandafter\p!rawprocessaction\expandafter[\!!stringa][#3]%
+ \ifx\!!processaction\!!stringb
+ \@EA\p!rawprocessaction\@EA[\s!unknown][#3]%
+ \fi
+ \fi
+ \ifx\!!processaction\!!stringb
+ \else
+ \!!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 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}
+%
+% faster:
+%
+% \def\processunexpandedcommaitem#1,%
+% {\if]\noexpand#1\else
+% \handleunexpandedcommaitem{#1}%
+% \expandafter\processunexpandedcommaitem
+% \fi}
+%
+% \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 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 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 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 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 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 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 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\p!checkparameters#1=#2#3\war%
+ {\if#2@\parametersfalse\else\parameterstrue\fi}
+
+\def\checkparameters[#1]%
+ {\p!checkparameters#1=@@\war}
+
+%D \macros
+%D {getfromcommalist,getfromcommacommand,
+%D commalistelement,
+%D getcommalistsize,getcommacommandsize}
+%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).
+
+\newcount\commalistcounter
+
+\def\commalistsize{0}
+
+\def\p!dogetcommalistsize#1%
+ {\advance\commalistcounter 1 }
+
+\def\getcommalistsize[#1]%
+ {\commalistcounter=0
+ \processcommalist[#1]\p!dogetcommalistsize % was [{#1}]
+ \edef\commalistsize{\the\commalistcounter}}
+
+\def\getcommacommandsize[#1]%
+ {\edef\commacommand{#1}%
+ \toks0=\expandafter{\expandafter[\commacommand]}%
+ \expandafter\getcommalistsize\the\toks0 }
+
+% \def\p!dogetfromcommalist#1%
+% {\advance\commalistcounter -1
+% \ifcase\commalistcounter
+% \def\commalistelement{#1}%
+% \bgroup\def\doprocesscommaitem##1]{\egroup}%
+% \fi}
+
+\def\p!dogetfromcommalist#1%
+ {\advance\commalistcounter -1
+ \ifcase\commalistcounter
+ \def\commalistelement{#1}%
+ \expandafter\quitcommalist
+ \fi}
+
+\def\getfromcommalist[#1]#2[#3]%
+ {\let\commalistelement\empty
+ \commalistcounter=#3\relax
+ \processcommalist[#1]\p!dogetfromcommalist}
+
+\def\getfromcommacommand[#1]%
+ {\edef\commacommand{#1}%
+ \toks0=\expandafter{\expandafter[\commacommand]}%
+ \expandafter\getfromcommalist\the\toks0 }
+
+%D Because 0, 1 and~2 are often asked for, we optimize this
+%D macro for those cases. The indirect call however slows
+%D down the other cases.
+
+\def\p!dogetfirstfromcommalist [#1,#2]{\def\commalistelement{#1}}
+\def\p!dogetsecondfromcommalist[#1,#2,#3]{\def\commalistelement{#2}}
+\let\p!dogetotherfromcommalist=\getfromcommalist
+
+\def\getfromcommalist[#1]#2[#3]% optimized for 0,1,2
+ {\ifcase#3\relax
+ \let\commalistelement\empty
+ \or
+ \p!dogetfirstfromcommalist[#1,]%
+ \or
+ \p!dogetsecondfromcommalist[#1,,]%
+ \else
+ \p!dogetotherfromcommalist[#1][#3]%
+ \fi}
+
+%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 {dogetcommalistelement,dogetcommacommandelement}
+%D
+%D For low level (fast) purposes, we can also use the next
+%D alternative, which can handle 8~elements at most.
+%D
+%D \starttypen
+%D \dogetcommalistelement1\from a,b,c\to\commalistelement
+%D \stoptypen
+
+\def\dodogetcommalistelement#1\from#2,#3,#4,#5,#6,#7,#8\to#9%
+ {\edef#9{\ifcase#1\relax\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}}
+
+\def\dogetcommalistelement#1\from#2\to%
+ {\dodogetcommalistelement#1\from#2,,,,,,\to}
+
+\def\dogetcommacommandelement#1\from#2\to%
+ {\@EA\dodogetcommalistelement\@EA#1\@EA\from#2,,,,,,\to}
+
+%D \macros
+%D {dosingleargument,dodoubleargument,dotripleargument,
+%D doquadrupleargument,doquintupleargument,dosixtupleargument,
+%D doseventupleargument}
+%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. Forgive me the funny names.
+%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 \doseventupleargument\commando= \commando[#1][#2][#3][#4][#5][#6][#7]
+%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\dosixtupleargument%
+ {\chardef\expectedarguments=6
+ \dosixtupleempty}
+
+\def\doseventupleargument%
+ {\chardef\expectedarguments=7
+ \doseventupleempty}
+
+%D \macros
+%D {iffirstagument,ifsecondargument,ifthirdargument,
+%D iffourthargument,iffifthargument,ifsixthargument,
+%D ifseventhargument}
+%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
+\newif\ifseventhargument
+
+%D \macros
+%D {dosingleempty,dodoubleempty,dotripleempty,
+%D doquadrupleempty,doquintupleempty,dosixtupeempty,
+%D doseventupleempty}
+%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 \doseventupleempty\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
+
+% idea: \ignorespaces afterwards
+
+\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\getseventupleempty#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#1###############################%
+% ################################1#2%
+% {\def\dodogetargument%
+% {#3#1##1#2%
+% #1####1#2%
+% #1########1#2%
+% #1################1#2%
+% #1################################1#2%
+% #1###############################%
+% ################################1#2}%
+% \dogetargument#1#2\seventhargumenttrue\seventhargumentfalse}%
+% \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\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\getseventupleempty#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#1###############################%
+ ################################1#2%
+ {\def\dodogetargument%
+ {#3#1{##1}#2%
+ #1{####1}#2%
+ #1{########1}#2%
+ #1{################1}#2%
+ #1{################################1}#2%
+ #1{###############################%
+ ################################1}#2}%
+ \dogetargument#1#2\seventhargumenttrue\seventhargumentfalse}%
+ \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 []}
+\def\doseventupleempty{\getseventupleempty[]}
+
+%D \macros
+%D {dosingleargumentwithset,
+%D dodoubleargumentwithset,dodoubleemptywithset,
+%D dotripleargumentwithset,dotripleemptywithset}
+%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 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%
+ {\setnameofcommand{#1}%
+ \doifnextcharelse{[}
+ {\firstargumenttrue\getvalue{\s!complex\nameofcommand}}
+ {\firstargumentfalse\getvalue{\s!simple\nameofcommand}}}
+
+\def\complexorsimpleempty#1%
+ {\setnameofcommand{#1}%
+ \doifnextcharelse{[}
+ {\firstargumenttrue\getvalue{\s!complex\nameofcommand}}
+ {\firstargumentfalse\getvalue{\s!complex\nameofcommand}[]}}
+
+\def\setnameofcommand#1%
+ {\bgroup
+ \escapechar=-1
+ \globaldefs=0 % pretty important!
+ \xdef\nameofcommand{\string#1}%
+ \egroup}
+
+%D \macros
+%D {definecomplexorsimple,definecomplexorsimpleempty}
+%D
+%D The previous commands are used that often that we found it
+%D worthwile to offer two more alternatives. Watch the build
+%D in protection.
+
+\beginTEX
+
+\def\definewithnameofcommand#1#2%
+ {\setnameofcommand{#2}%
+ \@EA\def\@EA#2\@EA{\@EA\donottest\@EA#1\@EA{\nameofcommand}}}
+
+\def\definecomplexorsimple%
+ {\definewithnameofcommand\complexorsimple}
+
+\def\definecomplexorsimpleempty%
+ {\definewithnameofcommand\complexorsimpleempty}
+
+\endTEX
+
+\beginETEX \protected
+
+\def\definecomplexorsimple#1%
+ {\normalprotected\def#1{\complexorsimple#1}}
+
+\def\definecomplexorsimpleempty#1%
+ {\normalprotected\def#1{\complexorsimpleempty#1}}
+
+\endETEX
+
+%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 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\e!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\e!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 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 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 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}.
+
+% \chardef\statuswidth=15
+%
+% \def\writestring%
+% {\immediate\write16}
+%
+% \def\writeline%
+% {\writestring{}}
+%
+% \def\dosplitstatus#1#2\end%
+% {\ifx#1?%
+% \loop
+% \advance\scratchcounter by 1
+% \ifnum\scratchcounter<\statuswidth
+% \edef\messagecontentA{\messagecontentA\space}%
+% \repeat
+% \else
+% \advance\scratchcounter by 1
+% \ifnum\scratchcounter<\statuswidth
+% \edef\messagecontentA{\messagecontentA#1}%
+% \fi
+% \dosplitstatus#2\end
+% \fi}
+%
+% \def\writestatus#1#2%
+% {\bgroup
+% \let\messagecontentA=\empty
+% \edef\messagecontentB{#2}% maybe it's \the\scratchcounter
+% \scratchcounter=0
+% \expandafter\dosplitstatus#1?\end
+% \writestring{\messagecontentA\space:\space\messagecontentB}%
+% \egroup}
+
+\chardef\statuswidth=15
+
+\def\writestring%
+ {\immediate\write16}
+
+\def\writeline%
+ {\writestring{}}
+
+\def\dosplitstatus#1%
+ {\advance\scratchcounter 1
+ \ifnum\scratchcounter<\statuswidth
+ \edef\messagecontentA{\messagecontentA#1}%
+ \expandafter\dosplitstatus
+ \else
+ \expandafter\nosplitstatus
+ \fi}
+
+\def\nosplitstatus#1\end%
+ {}
+
+\gdef\writestatus#1#2%
+ {\bgroup
+ \let\messagecontentA\empty
+ \edef\messagecontentB{#2}% maybe it's \the\scratchcounter
+ \scratchcounter=0
+ \expandafter\dosplitstatus#1%
+ \space\space\space\space\space\space\space
+ \space\space\space\space\space\space\space
+ \space\space\space\space\space\space\end
+ \writestring{\messagecontentA\space:\space\messagecontentB}%
+ \egroup}
+
+%D \macros
+%D {debuggerinfo}
+%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
index c5be8c2c1..71bd1612c 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -1,157 +1,192 @@
-%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\doifnonzeropositiveelse#1#2#3%
-% {\bgroup
-% \setbox\scratchbox=\hbox{\scratchcounter=0#1}%
-% \ifdim\wd\scratchbox=\!!zeropoint\egroup#2\else\egroup#3\fi}
-%
-% \def\dodoifnonzeropositiveelse#1#2\end#3#4%
-% {\egroup
-% \ifx#1\relax#3\else#4\fi}
-%
-% \def\doifnonzeropositiveelse#1%
-% {\bgroup
-% \afterassignment\dodoifnonzeropositiveelse\scratchcounter=0#1\relax\empty\end}
-
-\def\dodoifnonzeropositiveelse#1#2\end#3#4%
- {\ifx#1\relax\ifcase\scratchcounter\egroup#4\else\egroup#3\fi\else\egroup#4\fi}
-
-\def\doifnonzeropositiveelse#1%
- {\bgroup\afterassignment\dodoifnonzeropositiveelse\scratchcounter=0#1\relax\empty\end}
-
-\def\splitskip#1%
- {\scratchskip=0pt plus 1pt minus 1pt
- \advance\scratchskip by #1
- \expandafter\SPLITSKIP\the\scratchskip}
-
-{\catcode`\.=\@@other
- \catcode`\p=\@@other
- \catcode`\l=\@@other
- \catcode`\u=\@@other
- \catcode`\s=\@@other
- \catcode`\m=\@@other
- \catcode`\i=\@@other
- \catcode`\n=\@@other
- \catcode`\t=\@@other
- \gdef\SPLITSKIP#1pt plus #2pt minus #3pt%
- {\DOSPLITSKIP#1 #2 #3 }}
-
-\def\DOSPLITSKIP#1 #2 #3
- {\dimen0=#1pt\dimen2=#2pt\dimen4=#3pt
- \advance\dimen2 by -1pt%
- \advance\dimen4 by -1pt}
-
-% \def\minimaxskip#1#2%
-% {\splitskip#2\relax
-% \scratchdimen=#2\relax
-% #2=\scratchdimen
-% \advance#2 by #1\relax}
-%
-% \def\maximizeskip%
-% {\minimaxskip{-\dimen4}}
-%
-% \def\maximizeskip%
-% {\minimaxskip{\dimen2}}
-%
-% \def\maximizespacing%
-% {\maximizeskip\blankoskipamount
-% \maximizeskip\parskip
-% \maximizeskip\tussenwit
-% \maximizeskip\baselineskip
-% \maximizeskip\bigskipamount
-% \maximizeskip\medskipamount
-% \maximizeskip\smallskipamount}
-
-\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
+%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
+
+% \buildarray[test][aa,bb,cc,dd,ee,ff]
+% \setarrayelement{test}{1}{qq}
+% \arrayelement{test}{1}
+% \arraylength{test}
+%
+% \def\buildarray[#1][#2]%
+% {\scratchcounter=0
+% \def\docommando##1%
+% {\advance\scratchcounter by 1
+% \setvalue{@@aa#1\the\scratchcounter}{##1}}%
+% \processcommalist[#2]\docommando
+% \setevalue{@@aa#1}{\the\scratchcounter}}%
+%
+% \def\setarrayelement#1#2{\setvalue{@@aa#1#2}}
+% \def\arrayelement #1#2{\getvalue{@@aa#1#2}}
+% \def\arraylength #1{\getvalue{@@aa#1}}
+
+% \newsignal\junksignal
+%
+% \def\setjunksignal%
+% {\ifhmode
+% \hskip\junksignal
+% \let\removejunkspaces\doremovejunkspaces
+% \else
+% \let\removejunkspaces\relax
+% \fi}
+%
+% \def\doremovejunkspaces%
+% {\doloop{\ifdim\lastskip=\junksignal\unskip\else\exitloop\fi}}
+
+% \def\doifnonzeropositiveelse#1#2#3%
+% {\bgroup
+% \setbox\scratchbox=\hbox{\scratchcounter=0#1}%
+% \ifdim\wd\scratchbox=\!!zeropoint\egroup#2\else\egroup#3\fi}
+%
+% \def\dodoifnonzeropositiveelse#1#2\end#3#4%
+% {\egroup
+% \ifx#1\relax#3\else#4\fi}
+%
+% \def\doifnonzeropositiveelse#1%
+% {\bgroup
+% \afterassignment\dodoifnonzeropositiveelse\scratchcounter=0#1\relax\empty\end}
+
+\def\dodoifnonzeropositiveelse#1#2\end#3#4%
+ {\ifx#1\relax\ifcase\scratchcounter\egroup#4\else\egroup#3\fi\else\egroup#4\fi}
+
+\def\doifnonzeropositiveelse#1%
+ {\bgroup\afterassignment\dodoifnonzeropositiveelse\scratchcounter=0#1\relax\empty\end}
+
+\def\splitskip#1%
+ {\scratchskip=0pt plus 1pt minus 1pt
+ \advance\scratchskip by #1
+ \expandafter\SPLITSKIP\the\scratchskip}
+
+{\catcode`\.=\@@other
+ \catcode`\p=\@@other
+ \catcode`\l=\@@other
+ \catcode`\u=\@@other
+ \catcode`\s=\@@other
+ \catcode`\m=\@@other
+ \catcode`\i=\@@other
+ \catcode`\n=\@@other
+ \catcode`\t=\@@other
+ \gdef\SPLITSKIP#1pt plus #2pt minus #3pt%
+ {\DOSPLITSKIP#1 #2 #3 }}
+
+\def\DOSPLITSKIP#1 #2 #3
+ {\dimen0=#1pt\dimen2=#2pt\dimen4=#3pt
+ \advance\dimen2 by -1pt%
+ \advance\dimen4 by -1pt}
+
+% \def\minimaxskip#1#2%
+% {\splitskip#2\relax
+% \scratchdimen=#2\relax
+% #2=\scratchdimen
+% \advance#2 by #1\relax}
+%
+% \def\maximizeskip%
+% {\minimaxskip{-\dimen4}}
+%
+% \def\maximizeskip%
+% {\minimaxskip{\dimen2}}
+%
+% \def\maximizespacing%
+% {\maximizeskip\blankoskipamount
+% \maximizeskip\parskip
+% \maximizeskip\tussenwit
+% \maximizeskip\baselineskip
+% \maximizeskip\bigskipamount
+% \maximizeskip\medskipamount
+% \maximizeskip\smallskipamount}
+
+\newcount\modcounter
+
+\def\DoMod #1by#2to#3%
+ {\modcounter=#1\relax
+ \divide\modcounter by #2\relax
+ \multiply\modcounter by #2\relax
+ #3=#1\relax
+ \advance#3 by -\modcounter}
+
+\def\DoDiv #1by#2to#3%
+ {#3=#1\relax
+ \divide#3 by #2\relax}
+
+\def\dounprotected#1\par%
+ {#1\protect}
+
+\def\unprotected%
+ {\unprotect\dounprotected}
+
+%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}}
+
+\newcount\featuretest
+
+\def\testfeature#1#2%
+ {\def\dotestfeature%
+ {\advance\featuretest 1
+ \ifnum\featuretest<#1\relax#2\expandafter\dotestfeature\fi}%
+ \retestfeature}
+
+\def\retestfeature%
+ {\message{starting feature test}\wait
+ \featuretest=-1 \dotestfeature
+ \message{feature test done}\wait}
+
+\protect
+
+\endinput
diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex
index 75da46332..06f1102cb 100644
--- a/tex/context/base/syst-tex.tex
+++ b/tex/context/base/syst-tex.tex
@@ -1,170 +1,253 @@
-%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 have to take care of unwanted \PDFTEX\
-%D initializations. We just want to default to \DVI\ output.
-
-\ifx\pdftexversion\undefined
- \chardef\pdfoutput=0
-\else
- \pdfoutput=0
-\fi
-
-%D When applicable, we also load the \ETEX\ source and
-%D defintion files.
-
-\def\gobbleETEX#1\par{}
-\def\doifETEX{\ifx\eTeXversion\undefined \expandafter\gobbleETEX\fi}
-\def\ifnoETEX{\ifx\eTeXversion\undefined\else\expandafter\gobbleETEX\fi}
-
-\doifETEX \normalinput etex.src \relax
-\doifETEX \normalinput etexdefs.lib \relax
-
-\let\normalprotected = \protected
-\let\normalunexpanded = \unexpanded
-
-%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
+%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
+\catcode`\^=7 % circumflex is for superscripts
+
+%D To prevent all kind of end||of||file problems, for the
+%D moment we simply ignore the Control~Z token.
+
+\catcode`\^^Z=9
+
+%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 \let\normalfmtversion\fmtversion
+
+%D We have to take care of unwanted \PDFTEX\
+%D initializations. We just want to default to \DVI\ output.
+
+\ifx\pdftexversion\undefined
+ \newcount\pdfoutput
+\else
+ \pdfoutput=0
+\fi
+
+%D When applicable, we also load the \ETEX\ source and
+%D defintion files.
+
+\bgroup \obeylines
+
+\ifx\eTeXversion\undefined
+
+ \long\gdef\beginETEX#1\endETEX%
+ {}
+
+ \gdef\beginTEX%
+ {\bgroup\obeylines\dobeginTEX}
+
+ \gdef\dobeginTEX#1
+ {\egroup}
+
+ \global\let\endTEX\relax
+
+\else
+
+ \long\gdef\beginTEX#1\endTEX%
+ {}
+
+ \gdef\beginETEX%
+ {\bgroup\obeylines\dobeginETEX}
+
+ \gdef\dobeginETEX#1
+ {\egroup\immediate\write16%
+ {line \the\inputlineno: inserting E-TEX code \detokenize{#1}}}
+
+ \global\let\endETEX\relax
+
+\fi
+
+\egroup
+
+\beginETEX etex.src etexdefs.lib
+
+ \normalinput etex.src \relax
+ \normalinput etexdefs.lib \relax
+
+ \let\fmtversion\normalfmtversion
+
+\endETEX
+
+\let\normalprotected = \protected
+\let\normalunexpanded = \unexpanded
+
+%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{}
+
+%D To prevent clashes, we slightly redefine the phantom
+%D macros: we let them hide their behaviour by grouping.
+
+\catcode`@=11
+
+%D Somehow this one does not work ok in math mode:
+
+\def\ph@nt%
+ {\bgroup
+ \ifmmode
+ \expandafter\mathpalette\expandafter\mathph@nt
+ \else
+ \expandafter\makeph@nt
+ \fi}
+
+\def\finph@nt%
+ {\setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi
+ \ifh@ \wd\tw@\wd\z@ \fi
+ \box\tw@
+ \egroup}
+
+%D But this one does work.
+
+\def\ph@nt%
+ {\ifmmode
+ \expandafter\mathpalette\expandafter\mathph@nt
+ \else
+ \bgroup\expandafter\makeph@nt
+ \fi}
+
+\def\finph@nt%
+ {\setbox\tw@\null
+ \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@ \fi
+ \ifh@ \wd\tw@\wd\z@ \fi
+ \box\tw@
+ \ifmmode\else\egroup\fi}
+
+\catcode`@=12
+
+%D Just for tracing purposes wet set:
+
+\tracingstats=1
+
+\endinput
diff --git a/tex/context/base/table.tex b/tex/context/base/table.tex
index 764ffaa42..1ddb11c55 100644
--- a/tex/context/base/table.tex
+++ b/tex/context/base/table.tex
@@ -1,1960 +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
-
-
+% 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
+
+\endinput
diff --git a/tex/context/base/texexec.pl b/tex/context/base/texexec.pl
new file mode 100644
index 000000000..0a8d69dab
--- /dev/null
+++ b/tex/context/base/texexec.pl
@@ -0,0 +1,624 @@
+#!/usr/bin/perl
+#-w
+
+# nog doen: automatisch log scannen op overfull en missing
+#
+# fastmode tzt anders: \iffastmode \fi
+
+#D \module
+#D [ file=texexec.pl,
+#D version=1999.01.07,
+#D title=running \ConTeXt,
+#D subtitle=\TEXEXEC,
+#D author=Hans Hagen,
+#D date=\currentdate,
+#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+#C
+#C This script is part of the \CONTEXT\ macro||package and is
+#C therefore copyrighted by \PRAGMA. Non||commercial use is
+#C granted.
+
+# sample 'texexec.ini' file
+#
+# set UsedInterfaces to nl,en
+# set UserInterface to nl
+# set TeXExecutable to pdfetex
+# set TeXFormatFlag to &
+# set TeXVirginFlag to -ini
+# set TeXFormatPath to t:/tex/web2c/fmt/
+# set ConTeXtPath to t:/pragma/sources/
+# set SetupPath to t:/pragma/sources/
+# set TeXScriptsPath to t:/pragma/programs/
+
+use Getopt::Long ;
+use Cwd ;
+use Time::Local ;
+
+$Getopt::Long::passthrough = 1 ; # no error message
+$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
+
+$ConTeXtInterface = "unknown" ;
+$OutputFormat = "standard" ;
+$MainLanguage = "standard" ;
+$PaperFormat = "standard" ;
+$PrintFormat = "standard" ;
+$NOfRuns = 10 ;
+$SetupPath = "" ;
+$Format = "" ;
+$Environment = "" ;
+
+$UserInterface = "en" ; # default
+$UsedInterfaces = "" ;
+
+&GetOptions
+ ( "interface=s" => \$ConTeXtInterface ,
+ "output=s" => \$OutputFormat ,
+ "language=s" => \$MainLanguage ,
+ "paper=s" => \$PaperFormat ,
+ "print=s" => \$PrintFormat ,
+ "help" => \$HelpAsked ,
+ "fast" => \$FastMode ,
+ "nomp" => \$NoMPMode ,
+ "final" => \$FinalMode ,
+ "runs=s" => \$NOfRuns ,
+ "tex=s" => \$TeXProgram ,
+ "verbose" => \$Verbose ,
+ "module" => \$TypesetModule ,
+ "make" => \$MakeFormats ,
+ "mode=s" => \$Mode ,
+ "pages=s" => \$Pages ,
+ "format=s" => \$Format ,
+ "pdf" => \$ProducePdf ,
+ "convert=s" => \$Convert ,
+ "once" => \$RunOnce ,
+ "batch" => \$EnterBatchMode ,
+ "color" => \$UseColor ,
+ "environment=s" => \$Environment ,
+ "result=s" => \$Result ) ;
+
+if ($ProducePdf) { $OutputFormat = "pdf" }
+if ($RunOnce) { $NOfRuns = 1 }
+
+$Program = " TeXExec 1.1 - ConTeXt / PRAGMA ADE 1997-1999" ;
+
+$Script = "texexec" ;
+
+print "\n$Program\n\n";
+
+$SIG{INT} = "IGNORE" ;
+
+sub CheckPath
+ { ($Key, $Value) = @_ ;
+ if ($Value =~ /\//)
+ { $Last = chop $Value ;
+ unless ($Last eq "/" ) { $Value = $Value . $Last }
+ unless (-d $Value)
+ { print " error : $Key set to unknown path $Value\n" } } }
+
+if ($ENV{TEXEXEC_INI_FILE})
+ { $_ = $ENV{TEXEXEC_INI_FILE} }
+else
+ { $_ = $0 }
+
+s/\.(pl|ini)//io ;
+
+$IniPath = $_ . ".ini" ;
+
+# set <variable> to <value>
+# for <script> set <variable> to <value>
+
+if (open(INI, $IniPath))
+ { if ($Verbose)
+ { print " reading : $IniPath\n\n" }
+ while (<INI>)
+ { if (!/^[a-zA-Z\s]/oi)
+ { }
+# elsif (/for\s+(\w+)\s+set\s+(\w+)\s*to\s*([\w|\:|\/]+)/goi)
+ elsif (/for\s+(\S+)\s+set\s+(\S+)\s*to\s*(\S+)/goi)
+ { if ($1 eq $Script) # not yet used
+ { if ($Verbose)
+ { print " setting : '$2' to '$3' for '$1'\n" }
+ $Done{$2} = 1 ;
+ ${$2} = $3 ; CheckPath ($2, $3) } }
+# elsif (/set\s+(\w+)\s*to\s*([\w|\:|\/|\,]+)/goi)
+ elsif (/set\s+(\S+)\s*to\s*(\S+)/goi)
+ { unless ($Done{$1})
+ { if ($Verbose)
+ { print " setting : '$1' to '$2' for 'all'\n" }
+ ${$1} = $2 ; CheckPath ($1, $2) } } }
+ close (INI) ;
+ if ($Verbose)
+ { print "\n" } }
+else
+ { print " warning : $IniPath not found\n" ;
+ exit 1 }
+
+if ($TeXProgram)
+ { $TeXExecutable = $TeXProgram }
+elsif (!$TeXExecutable)
+ { $TeXExecutable = "tex" }
+
+unless ($TeXFormatFlag) { $TeXFormatFlag="&" }
+unless ($TeXVirginFlag) { $TeXVirginFlag="-ini" }
+
+# $_ = $0 ; s/texexec\.pl//io ; $TeXScriptsPath = $_ ;
+
+unless ($TeXScriptsPath)
+ { $_ = $0 ; s/texexec\.pl//io ; $TeXScriptsPath = $_ }
+
+unless ($ConTeXtPath)
+ { $ConTeXtPath = $TeXScriptsPath }
+
+if ($ENV{"HOME"})
+ { if ($SetupPath) { $SetupPath .= "," }
+ $SetupPath .= $ENV{"HOME"} }
+
+$OutputFormats{pdf} = "pdftex" ;
+$OutputFormats{pdftex} = "pdftex" ;
+$OutputFormats{dvips} = "dvips" ;
+$OutputFormats{dvipsone} = "dvipsone" ;
+$OutputFormats{acrobat} = "acrobat" ;
+$OutputFormats{dviwindo} = "dviwindo" ;
+$OutputFormats{dviview} = "dviview" ;
+
+@ConTeXtFormats = ("nl", "en", "de", "cz", "uk") ;
+
+$ConTeXtInterfaces{nl} = "nl" ; $ConTeXtInterfaces{dutch} = "nl" ;
+$ConTeXtInterfaces{en} = "en" ; $ConTeXtInterfaces{english} = "en" ;
+$ConTeXtInterfaces{de} = "de" ; $ConTeXtInterfaces{german} = "de" ;
+$ConTeXtInterfaces{cz} = "cz" ; $ConTeXtInterfaces{czech} = "cz" ;
+$ConTeXtInterfaces{uk} = "uk" ; $ConTeXtInterfaces{brittish} = "uk" ;
+
+$Help{HELP} =
+ " --help show this or more, e.g. '--help interface'\n" ;
+
+$Help{LANGUAGE} =
+ " --language main hyphenation language \n" ;
+
+$Help{language} = $Help{LANGUAGE} .
+ " =xx : standard abbreviation \n" ;
+
+$Help{TEX} =
+ " --tex tex binary \n" ;
+
+$Help{tex} = $Help{TEX} .
+ " =name : binary of executable \n" ;
+
+$Help{FORMAT} =
+ " --format fmt file \n" ;
+
+$Help{format} = $Help{FORMAT} .
+ " =name : format file (memory dump) \n" ;
+
+$Help{MODE}=
+ " --mode running mode \n" ;
+
+$Help{mode} = $Help{MODE} .
+ " =list : modes to set \n" ;
+
+$Help{OUTPUT} =
+ " --output specials to use \n" ;
+
+$Help{output} = $Help{OUTPUT} .
+ " =pdftex \n" .
+ " =dvips dvipsone \n" .
+ " =dviwindo dviview \n" ;
+
+$Help{PAPER} =
+ " --paper paper input and output format \n" ;
+
+$Help{paper} = $Help{PAPER} .
+ " =a4a3 : A4 printed on A3 \n" .
+ " =a5a4 : A5 printed on A4 \n" ;
+
+$Help{PRINT} =
+ " --print page imposition scheme \n" ;
+
+$Help{PAGES} =
+ " --pages pages to output \n" ;
+
+$Help{paper} = $Help{PAPER} .
+ " =odd : odd pages \n" .
+ " =even : even pages \n" .
+ " =x,y,z : pages x, y and z \n" ;
+
+$Help{"print"} = $Help{PRINT} .
+ " =up : 2 pages per sheet doublesided \n" .
+ " =down : 2 rotated pages per sheet doublesided \n" ;
+
+$Help{INTERFACE} =
+ " --interface user interface \n" ;
+
+$Help{interface} = $Help{INTERFACE} .
+ " =en : english \n" .
+ " =nl : dutch \n" .
+ " =de : german \n" ;
+ " =cz : czech \n" ;
+ " =uk : brittish \n" ;
+
+$Help{RUNS} =
+ " --runs maximum number of TeX runs \n" ;
+
+$Help{FAST} =
+ " --fast skip as much as possible \n" ;
+
+$Help{NOMP} =
+ " --nomp don't run MetaPost \n" ;
+
+$Help{FINAL} =
+ " --final add a final run without skipping \n" ;
+
+$Help{MODULE} =
+ " --module typeset tex/pl/mp module \n" ;
+
+$Help{MAKE} =
+ " --make build format files \n" ;
+
+$Help{VERBOSE} =
+ " --verbose shows some additional info \n" ;
+
+$Help{CONVERT} =
+ " --convert converts file first \n" ;
+
+$Help{convert} = $Help{CONVERT} .
+ " =xml : xml => tex \n" .
+ " =sgml : sgml => tex \n" ;
+
+$Help{RESULTS} =
+ " --results resulting file \n" ;
+
+# nog Result in help
+
+if ($HelpAsked)
+ { if (@ARGV)
+ { foreach (@ARGV) { print "$Help{$_}\n" } }
+ else
+ { print $Help{LANGUAGE} ;
+ print $Help{OUTPUT} ;
+ print $Help{PRINT} ;
+ print $Help{PAPER} ;
+ print $Help{PAGES} ;
+ print $Help{INTERFACE} ;
+ print $Help{RUNS} ;
+ print $Help{TEX} ;
+ print $Help{MODE} ;
+ print $Help{FAST} ;
+ print $Help{NOMP} ;
+ print $Help{FINAL} ;
+ print $Help{VERBOSE} ;
+ print $Help{MODULE} ;
+ print $Help{MAKE} ;
+ print $Help{FORMAT} ;
+ print $Help{CONVERT} ;
+ print "\n" ;
+ print $Help{HELP} ;
+ print "\n" }
+ exit 0 }
+
+$FinalRunNeeded = 0 ;
+
+sub ConvertXMLFile
+ { ($FileName) = @_ ;
+ system ("sgml2tex $FileName.xml") }
+
+sub ConvertSGMLFile
+ { ($FileName) = @_ ;
+ system ("sgml2tex $FileName.sgm") }
+
+sub MakeOptionFile
+ { ($FinalRun, $FastDisabled) = @_ ;
+ open (OPT, ">cont-opt.tex") ;
+ print OPT "\\unprotect\n" ;
+ $MainLanguage = lc $MainLanguage ;
+ unless ($MainLanguage eq "standard")
+ { print OPT "\\setuplanguage[$MainLanguage]\n" }
+ $FullFormat = "" ;
+ $Ok = 1 ;
+ @OutputFormat = split(/,/,$OutputFormat) ;
+ foreach $Format (@OutputFormat)
+ { if ($OutputFormats{lc $Format})
+ { if ($FullFormat) { $FullFormat .= "," }
+ $FullFormat .= "$OutputFormats{lc $Format}" }
+ elsif ($Format ne "standard")
+ { $Ok = 0 } }
+ if (!$Ok)
+ { print $Help{output} }
+ elsif ($FullFormat)
+ { print OPT "\\setupoutput[$FullFormat]\n" }
+ else
+ { $FullFormat = "standard" }
+ if ($EnterBatchMode)
+ { print OPT "\\batchmode\n" }
+ if ($UseColor)
+ { print OPT "\\setupcolors[\\c!status=\\v!start]\n" }
+ if ($NoMPMode)
+ { print OPT "\\runMPgraphicsfalse\n" }
+ if (($FastMode)&&(!$FastDisabled))
+ { print OPT "\\fastmode\n" }
+ if ($SetupPath)
+ { print OPT "\\setupsystem[\\c!gebied=\{$SetupPath\}]\n" }
+ $_ = $PaperFormat ;
+ if (/.4.3/goi)
+ { print OPT "\\stelpapierformaatin[A4][A3]\n" }
+ elsif (/.5.4/goi)
+ { print OPT "\\stelpapierformaatin[A5][A4]\n" }
+ else
+ { unless (/standard/) { print $Help{paper} } }
+ $_ = $PrintFormat ;
+ if (/.*up/goi)
+ { $FinalRunNeeded = 1 ;
+ if ($FinalRun)
+ { print OPT "\\stelarrangerenin[2UP,\\v!geroteerd,\\v!dubbelzijdig]\n" } }
+ elsif (/.*down/goi)
+ { $FinalRunNeeded = 1 ;
+ if ($FinalRun)
+ { print OPT "\\stelarrangerenin[2DOWN,\\v!geroteerd,\\v!dubbelzijdig]\n" } }
+ else
+ { unless (/standard/goi) { print $Help{"print"} } }
+ if ($Mode)
+ { print OPT "\\enablemode[$Mode]\n" }
+ if ($Pages)
+ { if (lc $Pages eq "odd")
+ { print OPT "\\chardef\\whichpagetoshipout=1\n" }
+ elsif (lc $Pages eq "even")
+ { print OPT "\\chardef\\whichpagetoshipout=2\n" }
+ else
+ { print OPT "\\def\\pagestoshipout\{$Pages\}\n" } }
+ print OPT "\\protect\n" ;
+ if ($Environment)
+ { foreach $E ($Environment) { print OPT "\\omgeving $E\n" } }
+ close (OPT) }
+
+sub CompareFiles
+ { $Ok = open (TUO1, $_[0]) && open (TUO2, $_[1]);
+ while (($Line1=<TUO1>)&&($Line2=<TUO2>)&&$Ok)
+ { $Ok = ($Line1 eq $Line2) }
+ close (TUO1) ;
+ close (TUO2) ;
+ return ($Ok) }
+
+$ConTeXtVersion = "unknown" ;
+$ConTeXtModes = "" ;
+
+sub ScanPreamble
+ { my ($FileName) = @_ ;
+ open (TEX, $FileName) ;
+ while (<TEX>)
+ { chomp ;
+ if (!$_)
+ { last }
+ elsif (/^\%/)
+ { if (/^\%\&(.*\w)/)
+ { $ConTeXtInterface = $ConTeXtInterfaces{$1} }
+ else
+ { if (/tex=([a-z]*)/goi) { $TeXExecutable = $1 }
+ if (/program=([a-z]*)/goi) { $TeXExecutable = $1 }
+ if (/modes=([a-z\,]*)/goi) { $ConTeXtModes = $1 }
+ if (/output=([a-z\,]*)/goi) { $OutputFormat = $1 }
+ if (/format=([a-z]*)/goi) { $ConTeXtInterface = $ConTeXtInterfaces{$1} }
+ if (/interface=([a-z]*)/goi) { $ConTeXtInterface = $ConTeXtInterfaces{$1} }
+ if (/version=([a-z]*)/goi) { $ConTeXtVersion = $1 } } }
+ else
+ { last } }
+ close(TEX) }
+
+sub ScanContent
+ { ($ConTeXtInput) = @_ ;
+ open (TEX, $ConTeXtInput) ;
+ while (<TEX>)
+ { if (/\\(starttekst|stoptekst|startonderdeel)/)
+ { $ConTeXtInterface = "nl" ; last }
+ elsif (/\\(stelle|verwende|umgebung|benutze)/)
+ { $ConTeXtInterface = "de" ; last }
+ elsif (/\\(stel|gebruik|omgeving)/)
+ { $ConTeXtInterface = "nl" ; last }
+ elsif (/\\(use|setup|environment)/)
+ { $ConTeXtInterface = "en" ; last }
+ elsif (/(hoogte|breedte|letter)=/)
+ { $ConTeXtInterface = "nl" ; last }
+ elsif (/(height|width|style)=/)
+ { $ConTeXtInterface = "en" ; last }
+ elsif (/(hoehe|breite|schrift)=/)
+ { $ConTeXtInterface = "de" ; last }
+ elsif (/externfiguur/)
+ { $ConTeXtInterface = "nl" ; last }
+ elsif (/externalfigure/)
+ { $ConTeXtInterface = "en" ; last }
+ elsif (/externeabbildung/)
+ { $ConTeXtInterface = "de" ; last } }
+ close (TEX) }
+
+if ($ConTeXtInterfaces{$ConTeXtInterface})
+ { $ConTeXtInterface = $ConTeXtInterfaces{$ConTeXtInterface} }
+
+my $Problems = 0 ;
+
+sub RunTeX
+ { my $StartTime = time ;
+ $Problems = system
+ ( "$TeXProgramPath$TeXExecutable " .
+ "$TeXFormatFlag$TeXFormatPath$Format $JobName" ) ;
+ my $StopTime = time - $StartTime ;
+ print "\n run time : $StopTime\n" ;
+ return $Problems }
+
+sub PushResult
+ { if ($Result)
+ { print " outputfile : $Result\n" ;
+ unlink ("texexec.tuo") ; rename ("$_[0].tuo", "texexec.tuo") ;
+ unlink ("texexec.log") ; rename ("$_[0].log", "texexec.log") ;
+ unlink ("texexec.dvi") ; rename ("$_[0].dvi", "texexec.dvi") ;
+ unlink ("texexec.pdf") ; rename ("$_[0].pdf", "texexec.pdf") ;
+ if (-f "$Result.tuo")
+ { unlink ("$_[0].tuo") ;
+ rename ("$Result.tuo", "$_[0].tuo") } } }
+
+sub PopResult
+ { if ($Result)
+ { unlink ("$Result.tuo") ; rename ("$_[0].tuo", "$Result.tuo") ;
+ unlink ("$Result.log") ; rename ("$_[0].log", "$Result.log") ;
+ unlink ("$Result.dvi") ; rename ("$_[0].dvi", "$Result.dvi") ;
+ unlink ("$Result.pdf") ; rename ("$_[0].pdf", "$Result.pdf") ;
+ rename ("texexec.tuo", "$_[0].tuo") ;
+ rename ("texexec.log", "$_[0].log") ;
+ rename ("texexec.dvi", "$_[0].dvi") ;
+ rename ("texexec.pdf", "$_[0].pdf") } }
+
+sub RunConTeXtFile
+ { ($JobName) = @_ ;
+ $JobName =~ s/\\/\//goi ;
+ if (-e "$JobName.tex")
+ { if ($ConTeXtInterface eq "unknown")
+ { ScanPreamble ("$JobName.tex") }
+ if ($ConTeXtInterface eq "unknown")
+ { ScanContent ("$JobName.tex") }
+ if ($ConTeXtInterface eq "unknown")
+ { $ConTeXtInterface = $UserInterface }
+ if (lc $Convert eq "xml")
+ { print " xml input : $JobName.xml\n" ;
+ ConvertXMLFile ($JobName) }
+ elsif (lc $Convert eq "sgml")
+ { print " sgml input : $JobName.sgm\n" ;
+ ConvertSGMLFile ($JobName) }
+ MakeOptionFile ( 0, 0 ) ;
+ $StopRunning = 0 ;
+ $Format = "cont-$ConTeXtInterface" ;
+ unless ($FullFormat) { $FullFormat = "standard" }
+ print " executable : $TeXProgramPath$TeXExecutable\n" ;
+ print " format : $TeXFormatPath$Format\n" ;
+ print " inputfile : $JobName\n" ;
+ print " output : $FullFormat\n" ; # OutputFormat\n" ;
+ print " interface : $ConTeXtInterface\n" ;
+ $Options = "" ;
+ if ($FastMode) { $Options .= " fast" }
+ if ($FinalMode) { $Options .= " final" }
+ if ($Verbose) { $Options .= " verbose" }
+ if ($TypesetModule) { $Options .= " module" }
+ if ($MakeFormats) { $Options .= " make" }
+ if ($RunOnce) { $Options .= " once" }
+ if ($UseColor) { $Options .= " color" }
+ if ($EnterBatchMode){ $Options .= " batch" }
+ if ($NoMPMode) { $Options .= " nomp" }
+ if ($Options)
+ { print " options :$Options\n" }
+ if ($ConTeXtModes)
+ { print " possible modes : $ConTeXtModes\n" }
+ if ($Mode)
+ { print " current mode : $Mode\n" }
+ else
+ { print " current mode : all\n" }
+ if ($Environment)
+ { print " environments : $Environment\n" }
+ PushResult($JobName) ;
+ while (!$StopRunning&&($TeXRuns<$NOfRuns))
+ { ++$TeXRuns ;
+ print " TeX run : $TeXRuns\n\n" ;
+ $Problems = RunTeX() ;
+ if ($Problems)
+ { last }
+ if ($NOfRuns>1)
+ { unlink "texutil.tuo" ;
+ rename "$JobName.tuo", "texutil.tuo" ;
+ system
+ ( "perl " . "$TeXScriptsPath" . "texutil.pl " .
+ "--references --ij --high $JobName" ) ;
+ $StopRunning =
+ CompareFiles("texutil.tuo", "$JobName.tuo") } }
+ if ((!$Problems)&&(($FinalMode||$FinalRunNeeded))&&($NOfRuns>1))
+ { MakeOptionFile ( 1 , $FinalMode) ;
+ print " final TeX run : $TeXRuns\n\n" ;
+ $Problems = RunTeX() }
+ PopResult($JobName) } }
+
+sub RunSomeTeXFile
+ { ($JobName) = @_ ;
+ if (-e "$JobName.tex")
+ { PushResult($JobName) ;
+ print " executable : $TeXProgramPath$TeXExecutable\n" ;
+ print " format : $TeXFormatPath$Format\n" ;
+ print " inputfile : $JobName\n" ;
+ $Problems = RunTeX() ;
+ PopResult($JobName) } }
+
+sub RunModule
+ { my ($FileName) = @_ ;
+ if ((-e "$FileName.tex")||(-e "$FileName.pl")||(-e "$FileName.mp")||
+ (-e "$FileName.pm"))
+ { system
+ ( "perl " . "$TeXScriptsPath" . "texutil.pl " .
+ "--documents $FileName.pl $FileName.pm $FileName.mp $FileName.tex" ) ;
+ print " module : $FileName\n\n" ;
+ open (MOD, ">$Script.tex") ;
+ print MOD "% format=dutch \n" ;
+ print MOD "\\starttekst \n" ;
+ print MOD "\\input modu-abr \n" ;
+ print MOD "\\input modu-arg \n" ;
+ print MOD "\\input modu-env \n" ;
+ print MOD "\\input modu-mod \n" ;
+ print MOD "\\input modu-pap \n" ;
+ print MOD "\\input modu-opt \n" ;
+ print MOD "\\def\\ModuleNumber{1}\n" ;
+ print MOD "\\input $FileName.ted \n" ;
+ print MOD "\\stoptekst \n" ;
+ close (MOD) ;
+ $ConTeXtInterface = "nl" ;
+ RunConTeXtFile($Script) ;
+ if ($FileName ne $Script)
+ { foreach $FileSuffix ("dvi", "pdf", "tui", "tuo", "log")
+ { unlink ("$FileName.$FileSuffix") ;
+ rename ("$Script.$FileSuffix", "$FileName.$FileSuffix") } }
+ unlink ("$Script.tex") } }
+
+sub RunFormats
+ { if (@ARGV)
+ { @ConTeXtFormats = @ARGV }
+ elsif ($UsedInterfaces ne "")
+ { @ConTeXtFormats = split /\,/,$UsedInterfaces }
+ $CurrentPath = cwd() ;
+ if ($TeXExecutable =~ /etex|eetex|pdfetex|pdfeetex/gio)
+ {$TeXPrefix = "*" }
+ else
+ {$TeXPrefix = "" }
+ if (chdir "$TeXFormatPath")
+ { if ($Format)
+ { system
+ ( "$TeXProgramPath$TeXExecutable " .
+ "$TeXVirginFlag " .
+ "${TeXPrefix}$Format" ) ;
+ @ConTeXtFormats = $Format }
+ else
+ { foreach $Interface (@ConTeXtFormats)
+ { system
+ ( "$TeXProgramPath$TeXExecutable " .
+ "$TeXVirginFlag " .
+ "${TeXPrefix}cont-$Interface" ) } }
+ print "\n" ;
+ print " executable : $TeXProgramPath$TeXExecutable\n" ;
+ print " format(s) : @ConTeXtFormats\n\n" ;
+ chdir $CurrentPath } }
+
+sub RunFiles
+ { foreach $JobName (@ARGV)
+ { $JobName =~ s/\.tex//goi ;
+ if ($TypesetModule)
+ { unless ($Format) { RunModule ($JobName) } }
+ else
+ { if ($Format)
+ { RunSomeTeXFile ($JobName) }
+ else
+ { RunConTeXtFile ($JobName) } }
+ unless (-s "$JobName.log") { unlink ("$JobName.log") }
+ unless (-s "$JobName.tui") { unlink ("$JobName.tui") } } }
+
+if ($MakeFormats)
+ { RunFormats }
+elsif (@ARGV)
+ { RunFiles }
+else
+ { print $Help{HELP} }
+
+if (-f "cont-opt.tex")
+ { unlink ("cont-opt.bak") ;
+ rename ("cont-opt.tex", "cont-opt.bak") }
+
+if ($Problems) { exit 1 }
diff --git a/tex/context/base/texexec.rme b/tex/context/base/texexec.rme
new file mode 100644
index 000000000..0234c8a97
--- /dev/null
+++ b/tex/context/base/texexec.rme
@@ -0,0 +1,13 @@
+% This is texexec.ini, the file used by texexec to determine
+% where to find files, what tex to use, what flags to pass,
+% etc. These settings are based on web2c.
+
+set UsedInterfaces to nl,en
+set UserInterface to nl
+set TeXExecutable to pdfetex
+set TeXFormatFlag to &
+set TeXVirginFlag to -ini
+set TeXFormatPath to t:/tex/web2c/fmt/
+set ConTeXtPath to t:/pragma/sources/
+set SetupPath to t:/pragma/sources/
+set TeXScriptsPath to t:/pragma/programs/
diff --git a/tex/context/base/texutil.pl b/tex/context/base/texutil.pl
index 607268361..4e4ab2cf1 100644
--- a/tex/context/base/texutil.pl
+++ b/tex/context/base/texutil.pl
@@ -1,1547 +1,2189 @@
-#!/usr/bin/perl
-
-#-w
-
-#D \module
-#D [ file=texutil.pl,
-#D version=1997.12.08,
-#D title=pre- and postprocessing utilities,
-#D subtitle=\TEXUTIL,
-#D author=Hans Hagen,
-#D date=\currentdate,
-#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-#C
-#C This script is part of the \CONTEXT\ macro||package and is
-#C therefore copyrighted by \PRAGMA. Non||commercial use is
-#C granted.
-
-# Thanks to Tobias Burnus for the german translations.
-# Thanks to Taco Hoekwater for making the file -w proof.
-
-#D This is \TEXUTIL, a utility program (script) to be used
-#D alongside the \CONTEXT\ macro package. This \PERL\ script is
-#D derived from the \MODULA\ version and uses slightly better
-#D algoritms for sanitizing \TEX\ specific (sub|)|strings.
-#D This implementation is therefore not entirely compatible
-#D with the original \TEXUTIL, although most users will
-#D probably never notice. Now how was this program called?
-
-$Program = "TeXUtil 6.40 - ConTeXt / PRAGMA 1992-1998" ;
-
-#D By the way, this is my first \PERL\ script, which means
-#D that it will be improved as soon as I find new and/or more
-#D suitable solutions in the \PERL\ manuals. As can be seen in
-#D the definition of \type{$program}, this program is part of
-#D the \CONTEXT\ suite, and therefore can communicate with the
-#D users in english as well as some other languages. One can
-#D set his favourite language by saying something like:
-
-#D \starttypen
-#D perl texutil.pl --interface=de --figures *.eps *.tif
-#D \stoptypen
-#D
-#D Of course one can also say \type{--interface=nl}, which
-#D happens to be my native language.
-
-#D I won't go into too much detail on the algoritms used.
-#D The next few pages show the functionality as reported by the
-#D helpinformation and controled by command line arguments
-#D and can serve as additional documentation.
-
-#D \TEXUTIL\ can handle different tasks; which one is active
-#D depends on the command line arguments. Most task are
-#D handled by the procedures below. The one exception is the
-#D handling of \TIFF\ files when collecting illustration
-#D files. When needed, \TEXUTIL\ calls for \TIFFINFO\ or
-#D \TIFFTAGS, but more alternatives can be added by extending
-#D \type{@TiffPrograms}.
-
-@TiffPrograms = ("tiffinfo", "tifftags") ;
-
-#D Back to the command line arguments. These are handled by
-#D a \PERL\ system module. This means that, at least for the
-#D moment, there is no external control as provided by the
-#D \PRAGMA\ environment system.
-
-use Getopt::Long ;
-
-#D We don't want error messages and accept partial switches,
-#D which saves users some typing.
-
-$Getopt::Long::passthrough = 1 ; # no error message
-$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
-
-#D We also predefine the interface language and set a boolean
-#D that keeps track of unknown options. \voetnoot {This feature
-#D is still to be implemented.}
-
-$Interface = "en" ;
-$UnknownOptions = 0 ;
-
-#D Here come the options:
-
-&GetOptions
- ("references" => \$ProcessReferences,
- "ij" => \$ProcessIJ,
- "high" => \$ProcessHigh,
- "quotes" => \$ProcessQuotes,
- "documents" => \$ProcessDocuments,
- "type=s" => \$ProcessType,
- "sources" => \$ProcessSources,
- "setups" => \$ProcessSetups,
- "templates" => \$ProcessTemplates,
- "infos" => \$ProcessInfos,
- "figures" => \$ProcessFigures,
- "tiff" =>\$ProcessTiff,
- "logfile" => \$ProcessLogFile,
- "box" =>\$ProcessBox,
- "hbox" =>\$ProcessHBox,
- "vbox" =>\$ProcessVBox,
- "criterium=f" =>\$ProcessCriterium,
- "unknown" =>\$ProcessUnknown,
- "help" => \$ProcessHelp,
- "interface=s" => \$Interface) ;
-
-#D By default wildcards are expanded into a list. The
-#D subroutine below is therefore only needed when no file or
-#D pattern is given.
-
-$InputFile = "@ARGV" ;
-
-sub CheckInputFiles
- { my ($UserSuppliedPath) = @_ ;
- @UserSuppliedFiles = map { split " " } sort lc $UserSuppliedPath }
-
-#D In order to support multiple interfaces, we save the
-#D messages in a hash table. As a bonus we can get a quick
-#D overview of the messages we deal with.
-
-sub Report
- { foreach $_ (@_)
- { if (! defined $MS{$_})
- { print $_ }
- else
- { print $MS{$_} }
- print " " }
- print "\n" }
-
-#D The messages are saved in a hash table and are called
-#D by name. This contents of this table depends on the
-#D interface language in use.
-
-#D \startcompressdefinitions
-
-if ($Interface eq "nl")
-
- { # begin of dutch section
-
- $MS{"ProcessingReferences"} = "commando's, lijsten en indexen verwerken" ;
- $MS{"GeneratingDocumentation"} = "ConTeXt documentatie file voorbereiden" ;
- $MS{"GeneratingSources"} = "ConTeXt broncode file genereren" ;
- $MS{"FilteringDefinitions"} = "ConTeXt definities filteren" ;
- $MS{"CopyingTemplates"} = "TeXEdit toets templates copieren" ;
- $MS{"CopyingInformation"} = "TeXEdit help informatie copieren" ;
- $MS{"GeneratingFigures"} = "figuur file genereren" ;
- $MS{"FilteringLogFile"} = "log file filteren (poor mans version)" ;
-
- $MS{"SortingIJ"} = "IJ sorteren onder Y" ;
- $MS{"ConvertingHigh"} = "hoge ASCII waarden converteren" ;
- $MS{"ProcessingQuotes"} = "characters met accenten afhandelen" ;
- $MS{"ForcingFileType"} = "filetype instellen" ;
- $MS{"UsingTiff"} = "TIF files afhandelen" ;
- $MS{"FilteringBoxes"} = "overfull boxes filteren" ;
- $MS{"ApplyingCriterium"} = "criterium toepassen" ;
- $MS{"FilteringUnknown"} = "onbekende ... filteren" ;
-
- $MS{"NoInputFile"} = "geen invoer file opgegeven" ;
- $MS{"NoOutputFile"} = "geen uitvoer file gegenereerd" ;
- $MS{"EmptyInputFile"} = "lege invoer file" ;
- $MS{"NotYetImplemented"} = "nog niet beschikbaar" ;
-
- $MS{"Action"} = " actie :" ;
- $MS{"Option"} = " optie :" ;
- $MS{"Error"} = " fout :" ;
- $MS{"Remark"} = " opmerking :" ;
- $MS{"SystemCall"} = " systeemaanroep :" ;
- $MS{"BadSystemCall"} = " foute systeemaanroep :" ;
- $MS{"MissingSubroutine"} = " onbekende subroutine :" ;
-
- $MS{"EmbeddedFiles"} = " gebruikte files :" ;
- $MS{"BeginEndError"} = " b/e fout in :" ;
- $MS{"SynonymEntries"} = " aantal synoniemen :" ;
- $MS{"SynonymErrors"} = " fouten :" ;
- $MS{"RegisterEntries"} = " aantal ingangen :" ;
- $MS{"RegisterErrors"} = " fouten :" ;
- $MS{"PassedCommands"} = " aantal commando's :" ;
-
- $MS{"NOfDocuments"} = " documentatie blokken :" ;
- $MS{"NOfDefinitions"} = " definitie blokken :" ;
- $MS{"NOfSkips"} = " overgeslagen blokken :" ;
- $MS{"NOfSetups"} = " gecopieerde setups :" ;
- $MS{"NOfTemplates"} = " gecopieerde templates :" ;
- $MS{"NOfInfos"} = " gecopieerde helpinfos :" ;
- $MS{"NOfFigures"} = " verwerkte figuren :" ;
- $MS{"NOfBoxes"} = " te volle boxen :" ;
- $MS{"NOfUnknown"} = " onbekende ... :" ;
-
- $MS{"InputFile"} = " invoer file :" ;
- $MS{"OutputFile"} = " outvoer file :" ;
- $MS{"FileType"} = " type file :" ;
- $MS{"EpsFile"} = " eps file :" ;
- $MS{"TifFile"} = " tif file :" ;
- $MS{"MPFile"} = " metapost file :" ;
-
- $MS{"Overfull"} = "te vol" ;
- $MS{"Entries"} = "ingangen" ;
- $MS{"References"} = "verwijzingen" ;
-
- } # end of dutch section
-
-elsif ($Interface eq "de")
-
- { # begin of german section
-
- $MS{"ProcessingReferences"} = "Verarbeiten der Befehle, Listen und Register" ;
- $MS{"GeneratingDocumentation"} = "Vorbereiten der ConTeXt-Dokumentationsdatei" ;
- $MS{"GeneratingSources"} = "Erstellen einer nur Quelltext ConTeXt-Datei" ;
- $MS{"FilteringDefinitions"} = "Filtern der ConTeXt-Definitionen" ;
- $MS{"CopyingTemplates"} = "Kopieren der TeXEdit-Test-key-templates" ;
- $MS{"CopyingInformation"} = "Kopieren der TeXEdit-Hilfsinformation" ;
- $MS{"GeneratingFigures"} = "Erstellen einer Abb-Uebersichtsdatei" ;
- $MS{"FilteringLogFile"} = "Filtern der log-Datei" ;
-
- $MS{"SortingIJ"} = "Sortiere IJ nach Y" ;
- $MS{"ConvertingHigh"} = "Konvertiere hohe ASCII-Werte" ;
- $MS{"ProcessingQuotes"} = "Verarbeiten der Akzentzeichen" ;
- $MS{"ForcingFileType"} = "Dateityp einstellen" ;
- $MS{"UsingTiff"} = "TIF-Dateien verarbeite" ;
- $MS{"FilteringBoxes"} = "Filtern der ueberfuellten Boxen" ;
- $MS{"ApplyingCriterium"} = "Anwenden des uebervoll-Kriteriums" ;
- $MS{"FilteringUnknown"} = "Filter unbekannt ..." ;
-
- $MS{"NoInputFile"} = "Keine Eingabedatei angegeben" ;
- $MS{"NoOutputFile"} = "Keine Ausgabedatei generiert" ; # TOBIAS
- $MS{"EmptyInputFile"} = "Leere Eingabedatei" ;
- $MS{"NotYetImplemented"} = "Noch nicht verfuegbar" ;
-
- $MS{"Action"} = " Aktion :" ;
- $MS{"Option"} = " Option :" ;
- $MS{"Error"} = " Fehler :" ;
- $MS{"Remark"} = " Anmerkung :" ;
- $MS{"SystemCall"} = " system call :" ;
- $MS{"BadSystemCall"} = " bad system call :" ;
- $MS{"MissingSubroutine"} = " missing subroutine :" ;
- $MS{"SystemCall"} = " Systemaufruf :" ;
- $MS{"BadSystemCall"} = " Fehlerhafter Aufruf :" ;
- $MS{"MissingSubroutine"} = " Fehlende Unterroutine :" ;
-
- $MS{"EmbeddedFiles"} = " Eingebettete Dateien :" ;
- $MS{"BeginEndError"} = " Beg./Ende-Fehler in :" ;
- $MS{"SynonymEntries"} = " Synonymeintraege :" ;
- $MS{"SynonymErrors"} = " Fehlerhafte Eintraege :" ;
- $MS{"RegisterEntries"} = " Registereintraege :" ;
- $MS{"RegisterErrors"} = " Fehlerhafte Eintraege :" ;
- $MS{"PassedCommands"} = " Verarbeite Befehle :" ;
-
- $MS{"NOfDocuments"} = " Dokumentbloecke :" ;
- $MS{"NOfDefinitions"} = " Definitionsbloecke :" ;
- $MS{"NOfSkips"} = "Uebersprungene Bloecke :" ;
- $MS{"NOfSetups"} = " Kopierte setups :" ;
- $MS{"NOfTemplates"} = " Kopierte templates :" ;
- $MS{"NOfInfos"} = " Kopierte helpinfos :" ;
- $MS{"NOfFigures"} = " Verarbeitete Abb. :" ;
- $MS{"NOfBoxes"} = " Zu volle Boxen :" ;
- $MS{"NOfUnknown"} = " Unbekannt ... :" ;
-
- $MS{"InputFile"} = " Eingabedatei :" ;
- $MS{"OutputFile"} = " Ausgabedatei :" ;
- $MS{"FileType"} = " Dateityp :" ;
- $MS{"EpsFile"} = " eps-Datei :" ;
- $MS{"TifFile"} = " tif-Datei :" ;
- $MS{"MPFile"} = " metapost-Datei :" ;
-
- $MS{"Overfull"} = "zu voll" ;
- $MS{"Entries"} = "Eintraege" ;
- $MS{"References"} = "Referenzen" ;
-
- } # end of german section
-
-else
-
- { # begin of english section
-
- $MS{"ProcessingReferences"} = "processing commands, lists and registers" ;
- $MS{"GeneratingDocumentation"} = "preparing ConTeXt documentation file" ;
- $MS{"GeneratingSources"} = "generating ConTeXt source only file" ;
- $MS{"FilteringDefinitions"} = "filtering formal ConTeXt definitions" ;
- $MS{"CopyingTemplates"} = "copying TeXEdit quick key templates" ;
- $MS{"CopyingInformation"} = "copying TeXEdit help information" ;
- $MS{"GeneratingFigures"} = "generating figure directory file" ;
- $MS{"FilteringLogFile"} = "filtering log file" ;
-
- $MS{"SortingIJ"} = "sorting IJ under Y" ;
- $MS{"ConvertingHigh"} = "converting high ASCII values" ;
- $MS{"ProcessingQuotes"} = "handling accented characters" ;
- $MS{"ForcingFileType"} = "setting up filetype" ;
- $MS{"UsingTiff"} = "processing TIF files" ;
- $MS{"FilteringBoxes"} = "filtering overfull boxes" ;
- $MS{"ApplyingCriterium"} = "applying overfull criterium" ;
- $MS{"FilteringUnknown"} = "filtering unknown ..." ;
-
- $MS{"NoInputFile"} = "no input file given" ;
- $MS{"NoOutputFile"} = "no output file generated" ;
- $MS{"EmptyInputFile"} = "empty input file" ;
- $MS{"NotYetImplemented"} = "not yet available" ;
-
- $MS{"Action"} = " action :" ;
- $MS{"Option"} = " option :" ;
- $MS{"Error"} = " error :" ;
- $MS{"Remark"} = " remark :" ;
- $MS{"SystemCall"} = " system call :" ;
- $MS{"BadSystemCall"} = " bad system call :" ;
- $MS{"MissingSubroutine"} = " missing subroutine :" ;
-
- $MS{"EmbeddedFiles"} = " embedded files :" ;
- $MS{"BeginEndError"} = " b/e error in :" ;
- $MS{"SynonymEntries"} = " synonym entries :" ;
- $MS{"SynonymErrors"} = " bad entries :" ;
- $MS{"RegisterEntries"} = " register entries :" ;
- $MS{"RegisterErrors"} = " bad entries :" ;
- $MS{"PassedCommands"} = " passed commands :" ;
-
- $MS{"NOfDocuments"} = " document blocks :" ;
- $MS{"NOfDefinitions"} = " definition blocks :" ;
- $MS{"NOfSkips"} = " skipped blocks :" ;
- $MS{"NOfSetups"} = " copied setups :" ;
- $MS{"NOfTemplates"} = " copied templates :" ;
- $MS{"NOfInfos"} = " copied helpinfos :" ;
- $MS{"NOfFigures"} = " processed figures :" ;
- $MS{"NOfBoxes"} = " overfull boxes :" ;
- $MS{"NOfUnknown"} = " unknown ... :" ;
-
- $MS{"InputFile"} = " input file :" ;
- $MS{"OutputFile"} = " output file :" ;
- $MS{"FileType"} = " file type :" ;
- $MS{"EpsFile"} = " eps file :" ;
- $MS{"TifFile"} = " tif file :" ;
- $MS{"MPFile"} = " metapost file :" ;
-
- $MS{"Overfull"} = "overfull" ;
- $MS{"Entries"} = "entries" ;
- $MS{"References"} = "references" ;
-
- } # end of english section
-
-#D \stopcompressdefinitions
-
-#D Showing the banner (name and version of the program) and
-#D offering helpinfo is rather straightforward.
-
-sub ShowBanner
- { Report("\n$Program\n") }
-
-sub ShowHelpInfo
- { Report("HelpInfo") }
-
-#D The helpinfo is also saved in the hash table. This looks
-#D like a waste of energy and space, but the program gains
-#D readability.
-
-#D \startcompressdefinitions
-
-if ($Interface eq "nl")
-
- { # begin of dutch section
-
- $MS{"HelpInfo"} =
-
- " --references hulp file verwerken / tui->tuo \n" .
- " --ij : IJ als Y sorteren \n" .
- " --high : hoge ASCII waarden converteren \n" .
- " --quotes : quotes converteren \n" .
- " \n" .
- " --documents documentatie file genereren / tex->ted \n" .
- " --sources broncode file genereren / tex->tes \n" .
- " --setups ConTeXt definities filteren / tex->texutil.tus \n".
- " --templates TeXEdit templates filteren / tex->tud \n" .
- " --infos TeXEdit helpinfo filteren / tex->tud \n" .
- " \n" .
- " --figures eps figuren lijst genereren / eps->texutil.tuf \n".
- " --tiff : ook tif files verwerken \n" .
- " \n" .
- " --logfile logfile filteren / log->texutil.log \n" .
- " --box : overfull boxes controleren \n" .
- " --criterium : overfull criterium in pt \n" .
- " --unknown :onbekende ... controleren \n" ;
-
- } # end of dutch section
-
-elsif ($Interface eq "de")
-
- { # begin of german section
-
- $MS{"HelpInfo"} =
-
- " --references Verarbeiten der Hilfsdatei / tui->tuo \n" .
- " --ij : Sortiere IJ als Y \n" .
- " --high : Konvertiere hohe ASCII-Werte \n" .
- " --quotes : Konvertiere akzentuierte Buchstaben \n" .
- " \n" .
- " --documents Erstelle Dokumentationsdatei / tex->ted \n" .
- " --sources Erstelle reine Quelltextdateien / tex->tes \n" .
- " --setups Filtere ConTeXt-Definitionen / tex->texutil.tus\n" .
- " --templates Filtere TeXEdit-templates / tex->tud \n" .
- " --infos Filtere TeXEdit-helpinfo / tex->tud \n" .
- " \n" .
- " --figures Erstelle eps-Abbildungsliste / eps->texutil.tuf\n" .
- " --tiff : Verarbeite auch tif-Dateien \n" .
- " \n" .
- " --logfile Filtere log-Datei / log->texutil.log \n" .
- " --box : Ueberpruefe uebervolle Boxen \n" .
- " --criterium : Uebervoll-Kriterium in pt \n" .
- " --unknown : Ueberpruefe auf unbekannte ... \n" ;
-
- } # end of german section
-
-
-else
-
- { # begin of english section
-
- $MS{"HelpInfo"} =
-
- " --references process auxiliary file / tui->tuo \n" .
- " --ij : sort IJ as Y \n" .
- " --high : convert high ASCII values \n" .
- " --quotes : convert quotes characters \n" .
- " \n" .
- " --documents generate documentation file / tex->ted \n" .
- " --sources generate source only file / tex->tes \n" .
- " --setups filter ConTeXt definitions / tex->texutil.tus \n" .
- " --templates filter TeXEdit templates / tex->tud \n" .
- " --infos filter TeXEdit helpinfo / tex->tud \n" .
- " \n" .
- " --figures generate eps figure list / eps->texutil.tuf \n" .
- " --tiff : also process tif files \n" .
- " \n" .
- " --logfile filter logfile / log->texutil.log \n" .
- " --box : check overful boxes \n" .
- " --criterium : overfull criterium in pt \n" .
- " --unknown : check unknown ... \n" ;
-
- } # end of english section
-
-#D \stopcompressdefinitions
-
-#D In order to sort strings correctly, we have to sanitize
-#D them. This is especially needed when we include \TEX\
-#D commands, quotes characters and compound word placeholders.
-#D
-#D \startopsomming[opelkaar]
-#D \som \type{\name}: csnames are stripped
-#D \som \type{{}}: are removed
-#D \som \type{\"e}: and alike are translated into \type{"e} etc.
-#D \som \type{"e}: is translated into an \type{e} and \type{b} etc.
-#D \som \type{||}: becomes \type{-}
-#D \som \type{\-}: also becomes \type{-}
-#D \stopopsomming
-#D
-#D Of course other accented characters are handled too. The
-#D appended string is responsible for decent sorting.
-#D
-#D \startPL
-#D $TargetString = SanitizedString ( $SourceString ) ;
-#D \stopPL
-#D
-#D The sort order depends on the ordering in array
-#D \type{$ASCII}:
-
-$ASCII{"^"} = "a" ; $ASCII{'"'} = "b" ; $ASCII{"`"} = "c" ;
-$ASCII{"'"} = "d" ; $ASCII{"~"} = "e" ; $ASCII{","} = "f" ;
-
-sub SanitizedString
- { my ($string) = $_[0] ;
- if ($ProcessQuotes)
- { $string =~ s/\\([\^\"\`\'\~\,])/$1/gio ;
- $copied = $string ;
- $copied =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$ASCII{$1}/gio ;
- $string =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$2/gio ;
- $string=$string.$copied }
- $string =~ s/\\-|\|\|/\-/gio ;
- $string =~ s/\\[a-zA-Z]*| |\{|\}//gio ;
- return $string }
-
-#D This subroutine looks a bit complicated, which is due to the
-#D fact that we want to sort for instance an accented \type{e}
-#D after the plain \type{e}, so the imaginary words
-#D
-#D \starttypen
-#D eerste
-#D \"eerste
-#D \"e\"erste
-#D eerst\"e
-#D \stoptypen
-#D
-#D come out in an acceptable order.
-
-#D We also have to deal with the typical \TEX\ sequences with
-#D the double \type{^}'s, like \type{^^45}. These hexadecimal
-#D coded characters are just converted.
-#D
-#D \startPL
-#D $TargetString = HighConverted ( $SourceString ) ;
-#D \stopPL
-
-sub HighConverted
- { my ($string) = $_[0] ;
- $string =~ s/\^\^([a-f0-9][a-f0-9])/chr hex($1)/geo ;
- return $string }
-
-#D \extras
-#D {references}
-#D
-#D \CONTEXT\ can handle many lists, registers (indexes),
-#D tables of whatever and references. This data is collected
-#D in one pass and processed in a second one. In between,
-#D relevant data is saved in the file \type{\jobname.tui}.
-#D This file also holds some additional information concerning
-#D second pass optimizations.
-#D
-#D The main task of \TEXUTIL\ is to sort lists and registers
-#D (indexes). The results are stored in again one file called
-#D \type{\jobname.tuo}.
-#D
-#D Just for debugging purposes the nesting of files loaded
-#D during the \CONTEXT\ run is stored. Of course this only
-#D applies to files that are handled by the \CONTEXT\ file
-#D structuring commands (projects, products, components and
-#D environments).
-#D
-#D We have to handle the entries:
-#D
-#D \starttypen
-#D f b {test}
-#D f e {test}
-#D \stoptypen
-#D
-#D and only report some status info at the end of the run.
-
-sub InitializeFiles
- { $NOfFiles = 0 ;
- $NOfBadFiles = 0 }
-
-sub HandleFile
- { $RestOfLine =~ s/.*\{(.*)\}/$1/gio ;
- ++$Files{$RestOfLine} }
-
-sub FlushFiles
- { print TUO "%\n" . "% Files\n" . "%\n" ;
- foreach $File (keys %Files)
- { print TUO "% $File ($Files{$File})\n" }
- print TUO "%\n" ;
- $NOfFiles = keys %Files ;
- Report("EmbeddedFiles", $NOfFiles) ;
- foreach $File (keys %Files)
- { unless (($Files{$File} % 2) eq 0)
- { ++$NOfBadFiles ;
- Report("BeginEndError", $File) } } }
-
-#D Commands don't need a special treatment. They are just
-#D copied. Such commands are tagged by a \type{c}, like:
-#D
-#D \starttypen
-#D c \thisisutilityversion{year.month.day}
-#D c \twopassentry{class}{key}{value}
-#D c \mainreference{prefix}{entry}{pagenumber}{realpage}{tag}
-#D c \listentry{category}{tag}{number}{title}{pagenumber}{realpage}
-#D c \realnumberofpages{number}
-#D \stoptypen
-#D
-#D For historic reasons we check for the presense of the
-#D backslash.
-
-sub InitializeCommands
- { print TUO "%\n" . "% Commands\n" . "%\n" ;
- $NOfCommands = 0 }
-
-sub HandleCommand
- { ++$NOfCommands ;
- $RestOfLine =~ s/^\\//go ;
- print TUO "\\$RestOfLine\n" }
-
-sub FlushCommands
- { Report ("PassedCommands", $NOfCommands) }
-
-#D Synonyms are a sort of key||value pairs and are used for
-#D ordered lists like abbreviations and units.
-#D
-#D \starttypen
-#D s e {class}{sanitized key}{key}{associated data}
-#D \stoptypen
-#D
-#D The sorted lists are saved as (surprise):
-#D
-#D \starttypen
-#D \synonymentry{class}{sanitized key}{key}{associated data}
-#D \stoptypen
-
-sub InitializeSynonyms
- { $NOfSynonyms = 0 ;
- $NOfBadSynonyms = 0 }
-
-#M \definieersynoniem [testname] [testnames] [\testmeaning]
-#M
-#M \stelsynoniemenin [testname] [criterium=alles]
-
-#D Let's first make clear what we can expect. Synonym
-#D entries look like:
-#D
-#D \startbuffer
-#D \testname [alpha] {\sl alpha} {a greek letter a}
-#D \testname {alpha} {another a}
-#D \testname [Beta] {\kap{beta}} {a greek letter b}
-#D \testname {beta} {indeed another b}
-#D \testname {gamma} {something alike g}
-#D \testname {delta} {just a greek d}
-#D \stopbuffer
-#D
-#D \typebuffer
-#D
-#D This not that spectacular list is to be sorted according
-#D to the keys (names). \haalbuffer
-
-sub HandleSynonym
- { ++$NOfSynonyms ;
- ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ;
- ($Class, $Key, $Entry, $Meaning) = split(/} \{/, $RestOfLine) ;
- chop $Meaning ;
- $Class = substr $Class, 1 ;
- if ($Entry eq "")
- { ++$NOfBadSynonyms }
- else
- { $SynonymEntry[$NOfSynonyms] =
- $Class . $JOIN .
- $Key . $JOIN .
- $Entry . $JOIN .
- $Meaning ;
- $SynonymEntry[$NOfSynonyms+1] = "" ; } }
-
-#D Depending on the settings\voetnoot{One can call for
-#D all defined entries, call only the used ones, change
-#D layout, attach (funny) commands etc.} a list of
-#D {\em testnames} looks like:
-#D
-#D \plaatslijstmettestnames
-#D
-#D Watch the order in which these entries are sorted.
-
-$SynonymEntry[0] = ("") ; # TH: initalize
-
-sub FlushSynonyms
- { print TUO "%\n" . "% Synonyms\n" . "%\n" ;
- @SynonymEntry = sort @SynonymEntry ;
- $NOfSaneSynonyms = 0 ;
- for ($n=1; $n<=$NOfSynonyms; ++$n)
- { # check normally not needed
- if ($SynonymEntry[$n] ne $SynonymEntry[$n-1])
- { ($Class, $Key, $Entry, $Meaning) =
- split(/$JOIN/, $SynonymEntry[$n]) ;
- ++$NOfSaneSynonyms ;
- print TUO "\\synonymentry{$Class}{$Key}{$Entry}{$Meaning}\n" } }
- Report("SynonymEntries", $NOfSynonyms, "->", $NOfSaneSynonyms, "Entries") ;
- if ($NOfBadSynonyms>0)
- { Report("SynonymErrors", $NOfBadSynonyms) } }
-
-#D Register entries need a bit more care, especially when they
-#D are nested. In the near future we will also handle page
-#D ranges.
-#D
-#D \starttypen
-#D r e {class}{tag}{sanitized key}{key}{pagenumber}{realpage}
-#D r s {class}{tag}{sanitized key}{key}{string}{pagenumber}
-#D \stoptypen
-
-#D The first one is the normal entry, the second one concerns
-#D {\em see this or that} entries. Keys are sanitized, unless
-#D the user supplies a sanitized key. To save a lot of
-#D programming, all data concerning an entry is stored in one
-#D string. Subentries are specified as:
-#D
-#D \starttypen
-#D first&second&third
-#D first+second+third
-#D \stoptypen
-#D
-#D When these characters are needed for typesetting purposes, we
-#D can also use the first character to specify the separator:
-#D
-#D \starttypen
-#D &$x^2+y^2=r^2$
-#D +this \& that
-#D \stoptypen
-#D
-#D Subentries are first unpacked and next stored in a
-#D consistent way, which means that we can use both separators
-#D alongside each other. We leave it to the reader to sort
-#D out the dirty tricks.
-
-$SPLIT ="%%" ;
-$JOIN ="__" ;
-
-sub InitializeRegisters
- { $NOfEntries = 0 ;
- $NOfBadEntries = 0 }
-
-$ProcessType = "" ; # TH: initialize
-
-sub HandleRegister
- { ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ;
- ++$NOfEntries ;
- if ($SecondTag eq "s")
- { ($Class, $Location, $Key, $Entry, $SeeToo, $Page ) =
- split(/} \{/, $RestOfLine) ;
- chop $Page ;
- $Class = substr $Class, 1 ;
- $RealPage = 0 }
- else
- { ($Class, $Location, $Key, $Entry, $Page, $RealPage ) =
- split(/} \{/, $RestOfLine) ;
- chop $RealPage ;
- $Class = substr $Class, 1 ;
- $SeeToo = "" }
- if ($Key eq "")
- { $Key = SanitizedString($Entry) }
- if ($ProcessHigh)
- { $Key = HighConverted($Key) }
- $KeyTag = substr $Key, 0, 1 ;
- if ($KeyTag eq "&")
- { $Key =~ s/^\&//go ;
- $Key =~ s/([^\\])\&/$1$SPLIT/go }
- elsif ($KeyTag eq "+")
- { $Key =~ s/^\+//go ;
- $Key =~ s/([^\\])\+/$1$SPLIT/go }
- else
- { $Key =~ s/([^\\])\&/$1$SPLIT/go ;
- $Key =~ s/([^\\])\+/$1$SPLIT/go }
- $EntryTag = substr $Entry, 0, 1 ;
- if ($EntryTag eq "&")
- { $Entry =~ s/^\&//go ;
- $Entry =~ s/([^\\])\&/$1$SPLIT/go }
- elsif ($EntryTag eq "+")
- { $Entry =~ s/^\+//go ;
- $Entry =~ s/([^\\])\+/$1$SPLIT/go }
- else
- { $Entry =~ s/([^\\])\&/$1$SPLIT/go ;
- $Entry =~ s/([^\\])\+/$1$SPLIT/go }
- $Key =~ s/^([^a-zA-Z])/ $1/go ;
- if ($ProcessIJ)
- { $Key =~ s/ij/yy/go }
- $LCKey = lc $Key ;
- $RegisterEntry[$NOfEntries] =
- $Class . $JOIN .
- $LCKey . $JOIN .
- $Key . $JOIN .
- $Entry . $JOIN .
- $RealPage . $JOIN .
- $Location . $JOIN .
- $Page . $JOIN .
- $SeeToo }
-
-#M \definieerregister [testentry] [testentries]
-
-#D The previous routine deals with entries like:
-#D
-#D \startbuffer
-#D \testentry {alpha}
-#D \testentry {beta}
-#D \testentry {gamma}
-#D \testentry {gamma}
-#D \testentry {delta}
-#D \testentry {epsilon}
-#D \testentry {alpha+first}
-#D \testentry {alpha+second}
-#D \testentry {alpha+second}
-#D \testentry {alpha+third}
-#D \testentry {alpha+second+one}
-#D \testentry {alpha+second+one}
-#D \testentry {alpha+second+two}
-#D \testentry {alpha+second+three}
-#D \testentry {gamma+first+one}
-#D \testentry {gamma+second}
-#D \testentry {gamma+second+one}
-#D
-#D \testentry {alpha+fourth}
-#D \testentry {&alpha&fourth}
-#D \testentry {+alpha+fourth}
-#D
-#D \testentry [alpha+fourth] {alpha+fourth}
-#D \testentry [&alpha&fourth&one] {&alpha&fourth&one}
-#D \testentry [+alpha+fourth+two] {&alpha&fourth&two}
-#D
-#D \testentry {\kap{alpha}+fifth}
-#D \testentry {\kap{alpha}+f\'ifth}
-#D \testentry {\kap{alpha}+f"ifth}
-#D
-#D \testentry [&betaformula] {&$a^2+b^2=c^2$}
-#D
-#D \testentry {zeta \& more}
-#D \stopbuffer
-#D
-#D \typebuffer
-#D
-#D \haalbuffer After being sorted, these entries are
-#D turned into something \TEX\ using:
-
-$RegisterEntry[0] = ("") ; # TH: initialize
-
-sub FlushRegisters
- { print TUO "%\n" . "% Registers\n" . "%\n" ;
- @RegisterEntry = sort @RegisterEntry ;
- $NOfSaneEntries = 0 ;
- $NOfSanePages = 0 ;
- $LastPage = "" ;
- $LastRealPage = "" ;
- $AlfaClass = "" ;
- $Alfa = "" ;
- $PreviousA = "" ;
- $PreviousB = "" ;
- $PreviousC = "" ;
- $ActualA = "" ;
- $ActualB = "" ;
- $ActualC = "" ;
- for ($n=1 ; $n<=$NOfEntries ; ++$n)
- { ($Class, $LCKey, $Key, $Entry, $RealPage, $Location, $Page, $SeeToo) =
- split(/$JOIN/, $RegisterEntry[$n]) ;
- if (((lc substr $Key, 0, 1) ne lc $Alfa) or ($AlfaClass ne $Class))
- { $Alfa= lc substr $Key, 0, 1 ;
- $AlfaClass = $Class ;
- if ($Alfa ne " ")
- { print TUO "\\registerentry{$Class}{$Alfa}\n" } }
- ($ActualA, $ActualB, $ActualC ) =
- split(/$SPLIT/, $Entry, 3) ;
- unless ($ActualA) { $ActualA = "" } # TH: this would be an error
- unless ($ActualB) { $ActualB = "" } # TH: might become undef through split()
- unless ($ActualC) { $ActualC = "" } # TH: might become undef through split()
- if ($ActualA eq $PreviousA)
- { $ActualA = "" }
- else
- { $PreviousA = $ActualA ;
- $PreviousB = "" ;
- $PreviousC = "" }
- if ($ActualB eq $PreviousB)
- { $ActualB = "" }
- else
- { $PreviousB = $ActualB ;
- $PreviousC = "" }
- if ($ActualC eq $PreviousC)
- { $ActualC = "" }
- else
- { $PreviousC = $ActualC }
- $Copied = 0 ;
- if ($ActualA ne "")
- { print TUO "\\registerentrya{$Class}{$ActualA}\n" ;
- $Copied = 1 }
- if ($ActualB ne "")
- { print TUO "\\registerentryb{$Class}{$ActualB}\n" ;
- $Copied = 1 }
- if ($ActualC ne "")
- { print TUO "\\registerentryc{$Class}{$ActualC}\n" ;
- $Copied = 1 }
- if ($Copied)
- { $NOfSaneEntries++ }
- if ($RealPage eq 0)
- { print TUO "\\registersee{$Class}{$SeeToo}{$Page}\n" ;
- $LastPage = $Page ;
- $LastRealPage = $RealPage }
- elsif (($Copied) ||
- ! (($LastPage eq $Page) and ($LastRealPage eq $RealPage)))
- { print TUO "\\registerpage{$Class}{$Location}{$Page}{$RealPage}\n" ;
- ++$NOfSanePages ;
- $LastPage = $Page ;
- $LastRealPage = $RealPage } }
- Report("RegisterEntries", $NOfEntries, "->", $NOfSaneEntries, "Entries",
- $NOfSanePages, "References") ;
- if ($NOfBadEntries>0)
- { Report("RegisterErrors", $NOfBadEntries) } }
-
-#D As promised, we show the results:
-#D
-#D \plaatstestentry
-
-#D For debugging purposes we flush some status information. The
-#D faster machines become, the more important this section will
-#D be.
-
-sub FlushData
- { print TUO
- "% This Session\n" .
- "% \n" .
- "% embedded files : $NOfFiles ($NOfBadFiles errors)\n" .
- "% passed commands : $NOfCommands\n" .
- "% synonym entries : $NOfSynonyms ($NOfBadSynonyms errors)\n" .
- "% register entries : $NOfEntries ($NOfBadEntries errors)" }
-
-#D The functionallity described on the previous few pages is
-#D called upon in the main routine:
-
-sub HandleReferences
- { Report("Action", "ProcessingReferences") ;
- if ($ProcessIJ )
- { Report("Option", "SortingIJ") }
- if ($ProcessHigh)
- { Report("Option", "ConvertingHigh") }
- if ($ProcessQuotes)
- { Report("Option", "ProcessingQuotes") }
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { unless (open (TUI, "$InputFile.tui"))
- { Report("Error", "EmptyInputFile", $InputFile) }
- else
- { Report("InputFile", "$InputFile.tui" ) ;
- InitializeCommands ;
- InitializeRegisters ;
- InitializeSynonyms ;
- InitializeFiles ;
- $ValidOutput = 1 ;
- unlink "$InputFile.tmp" ;
- rename "$InputFile.tuo", "$InputFile.tmp" ;
- Report("OutputFile", "$InputFile.tuo" ) ;
- open (TUO, ">$InputFile.tuo") ;
- while ($SomeLine=<TUI>)
- { chop $SomeLine ;
- ($FirstTag, $RestOfLine) = split ' ', $SomeLine, 2 ;
- if ($FirstTag eq "c")
- { HandleCommand }
- elsif ($FirstTag eq "s")
- { HandleSynonym }
- elsif ($FirstTag eq "r")
- { HandleRegister }
- elsif ($FirstTag eq "f")
- { HandleFile }
- elsif ($FirstTag eq "q")
- { $ValidOutput = 0 ;
- last } }
- if ($ValidOutput)
- { FlushCommands ; # already done during pass
- FlushRegisters ;
- FlushSynonyms ;
- FlushFiles ;
- FlushData }
- else
- { unlink "$InputFile.tuo" ;
- rename "$InputFile.tmp", "$InputFile.tuo" ;
- Report ("Error", "NoOutputFile") } } } }
-
-#D \extras
-#D {documents}
-#D
-#D Documentation can be woven into a source file. The next
-#D routine generates a new, \TEX\ ready file with the
-#D documentation and source fragments properly tagged. The
-#D documentation is included as comment:
-#D
-#D \starttypen
-#D %D ...... some kind of documentation
-#D %M ...... macros needed for documenation
-#D %S B begin skipping
-#D %S E end skipping
-#D \stoptypen
-#D
-#D The most important tag is \type{%D}. Both \TEX\ and
-#D \METAPOST\ files use \type{%} as a comment chacacter, while
-#D \PERL\ uses \type{#}. Therefore \type{#D} is also handled.
-#D
-#D The generated file gets the suffix \type{ted} and is
-#D structured as:
-#D
-#D \starttypen
-#D \startmodule[type=suffix]
-#D \startdocumentation
-#D \stopdocumentation
-#D \startdefinition
-#D \stopdefinition
-#D \stopmodule
-#D \stoptypen
-#D
-#D Macro definitions specific to the documentation are not
-#D surrounded by start||stop commands. The suffix specifaction
-#D can be overruled at runtime, but defaults to the file
-#D extension. This specification can be used for language
-#D depended verbatim typesetting.
-
-sub HandleDocuments
- { Report("Action", "HandlingDocuments") ;
- if ($ProcessType ne "")
- { Report("Option", "ForcingFileType", $ProcessType) }
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { CheckInputFiles ($InputFile) ;
- foreach $FullName (@UserSuppliedFiles)
- { ($FileName, $FileSuffix) = split (/\./, $FullName, 2) ;
- unless ($FileSuffix)
- { $FileSuffix = "tex" }
- unless (-f "$FileName.$FileSuffix")
- { next }
- unless (open (TEX, "$FileName.$FileSuffix"))
- { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
- else
- { Report("InputFile", "$FileName.$FileSuffix") ;
- Report("OutputFile", "$FileName.ted") ;
- open (TED, ">$FileName.ted") ;
- $NOfDocuments = 0 ;
- $NOfDefinitions = 0 ;
- $NOfSkips = 0 ;
- $SkipLevel = 0 ;
- $InDocument = 0 ;
- $InDefinition = 0 ;
- if ($ProcessType eq "")
- { $FileType=lc $FileSuffix }
- else
- { $FileType=lc $ProcessType }
- Report("FileType", $FileType) ;
- print TED "\\startmodule[type=$FileType]\n" ;
- while (<TEX>) # TH: $SomeLines replaced by $_
- { chop;
- if (/^[%\#]D/)
- { if ($SkipLevel == 0)
- { if (length $_ < 3) # TH: empty #D comment
- {$SomeLine = "" }
- else # HH: added after that
- {$SomeLine = substr ($_, 3) }
- if ($InDocument)
- { print TED "$SomeLine\n" }
- else
- { if ($InDefinition)
- { print TED "\\stopdefinition\n" ;
- $InDefinition = 0 }
- unless ($InDocument)
- { print TED "\n\\startdocumentation\n" }
- print TED "$SomeLine\n" ;
- $InDocument = 1 ;
- ++$NOfDocuments } } }
- elsif (/^[%\#]M/)
- { if ($SkipLevel == 0)
- { $SomeLine = substr $_, 3 ;
- print TED "$SomeLine\n" } }
- elsif (/^[%\%]S B]/)
- { ++$SkipLevel ;
- ++$NOfSkips }
- elsif (/^[%\%]S E]/)
- { --$SkipLevel }
- elsif (/^[%\#]/)
- { }
- elsif ($SkipLevel == 0)
- { $InLocalDocument = $InDocument ;
- $SomeLine = $_ ;
- if ($InDocument)
- { print TED "\\stopdocumentation\n" ;
- $InDocument = 0 }
- if (($SomeLine eq "") && ($InDefinition))
- { print TED "\\stopdefinition\n" ;
- $InDefinition = 0 }
- else
- { if ($InDefinition)
- { print TED "$SomeLine\n" }
- elsif ($SomeLine ne "")
- { print TED "\n" . "\\startdefinition\n" ;
- $InDefinition = 1 ;
- unless ($InLocalDocument)
- { ++$NOfDefinitions }
- print TED "$SomeLine\n" } } } }
- if ($InDocument)
- { print TED "\\stopdocumentation\n" }
- if ($InDefinition)
- { print TED "\\stopdefinition\n" }
- print TED "\\stopmodule\n" ;
- close (TED) ;
- unless (($NOfDocuments) || ($NOfDefinitions))
- { unlink "$FileName.ted" }
- Report ("NOfDocuments", $NOfDocuments) ;
- Report ("NOfDefinitions", $NOfDefinitions) ;
- Report ("NOfSkips", $NOfSkips) } } } }
-
-#D \extras
-#D {sources}
-#D
-#D Documented sources can be stripped of documentation and
-#D comments, although at the current processing speeds the
-#D overhead of skipping the documentation at run time is
-#D neglectable. Only lines beginning with a \type{%} are
-#D stripped. The stripped files gets the suffix \type{tes}.
-
-sub HandleSources
- { Report("Action", "GeneratingSources") ;
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { CheckInputFiles ($InputFile) ;
- foreach $FullName (@UserSuppliedFiles)
- { ($FileName, $FileSuffix) = split (/\./, $FullName, 2) ;
- unless ($FileSuffix)
- { $FileSuffix = "tex" }
- unless (-f "$FileName.$FileSuffix")
- { next }
- unless (open (TEX, "$FileName.$FileSuffix"))
- { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
- else
- { Report("InputFile", "$FileName.$FileSuffix") ;
- Report("OutputFile", "$FileName.tes") ;
- open (TES, ">$FileName.tes") ;
- $EmptyLineDone = 1 ;
- $FirstCommentDone = 0 ;
- while ($SomeLine=<TEX>)
- { chop $SomeLine ;
- if ($SomeLine eq "")
- { unless ($FirstCommentDone)
- { $FirstCommentDone = 1 ;
- print TES
- "\n% further documentation is removed\n\n" ;
- $EmptyLineDone = 1 }
- unless ($EmptyLineDone)
- { print TES "\n" ;
- $EmptyLineDone = 1 } }
- elsif ($SomeLine =~ /^%/)
- { unless ($FirstCommentDone)
- { print TES "$SomeLine\n" ;
- $EmptyLineDone = 0 } }
- else
- { print TES "$SomeLine\n" ;
- $EmptyLineDone = 0 } }
- close (TES) ; # TH: repaired
- unless ($FirstCommentDone)
- { unlink "$FileName.tes" } } } } }
-
-#D \extras
-#D {setups}
-#D
-#D All \CONTEXT\ commands are specified in a compact format
-#D that can be used to generate quick reference tables and
-#D cards. Such setups are preceded by \type{%S}. The setups
-#D are collected in the file \type{texutil.tus}.
-
-sub HandleSetups
- { Report("Action", "FilteringDefinitions" ) ;
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { Report("OutputFile", "texutil.tus") ;
- open (TUS, ">texutil.tus") ; # this file is always reset!
- $NOfSetups = 0 ;
- CheckInputFiles ($InputFile) ;
- foreach $FullName (@UserSuppliedFiles)
- { ($FileName, $FileSuffix) = split (/\./, $FullName, 2) ;
- unless ($FileSuffix)
- { $FileSuffix = "tex" }
- unless (-f "$FileName.$FileSuffix")
- { next }
- unless (open (TEX, "$FileName.$FileSuffix"))
- { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
- else
- { Report("InputFile", "$FileName.$FileSuffix") ;
- print TUS "%\n" . "% File : $FileName.$FileSuffix\n" . "%\n" ;
- while ($SomeLine=<TEX>)
- { chomp ;
- chop $SomeLine ;
- ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) ;
- if ($Tag eq "%S")
- { ++$NOfSetups ;
- while ($Tag eq "%S")
- { print TUS "$RestOfLine\n" ;
- $SomeLine = <TEX> ;
- chomp ;
- chop $SomeLine ;
- ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
- print TUS "\n" } } } }
- close (TUS) ;
- unless ($NOfSetups)
- { unlink "texutil.tus" }
- Report("NOfSetups", $NOfSetups) } }
-
-#D \extras
-#D {templates, infos}
-#D
-#D From the beginning, the \CONTEXT\ source files contained
-#D helpinfo and key||templates for \TEXEDIT. In fact, for a
-#D long time, this was the only documentation present. More
-#D and more typeset (interactive) documentation is replacing
-#D this helpinfo, but we still support the traditional method.
-#D This information is formatted like:
-#D
-#D \starttypen
-#D %I n=Struts
-#D %I c=\strut,\setnostrut,\setstrut,\toonstruts
-#D %I
-#D %I text
-#D %I ....
-#D %P
-#D %I text
-#D %I ....
-#D \stoptypen
-#D
-#D Templates look like:
-#D
-#D \starttypen
-#D %T n=kap
-#D %T m=kap
-#D %T a=k
-#D %T
-#D %T \kap{?}
-#D \stoptypen
-#D
-#D The key||value pairs stand for {\em name}, {\em mnemonic},
-#D {\em key}. This information is copied to files with the
-#D extension \type{tud}.
-
-sub HandleEditorCues
- { if ($ProcessTemplates)
- { Report("Action", "CopyingTemplates" ) }
- if ($ProcessInfos)
- {Report("Action", "CopyingInformation" ) }
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { CheckInputFiles ($InputFile) ;
- foreach $FullName (@UserSuppliedFiles)
- { ($FileName, $FileSuffix) = split (/\./, $FullName, 2) ;
- if ($FileSuffix eq "")
- { $FileSuffix = "tex" }
- unless (-f "$FileName.$FileSuffix")
- { next }
- unless (open (TEX, "$FileName.$FileSuffix"))
- { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
- else
- { Report("InputFile", "$FileName.$FileSuffix") ;
- Report("OutputFile", "$FileName.tud") ;
- open (TUD, ">$FileName.tud") ;
- $NOfTemplates = 0 ;
- $NOfInfos = 0 ;
- while ($SomeLine=<TEX>)
- { chomp ;
- chop $SomeLine ;
- ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) ;
- if (($Tag eq "%T") && ($ProcessTemplates))
- { ++$NOfTemplates ;
- while ($Tag eq "%T")
- { print TUD "$SomeLine\n" ;
- $SomeLine = <TEX> ;
- chomp ;
- chop $SomeLine ;
- ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
- print TUD "\n" }
- elsif (($Tag eq "%I") && ($ProcessInfos))
- { ++$NOfInfos ;
- while (($Tag eq "%I") || ($Tag eq "%P"))
- { print TUD "$SomeLine\n" ;
- $SomeLine = <TEX> ;
- chomp ;
- chop $SomeLine ;
- ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
- print TUD "\n" } }
- close (TUD) ;
- unless (($NOfTemplates) || ($NOfInfos))
- { unlink "$FileName.tud" }
- if ($ProcessTemplates)
- { Report("NOfTemplates", $NOfTemplates) }
- if ($ProcessInfos)
- { Report("NOfInfos", $NOfInfos) } } } } }
-
-#D \extras
-#D {figures}
-#D
-#D Directories can be scanned for illustrations in \EPS\ or
-#D \TIFF\ format. The later type of graphics is prescanned by
-#D dedicated programs, whose data is used here. The resulting
-#D file \type{texutil.tuf} contains entries like:
-#D
-#D \starttypen
-#D \thisisfigureversion{year.month.day}
-#D \presetfigure[file][...specifications...]
-#D \stoptypen
-#D
-#D where the specifications are:
-#D
-#D \starttypen
-#D [e=suffix,x=xoffset,y=yoffset,w=width,h=height,t=title,c=creator,s=size]
-#D \stoptypen
-#D
-#D This data can be used when determining dimensions (although
-#D \CONTEXT\ is able to scan \EPS\ illustrations directly) and
-#D to generate directories of illustrations.
-
-$PTtoCM = 2.54/72.0 ;
-$INtoCM = 2.54 ;
-
-sub HandleEpsFigure
- { my ( $SuppliedFileName ) = @_ ;
- ($FileName, $FileSuffix) = split ( /\./, $SuppliedFileName, 2) ;
- $Temp = $FileSuffix;
- $Temp =~ s/[0-9]//go;
- if ($Temp eq "")
- { $EpsFileName = $SuppliedFileName;
- Report ( "MPFile", "$SuppliedFileName" ) }
- elsif (lc $FileSuffix ne "eps")
- { return }
- else
- { $EpsFileName = $FileName;
- Report ( "EpsFile", "$SuppliedFileName" ) }
- $HiResBBOX = "" ;
- $LoResBBOX = "" ;
- $EpsTitle = "" ;
- $EpsCreator = "" ;
- open ( EPS , $SuppliedFileName ) ;
- $EpsSize = -s EPS ;
- while ( $SomeLine = <EPS> )
- { chop ($SomeLine) ;
- unless ($HiResBBOX)
- { if ($SomeLine =~ /^%%BoundingBox:/i)
- { ($Tag, $LoResBBOX) = split (/ /, $SomeLine, 2) ;
- next }
- elsif ($SomeLine =~ /^%%HiResBoundingBox:/i)
- { ($Tag, $HiResBBOX) = split (/ /, $SomeLine, 2) ;
- next }
- elsif ($SomeLine =~ /^%%ExactBoundingBox:/i)
- { ($Tag, $HiResBBOX) = split (/ /, $SomeLine, 2) ;
- next } }
- if ($SomeLine =~ /^%%Creator:/i)
- { ($Tag, $EpsCreator) = split (/ /, $SomeLine, 2) }
- elsif ($SomeLine =~ /^%%Title:/i)
- { ($Tag, $EpsTitle) = split (/ /, $SomeLine, 2) } }
- if ($HiResBBOX)
- { $EpsBBOX = $HiResBBOX }
- else
- { $EpsBBOX = $LoResBBOX }
- if ($EpsBBOX)
- { ($LLX, $LLY, $URX, $URY, $RestOfLine) = split (/ /, $EpsBBOX, 5 ) ;
- $EpsHeight = ($URY-$LLY)*$PTtoCM ;
- $EpsWidth = ($URX-$LLX)*$PTtoCM ;
- $EpsXOffset = $LLX*$PTtoCM ;
- $EpsYOffset = $LLY*$PTtoCM ;
- $Figures[++$NOfFigures] =
- "\\presetfigure[$EpsFileName][e=eps" .
- (sprintf ",x=%5.3fcm,y=%5.3fcm", $EpsXOffset, $EpsYOffset) .
- (sprintf ",w=%5.3fcm,h=%5.3fcm", $EpsWidth, $EpsHeight) .
- ",t=$EpsTitle,c=$EpsCreator,s=$EpsSize]\n" } }
-
-sub HandleEpsFigures
- { if ($InputFile eq "")
- { $InputFile = "*.eps" }
- CheckInputFiles ($InputFile) ;
- foreach $FileName (@UserSuppliedFiles)
- { HandleEpsFigure ( $FileName ) } }
-
-#D Here we call the programs that generate information on
-#D the \TIFF\ files. The names of the programs are defined
-#D earlier.
-
-if ($ProcessTiff)
- { $FindTiffFigure = "" ;
- $UsedTiffProgram = "" ;
- unlink "tiffdata.tmp" ;
- foreach $TiffProgram (@TiffPrograms)
- { if ((system ("$TiffProgram *.tif > tiffdata.tmp") == 0)
- && (-s "tiffdata.tmp"))
- { $UsedTiffProgram = $TiffProgram ;
- $FindTiffFigure = "FindTiffFigure_$UsedTiffProgram" ;
- last } } }
-
-#D The scanning routines use filehandle \type{TMP} and call for
-#D \type{ReportTifFigure} with the arguments \type{Name},
-#D \type{Width} and \type{Height}.
-
-sub ReportTifFigure
- { my ($Name, $Width, $Height) = @_ ;
- $Name = lc $Name ;
- #
- # if ($InputFile ne "")
- # { $Ok = 0 ;
- # foreach $IFile (@UserSuppliedFiles)
- # { $Ok = ($Ok || ($IFile eq "$Name.tif" )) }
- # else
- # { $Ok = 1 }
- #
- $Ok = 1 ;
- #
- if ($Ok)
- { $Size = -s "$Name.tif" ;
- Report ( "TifFile", "$Name.tif") ;
- $Figures[++$NOfFigures] =
- "\\presetfigure[$Name][e=tif" .
- (sprintf ",w=%5.3fcm,h=%5.3fcm", $Width, $Height) .
- ",s=$Size]\n" } }
-
-sub HandleTifFigures
- { if ($ProcessTiff)
- { if (-s "tiffdata.tmp")
- { Report ( "SystemCall", "$UsedTiffProgram -> tiffdata.tmp" ) ;
- if ((defined &$FindTiffFigure) && (open(TMP, "tiffdata.tmp")))
- { &$FindTiffFigure }
- else
- { Report ( "MissingSubroutine", $FindTiffFigure ) } }
- else
- { Report ( "BadSystemCall", "@TiffPrograms" ) } } }
-
-#D The next few routines are program specific. Let's cross our
-#D fingers on the stability off their output. As one can
-#D see, we have to work a bit harder when we use \TIFFINFO\
-#D instead of \TIFFTAGS.
-
-sub FindTiffFigure_tiffinfo
- { while ( $TifName = <TMP> )
- { chomp ;
- chop $TifName ;
- if (($TifName =~ s/^(.*)\.tif\:.*/$1/i) &&
- ($SomeLineA = <TMP>) && ($SomeLineA = <TMP>) &&
- ($SomeLineA = <TMP>) && ($SomeLineB = <TMP>))
- { chop $SomeLineA ;
- $TifWidth = $SomeLineA ;
- $TifWidth =~ s/.*Image Width: (.*) .*/$1/i ;
- $TifHeight = $SomeLineA ;
- $TifHeight =~ s/.*Image Length: (.*).*/$1/i ;
- $TifWRes = $SomeLineB ;
- $TifWRes =~ s/.*Resolution: (.*)\,.*/$1/i ;
- $TifHRes = $SomeLineB ;
- $TifHRes =~ s/.*Resolution: .*\, (.*).*/$1/i ;
- $TifWidth = ($TifWidth/$TifWRes)*$INtoCM ;
- $TifHeight = ($TifHeight/$TifHRes)*$INtoCM ;
- ReportTifFigure ($TifName, $TifWidth, $TifHeight) } } }
-
-sub FindTiffFigure_tifftags
- { while ( $TifName = <TMP> )
- { chomp ;
- chop $TifName ;
- if (($TifName =~ s/.*\`(.*)\.tif\'.*/$1/i) &&
- ($SomeLine = <TMP>) && ($SomeLine = <TMP>))
- { chop $SomeLine ;
- $TifWidth = $SomeLine ;
- $TifWidth =~ s/.*\((.*) pt.*\((.*) pt.*/$1/ ;
- $TifHeight = $SomeLine ;
- $TifHeight =~ s/.*\((.*) pt.*\((.*) pt.*/$2/ ;
- $TifWidth = $TifWidth*$PTtoCM ;
- $TifHeight = $TifHeight*$PTtoCM ;
- ReportTifFigure ($TifName, $TifWidth, $TifHeight) } } }
-
-sub InitializeFigures
- { $NOfFigures = 0 }
-
-sub FlushFigures
- { $Figures = sort $Figures ;
- open ( TUF, ">texutil.tuf" ) ;
- print TUF "%\n" . "% Figures\n" . "%\n" ;
- print TUF "\\thisisfigureversion\{1996.06.01\}\n" . "%\n" ;
- for ($n=1 ; $n<=$NOfFigures ; ++$n)
- { print TUF $Figures[$n] }
- close (TUF) ;
- unless ($NOfFigures)
- { unlink "texutil.tuf" }
- Report ( "NOfFigures", $NOfFigures ) }
-
-sub HandleFigures
- { Report("Action", "GeneratingFigures" ) ;
- if ($ProcessTiff)
- { Report("Option", "UsingTiff") }
- InitializeFigures ;
- HandleEpsFigures ;
- HandleTifFigures ;
- FlushFigures }
-
-#D \extras
-#D {logfiles}
-#D
-#D This (poor man's) log file scanning routine filters
-#D overfull box messages from a log file (\type{\hbox},
-#D \type{\vbox} or both). The collected problems are saved
-#D in \type{texutil.log}. One can specify a selection
-#D criterium.
-#D
-#D \CONTEXT\ reports unknown entities. These can also be
-#D filtered. When using fast computers, or when processing
-#D files in batch, one has to rely on the log files and/or
-#D this filter.
-
-$Unknown = "onbekend|unknown|unbekant" ;
-
-sub FlushLogTopic
- { unless ($TopicFound)
- { $TopicFound = 1 ;
- print ALL "\n% File: $FileName.log\n\n" } }
-
-sub HandleLogFile
- { if ($ProcessBox)
- { Report("Option", "FilteringBoxes", "(\\vbox & \\hbox)") ;
- $Key = "[h|v]box" }
- elsif ($ProcessHBox)
- { Report("Option", "FilteringBoxes", "(\\hbox)") ;
- $Key = "hbox" ;
- $ProcessBox = 1 }
- elsif ($ProcessVBox)
- { Report("Option", "FilteringBoxes", "(\\vbox)") ;
- $Key = "vbox" ;
- $ProcessBox = 1 }
- if (($ProcessBox) && ($ProcessCriterium))
- { Report("Option", "ApplyingCriterium") }
- if ($ProcessUnknown)
- { Report("Option", "FilteringUnknown") }
- unless (($ProcessBox) || ($ProcessUnknown))
- { ShowHelpInfo ;
- return }
- Report("Action", "FilteringLogFile" ) ;
- if ($InputFile eq "")
- { Report("Error", "NoInputFile") }
- else
- { $NOfBoxes = 0 ;
- $NOfMatching = 0 ;
- $NOfUnknown = 0 ;
- Report("OutputFile", "texutil.log") ;
- CheckInputFiles ($InputFile) ;
- open ( ALL, ">texutil.log" ) ;
- foreach $FullName (@UserSuppliedFiles)
- { ($FileName, $FileSuffix) = split (/\./, $FullName, 2) ;
- if (! open (LOG, "$FileName.log"))
- { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
- elsif (-e "$FileName.tex")
- { $TopicFound = 0 ;
- Report("InputFile", "$FileName.log") ;
- while ($SomeLine=<LOG>)
- { chomp ;
- if (($ProcessBox) && ($SomeLine =~ /Overfull \\$Key/))
- { ++$NOfBoxes ;
- $SomePoints = $SomeLine ;
- $SomePoints =~ s/.*\((.*)pt.*/$1/ ;
- if ($SomePoints>=$ProcessCriterium)
- { ++$NOfMatching ;
- FlushLogTopic ;
- print ALL "$SomeLine" ;
- $SomeLine=<LOG> ;
- print ALL $SomeLine } }
- if (($ProcessUnknown) && ($SomeLine =~ /$Unknown/io))
- { ++$NOfUnknown ;
- FlushLogTopic ;
- print ALL "$SomeLine" } } } }
- close (ALL) ;
- unless (($NOfBoxes) ||($NOfUnknown))
- { unlink "texutil.log" }
- if ($ProcessBox)
- { Report ( "NOfBoxes" , "$NOfBoxes", "->", $NOfMatching, "Overfull") }
- if ($ProcessUnknown)
- { Report ( "NOfUnknown", "$NOfUnknown") } } }
-
-#D We're done! All this actions and options are organized in
-#D one large conditional:
-
- ShowBanner ;
-
-if ($UnknownOptions ) { ShowHelpInfo } # not yet done
-elsif ($ProcessReferences) { HandleReferences }
-elsif ($ProcessDocuments ) { HandleDocuments }
-elsif ($ProcessSources ) { HandleSources }
-elsif ($ProcessSetups ) { HandleSetups }
-elsif ($ProcessTemplates ) { HandleEditorCues }
-elsif ($ProcessInfos ) { HandleEditorCues }
-elsif ($ProcessFigures ) { HandleFigures }
-elsif ($ProcessLogFile ) { HandleLogFile }
-elsif ($ProcessHelp ) { ShowHelpInfo } # redundant
-else { ShowHelpInfo }
-
-#D So far.
+#!/usr/bin/perl
+#-w
+
+#D \module
+#D [ file=texutil.pl,
+#D version=1998.12.20,
+#D title=pre- and postprocessing utilities,
+#D subtitle=\TEXUTIL,
+#D author=Hans Hagen,
+#D date=\currentdate,
+#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+#C
+#C This script is part of the \CONTEXT\ macro||package and is
+#C therefore copyrighted by \PRAGMA. Non||commercial use is
+#C granted.
+
+# Thanks to Tobias Burnus for the german translations.
+# Thanks to Taco Hoekwater for making the file -w proof.
+# Thanks to Sebastan Rahtz for the eps to PDF method
+# Thanks to Alex Knowles and friend for the right JPG specs
+
+#D This is \TEXUTIL, a utility program (script) to be used
+#D alongside the \CONTEXT\ macro package. This \PERL\ script is
+#D derived from the \MODULA\ version and uses slightly better
+#D algoritms for sanitizing \TEX\ specific (sub|)|strings.
+#D
+#D This implementation has some features not found in the
+#D binary version, like scanning illustrations other than \EPS.
+#D I would suggest to keep an eye on the version number:
+
+$Program = "TeXUtil 6.7 - ConTeXt / PRAGMA ADE 1992-1998" ;
+
+#D By the way, this is my first \PERL\ script, which means
+#D that it will be improved as soon as I find new and/or more
+#D suitable solutions in the \PERL\ manuals. As can be seen in
+#D the definition of \type{$Program}, this program is part of
+#D the \CONTEXT\ suite, and therefore can communicate with the
+#D users in english as well as some other languages. One can
+#D set his favourite language by saying something like:
+
+#D \starttypen
+#D perl texutil.pl --int=de --fig *.eps *.tif *.pdf *.png *.jpg
+#D \stoptypen
+#D
+#D or simpler:
+#D
+#D \starttypen
+#D perl texutil.pl --fig *.*
+#D \stoptypen
+
+#D Of course one can also say \type{--interface=nl}, which
+#D happens to be my native language.
+
+#D I won't go into too much detail on the algoritms used.
+#D The next few pages show the functionality as reported by the
+#D helpinformation and controled by command line arguments
+#D and can serve as additional documentation.
+
+#D \TEXUTIL\ can handle different tasks; which one is active
+#D depends on the command line arguments. These are handled by
+#D a \PERL\ system module. This means that, at least for the
+#D moment, there is no external control as provided by the
+#D \PRAGMA\ environment system.
+
+use Getopt::Long ;
+#use File::DosGlob ;
+
+#D We don't want error messages and accept partial switches,
+#D which saves users some typing.
+
+$Getopt::Long::passthrough = 1 ; # no error message
+$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
+
+#D We also predefine the interface language and set a boolean
+#D that keeps track of unknown options. \voetnoot {This feature
+#D is still to be implemented.}
+
+$UserInterface = "en" ;
+$UnknownOptions = 0 ;
+
+#D Here come the options:
+
+&GetOptions
+ ("references" => \$ProcessReferences,
+ "ij" => \$ProcessIJ,
+ "high" => \$ProcessHigh,
+ "quotes" => \$ProcessQuotes,
+ "documents" => \$ProcessDocuments,
+ "type=s" => \$ProcessType,
+ "outputfile=s" => \$ProcessOutputFile,
+ "sources" => \$ProcessSources,
+ "setups" => \$ProcessSetups,
+ "templates" => \$ProcessTemplates,
+ "infos" => \$ProcessInfos,
+ "figures" => \$ProcessFigures,
+ "epspage" =>\$ProcessEpsPage,
+ "epstopdf" =>\$ProcessEpsToPdf,
+ "logfile" => \$ProcessLogFile,
+ "box" =>\$ProcessBox,
+ "hbox" =>\$ProcessHBox,
+ "vbox" =>\$ProcessVBox,
+ "criterium=f" =>\$ProcessCriterium,
+ "unknown" =>\$ProcessUnknown,
+ "help" => \$ProcessHelp,
+ "silent" => \$ProcessSilent,
+ "verbose" => \$ProcessVerbose,
+ "interface=s" => \$UserInterface) ;
+
+#D We need some hacks to suppress terminal output. This
+#D piece of code is based on page~193 of "Programming Perl".
+
+$ProgramLog = "texutil.log" ;
+
+sub RedirectTerminal
+ { open SAVEDSTDOUT, ">&STDOUT" ;
+ open STDOUT, ">$ProgramLog" ;
+ select STDOUT; $| = 1 }
+
+#D And, indeed:
+
+if ($ProcessSilent)
+ { RedirectTerminal }
+else
+ { $ProcessVerbose = 0 }
+
+#D We can temporary open the terminal channel.
+
+sub OpenTerminal
+ { close STDOUT ;
+ open STDOUT, ">&SAVEDSTDOUT" }
+
+sub CloseTerminal
+ { open SAVEDSTDOUT, ">&STDOUT" ;
+ open STDOUT, ">>$ProgramLog" ;
+ select STDOUT; $| = 1 }
+
+#D By default wildcards are expanded into a list. The
+#D subroutine below is therefore only needed when no file or
+#D pattern is given.
+
+$InputFile = "@ARGV" ; # niet waterdicht
+
+sub CheckInputFiles
+ { my ($UserSuppliedPath) = @_ ;
+ @UserSuppliedFiles = map { split " " } sort lc $UserSuppliedPath }
+
+sub CheckInputFiles
+ { @UserSuppliedFiles = glob @_[0] }
+
+#D The next subroutine takes care of the optional output
+#D filename (e.g. for figure dimensions).
+
+$ProcessOutputFile = "" ;
+
+sub SetOutputFile
+ { ($OutFilNam, $OutFilSuf) = split (/\./, $_[0], 2) ;
+ unless ($ProcessOutputFile eq "")
+ { $ProcessOutputFile .= "." . $OutFilSuf ;
+ ($OutFilNam, $OutFilSuf, $Rubish) = split (/\./, $ProcessOutputFile , 3)}
+ $OutputFile = $OutFilNam . "." . $OutFilSuf }
+
+#D Sometimes we need to split filenames.
+
+my ($FileName, $FileSuffix) = ("","") ;
+
+sub SplitFileName
+ { my $Rubish = "" ;
+ if ($_[0] =~ /^\.\//)
+ { ($Rubish, $FileName) = split ( /^\.\//, $_[0], 2) }
+ else
+ { $FileName = $_[0] }
+ return split (/\./, $FileName, 2) }
+
+#D In order to support multiple interfaces, we save the
+#D messages in a hash table. As a bonus we can get a quick
+#D overview of the messages we deal with.
+
+sub Report
+ { foreach $_ (@_)
+ { if (! defined $MS{$_})
+ { print $_ }
+ else
+ { print $MS{$_} }
+ print " " }
+ print "\n" }
+
+#D The messages are saved in a hash table and are called
+#D by name. This contents of this table depends on the
+#D interface language in use.
+
+#D \startcompressdefinitions
+
+if ($UserInterface eq "nl")
+
+ { # begin of dutch section
+
+ $MS{"ProcessingReferences"} = "commando's, lijsten en indexen verwerken" ;
+ $MS{"MergingReferences"} = "indexen samenvoegen" ;
+ $MS{"GeneratingDocumentation"} = "ConTeXt documentatie file voorbereiden" ;
+ $MS{"GeneratingSources"} = "ConTeXt broncode file genereren" ;
+ $MS{"FilteringDefinitions"} = "ConTeXt definities filteren" ;
+ $MS{"CopyingTemplates"} = "TeXEdit toets templates copieren" ;
+ $MS{"CopyingInformation"} = "TeXEdit help informatie copieren" ;
+ $MS{"GeneratingFigures"} = "figuur file genereren" ;
+ $MS{"FilteringLogFile"} = "log file filteren (poor mans version)" ;
+
+ $MS{"SortingIJ"} = "IJ sorteren onder Y" ;
+ $MS{"ConvertingHigh"} = "hoge ASCII waarden converteren" ;
+ $MS{"ProcessingQuotes"} = "characters met accenten afhandelen" ;
+ $MS{"ForcingFileType"} = "filetype instellen" ;
+ $MS{"UsingEps"} = "EPS files afhandelen" ;
+ $MS{"UsingTif"} = "TIF files afhandelen" ;
+ $MS{"UsingPdf"} = "PDF files afhandelen" ;
+ $MS{"UsingPng"} = "PNG files afhandelen" ;
+ $MS{"UsingJpg"} = "JPG files afhandelen" ;
+ $MS{"EpsToPdf"} = "EPS converteren naar PDF";
+ $MS{"EpsPage"} = "EPS pagina instellen";
+ $MS{"FilteringBoxes"} = "overfull boxes filteren" ;
+ $MS{"ApplyingCriterium"} = "criterium toepassen" ;
+ $MS{"FilteringUnknown"} = "onbekende ... filteren" ;
+
+ $MS{"NoInputFile"} = "geen invoer file opgegeven" ;
+ $MS{"NoOutputFile"} = "geen uitvoer file gegenereerd" ;
+ $MS{"EmptyInputFile"} = "lege invoer file" ;
+ $MS{"NotYetImplemented"} = "nog niet beschikbaar" ;
+
+ $MS{"Action"} = " actie :" ;
+ $MS{"Option"} = " optie :" ;
+ $MS{"Error"} = " fout :" ;
+ $MS{"Remark"} = " opmerking :" ;
+ $MS{"SystemCall"} = " systeemaanroep :" ;
+ $MS{"BadSystemCall"} = " foute systeemaanroep :" ;
+ $MS{"MissingSubroutine"} = " onbekende subroutine :" ;
+
+ $MS{"EmbeddedFiles"} = " gebruikte files :" ;
+ $MS{"BeginEndError"} = " b/e fout in :" ;
+ $MS{"SynonymEntries"} = " aantal synoniemen :" ;
+ $MS{"SynonymErrors"} = " fouten :" ;
+ $MS{"RegisterEntries"} = " aantal ingangen :" ;
+ $MS{"RegisterErrors"} = " fouten :" ;
+ $MS{"PassedCommands"} = " aantal commando's :" ;
+
+ $MS{"MultiPagePdfFile"} = " te veel pagina's :" ;
+ $MS{"MissingMediaBox"} = " geen mediabox :" ;
+ $MS{"MissingBoundingBox"} = " geen boundingbox :" ;
+
+ $MS{"NOfDocuments"} = " documentatie blokken :" ;
+ $MS{"NOfDefinitions"} = " definitie blokken :" ;
+ $MS{"NOfSkips"} = " overgeslagen blokken :" ;
+ $MS{"NOfSetups"} = " gecopieerde setups :" ;
+ $MS{"NOfTemplates"} = " gecopieerde templates :" ;
+ $MS{"NOfInfos"} = " gecopieerde helpinfos :" ;
+ $MS{"NOfFigures"} = " verwerkte figuren :" ;
+ $MS{"NOfBoxes"} = " te volle boxen :" ;
+ $MS{"NOfUnknown"} = " onbekende ... :" ;
+
+ $MS{"InputFile"} = " invoer file :" ;
+ $MS{"OutputFile"} = " outvoer file :" ;
+ $MS{"FileType"} = " type file :" ;
+ $MS{"EpsFile"} = " eps file :" ;
+ $MS{"PdfFile"} = " pdf file :" ;
+ $MS{"TifFile"} = " tif file :" ;
+ $MS{"PngFile"} = " png file :" ;
+ $MS{"JpgFile"} = " jpg file :" ;
+ $MS{"MPFile"} = " metapost file :" ;
+
+ $MS{"Overfull"} = "te vol" ;
+ $MS{"Entries"} = "ingangen" ;
+ $MS{"References"} = "verwijzingen" ;
+
+ } # end of dutch section
+
+elsif ($UserInterface eq "de")
+
+ { # begin of german section
+
+ $MS{"ProcessingReferences"} = "Verarbeiten der Befehle, Listen und Register" ;
+ $MS{"MergingReferences"} = "Register verschmelzen" ;
+ $MS{"GeneratingDocumentation"} = "Vorbereiten der ConTeXt-Dokumentationsdatei" ;
+ $MS{"GeneratingSources"} = "Erstellen einer nur Quelltext ConTeXt-Datei" ;
+ $MS{"FilteringDefinitions"} = "Filtern der ConTeXt-Definitionen" ;
+ $MS{"CopyingTemplates"} = "Kopieren der TeXEdit-Test-key-templates" ;
+ $MS{"CopyingInformation"} = "Kopieren der TeXEdit-Hilfsinformation" ;
+ $MS{"GeneratingFigures"} = "Erstellen einer Abb-Uebersichtsdatei" ;
+ $MS{"FilteringLogFile"} = "Filtern der log-Datei" ;
+
+ $MS{"SortingIJ"} = "Sortiere IJ nach Y" ;
+ $MS{"ConvertingHigh"} = "Konvertiere hohe ASCII-Werte" ;
+ $MS{"ProcessingQuotes"} = "Verarbeiten der Akzentzeichen" ;
+ $MS{"ForcingFileType"} = "Dateityp einstellen" ;
+ $MS{"UsingEps"} = "EPS-Dateien verarbeite" ;
+ $MS{"UsingTif"} = "TIF-Dateien verarbeite" ;
+ $MS{"UsingPdf"} = "PDF-Dateien verarbeite" ;
+ $MS{"UsingPng"} = "PNG-Dateien verarbeite" ;
+ $MS{"UsingJpg"} = "JPG-Dateien verarbeite" ;
+ $MS{"EpsToPdf"} = "convert EPS to PDF";
+ $MS{"EpsPage"} = "setup EPS page";
+
+ $MS{"FilteringBoxes"} = "Filtern der ueberfuellten Boxen" ;
+ $MS{"ApplyingCriterium"} = "Anwenden des uebervoll-Kriteriums" ;
+ $MS{"FilteringUnknown"} = "Filter unbekannt ..." ;
+
+ $MS{"NoInputFile"} = "Keine Eingabedatei angegeben" ;
+ $MS{"NoOutputFile"} = "Keine Ausgabedatei generiert" ;
+ $MS{"EmptyInputFile"} = "Leere Eingabedatei" ;
+ $MS{"NotYetImplemented"} = "Noch nicht verfuegbar" ;
+
+ $MS{"Action"} = " Aktion :" ;
+ $MS{"Option"} = " Option :" ;
+ $MS{"Error"} = " Fehler :" ;
+ $MS{"Remark"} = " Anmerkung :" ;
+ $MS{"SystemCall"} = " system call :" ;
+ $MS{"BadSystemCall"} = " bad system call :" ;
+ $MS{"MissingSubroutine"} = " missing subroutine :" ;
+ $MS{"SystemCall"} = " Systemaufruf :" ;
+ $MS{"BadSystemCall"} = " Fehlerhafter Aufruf :" ;
+ $MS{"MissingSubroutine"} = " Fehlende Unterroutine :" ;
+
+ $MS{"EmbeddedFiles"} = " Eingebettete Dateien :" ;
+ $MS{"BeginEndError"} = " Beg./Ende-Fehler in :" ;
+ $MS{"SynonymEntries"} = " Synonymeintraege :" ;
+ $MS{"SynonymErrors"} = " Fehlerhafte Eintraege :" ;
+ $MS{"RegisterEntries"} = " Registereintraege :" ;
+ $MS{"RegisterErrors"} = " Fehlerhafte Eintraege :" ;
+ $MS{"PassedCommands"} = " Verarbeite Befehle :" ;
+
+ $MS{"MultiPagePdfFile"} = " zu viele Seiten :" ;
+ $MS{"MissingMediaBox"} = " fehlende mediabox :" ;
+ $MS{"MissingBoundingBox"} = " fehlende boundingbox :" ;
+
+ $MS{"NOfDocuments"} = " Dokumentbloecke :" ;
+ $MS{"NOfDefinitions"} = " Definitionsbloecke :" ;
+ $MS{"NOfSkips"} = "Uebersprungene Bloecke :" ;
+ $MS{"NOfSetups"} = " Kopierte setups :" ;
+ $MS{"NOfTemplates"} = " Kopierte templates :" ;
+ $MS{"NOfInfos"} = " Kopierte helpinfos :" ;
+ $MS{"NOfFigures"} = " Verarbeitete Abb. :" ;
+ $MS{"NOfBoxes"} = " Zu volle Boxen :" ;
+ $MS{"NOfUnknown"} = " Unbekannt ... :" ;
+
+ $MS{"InputFile"} = " Eingabedatei :" ;
+ $MS{"OutputFile"} = " Ausgabedatei :" ;
+ $MS{"FileType"} = " Dateityp :" ;
+ $MS{"EpsFile"} = " eps-Datei :" ;
+ $MS{"PdfFile"} = " pdf-Datei :" ;
+ $MS{"TifFile"} = " tif-Datei :" ;
+ $MS{"PngFile"} = " png-Datei :" ;
+ $MS{"JpgFile"} = " jpg-Datei :" ;
+ $MS{"MPFile"} = " metapost-Datei :" ;
+
+ $MS{"Overfull"} = "zu voll" ;
+ $MS{"Entries"} = "Eintraege" ;
+ $MS{"References"} = "Referenzen" ;
+
+ } # end of german section
+
+else
+
+ { # begin of english section
+
+ $MS{"ProcessingReferences"} = "processing commands, lists and registers" ;
+ $MS{"MergingReferences"} = "merging registers" ;
+ $MS{"GeneratingDocumentation"} = "preparing ConTeXt documentation file" ;
+ $MS{"GeneratingSources"} = "generating ConTeXt source only file" ;
+ $MS{"FilteringDefinitions"} = "filtering formal ConTeXt definitions" ;
+ $MS{"CopyingTemplates"} = "copying TeXEdit quick key templates" ;
+ $MS{"CopyingInformation"} = "copying TeXEdit help information" ;
+ $MS{"GeneratingFigures"} = "generating figure directory file" ;
+ $MS{"FilteringLogFile"} = "filtering log file" ;
+
+ $MS{"SortingIJ"} = "sorting IJ under Y" ;
+ $MS{"ConvertingHigh"} = "converting high ASCII values" ;
+ $MS{"ProcessingQuotes"} = "handling accented characters" ;
+ $MS{"ForcingFileType"} = "setting up filetype" ;
+ $MS{"UsingEps"} = "processing EPS-file" ;
+ $MS{"UsingTif"} = "processing TIF-file" ;
+ $MS{"UsingPdf"} = "processing PDF-file" ;
+ $MS{"UsingPng"} = "processing PNG-file" ;
+ $MS{"UsingJpg"} = "processing JPG-file" ;
+ $MS{"EpsToPdf"} = "convert EPS to PDF";
+ $MS{"EpsPage"} = "setup EPS page";
+
+ $MS{"FilteringBoxes"} = "filtering overfull boxes" ;
+ $MS{"ApplyingCriterium"} = "applying overfull criterium" ;
+ $MS{"FilteringUnknown"} = "filtering unknown ..." ;
+
+ $MS{"NoInputFile"} = "no input file given" ;
+ $MS{"NoOutputFile"} = "no output file generated" ;
+ $MS{"EmptyInputFile"} = "empty input file" ;
+ $MS{"NotYetImplemented"} = "not yet available" ;
+
+ $MS{"Action"} = " action :" ;
+ $MS{"Option"} = " option :" ;
+ $MS{"Error"} = " error :" ;
+ $MS{"Remark"} = " remark :" ;
+ $MS{"SystemCall"} = " system call :" ;
+ $MS{"BadSystemCall"} = " bad system call :" ;
+ $MS{"MissingSubroutine"} = " missing subroutine :" ;
+
+ $MS{"EmbeddedFiles"} = " embedded files :" ;
+ $MS{"BeginEndError"} = " b/e error in :" ;
+ $MS{"SynonymEntries"} = " synonym entries :" ;
+ $MS{"SynonymErrors"} = " bad entries :" ;
+ $MS{"RegisterEntries"} = " register entries :" ;
+ $MS{"RegisterErrors"} = " bad entries :" ;
+ $MS{"PassedCommands"} = " passed commands :" ;
+
+ $MS{"MultiPagePdfFile"} = " too many pages :" ;
+ $MS{"MissingMediaBox"} = " missing mediabox :" ;
+ $MS{"MissingBoundingBox"} = " missing boundingbox :" ;
+
+ $MS{"NOfDocuments"} = " document blocks :" ;
+ $MS{"NOfDefinitions"} = " definition blocks :" ;
+ $MS{"NOfSkips"} = " skipped blocks :" ;
+ $MS{"NOfSetups"} = " copied setups :" ;
+ $MS{"NOfTemplates"} = " copied templates :" ;
+ $MS{"NOfInfos"} = " copied helpinfos :" ;
+ $MS{"NOfFigures"} = " processed figures :" ;
+ $MS{"NOfBoxes"} = " overfull boxes :" ;
+ $MS{"NOfUnknown"} = " unknown ... :" ;
+
+ $MS{"InputFile"} = " input file :" ;
+ $MS{"OutputFile"} = " output file :" ;
+ $MS{"FileType"} = " file type :" ;
+ $MS{"EpsFile"} = " eps file :" ;
+ $MS{"PdfFile"} = " pdf file :" ;
+ $MS{"TifFile"} = " tif file :" ;
+ $MS{"PngFile"} = " png file :" ;
+ $MS{"JpgFile"} = " jpg file :" ;
+ $MS{"MPFile"} = " metapost file :" ;
+
+ $MS{"Overfull"} = "overfull" ;
+ $MS{"Entries"} = "entries" ;
+ $MS{"References"} = "references" ;
+
+ } # end of english section
+
+#D \stopcompressdefinitions
+
+#D Showing the banner (name and version of the program) and
+#D offering helpinfo is rather straightforward.
+
+sub ShowBanner
+ { Report("\n $Program\n") }
+
+sub ShowHelpInfo
+ { Report("HelpInfo") }
+
+#D The helpinfo is also saved in the hash table. This looks
+#D like a waste of energy and space, but the program gains
+#D readability.
+
+#D \startcompressdefinitions
+
+if ($UserInterface eq "nl")
+
+ { # begin of dutch section
+
+ $MS{"HelpInfo"} =
+
+" --references hulp file verwerken / tui->tuo \n" .
+" --ij : IJ als Y sorteren \n" .
+" --high : hoge ASCII waarden converteren \n" .
+" --quotes : quotes converteren \n" .
+" \n" .
+" --documents documentatie file genereren / tex->ted \n" .
+" --sources broncode file genereren / tex->tes \n" .
+" --setups ConTeXt definities filteren / tex->texutil.tus \n" .
+" --templates TeXEdit templates filteren / tex->tud \n" .
+" --infos TeXEdit helpinfo filteren / tex->tud \n" .
+" \n" .
+" --figures eps figuren lijst genereren / *->texutil.tuf \n" .
+" --epspage : voorbereiden voor pdf \n" .
+" --epstopdf : omzetten naar pdf \n" .
+" \n" .
+" --logfile logfile filteren / log->$ProgramLog \n" .
+" --box : overfull boxes controleren \n" .
+" --criterium : overfull criterium in pt \n" .
+" --unknown :onbekende ... controleren \n" ;
+
+ } # end of dutch section
+
+elsif ($UserInterface eq "de")
+
+ { # begin of german section
+
+ $MS{"HelpInfo"} =
+
+" --references Verarbeiten der Hilfsdatei / tui->tuo \n" .
+" --ij : Sortiere IJ als Y \n" .
+" --high : Konvertiere hohe ASCII-Werte \n" .
+" --quotes : Konvertiere akzentuierte Buchstaben \n" .
+" \n" .
+" --documents Erstelle Dokumentationsdatei / tex->ted \n" .
+" --sources Erstelle reine Quelltextdateien / tex->tes \n" .
+" --setups Filtere ConTeXt-Definitionen / tex->texutil.tus\n" .
+" --templates Filtere TeXEdit-templates / tex->tud \n" .
+" --infos Filtere TeXEdit-helpinfo / tex->tud \n" .
+" \n" .
+" --figures Erstelle eps-Abbildungsliste / *->texutil.tuf \n" .
+" --epspage : Bereite fuer pdf vor \n" .
+" --epstopdf : Konvertiere zu pdf \n" .
+" \n" .
+" --logfile Filtere log-Datei / log->$ProgramLog \n" .
+" --box : Ueberpruefe uebervolle Boxen \n" .
+" --criterium : Uebervoll-Kriterium in pt \n" .
+" --unknown : Ueberpruefe auf unbekannte ... \n" ;
+
+ } # end of german section
+
+
+else
+
+ { # begin of english section
+
+ $MS{"HelpInfo"} =
+
+" --references process auxiliary file / tui->tuo \n" .
+" --ij : sort IJ as Y \n" .
+" --high : convert high ASCII values \n" .
+" --quotes : convert quotes characters \n" .
+" \n" .
+" --documents generate documentation file / tex->ted \n" .
+" --sources generate source only file / tex->tes \n" .
+" --setups filter ConTeXt definitions / tex->texutil.tus \n" .
+" --templates filter TeXEdit templates / tex->tud \n" .
+" --infos filter TeXEdit helpinfo / tex->tud \n" .
+" \n" .
+" --figures generate eps figure list / *->texutil.tuf \n" .
+" --epspage : prepare for pdf \n" .
+" --epstopdf : convert to pdf \n" .
+" \n" .
+" --logfile filter logfile / log->$ProgramLog \n" .
+" --box : check overful boxes \n" .
+" --criterium : overfull criterium in pt \n" .
+" --unknown : check unknown ... \n" ;
+
+ } # end of english section
+
+#D \stopcompressdefinitions
+
+#D In order to sort strings correctly, we have to sanitize
+#D them. This is especially needed when we include \TEX\
+#D commands, quotes characters and compound word placeholders.
+#D
+#D \startopsomming[opelkaar]
+#D \som \type{\name}: csnames are stripped
+#D \som \type{{}}: are removed
+#D \som \type{\"e}: and alike are translated into \type{"e} etc.
+#D \som \type{"e}: is translated into an \type{e} and \type{b} etc.
+#D \som \type{||}: becomes \type{-}
+#D \som \type{\-}: also becomes \type{-}
+#D \stopopsomming
+#D
+#D Of course other accented characters are handled too. The
+#D appended string is responsible for decent sorting.
+#D
+#D \startPL
+#D $TargetString = SanitizedString ( $SourceString ) ;
+#D \stopPL
+#D
+#D The sort order depends on the ordering in array
+#D \type{$ASCII}:
+
+$ASCII{"^"} = "a" ; $ASCII{'"'} = "b" ; $ASCII{"`"} = "c" ;
+$ASCII{"'"} = "d" ; $ASCII{"~"} = "e" ; $ASCII{","} = "f" ;
+
+sub SanitizedString
+ { my ($string) = $_[0] ;
+ if ($ProcessQuotes)
+ { $string =~ s/\\([\^\"\`\'\~\,])/$1/gio ;
+ $copied = $string ;
+ $copied =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$ASCII{$1}/gio ;
+ $string =~ s/([\^\"\`\'\~\,])([a-zA-Z])/$2/gio ;
+ $string=$string.$copied }
+ $string =~ s/\\-|\|\|/\-/gio ;
+ $string =~ s/\\[a-zA-Z]*| |\{|\}//gio ;
+ return $string }
+
+#D This subroutine looks a bit complicated, which is due to the
+#D fact that we want to sort for instance an accented \type{e}
+#D after the plain \type{e}, so the imaginary words
+#D
+#D \starttypen
+#D eerste
+#D \"eerste
+#D \"e\"erste
+#D eerst\"e
+#D \stoptypen
+#D
+#D come out in an acceptable order.
+
+#D We also have to deal with the typical \TEX\ sequences with
+#D the double \type{^}'s, like \type{^^45}. These hexadecimal
+#D coded characters are just converted.
+#D
+#D \startPL
+#D $TargetString = HighConverted ( $SourceString ) ;
+#D \stopPL
+
+sub HighConverted
+ { my ($string) = $_[0] ;
+ $string =~ s/\^\^([a-f0-9][a-f0-9])/chr hex($1)/geo ;
+ return $string }
+
+#D \extras
+#D {references}
+#D
+#D \CONTEXT\ can handle many lists, registers (indexes),
+#D tables of whatever and references. This data is collected
+#D in one pass and processed in a second one. In between,
+#D relevant data is saved in the file \type{\jobname.tui}.
+#D This file also holds some additional information concerning
+#D second pass optimizations.
+#D
+#D The main task of \TEXUTIL\ is to sort lists and registers
+#D (indexes). The results are stored in again one file called
+#D \type{\jobname.tuo}.
+#D
+#D Just for debugging purposes the nesting of files loaded
+#D during the \CONTEXT\ run is stored. Of course this only
+#D applies to files that are handled by the \CONTEXT\ file
+#D structuring commands (projects, products, components and
+#D environments).
+#D
+#D We have to handle the entries:
+#D
+#D \starttypen
+#D f b {test}
+#D f e {test}
+#D \stoptypen
+#D
+#D and only report some status info at the end of the run.
+
+sub InitializeFiles
+ { $NOfFiles = 0 ;
+ $NOfBadFiles = 0 }
+
+sub HandleFile
+ { $RestOfLine =~ s/.*\{(.*)\}/$1/gio ;
+ ++$Files{$RestOfLine} }
+
+sub FlushFiles
+ { print TUO "%\n" . "% $Program / Files\n" . "%\n" ;
+ foreach $File (keys %Files)
+ { print TUO "% $File ($Files{$File})\n" }
+ print TUO "%\n" ;
+ $NOfFiles = keys %Files ;
+ Report("EmbeddedFiles", $NOfFiles) ;
+ foreach $File (keys %Files)
+ { unless (($Files{$File} % 2) eq 0)
+ { ++$NOfBadFiles ;
+ Report("BeginEndError", $File) } } }
+
+#D Commands don't need a special treatment. They are just
+#D copied. Such commands are tagged by a \type{c}, like:
+#D
+#D \starttypen
+#D c \thisisutilityversion{year.month.day}
+#D c \twopassentry{class}{key}{value}
+#D c \mainreference{prefix}{entry}{pagenumber}{realpage}{tag}
+#D c \listentry{category}{tag}{number}{title}{pagenumber}{realpage}
+#D c \initializevariable\realnumberofpages{number}
+#D \stoptypen
+#D
+#D For historic reasons we check for the presense of the
+#D backslash.
+
+sub InitializeCommands
+ { print TUO "%\n" . "% $Program / Commands\n" . "%\n" ;
+ $NOfCommands = 0 }
+
+sub HandleCommand
+ { ++$NOfCommands ;
+ $RestOfLine =~ s/^\\//go ;
+ print TUO "\\$RestOfLine\n" }
+
+sub FlushCommands
+ { Report ("PassedCommands", $NOfCommands) }
+
+#D Synonyms are a sort of key||value pairs and are used for
+#D ordered lists like abbreviations and units.
+#D
+#D \starttypen
+#D s e {class}{sanitized key}{key}{associated data}
+#D \stoptypen
+#D
+#D The sorted lists are saved as (surprise):
+#D
+#D \starttypen
+#D \synonymentry{class}{sanitized key}{key}{associated data}
+#D \stoptypen
+
+sub InitializeSynonyms
+ { $NOfSynonyms = 0 ;
+ $NOfBadSynonyms = 0 }
+
+#M \definieersynoniem [testname] [testnames] [\testmeaning]
+#M
+#M \stelsynoniemenin [testname] [criterium=alles]
+
+#D Let's first make clear what we can expect. Synonym
+#D entries look like:
+#D
+#D \startbuffer
+#D \testname [alpha] {\sl alpha} {a greek letter a}
+#D \testname {alpha} {another a}
+#D \testname [Beta] {\kap{beta}} {a greek letter b}
+#D \testname {beta} {indeed another b}
+#D \testname {gamma} {something alike g}
+#D \testname {delta} {just a greek d}
+#D \stopbuffer
+#D
+#D \typebuffer
+#D
+#D This not that spectacular list is to be sorted according
+#D to the keys (names). \haalbuffer
+
+sub HandleSynonym
+ { ++$NOfSynonyms ;
+ ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ;
+ ($Class, $Key, $Entry, $Meaning) = split(/} \{/, $RestOfLine) ;
+ chop $Meaning ;
+ $Class = substr $Class, 1 ;
+ if ($Entry eq "")
+ { ++$NOfBadSynonyms }
+ else
+ { $SynonymEntry[$NOfSynonyms] =
+ $Class . $JOIN .
+ $Key . $JOIN .
+ $Entry . $JOIN .
+ $Meaning } }
+
+#D Depending on the settings\voetnoot{One can call for
+#D all defined entries, call only the used ones, change
+#D layout, attach (funny) commands etc.} a list of
+#D {\em testnames} looks like:
+#D
+#D \plaatslijstmettestnames
+#D
+#D Watch the order in which these entries are sorted.
+
+sub FlushSynonyms
+ { print TUO "%\n" . "% $Program / Synonyms\n" . "%\n" ;
+ @SynonymEntry = sort { lc($a) cmp lc($b) } @SynonymEntry ;
+ $NOfSaneSynonyms = 0 ;
+ for ($n=1; $n<=$NOfSynonyms; $n++)
+ { # check normally not needed
+ if (($n==1)||($SynonymEntry[$n] ne $SynonymEntry[$n-1]))
+ { ($Class, $Key, $Entry, $Meaning) =
+ split(/$JOIN/, $SynonymEntry[$n]) ;
+ ++$NOfSaneSynonyms ;
+ print TUO "\\synonymentry{$Class}{$Key}{$Entry}{$Meaning}\n" } }
+ Report("SynonymEntries", $NOfSynonyms, "->", $NOfSaneSynonyms, "Entries") ;
+ if ($NOfBadSynonyms>0)
+ { Report("SynonymErrors", $NOfBadSynonyms) } }
+
+#D Register entries need a bit more care, especially when they
+#D are nested. In the near future we will also handle page
+#D ranges.
+#D
+#D \starttypen
+#D r e {class}{tag}{sanitized key}{key}{pagenumber}{realpage}
+#D r s {class}{tag}{sanitized key}{key}{string}{pagenumber}
+#D r r {class}{tag}{sanitized key}{key}{string}{pagenumber}
+#D \stoptypen
+#D
+#D The last one indicates the start of a range.
+
+#D The first one is the normal entry, the second one concerns
+#D {\em see this or that} entries. Keys are sanitized, unless
+#D the user supplies a sanitized key. To save a lot of
+#D programming, all data concerning an entry is stored in one
+#D string. Subentries are specified as:
+#D
+#D \starttypen
+#D first&second&third
+#D first+second+third
+#D \stoptypen
+#D
+#D When these characters are needed for typesetting purposes, we
+#D can also use the first character to specify the separator:
+#D
+#D \starttypen
+#D &$x^2+y^2=r^2$
+#D +this \& that
+#D \stoptypen
+#D
+#D Subentries are first unpacked and next stored in a
+#D consistent way, which means that we can use both separators
+#D alongside each other. We leave it to the reader to sort
+#D out the dirty tricks.
+
+$SPLIT ="%%" ;
+$JOIN ="__" ;
+
+sub InitializeRegisters
+ { $NOfEntries = 0 ;
+ $NOfBadEntries = 0 }
+
+$ProcessType = "" ;
+
+$RegStat{"f"} = 1 ;
+$RegStat{"e"} = 2 ; # end up between from and to
+$RegStat{"t"} = 3 ;
+$RegStat{"s"} = 4 ;
+
+sub HandleRegister
+ { ($SecondTag, $RestOfLine) = split(/ /, $RestOfLine, 2) ;
+ ++$NOfEntries ;
+ if ($SecondTag eq "s")
+ { ($Class, $Location, $Key, $Entry, $SeeToo, $Page ) =
+ split(/} \{/, $RestOfLine) ;
+ chop $Page ;
+ $Class = substr $Class, 1 ;
+ $RealPage = 0 }
+ else
+ { ($Class, $Location, $Key, $Entry, $Page, $RealPage ) =
+ split(/} \{/, $RestOfLine) ;
+ chop $RealPage ;
+ $Class = substr $Class, 1 ;
+ $SeeToo = "" }
+#
+$_ = $Key ;
+if (/\:\:/)
+ { ($PageHow,$Key) = split (/\:\:/) }
+else
+ { $PageHow = "" }
+$_ = $Entry ;
+if (/\:\:/)
+ { ($TextHow,$Entry) = split (/\:\:/) }
+else
+ { $TextHow = "" }
+#
+ if ($Key eq "")
+ { $Key = SanitizedString($Entry) }
+ if ($ProcessHigh)
+ { $Key = HighConverted($Key) }
+ $KeyTag = substr $Key, 0, 1 ;
+ if ($KeyTag eq "&")
+ { $Key =~ s/^\&//go ;
+ $Key =~ s/([^\\])\&/$1$SPLIT/go }
+ elsif ($KeyTag eq "+")
+ { $Key =~ s/^\+//go ;
+ $Key =~ s/([^\\])\+/$1$SPLIT/go }
+ else
+ { $Key =~ s/([^\\])\&/$1$SPLIT/go ;
+ $Key =~ s/([^\\])\+/$1$SPLIT/go }
+ $Key .= " " ; # so, "Word" comes for "Word Another Word"
+ $EntryTag = substr $Entry, 0, 1 ;
+ if ($EntryTag eq "&")
+ { $Entry =~ s/^\&//go ;
+ $Entry =~ s/([^\\])\&/$1$SPLIT/go }
+ elsif ($EntryTag eq "+")
+ { $Entry =~ s/^\+//go ;
+ $Entry =~ s/([^\\])\+/$1$SPLIT/go }
+ elsif ($KeyTag eq "&")
+ { $Entry =~ s/([^\\])\&/$1$SPLIT/go }
+ elsif ($KeyTag eq "+")
+ { $Entry =~ s/([^\\])\+/$1$SPLIT/go }
+ else
+ { $Entry =~ s/([^\\])\&/$1$SPLIT/go ;
+ $Entry =~ s/([^\\])\+/$1$SPLIT/go }
+ $Key =~ s/^([^a-zA-Z])/ $1/go ;
+ if ($ProcessIJ)
+ { $Key =~ s/ij/yy/go }
+ $LCKey = lc $Key ;
+ $RegisterEntry[$NOfEntries] =
+ $Class . $JOIN .
+ $LCKey . $JOIN .
+ $Key . $JOIN .
+$TextHow . $JOIN . # of later ?
+ $Entry . $JOIN .
+$RegStat{$SecondTag} . $JOIN .
+ $RealPage . $JOIN .
+ $Location . $JOIN .
+ $Page . $JOIN .
+$PageHow . $JOIN .
+ $SeeToo }
+
+#M \definieerregister [testentry] [testentries]
+
+#D The previous routine deals with entries like:
+#D
+#D \startbuffer
+#D \testentry {alpha}
+#D \testentry {beta}
+#D \testentry {gamma}
+#D \testentry {gamma}
+#D \testentry {delta}
+#D \testentry {epsilon}
+#D \testentry {alpha+first}
+#D \testentry {alpha+second}
+#D \testentry {alpha+second}
+#D \testentry {alpha+third}
+#D \testentry {alpha+second+one}
+#D \testentry {alpha+second+one}
+#D \testentry {alpha+second+two}
+#D \testentry {alpha+second+three}
+#D \testentry {gamma+first+one}
+#D \testentry {gamma+second}
+#D \testentry {gamma+second+one}
+#D
+#D \testentry {alpha+fourth}
+#D \testentry {&alpha&fourth}
+#D \testentry {+alpha+fourth}
+#D
+#D \testentry [alpha+fourth] {alpha+fourth}
+#D \testentry [&alpha&fourth&one] {&alpha&fourth&one}
+#D \testentry [+alpha+fourth+two] {&alpha&fourth&two}
+#D
+#D \testentry {\kap{alpha}+fifth}
+#D \testentry {\kap{alpha}+f\'ifth}
+#D \testentry {\kap{alpha}+f"ifth}
+#D
+#D \testentry [&betaformula] {&$a^2+b^2=c^2$}
+#D
+#D \testentry {zeta \& more}
+#D
+#D \testentry [pagehowto::key]{texthowto::entry}
+#D
+#D \stopbuffer
+#D
+#D \typebuffer
+#D
+#D \haalbuffer After being sorted, these entries are
+#D turned into something \TEX\ using:
+
+$RegisterEntry[0] = ("") ;
+
+sub How
+ { return "$TextHow\:\:" . "@_[0]" }
+
+sub FlushRegisters
+ { print TUO "%\n" . "% $Program / Registers\n" . "%\n" ;
+ @RegisterEntry = sort { lc($a) cmp lc($b) } @RegisterEntry ;
+ $NOfSaneEntries = 0 ;
+ $NOfSanePages = 0 ;
+ $LastPage = "" ;
+ $LastRealPage = "" ;
+ $AlfaClass = "" ;
+ $Alfa = "" ;
+ $PreviousA = "" ;
+ $PreviousB = "" ;
+ $PreviousC = "" ;
+ $ActualA = "" ;
+ $ActualB = "" ;
+ $ActualC = "" ;
+ for ($n=1 ; $n<=$NOfEntries ; ++$n)
+ { ($Class, $LCKey, $Key,
+$TextHow,
+ $Entry,
+$RegisterState,
+$RealPage, $Location, $Page,
+$PageHow,
+ $SeeToo) = split(/$JOIN/, $RegisterEntry[$n]) ;
+ if (((lc substr $Key, 0, 1) ne lc $Alfa) or ($AlfaClass ne $Class))
+ { $Alfa= lc substr $Key, 0, 1 ;
+ $AlfaClass = $Class ;
+ if ($Alfa ne " ")
+ { print TUO "\\registerentry{$Class}{$Alfa}\n" } }
+ ($ActualA, $ActualB, $ActualC ) =
+ split(/$SPLIT/, $Entry, 3) ;
+ unless ($ActualA) { $ActualA = "" }
+ unless ($ActualB) { $ActualB = "" }
+ unless ($ActualC) { $ActualC = "" }
+ if (How($ActualA) eq $PreviousA)
+ { $ActualA = "" }
+ else
+ { $PreviousA = How($ActualA) ;
+ $PreviousB = "" ;
+ $PreviousC = "" }
+ if (How($ActualB) eq $PreviousB)
+ { $ActualB = "" }
+ else
+ { $PreviousB = How($ActualB) ;
+ $PreviousC = "" }
+ if (How($ActualC) eq $PreviousC)
+ { $ActualC = "" }
+ else
+ { $PreviousC = How($ActualC) }
+ $Copied = 0 ;
+ if ($ActualA ne "")
+ { print TUO "\\registerentrya{$Class}{$ActualA}\n" ;
+ $Copied = 1 }
+ if ($ActualB ne "")
+ { print TUO "\\registerentryb{$Class}{$ActualB}\n" ;
+ $Copied = 1 }
+ if ($ActualC ne "")
+ { print TUO "\\registerentryc{$Class}{$ActualC}\n" ;
+ $Copied = 1 }
+ if ($Copied)
+ { $NOfSaneEntries++ }
+ if ($RealPage eq 0)
+# { print TUO "\\registersee{$Class}{$SeeToo}{$Page}\n" ;
+{ print TUO "\\registersee{$Class}{$PageHow,$TextHow}{$SeeToo}{$Page}\n" ;
+ $LastPage = $Page ;
+ $LastRealPage = $RealPage }
+ elsif (($Copied) ||
+ ! (($LastPage eq $Page) and ($LastRealPage eq $RealPage)))
+# { print TUO "\\registerpage{$Class}{$Location}{$Page}{$RealPage}\n" ;
+{ if ($RegisterState eq $RegStat{"f"})
+ { print TUO "\\registerfrom{$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n" }
+ elsif ($RegisterState eq $RegStat{"t"})
+ { print TUO "\\registerto {$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n" }
+ else
+ { print TUO "\\registerpage{$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n" }
+ ++$NOfSanePages ;
+ $LastPage = $Page ;
+ $LastRealPage = $RealPage } }
+ Report("RegisterEntries", $NOfEntries, "->", $NOfSaneEntries, "Entries",
+ $NOfSanePages, "References") ;
+ if ($NOfBadEntries>0)
+ { Report("RegisterErrors", $NOfBadEntries) } }
+
+#D As promised, we show the results:
+#D
+#D \plaatstestentry
+
+#D For debugging purposes we flush some status information. The
+#D faster machines become, the more important this section will
+#D be.
+
+sub FlushData
+ { print TUO
+ "% \n" .
+ "% embedded files : $NOfFiles ($NOfBadFiles errors)\n" .
+ "% passed commands : $NOfCommands\n" .
+ "% synonym entries : $NOfSynonyms ($NOfBadSynonyms errors)\n" .
+ "% register entries : $NOfEntries ($NOfBadEntries errors)" }
+
+#D The functionallity described on the previous few pages is
+#D called upon in the main routine:
+
+sub NormalHandleReferences
+ { if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { unless (open (TUI, "$InputFile.tui"))
+ { Report("Error", "EmptyInputFile", $InputFile) }
+ else
+ { Report("InputFile", "$InputFile.tui" ) ;
+ unlink "$InputFile.tmp" ;
+ rename "$InputFile.tuo", "$InputFile.tmp" ;
+ Report("OutputFile", "$InputFile.tuo" ) ;
+ open (TUO, ">$InputFile.tuo") ;
+ print TUO "%\n" . "% $Program / Commands\n" . "%\n" ;
+ while (<TUI>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ ($FirstTag, $RestOfLine) = split ' ', $SomeLine, 2 ;
+ if ($FirstTag eq "c")
+ { HandleCommand }
+ elsif ($FirstTag eq "s")
+ { HandleSynonym }
+ elsif ($FirstTag eq "r")
+ { HandleRegister }
+ elsif ($FirstTag eq "f")
+ { HandleFile }
+ elsif ($FirstTag eq "q")
+ { $ValidOutput = 0 ;
+ last } }
+ if ($ValidOutput)
+ { FlushCommands ; # already done during pass
+ FlushRegisters ;
+ FlushSynonyms ;
+ FlushFiles ;
+ FlushData ;
+ close (TUO) }
+ else
+ { close (TUO) ;
+ unlink "$InputFile.tuo" ;
+ rename "$InputFile.tmp", "$InputFile.tuo" ;
+ Report ("Error", "NoOutputFile") } } } }
+
+sub MergerHandleReferences
+ { unlink "texutil.tuo" ;
+ Report("OutputFile", "texutil.tuo" ) ;
+ open (TUO, ">texutil.tuo") ;
+ foreach $InputFile (@ARGV)
+ { ($InputFile, $Suffix) = split (/\./, $InputFile, 2) ;
+ unless (open (TUI, "$InputFile.tui"))
+ { Report("Error", "EmptyInputFile", $InputFile) }
+ else
+ { Report("InputFile", "$InputFile.tui" ) ;
+ while (<TUI>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ ($FirstTag, $RestOfLine) = split ' ', $SomeLine, 2 ;
+ if ($FirstTag eq "r")
+ { HandleRegister } } } }
+ if ($ValidOutput)
+ { FlushRegisters ;
+ close (TUO) }
+ else
+ { close (TUO) ;
+ unlink "texutil.tuo" ;
+ Report ("Error", "NoOutputFile") } }
+
+# sub HandleReferences
+# { Report("Action", "ProcessingReferences") ;
+# if ($ProcessIJ )
+# { Report("Option", "SortingIJ") }
+# if ($ProcessHigh)
+# { Report("Option", "ConvertingHigh") }
+# if ($ProcessQuotes)
+# { Report("Option", "ProcessingQuotes") }
+# if ($InputFile eq "")
+# { Report("Error", "NoInputFile") }
+# else
+# { unless (open (TUI, "$InputFile.tui"))
+# { Report("Error", "EmptyInputFile", $InputFile) }
+# else
+# { Report("InputFile", "$InputFile.tui" ) ;
+# InitializeCommands ;
+# InitializeRegisters ;
+# InitializeSynonyms ;
+# InitializeFiles ;
+# $ValidOutput = 1 ;
+# unlink "$InputFile.tmp" ;
+# rename "$InputFile.tuo", "$InputFile.tmp" ;
+# Report("OutputFile", "$InputFile.tuo" ) ;
+# open (TUO, ">$InputFile.tuo") ;
+# while (<TUI>)
+# { $SomeLine = $_ ;
+# chomp $SomeLine ;
+# ($FirstTag, $RestOfLine) = split ' ', $SomeLine, 2 ;
+# if ($FirstTag eq "c")
+# { HandleCommand }
+# elsif ($FirstTag eq "s")
+# { HandleSynonym }
+# elsif ($FirstTag eq "r")
+# { HandleRegister }
+# elsif ($FirstTag eq "f")
+# { HandleFile }
+# elsif ($FirstTag eq "q")
+# { $ValidOutput = 0 ;
+# last } }
+# if ($ValidOutput)
+# { FlushCommands ; # already done during pass
+# FlushRegisters ;
+# FlushSynonyms ;
+# FlushFiles ;
+# FlushData ;
+# close (TUO) }
+# else
+# { close (TUO) ;
+# unlink "$InputFile.tuo" ;
+# rename "$InputFile.tmp", "$InputFile.tuo" ;
+# Report ("Error", "NoOutputFile") } } } }
+
+sub HandleReferences
+ { $Merging = @ARGV ;
+ $Merging = ($Merging>1) ;
+ if ($Merging)
+ { Report("Action", "MergingReferences") }
+ else
+ { Report("Action", "ProcessingReferences") }
+ if ($ProcessIJ )
+ { Report("Option", "SortingIJ") }
+ if ($ProcessHigh)
+ { Report("Option", "ConvertingHigh") }
+ if ($ProcessQuotes)
+ { Report("Option", "ProcessingQuotes") }
+ InitializeCommands ;
+ InitializeRegisters ;
+ InitializeSynonyms ;
+ InitializeFiles ;
+ $ValidOutput = 1 ;
+ if ($Merging)
+ { MergerHandleReferences }
+ else
+ { NormalHandleReferences } }
+
+#D \extras
+#D {documents}
+#D
+#D Documentation can be woven into a source file. The next
+#D routine generates a new, \TEX\ ready file with the
+#D documentation and source fragments properly tagged. The
+#D documentation is included as comment:
+#D
+#D \starttypen
+#D %D ...... some kind of documentation
+#D %M ...... macros needed for documenation
+#D %S B begin skipping
+#D %S E end skipping
+#D \stoptypen
+#D
+#D The most important tag is \type{%D}. Both \TEX\ and
+#D \METAPOST\ files use \type{%} as a comment chacacter, while
+#D \PERL\ uses \type{#}. Therefore \type{#D} is also handled.
+#D
+#D The generated file gets the suffix \type{ted} and is
+#D structured as:
+#D
+#D \starttypen
+#D \startmodule[type=suffix]
+#D \startdocumentation
+#D \stopdocumentation
+#D \startdefinition
+#D \stopdefinition
+#D \stopmodule
+#D \stoptypen
+#D
+#D Macro definitions specific to the documentation are not
+#D surrounded by start||stop commands. The suffix specifaction
+#D can be overruled at runtime, but defaults to the file
+#D extension. This specification can be used for language
+#D depended verbatim typesetting.
+
+sub HandleDocuments
+ { Report("Action", "HandlingDocuments") ;
+ if ($ProcessType ne "")
+ { Report("Option", "ForcingFileType", $ProcessType) }
+ if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { CheckInputFiles ($InputFile) ;
+ foreach $FullName (@UserSuppliedFiles)
+ { ($FileName, $FileSuffix) = SplitFileName ($FullName) ;
+ unless ($FileSuffix)
+ { $FileSuffix = "tex" }
+ unless (-f "$FileName.$FileSuffix")
+ { next }
+ unless (open (TEX, "$FileName.$FileSuffix"))
+ { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
+ else
+ { Report("InputFile", "$FileName.$FileSuffix") ;
+ Report("OutputFile", "$FileName.ted") ;
+ open (TED, ">$FileName.ted") ;
+ $NOfDocuments = 0 ;
+ $NOfDefinitions = 0 ;
+ $NOfSkips = 0 ;
+ $SkipLevel = 0 ;
+ $InDocument = 0 ;
+ $InDefinition = 0 ;
+ if ($ProcessType eq "")
+ { $FileType=lc $FileSuffix }
+ else
+ { $FileType=lc $ProcessType }
+ Report("FileType", $FileType) ;
+ print TED "\\startmodule[type=$FileType]\n" ;
+ while (<TEX>)
+ { chomp ;
+ if (/^[%\#]D/)
+ { if ($SkipLevel == 0)
+ { if (length $_ < 3)
+ {$SomeLine = "" }
+ else # HH: added after that
+ {$SomeLine = substr $_, 3 }
+ if ($InDocument)
+ { print TED "$SomeLine\n" }
+ else
+ { if ($InDefinition)
+ { print TED "\\stopdefinition\n" ;
+ $InDefinition = 0 }
+ unless ($InDocument)
+ { print TED "\n\\startdocumentation\n" }
+ print TED "$SomeLine\n" ;
+ $InDocument = 1 ;
+ ++$NOfDocuments } } }
+ elsif (/^[%\#]M/)
+ { if ($SkipLevel == 0)
+ { $SomeLine = substr $_, 3 ;
+ print TED "$SomeLine\n" } }
+ elsif (/^[%\%]S B]/)
+ { ++$SkipLevel ;
+ ++$NOfSkips }
+ elsif (/^[%\%]S E]/)
+ { --$SkipLevel }
+ elsif (/^[%\#]/)
+ { }
+ elsif ($SkipLevel == 0)
+ { $InLocalDocument = $InDocument ;
+ $SomeLine = $_ ;
+ if ($InDocument)
+ { print TED "\\stopdocumentation\n" ;
+ $InDocument = 0 }
+ if (($SomeLine eq "") && ($InDefinition))
+ { print TED "\\stopdefinition\n" ;
+ $InDefinition = 0 }
+ else
+ { if ($InDefinition)
+ { print TED "$SomeLine\n" }
+ elsif ($SomeLine ne "")
+ { print TED "\n" . "\\startdefinition\n" ;
+ $InDefinition = 1 ;
+ unless ($InLocalDocument)
+ { ++$NOfDefinitions }
+ print TED "$SomeLine\n" } } } }
+ if ($InDocument)
+ { print TED "\\stopdocumentation\n" }
+ if ($InDefinition)
+ { print TED "\\stopdefinition\n" }
+ print TED "\\stopmodule\n" ;
+ close (TED) ;
+ unless (($NOfDocuments) || ($NOfDefinitions))
+ { unlink "$FileName.ted" }
+ Report ("NOfDocuments", $NOfDocuments) ;
+ Report ("NOfDefinitions", $NOfDefinitions) ;
+ Report ("NOfSkips", $NOfSkips) } } } }
+
+#D \extras
+#D {sources}
+#D
+#D Documented sources can be stripped of documentation and
+#D comments, although at the current processing speeds the
+#D overhead of skipping the documentation at run time is
+#D neglectable. Only lines beginning with a \type{%} are
+#D stripped. The stripped files gets the suffix \type{tes}.
+
+sub HandleSources
+ { Report("Action", "GeneratingSources") ;
+ if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { CheckInputFiles ($InputFile) ;
+ foreach $FullName (@UserSuppliedFiles)
+ { ($FileName, $FileSuffix) = SplitFileName ($FullName) ;
+ unless ($FileSuffix)
+ { $FileSuffix = "tex" }
+ unless (-f "$FileName.$FileSuffix")
+ { next }
+ unless (open (TEX, "$FileName.$FileSuffix"))
+ { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
+ else
+ { Report("InputFile", "$FileName.$FileSuffix") ;
+ Report("OutputFile", "$FileName.tes") ;
+ open (TES, ">$FileName.tes") ;
+ $EmptyLineDone = 1 ;
+ $FirstCommentDone = 0 ;
+ while (<TEX>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ if ($SomeLine eq "")
+ { unless ($FirstCommentDone)
+ { $FirstCommentDone = 1 ;
+ print TES
+ "\n% further documentation is removed\n\n" ;
+ $EmptyLineDone = 1 }
+ unless ($EmptyLineDone)
+ { print TES "\n" ;
+ $EmptyLineDone = 1 } }
+ elsif ($SomeLine =~ /^%/)
+ { unless ($FirstCommentDone)
+ { print TES "$SomeLine\n" ;
+ $EmptyLineDone = 0 } }
+ else
+ { print TES "$SomeLine\n" ;
+ $EmptyLineDone = 0 } }
+ close (TES) ;
+ unless ($FirstCommentDone)
+ { unlink "$FileName.tes" } } } } }
+
+#D \extras
+#D {setups}
+#D
+#D All \CONTEXT\ commands are specified in a compact format
+#D that can be used to generate quick reference tables and
+#D cards. Such setups are preceded by \type{%S}. The setups
+#D are collected in the file \type{texutil.tus}.
+
+sub HandleSetups
+ { Report("Action", "FilteringDefinitions" ) ;
+ if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { SetOutputFile ("texutil.tus" ) ;
+ Report("OutputFile", $OutputFile) ;
+ open (TUS, ">$OutputFile") ; # always reset!
+ $NOfSetups = 0 ;
+ CheckInputFiles ($InputFile) ;
+ foreach $FullName (@UserSuppliedFiles)
+ { ($FileName, $FileSuffix) = SplitFileName ($FullName) ;
+ unless ($FileSuffix)
+ { $FileSuffix = "tex" }
+ unless (-f "$FileName.$FileSuffix")
+ { next }
+ unless (open (TEX, "$FileName.$FileSuffix"))
+ { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
+ else
+ { Report("InputFile", "$FileName.$FileSuffix") ;
+ print TUS "%\n" . "% File : $FileName.$FileSuffix\n" . "%\n" ;
+ while (<TEX>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) ;
+ if ($Tag eq "%S")
+ { ++$NOfSetups ;
+ while ($Tag eq "%S")
+ { print TUS "$RestOfLine\n" ;
+ $SomeLine = <TEX> ;
+ chomp $SomeLine ;
+ ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
+ print TUS "\n" } } } }
+ close (TUS) ;
+ unless ($NOfSetups)
+ { unlink $OutputFile }
+ Report("NOfSetups", $NOfSetups) } }
+
+#D \extras
+#D {templates, infos}
+#D
+#D From the beginning, the \CONTEXT\ source files contained
+#D helpinfo and key||templates for \TEXEDIT. In fact, for a
+#D long time, this was the only documentation present. More
+#D and more typeset (interactive) documentation is replacing
+#D this helpinfo, but we still support the traditional method.
+#D This information is formatted like:
+#D
+#D \starttypen
+#D %I n=Struts
+#D %I c=\strut,\setnostrut,\setstrut,\toonstruts
+#D %I
+#D %I text
+#D %I ....
+#D %P
+#D %I text
+#D %I ....
+#D \stoptypen
+#D
+#D Templates look like:
+#D
+#D \starttypen
+#D %T n=kap
+#D %T m=kap
+#D %T a=k
+#D %T
+#D %T \kap{?}
+#D \stoptypen
+#D
+#D The key||value pairs stand for {\em name}, {\em mnemonic},
+#D {\em key}. This information is copied to files with the
+#D extension \type{tud}.
+
+sub HandleEditorCues
+ { if ($ProcessTemplates)
+ { Report("Action", "CopyingTemplates" ) }
+ if ($ProcessInfos)
+ {Report("Action", "CopyingInformation" ) }
+ if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { CheckInputFiles ($InputFile) ;
+ foreach $FullName (@UserSuppliedFiles)
+ { ($FileName, $FileSuffix) = SplitFileName ($FullName) ;
+ if ($FileSuffix eq "")
+ { $FileSuffix = "tex" }
+ unless (-f "$FileName.$FileSuffix")
+ { next }
+ unless (open (TEX, "$FileName.$FileSuffix"))
+ { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
+ else
+ { Report("InputFile", "$FileName.$FileSuffix") ;
+ Report("OutputFile", "$FileName.tud") ;
+ open (TUD, ">$FileName.tud") ;
+ $NOfTemplates = 0 ;
+ $NOfInfos = 0 ;
+ while (<TEX>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) ;
+ if (($Tag eq "%T") && ($ProcessTemplates))
+ { ++$NOfTemplates ;
+ while ($Tag eq "%T")
+ { print TUD "$SomeLine\n" ;
+ $SomeLine = <TEX> ;
+ chomp $SomeLine ;
+ ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
+ print TUD "\n" }
+ elsif (($Tag eq "%I") && ($ProcessInfos))
+ { ++$NOfInfos ;
+ while (($Tag eq "%I") || ($Tag eq "%P"))
+ { print TUD "$SomeLine\n" ;
+ $SomeLine = <TEX> ;
+ chomp $SomeLine ;
+ ($Tag, $RestOfLine) = split(/ /, $SomeLine, 2) }
+ print TUD "\n" } }
+ close (TUD) ;
+ unless (($NOfTemplates) || ($NOfInfos))
+ { unlink "$FileName.tud" }
+ if ($ProcessTemplates)
+ { Report("NOfTemplates", $NOfTemplates) }
+ if ($ProcessInfos)
+ { Report("NOfInfos", $NOfInfos) } } } } }
+
+#D \extras
+#D {figures}
+#D
+#D Directories can be scanned for illustrations in \EPS, \PDF,
+#D \TIFF, \PNG\ or \JPG\ format. The resulting file \type{texutil.tuf}
+#D contains entries like:
+#D
+#D \starttypen
+#D \thisisfigureversion{year.month.day}
+#D \presetfigure[file][...specifications...]
+#D \stoptypen
+#D
+#D where the specifications are:
+#D
+#D \starttypen
+#D [e=suffix,x=xoffset,y=yoffset,w=width,h=height,t=title,c=creator,s=size]
+#D \stoptypen
+#D
+#D This data can be used when determining dimensions and
+#D generate directories of illustrations.
+
+$DPtoCM = 2.54/72.0 ;
+$INtoCM = 2.54 ;
+
+sub SaveFigurePresets
+ { my ($FNam, $FTyp, $FUni, $FXof, $FYof, $FWid, $FHei, $FTit, $FCre, $FSiz) = @_ ;
+ if ($ProcessVerbose)
+ { OpenTerminal ;
+ if ($FUni)
+ { print "n=$FNam t=$FTyp " .
+ (sprintf "x=%1.3fcm y=%1.3fcm ", $FXof, $FYof) .
+ (sprintf "w=%1.3fcm h=%1.3fcm\n", $FWid, $FHei) }
+ else
+ { print "n=$FNam t=$FTyp " .
+ "x=${FXof}bp y=${FYof}bp " .
+ "w=${FWid}bp h=${FHei}bp\n" }
+ CloseTerminal }
+ else
+ { ++$NOfFigures ;
+ $Figures[$NOfFigures] = "\\presetfigure[$FNam][e=$FTyp" ;
+ if ($FUni)
+ { $Figures[$NOfFigures] .= (sprintf ",w=%5.3fcm,h=%5.3fcm", $FWid, $FHei) }
+ else
+ { $Figures[$NOfFigures] .= ",w=${FWid}bp,h=${FHei}bp" }
+ if (($FXof!=0)||($FYof!=0))
+ { if ($FUni)
+ { $Figures[$NOfFigures] .= (sprintf ",x=%1.3fcm,y=%1.3fcm", $FXof, $FYof) }
+ else
+ { $Figures[$NOfFigures] .= ",x=${FXof}bp,y=${FYof}bp" } }
+ if ($FTit)
+ { $Figures[$NOfFigures] .= ",t=\{$FTit\}" }
+ if ($FCre)
+ { $Figures[$NOfFigures] .= ",c=\{$FCre\}" }
+ $Figures[$NOfFigures] .= ",s=$FSiz]\n" } }
+
+#D The \EPS\ to \PDF\ conversion pipe to \GHOSTSCRIPT\ is
+#D inspired by a script posted by Sebastian Ratz at the
+#D \PDFTEX\ mailing list. Watch the bounding box check, we
+#D use the values found in an earlier pass.
+
+sub ConvertEpsToEps
+ { my ( $SuppliedFileName , $LLX, $LLY, $URX, $URY ) = @_ ;
+ ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if ($ProcessEpsToPdf)
+ { unlink "$FileName.pdf" ;
+ $GSCommandLine = "-q " .
+ "-sDEVICE=pdfwrite " .
+ "-dNOCACHE " .
+ "-dUseFlateCompression=true " .
+ "-sOutputFile=$FileName.pdf " .
+ "- -c " .
+ "quit " ;
+ open ( EPS, "| gs $GSCommandLine") }
+ elsif ($PDFReady)
+ { return }
+ else
+ { open ( EPS, ">texutil.tmp" ) ;
+ binmode EPS }
+ open ( TMP , "$SuppliedFileName" ) ;
+ binmode TMP ;
+ $EpsBBOX = 0 ;
+ $EpsWidth = $URX - $LLX ;
+ $EpsHeight = $URY - $LLY ;
+ $EpsXOffset = 0 - $LLX ;
+ $EpsYOffset = 0 - $LLY ;
+ while (<TMP>)
+ { if (/%!PS/)
+ { s/(.*)%!PS/%!PS/o ;
+ print EPS $_ ;
+ last } }
+ while (<TMP>)
+ { if (/^%%(HiResB|ExactB|B)oundingBox:/o)
+ { unless ($EpsBBOX)
+ { print EPS "%%PDFready: $Program\n" ;
+ print EPS "%%BoundingBox: 0 0 $EpsWidth $EpsHeight\n" ;
+ print EPS "<< /PageSize [$EpsWidth $EpsHeight] >> setpagedevice\n" ;
+ print EPS "gsave $EpsXOffset $EpsYOffset translate\n" ;
+ $EpsBBOX = 1 } }
+ elsif (/^%%EOF/o)
+ { last }
+ elsif (/^%%Trailer/o)
+ { last }
+ else
+ { print EPS $_ } }
+ close ( TMP ) ;
+ if ($EpsBBOX)
+ { print EPS "grestore\n%%EOF\n%%RestOfFileIgnored: $Program\n" ;
+ close ( EPS ) ;
+ Report ( "PdfFile", "$SuppliedFileName" ) ;
+ unless ($ProcessEpsToPdf)
+ { unlink "$SuppliedFileName" ;
+ rename "texutil.tmp", "$SuppliedFileName" } }
+ else
+ { close (EPS) }
+ unlink "texutil.tmp" }
+
+sub HandleEpsFigure
+ { my ($SuppliedFileName) = @_ ;
+ my ($Temp) = "" ;
+ if (-f $SuppliedFileName)
+ { ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if ($FileSuffix)
+ { $Temp = $FileSuffix ;
+ $Temp =~ s/[0-9]//go ;
+ if ($Temp eq "")
+ { $EpsFileName = $SuppliedFileName;
+ Report ( "MPFile", "$SuppliedFileName" ) }
+ elsif ((lc $FileSuffix ne "eps")&&(lc $FileSuffix ne "mps"))
+ { return }
+ else
+ { $EpsFileName = $SuppliedFileName; # $FileName
+ Report ( "EpsFile", "$SuppliedFileName" ) }
+ $EpsTitle = "" ;
+ $EpsCreator = "" ;
+ open ( EPS , $SuppliedFileName ) ;
+ binmode EPS ;
+ $EpsSize = -s EPS ;
+ $PDFReady = 0 ;
+ $MPSFound = 0 ;
+ $BBoxFound = 0 ;
+ while (<EPS>)
+ { $SomeLine = $_;
+ chomp $SomeLine ;
+ if (($BBoxFound) && ((substr $SomeLine,0,1) ne "%"))
+ { last }
+ if ($BBoxFound<2)
+ { if ($SomeLine =~ /^%%BoundingBox:/io)
+ { $EpsBBox = $SomeLine ; $BBoxFound = 1 ; next }
+ elsif ($SomeLine =~ /^%%HiResBoundingBox:/io)
+ { $EpsBBox = $SomeLine ; $BBoxFound = 2 ; next }
+ elsif ($SomeLine =~ /^%%ExactBoundingBox:/io)
+ { $EpsBBox = $SomeLine ; $BBoxFound = 3 ; next } }
+ if ($SomeLine =~ /^%%PDFready:/io)
+ { $PDFReady = 1 }
+ elsif ($SomeLine =~ /^%%Creator:/io)
+ { ($Tag, $EpsCreator) = split (/ /, $SomeLine, 2) ;
+ if ($EpsCreator =~ /MetaPost/io)
+ { $MPSFound = 1 } }
+ elsif ($SomeLine =~ /^%%Title:/io)
+ { ($Tag, $EpsTitle) = split (/ /, $SomeLine, 2) } }
+ close ( EPS ) ;
+ if ($BBoxFound)
+ { ($Tag, $LLX, $LLY, $URX, $URY, $RestOfLine) = split (/ /, $EpsBBox, 6 ) ;
+ $EpsHeight = ($URY-$LLY)*$DPtoCM ;
+ $EpsWidth = ($URX-$LLX)*$DPtoCM ;
+ $EpsXOffset = $LLX*$DPtoCM ;
+ $EpsYOffset = $LLY*$DPtoCM ;
+ if ($MPSFound)
+ { $EpsType = "mps" }
+ else
+ { $EpsType = "eps" }
+ SaveFigurePresets
+ ( $EpsFileName, $EpsType, 1,
+ $EpsXOffset, $EpsYOffset, $EpsWidth, $EpsHeight,
+ $EpsTitle, $EpsCreator, $EpsSize ) ;
+ if (($ProcessEpsPage) || ($ProcessEpsToPdf))
+ { ConvertEpsToEps ( $SuppliedFileName, $LLX, $LLY, $URX, $URY ) } }
+ else
+ { Report ( "MissingBoundingBox", "$SuppliedFileName" ) } } } }
+
+#D The \PDF\ scanning does a similar job. This time we
+#D search for a mediabox. I could have shared some lines
+#D with the previous routines, but prefer readability.
+
+sub HandlePdfFigure
+ { my ( $SuppliedFileName ) = @_ ;
+ ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if (lc $FileSuffix ne "pdf")
+ { return }
+ else
+ { $PdfFileName = $SuppliedFileName ;
+ Report ( "PdfFile", "$SuppliedFileName" ) }
+ open ( PDF , $SuppliedFileName ) ;
+ binmode PDF ;
+ $PdfSize = -s PDF ;
+ $MediaBoxFound = 0 ;
+ $MediaBox = 0 ;
+ $PageFound = 0 ;
+ $PagesFound = 0 ;
+ while (<PDF>)
+ { $SomeLine = $_ ;
+ chomp ($SomeLine) ;
+ if ($SomeLine =~ /\/Type \/Pages/io)
+ { $PagesFound = 1 }
+ elsif ($SomeLine =~ /\/Type \/Page/io)
+ { ++$PageFound ;
+ if ($PageFound>1) { last } }
+ if ((($PageFound)||($PagesFound)) && ($SomeLine =~ /\/MediaBox /io))
+ { $MediaBox = $SomeLine ;
+ $MediaBoxFound = 1 ;
+ if ($PagesFound) { last } } }
+ close ( PDF ) ;
+ if ($PageFound>1)
+ { Report ( "MultiPagePdfFile", "$SuppliedFileName" ) }
+ elsif (($MediaBoxFound) && ($MediaBox))
+ { my $D = "[0-9\-\.]" ;
+ $MediaBox =~ /\/MediaBox\s*\[\s*($D+)\s*($D+)\s*($D+)\s*($D+)/o ;
+ $LLX = $1 ; $LLY = $2 ; $URX = $3 ; $URY = $4 ;
+ $PdfHeight = ($URY-$LLY)*$DPtoCM ;
+ $PdfWidth = ($URX-$LLX)*$DPtoCM ;
+ $PdfXOffset = $LLX*$DPtoCM ;
+ $PdfYOffset = $LLY*$DPtoCM ;
+ SaveFigurePresets
+ ( $PdfFileName, "pdf", 1,
+ $PdfXOffset, $PdfYOffset, $PdfWidth, $PdfHeight,
+ "", "", $PdfSize ) }
+ else
+ { Report ( "MissingMediaBox", "$SuppliedFileName" ) } }
+
+#D A previous version of \TEXUTIL\ used \type{tifftags} or
+#D \type{tiffinfo} for collecting the dimensions. However,
+#D the current implementation does this job itself.
+
+sub TifGetByte
+ { my ($B) = 0 ;
+ read TIF, $B, 1 ;
+ return ord($B) }
+
+sub TifGetShort
+ { my ($S) = 0 ;
+ read TIF, $S, 2 ;
+ if ($TifLittleEndian)
+ { return (unpack ("v", $S)) }
+ else
+ { return (unpack ("n", $S)) } }
+
+sub TifGetLong
+ { my ($L) = 0 ;
+ read TIF, $L, 4 ;
+ if ($TifLittleEndian)
+ { return (unpack ("V", $L)) }
+ else
+ { return (unpack ("N", $L)) } }
+
+sub TifGetRational
+ { my ($N, $M) = (0,0) ;
+ $N = TifGetLong ;
+ $M = TifGetLong ;
+ return $N/$M }
+
+sub TifGetAscii
+ { my ($S) = "" ;
+ --$TifValues;
+ if ($TifValues)
+ { return "" }
+ else
+ { read TIF, $S, $TifValues ;
+ return $S } }
+
+sub TifGetWhatever
+ { if ($_[0]==1)
+ { return TifGetByte }
+ elsif ($_[0]==2)
+ { return TifGetAscii }
+ elsif ($_[0]==3)
+ { return TifGetShort }
+ elsif ($_[0]==4)
+ { return TifGetLong }
+ elsif ($_[0]==5)
+ { return TifGetRational }
+ else
+ { return 0 } }
+
+sub TifGetChunk
+ { seek TIF, $TifNextChunk, 0 ;
+ $Length = TifGetShort ;
+ $TifNextChunk += 2 ;
+ for ($i=1; $i<=$Length; $i++)
+ { seek TIF, $TifNextChunk, 0 ;
+ $TifTag = TifGetShort ;
+ $TifType = TifGetShort ;
+ $TifValues = TifGetLong ;
+ if ($TifTag==256)
+ { $TifWidth = TifGetWhatever($TifType) }
+ elsif ($TifTag==257)
+ { $TifHeight = TifGetWhatever($TifType) }
+ elsif ($TifTag==296)
+ { $TifUnit = TifGetWhatever($TifType) }
+ elsif ($TifTag==282)
+ { seek TIF, TifGetLong, 0 ;
+ $TifHRes = TifGetWhatever($TifType) }
+ elsif ($TifTag==283)
+ { seek TIF, TifGetLong, 0 ;
+ $TifVRes = TifGetWhatever($TifType) }
+ elsif ($TifTag==350)
+ { seek TIF, TifGetLong, 0 ;
+ $TifCreator = TifGetWhatever($TifType) }
+ elsif ($TifTag==315)
+ { seek TIF, TifGetLong, 0 ;
+ $TifAuthor = TifGetWhatever($TifType) }
+ elsif ($TifTag==269)
+ { seek TIF, TifGetLong, 0 ;
+ $TifTitle = TifGetWhatever($TifType) }
+ $TifNextChunk += 12 }
+ seek TIF, $TifNextChunk, 0 ;
+ $TifNextChunk = TifGetLong ;
+ return ($TifNextChunk>0) }
+
+sub HandleTifFigure
+ { my ( $SuppliedFileName ) = @_ ;
+ ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if (lc $FileSuffix ne "tif")
+ { return }
+ else
+ { $TifFile = $SuppliedFileName ;
+ if (open ( TIF, $TifFile ))
+ { Report ( "TifFile", "$SuppliedFileName" ) ;
+ binmode TIF;
+ $TifWidth = 0 ;
+ $TifHeight = 0 ;
+ $TifTitle = "" ;
+ $TifAuthor = "" ;
+ $TifCreator = "" ;
+ $TifUnit = 0 ;
+ $TifHRes = 1 ;
+ $TifVRes = 1 ;
+ $TifSize = -s TIF ;
+ $TifByteOrder = "" ;
+ seek TIF, 0, 0 ;
+ read TIF, $TifByteOrder, 2 ;
+ $TifLittleEndian = ($TifByteOrder eq "II") ;
+ $TifTag = TifGetShort;
+ unless ($TifTag == 42)
+ { close ( TIF ) ;
+ return }
+ $TifNextChunk = TifGetLong ;
+ while (TifGetChunk) { }
+ if ($TifUnit==2)
+ { $TifMult = $INtoCM }
+ else
+ { $TifMult = 1 }
+ $TifWidth = ($TifWidth /$TifHRes)*$TifMult ;
+ $TifHeight = ($TifHeight/$TifVRes)*$TifMult ;
+ close ( TIF ) ;
+ SaveFigurePresets
+ ( $TifFile, "tif", $TifUnit,
+ 0, 0, $TifWidth, $TifHeight,
+ $TifTitle, $TifCreator, $TifSize ) } } }
+
+#D I first intended to use the public utility \type{pngmeta}
+#D (many thanks to Taco for compiling it), but using this
+#D utility to analyze lots of \PNG\ files, I tried to do a
+#D similar job in \PERL. Here are the results:
+
+my ($PngSize, $PngWidth, $PngHeight) = (0,0,0) ;
+my ($PngMult, $PngHRes, $PngVRes, $PngUnit) = (0,1,1,0) ;
+my ($PngFile, $PngTitle, $PngAuthor, $PngCreator) = ("","","") ;
+my ($PngNextChunk, $PngLength, $PngType) = (0,0,0) ;
+my ($PngKeyword, $PngDummy) = ("","") ;
+
+my $PngSignature = chr(137) . chr(80) . chr(78) . chr(71) .
+ chr (13) . chr(10) . chr(26) . chr(10) ;
+sub PngGetByte
+ { my ($B) = 0 ;
+ read PNG, $B, 1 ;
+ return (ord($B)) }
+
+sub PngGetLong
+ { my ($L) = 0 ;
+ read PNG, $L, 4 ;
+ return (unpack("N", $L)) }
+
+sub PngGetChunk
+ { if ($PngNextChunk<$PngSize)
+ { seek PNG, $PngNextChunk, 0 ;
+ $PngLength = PngGetLong ;
+ $PngNextChunk = $PngNextChunk + $PngLength + 12 ;
+ read PNG, $PngType, 4 ;
+ if ($PngType eq "")
+ { return 0 }
+ elsif ($PngType eq "IEND")
+ { return 0 }
+ elsif ($PngType eq "IHDR")
+ { $PngWidth = PngGetLong ;
+ $PngHeight = PngGetLong }
+ elsif ($PngType eq "pHYs")
+ { $PngHRes = PngGetLong ;
+ $PngVRes = PngGetLong ;
+ read PNG, $PngUnit, 1 }
+ elsif ($PngType eq "tEXt")
+ { read PNG, $PngKeyword, 79 ;
+ read PNG, $PngDummy, 1 ;
+ if ( $PngKeyword eq "Title")
+ { read PNG, $PngTitle, $Length }
+ elsif ( $PngKeyword eq "Author")
+ { read PNG, $PngAuthor, $PngLength }
+ elsif ( $PngKeyword eq "Software")
+ { read PNG, $PngCreator, $PngLength } }
+ return 1 }
+ else
+ { return 0 } }
+
+sub HandlePngFigure
+ { my ( $SuppliedFileName ) = @_ ;
+ ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if (lc $FileSuffix ne "png")
+ { return }
+ else
+ { $PngFile = $SuppliedFileName ;
+ if (open ( PNG, $PngFile ))
+ { Report ( "PngFile", "$SuppliedFileName" ) }
+ $PngSize = 0 ;
+ $PngWidth = 0 ;
+ $PngHeight = 0 ;
+ $PngTitle = "" ;
+ $PngAuthor = "" ;
+ $PngCreator = "" ;
+ $PngUnit = 0 ;
+ $PngVRes = 1 ;
+ $PngHRes = 1 ;
+ $PngSig = "" ;
+ $PngSize = -s PNG ;
+ binmode PNG ;
+ seek PNG, 0, 0 ;
+ read PNG, $PngSig, 8;
+ unless ($PngSig eq $PngSignature)
+ { close ( PNG ) ;
+ return }
+ $PngNextChunk = 8 ;
+ while (PngGetChunk) { }
+ $PngWidth = ($PngWidth /$PngVRes) ;
+ $PngHeight = ($PngHeight/$PngHRes) ;
+ close ( PNG ) ;
+ SaveFigurePresets
+ ( $PngFile, "png", $PngUnit,
+ 0, 0, $PngWidth, $PngHeight,
+ $PngTitle, $PngCreator, $PngSize ) } }
+
+#D Well, we also offer \JPG\ scanning (actually \JFIF)
+#D scanning. (I can recomend David Salomon's book on Data
+#D Compression to those interested in the internals of
+#D \JPG.)
+#D
+#D It took me some time to discover that the (sort of)
+#D reference document I used had a faulty byte position table.
+#D Nevertheless, when I was finaly able to grab the header,
+#D Piet van Oostrum pointer me to the \PERL\ script of Alex
+#D Knowles (and numerous other contributers), from which I
+#D could deduce what segment contained the dimensions.
+
+my ($JpgSize, $JpgWidth, $JpgHeight) = (0,0,0) ;
+my ($JpgMult, $JpgUnit, $JpgHRes, $JpgVRes) = (1,0,1,1) ;
+my ($JpgFile, $JpgVersion, $JpgDummy) = ("",0,"") ;
+my ($JpgSig, $JpgPos, $JpgLen, $JpgSoi, $JpgApp) = ("",0,0,0,0) ;
+
+my $JpgSignature = "JFIF" . chr(0) ;
+
+sub JpgGetByte
+ { my ($B) = 0 ;
+ read JPG, $B, 1 ;
+ return ( ord($B) ) }
+
+sub JpgGetInteger
+ { my ($I) = 0 ;
+ read JPG, $I, 2 ;
+ return (unpack("n", $I)) }
+
+sub HandleJpgFigure
+ { my ($SuppliedFileName) = @_ ;
+ ($FileName, $FileSuffix) = SplitFileName ($SuppliedFileName) ;
+ if (lc $FileSuffix ne "jpg")
+ { return }
+ else
+ { $JpgFile = $SuppliedFileName ;
+ Report ( "JpgFile", "$SuppliedFileName" ) }
+ open ( JPG, $JpgFile ) ;
+ binmode JPG ;
+ $JpgSignature = "JFIF" . chr(0) ;
+ $JpgSize = -s JPG ;
+ $JpgWidth = 0 ;
+ $JpgHeight = 0 ;
+ $JpgUnit = 0 ;
+ $JpgVRes = 1 ;
+ $JpgHRes = 1 ;
+ seek JPG, 0, 0 ;
+ read JPG, $JpgSig, 4 ;
+ unless ($JpgSig eq chr(255).chr(216).chr(255).chr(224))
+ { close ( JPG ) ;
+ return }
+ $JpgLen = JpgGetInteger;
+ read JPG, $JpgSig, 5 ;
+ unless ($JpgSig eq $JpgSignature)
+ { close ( JPG ) ;
+ return }
+ $JpgUnit = JpgGetByte ;
+ $JpgVersion = JpgGetInteger ;
+ $JpgHRes = JpgGetInteger ;
+ $JpgVRes = JpgGetInteger ;
+ $JpgPos = $JpgLen + 4 ;
+ $JpgSoi = 255 ;
+ while ()
+ { seek JPG, $JpgPos, 0 ;
+ $JpgSoi = JpgGetByte ;
+ $JpgApp = JpgGetByte ;
+ $JpgLen = JpgGetInteger ;
+ if ($JpgSoi!=255)
+ { last }
+ if (($JpgApp>=192) && ($JpgApp<=195)) # Found in the perl script.
+ { $JpgDummy = JpgGetByte ; # Found in the perl script.
+ $JpgHeight = JpgGetInteger ; # Found in the perl script.
+ $JpgWidth = JpgGetInteger } # Found in the perl script.
+ $JpgPos = $JpgPos + $JpgLen + 2 }
+ close ( JPG ) ;
+ if ($JpgUnit==1)
+ { $JpgMult = $INtoCM }
+ else
+ { $JpgMult = 1 }
+ $JpgWidth = ($JpgWidth/$JpgHRes)*$JpgMult ;
+ $JpgHeight = ($JpgHeight/$JpgVRes)*$JpgMult ;
+ close ( JPG ) ;
+ SaveFigurePresets
+ ( $JpgFile, "jpg", $JpgUnit,
+ 0, 0, $JpgWidth, $JpgHeight,
+ "", "", $JpgSize ) }
+
+#D Now we can handle figures!
+
+sub InitializeFigures
+ { $NOfFigures = 0 }
+
+sub FlushFigures
+ { $Figures = sort { lc ($a) cmp lc ($b) } $Figures ;
+ SetOutputFile ("texutil.tuf") ;
+ open ( TUF, ">$OutputFile" ) ;
+ print TUF "%\n" . "% $Program / Figures\n" . "%\n" ;
+ print TUF "\\thisisfigureversion\{1996.06.01\}\n" . "%\n" ;
+ for ($n=1 ; $n<=$NOfFigures ; ++$n)
+ { print TUF $Figures[$n] }
+ close (TUF) ;
+ if ($NOfFigures)
+ { Report("OutputFile", $OutputFile ) }
+ else
+ { unlink $OutputFile }
+ Report ( "NOfFigures", $NOfFigures ) }
+
+sub DoHandleFigures
+ { my ($FigureSuffix, $FigureMethod) = @_ ;
+ if ($InputFile eq "")
+ { $InputFile = $FigureSuffix }
+ CheckInputFiles ($InputFile) ;
+ foreach $FileName (@UserSuppliedFiles)
+ { &{$FigureMethod} ( $FileName ) } }
+
+sub HandleFigures
+ { Report("Action", "GeneratingFigures" ) ;
+ foreach $FileType (@ARGV)
+ { if ($FileType=~/\.eps/io)
+ { Report("Option", "UsingEps") ;
+ if ($ProcessEpsToPdf) { Report("Option", "EpsToPdf") }
+ if ($ProcessEpsPage) { Report("Option", "EpsPage") }
+ last } }
+ foreach $FileType (@ARGV)
+ { if ($FileType=~/\.pdf/io)
+ { Report("Option", "UsingPdf") ;
+ last } }
+ foreach $FileType (@ARGV)
+ { if ($FileType=~/\.tif/io)
+ { Report("Option", "UsingTif") ;
+ #RunTifPrograms ;
+ last } }
+ foreach $FileType (@ARGV)
+ { if ($FileType=~/\.png/io)
+ { Report("Option", "UsingPng") ;
+ last } }
+ foreach $FileType (@ARGV)
+ { if ($FileType=~/\.jpg/io)
+ { Report("Option", "UsingJpg") ;
+ last } }
+ InitializeFigures ;
+ DoHandleFigures ("eps", "HandleEpsFigure") ;
+ DoHandleFigures ("pdf", "HandlePdfFigure") ;
+ DoHandleFigures ("tif", "HandleTifFigure") ;
+ DoHandleFigures ("png", "HandlePngFigure") ;
+ DoHandleFigures ("jpg", "HandleJpgFigure") ;
+ FlushFigures }
+
+#D \extras
+#D {logfiles}
+#D
+#D This (poor man's) log file scanning routine filters
+#D overfull box messages from a log file (\type{\hbox},
+#D \type{\vbox} or both). The collected problems are saved
+#D in \type{$ProgramLog}. One can specify a selection
+#D criterium.
+#D
+#D \CONTEXT\ reports unknown entities. These can also be
+#D filtered. When using fast computers, or when processing
+#D files in batch, one has to rely on the log files and/or
+#D this filter.
+
+$Unknown = "onbekende verwijzing|" .
+ "unbekannte Referenz|" .
+ "unknown reference|" .
+ "dubbele verwijzing|" .
+ "duplicate reference|" .
+ "doppelte Referenz" ;
+
+sub FlushLogTopic
+ { unless ($TopicFound)
+ { $TopicFound = 1 ;
+ print ALL "\n% File: $FileName.log\n\n" } }
+
+sub HandleLogFile
+ { if ($ProcessBox)
+ { Report("Option", "FilteringBoxes", "(\\vbox & \\hbox)") ;
+ $Key = "[h|v]box" }
+ elsif ($ProcessHBox)
+ { Report("Option", "FilteringBoxes", "(\\hbox)") ;
+ $Key = "hbox" ;
+ $ProcessBox = 1 }
+ elsif ($ProcessVBox)
+ { Report("Option", "FilteringBoxes", "(\\vbox)") ;
+ $Key = "vbox" ;
+ $ProcessBox = 1 }
+ if (($ProcessBox) && ($ProcessCriterium))
+ { Report("Option", "ApplyingCriterium") }
+ if ($ProcessUnknown)
+ { Report("Option", "FilteringUnknown") }
+ unless (($ProcessBox) || ($ProcessUnknown))
+ { ShowHelpInfo ;
+ return }
+ Report("Action", "FilteringLogFile" ) ;
+ if ($InputFile eq "")
+ { Report("Error", "NoInputFile") }
+ else
+ { $NOfBoxes = 0 ;
+ $NOfMatching = 0 ;
+ $NOfUnknown = 0 ;
+ SetOutputFile ($ProgramLog) ;
+ Report("OutputFile", $OutputFile) ;
+ CheckInputFiles ($InputFile) ;
+ open ( ALL, ">$OutputFile" ) ;
+ foreach $FullName (@UserSuppliedFiles)
+ { ($FileName, $FileSuffix) = SplitFileName ($FullName) ;
+ if (! open (LOG, "$FileName.log"))
+ { Report("Error", "EmptyInputFile", "$FileName.$FileSuffix" ) }
+ elsif (-e "$FileName.tex")
+ { $TopicFound = 0 ;
+ Report("InputFile", "$FileName.log") ;
+ while (<LOG>)
+ { $SomeLine = $_ ;
+ chomp $SomeLine ;
+ if (($ProcessBox) && ($SomeLine =~ /Overfull \\$Key/))
+ { ++$NOfBoxes ;
+ $SomePoints = $SomeLine ;
+ $SomePoints =~ s/.*\((.*)pt.*/$1/ ;
+ if ($SomePoints>=$ProcessCriterium)
+ { ++$NOfMatching ;
+ FlushLogTopic ;
+ print ALL "$SomeLine\n" ;
+ $SomeLine=<LOG> ;
+ print ALL $SomeLine } }
+ if (($ProcessUnknown) && ($SomeLine =~ /$Unknown/io))
+ { ++$NOfUnknown ;
+ FlushLogTopic ;
+ print ALL "$SomeLine\n" } } } }
+ close (ALL) ;
+ unless (($NOfBoxes) ||($NOfUnknown))
+ { unlink $OutputFile }
+ if ($ProcessBox)
+ { Report ( "NOfBoxes" , "$NOfBoxes", "->", $NOfMatching, "Overfull") }
+ if ($ProcessUnknown)
+ { Report ( "NOfUnknown", "$NOfUnknown") } } }
+
+#D We're done! All this actions and options are organized in
+#D one large conditional:
+
+ ShowBanner ;
+
+if ($UnknownOptions ) { ShowHelpInfo } # not yet done
+elsif ($ProcessReferences) { HandleReferences }
+elsif ($ProcessDocuments ) { HandleDocuments }
+elsif ($ProcessSources ) { HandleSources }
+elsif ($ProcessSetups ) { HandleSetups }
+elsif ($ProcessTemplates ) { HandleEditorCues }
+elsif ($ProcessInfos ) { HandleEditorCues }
+elsif ($ProcessFigures ) { HandleFigures }
+elsif ($ProcessLogFile ) { HandleLogFile }
+elsif ($ProcessHelp ) { ShowHelpInfo } # redundant
+else { ShowHelpInfo }
+
+#D So far.
diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex
index b26e4594a..db0b5f650 100644
--- a/tex/context/base/thrd-ran.tex
+++ b/tex/context/base/thrd-ran.tex
@@ -1,71 +1,70 @@
-%D \module
-%D [ file=thrd-ran,
-%D version=1998.01.21,
-%D title=\CONTEXT\ Support Macros,
-%D subtitle=Random Number 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.
-
-\writestatus{loading}{Third Party Macros / Random Number Generation}
-
-%D \macros
-%D {getrandomcount, getrandomdimen,
-%D getrandomfloat, getrandomnumber}
-%D
-%D This module load Donald Arseneau's generic file
-%D \type{random.tex}. A small shell is needed because we
-%D redefine some \TEX\ primitives. We also use different names
-%D for the two generators and add an extra one.
-%D
-%D \starttypen
-%D \getrandomcount \countregister {minimum} {maximum}
-%D \getrandomdimen \dimenregister {minimum} {maximum}
-%D \getrandomnumber \macroname {minimum} {maximum}
-%D \getrandomfloat \macroname {minimum} {maximum}
-%D \stoptypen
-%D
-%D Of course the file \type{random.tex} needs to be present.
-
-\readfile{random.tex}
- {\writestatus{loading}{Donald Arseneau's 'random.tex' (found)}}
- {\writestatus{loading}{Donald Arseneau's 'random.tex' (not found)}}
-
-\ifx\nextrandom\undefined
-
- \def\setrannum#1#2#3{#1=1 }
- \def\setrandim#1#2#3{#1=1pt}
-
-\else
-
- \let\normalnextrandom=\nextrandom
-
- \def\nextrandom%
- {\bgroup
- \let\time =\normaltime
- \let\day =\normalday
- \let\month=\normalmonth
- \let\year =\normalyear
- \normalnextrandom
- \global\let\nextrandom=\normalnextrandom
- \egroup}
-
-\fi
-
-\let\getrandomcount = \setrannum
-\let\getrandomdimen = \setrandim
-
-\def\getrandomnumber#1#2#3%
- {\getrandomcount{\scratchcounter}{#2}{#3}%
- \edef#1{\the\scratchcounter}}
-
-\def\getrandomfloat#1#2#3%
- {\getrandomdimen{\scratchdimen}{#2pt}{#3pt}%
- \edef#1{\withoutpt\the\scratchdimen}}
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=thrd-ran,
+%D version=1998.01.21,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=Random Number 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.
+
+\writestatus{loading}{Third Party Macros / Random Number Generation}
+
+%D \macros
+%D {getrandomcount, getrandomdimen,
+%D getrandomfloat, getrandomnumber}
+%D
+%D This module load Donald Arseneau's generic file
+%D \type{random.tex}. A small shell is needed because we
+%D redefine some \TEX\ primitives. We also use different names
+%D for the two generators and add an extra one.
+%D
+%D \starttypen
+%D \getrandomcount \countregister {minimum} {maximum}
+%D \getrandomdimen \dimenregister {minimum} {maximum}
+%D \getrandomnumber \macroname {minimum} {maximum}
+%D \getrandomfloat \macroname {minimum} {maximum}
+%D \stoptypen
+%D
+%D Of course the file \type{random.tex} needs to be present.
+
+\readfile{random.tex}
+ {\writestatus{loading}{Donald Arseneau's 'random.tex' (found)}}
+ {\writestatus{loading}{Donald Arseneau's 'random.tex' (not found)}}
+
+\ifx\nextrandom\undefined
+
+ \def\setrannum#1#2#3{#1=1 }
+ \def\setrandim#1#2#3{#1=1pt}
+
+\else
+
+ \let\normalnextrandom=\nextrandom
+
+ \def\nextrandom%
+ {\bgroup
+ \let\time =\normaltime
+ \let\day =\normalday
+ \let\month=\normalmonth
+ \let\year =\normalyear
+ \normalnextrandom
+ \global\let\nextrandom=\normalnextrandom
+ \egroup}
+
+\fi
+
+\let\getrandomcount = \setrannum
+\let\getrandomdimen = \setrandim
+
+\def\getrandomnumber#1#2#3%
+ {\getrandomcount{\scratchcounter}{#2}{#3}%
+ \edef#1{\the\scratchcounter}}
+
+\def\getrandomfloat#1#2#3%
+ {\getrandomdimen{\scratchdimen}{#2pt}{#3pt}%
+ \edef#1{\withoutpt\the\scratchdimen}}
+
+\endinput
diff --git a/tex/context/base/tufte.tex b/tex/context/base/tufte.tex
new file mode 100644
index 000000000..72f39da35
--- /dev/null
+++ b/tex/context/base/tufte.tex
@@ -0,0 +1,13 @@
+We thrive in information||thick worlds because of our
+marvelous and everyday capacity to select, edit,
+single out, structure, highlight, group, pair, merge,
+harmonize, synthesize, focus, organize, condense,
+reduce, boil down, choose, categorize, catalog, classify,
+list, abstract, scan, look into, idealize, isolate,
+discriminate, distinguish, screen, pigeonhole, pick over,
+sort, integrate, blend, inspect, filter, lump, skip,
+smooth, chunk, average, approximate, cluster, aggregate,
+outline, summarize, itemize, review, dip into,
+flip through, browse, glance into, leaf through, skim,
+refine, enumerate, glean, synopsize, winnow the wheat
+from the chaff and separate the sheep from the goats.
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index 02dcaf8cc..807a932ac 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -1,1562 +1,1612 @@
-%D \module
-%D [ file=verb-ini,
-%D version=1997.12.22,
-%D title=\CONTEXT\ Verbatim 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 Because this module is quite independant of system macros,
-%D it can be used as a stand||alone verbatim environment.
-%D
-%D This is a sort of second release of \type{supp-ver} and
-%D therefore differs in some aspects from the implementation
-%D published in the \MAPS. The first change concern
-%D optimization of breaks, that is, the first and last two
-%D lines of verbatim blocks are kept together. The second
-%D adaption is due to the fact that I wanted to support pretty
-%D printing not only for \TEX\ sources, but also for \PERL,
-%D \METAPOST\ and probably more. The \JAVASCRIPT\ module is
-%D closely related to \PERL, so we will not mention that one
-%D again.
-
-\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 Verbatim Macros / Initialization}
-
-%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}
-
-%D The following indirect definitions enable us to implement
-%D all kind of \type{\obeyed} handlers.
-
-\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 The closing command is executed afterwards as an internal
-%D command and therefore should not be given explicitly when
-%D typesetting inline verbatim.
-
-%D \macros
-%D {processingverbatim}
-%D {}
-%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
-
-%D \macros
-%D {optimizeverbatim}
-%D
-%D One day, a collegue asked me why I didn't prevent breaking
-%D after a first or before a last verbatim line. At first sight
-%D I thought of using the two pass mechanism, but because we're
-%D already keeping track of individual lines, a more direct
-%D solution is possible: we just keep track of in what line
-%D we are. One can turn this feature off.
-
-\newif\ifoptimizeverbatim \optimizeverbatimtrue
-
-%D Before we implement display and file verbatim, we define
-%D some macros that deal with typesetting the individual lines.
-%D We keep track of the status by means of a character
-%D specification. This status variable tells us if we're
-%D skipping a first line or placing a first or last line.
-%D The next few examples show us where breaks are inserted.
-%D
-%D \bgroup
-%D
-%D \def\doverbatimnobreak%
-%D {\nobreak\hrule width 10cm\par\penalty500} % == \nobreak
-%D
-%D \def\doverbatimgoodbreak%
-%D {\nobreak\hrule width 3cm \par\penalty100} % >> \goodbreak
-%D
-%D \starttypen
-%D test
-%D test
-%D \stoptypen
-%D
-%D or
-%D
-%D \starttypen
-%D test
-%D test
-%D test
-%D test
-%D \stoptypen
-%D
-%D or
-%D
-%D \starttypen
-%D test
-%D
-%D test
-%D test
-%D test
-%D \stoptypen
-%D
-%D \egroup
-%D
-%D The long ones are \type{\nobreaks} and the short ones
-%D \type{\goodbreaks}. And this is how it's done:
-
-\def\doverbatimnobreak%
- {\ifoptimizeverbatim\par\penalty500\fi}
-
-\def\doverbatimgoodbreak%
- {\ifoptimizeverbatim\par\penalty100\fi}
-
-\def\doflushverbatimline%
- {\expandafter\dodoverbatimline\expandafter{\savedverbatimline}}
-
-\let\handleverbatimline=\relax
-
-\def\initializeverbatimline%
- {\global\let\savedverbatimline=\empty
- \ifskipfirstverbatimline
- \global\chardef\verbatimstatus=0
- \else
- \global\chardef\verbatimstatus=1
- \fi}
-
-\def\presetemptyverbatimline%
- {\ifcase\verbatimstatus
- \global\chardef\verbatimstatus=1
- \or
- \or
- % \ifoptimizeverbatim\else\doemptyverbatimline\fi
- \or
- \doflushverbatimline
- \global\let\savedverbatimline=\empty
- \doemptyverbatimline
- \global\chardef\verbatimstatus=2
- \else
- \doverbatimnobreak
- \doflushverbatimline
- \global\let\savedverbatimline=\empty
- \doemptyverbatimline
- \global\chardef\verbatimstatus=2
- \fi}
-
-\def\presetnormalverbatimline%
- {\ifcase\verbatimstatus
- \global\chardef\verbatimstatus=2
- \or
- \global\chardef\verbatimstatus=3
- \or
- \global\chardef\verbatimstatus=3
- \or
- \doflushverbatimline
- \global\chardef\verbatimstatus=4
- \or
- \doverbatimnobreak
- \doflushverbatimline
- \global\chardef\verbatimstatus=5
- \or
- \doverbatimgoodbreak
- \doflushverbatimline
- \fi
- \global\let\savedverbatimline=\verbatimline}
-
-\def\presetlastverbatimline%
- {\ifcase\verbatimstatus \or \or \or
- \doflushverbatimline
- \else
- \doverbatimnobreak
- \doflushverbatimline
- \fi}
-
-%D \macros
-%D {skipfirstverbatimline}
-%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 \macros
-%D {processdisplayverbatim}
-%D {}
-%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
- \initializeverbatimline
- \copyverbatimline}
-
-%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
- \obeypages
- \obeycharacters}
-
-%D \macros
-%D {eightbitcharacters,
-%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 {localcatcodes,
-%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\chardef\csname @@cc@@\the\scratchcounter\endcsname
- =\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
- \restorecatcodes
- \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
- {\def\next{#1 }%
- \gdef\verbatimline{#1}%
- \ifx\next\emptyspace%
- \presetemptyverbatimline%
- \else%
- \edef\next{\meaning\next}%
- \ifx\next\endofverbatimcommand%
- \presetlastverbatimline%
- \def\copyverbatimline{\egroup\endofdisplayverbatim}%
- \else%
- \presetnormalverbatimline%
- \fi%
- \fi%
- \handleverbatimline%
- \copyverbatimline}}
-
-%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. The \type{\relax} can be used to
-%D determine the end of the line when one implements a scanner
-%D routine.
-
-\newif\iflinepar
-
-\let\doopenupverbatimline=\empty
-
-\long\def\dodoverbatimline#1%
- {\leavevmode
- \doopenupverbatimline
- \the\everyline\strut\processverbatimline{#1\relax}%
- \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% We don't use \let here!
- {\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
-
-\def\processverbatimline#1{#1} % remove the fake grouping
-
-\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 We reserve a dedicated file handle.
-
-\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
- \skipfirstverbatimlinefalse
- \initializeverbatimline
- \def\readline%
- {\read\verbatiminput to \verbatimline
- \ifeof\verbatiminput
- \presetlastverbatimline
- \let\readline=\relax
- \else\ifx\verbatimline\emptyline
- \presetemptyverbatimline
- \else\ifx\verbatimline\emptypage
- \presetemptyverbatimline
- \else
- \presetnormalverbatimline
- \fi\fi\fi
- \handleverbatimline
- \readline}%
- \ifeof\verbatiminput \else
- \expandafter\readline
- \fi
- \closein\verbatiminput
- \egroup
- \ignorespaces}
-
-%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 The next part of this module deals with pretty printing. The
-%D best way to understand how pretty verbatim typeseting works
-%D is to take a look at the output produced by the \TEX, \PERL\
-%D and \METAPOST\ modules first. Each of these modules has a
-%D few setup macros that tag the individual characters with a
-%D number that itself is associated to a interpretation macro.
-%D A previous implementation linked characters (after making
-%D them active) directly to such interpreters, but the more
-%D indirect way makes it possible to inspect the next
-%D character(s) without much expansion problems and/or
-%D increasing run time.
-
-%D By the way, \TEX\ defines \type{\+} as an outer macro, so we
-%D have to redefine this one to keep ourselves out of complaints.
-
-\def\+{\tabalign}
-
-%D Just to keep things consistant and to speed up some macros a
-%D but, we define a few private constants.
-
-\def\!!PRETTY {PRETTY}
-
-\def\!!prettyone {prettyone}
-\def\!!prettytwo {prettytwo}
-\def\!!prettythree {prettythree}
-\def\!!prettyfour {prettyfour}
-
-%D The first step in defining a pretty interpreter is to assign
-%D each character that needs special attention a number, like:
-%D
-%D \starttypen
-%D \setpretty \`A 21
-%D \stoptypen
-%D
-%D Here the macro \type{\setpretty} makes the character
-%D \type{A} active, and sets it meaning to the auxiliary macro
-%D \type{\handleprettytoken}. This auxiliary macro takes the
-%D character code (a number) and the interpretation number. The
-%D three step implementation uses the \TEX book \type{~} trick.
-
-\def\dodosetpretty%
- {\!!countb=\uccode`~\relax
- \catcode\!!countb=\@@active
- \uppercase{\edef~{\noexpand\handleprettytoken{\the\!!counta}{\the\!!countb}}}}
-
-\def\dosetpretty%
- {\afterassignment\dodosetpretty\!!counta}
-
-\def\setpretty%
- {\afterassignment\dosetpretty\uccode`~=}
-
-%D The macro \type{\handleprettytoken} is rather trivial and
-%D calls for an interpreter macro.
-
-\def\handleprettytoken#1%
- {\getvalue{\!!PRETTY#1}}
-
-%D This interpreter is installed by saying
-%D
-%D \starttypen
-%D \installprettyhandler 21 \SOMEprettyone
-%D \stoptypen
-
-\def\installprettyhandler#1 #2%
- {\letvalue{\!!PRETTY#1}#2}
-
-%D Such an interpreter gets the character number:
-%D
-%D \starttypen
-%D \def\SOMEprettyone#1{...\getpretty{#1}...}
-%D \stoptypen
-%D
-%D where \type{\getpretty} equals \type{\char}. We can't
-%D use \type{\let} here because we have to get rid of the
-%D braces.
-
-\def\getpretty#1%
- {\char#1}
-
-%D Sometimes the action depends on the next token. This token
-%D can be passed to the macro \type{\getprettydata}, that sets
-%D \type{\prettytype} to the interpreter code. The character
-%D code is saved in \type{\prettychar}.
-
-\def\getprettydata#1%
- {\bgroup
- \global\chardef\prettytype=0
- \global\chardef\prettychar=0
- \def\handleprettytoken##1##2%
- {\global\chardef\prettytype=##1\relax
- \global\chardef\prettychar=##2\relax}%
- \setbox0=\hbox{\global\chardef\prettychar=0#1}% expands #1 and ignores space
- \egroup}
-
-%D If needed the current and next token can be handled alongside:
-
-\def\getpretties#1#2%
- {\char#1\bgroup\let\handleprettytoken=\getsecondpretty#2\egroup}
-
-\def\getsecondpretty#1#2%
- {\char#2}
-
-%D When needed, one can reassign an interpreter by using
-%D \type{\newpretty} and its associates.
-%D
-%D \bgroup
-%D \steltypenin[file][optie=tex,palet=colorpretty]
-%D
-%D \startbuffer
-%D \bgroup
-%D \catcode`\|=\@@escape %%\|\
-%D \catcode`\\=\@@active %%\\+
-%D |gdef|dohandlenewpretty#1%
-%D {|def|dodohandlenewpretty##1%
-%D {|getprettydata{#1}%
-%D |let|oldprettychar=|prettychar
-%D |getprettydata{##1}%
-%D |ifnum|oldprettychar=|prettychar
-%D |def|dododohandlenewpretty####1%
-%D {|getprettydata{\}%
-%D |let|oldprettytype=|prettytype
-%D |getprettydata{####1}%
-%D |ifnum|prettytype=|oldprettytype
-%D |let|next=|newpretty
-%D |else
-%D |def|next{|newprettycommand{#1}##1####1}%
-%D |fi
-%D |next}%
-%D |let|next=|dododohandlenewpretty
-%D |else
-%D |def|next{|newprettycommand{#1}##1}%
-%D |fi
-%D |next}%
-%D |def|donohandlenewpretty##1%
-%D {|newprettycommand{#1}##1}%
-%D |handlenextnextpretty|dodohandlenewpretty|donohandlenewpretty}
-%D |egroup
-%D \stopbuffer
-%D
-%D {\newprettytrue\typebuffer}
-%D
-%D In this example we see that the colors differ from what we
-%D expect, but conform the definitions in the macro. This kind
-%D of recoloring can be achieved by saying:
-%D
-%D \typebuffer
-%D
-%D We'll show some more examples:
-%D
-%D \startbuffer
-%D %%\R{Red
-%D %%\G\Green
-%D %%\B[Blue
-%D \stopbuffer
-%D
-%D {\newprettytrue\typebuffer}
-%D
-%D Watch the green \type{\Green}! This lines are specified as:
-%D
-%D \typebuffer
-%D
-%D When needed, one can use grouping.
-%D
-%D \startbuffer
-%D {yes} %%\ B %%\{[ %%\}]
-%D {no}
-%D {no} %%\ E
-%D {yes}
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D This leads to:
-%D
-%D {\newprettytrue\typebuffer}
-%D
-%D I won't explain the details of this mechanism. Those who
-%D want to build their own pretty interpreters have to close
-%D read the source anyway.
-%D
-%D Last we show an example of mixed pretty typesetting:
-%D
-%D \startbuffer
-%D \ziezo{test} %%\ P ##\ B##\ T % enter PERL mode %%\ E
-%D if $test eq "test" ##\ B ##\ B##\ T % begin group (\bgroup) %%\ E
-%D if $test eq "test"; ##\ T %%\ B%%\ T % enter TEX mode %%\ E
-%D \ziezo{test} %%\ M %%\ B%%\ T % enter METAPOST mode %%\ E
-%D draw (0,0)--(10,10); %%\ E ##\ B##\ T % end group (\egroup) %%\ E
-%D if $test eq "test";
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D Here we use \type{%%\ T}, \type{%%\ P} and \type{%%\ M} for
-%D switching between \TEX, \PERL\ and \METAPOST\ mode.
-%D
-%D {\newprettytrue\typebuffer}
-%D
-%D \egroup
-%D
-%D Don't forget to set:
-
-\newif\ifnewpretty
-
-\def\installnewpretty%
- {\def\doinstallnewpretty##1%
- {\setvalue{NP::\the\scratchcounter}{##1}}%
- \afterassignment\doinstallnewpretty\scratchcounter=`}
-
-%D Let's define the options we used here:
-
-\let\prettyend =\relax
-\def\prettybegin{\bgroup\let\prettyend=\egroup}
-
-\installnewpretty B \prettybegin
-\installnewpretty E \prettyend
-
-\installnewpretty J \setupprettyJVtype
-\installnewpretty M \setupprettyMPtype
-\installnewpretty P \setupprettyPLtype
-\installnewpretty T \setupprettyTEXtype
-
-%D This means that when the interpreter modules support this
-%D mechanism, by default we have four options at available.
-
-\def\newpretty#1%
- {\getprettydata{#1}%
- \ifnum\prettytype=0
- \expandafter\nonewpretty
- \else
- \expandafter\donewpretty
- \fi
- #1}
-
-\def\nonewpretty#1#2%
- {\getprettydata{#2}%
- \getvalue{NP::\the\prettychar}}
-
-\def\donewpretty#1%
- {\bgroup
- \def\handleprettytoken##1##2##3%
- {\getprettydata{##3}%
- \egroup
- \ifnum\prettytype>0
- \setpretty##2=\prettytype\relax
- \fi}%
- #1}
-
-%D When implementing new pretty macros, one only needs to
-%D define something like:
-%D
-%D \starttypen
-%D \def\TEXtypezero%
-%D {\handlenewpretty\TEXtypethree}
-%D \stoptypen
-%D
-%D Here the number states the category (in our examples the
-%D backslash). The second argument takes care of normal
-%D situations.
-
-\def\handlenewpretty#1%
- {\let\newprettycommand=#1%
- \handlenextnextpretty\dohandlenewpretty\newprettycommand}
-
-%D The previous shown implementation only interprets single
-%D comments, but the final one also accepts double ones. The
-%D main reason for this is that in \JAVA\ we have to deal with
-%D \type{//}. Personally I prefer the double \type{%%} because
-%D is stands out and is more symmetrical with the double
-%D slash.
-
-\bgroup
-\catcode`\|=\@@escape
-\catcode`\\=\@@active
-|gdef|dohandlenewpretty#1%
- {|def|dodohandlenewpretty##1%
- {|getprettydata{#1}%
- |let|oldprettychar=|prettychar
- |getprettydata{##1}%
- |ifnum|oldprettychar=|prettychar
- |def|dododohandlenewpretty####1%
- {|getprettydata{\}%
- |let|oldprettytype=|prettytype
- |getprettydata{####1}%
- |ifnum|prettytype=|oldprettytype
- |let|next=|newpretty
- |else
- |def|next{|newprettycommand{#1}##1####1}%
- |fi
- |next}%
- |let|next=|dododohandlenewpretty
- |else
- |def|next{|newprettycommand{#1}##1}%
- |fi
- |next}%
- |def|donohandlenewpretty##1%
- {|newprettycommand{#1}##1}%
- |handlenextnextpretty|dodohandlenewpretty|donohandlenewpretty}
-|egroup
-
-%D The `nextnext' macro we used in the previous definition
-%D looks ahead. This is needed because individual lines are
-%D handles by macro's and the next character can be something
-%D that ends the line and/or does not belong to the verbatim
-%D data.
-
-\def\handlenextnextpretty#1#2#3%
- {\def\dohandlenextnextpretty%
- {\ifx\next\bgroup % something {}
- \let\next=#2%
- \else\ifx\next\relax % end of line / signal
- \let\next=#2%
- %\else\ifx\next\egroup % end of line / no signal
- % \let\next=#2%
- %\else\ifx\next\par % end of line / \par
- \let\next=#2%
- \else
- \let\next=#1%
- \fi\fi%\fi\fi
- \next{#3}}%
- \futurelet\next\dohandlenextnextpretty}
-
-%D The pretty interpreters can (and will) change the meaning of
-%D some controls. To enable them calling the originals we save
-%D their meanings and to enable nesting we permit this only
-%D once.
-
-\def\saveprettycontrols%
- {\global\let\oldobeyedspace = \obeyedspace
- \global\let\oldobeyedline = \obeyedline
- \global\let\oldobeyedpage = \obeyedpage
- \let\saveprettycontrols = \relax}
-
-%D The \PERL\ and \METAPOST\ interpreters will also handle
-%D reserved words. Sets of identifiers are defined like:
-%D
-%D \starttypen
-%D \useprettyidentifiers \MODULAidentifiers \MODULAsetspecials
-%D if then else elsif case while do repeat until ...
-%D \stoptypen
-%D
-%D New entries can be added to existing sets by repeatedly
-%D using this command.
-
-\def\useprettyidentifiers#1#2% \variable \presetcatcodes
- {\bgroup
- \ifx#1\undefined
- \global\let#1=\empty
- \fi
- \def\handleprettytoken##1##2{\char##2}%
- #2\relax
- \def\douseprettyidentifiers##1\par%
- {\xdef#1{\space#1\space ##1}%
- \egroup}%
- \douseprettyidentifiers}
-
-%D We can test om identifiers with:
-
-\def\doifprettyidentifierelse#1%
- {\doifincsnameelse{\space#1\space}}
-
-%D \macros
-%D {prettyidentifierfont,prettyvariablefont}
-%D
-%D When one want to typeset identifiers and system variables
-%D in a different typeface, one has to set the next two
-%D variables.
-
-\let\prettyidentifierfont=\relax
-\let\prettyvariablefont =\relax
-
-%D The interpreter macros are loaded at run time. The main
-%D reason lays in the fact that we don't want to have the
-%D identifier lists hard coded in the format file. To prevent
-%D repetitive loading, one should load the modules before the
-%D first call to the macros.
-%D
-%D \starttypen
-%D \input verb-tex.tex
-%D \input verb-pl.tex
-%D \input verb-mp.tex
-%D \input verb-jv.tex
-%D \stoptypen
-%D
-%D In \CONTEXT\ we follow a different thread, and therefore all
-%D macros in the additional modules use \type{\gdef}'s and
-%D \type{\doglobal}'s. Manipulating \type{\globaldef} is
-%D possible but leads to fuzzy situations.
-
-%D The rest of this module is dedicated to non \CONTEXT\ users
-%D and shows an example of an verbatim environment based on the
-%D previous macros.
-%D
-%D The 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
-
-\ifCONTEXT \else
-
- \def\presettyping%
- {\ifcontrolspace
- \let\obeyspace=\setcontrolspace
- \fi
- \ifverbatimtabs
- \let\obeytabs=\settabskips
- \fi
- \ifprettyverbatim
- \let\obeycharacters=\setupprettytype
- \fi}
-
- \def\type%
- {\bgroup
- \presettyping
- \processinlineverbatim{\egroup}}
-
- \def\starttyping%
- {\bgroup
- \presettyping
- \processdisplayverbatim{\stoptyping}}
-
- \def\stoptyping%
- {\egroup}
-
- \def\typefile#1%
- {\bgroup
- \presettyping
- \processfileverbatim{#1}%
- \egroup}
-
-\fi
-
-%D In \CONTEXT\ users say things like:
-%D
-%D \starttypen
-%D \definetyping [TEX] [option=TEX]
-%D \definetyping [MP] [option=MP]
-%D \definetyping [PL] [option=PL]
-%D \definetyping [JV] [option=JV]
-%D \stoptypen
-%D
-%D or
-%D
-%D \starttypen
-%D \setuptyping[file][option=color]
-%D \stoptypen
-%D
-%D That way \CONTEXT\ selects the appropriate interpreter
-%D itself, but more on that in another module. In other
-%D packages one can define:
-
-\ifCONTEXT \else
-
- \input verb-tex
- \input verb-mp
- \input verb-pl
- \input verb-jv
-
- \def\startTEX%
- {\bgroup \everypar{}%
- \let\obeycharacters=\setupprettyTEXtype
- \processdisplayverbatim{\stopTEX}}
-
- \def\startMP%
- {\bgroup \everypar{}%
- \let\obeycharacters=\setupprettyMPtype
- \processdisplayverbatim{\stopMP}}
-
- \def\startPL%
- {\bgroup \everypar{}%
- \let\obeycharacters=\setupprettyPLtype
- \processdisplayverbatim{\stopPL}}
-
- \def\startJV%
- {\bgroup \everypar{}%
- \let\obeycharacters=\setupprettyJVtype
- \processdisplayverbatim{\stopJV}}
-
- \let\stopTEX=\egroup
- \let\stopMP =\egroup
- \let\stopPL =\egroup
- \let\stopJV =\egroup
-
-\fi
-
-%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.
-
-\ifCONTEXT \else
-
- \def\setcolorverbatim%
- {\def\prettyone {.9 .0 .0 } % red
- \def\prettytwo {.0 .8 .0 } % green
- \def\prettythree {.0 .0 .9 } % blue
- \def\prettyfour {.8 .8 .6 } % yellow
- \def\beginofpretty[##1]%
- {\special{ps:: \csname##1\endcsname setrgbcolor}}
- \def\endofpretty%
- {\special{ps:: 0 0 0 setrgbcolor}}} % black
-
- \def\setgrayverbatim%
- {\def\prettyone {.30 } % gray
- \def\prettytwo {.45 } % gray
- \def\prettythree {.60 } % gray
- \def\prettyfour {.75 } % gray
- \def\beginofpretty[##1]%
- {\special{ps:: \csname##1\endcsname setgray}}
- \def\endofpretty%
- {\special{ps:: 0 setgray}}} % black
-
-\fi
-
-%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.
-
-\ifCONTEXT \else \setcolorverbatim \fi
-
-%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.
-
-%D The previous version of this module was published in the
-%D \MAPS\ of the dutch \TEX\ users group \NTG. In that article,
-%D the verbatim part of the text was typeset with the following
-%D 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 \let\stoptypen=\egroup
-%D \stoptypen
-%D
-%D We also used:
-%D
-%D \starttypen
-%D \def\startdefinition%
-%D {\bgroup
-%D \everypar{} % Again we disable some troublesome mechanisms.
-%D \let\obeycharacters=\setupprettyTEXtype % See verb-tex.tex!
-%D \EveryPar{\showparagraphcounter}%
-%D \EveryLine{\showlinecounter}%
-%D \verbatimbodyfont
-%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 We can influence the verbatim environment with the following
-%D macro:
-%D
-%D \starttypen
-%D \obeyemptylines
-%D \stoptypen
-%D
-%D Some needs are fulfilled already with:
-%D
-%D \starttypen
-%D \setcontrolspace \settabskips
-%D \stoptypen
-%D
-%D lines can be enhanced with ornaments using:
-%D
-%D \starttypen
-%D \everypar \everyline \iflinepar
-%D \stoptypen
-%D
-%D and pretty verbatim support is implemented by:
-%D
-%D \starttypen
-%D \beginofpretty[#1] ... \endofpretty
-%D \stoptypen
-%D
-%D and some setup macro, like:
-%D
-%D \starttypen
-%D \setupprettyIDENTIFIERtype
-%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 prettyone}, {\em prettytwo}, {\em
-%D prettythree} and {\em prettyfour}. 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.
-
-\ifCONTEXT
-
- \let\doifendofverbatim=\doifelse
-
- \def\permitshiftedendofverbatim%
- {\let\doifendofverbatim=\doifinstringelse}
-
- \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
- \initializeverbatimline
- \copyverbatimline}
-
- {\obeylines%
- \long\gdef\copyverbatimline#1
- {\convertargument#1 \to\next%
- \gdef\verbatimline{#1}%
- \ifx\next\emptyspace%
- \presetemptyverbatimline%
- \else%
- \doifendofverbatim{\endofverbatimcommand}{\next}%
- {\presetlastverbatimline%
- \def\copyverbatimline{\egroup\endofdisplayverbatim}}%
- {\presetnormalverbatimline}%
- \fi%
- \handleverbatimline%
- \copyverbatimline}}
-
-\fi
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=verb-ini,
+%D version=1997.12.22,
+%D title=\CONTEXT\ Verbatim 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 Because this module is quite independant of system macros,
+%D it can be used as a stand||alone verbatim environment.
+%D
+%D This is a sort of second release of \type{supp-ver} and
+%D therefore differs in some aspects from the implementation
+%D published in the \MAPS. The first change concern
+%D optimization of breaks, that is, the first and last two
+%D lines of verbatim blocks are kept together. The second
+%D adaption is due to the fact that I wanted to support pretty
+%D printing not only for \TEX\ sources, but also for \PERL,
+%D \METAPOST\ and probably more. The \JAVASCRIPT\ module is
+%D closely related to \PERL, so we will not mention that one
+%D again.
+
+\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 Verbatim Macros / Initialization}
+
+%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 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}
+
+%D The following indirect definitions enable us to implement
+%D all kind of \type{\obeyed} handlers.
+
+\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=\@@ignore} % \@@active\def^^L{\obeyedline}}
+\gdef\ignoreeofs {\catcode`\^^Z=\@@ignore}
+
+\egroup
+
+%D \macros
+%D {obeycharacters}
+%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 The closing command is executed afterwards as an internal
+%D command and therefore should not be given explicitly when
+%D typesetting inline verbatim.
+
+%D \macros
+%D {processingverbatim}
+%D {}
+%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
+
+%D \macros
+%D {optimizeverbatim}
+%D
+%D One day, a collegue asked me why I didn't prevent breaking
+%D after a first or before a last verbatim line. At first sight
+%D I thought of using the two pass mechanism, but because we're
+%D already keeping track of individual lines, a more direct
+%D solution is possible: we just keep track of in what line
+%D we are. One can turn this feature off.
+
+\newif\ifoptimizeverbatim \optimizeverbatimtrue
+
+%D Before we implement display and file verbatim, we define
+%D some macros that deal with typesetting the individual lines.
+%D We keep track of the status by means of a character
+%D specification. This status variable tells us if we're
+%D skipping a first line or placing a first or last line.
+%D The next few examples show us where breaks are inserted.
+%D
+%D \bgroup
+%D
+%D \def\doverbatimnobreak%
+%D {\nobreak\hrule width 10cm\par\penalty500} % == \nobreak
+%D
+%D \def\doverbatimgoodbreak%
+%D {\nobreak\hrule width 3cm \par\penalty100} % >> \goodbreak
+%D
+%D \starttypen
+%D test
+%D test
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D test
+%D test
+%D test
+%D test
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D test
+%D
+%D test
+%D test
+%D test
+%D \stoptypen
+%D
+%D \egroup
+%D
+%D The long ones are \type{\nobreaks} and the short ones
+%D \type{\goodbreaks}. And this is how it's done:
+
+\def\doverbatimnobreak%
+ {\ifoptimizeverbatim\penalty500\fi}
+
+\def\doverbatimgoodbreak%
+ {\ifoptimizeverbatim\penalty100\fi}
+
+\def\doflushverbatimline%
+ {\expandafter\dodoverbatimline\expandafter{\savedverbatimline}}
+
+\let\handleverbatimline=\relax
+
+\def\initializeverbatimline%
+ {\global\let\savedverbatimline=\empty
+ \ifskipfirstverbatimline
+ \global\chardef\verbatimstatus=0
+ \else
+ \global\chardef\verbatimstatus=1
+ \fi}
+
+\def\presetemptyverbatimline%
+ {\ifcase\verbatimstatus
+ \global\chardef\verbatimstatus=1
+ \or
+ \or
+ % \ifoptimizeverbatim\else\doemptyverbatimline\fi
+ \or
+ \doflushverbatimline
+ \global\let\savedverbatimline=\empty
+ \doemptyverbatimline
+ \global\chardef\verbatimstatus=2
+ \else
+ \kern\!!zeropoint
+ \doverbatimnobreak
+ \doflushverbatimline
+ \global\let\savedverbatimline=\empty
+ \doemptyverbatimline
+ \global\chardef\verbatimstatus=2
+ \fi}
+
+\def\presetnormalverbatimline%
+ {\ifcase\verbatimstatus
+ \global\chardef\verbatimstatus=2
+ \or
+ \global\chardef\verbatimstatus=3
+ \or
+ \global\chardef\verbatimstatus=3
+ \or
+ \doflushverbatimline
+ \global\chardef\verbatimstatus=4
+ \or
+ \kern\!!zeropoint
+ \doverbatimnobreak
+ \doflushverbatimline
+ \global\chardef\verbatimstatus=5
+ \or
+ \doverbatimgoodbreak
+ \doflushverbatimline
+ \fi
+ \global\let\savedverbatimline=\verbatimline}
+
+\def\presetlastverbatimline%
+ {\ifcase\verbatimstatus \or \or \or
+ \doflushverbatimline
+ \else
+ \kern\!!zeropoint
+ \doverbatimnobreak
+ \doflushverbatimline
+ \fi}
+
+%D \macros
+%D {skipfirstverbatimline}
+%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 \macros
+%D {processdisplayverbatim}
+%D {}
+%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
+ \global\linepartrue
+ \expandafter\let\csname\verbatimname\endcsname=\relax
+ \edef\endofverbatimcommand{\csname\verbatimname\endcsname}%
+ \edef\endofverbatimcommand{\meaning\endofverbatimcommand}%
+ \verbatimfont
+ \setupcopyverbatim
+ \initializeverbatimline
+ \copyverbatimline}
+
+%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
+ \obeypages
+ \obeycharacters}
+
+%D \macros
+%D {eightbitcharacters,
+%D setcatcodes,uncatcodespecials,
+%D uncatcodecharacters,
+%D setnaturalcatcodes}
+%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}
+
+\def\setnaturalcatcodes%
+ {\catcode`\!=\@@other \catcode`\?=\@@other \catcode`\@=\@@other
+ \catcode`\#=\@@other \catcode`\&=\@@other \catcode`\|=\@@other
+ \catcode`\$=\@@other \catcode`\^=\@@other \catcode`\_=\@@other
+ \catcode`\*=\@@other \catcode`\/=\@@other
+ \catcode`\-=\@@other \catcode`\+=\@@other
+ \catcode`\==\@@other \catcode`\<=\@@other \catcode`\>=\@@other
+ \catcode`\"=\@@other \catcode`\'=\@@other \catcode`\`=\@@other
+ \catcode`\:=\@@other \catcode`\;=\@@other
+ \catcode`\,=\@@other \catcode`\.=\@@other \catcode`\~=\@@other
+ \catcode`\(=\@@other \catcode`\)=\@@other
+ \catcode`\{=\@@other \catcode`\}=\@@other}
+
+%D \macros
+%D {localcatcodes,
+%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
+ \saverestoreactivecatcode
+ {\@EA\let\csname @@aa@@\the\scratchcounter\endcsname=~}%
+ \@EA\chardef\csname @@cc@@\the\scratchcounter\endcsname
+ =\catcode\scratchcounter
+ \fi}
+
+%D It's counterpart is:
+
+\def\restorecatcode%
+ {\@EA\catcode\@EA\scratchcounter\@EA=
+ \csname @@cc@@\the\scratchcounter\endcsname
+ \saverestoreactivecatcode
+ {\@EA\let\@EA~\@EA=\csname @@aa@@\the\scratchcounter\endcsname}}
+
+%D Especially when we enable pretty printing, we need to
+%D restore the meaning of active characters too. Just think of
+%D using \type{||} in headers and footers.
+
+\def\saverestoreactivecatcode#1%
+ {\edef\saveduccode{\the\uccode`~}%
+ \uccode`~=\scratchcounter
+ \uppercase{#1}%
+ \uccode`~=\saveduccode}
+
+%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
+ \restorecatcodes
+ \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
+ {\def\next{#1 }%
+ \gdef\verbatimline{#1}%
+ \ifx\next\emptyspace%
+ \presetemptyverbatimline%
+ \else%
+ \edef\next{\meaning\next}%
+ \ifx\next\endofverbatimcommand%
+ \presetlastverbatimline%
+ \def\copyverbatimline{\egroup\endofdisplayverbatim}%
+ \else%
+ \presetnormalverbatimline%
+ \fi%
+ \fi%
+ \handleverbatimline%
+ \copyverbatimline}}
+
+%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. The \type{\relax} can be used to
+%D determine the end of the line when one implements a scanner
+%D routine.
+
+\newif\iflinepar
+
+\let\doopenupverbatimline=\empty
+
+% \long\def\dodoverbatimline#1%
+% {\leavevmode
+% \doopenupverbatimline
+% \the\everyline\strut\processverbatimline{#1\relax}%
+% \EveryPar{}%
+% \global\lineparfalse
+% \obeyedline\par}
+
+\long\def\dodoverbatimline#1% we don't want to group
+ {\bgroup % due to pretty status
+ \iflinepar\else\EveryPar{}\fi
+ \leavevmode
+ \xdef\dokeepverbatimlinedata%
+ {\parindent=\the\parindent
+ \hangindent=\the\hangindent
+ \hangafter=\the\hangafter
+ \leftskip =\the\leftskip
+ \rightskip=\the\rightskip}%
+ \egroup
+ \dokeepverbatimlinedata
+ \doopenupverbatimline
+ \the\everyline\strut
+ \processverbatimline{#1\relax}%
+ \global\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% We don't use \let here!
+ {\baselineskip}
+
+\def\doemptyverbatimline%
+ {\vskip\verbatimbaselineskip
+ {\setbox0=\hbox{\the\everyline}}%
+ \global\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.
+
+\chardef\spacespertab=7
+
+\def\doprocesstabskip%
+ {\obeyedspace % \hskip.5em or \hbox to .5em{}
+ \ifdone
+ \advance\scratchcounter by 1
+ \let\next=\doprocesstabskip
+ \donefalse
+ \else\ifnum\scratchcounter>\spacespertab
+ \let\next=\relax
+ \else
+ \advance\scratchcounter 1
+ \let\next=\doprocesstabskip
+ \fi\fi
+ \next}
+
+\def\dodoprocesstabskipline#1#2\endoftabskipping%
+ {\ifnum\scratchcounter>\spacespertab
+ \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
+
+\def\processverbatimline#1{#1} % remove the fake grouping
+
+\def\doprocesstabskipline#1%
+ {\bgroup
+ \scratchcounter=1
+ \dodoprocesstabskipline#1\relax\endoftabskipping
+ \egroup}
+
+%D \macros
+%D {processfileverbatim}
+%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 We reserve a dedicated file handle.
+
+\newread\verbatiminput
+
+\def\processfileverbatim#1%
+ {\par
+ \bgroup
+ \parindent\!!zeropoint
+ \ifdim\lastskip<\parskip
+ \removelastskip
+ \vskip\parskip
+ \fi
+ \parskip\!!zeropoint
+ \processingverbatimtrue
+ \global\linepartrue
+ \uncatcodecharacters
+ \verbatimfont
+ \frenchspacing
+ \obeyspaces
+ \obeytabs
+ \obeylines
+ \obeypages
+ \obeycharacters
+ \ignoreeofs
+ \openin\verbatiminput=#1
+ \skipfirstverbatimlinefalse
+ \initializeverbatimline
+ \def\readline%
+ {\read\verbatiminput to \verbatimline
+ \ifeof\verbatiminput
+ \presetlastverbatimline
+ \let\readline=\relax
+ \else\ifx\verbatimline\emptyline
+ \presetemptyverbatimline
+ \else\ifx\verbatimline\emptypage
+ \presetemptyverbatimline
+ \else
+ \presetnormalverbatimline
+ \fi\fi\fi
+ \handleverbatimline
+ \readline}%
+ \ifeof\verbatiminput \else
+ \expandafter\readline
+ \fi
+ \closein\verbatiminput
+ \egroup
+ \ignorespaces}
+
+%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 The next part of this module deals with pretty printing. The
+%D best way to understand how pretty verbatim typeseting works
+%D is to take a look at the output produced by the \TEX, \PERL\
+%D and \METAPOST\ modules first. Each of these modules has a
+%D few setup macros that tag the individual characters with a
+%D number that itself is associated to a interpretation macro.
+%D A previous implementation linked characters (after making
+%D them active) directly to such interpreters, but the more
+%D indirect way makes it possible to inspect the next
+%D character(s) without much expansion problems and/or
+%D increasing run time.
+
+%D By the way, \TEX\ defines \type{\+} as an outer macro, so we
+%D have to redefine this one to keep ourselves out of complaints.
+
+\def\+{\tabalign}
+
+%D Just to keep things consistant and to speed up some macros a
+%D but, we define a few private constants.
+
+\def\!!PRETTY {PRETTY}
+
+\def\!!prettyone {prettyone}
+\def\!!prettytwo {prettytwo}
+\def\!!prettythree {prettythree}
+\def\!!prettyfour {prettyfour}
+
+%D The first step in defining a pretty interpreter is to assign
+%D each character that needs special attention a number, like:
+%D
+%D \starttypen
+%D \setpretty \`A 21
+%D \stoptypen
+%D
+%D Here the macro \type{\setpretty} makes the character
+%D \type{A} active, and sets it meaning to the auxiliary macro
+%D \type{\handleprettytoken}. This auxiliary macro takes the
+%D character code (a number) and the interpretation number. The
+%D three step implementation uses the \TEX book \type{~} trick.
+
+\def\dodosetpretty%
+ {\!!countb=\uccode`~\relax
+ \catcode\!!countb=\@@active
+ \uppercase{\edef~{\noexpand\handleprettytoken{\the\!!counta}{\the\!!countb}}}}
+
+\def\dosetpretty%
+ {\afterassignment\dodosetpretty\!!counta}
+
+\def\setpretty%
+ {\afterassignment\dosetpretty\uccode`~=}
+
+%D The macro \type{\handleprettytoken} is rather trivial and
+%D calls for an interpreter macro.
+
+\def\handleprettytoken#1%
+ {\getvalue{\!!PRETTY#1}}
+
+%D This interpreter is installed by saying
+%D
+%D \starttypen
+%D \installprettyhandler 21 \SOMEprettyone
+%D \stoptypen
+
+\def\installprettyhandler#1 #2%
+ {\letvalue{\!!PRETTY#1}#2}
+
+%D Such an interpreter gets the character number:
+%D
+%D \starttypen
+%D \def\SOMEprettyone#1{...\getpretty{#1}...}
+%D \stoptypen
+%D
+%D where \type{\getpretty} equals \type{\char}. We can't
+%D use \type{\let} here because we have to get rid of the
+%D braces.
+
+\def\getpretty#1%
+ {\char#1}
+
+%D Sometimes the action depends on the next token. This token
+%D can be passed to the macro \type{\getprettydata}, that sets
+%D \type{\prettytype} to the interpreter code. The character
+%D code is saved in \type{\prettychar}.
+
+\def\getprettydata#1%
+ {\bgroup
+ \global\chardef\prettytype=0
+ \global\chardef\prettychar=0
+ \def\handleprettytoken##1##2%
+ {\global\chardef\prettytype=##1\relax
+ \global\chardef\prettychar=##2\relax}%
+ \setbox0=\hbox{#1}% expands #1 and ignores space
+ \egroup}
+
+%D If needed the current and next token can be handled alongside:
+
+\def\getpretties#1#2%
+ {\char#1\bgroup\let\handleprettytoken=\getsecondpretty#2\egroup}
+
+\def\getsecondpretty#1#2%
+ {\char#2}
+
+%D When needed, one can reassign an interpreter by using
+%D \type{\newpretty} and its associates.
+%D
+%D \bgroup
+%D \steltypenin[file][optie=tex,palet=colorpretty]
+%D
+%D \startbuffer
+%D \bgroup
+%D \catcode`\|=\@@escape %%\|\
+%D \catcode`\\=\@@active %%\\+
+%D |gdef|dohandlenewpretty#1%
+%D {|def|dodohandlenewpretty##1%
+%D {|def|oldprettychar{#1}%
+%D |getprettydata{##1}%
+%D |ifnum|oldprettychar=|prettychar
+%D |def|dododohandlenewpretty####1%
+%D {|getprettydata{\}%
+%D |let|oldprettytype=|prettytype
+%D |getprettydata{####1}%
+%D |ifnum|prettytype=|oldprettytype
+%D |let|next=|newpretty
+%D |else
+%D |def|next{|newprettycommand{#1}##1####1}%
+%D |fi
+%D |next}%
+%D |let|next=|dododohandlenewpretty
+%D |else
+%D |def|next{|newprettycommand{#1}##1}%
+%D |fi
+%D |next}%
+%D |def|donohandlenewpretty##1%
+%D {|newprettycommand{#1}##1}%
+%D |handlenextnextpretty|dodohandlenewpretty|donohandlenewpretty}
+%D |egroup
+%D \stopbuffer
+%D
+%D {\newprettytrue\typebuffer}
+%D
+%D In this example we see that the colors differ from what we
+%D expect, but conform the definitions in the macro. This kind
+%D of recoloring can be achieved by saying:
+%D
+%D \typebuffer
+%D
+%D We'll show some more examples:
+%D
+%D \startbuffer
+%D %%\R{Red
+%D %%\G\Green
+%D %%\B[Blue
+%D \stopbuffer
+%D
+%D {\newprettytrue\typebuffer}
+%D
+%D Watch the green \type{\Green}! This lines are specified as:
+%D
+%D \typebuffer
+%D
+%D When needed, one can use grouping.
+%D
+%D \startbuffer
+%D {yes} %%\ B %%\{[ %%\}]
+%D {no}
+%D {no} %%\ E
+%D {yes}
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This leads to:
+%D
+%D {\newprettytrue\typebuffer}
+%D
+%D I won't explain the details of this mechanism. Those who
+%D want to build their own pretty interpreters have to close
+%D read the source anyway.
+%D
+%D Last we show an example of mixed pretty typesetting:
+%D
+%D \startbuffer
+%D \ziezo{test} %%\ P ##\ B##\ T % enter PERL mode %%\ E
+%D if $test eq "test" ##\ B ##\ B##\ T % begin group (\bgroup) %%\ E
+%D if $test eq "test"; ##\ T %%\ B%%\ T % enter TEX mode %%\ E
+%D \ziezo{test} %%\ M %%\ B%%\ T % enter METAPOST mode %%\ E
+%D draw (0,0)--(10,10); %%\ E ##\ B##\ T % end group (\egroup) %%\ E
+%D if $test eq "test";
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D Here we use \type{%%\ T}, \type{%%\ P} and \type{%%\ M} for
+%D switching between \TEX, \PERL\ and \METAPOST\ mode.
+%D
+%D {\newprettytrue\typebuffer}
+%D
+%D \egroup
+%D
+%D Don't forget to set:
+
+\newif\ifnewpretty
+
+\def\installnewpretty%
+ {\def\doinstallnewpretty##1%
+ {\setvalue{NP::\the\scratchcounter}{##1}}%
+ \afterassignment\doinstallnewpretty\scratchcounter=`}
+
+%D Let's define the options we used here:
+
+\newevery\everyprettyend\relax
+
+\let\prettyend=\relax
+
+\def\prettybegin%
+ {\bgroup\def\prettyend{\the\everyprettyend\egroup}}
+
+\installnewpretty B \prettybegin
+\installnewpretty E \prettyend
+
+\installnewpretty J \setupprettyJVtype
+\installnewpretty M \setupprettyMPtype
+\installnewpretty P \setupprettyPLtype
+\installnewpretty T \setupprettyTEXtype
+
+%D This means that when the interpreter modules support this
+%D mechanism, by default we have four options at available.
+
+\def\newpretty#1%
+ {\getprettydata{#1}%
+ \ifnum\prettytype=0
+ \expandafter\nonewpretty
+ \else
+ \expandafter\donewpretty
+ \fi
+ #1}
+
+\def\nonewpretty#1#2%
+ {\getprettydata{#2}%
+ \getvalue{NP::\the\prettychar}}
+
+\def\donewpretty#1%
+ {\bgroup
+ \def\handleprettytoken##1##2##3%
+ {\getprettydata{##3}%
+ \egroup
+ \ifnum\prettytype>0
+ \setpretty##2=\prettytype\relax
+ \fi}%
+ #1}
+
+%D When implementing new pretty macros, one only needs to
+%D define something like:
+%D
+%D \starttypen
+%D \def\TEXtypezero%
+%D {\handlenewpretty\TEXtypethree}
+%D \stoptypen
+%D
+%D Here the number states the category (in our examples the
+%D backslash). The second argument takes care of normal
+%D situations.
+
+\def\handlenewpretty#1%
+ {\let\newprettycommand=#1%
+ \handlenextnextpretty\dohandlenewpretty\newprettycommand}
+
+%D The previous shown implementation only interprets single
+%D comments, but the final one also accepts double ones. The
+%D main reason for this is that in \JAVA\ we have to deal with
+%D \type{//}. Personally I prefer the double \type{%%} because
+%D is stands out and is more symmetrical with the double
+%D slash.
+
+\bgroup
+\catcode`\|=\@@escape
+\catcode`\\=\@@active
+|gdef|dohandlenewpretty#1%
+ {|def|dodohandlenewpretty##1%
+ {|def|oldprettychar{#1}%
+ |getprettydata{##1}%
+ |ifnum|oldprettychar=|prettychar
+ |def|dododohandlenewpretty####1%
+ {|getprettydata{\}%
+ |let|oldprettytype=|prettytype
+ |getprettydata{####1}%
+ |ifnum|prettytype=|oldprettytype
+ |let|next=|newpretty
+ |else
+ |def|next{|newprettycommand{#1}##1####1}%
+ |fi
+ |next}%
+ |let|next=|dododohandlenewpretty
+ |else
+ |def|next{|newprettycommand{#1}##1}%
+ |fi
+ |next}%
+ |def|donohandlenewpretty##1%
+ {|newprettycommand{#1}##1}%
+ |handlenextnextpretty|dodohandlenewpretty|donohandlenewpretty}
+|egroup
+
+%D The `nextnext' macro we used in the previous definition
+%D looks ahead. This is needed because individual lines are
+%D handles by macro's and the next character can be something
+%D that ends the line and/or does not belong to the verbatim
+%D data.
+
+\def\handlenextnextpretty#1#2#3%
+ {\def\dohandlenextnextpretty%
+ {\ifx\next\bgroup % something {}
+ \let\next=#2%
+ \else\ifx\next\relax % end of line / signal
+ \let\next=#2%
+ %\else\ifx\next\egroup % end of line / no signal
+ % \let\next=#2%
+ %\else\ifx\next\par % end of line / \par
+ \let\next=#2%
+ \else
+ \let\next=#1%
+ \fi\fi%\fi\fi
+ \next{#3}}%
+ \futurelet\next\dohandlenextnextpretty}
+
+%D The pretty interpreters can (and will) change the meaning of
+%D some controls. To enable them calling the originals we save
+%D their meanings and to enable nesting we permit this only
+%D once.
+
+\def\saveprettycontrols%
+ {\global\let\oldobeyedspace = \obeyedspace
+ \global\let\oldobeyedline = \obeyedline
+ \global\let\oldobeyedpage = \obeyedpage
+ \let\saveprettycontrols = \relax}
+
+%D The \PERL\ and \METAPOST\ interpreters will also handle
+%D reserved words. Sets of identifiers are defined like:
+%D
+%D \starttypen
+%D \useprettyidentifiers \MODULAidentifiers \MODULAsetspecials
+%D if then else elsif case while do repeat until ...
+%D \stoptypen
+%D
+%D New entries can be added to existing sets by repeatedly
+%D using this command.
+
+\def\useprettyidentifiers#1#2% \variable \presetcatcodes
+ {\bgroup
+ \ifx#1\undefined
+ \global\let#1=\empty
+ \fi
+ \def\handleprettytoken##1##2{\char##2}%
+ #2\relax
+ \def\douseprettyidentifiers##1\par%
+ {\xdef#1{\space#1\space ##1}%
+ \egroup}%
+ \douseprettyidentifiers}
+
+%D We can test om identifiers with:
+
+\def\doifprettyidentifierelse#1%
+ {\doifincsnameelse{\space#1\space}}
+
+%D \macros
+%D {prettyidentifierfont,prettyvariablefont}
+%D
+%D When one want to typeset identifiers and system variables
+%D in a different typeface, one has to set the next two
+%D variables.
+
+\let\prettyidentifierfont=\relax
+\let\prettyvariablefont =\relax
+
+%D The interpreter macros are loaded at run time. The main
+%D reason lays in the fact that we don't want to have the
+%D identifier lists hard coded in the format file. To prevent
+%D repetitive loading, one should load the modules before the
+%D first call to the macros.
+%D
+%D \starttypen
+%D \input verb-tex.tex
+%D \input verb-pl.tex
+%D \input verb-mp.tex
+%D \input verb-jv.tex
+%D \stoptypen
+%D
+%D In \CONTEXT\ we follow a different thread, and therefore all
+%D macros in the additional modules use \type{\gdef}'s and
+%D \type{\doglobal}'s. Manipulating \type{\globaldef} is
+%D possible but leads to fuzzy situations.
+
+%D The rest of this module is dedicated to non \CONTEXT\ users
+%D and shows an example of an verbatim environment based on the
+%D previous macros.
+%D
+%D The 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
+
+\ifCONTEXT \else
+
+ \def\presettyping%
+ {\ifcontrolspace
+ \let\obeyspace=\setcontrolspace
+ \fi
+ \ifverbatimtabs
+ \let\obeytabs=\settabskips
+ \fi
+ \ifprettyverbatim
+ \let\obeycharacters=\setupprettytype
+ \fi}
+
+ \def\type%
+ {\bgroup
+ \presettyping
+ \processinlineverbatim{\egroup}}
+
+ \def\starttyping%
+ {\bgroup
+ \presettyping
+ \processdisplayverbatim{\stoptyping}}
+
+ \def\stoptyping%
+ {\egroup}
+
+ \def\typefile#1%
+ {\bgroup
+ \presettyping
+ \processfileverbatim{#1}%
+ \egroup}
+
+\fi
+
+%D In \CONTEXT\ users say things like:
+%D
+%D \starttypen
+%D \definetyping [TEX] [option=TEX]
+%D \definetyping [MP] [option=MP]
+%D \definetyping [PL] [option=PL]
+%D \definetyping [JV] [option=JV]
+%D \stoptypen
+%D
+%D or
+%D
+%D \starttypen
+%D \setuptyping[file][option=color]
+%D \stoptypen
+%D
+%D That way \CONTEXT\ selects the appropriate interpreter
+%D itself, but more on that in another module. In other
+%D packages one can define:
+
+\ifCONTEXT \else
+
+ \input verb-tex
+ \input verb-mp
+ \input verb-pl
+ \input verb-jv
+
+ \def\startTEX%
+ {\bgroup \everypar{}%
+ \let\obeycharacters=\setupprettyTEXtype
+ \processdisplayverbatim{\stopTEX}}
+
+ \def\startMP%
+ {\bgroup \everypar{}%
+ \let\obeycharacters=\setupprettyMPtype
+ \processdisplayverbatim{\stopMP}}
+
+ \def\startPL%
+ {\bgroup \everypar{}%
+ \let\obeycharacters=\setupprettyPLtype
+ \processdisplayverbatim{\stopPL}}
+
+ \def\startJV%
+ {\bgroup \everypar{}%
+ \let\obeycharacters=\setupprettyJVtype
+ \processdisplayverbatim{\stopJV}}
+
+ \let\stopTEX=\egroup
+ \let\stopMP =\egroup
+ \let\stopPL =\egroup
+ \let\stopJV =\egroup
+
+\fi
+
+%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.
+
+\ifCONTEXT \else
+
+ \def\setcolorverbatim%
+ {\def\prettyone {.9 .0 .0 } % red
+ \def\prettytwo {.0 .8 .0 } % green
+ \def\prettythree {.0 .0 .9 } % blue
+ \def\prettyfour {.8 .8 .6 } % yellow
+ \def\beginofpretty[##1]%
+ {\special{ps:: \csname##1\endcsname setrgbcolor}}
+ \def\endofpretty%
+ {\special{ps:: 0 0 0 setrgbcolor}}} % black
+
+ \def\setgrayverbatim%
+ {\def\prettyone {.30 } % gray
+ \def\prettytwo {.45 } % gray
+ \def\prettythree {.60 } % gray
+ \def\prettyfour {.75 } % gray
+ \def\beginofpretty[##1]%
+ {\special{ps:: \csname##1\endcsname setgray}}
+ \def\endofpretty%
+ {\special{ps:: 0 setgray}}} % black
+
+\fi
+
+%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.
+
+\ifCONTEXT \else \setcolorverbatim \fi
+
+%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.
+
+%D The previous version of this module was published in the
+%D \MAPS\ of the dutch \TEX\ users group \NTG. In that article,
+%D the verbatim part of the text was typeset with the following
+%D 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 \let\stoptypen=\egroup
+%D \stoptypen
+%D
+%D We also used:
+%D
+%D \starttypen
+%D \def\startdefinition%
+%D {\bgroup
+%D \everypar{} % Again we disable some troublesome mechanisms.
+%D \let\obeycharacters=\setupprettyTEXtype % See verb-tex.tex!
+%D \EveryPar{\showparagraphcounter}%
+%D \EveryLine{\showlinecounter}%
+%D \verbatimbodyfont
+%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 We can influence the verbatim environment with the following
+%D macro:
+%D
+%D \starttypen
+%D \obeyemptylines
+%D \stoptypen
+%D
+%D Some needs are fulfilled already with:
+%D
+%D \starttypen
+%D \setcontrolspace \settabskips
+%D \stoptypen
+%D
+%D lines can be enhanced with ornaments using:
+%D
+%D \starttypen
+%D \everypar \everyline \iflinepar
+%D \stoptypen
+%D
+%D and pretty verbatim support is implemented by:
+%D
+%D \starttypen
+%D \beginofpretty[#1] ... \endofpretty
+%D \stoptypen
+%D
+%D and some setup macro, like:
+%D
+%D \starttypen
+%D \setupprettyIDENTIFIERtype
+%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 prettyone}, {\em prettytwo}, {\em
+%D prettythree} and {\em prettyfour}. 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 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.
+
+\ifCONTEXT
+
+ \let\doifendofverbatim=\doifelse
+
+ \def\permitshiftedendofverbatim%
+ {\let\doifendofverbatim=\doifinstringelse}
+
+ \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
+ \initializeverbatimline
+ \copyverbatimline}
+
+ {\obeylines%
+ \long\gdef\copyverbatimline#1
+ {\convertargument#1 \to\next%
+ \gdef\verbatimline{#1}%
+ \ifx\next\emptyspace%
+ \presetemptyverbatimline%
+ \else%
+ \doifendofverbatim{\endofverbatimcommand}{\next}%
+ {\presetlastverbatimline%
+ \def\copyverbatimline{\egroup\endofdisplayverbatim}}%
+ {\presetnormalverbatimline}%
+ \fi%
+ \handleverbatimline%
+ \copyverbatimline}}
+
+\fi
+
+\protect
+
+\endinput
diff --git a/tex/context/base/verb-mp.tex b/tex/context/base/verb-mp.tex
index dd9feb222..1e14ab4fa 100644
--- a/tex/context/base/verb-mp.tex
+++ b/tex/context/base/verb-mp.tex
@@ -1,386 +1,389 @@
-%D \module
-%D [ file=verb-mp,
-%D version=1997.12.22,
-%D title=\CONTEXT\ Verbatim Macros,
-%D subtitle=Pretty \METAPOST\ 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 Support Macros / Pretty METAPOST Verbatim}
-
-%D This module was first used when I documented our new
-%D company logo. This interpreter is modeled after the \PERL\
-%D one.
-%D
-%D \startMP
-%D beginfig(1);
-%D z1 = (0,0);
-%D z2 = (100,0);
-%D z3 = (0,100);
-%D draw z1--z2--z3--cycle;
-%D endfig;
-%D \stopMP
-%D
-%D Of course we cannot (yet) provide a nice layout, so some
-%D formatting is still needed.
-
-\unprotect
-
-%D \macros
-%D {prettyMPvariables}
-%D
-%D Identifiers and system variables are typeset in a different
-%D style. One can turn of this mechanism for the variables by
-%D setting th enext boolean.
-%D
-
-\doglobal\newif\ifprettyMPvariables
-
-\global\prettyMPvariablestrue
-
-%D We support \METAFONT\ as well as \METAPOST.
-
-\gdef\MPsetcontrols%
- {\saveprettycontrols
- \def\obeyedspace%
- {\endMPtypesix
- \oldobeyedspace}%
- \def\obeyedline%
- {\endMPtypesix
- \global\inMPcommentfalse
- \oldobeyedline}%
- \def\obeyedpage%
- {\endMPtypesix
- \global\inMPcommentfalse
- \oldobeyedpage}%
- \let\obeytabs=\ignoretabs}
-
-\gdef\setupprettyMPtype%
- {\def\prettyidentifier{MP}%
- \MPsetvariables
- \MPsetcontrols
- \MPsethandlers
- \MPsetspecials}
-
-\doglobal\newif\ifinMPcomment
-\doglobal\newif\ifinMPtexmode
-
-\gdef\MPsetvariables%
- {\global\inMPcommentfalse
- \global\inMPtexmodefalse
- \global\let\MPsequence=\empty}
-
-\gdef\MPsetspecials%
- {\setpretty`\;=11 \setpretty`\$=12 \setpretty`\@=12 \setpretty`\#=12
- \setpretty`\%=20
- \setpretty`\[=31 \setpretty`\]=31 \setpretty`\(=32 \setpretty`\)=32
- \setpretty`\:=33 \setpretty`\==34 \setpretty`\<=34 \setpretty`\>=34
- \setpretty`\-=41 \setpretty`\+=41 \setpretty`\/=41 \setpretty`\*=41
- \setpretty`\|=41 \setpretty`\`=41 \setpretty`\!=41 \setpretty`\?=41
- \setpretty`\^=41 \setpretty`\&=42
- \setpretty`\\=50
- \setpretty`\1=61 \setpretty`\2=61 \setpretty`\3=61 \setpretty`\4=61
- \setpretty`\5=61 \setpretty`\6=61 \setpretty`\7=61 \setpretty`\8=61
- \setpretty`\9=61 \setpretty`\0=61
- \setpretty`\A=62 \setpretty`\B=62 \setpretty`\C=62 \setpretty`\D=62 \setpretty`\E=62
- \setpretty`\F=62 \setpretty`\G=62 \setpretty`\H=62 \setpretty`\I=62 \setpretty`\J=62
- \setpretty`\K=62 \setpretty`\L=62 \setpretty`\M=62 \setpretty`\N=62 \setpretty`\O=62
- \setpretty`\P=62 \setpretty`\Q=62 \setpretty`\R=62 \setpretty`\S=62 \setpretty`\T=62
- \setpretty`\U=62 \setpretty`\V=62 \setpretty`\W=62 \setpretty`\X=62 \setpretty`\Y=62
- \setpretty`\Z=62
- \setpretty`\a=62 \setpretty`\b=62 \setpretty`\c=62 \setpretty`\d=62 \setpretty`\e=62
- \setpretty`\f=62 \setpretty`\g=62 \setpretty`\h=62 \setpretty`\i=62 \setpretty`\j=62
- \setpretty`\k=62 \setpretty`\l=62 \setpretty`\m=62 \setpretty`\n=62 \setpretty`\o=62
- \setpretty`\p=62 \setpretty`\q=62 \setpretty`\r=62 \setpretty`\s=62 \setpretty`\t=62
- \setpretty`\u=62 \setpretty`\v=62 \setpretty`\w=62 \setpretty`\x=62 \setpretty`\y=62
- \setpretty`\z=62
- \setpretty`\_=62
- \setpretty`\,=70 \setpretty`\.=70
- \setpretty`\'=81 \setpretty`\"=82
- \setpretty`\{=90 \setpretty`\}=90 }
-
-\gdef\MPsethandlers%
- {\installprettyhandler 11 \MPtypeone
- \installprettyhandler 12 \MPtypeone
- \installprettyhandler 20 \MPtypetwo
- \installprettyhandler 31 \MPtypethreeA
- \installprettyhandler 32 \MPtypethreeA
- \installprettyhandler 33 \MPtypethreeB
- \installprettyhandler 34 \MPtypethreeB
- \installprettyhandler 41 \MPtypefour
- \installprettyhandler 42 \MPtypefour
- \installprettyhandler 50 \MPtypefive
- \installprettyhandler 61 \MPtypesixone
- \installprettyhandler 62 \MPtypesixtwo
- \installprettyhandler 70 \MPtypeseven
- \installprettyhandler 81 \MPtypeeightone
- \installprettyhandler 82 \MPtypeeighttwo
- \installprettyhandler 90 \MPtypenine }
-
-\gdef\MPtypeone#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty%
- \fi\fi}
-
-\gdef\doMPtypetwo#1%
- {\ifinMPcomment
- \getpretty{#1}%
- \else
- \global\inMPcommenttrue
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi}
-
-\gdef\MPtypetwo%
- {\endMPtypesix
- \ifnewpretty\expandafter\handlenewpretty\fi\doMPtypetwo}
-
-\gdef\MPtypethreeA#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypethreeB#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypefour#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypefive#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\endMPtypesix%
- {\ifx\MPsequence\empty\else
- \doifprettyidentifierelse{\MPsequence}{\MPidentifiers}
- {\doifprettyidentifierelse{\MPsequence}{\MPbtex}
- {\beginofpretty[\!!prettytwo]%
- {\prettyidentifierfont\MPsequence}%
- \endofpretty
- \global\inMPtexmodetrue}
- {\ifinMPtexmode
- \doifprettyidentifierelse{\MPsequence}{\MPetex}
- {\global\inMPtexmodefalse}{}%
- \fi
- \beginofpretty[\!!prettytwo]%
- {\prettyidentifierfont\MPsequence}%
- \endofpretty}}
- {\ifprettyMPvariables
- \doifprettyidentifierelse{\MPsequence}{\MPvariables}
- {\beginofpretty[\!!prettytwo]%
- {\prettyvariablefont\MPsequence}%
- \endofpretty}
- {\MPsequence}%
- \else
- \MPsequence
- \fi}%
- \global\let\MPsequence=\empty
- \fi}
-
-\gdef\MPtypesixone%
- {\endMPtypesix
- \getpretty}
-
-\gdef\MPtypesixtwo#1%
- {\ifinMPcomment
- \getpretty{#1}%
- \else
- \xdef\MPsequence{\MPsequence\getpretty{#1}}%
- \fi}
-
-\gdef\MPtypeseven#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypeeightone#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode%
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypeeighttwo#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\MPtypenine#1%
- {\endMPtypesix
- \ifinMPcomment
- \getpretty{#1}%
- \else\ifinMPtexmode
- \getpretty{#1}%
- \else
- \getpretty{#1}%
- \fi\fi}
-
-%D \METAPOST\ \TEX||ies:
-
-\useprettyidentifiers \MPbtex \MPsetspecials
- btex verbatimtex
-
-\useprettyidentifiers \MPetex \MPsetspecials
- etex
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- btex etex verbatimtex
-
-%D \METAPOST\ internal variables \& predefined variables:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- charcode day linecap linejoin miterlimit month pausing
- prologues showstopping time tracingcapsules tracingchoices
- tracingcommands tracingequations tracinglostchars
- tracingmacros tracingonline tracingoutput tracingrestores
- tracingspecs tracingstats tracingtitles truecorners
- warningcheck year
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- ahangle ahlength bboxmargin defaultpen defaultscale
- labeloffset background currentpen currentpicture cuttings
- defaultfont extra_beginfig extra_endfig
-
-%D \METAPOST\ predefined constants:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- false nullpicture pencircle true
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- beveled black blue bp butt cc cm dd ditto down epsilon
- evenly fullcircle green halfcircle identity in infinity left
- mitered mm origin pensquare pt quartercircle red right
- rounded squared unitsquare up white withdots
-
-%D \METAPOST\ operators:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- and angle arclength arctime ASCII bluepart boolean bot
- char color cosd cycle decimal directiontime floor fontsize
- greenpart hex infont intersectiontimes known length llcorner
- lrcorner makepath makepen mexp mlog normaldeviate not
- numeric oct odd or path pair pen penoffset picture point
- postcontrol precontrol redpart reverse rotated scaled
- shifted sind slanted sqrt str string subpath substring
- transform transformed ulcorner uniformdeviate unknown
- urcorner xpart xscaled xxpart xypart ypart yscaled yxpart
- yypart zscaled
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- abs bbox ceiling center cutafter cutbefore dir
- directionpoint div dotprod intersectionpoint inverse mod lft
- round rt unitvector whatever
-
-%D \METAPOST\ commands:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- addto clip input interim let newinternal save setbounds
- shipout show showdependencies showtoken showvariable
- special
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- cutdraw draw drawarrow drawdblarrow fill filldraw
- loggingall pickup tracingall tracingnone undraw unfill
- unfilldraw
-
-%D \METAPOST\ macro||like functions:
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- buildcycle dashpattern decr dotlabel dotlabels drawoptions
- incr label labels max, min thelabel z
-
-%D More \METAPOST:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- begingroup endgroup of curl tension and controls
- reflectedabout rotatedaround interpath on off beginfig
- endfig def vardef enddef epxr suffix text primary secondary
- tertiary primarydef secondarydef tertiarydef top bottom
- ulft urt llft lrt randomseed also contour doublepath
- withcolor withpen dashed if else elseif fi for forsuffixes
- forever downto upto step until
-
-%D \METAFONT\ stuff:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- charlist extensible fontdimen headerbyte kern ligtable
- boundarychar chardp charext charht charic charwd designsize
- fontmaking charexists
-
-\useprettyidentifiers \MPvariables \MPsetspecials
- beginchar blacker capsule_end change_width
- define_blacker_pixels define_corrected_pixels
- define_good_x_pixels define_good_y_pixels
- define_horizontal_corrected_pixels define_pixels
- define_whole_blacker_pixels define_whole_pixels
- define_whole_vertical_blacker_pixels
- define_whole_vertical_pixels endchar extra_beginchar
- extra_endchar extra_setup font_coding_scheme
- font_extra_space
-
-%D \METAFONT\ no||op stuff:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- cullit currenttransform gfcorners grayfont hround
- imagerules lowres_fix nodisplays notransforms openit
- displaying currentwindow screen_rows screen_cols
- pixels_per_inch cull display openwindow numspecial
- totalweight autorounding fillin proofing tracingpens
- xoffset chardx granularity smoothing turningcheck yoffset
- chardy hppp tracingedges vppp
-
-%D \METAPOST\ goodies:
-
-\useprettyidentifiers \MPidentifiers \MPsetspecials
- extra_beginfig extra_endfig mpxbreak
-
-\protect
-
-\endinput
+%D \module
+%D [ file=verb-mp,
+%D version=1997.12.22,
+%D title=\CONTEXT\ Verbatim Macros,
+%D subtitle=Pretty \METAPOST\ 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 Support Macros / Pretty METAPOST Verbatim}
+
+%D This module was first used when I documented our new
+%D company logo. This interpreter is modeled after the \PERL\
+%D one.
+%D
+%D \startMP
+%D beginfig(1);
+%D z1 = (0,0);
+%D z2 = (100,0);
+%D z3 = (0,100);
+%D draw z1--z2--z3--cycle;
+%D endfig;
+%D \stopMP
+%D
+%D Of course we cannot (yet) provide a nice layout, so some
+%D formatting is still needed.
+
+\unprotect
+
+%D \macros
+%D {prettyMPvariables}
+%D
+%D Identifiers and system variables are typeset in a different
+%D style. One can turn of this mechanism for the variables by
+%D setting th enext boolean.
+%D
+
+\doglobal\newif\ifprettyMPvariables
+
+\global\prettyMPvariablestrue
+
+%D We support \METAFONT\ as well as \METAPOST.
+
+\gdef\MPsetcontrols%
+ {\saveprettycontrols
+ \everyprettyend
+ {\global\inMPcommentfalse
+ \endMPtypesix}%
+ \def\obeyedspace%
+ {\endMPtypesix
+ \oldobeyedspace}%
+ \def\obeyedline%
+ {\endMPtypesix
+ \global\inMPcommentfalse
+ \oldobeyedline}%
+ \def\obeyedpage%
+ {\endMPtypesix
+ \global\inMPcommentfalse
+ \oldobeyedpage}%
+ \let\obeytabs=\ignoretabs}
+
+\gdef\setupprettyMPtype%
+ {\def\prettyidentifier{MP}%
+ \MPsetvariables
+ \MPsetcontrols
+ \MPsethandlers
+ \MPsetspecials}
+
+\doglobal\newif\ifinMPcomment
+\doglobal\newif\ifinMPtexmode
+
+\gdef\MPsetvariables%
+ {\global\inMPcommentfalse
+ \global\inMPtexmodefalse
+ \global\let\MPsequence=\empty}
+
+\gdef\MPsetspecials%
+ {\setpretty`\;=11 \setpretty`\$=12 \setpretty`\@=12 \setpretty`\#=12
+ \setpretty`\%=20
+ \setpretty`\[=31 \setpretty`\]=31 \setpretty`\(=32 \setpretty`\)=32
+ \setpretty`\:=33 \setpretty`\==34 \setpretty`\<=34 \setpretty`\>=34
+ \setpretty`\-=41 \setpretty`\+=41 \setpretty`\/=41 \setpretty`\*=41
+ \setpretty`\|=41 \setpretty`\`=41 \setpretty`\!=41 \setpretty`\?=41
+ \setpretty`\^=41 \setpretty`\&=42
+ \setpretty`\\=50
+ \setpretty`\1=61 \setpretty`\2=61 \setpretty`\3=61 \setpretty`\4=61
+ \setpretty`\5=61 \setpretty`\6=61 \setpretty`\7=61 \setpretty`\8=61
+ \setpretty`\9=61 \setpretty`\0=61
+ \setpretty`\A=62 \setpretty`\B=62 \setpretty`\C=62 \setpretty`\D=62 \setpretty`\E=62
+ \setpretty`\F=62 \setpretty`\G=62 \setpretty`\H=62 \setpretty`\I=62 \setpretty`\J=62
+ \setpretty`\K=62 \setpretty`\L=62 \setpretty`\M=62 \setpretty`\N=62 \setpretty`\O=62
+ \setpretty`\P=62 \setpretty`\Q=62 \setpretty`\R=62 \setpretty`\S=62 \setpretty`\T=62
+ \setpretty`\U=62 \setpretty`\V=62 \setpretty`\W=62 \setpretty`\X=62 \setpretty`\Y=62
+ \setpretty`\Z=62
+ \setpretty`\a=62 \setpretty`\b=62 \setpretty`\c=62 \setpretty`\d=62 \setpretty`\e=62
+ \setpretty`\f=62 \setpretty`\g=62 \setpretty`\h=62 \setpretty`\i=62 \setpretty`\j=62
+ \setpretty`\k=62 \setpretty`\l=62 \setpretty`\m=62 \setpretty`\n=62 \setpretty`\o=62
+ \setpretty`\p=62 \setpretty`\q=62 \setpretty`\r=62 \setpretty`\s=62 \setpretty`\t=62
+ \setpretty`\u=62 \setpretty`\v=62 \setpretty`\w=62 \setpretty`\x=62 \setpretty`\y=62
+ \setpretty`\z=62
+ \setpretty`\_=62
+ \setpretty`\,=70 \setpretty`\.=70
+ \setpretty`\'=81 \setpretty`\"=82
+ \setpretty`\{=90 \setpretty`\}=90 }
+
+\gdef\MPsethandlers%
+ {\installprettyhandler 11 \MPtypeone
+ \installprettyhandler 12 \MPtypeone
+ \installprettyhandler 20 \MPtypetwo
+ \installprettyhandler 31 \MPtypethreeA
+ \installprettyhandler 32 \MPtypethreeA
+ \installprettyhandler 33 \MPtypethreeB
+ \installprettyhandler 34 \MPtypethreeB
+ \installprettyhandler 41 \MPtypefour
+ \installprettyhandler 42 \MPtypefour
+ \installprettyhandler 50 \MPtypefive
+ \installprettyhandler 61 \MPtypesixone
+ \installprettyhandler 62 \MPtypesixtwo
+ \installprettyhandler 70 \MPtypeseven
+ \installprettyhandler 81 \MPtypeeightone
+ \installprettyhandler 82 \MPtypeeighttwo
+ \installprettyhandler 90 \MPtypenine }
+
+\gdef\MPtypeone#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty%
+ \fi\fi}
+
+\gdef\doMPtypetwo#1%
+ {\ifinMPcomment
+ \getpretty{#1}%
+ \else
+ \global\inMPcommenttrue
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi}
+
+\gdef\MPtypetwo%
+ {\endMPtypesix
+ \ifnewpretty\expandafter\handlenewpretty\fi\doMPtypetwo}
+
+\gdef\MPtypethreeA#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypethreeB#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypefour#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypefive#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\endMPtypesix%
+ {\ifx\MPsequence\empty\else
+ \doifprettyidentifierelse{\MPsequence}{\MPidentifiers}
+ {\doifprettyidentifierelse{\MPsequence}{\MPbtex}
+ {\beginofpretty[\!!prettytwo]%
+ {\prettyidentifierfont\MPsequence}%
+ \endofpretty
+ \global\inMPtexmodetrue}
+ {\ifinMPtexmode
+ \doifprettyidentifierelse{\MPsequence}{\MPetex}
+ {\global\inMPtexmodefalse}{}%
+ \fi
+ \beginofpretty[\!!prettytwo]%
+ {\prettyidentifierfont\MPsequence}%
+ \endofpretty}}
+ {\ifprettyMPvariables
+ \doifprettyidentifierelse{\MPsequence}{\MPvariables}
+ {\beginofpretty[\!!prettytwo]%
+ {\prettyvariablefont\MPsequence}%
+ \endofpretty}
+ {\MPsequence}%
+ \else
+ \MPsequence
+ \fi}%
+ \global\let\MPsequence=\empty
+ \fi}
+
+\gdef\MPtypesixone%
+ {\endMPtypesix
+ \getpretty}
+
+\gdef\MPtypesixtwo#1%
+ {\ifinMPcomment
+ \getpretty{#1}%
+ \else
+ \xdef\MPsequence{\MPsequence\getpretty{#1}}%
+ \fi}
+
+\gdef\MPtypeseven#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypeeightone#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode%
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypeeighttwo#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\MPtypenine#1%
+ {\endMPtypesix
+ \ifinMPcomment
+ \getpretty{#1}%
+ \else\ifinMPtexmode
+ \getpretty{#1}%
+ \else
+ \getpretty{#1}%
+ \fi\fi}
+
+%D \METAPOST\ \TEX||ies:
+
+\useprettyidentifiers \MPbtex \MPsetspecials
+ btex verbatimtex
+
+\useprettyidentifiers \MPetex \MPsetspecials
+ etex
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ btex etex verbatimtex
+
+%D \METAPOST\ internal variables \& predefined variables:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ charcode day linecap linejoin miterlimit month pausing
+ prologues showstopping time tracingcapsules tracingchoices
+ tracingcommands tracingequations tracinglostchars
+ tracingmacros tracingonline tracingoutput tracingrestores
+ tracingspecs tracingstats tracingtitles truecorners
+ warningcheck year
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ ahangle ahlength bboxmargin defaultpen defaultscale
+ labeloffset background currentpen currentpicture cuttings
+ defaultfont extra_beginfig extra_endfig
+
+%D \METAPOST\ predefined constants:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ false nullpicture pencircle true
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ beveled black blue bp butt cc cm dd ditto down epsilon
+ evenly fullcircle green halfcircle identity in infinity left
+ mitered mm origin pensquare pt quartercircle red right
+ rounded squared unitsquare up white withdots
+
+%D \METAPOST\ operators:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ and angle arclength arctime ASCII bluepart boolean bot
+ char color cosd cycle decimal directiontime floor fontsize
+ greenpart hex infont intersectiontimes known length llcorner
+ lrcorner makepath makepen mexp mlog normaldeviate not
+ numeric oct odd or path pair pen penoffset picture point
+ postcontrol precontrol redpart reverse rotated scaled
+ shifted sind slanted sqrt str string subpath substring
+ transform transformed ulcorner uniformdeviate unknown
+ urcorner xpart xscaled xxpart xypart ypart yscaled yxpart
+ yypart zscaled
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ abs bbox ceiling center cutafter cutbefore dir
+ directionpoint div dotprod intersectionpoint inverse mod lft
+ round rt unitvector whatever
+
+%D \METAPOST\ commands:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ addto clip input interim let newinternal save setbounds
+ shipout show showdependencies showtoken showvariable
+ special
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ cutdraw draw drawarrow drawdblarrow fill filldraw
+ loggingall pickup tracingall tracingnone undraw unfill
+ unfilldraw
+
+%D \METAPOST\ macro||like functions:
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ buildcycle dashpattern decr dotlabel dotlabels drawoptions
+ incr label labels max min thelabel z
+
+%D More \METAPOST:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ begingroup endgroup of curl tension and controls
+ reflectedabout rotatedaround interpath on off beginfig
+ endfig def vardef enddef epxr suffix text primary secondary
+ tertiary primarydef secondarydef tertiarydef top bottom
+ ulft urt llft lrt randomseed also contour doublepath
+ withcolor withpen dashed if else elseif fi for endfor
+ forsuffixes forever downto upto step until end
+
+%D \METAFONT\ stuff:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ charlist extensible fontdimen headerbyte kern ligtable
+ boundarychar chardp charext charht charic charwd designsize
+ fontmaking charexists
+
+\useprettyidentifiers \MPvariables \MPsetspecials
+ beginchar blacker capsule_end change_width
+ define_blacker_pixels define_corrected_pixels
+ define_good_x_pixels define_good_y_pixels
+ define_horizontal_corrected_pixels define_pixels
+ define_whole_blacker_pixels define_whole_pixels
+ define_whole_vertical_blacker_pixels
+ define_whole_vertical_pixels endchar extra_beginchar
+ extra_endchar extra_setup font_coding_scheme
+ font_extra_space
+
+%D \METAFONT\ no||op stuff:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ cullit currenttransform gfcorners grayfont hround
+ imagerules lowres_fix nodisplays notransforms openit
+ displaying currentwindow screen_rows screen_cols
+ pixels_per_inch cull display openwindow numspecial
+ totalweight autorounding fillin proofing tracingpens
+ xoffset chardx granularity smoothing turningcheck yoffset
+ chardy hppp tracingedges vppp
+
+%D \METAPOST\ goodies:
+
+\useprettyidentifiers \MPidentifiers \MPsetspecials
+ extra_beginfig extra_endfig mpxbreak
+
+\protect
+
+\endinput
diff --git a/tex/context/base/verb-pl.tex b/tex/context/base/verb-pl.tex
index 54bfccb04..9ecc1fe4c 100644
--- a/tex/context/base/verb-pl.tex
+++ b/tex/context/base/verb-pl.tex
@@ -1,453 +1,455 @@
-%D \module
-%D [ file=verb-pl,
-%D version=1997.12.22,
-%D title=\CONTEXT\ Verbatim Macros,
-%D subtitle=Pretty \PERL\ 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 Support Macros / Pretty PERL Verbatim}
-
-%D When I rewrote \TEXUTIL\ in \PERL\ I decided to write a
-%D pretty \PERL\ interpreter too. In fact, this was the main
-%D reason for rewriting the pretty verbatim mechanisms to
-%D handle more that \TEX.
-%D
-%D \startPL
-%D $alfa = $beta{gamma};
-%D if ($alfa="delta")
-%D { print "epsilon" }
-%D \stopPL
-%D
-%D When looking at the macros, watch the \type{\doglobal}'s!
-%D They're something \CONTEXT\ specific.
-
-\unprotect
-
-%D \macros
-%D {prettyPLvariables}
-%D
-%D Identifiers and system variables get a special treatment.
-%D One can disable this option for the variables by resetting
-%D the next switch.
-
-\doglobal\newif\ifprettyPLvariables
-
-\global\prettyPLvariablestrue
-
-%D As said before, the global assignment is needed in
-%D \CONTEXT\ (for once||only loading on demand).
-
-\doglobal\newif\ifinPLsingle
-\doglobal\newif\ifinPLdouble
-\doglobal\newif\ifinPLcomment
-\doglobal\newif\ifPLverbose
-
-\newcount\PLverboseskipped
-
-\gdef\PLverbosecorrection%
- {\ifnum\PLverboseskipped>0
- \loop
- \obeyedspace
- \advance\PLverboseskipped by -1
- \ifnum\PLverboseskipped>0
- \repeat
- \fi}
-
-\gdef\PLsetcontrols%
- {\saveprettycontrols
- \def\obeyedspace%
- {\endPLtypesix
- \ifPLverbose
- \advance\PLverboseskipped by 1
- \else
- \oldobeyedspace
- \fi}%
- \def\obeyedline%
- {\endPLtypesix
- \global\inPLcommentfalse
- \PLverbosefalse
- \PLverboseskipped=0
- \oldobeyedline}%
- \def\obeyedpage%
- {\endPLtypesix
- \global\inPLcommentfalse
- \oldobeyedpage}%
- \let\obeytabs=\ignoretabs}
-
-\gdef\setupprettyPLtype%
- {\def\prettyidentifier{PL}%
- \PLsetvariables
- \PLsetcontrols
- \PLsethandlers
- \PLsetspecials
- \PLsetdiagnostics}
-
-\gdef\PLsetvariables%
- {\global\inPLsinglefalse
- \global\inPLdoublefalse
- \global\inPLcommentfalse
- \global\let\PLsequence=\empty
- \global\let\PLprefix=\empty}
-
-\gdef\PLsetspecials%
- {\setpretty`\{=10 \setpretty`\}=10
- \setpretty`\$=21 \setpretty`\@=21 \setpretty`\%=22
- \setpretty`\[=31 \setpretty`\]=31 \setpretty`\(=32 \setpretty`\)=32
- \setpretty`\==32 \setpretty`\~=32 \setpretty`\<=32 \setpretty`\>=32
- \setpretty`\-=41 \setpretty`\+=41 \setpretty`\/=41 \setpretty`\*=41
- \setpretty`\|=41 \setpretty`\`=41 \setpretty`\!=41 \setpretty`\?=41
- \setpretty`\^=41 \setpretty`\&=42
- \setpretty`\\=50
- \setpretty`\1=61 \setpretty`\2=61 \setpretty`\3=61 \setpretty`\4=61
- \setpretty`\5=61 \setpretty`\6=61 \setpretty`\7=61 \setpretty`\8=61
- \setpretty`\9=61 \setpretty`\0=61 \setpretty`\_=61
- \setpretty`\A=62 \setpretty`\B=62 \setpretty`\C=62 \setpretty`\D=62 \setpretty`\E=62
- \setpretty`\F=62 \setpretty`\G=62 \setpretty`\H=62 \setpretty`\I=62 \setpretty`\J=62
- \setpretty`\K=62 \setpretty`\L=62 \setpretty`\M=62 \setpretty`\N=62 \setpretty`\O=62
- \setpretty`\P=62 \setpretty`\Q=62 \setpretty`\R=62 \setpretty`\S=62 \setpretty`\T=62
- \setpretty`\U=62 \setpretty`\V=62 \setpretty`\W=62 \setpretty`\X=62 \setpretty`\Y=62
- \setpretty`\Z=62
- \setpretty`\a=62 \setpretty`\b=62 \setpretty`\c=62 \setpretty`\d=62 \setpretty`\e=62
- \setpretty`\f=62 \setpretty`\g=62 \setpretty`\h=62 \setpretty`\i=62 \setpretty`\j=62
- \setpretty`\k=62 \setpretty`\l=62 \setpretty`\m=62 \setpretty`\n=62 \setpretty`\o=62
- \setpretty`\p=62 \setpretty`\q=62 \setpretty`\r=62 \setpretty`\s=62 \setpretty`\t=62
- \setpretty`\u=62 \setpretty`\v=62 \setpretty`\w=62 \setpretty`\x=62 \setpretty`\y=62
- \setpretty`\z=62
- \setpretty`\;=71 \setpretty`\:=72 \setpretty`\,=71 \setpretty`\.=71
- \setpretty`\'=80
- \setpretty`\"=90
- \setpretty`\#= 0 }
-
-\gdef\PLsethandlers%
- {\installprettyhandler 10 \PLtypeone
- \installprettyhandler 21 \PLtypetwo
- \installprettyhandler 22 \PLtypetwo
- \installprettyhandler 31 \PLtypethree
- \installprettyhandler 32 \PLtypethree
- \installprettyhandler 41 \PLtypefourone
- \installprettyhandler 42 \PLtypefourtwo
- \installprettyhandler 50 \PLtypefive
- \installprettyhandler 61 \PLtypesixone
- \installprettyhandler 62 \PLtypesixtwo
- \installprettyhandler 71 \PLtypesevenone
- \installprettyhandler 72 \PLtypeseventwo
- \installprettyhandler 80 \PLtypeeight
- \installprettyhandler 90 \PLtypenine
- \installprettyhandler 0 \PLtypezero}
-
-\gdef\PLtypeone#1%
- {\ifinPLdouble
- \PLverbosefalse
- \ifx\PLprefix\empty
- \endPLtypesix
- \getpretty{#1}%
- \else
- \endPLtypesix
- \xdef\PLprefix{\getpretty{#1}}%
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi
- \else
- \endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi\fi
- \fi}
-
-\gdef\PLtypetwo#1%
- {\endPLtypesix
- \xdef\PLprefix{\getpretty{#1}}%
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else\ifinPLdouble
- \getprettydata{#1}%
- \ifnum\prettytype=21
- \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
- \else
- \getpretty{#1}%
- \fi
- \else
- \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
- \fi\fi\fi}
-
-\gdef\PLtypethree#1%
- {\endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else\ifinPLdouble
- \getprettydata{#1}%
- \ifnum\prettytype=31
- \ifx\PLprefix\empty
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi
- \else
- \getpretty{#1}%
- \fi
- \else
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi\fi\fi}
-
-\gdef\PLtypefourone#1%
- {\endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else\ifinPLdouble
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi\fi}
-
-\gdef\doPLtypefourtwo#1#2%
- {\PLverbosefalse
- \getprettydata{#2}%
- \ifnum\prettytype=62
- \expandafter\PLtypetwo
- \else
- \expandafter\PLtypefourone
- \fi
- {#1}#2}
-
-\gdef\PLtypefourtwo%
- {\handlenextnextpretty\doPLtypefourtwo\PLtypefourone}
-
-\gdef\doPLtypefiveA#1#2%
- {\endPLtypesix
- \ifinPLcomment
- \getpretties{#1}{#2}%
- \else\ifinPLsingle
- \getprettydata{#2}%
- \ifnum\prettytype=50
- \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
- \else\ifnum\prettytype=80
- \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
- \else
- \getpretties{#1}{#2}%
- \fi\fi
- \else
- \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
- \fi\fi}
-
-\gdef\doPLtypefiveB#1%
- {\endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else
- \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
- \fi\fi}
-
-\gdef\PLtypefive%
- {\ifPLverbose
- \expandafter\PLtypesixtwo
- \else
- \expandafter\handlenextnextpretty\expandafter\doPLtypefiveA\expandafter\doPLtypefiveB
- \fi}
-
-\gdef\endPLtypesix%
- {\ifx\PLsequence\empty\else
- \ifinPLsingle
- \PLsequence
- \else\ifinPLdouble
- \PLsequence
- \else\ifPLverbose
- \beginofpretty[\!!prettytwo]\PLsequence\endofpretty
- \PLverbosefalse
- \else\ifx\PLprefix\empty
- \doifprettyidentifierelse{\PLsequence}{\PLverboses}
- {\PLverbosetrue\PLverboseskipped=3 }
- {\doifprettyidentifierelse{\PLsequence}{\PLidentifiers}
- {\beginofpretty[\!!prettytwo]%
- {\prettyidentifierfont\PLsequence}%
- \endofpretty}
- {\ifprettyPLvariables
- \doifprettyidentifierelse{\PLsequence}{\PLvariables}
- {\beginofpretty[\!!prettytwo]%
- {\prettyvariablefont\PLsequence}%
- \endofpretty}
- {\PLsequence}%
- \else
- \PLsequence
- \fi}}%
- \else\ifprettyPLvariables
- \doifprettyidentifierelse{\PLprefix\PLsequence}{\PLvariables}
- {\beginofpretty[\!!prettytwo]%
- {\prettyvariablefont\PLsequence}%
- \endofpretty}
- {\PLsequence}%
- \else
- \PLsequence
- \fi\fi\fi\fi\fi
- \global\let\PLsequence=\empty
- \global\let\PLprefix=\empty
- \fi}
-
-\gdef\PLtypesixone%
- {\ifx\PLsequence\empty
- \expandafter\getpretty
- \else
- \expandafter\PLtypesixtwo
- \fi}
-
-\gdef\PLtypesixtwo#1%
- {\ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else\ifinPLdouble
- \ifx\PLprefix\empty
- \getpretty{#1}%
- \else
- \xdef\PLsequence{\PLsequence\getpretty{#1}}%
- \fi
- \else
- \xdef\PLsequence{\PLsequence\getpretty{#1}}%
- \fi\fi\fi}
-
-\gdef\PLtypesevenone#1%
- {\endPLtypesix
- \getpretty{#1}}
-
-\gdef\PLtypeseventwo%
- {\handlenextnextpretty\doPLtypeseventwo\PLtypesevenone}
-
-\gdef\doPLtypeseventwo#1#2%
- {\getprettydata{#2}%
- \ifnum\prettytype=72
- \PLtypesixtwo{#1}\PLtypesixtwo{#1}%
- \else
- \PLtypesevenone{#1}\expandafter#2%
- \fi}
-
-\gdef\PLtypeeight#1% single quote
- {\endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLdouble
- \getpretty{#1}%
- \else\ifinPLsingle
- \global\inPLsinglefalse
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \else
- \global\inPLsingletrue
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi\fi\fi}
-
-\gdef\PLtypenine#1% double quote
- {\endPLtypesix
- \ifinPLcomment
- \getpretty{#1}%
- \else\ifinPLsingle
- \getpretty{#1}%
- \else\ifinPLdouble
- \global\inPLdoublefalse
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \else
- \global\inPLdoubletrue
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi\fi\fi}
-
-% \gdef\PLtypezero%
-% {\endPLtypesix
-% \handlenewpretty\doPLtypezero}
-
-\gdef\PLtypezero%
- {\endPLtypesix
- \ifnewpretty\expandafter\handlenewpretty\fi\doPLtypezero}
-
-\gdef\doPLtypezero#1%
- {\ifinPLcomment
- \getpretty{#1}%
- \else
- \global\inPLcommenttrue
- \PLverbosecorrection
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi}
-
-\gdef\doreportprettyPLtype#1#2#3#4%
- {#1%
- [PERL \string#2 typing conflict, use \string#3 instead]
- \writestatus
- {PERL typing}
- {use \string#3 instead of \string#2 to enable propper visualization}%
- \global#4%
- \expandafter\doemptyverbatimline
- \fi}
-
-\gdef\reportprettyPLtype%
- {\doreportprettyPLtype\ifinPLsingle'\'\inPLsinglefalse
- \doreportprettyPLtype\ifinPLdouble"\"\inPLdoublefalse}
-
-\gdef\PLsetdiagnostics%
- {\let\normaldoemptyverbatimline=\doemptyverbatimline
- \def\doemptyverbatimline%
- {\normaldoemptyverbatimline
- \reportprettyPLtype}}
-
-%D The official \PERL\ version 5 keywords:
-
-\useprettyidentifiers \PLidentifiers \PLsetspecials
- abs accept alarm and atan atan2 bind binmode bless caller
- chdir chmod chomp chop chown chr chroot close closedir cmp
- connect continue cos crypt dbmclose dbmopen defined delete
- die do dump each echo else elsif endgrent endhostent
- endnetent endprotoend endpwent endservent eof eq eval exec
- exists exit exp fcntl fileno flock for foreach fork format
- formline getc getgrent getgrgid getgrnam gethostbyaddr
- gethostbyname gethostent getlogin getnetbyaddr getnetbyname
- getnetent getpeername getpgrp getppid getpriority
- getprotobyname getprotobynumber getprotoent getpwent
- getpwnam getpwuid getservbyname getservbyport getservent
- getsockname getsockopt glob gmtime goto grep gt hex if
- import index int integer ioctl join keys kill last lc
- lcfirst le length lib link listen local localtime log lstat
- lt map method mkdir msgctl msgget msgrcv msgsnd my ne next
- no not oct open opendir or ord pack package pipe pop pos
- print printf process prompt push quotemeta rand read readdir
- readlink recv redo ref rename require reset return reverse
- rewinddir rindex rmdir scalar seek seekdir select semctl
- semget semop send setgrent sethostent setnetent setpgrp
- setpriority setprotoent setpwent setservent setsockopt shift
- shmctl shmget shmread shmwrite shutdown sin sleep socket
- socketpair sort splice split sprintf sqrt srand stat strict
- study sub subs substr symlink syscall sysopen sysread system
- syswrite tell telldir tie tied time times times truncate uc
- ucfirst ucmask umask unary undef unless unlink unpack
- unshift untie until use utime values vars vec wait waitpid
- wantarray warn warn while write xor
-
-%D Additional module keywords (still incomplete):
-
-\useprettyidentifiers \PLvariables \PLsetspecials
- Getopt::Long
- $Getopt::Long::passthrough
- $Getopt::Long::autoabbrev
- &GetOptions
-
-%D A funny hack. When prefixes by \type{TEX}, a \type{\csname}
-%D is typeset as \TEX\ sequence.
-
-\useprettyidentifiers \PLverboses \PLsetspecials
- TEX
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=verb-pl,
+%D version=1997.12.22,
+%D title=\CONTEXT\ Verbatim Macros,
+%D subtitle=Pretty \PERL\ 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 Support Macros / Pretty PERL Verbatim}
+
+%D When I rewrote \TEXUTIL\ in \PERL\ I decided to write a
+%D pretty \PERL\ interpreter too. In fact, this was the main
+%D reason for rewriting the pretty verbatim mechanisms to
+%D handle more that \TEX.
+%D
+%D \startPL
+%D $alfa = $beta{gamma};
+%D if ($alfa="delta")
+%D { print "epsilon" }
+%D \stopPL
+%D
+%D When looking at the macros, watch the \type{\doglobal}'s!
+%D They're something \CONTEXT\ specific.
+
+\unprotect
+
+%D \macros
+%D {prettyPLvariables}
+%D
+%D Identifiers and system variables get a special treatment.
+%D One can disable this option for the variables by resetting
+%D the next switch.
+
+\doglobal\newif\ifprettyPLvariables
+
+\global\prettyPLvariablestrue
+
+%D As said before, the global assignment is needed in
+%D \CONTEXT\ (for once||only loading on demand).
+
+\doglobal\newif\ifinPLsingle
+\doglobal\newif\ifinPLdouble
+\doglobal\newif\ifinPLcomment
+\doglobal\newif\ifPLverbose
+
+\newcount\PLverboseskipped
+
+\gdef\PLverbosecorrection%
+ {\ifnum\PLverboseskipped>0
+ \obeyedspace
+ \advance\PLverboseskipped by -1
+ \@EA\PLverbosecorrection
+ \fi}
+
+\gdef\PLsetcontrols%
+ {\saveprettycontrols
+ \def\obeyedspace%
+ {\endPLtypesix
+ \ifPLverbose
+ \advance\PLverboseskipped by 1
+ \else
+ \oldobeyedspace
+ \fi}%
+ \def\obeyedline%
+ {\endPLtypesix
+ \global\inPLcommentfalse
+ \PLverbosefalse
+ \PLverboseskipped=0
+ \oldobeyedline}%
+ \def\obeyedpage%
+ {\endPLtypesix
+ \global\inPLcommentfalse
+ \oldobeyedpage}%
+ \let\obeytabs=\ignoretabs}
+
+\gdef\setupprettyPLtype%
+ {\def\prettyidentifier{PL}%
+ \PLsetvariables
+ \PLsetcontrols
+ \PLsethandlers
+ \PLsetspecials
+ \PLsetdiagnostics}
+
+\gdef\PLsetvariables%
+ {\global\inPLsinglefalse
+ \global\inPLdoublefalse
+ \global\inPLcommentfalse
+ \global\let\PLsequence=\empty
+ \global\let\PLprefix=\empty}
+
+\gdef\PLsetspecials%
+ {\setpretty`\{=10 \setpretty`\}=10
+ \setpretty`\$=21 \setpretty`\@=21 \setpretty`\%=22
+ \setpretty`\[=31 \setpretty`\]=31 \setpretty`\(=32 \setpretty`\)=32
+ \setpretty`\==32 \setpretty`\~=32 \setpretty`\<=32 \setpretty`\>=32
+ \setpretty`\-=41 \setpretty`\+=41 \setpretty`\/=41 \setpretty`\*=41
+ \setpretty`\|=41 \setpretty`\`=41 \setpretty`\!=41 \setpretty`\?=41
+ \setpretty`\^=41 \setpretty`\&=42
+ \setpretty`\\=50
+ \setpretty`\1=61 \setpretty`\2=61 \setpretty`\3=61 \setpretty`\4=61
+ \setpretty`\5=61 \setpretty`\6=61 \setpretty`\7=61 \setpretty`\8=61
+ \setpretty`\9=61 \setpretty`\0=61 \setpretty`\_=61
+ \setpretty`\A=62 \setpretty`\B=62 \setpretty`\C=62 \setpretty`\D=62 \setpretty`\E=62
+ \setpretty`\F=62 \setpretty`\G=62 \setpretty`\H=62 \setpretty`\I=62 \setpretty`\J=62
+ \setpretty`\K=62 \setpretty`\L=62 \setpretty`\M=62 \setpretty`\N=62 \setpretty`\O=62
+ \setpretty`\P=62 \setpretty`\Q=62 \setpretty`\R=62 \setpretty`\S=62 \setpretty`\T=62
+ \setpretty`\U=62 \setpretty`\V=62 \setpretty`\W=62 \setpretty`\X=62 \setpretty`\Y=62
+ \setpretty`\Z=62
+ \setpretty`\a=62 \setpretty`\b=62 \setpretty`\c=62 \setpretty`\d=62 \setpretty`\e=62
+ \setpretty`\f=62 \setpretty`\g=62 \setpretty`\h=62 \setpretty`\i=62 \setpretty`\j=62
+ \setpretty`\k=62 \setpretty`\l=62 \setpretty`\m=62 \setpretty`\n=62 \setpretty`\o=62
+ \setpretty`\p=62 \setpretty`\q=62 \setpretty`\r=62 \setpretty`\s=62 \setpretty`\t=62
+ \setpretty`\u=62 \setpretty`\v=62 \setpretty`\w=62 \setpretty`\x=62 \setpretty`\y=62
+ \setpretty`\z=62
+ \setpretty`\;=71 \setpretty`\:=72 \setpretty`\,=71 \setpretty`\.=71
+ \setpretty`\'=80
+ \setpretty`\"=90
+ \setpretty`\#= 0 }
+
+\gdef\PLsethandlers%
+ {\installprettyhandler 10 \PLtypeone
+ \installprettyhandler 21 \PLtypetwo
+ \installprettyhandler 22 \PLtypetwo
+ \installprettyhandler 31 \PLtypethree
+ \installprettyhandler 32 \PLtypethree
+ \installprettyhandler 41 \PLtypefourone
+ \installprettyhandler 42 \PLtypefourtwo
+ \installprettyhandler 50 \PLtypefive
+ \installprettyhandler 61 \PLtypesixone
+ \installprettyhandler 62 \PLtypesixtwo
+ \installprettyhandler 71 \PLtypesevenone
+ \installprettyhandler 72 \PLtypeseventwo
+ \installprettyhandler 80 \PLtypeeight
+ \installprettyhandler 90 \PLtypenine
+ \installprettyhandler 0 \PLtypezero}
+
+\gdef\PLtypeone#1%
+ {\ifinPLdouble
+ \PLverbosefalse
+ \ifinPLcomment
+ \endPLtypesix
+ \getpretty{#1}%
+ \else\ifx\PLprefix\empty
+ \endPLtypesix
+ \getpretty{#1}%
+ \else
+ \endPLtypesix
+ \xdef\PLprefix{\getpretty{#1}}%
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \fi\fi
+ \else
+ \endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \fi\fi
+ \fi}
+
+\gdef\PLtypetwo#1%
+ {\endPLtypesix
+ \xdef\PLprefix{\getpretty{#1}}%
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \getprettydata{#1}%
+ \ifnum\prettytype=21
+ \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
+ \else
+ \getpretty{#1}%
+ \fi
+ \else
+ \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
+ \fi\fi\fi}
+
+\gdef\PLtypethree#1%
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \getprettydata{#1}%
+ \ifnum\prettytype=31
+ \ifx\PLprefix\empty
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi
+ \else
+ \getpretty{#1}%
+ \fi
+ \else
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi\fi\fi}
+
+\gdef\PLtypefourone#1%
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi\fi\fi}
+
+\gdef\doPLtypefourtwo#1#2%
+ {\PLverbosefalse
+ \getprettydata{#2}%
+ \ifnum\prettytype=62
+ \expandafter\PLtypetwo
+ \else
+ \expandafter\PLtypefourone
+ \fi
+ {#1}#2}
+
+\gdef\PLtypefourtwo%
+ {\handlenextnextpretty\doPLtypefourtwo\PLtypefourone}
+
+\gdef\doPLtypefiveA#1#2%
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretties{#1}{#2}%
+ \else\ifinPLsingle
+ \getprettydata{#2}%
+ \ifnum\prettytype=50
+ \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
+ \else\ifnum\prettytype=80
+ \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
+ \else
+ \getpretties{#1}{#2}%
+ \fi\fi
+ \else
+ \beginofpretty[\!!prettytwo]\getpretties{#1}{#2}\endofpretty
+ \fi\fi}
+
+\gdef\doPLtypefiveB#1%
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else
+ \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty
+ \fi\fi}
+
+\gdef\PLtypefive%
+ {\ifPLverbose
+ \expandafter\PLtypesixtwo
+ \else
+ \expandafter\handlenextnextpretty\expandafter\doPLtypefiveA\expandafter\doPLtypefiveB
+ \fi}
+
+\gdef\endPLtypesix%
+ {\ifx\PLsequence\empty\else
+ \ifinPLcomment
+ \PLsequence
+ \else\ifinPLsingle
+ \PLsequence
+ \else\ifinPLdouble
+ \PLsequence
+ \else\ifPLverbose
+ \beginofpretty[\!!prettytwo]\PLsequence\endofpretty
+ \PLverbosefalse
+ \else\ifx\PLprefix\empty
+ \doifprettyidentifierelse{\PLsequence}{\PLverboses}
+ {\PLverbosetrue\PLverboseskipped=3 }
+ {\doifprettyidentifierelse{\PLsequence}{\PLidentifiers}
+ {\beginofpretty[\!!prettytwo]%
+ {\prettyidentifierfont\PLsequence}%
+ \endofpretty}
+ {\ifprettyPLvariables
+ \doifprettyidentifierelse{\PLsequence}{\PLvariables}
+ {\beginofpretty[\!!prettytwo]%
+ {\prettyvariablefont\PLsequence}%
+ \endofpretty}
+ {\PLsequence}%
+ \else
+ \PLsequence
+ \fi}}%
+ \else\ifprettyPLvariables
+ \doifprettyidentifierelse{\PLprefix\PLsequence}{\PLvariables}
+ {\beginofpretty[\!!prettytwo]%
+ {\prettyvariablefont\PLsequence}%
+ \endofpretty}
+ {\PLsequence}%
+ \else
+ \PLsequence
+ \fi\fi\fi\fi\fi\fi
+ \global\let\PLsequence=\empty
+ \global\let\PLprefix=\empty
+ \fi}
+
+\gdef\PLtypesixone%
+ {\ifx\PLsequence\empty
+ \expandafter\getpretty
+ \else
+ \expandafter\PLtypesixtwo
+ \fi}
+
+\gdef\PLtypesixtwo#1%
+ {\ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \ifx\PLprefix\empty
+ \getpretty{#1}%
+ \else
+ \xdef\PLsequence{\PLsequence\getpretty{#1}}%
+ \fi
+ \else
+ \xdef\PLsequence{\PLsequence\getpretty{#1}}%
+ \fi\fi\fi}
+
+\gdef\PLtypesevenone#1%
+ {\endPLtypesix
+ \getpretty{#1}}
+
+\gdef\PLtypeseventwo%
+ {\handlenextnextpretty\doPLtypeseventwo\PLtypesevenone}
+
+\gdef\doPLtypeseventwo#1#2%
+ {\getprettydata{#2}%
+ \ifnum\prettytype=72
+ \PLtypesixtwo{#1}\PLtypesixtwo{#1}%
+ \else
+ \PLtypesevenone{#1}\expandafter#2%
+ \fi}
+
+\gdef\PLtypeeight#1% single quote
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \global\inPLsinglefalse
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \else
+ \global\inPLsingletrue
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi\fi\fi}
+
+\gdef\PLtypenine#1% double quote
+ {\endPLtypesix
+ \ifinPLcomment
+ \getpretty{#1}%
+ \else\ifinPLsingle
+ \getpretty{#1}%
+ \else\ifinPLdouble
+ \global\inPLdoublefalse
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \else
+ \global\inPLdoubletrue
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \fi\fi\fi}
+
+% \gdef\PLtypezero%
+% {\endPLtypesix
+% \handlenewpretty\doPLtypezero}
+
+\gdef\PLtypezero%
+ {\endPLtypesix
+ \ifnewpretty\expandafter\handlenewpretty\fi\doPLtypezero}
+
+\gdef\doPLtypezero#1%
+ {\ifinPLcomment
+ \getpretty{#1}%
+ \else
+ \global\inPLcommenttrue
+ \PLverbosecorrection
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi}
+
+\gdef\doreportprettyPLtype#1#2#3#4%
+ {#1%
+ [PERL \string#2 typing conflict, use \string#3 instead]
+ \writestatus
+ {PERL typing}
+ {use \string#3 instead of \string#2 to enable propper visualization}%
+ \global#4%
+ \expandafter\doemptyverbatimline
+ \fi}
+
+\gdef\reportprettyPLtype%
+ {\doreportprettyPLtype\ifinPLsingle'\'\inPLsinglefalse
+ \doreportprettyPLtype\ifinPLdouble"\"\inPLdoublefalse}
+
+\gdef\PLsetdiagnostics%
+ {\let\normaldoemptyverbatimline=\doemptyverbatimline
+ \def\doemptyverbatimline%
+ {\normaldoemptyverbatimline
+ \reportprettyPLtype}}
+
+%D The official \PERL\ version 5 keywords:
+
+\useprettyidentifiers \PLidentifiers \PLsetspecials
+ abs accept alarm and atan atan2 bind binmode bless caller
+ chdir chmod chomp chop chown chr chroot close closedir cmp
+ connect continue cos crypt dbmclose dbmopen defined delete
+ die do dump each echo else elsif endgrent endhostent
+ endnetent endprotoend endpwent endservent eof eq eval exec
+ exists exit exp fcntl fileno flock for foreach fork format
+ formline getc getgrent getgrgid getgrnam gethostbyaddr
+ gethostbyname gethostent getlogin getnetbyaddr getnetbyname
+ getnetent getpeername getpgrp getppid getpriority
+ getprotobyname getprotobynumber getprotoent getpwent
+ getpwnam getpwuid getservbyname getservbyport getservent
+ getsockname getsockopt glob gmtime goto grep gt hex if
+ import index int integer ioctl join keys kill last lc
+ lcfirst le length lib link listen local localtime log lstat
+ lt map method mkdir msgctl msgget msgrcv msgsnd my ne next
+ no not oct open opendir or ord pack package pipe pop pos
+ print printf process prompt push quotemeta rand read readdir
+ readlink recv redo ref rename require reset return reverse
+ rewinddir rindex rmdir scalar seek seekdir select semctl
+ semget semop send setgrent sethostent setnetent setpgrp
+ setpriority setprotoent setpwent setservent setsockopt shift
+ shmctl shmget shmread shmwrite shutdown sin sleep socket
+ socketpair sort splice split sprintf sqrt srand stat strict
+ study sub subs substr symlink syscall sysopen sysread system
+ syswrite tell telldir tie tied time times times truncate uc
+ ucfirst ucmask umask unary undef unless unlink unpack
+ unshift untie until use utime values vars vec wait waitpid
+ wantarray warn warn while write xor
+
+%D Additional module keywords (still incomplete):
+
+\useprettyidentifiers \PLvariables \PLsetspecials
+ Getopt::Long
+ $Getopt::Long::passthrough
+ $Getopt::Long::autoabbrev
+ &GetOptions
+
+%D A funny hack. When prefixes by \type{TEX}, a \type{\csname}
+%D is typeset as \TEX\ sequence.
+
+\useprettyidentifiers \PLverboses \PLsetspecials
+ TEX
+
+\protect
+
+\endinput
diff --git a/tex/context/base/verb-tex.tex b/tex/context/base/verb-tex.tex
index 2a2a28123..1739ee780 100644
--- a/tex/context/base/verb-tex.tex
+++ b/tex/context/base/verb-tex.tex
@@ -1,285 +1,287 @@
-%D \module
-%D [ file=verb-tex,
-%D version=1997.12.22,
-%D title=\CONTEXT\ Verbatim Macros,
-%D subtitle=Pretty \TEX\ 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 Support Macros / Pretty TEX Verbatim}
-
-%D The original module \type{supp-ver} had the \TEX\
-%D interpreter built in. The current implementation is more
-%D natural and less complicated.
-
-%D \startTEX
-%D \definetyping[niceTEX][option=TEX,palet=graypretty]
-%D
-%D \startniceTEX
-%D \message{A vivid look at TeX}
-%D \stopniceTEX
-%D \stopTEX
-
-\unprotect
-
-%D \macros
-%D {ifsplitTEXparameters}
-%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.
-
-\doglobal\newif\ifsplitTEXparameters \global\splitTEXparameterstrue
-
-%D \macros
-%D {ifsplitTEXcontrols}
-%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.
-
-\doglobal\newif\ifsplitTEXcontrols \global\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.
-
-\doglobal\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 \kap{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 prettyone \MC red \MC 0.9 \MC 0.0 \MC 0.0 \MC 0.30 \LC\FR
-%D \FC prettytwo \MC green \MC 0.0 \MC 0.8 \MC 0.0 \MC 0.45 \LC\MR
-%D \FC prettythree \MC yellow \MC 0.0 \MC 0.0 \MC 0.9 \MC 0.60 \LC\MR
-%D \FC prettyfour \MC blue \MC 0.8 \MC 0.8 \MC 0.6 \MC 0.75 \LC\LR
-%D \HL
-%D \stoptabel
-%D
-%D Outside \CONTEXT\ these colors are defined in
-%D \type{verb-ini}, in \CONTEXT\ their definitions can be found
-%D in \type{core-ver}, where in fact we use the color palet
-%D mechanism. That way we can use different schemes i a quite
-%D natural way.
-
-\gdef\setupprettyTEXtype%
- {\def\prettyidentifier{TEX}%
- \TEXsetcontrols
- \TEXsethandlers
- \TEXsetspecials}
-
-\gdef\TEXsetcontrols%
- {\saveprettycontrols
- \def\obeyedspace%
- {\TEXendofcommand
- \TEXendofparameter
- \oldobeyedspace}%
- \def\obeyedline%
- {\TEXendofcommand
- \TEXendofparameter
- \oldobeyedline}%
- \def\obeyedpage%
- {\TEXendofcommand
- \TEXendofparameter
- \oldobeyedpage}%
- \let\obeytabs=\ignoretabs}
-
-\gdef\TEXsetspecials%
- {\setpretty`\$=1 \setpretty`\{=1 \setpretty`\}=1
- \setpretty`\[=2 \setpretty`\]=2 \setpretty`\(=2 \setpretty`\)=2
- \setpretty`\==2 \setpretty`\<=2 \setpretty`\>=2 \setpretty`\"=2
- \setpretty`\-=3 \setpretty`\+=3 \setpretty`\/=3
- \setpretty`\|=3 \setpretty`\%=3 \setpretty`\'=3 \setpretty`\`=3
- \setpretty`\_=3 \setpretty`\&=3 \setpretty`\~=3
- \setpretty`\.=4 \setpretty`\,=4 \setpretty`\:=4 \setpretty`\;=4 \setpretty`\*=4
- \setpretty`\#=5
- \setpretty`\1=6 \setpretty`\2=6 \setpretty`\3=6 \setpretty`\4=6 \setpretty`\5=6
- \setpretty`\6=6 \setpretty`\7=6 \setpretty`\8=6 \setpretty`\9=6 \setpretty`\0=6
- \setpretty`\\=7
- \setpretty`\^=8
- \setpretty`\A=9 \setpretty`\B=9 \setpretty`\C=9 \setpretty`\D=9 \setpretty`\E=9
- \setpretty`\F=9 \setpretty`\G=9 \setpretty`\H=9 \setpretty`\I=9 \setpretty`\J=9
- \setpretty`\K=9 \setpretty`\L=9 \setpretty`\M=9 \setpretty`\N=9 \setpretty`\O=9
- \setpretty`\P=9 \setpretty`\Q=9 \setpretty`\R=9 \setpretty`\S=9 \setpretty`\T=9
- \setpretty`\U=9 \setpretty`\V=9 \setpretty`\W=9 \setpretty`\X=9 \setpretty`\Y=9
- \setpretty`\Z=9
- \setpretty`\a=9 \setpretty`\b=9 \setpretty`\c=9 \setpretty`\d=9 \setpretty`\e=9
- \setpretty`\f=9 \setpretty`\g=9 \setpretty`\h=9 \setpretty`\i=9 \setpretty`\j=9
- \setpretty`\k=9 \setpretty`\l=9 \setpretty`\m=9 \setpretty`\n=9 \setpretty`\o=9
- \setpretty`\p=9 \setpretty`\q=9 \setpretty`\r=9 \setpretty`\s=9 \setpretty`\t=9
- \setpretty`\u=9 \setpretty`\v=9 \setpretty`\w=9 \setpretty`\x=9 \setpretty`\y=9
- \setpretty`\z=9
- \setpretty`\?=9 \setpretty`\!=9 \setpretty`\@=9
- %\setpretty`\%=\ifnewpretty 0 \else 3 \fi}
- \setpretty`\%=0 }
-
-\gdef\TEXsethandlers%
- {\installprettyhandler 1 \TEXtypeone
- \installprettyhandler 2 \TEXtypetwo
- \installprettyhandler 3 \TEXtypethree
- \installprettyhandler 4 \TEXtypefour
- \installprettyhandler 5 \TEXtypefive
- \installprettyhandler 6 \TEXtypesix
- \installprettyhandler 7 \TEXtypeseven
- \installprettyhandler 8 \TEXtypeeight
- \installprettyhandler 9 \TEXtypenine
- \installprettyhandler 0 \TEXtypezero}
-
-\doglobal\newif\ifinTEXcommand
-\doglobal\newif\ifinTEXparameter
-
-\gdef\TEXbeginofcommand%
- {\TEXendofparameter
- \ifinTEXcommand
- \else
- \global\inTEXcommandtrue
- \global\firstinTEXcommandtrue
- \beginofpretty[\!!prettytwo]%
- \fi}
-
-\gdef\TEXendofcommand%
- {\ifinTEXcommand
- \endofpretty
- \global\inTEXcommandfalse
- \global\firstinTEXcommandfalse
- \fi}
-
-\gdef\TEXbeginofparameter%
- {\TEXendofcommand
- \ifinTEXparameter
- \else
- \global\inTEXparametertrue
- \beginofpretty[\!!prettythree]%
- \fi}
-
-\gdef\TEXendofparameter%
- {\ifinTEXparameter
- \endofpretty
- \global\inTEXparameterfalse
- \fi}
-
-\gdef\ifnotfirstinTEXcommand#1
- {\iffirstinTEXcommand
- \getpretty{#1}%
- \TEXendofcommand
- \else}
-
-\gdef\TEXtypeone#1%
- {\ifnotfirstinTEXcommand#1
- \TEXendofcommand
- \TEXendofparameter
- \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
- \fi}
-
-\gdef\TEXtypetwo#1%
- {\ifnotfirstinTEXcommand#1
- \TEXendofcommand
- \TEXendofparameter
- \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
- \fi}
-
-\gdef\TEXtypethree#1%
- {\ifnotfirstinTEXcommand#1
- \TEXendofcommand
- \TEXendofparameter
- \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
- \fi}
-
-\gdef\TEXtypefour#1%
- {\ifnotfirstinTEXcommand#1
- \TEXendofcommand
- \TEXendofparameter
- \getpretty{#1}%
- \fi}
-
-\gdef\TEXtypefive#1%
- {\ifnotfirstinTEXcommand#1
- \TEXbeginofparameter
- \getpretty{#1}%
- \fi}
-
-\gdef\TEXtypesix#1%
- {\ifnotfirstinTEXcommand#1
- \ifinTEXparameter
- \ifsplitTEXparameters
- \TEXendofparameter
- \getpretty{#1}%
- \else
- \getpretty{#1}%
- \TEXendofparameter
- \fi
- \else
- \TEXendofcommand
- \getpretty{#1}%
- \fi
- \fi}
-
-\gdef\TEXtypeseven#1%
- {\ifnotfirstinTEXcommand#1
- \TEXbeginofcommand
- \getpretty{#1}%
- \fi}
-
-\gdef\TEXtypeeightA#1#2%
- {\getprettydata{#2}%
- \ifnum\prettytype=80
- \TEXendofparameter
- \ifsplitTEXcontrols
- \ifinTEXcommand
- \def\next{\TEXendofcommand\getpretty{#1}\getpretty{#1}\TEXbeginofcommand}%
- \else
- \def\next{\getpretty{#1}\getpretty{#1}}%
- \fi
- \else
- \def\next{\getpretty{#1}\getpretty{#1}}%
- \fi
- \else
- \def\next{\TEXtypeeightB{#1}#2}%
- \fi
- \next}
-
-\gdef\TEXtypeeightB%
- {\TEXendofparameter
- \ifinTEXcommand
- \firstinTEXcommandfalse
- \expandafter\getpretty
- \else
- \expandafter\TEXtypethree
- \fi}
-
-\gdef\TEXtypeeight%
- {\handlenextnextpretty\TEXtypeeightA\TEXtypeeightB}
-
-\gdef\TEXtypenine%
- {\TEXendofparameter
- \global\firstinTEXcommandfalse
- \getpretty}
-
-% \gdef\TEXtypezero%
-% {\handlenewpretty\TEXtypethree}
-
-\gdef\TEXtypezero%
- {\ifnewpretty\expandafter\handlenewpretty\fi\TEXtypethree}
-
-\protect
-
-\endinput
- \ No newline at end of file
+%D \module
+%D [ file=verb-tex,
+%D version=1997.12.22,
+%D title=\CONTEXT\ Verbatim Macros,
+%D subtitle=Pretty \TEX\ 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 Support Macros / Pretty TEX Verbatim}
+
+%D The original module \type{supp-ver} had the \TEX\
+%D interpreter built in. The current implementation is more
+%D natural and less complicated.
+
+%D \startTEX
+%D \definetyping[niceTEX][option=TEX,palet=graypretty]
+%D
+%D \startniceTEX
+%D \message{A vivid look at TeX}
+%D \stopniceTEX
+%D \stopTEX
+
+\unprotect
+
+%D \macros
+%D {ifsplitTEXparameters}
+%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.
+
+\doglobal\newif\ifsplitTEXparameters \global\splitTEXparameterstrue
+
+%D \macros
+%D {ifsplitTEXcontrols}
+%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.
+
+\doglobal\newif\ifsplitTEXcontrols \global\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.
+
+\doglobal\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 \kap{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 prettyone \MC red \MC 0.9 \MC 0.0 \MC 0.0 \MC 0.30 \LC\FR
+%D \FC prettytwo \MC green \MC 0.0 \MC 0.8 \MC 0.0 \MC 0.45 \LC\MR
+%D \FC prettythree \MC yellow \MC 0.0 \MC 0.0 \MC 0.9 \MC 0.60 \LC\MR
+%D \FC prettyfour \MC blue \MC 0.8 \MC 0.8 \MC 0.6 \MC 0.75 \LC\LR
+%D \HL
+%D \stoptabel
+%D
+%D Outside \CONTEXT\ these colors are defined in
+%D \type{verb-ini}, in \CONTEXT\ their definitions can be found
+%D in \type{core-ver}, where in fact we use the color palet
+%D mechanism. That way we can use different schemes i a quite
+%D natural way.
+
+\gdef\setupprettyTEXtype%
+ {\def\prettyidentifier{TEX}%
+ \TEXsetcontrols
+ \TEXsethandlers
+ \TEXsetspecials}
+
+\gdef\TEXsetcontrols%
+ {\saveprettycontrols
+ \everyprettyend
+ {\TEXendofcommand
+ \TEXendofparameter}%
+ \def\obeyedspace%
+ {\TEXendofcommand
+ \TEXendofparameter
+ \oldobeyedspace}%
+ \def\obeyedline%
+ {\TEXendofcommand
+ \TEXendofparameter
+ \oldobeyedline}%
+ \def\obeyedpage%
+ {\TEXendofcommand
+ \TEXendofparameter
+ \oldobeyedpage}%
+ \let\obeytabs=\ignoretabs}
+
+\gdef\TEXsetspecials%
+ {\setpretty`\$=1 \setpretty`\{=1 \setpretty`\}=1
+ \setpretty`\[=2 \setpretty`\]=2 \setpretty`\(=2 \setpretty`\)=2
+ \setpretty`\==2 \setpretty`\<=2 \setpretty`\>=2 \setpretty`\"=2
+ \setpretty`\-=3 \setpretty`\+=3 \setpretty`\/=3
+ \setpretty`\|=3 \setpretty`\%=3 \setpretty`\'=3 \setpretty`\`=3
+ \setpretty`\_=3 \setpretty`\&=3 \setpretty`\~=3
+ \setpretty`\.=4 \setpretty`\,=4 \setpretty`\:=4 \setpretty`\;=4 \setpretty`\*=4
+ \setpretty`\#=5
+ \setpretty`\1=6 \setpretty`\2=6 \setpretty`\3=6 \setpretty`\4=6 \setpretty`\5=6
+ \setpretty`\6=6 \setpretty`\7=6 \setpretty`\8=6 \setpretty`\9=6 \setpretty`\0=6
+ \setpretty`\\=7
+ \setpretty`\^=8
+ \setpretty`\A=9 \setpretty`\B=9 \setpretty`\C=9 \setpretty`\D=9 \setpretty`\E=9
+ \setpretty`\F=9 \setpretty`\G=9 \setpretty`\H=9 \setpretty`\I=9 \setpretty`\J=9
+ \setpretty`\K=9 \setpretty`\L=9 \setpretty`\M=9 \setpretty`\N=9 \setpretty`\O=9
+ \setpretty`\P=9 \setpretty`\Q=9 \setpretty`\R=9 \setpretty`\S=9 \setpretty`\T=9
+ \setpretty`\U=9 \setpretty`\V=9 \setpretty`\W=9 \setpretty`\X=9 \setpretty`\Y=9
+ \setpretty`\Z=9
+ \setpretty`\a=9 \setpretty`\b=9 \setpretty`\c=9 \setpretty`\d=9 \setpretty`\e=9
+ \setpretty`\f=9 \setpretty`\g=9 \setpretty`\h=9 \setpretty`\i=9 \setpretty`\j=9
+ \setpretty`\k=9 \setpretty`\l=9 \setpretty`\m=9 \setpretty`\n=9 \setpretty`\o=9
+ \setpretty`\p=9 \setpretty`\q=9 \setpretty`\r=9 \setpretty`\s=9 \setpretty`\t=9
+ \setpretty`\u=9 \setpretty`\v=9 \setpretty`\w=9 \setpretty`\x=9 \setpretty`\y=9
+ \setpretty`\z=9
+ \setpretty`\?=9 \setpretty`\!=9 \setpretty`\@=9
+ %\setpretty`\%=\ifnewpretty 0 \else 3 \fi}
+ \setpretty`\%=0 }
+
+\gdef\TEXsethandlers%
+ {\installprettyhandler 1 \TEXtypeone
+ \installprettyhandler 2 \TEXtypetwo
+ \installprettyhandler 3 \TEXtypethree
+ \installprettyhandler 4 \TEXtypefour
+ \installprettyhandler 5 \TEXtypefive
+ \installprettyhandler 6 \TEXtypesix
+ \installprettyhandler 7 \TEXtypeseven
+ \installprettyhandler 8 \TEXtypeeight
+ \installprettyhandler 9 \TEXtypenine
+ \installprettyhandler 0 \TEXtypezero}
+
+\doglobal\newif\ifinTEXcommand
+\doglobal\newif\ifinTEXparameter
+
+\gdef\TEXbeginofcommand%
+ {\TEXendofparameter
+ \ifinTEXcommand
+ \else
+ \global\inTEXcommandtrue
+ \global\firstinTEXcommandtrue
+ \beginofpretty[\!!prettytwo]%
+ \fi}
+
+\gdef\TEXendofcommand%
+ {\ifinTEXcommand
+ \endofpretty
+ \global\inTEXcommandfalse
+ \global\firstinTEXcommandfalse
+ \fi}
+
+\gdef\TEXbeginofparameter%
+ {\TEXendofcommand
+ \ifinTEXparameter
+ \else
+ \global\inTEXparametertrue
+ \beginofpretty[\!!prettythree]%
+ \fi}
+
+\gdef\TEXendofparameter%
+ {\ifinTEXparameter
+ \endofpretty
+ \global\inTEXparameterfalse
+ \fi}
+
+\gdef\ifnotfirstinTEXcommand#1
+ {\iffirstinTEXcommand
+ \getpretty{#1}%
+ \TEXendofcommand
+ \else}
+
+\gdef\TEXtypeone#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXendofcommand
+ \TEXendofparameter
+ \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty
+ \fi}
+
+\gdef\TEXtypetwo#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXendofcommand
+ \TEXendofparameter
+ \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty
+ \fi}
+
+\gdef\TEXtypethree#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXendofcommand
+ \TEXendofparameter
+ \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty
+ \fi}
+
+\gdef\TEXtypefour#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXendofcommand
+ \TEXendofparameter
+ \getpretty{#1}%
+ \fi}
+
+\gdef\TEXtypefive#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXbeginofparameter
+ \getpretty{#1}%
+ \fi}
+
+\gdef\TEXtypesix#1%
+ {\ifnotfirstinTEXcommand#1
+ \ifinTEXparameter
+ \ifsplitTEXparameters
+ \TEXendofparameter
+ \getpretty{#1}%
+ \else
+ \getpretty{#1}%
+ \TEXendofparameter
+ \fi
+ \else
+ \TEXendofcommand
+ \getpretty{#1}%
+ \fi
+ \fi}
+
+\gdef\TEXtypeseven#1%
+ {\ifnotfirstinTEXcommand#1
+ \TEXbeginofcommand
+ \getpretty{#1}%
+ \fi}
+
+\gdef\TEXtypeeightA#1#2%
+ {\getprettydata{#2}%
+ \ifnum\prettytype=80
+ \TEXendofparameter
+ \ifsplitTEXcontrols
+ \ifinTEXcommand
+ \def\next{\TEXendofcommand\getpretty{#1}\getpretty{#1}\TEXbeginofcommand}%
+ \else
+ \def\next{\getpretty{#1}\getpretty{#1}}%
+ \fi
+ \else
+ \def\next{\getpretty{#1}\getpretty{#1}}%
+ \fi
+ \else
+ \def\next{\TEXtypeeightB{#1}#2}%
+ \fi
+ \next}
+
+\gdef\TEXtypeeightB%
+ {\TEXendofparameter
+ \ifinTEXcommand
+ \firstinTEXcommandfalse
+ \expandafter\getpretty
+ \else
+ \expandafter\TEXtypethree
+ \fi}
+
+\gdef\TEXtypeeight%
+ {\handlenextnextpretty\TEXtypeeightA\TEXtypeeightB}
+
+\gdef\TEXtypenine%
+ {\TEXendofparameter
+ \global\firstinTEXcommandfalse
+ \getpretty}
+
+% \gdef\TEXtypezero%
+% {\handlenewpretty\TEXtypethree}
+
+\gdef\TEXtypezero%
+ {\ifnewpretty\expandafter\handlenewpretty\fi\TEXtypethree}
+
+\protect
+
+\endinput
diff --git a/tex/context/config/cont-de.ini b/tex/context/config/cont-de.ini
new file mode 100644
index 000000000..2979d9f91
--- /dev/null
+++ b/tex/context/config/cont-de.ini
@@ -0,0 +1,3 @@
+% Thomas Esser, 1998. public domain.
+\input cont-de.tex
+\endinput
diff --git a/tex/context/config/cont-en.ini b/tex/context/config/cont-en.ini
new file mode 100644
index 000000000..4272135f6
--- /dev/null
+++ b/tex/context/config/cont-en.ini
@@ -0,0 +1,3 @@
+% Thomas Esser, 1998. public domain.
+\input cont-en.tex
+\endinput
diff --git a/tex/context/config/cont-nl.ini b/tex/context/config/cont-nl.ini
new file mode 100644
index 000000000..8ecc830ac
--- /dev/null
+++ b/tex/context/config/cont-nl.ini
@@ -0,0 +1,3 @@
+% Thomas Esser, 1998. public domain.
+\input cont-nl.tex
+\endinput
diff --git a/tex/context/config/context.ini b/tex/context/config/context.ini
new file mode 100644
index 000000000..e4f919e65
--- /dev/null
+++ b/tex/context/config/context.ini
@@ -0,0 +1,3 @@
+% Thomas Esser, 1998. public domain.
+\input context.tex
+\endinput