summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2000-05-11 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2000-05-11 00:00:00 +0200
commit73000ea3b7c8225c980f40ef90b86e2d57fe4003 (patch)
tree90bf5cda9ff8d82550f402ca55e18d010cc29153 /tex
parentdd50c74f0702bff05e96d5d3994316405414663e (diff)
downloadcontext-73000ea3b7c8225c980f40ef90b86e2d57fe4003.tar.gz
stable 2000.05.11
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-ini.tex8
-rw-r--r--tex/context/base/colo-rgb.tex2
-rw-r--r--tex/context/base/cont-cz.tex35
-rw-r--r--tex/context/base/cont-fil.tex48
-rw-r--r--tex/context/base/cont-new.tex915
-rw-r--r--tex/context/base/cont-old.tex61
-rw-r--r--tex/context/base/cont-usr.ori20
-rw-r--r--tex/context/base/context.tex38
-rw-r--r--tex/context/base/core-01d.tex2331
-rw-r--r--tex/context/base/core-02a.tex198
-rw-r--r--tex/context/base/core-02b.tex171
-rw-r--r--tex/context/base/core-02d.tex49
-rw-r--r--tex/context/base/core-buf.tex871
-rw-r--r--tex/context/base/core-con.tex59
-rw-r--r--tex/context/base/core-des.tex860
-rw-r--r--tex/context/base/core-fig.tex249
-rw-r--r--tex/context/base/core-fil.tex33
-rw-r--r--tex/context/base/core-fld.tex36
-rw-r--r--tex/context/base/core-fnt.tex91
-rw-r--r--tex/context/base/core-gen.tex8
-rw-r--r--tex/context/base/core-grd.tex30
-rw-r--r--tex/context/base/core-int.tex1978
-rw-r--r--tex/context/base/core-itm.tex583
-rw-r--r--tex/context/base/core-lst.tex889
-rw-r--r--tex/context/base/core-mar.tex126
-rw-r--r--tex/context/base/core-mps.tex64
-rw-r--r--tex/context/base/core-mul.tex125
-rw-r--r--tex/context/base/core-nav.tex5
-rw-r--r--tex/context/base/core-new.tex19
-rw-r--r--tex/context/base/core-not.tex12
-rw-r--r--tex/context/base/core-num.tex133
-rw-r--r--tex/context/base/core-pag.tex32
-rw-r--r--tex/context/base/core-par.tex (renamed from tex/context/base/core-01e.tex)136
-rw-r--r--tex/context/base/core-ref.tex229
-rw-r--r--tex/context/base/core-reg.tex48
-rw-r--r--tex/context/base/core-rul.tex157
-rw-r--r--tex/context/base/core-sec.tex1491
-rw-r--r--tex/context/base/core-syn.tex395
-rw-r--r--tex/context/base/core-tab.tex74
-rw-r--r--tex/context/base/core-tbl.tex407
-rw-r--r--tex/context/base/core-uti.tex368
-rw-r--r--tex/context/base/core-var.tex16
-rw-r--r--tex/context/base/core-ver.tex8
-rw-r--r--tex/context/base/core-vis.tex6
-rw-r--r--tex/context/base/enco-ans.tex2
-rw-r--r--tex/context/base/enco-chi.tex92
-rw-r--r--tex/context/base/enco-ec.tex4
-rw-r--r--tex/context/base/enco-ibm.tex2
-rw-r--r--tex/context/base/enco-il2.tex3
-rw-r--r--tex/context/base/enco-ini.tex18
-rw-r--r--tex/context/base/enco-lat.tex4
-rw-r--r--tex/context/base/enco-pdf.tex2
-rw-r--r--tex/context/base/enco-vis.tex4
-rw-r--r--tex/context/base/enco-win.tex50
-rw-r--r--tex/context/base/font-ber.tex67
-rw-r--r--tex/context/base/font-chi.tex107
-rw-r--r--tex/context/base/font-cmr.tex6
-rw-r--r--tex/context/base/font-fil.tex175
-rw-r--r--tex/context/base/font-ini.tex134
-rw-r--r--tex/context/base/font-map.tex2
-rw-r--r--tex/context/base/font-ppl.tex26
-rw-r--r--tex/context/base/font-uni.tex16
-rw-r--r--tex/context/base/java-ini.tex4
-rw-r--r--tex/context/base/lang-alt.tex34
-rw-r--r--tex/context/base/lang-chi.tex57
-rw-r--r--tex/context/base/lang-ger.tex2
-rw-r--r--tex/context/base/lang-ini.tex21
-rw-r--r--tex/context/base/lang-sla.tex2
-rw-r--r--tex/context/base/m-chart.tex94
-rw-r--r--tex/context/base/m-chemic.tex6
-rw-r--r--tex/context/base/m-pictex.tex68
-rw-r--r--tex/context/base/main-001.tex (renamed from tex/context/base/core-01a.tex)7412
-rw-r--r--tex/context/base/main-002.tex (renamed from tex/context/base/core-01b.tex)347
-rw-r--r--tex/context/base/main-003.tex (renamed from tex/context/base/core-01c.tex)114
-rw-r--r--tex/context/base/mult-com.tex145
-rw-r--r--tex/context/base/mult-con.tex252
-rw-r--r--tex/context/base/mult-ini.tex23
-rw-r--r--tex/context/base/mult-sys.tex9
-rw-r--r--tex/context/base/ppchtex.tex4
-rw-r--r--tex/context/base/s-abr-01.tex2
-rw-r--r--tex/context/base/s-chi-00.tex47
-rw-r--r--tex/context/base/s-faq-01.tex20
-rw-r--r--tex/context/base/s-map-01.tex5
-rw-r--r--tex/context/base/s-pre-00.tex10
-rw-r--r--tex/context/base/s-pre-05.tex15
-rw-r--r--tex/context/base/spec-dvi.tex40
-rw-r--r--tex/context/base/spec-fdf.tex100
-rw-r--r--tex/context/base/spec-ini.tex204
-rw-r--r--tex/context/base/spec-pdf.tex11
-rw-r--r--tex/context/base/spec-tpd.tex68
-rw-r--r--tex/context/base/supp-box.tex319
-rw-r--r--tex/context/base/supp-eps.tex13
-rw-r--r--tex/context/base/supp-fil.tex4
-rw-r--r--tex/context/base/supp-fun.tex99
-rw-r--r--tex/context/base/supp-lan.tex113
-rw-r--r--tex/context/base/supp-mis.tex12
-rw-r--r--tex/context/base/supp-mpe.tex342
-rw-r--r--tex/context/base/supp-mps.tex99
-rw-r--r--tex/context/base/supp-pdf.tex131
-rw-r--r--tex/context/base/symb-ini.tex11
-rw-r--r--tex/context/base/syst-ext.tex221
-rw-r--r--tex/context/base/syst-gen.tex113
-rw-r--r--tex/context/base/syst-tex.tex2
-rw-r--r--tex/context/base/verb-ini.tex12
-rw-r--r--tex/context/config/cont-cz.ini2
-rw-r--r--tex/context/config/cont-de.ini2
-rw-r--r--tex/context/config/cont-en.ini2
-rw-r--r--tex/context/config/cont-nl.ini2
-rw-r--r--tex/context/config/cont-uk.ini2
-rw-r--r--tex/context/config/cont-usr.tex20
-rw-r--r--tex/context/config/context.ini2
-rw-r--r--tex/generic/context/m-ch-de.tex10
-rw-r--r--tex/generic/context/m-ch-en.tex10
-rw-r--r--tex/generic/context/m-ch-nl.tex10
-rw-r--r--tex/generic/context/m-metapo.tex89
-rw-r--r--tex/generic/context/ppchtex.noc205
-rw-r--r--tex/latex/context/m-ch-de.sty1
-rw-r--r--tex/latex/context/m-ch-en.sty1
-rw-r--r--tex/latex/context/m-ch-nl.sty1
-rw-r--r--tex/latex/context/m-metapo.sty1
-rw-r--r--tex/latex/context/m-pictex.sty1
121 files changed, 12340 insertions, 12756 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index f8bb83543..d5b9beb6e 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -72,7 +72,7 @@
5: onbekend systeem --
6: palet -- is beschikbaar
7: palet -- is niet beschikbaar
- 8: (verkeerde) specificatie -- bij -- wordt zwart
+ 8: specificatie -- bij -- wordt zwart
9: -- kleurruimte wordt niet ondersteund
10: -- kleurruimte wordt ondersteund
11: kleur wordt vertaald in grijs
@@ -87,7 +87,7 @@
5: unknown system --
6: palette -- is available
7: palette -- is not available
- 8: (invalid) specification -- at color -- becomes black
+ 8: specification -- at color -- becomes black
9: -- color space is not supported
10: -- color space is supported
11: color is converted to gray
@@ -102,7 +102,7 @@
5: unbekanntes System --
6: palette -- ist verfuegbar
7: palette -- ist nicht verfuegbar
- 8: (ungueltige) Spezifikation -- bei Farbe -- wird schwarz
+ 8: Spezifikation -- bei Farbe -- wird schwarz
9: -- Farbraum wird nicht unterstuetzt
10: -- Farbraum wird unterstuetzt
11: Farbe wird in Grau umgewandelt
@@ -117,7 +117,7 @@
5: neznamy system --
6: palette -- je k dispozici
7: palette -- neni k dispozici
- 8: (naplatna) specifikace -- v barve -- bude cerna
+ 8: specifikace -- v barve -- bude cerna
9: -- prostor barev neni podporovan
10: -- prostor barev je podporovan
11: barva je prevedena na sed
diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex
index 445b8ed8e..19934eee7 100644
--- a/tex/context/base/colo-rgb.tex
+++ b/tex/context/base/colo-rgb.tex
@@ -30,7 +30,7 @@
\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 [black] [s=0]
\definecolor [gray] [s=.9]
\definecolor [darkred] [r=.8, g=0, b=0]
diff --git a/tex/context/base/cont-cz.tex b/tex/context/base/cont-cz.tex
new file mode 100644
index 000000000..e2ba2b56e
--- /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. See mreadme.pdf for
+%C details.
+
+\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{czech}
+
+\input context.tex
+
+\unprotect
+
+\setupcurrentlanguage[\s!cz]
+
+\loaduserspecifications
+
+\installlanguage [\s!en] [\c!status=\v!start]
+\installlanguage [\s!de] [\c!status=\v!start]
+\installlanguage [\s!sk] [\c!status=\v!start]
+\installlanguage [\s!cz] [\c!status=\v!start]
+
+\setupbodyfont [csr,rm,12pt]
+
+\protect
+
+\dump
+
+\endinput
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 6a81465b8..0f68ef860 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -15,22 +15,36 @@
\definefilesynonym [chemie] [chemic]
-\definefilesynonym [unit] [units]
-\definefilesynonym [eenheid] [units]
-\definefilesynonym [einheit] [units]
-
-\definefilesynonym [finance] [financ]
-
-\definefilesynonym [pre-general] [pre-00]
-
-\definefilesynonym [pre-original] [pre-01]
-\definefilesynonym [pre-green] [pre-02]
-\definefilesynonym [pre-funny] [pre-03]
-\definefilesynonym [pre-colorful] [pre-04]
-\definefilesynonym [pre-fuzzy] [pre-05]
-\definefilesynonym [pre-polish] [pre-06]
-
-\definefilesynonym [abr-pseudocaps] [abr-01]
-\definefilesynonym [abr-smallcaps] [abr-02]
+\definefilesynonym [unit] [units]
+\definefilesynonym [eenheid] [units]
+\definefilesynonym [einheit] [units]
+
+\definefilesynonym [finance] [financ]
+
+\definefilesynonym [pre-general] [pre-00]
+
+\definefilesynonym [pre-original] [pre-01]
+\definefilesynonym [pre-green] [pre-02]
+\definefilesynonym [pre-funny] [pre-03]
+\definefilesynonym [pre-colorful] [pre-04]
+\definefilesynonym [pre-fuzzy] [pre-05]
+\definefilesynonym [pre-polish] [pre-06]
+\definefilesynonym [pre-spider] [pre-07]
+\definefilesynonym [pre-split] [pre-08]
+\definefilesynonym [pre-windows] [pre-09]
+\definefilesynonym [pre-grow] [pre-10]
+\definefilesynonym [pre-stack] [pre-11]
+\definefilesynonym [pre-arrows] [pre-12]
+\definefilesynonym [pre-writing] [pre-13]
+\definefilesynonym [pre-wonder] [pre-14]
+\definefilesynonym [pre-balls] [pre-15]
+\definefilesynonym [pre-knot] [pre-16]
+
+\definefilesynonym [abr-pseudocaps] [abr-01]
+\definefilesynonym [abr-smallcaps] [abr-02]
+
+\definefilesynonym [chinese] [chi-00]
+\definefilesynonym [chi-simplified] [chi-01]
+\definefilesynonym [chi-traditional] [chi-02]
\endinput
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index d42da211d..ef0d14211 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -17,327 +17,423 @@
\unprotect
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!}
-
-% Speeds up when having a field with thousands of clones,
-% which we happen to have -)
-
-\def\getmainfieldkids#1%
- {\let\@@FieldKids\empty
- \ifdefinemainfield
- \definerawpasslist{fld:#1}% runtime defined by system
- \moverawpasslist{fld:#1}\@@FieldKids
+
+%D Hm. Needed for low level calls, like in verbatim.
+
+\def\startcolormode#1%
+ {\ifincolor
+ \doifcolorelse{#1}
+ {\getcurrentcolorspecs{#1}%
+ \expandafter\dostartcolormode\currentcolorspecs\od}
+ {\dostopcolormode}%
\fi}
-
-%D Let's also support a negative offset.
-
-\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
-\ifdim\dimen6<\!!zeropoint
- \advance\dimen4 by \dimen6 \dimen8=-\dimen6 \dimen6=\!!zeropoint
-\else
- \dimen8=\!!zeropoint
+
+\def\stopcolormode%
+ {\ifincolor\dostopcolormode\fi}
+
+%D New table stuff.
+
+\readfile{supp-ali}{}{} % alignment stuff
+\readfile{core-ntb}{}{} % new table mechanism
+
+\ifx\alignmentclass\undefined \else % [|lg{.}|] \NG 12.34 \NC
+
+\gdef\handletabulatecharalign#1 % space delimited !
+ {\edef\alignmentclass{\tabulatecolumn}%
+ \edef\alignmentcharacter{\getvalue{\@@tabalign@@\tabulatecolumn}}%
+ \ifcase\tabulatepass\or
+ \setfirstpasscharacteralign\checkalignment{#1}%
+ \fi % force hsize
+ \setsecondpasscharacteralign\checkalignment{#1}}
+
\fi
- \setbox\extraframebox=\hbox
- {\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
- \corner#4\radius#5\toggle#7\\}%
- \setbox\extraframebox=\hbox
- {\raise\dimen8\vbox{\moveleft#3\box\extraframebox}}%
- \wd\extraframebox=\wd#1%
- \ht\extraframebox=\ht#1%
- \dp\extraframebox=\dp#1%
- \hbox
- {%\copy#1\hskip-\wd#1%
- \box#1\hskip-\wd\extraframebox % faster
- \doifelsenothing{#2} % speeds up a little
- {\box\extraframebox}
- {\color[#2]{\box\extraframebox}}}}}
-
-%D More chinese:
-
-\unexpanded\def\uc#1#2% used in tricky situations
- {\bgroup
- \edef\unicodeone{#1}%
- \edef\unicodetwo{#2}%
- \futurelet\nextglyph\dohandleucflowglyph}
-\def\dohandleucflowglyph%
- {\unicodeposition=\unicodeone\unicodetwo\relax
- \handleunicodeglyph
+%D A funny (but rather stupid) one.
+
+\def\removebottomthings%
+ {\dorecurse{5}{\unskip\unkern\unpenalty}}
+
+%D We also support broad here:
+
+\def\dosetraggedcommand#1%
+ {\expanded{\dodosetraggedcommand{#1}}}
+
+\def\dodosetraggedcommand#1%
+ {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}%
+ \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}%
+ \let\raggedcommand\relax
+ \let\raggedtopcommand\empty
+ \let\raggedbottomcommand\empty
+ \ExpandFirstAfter\processallactionsinset
+ [#1]
+ [ \v!links=>\if!!donea \def\raggedcommand{\veryraggedleft}%
+ \else \def\raggedcommand{\raggedleft}%
+ \fi,
+ \v!rechts=>\if!!donea \def\raggedcommand{\veryraggedright}%
+ \else \def\raggedcommand{\raggedright}%
+ \fi,
+ \v!midden=>\if!!doneb \def\raggedcommand{\raggedwidecenter}%
+ \else\if!!donea \def\raggedcommand{\veryraggedcenter}%
+ \else \def\raggedcommand{\raggedcenter}%
+ \fi\fi,
+ \v!hoog=>\let\raggedbottomcommand\vfilll, % bonus, pretty strong
+ \v!laag=>\let\raggedtopcommand \vfilll, % used with \framed
+ \v!nee=>\def\raggedcommand{\raggedright},
+ \v!ja=>\let\raggedcommand\relax,
+ \v!normaal=>\let\raggedcommand\relax]}
+
+%D Sometimes a capstrut comes in handy
+%D
+%D \starttabulatie[|Tl|l|l|]
+%D \NC yes \NC normal strut \NC {\toonstruts\setupstrut[ja]\strut} \NC \NR
+%D \NC no \NC no strut \NC {\toonstruts\setupstrut[nee]\strut} \NC \NR
+%D \NC kap \NC a capital strut (i.e. Q) \NC {\toonstruts\setupstrut[kap]\strut} \NC \NR
+%D \NC A B \unknown \NC a character strut (e.g. A) \NC {\toonstruts\setupstrut[A]\strut} \NC \NR
+%D \NC \NC a normal strut \NC {\toonstruts\setupstrut\strut} \NC \NR
+%D \stoptabulatie
+
+\def\setstrut%
+ {\setstrutdimen\strutheight\strutheightfactor\spacingfactor
+ \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor
+ \dosetstrut}
+
+\def\setcharstrut#1%
+ {\setbox\strutbox=\hbox{#1}%
+ \edef\strutheight{\the\ht\strutbox}%
+ \edef\strutdepth {\the\dp\strutbox}%
+ \dosetstrut}
+
+\def\setcapstrut% could be M, but Q has descender
+ {\setcharstrut{Q}}
+
+\def\setupstrut%
+ {\dosingleempty\dosetupstrut}
+
+\def\dosetupstrut[#1]%
+ {\processaction
+ [#1]
+ [ \v!ja=>\setstrut,
+ \v!nee=>\setnostrut,
+ \v!kap=>\setcapstrut,
+ \s!default=>\setstrut,
+ \s!unknown=>\setcharstrut{\commalistelement}]}
+
+%D Centered looks nicer:
+
+\def\dosetstrut%
+ {\let\strut=\normalstrut
+ \setbox\strutbox=\normalhbox
+ {\normalhbox to \!!zeropoint
+ {% \hss % new, will be option
+ \vrule
+ \!!width \strutwidth
+ \!!height\strutheight
+ \!!depth \strutdepth
+ \hss}}}
+
+%D in case of no color we don't want to see the rules
+
+\def\dophantombox#1\\{\hphantom{\dofilledbox#1\\}}
+
+\def\raster[#1]%
+ {\groupedcommand{\startraster[#1]}{\stopraster}}
+
+\def\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\%
+ {\doifelsenothing{#4}
+ {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\}
+ {\raster[#4]%
+ {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}}}
+
+\def\setcolorbox\width#1\height#2\depth#3\color#4\corner#5\radius#6\\%
+ {\ifincolor
+ \doifcolorelse{#4}{\color[#4]%
+ {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}}
+ {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\}%
+ \else
+ \dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\%
+ \fi}
+
+%D more and more
+
+\def\lhbox{\dowithnextbox{\hbox to \hsize{\box\nextbox\hss }}\hbox}
+\def\mhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox\hss}}\hbox}
+\def\rhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox }}\hbox}
+
+\let\lefthbox =\lhbox
+\let\midhbox =\mhbox
+\let\righthbox=\rhbox
+
+%D to be tested
+
+\def\docomplexuit[#1::#2]%
+ {\dontleavehmode % added, but probably not needed
+ \bgroup
+ \doifdefinedelse{\v!file:::#1}
+ {\def\doexternaldocument[##1][##2][##3]%
+ {\naar{##3}[#1::#2]}%
+ \getvalue{\v!file:::#1}}
+ {\tttf[#1]}%
\egroup}
-%D Some adaptions due to active /'s. This goes to supp-lan.tex.
+%D Makes sense:
-%D And then came the Polish users, and who can deny them? Like
-%D the German \TEX\ users demand an active \type {"}, the
-%D Polish cannot do without the \type {/}. The next alternative
-%D is a bit slower but far the most robust alternative. As a
-%D bonus it also offers \type {|^|} and even \type {|||} which
-%D both result in a breakable|^|bar.
-%D
-%D The trick we use here is to convert the argument to a
-%D string and compare this string to string'd tokens.
+\def\removelastskip% \ifvmode the plain tex one \fi
+ {\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi\fi}
-\def\activedotextmodediscretionary#1%
- {\bgroup
- \let\nextnextnext\egroup
- \def\handlecompoundcharacter##1% new, needed for polish
- {\getvalue{\@nc@\string##1}}% where / is active
- \def\next##1#1%
- {\def\next{\activedododotextmodediscretionary#1{##1}}%
- \futurelet\nextnext\next}%
- \next}
+%D More hyphention control, will be combined with hz setup.
-\def\activedododotextmodediscretionary#1#2%
- {\convertargument#2\to\discretionarytoken
- \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}%
- \ifx#1\nextnext % takec care of ||| and +++ and ......
- \prewordbreak\discretionary{\hbox{$#1$}}{}{\hbox{$#1$}}%
- \allowbreak\postwordbreak
- \def\nextnextnext{\afterassignment\egroup\let\next=}%
- \else\ifx\discretionarytoken\empty
- \checkafterdiscretionary
- \bgroup
- \checkbeforediscretionary
- \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
- \egroup
- \else\convertargument=\to\next\ifx\next\discretionarytoken
- \prewordbreak\textmodediscretionary
- \else\convertargument~\to\next\ifx\next\discretionarytoken
- \prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak
- \else\convertargument_\to\next\ifx\next\discretionarytoken
- \prewordbreak\discretionary{\textmodediscretionary}
- {\textmodediscretionary}{\textmodediscretionary}\prewordbreak
- \else\convertargument(\to\next\ifx\next\discretionarytoken
- \ifdim\lastskip>\!!zeropoint\relax
- (\prewordbreak
- \else
- \prewordbreak\discretionary{}{(-}{(}\prewordbreak
- \fi
- \else\convertargument)\to\next\ifx\next\discretionarytoken
- \ifx\nextnext\blankspace
- \prewordbreak)\relax
- \else\ifx\nextnext\space
- \prewordbreak)\relax
- \else
- \prewordbreak\discretionary{-)}{}{)}\prewordbreak
- \fi\fi
- \else\convertargument'\to\next\ifx\next\discretionarytoken
- \prewordbreak\discretionary{-}{}{'}\postwordbreak
- \else\convertargument<\to\next\ifx\next\discretionarytoken
- \beginofsubsentence\prewordbreak\beginofsubsentencespacing
- \else\convertargument>\to\next\ifx\next\discretionarytoken
- \endofsubsentencespacing\prewordbreak\endofsubsentence
- \else\convertargument^\to\next\ifx\next\discretionarytoken
- \prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
- \allowbreak\postwordbreak
- \else
- \checkafterdiscretionary
- \bgroup
- \checkbeforediscretionary
- \prewordbreak
- \discretionary{\hbox{#2}}{}{\hbox{#2}}%
- \allowbreak\postwordbreak
- \egroup
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \nextnextnext}
-
-%D Since we don't have to bother about active characters any
-%D longer, we end up with a pretty simple activating macro:
-
-\def\enableactivediscretionaries%
- {\let\dotextmodediscretionary=\activedotextmodediscretionary}
-
-\enableactivediscretionaries
-
-\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
- \def\next{\getvalue{\@nc@\string#1}}%
- \else\ifx\next\blankspace
- \def\next{\getvalue{\@nc@\string#1}}%
- \else
- \def\next{\dodohandlecompoundcharacter#1}%
- \fi\fi\fi
- \next}%
- \futurelet\next\dohandlecompoundcharacter}
-
-%D So far for supp-lan.tex.
-
-%D For Berend:
-
-\def\simpledoblanko%
- {\doifelse{\currentwitruimte}{\v!geen}
- {\blanko[\currentblanko]}
- {\blanko[\s!default]}}
-
-\definieerblanko
- [\s!default]
- [\v!wit]
-
-%\definieerblanko
-% [\s!default]
-% [\v!groot]
-
-%D Yes or no:
-
-\def\collectlocalfootnotes%
- {\def\localfootinsert##1% was \gdef, but never reset!
- {%\message{[local footnote]}%
- \global\setbox\localpostponedfootnotes=\vbox\bgroup
- \unvbox\localpostponedfootnotes
- \let\next}}
-
-\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
-\else
- \stelspatieringin
-\fi
- #2%
- \getvalue{\??ko#1\c!voorcommando}%
- \getvalue{\??ko#1\c!tekstcommando}%
- {\ifdisplaysectionhead
- \setstrut\begstrut#3\endstrut
-\xdef\localheaddepth{\the\dp\strutbox}%
- \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
-\else
- \stelspatieringin
-\fi
- #2%
- \getvalue{\??ko#1\c!tekstcommando}%
- {\ifdisplaysectionhead
- \setstrut\begstrut#4\endstrut
-\xdef\localheaddepth{\the\dp\strutbox}%
- \else
- #4%
- \fi}%
- \getvalue{\??ko#1\c!nacommando}%
- \ifdisplaysectionhead\endgraf\fi}}}}%
- \endheadplacement{#1}{#5}}
+\def\nohyphens%
+ {\ifx\dohyphens\relax
+ \edef\dohyphens%
+ {\hyphenpenalty\the\hyphenpenalty
+ \exhyphenpenalty\the\exhyphenpenalty\relax}%
+ \fi
+ \hyphenpenalty\@M\exhyphenpenalty\@M}
-%D depth
+\let\dohyphens\relax
-\def\beginheadplacement#1%
+%D Better (a mere copy with \dohyphens):
+
+\bgroup \catcode`\~=\active \catcode`\/=\active
+
+\unexpanded\gdef\hyphenatedurl#1% {}{} handles accents
{\bgroup
- \gdef\localheaddepth{\dp\strutbox}%
- \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
- \setupinteraction
- [\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
- \ifautocrossdocument
- \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
- \else
- \hbox{\box0}%
- \fi
- \else
- \hbox{\box0}%
- \fi
- \doflushfootnotes}% new
- \endgraf
- \nointerlineskip
- \dosomebreak\nobreak
- #2%
- \else
- \strut
- \doflushfootnotes % new
- \iflocation
- \ifautocrossdocument
- \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
- \else
- \unhbox0
- \global\let\headlastlinewidth\!!zeropoint
- \fi
- #2%
- \dimen0=\numberheaddistance
- \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
- \hskip\headsignal\ignorespaces
+ \ifnum\hyphenpenalty<10000 \else
+ \def\discretionary##1##2##3{##1\allowbreak##2}%
\fi
- \ifdisplaysectionhead
- \ifgridsnapping % important, font related depth, see comment
- \prevdepth\dp\strutbox
- \else
- \prevdepth\localheaddepth
- \fi
+ \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\~=\tildeletter \let~=\~%
+ \let\/=\slashletter \let/=\/%
+ \let\savedurl\empty
+ \handletokens#1\with\scanurl
+ \egroup}
+
+\egroup
+
+%D A prelude to strategies. Note for myself: overloads
+%D previous stuff from local pragma test files.
+
+\def\s!strategy{strategy}
+
+\def\currentstrategypass {1}
+\def\currentstrategyvariable{0}
+\def\maximumstrategypass {8}
+
+\newconditional\strategypassneeded
+\newconditional\strategypassforced
+
+\definetwopasslist{\s!strategy}
+
+\def\registerstrategypass%
+ {\ifnum\currentstrategypass>\maximumstrategypass \else
+ \ifconditional\strategypassforced
+ \doglobal\increment\currentstrategypass
+ \else%\ifconditional\strategypassneeded
+ %\doglobal\increment\currentstrategypass
+ \fi%\fi
\fi
- \stopsynchronisatie
- \egroup
- \egroup
-\doflushfootnotes % new, still needed?
- \ifdisplaysectionhead
- \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
- \else
- \nonoindentation % recently added, was a bug
- \fi}
+ \savecurrentvalue\currentstrategypass{\currentstrategypass}}
+
+\appendtoks \registerstrategypass \to \everybye % \everylastshipout
-%D Due to polish active /'s we have to deal a bit more
-%D robust with filename:
+\def\setstrategyvariable#1#2% key value
+ {%\doifnotstrategyvariable{#1}{\global\settrue\strategypassneeded}%
+ \doglobal\increment\currentstrategyvariable
+ \expanded{\immediatewriteutilitycommand{\noexpand
+ \twopassentry{\s!strategy}{\currentstrategyvariable}{#1::#2}}}}
-%D ...
+\def\doifstrategyvariableelse#1#2#3%
+ {\getstrategyvariable{#1}\iftwopassdatafound#2\else#3\fi}
+
+\def\getstrategyvariable#1% key
+ {\findtwopassdata{\s!strategy}{#1::}%
+ \setxvalue{\s!strategy:#1}{\twopassdata}}
+
+\def\retainstrategyvariable#1% key
+ {\expanded{\setstrategyvariable{#1}{\strategyvariable{#1}}}}
+
+\def\strategyvariable#1% key
+ {\csname\s!strategy:#1\endcsname}
+
+\let\stratvar\strategyvariable
+
+\def\forcestrategy{\global\settrue \strategypassforced}
+\def\abortstrategy{\global\setfalse\strategypassforced}
+
+\def\doifstrategyvariableelse#1#2#3%
+ {\getstrategyvariable{#1}\iftwopassdatafound#2\else#3\fi}
+
+\def\doifstrategyvariable #1#2{\doifstrategyvariableelse{#1}{#2}{}}
+\def\doifnotstrategyvariable#1#2{\doifstrategyvariableelse{#1}{}{#2}}
+
+%D New: only at start of columns; may change !
+
+\definesystemvariable {ks} % KolomSpan
+
+\def\setupcolumnspan[#1]%
+ {\getparameters[\??ks][#1]}
+
+\presetlocalframed
+ [\??ks]
+
+\setupcolumnspan
+ [\c!n=2,
+ \c!offset=\v!overlay,
+ \c!kader=\v!uit]
+
+\newbox\columnspanbox \let\postprocesscolumnspanbox\gobbleoneargument
+
+\def\dostartcolumnspan[#1]%
+ {\bgroup
+ \setupcolumnspan[#1]%
+ \forgetall
+%
+ \ifbinnenkolommen
+ \advance\hsize by \intercolumnwidth
+ \hsize=\@@ksn\hsize
+ \advance\hsize by -\intercolumnwidth
+ \fi
+%
+ \dowithnextbox
+ {\setbox\columnspanbox=\box\nextbox
+\ifbinnenkolommen\wd\columnspanbox=\hsize\fi
+ \postprocesscolumnspanbox\columnspanbox
+ \scratchdimen=\ht\columnspanbox
+ \setbox\columnspanbox=\hbox % depth to be checked, probably option!
+ {\localframed[\??ks][\c!offset=\v!overlay]{\box\columnspanbox}}%
+ \ht\columnspanbox=\scratchdimen
+ \dp\columnspanbox=\dp\strutbox
+ \wd\columnspanbox=\hsize
+ \ifbinnenkolommen
+ \ifnum\@@ksn>1
+ \setvsize
+ \dohandleallcolumns
+ {\ifnum\currentcolumn>\@@ksn\else
+ \global\setbox\currenttopcolumnbox=\vbox
+ {\ifnum\currentcolumn=1
+ \snaptogrid\vbox{\copy\columnspanbox}
+ \else
+ \snaptogrid\vbox{\vphantom{\copy\columnspanbox}}
+ \fi}%
+ \wd\currenttopcolumnbox=\hsize
+ \global\advance\vsize by -\ht\currenttopcolumnbox
+ \fi}
+ \global\pagegoal=\vsize
+ \else
+ \snaptogrid\vbox{\box\columnspanbox}
+ \fi
+ \else
+ \snaptogrid\vbox{\box\columnspanbox}
+ \fi
+ \prevdepth\dp\strutbox
+ \egroup}
+ \vbox\bgroup
+% \ifbinnenkolommen
+% \advance\hsize by \intercolumnwidth
+% \hsize=\@@ksn\hsize
+% \advance\hsize by -\intercolumnwidth
+% \fi
+ %\topskipcorrection % becomes an option !
+ \EveryPar{\begstrut\EveryPar{}}} % also !
+
+\def\startcolumnspan%
+ {\dosingleempty\dostartcolumnspan}
+
+\def\stopcolumnspan%
+ {\egroup}
+
+%D A test:
+
+\def\EndTableParBox%
+ {\removelastskip % added
+ %\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed
+\par
+\ifnum\prevgraf>0
+ \strut
+ \vskip-\lineheight
+\fi
+ \egroup % finishes the \vtop begun by \BeginTableParbox
+ \getboxheight\scratchdimen\of\box\scratchbox\relax % added
+ \ifdim\scratchdimen>\TABLEparheight % added
+ \global\TABLEparheight=\scratchdimen % added
+ \fi % added
+ \box\scratchbox}
+
+%D A few local optimizations and new features:
+
+\readfile {cont-loc} {} {}
+
+%D For Ton:
+
+\def\plaatsexterndocument[#1]%
+ {\def\doexternaldocument[##1][##2][##3]%
+ {\readlocfile{##2}{}{}}%
+ \getvalue{\v!file:::#1}}
+
+%D For me:
+
+\beginTEX
+
+\def\p!doifinstringelse#1#2%
+ {\def\pp!doifinstringelse##1#1##2##3\war%
+ {\csname if\if##2@fals\else tru\fi e\endcsname}%
+ \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here
+
+\endTEX
+
+\beginETEX \unless
+
+\def\p!doifinstringelse#1#2%
+ {\def\pp!doifinstringelse##1#1##2##3\war%
+ {\unless\if##2@}%
+ \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here
+
+\endETEX
+
+%D For Willy's nested commented buffers:
+
+\def\processnextbufferline#1#2#3%
+ {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run
+ \convertargument#1 \to\next
+ \doifinstringelse{\delcharacter\texcommentsymbol}{\delcharacter\next}
+ {\def\next{#3}}
+ {\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}
%D Some day:
@@ -351,10 +447,7 @@
% \flushmargincontent[#1][#2]{#3}%
% \markeer[\v!margetitel]{#3}}}
-%D Table
-
-
-%D New indeed. Undocumented and under development.
+%D Undocumented and still under development.
\def\startsimplecolumns%
{\dosingleempty\dostartsimplecolumns}
@@ -364,36 +457,49 @@
\getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1em,\c!n=2,#1]%
\setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln
\setbox\scratchbox=\vbox\bgroup
- \forgetall}
+ \forgetall} % \blanko[\v!blokkeer]
\def\stopsimplecolumns%
- {\removelastskip
+ {\removebottomthings
\egroup
\rigidcolumnbalance\scratchbox
\egroup}
-%D Aha.
+%D Improved:
+
+\newbox\rigidcolumnbox
\def\rigidcolumnbalance#1%
- {\global\chardef\rigidcolumnbox=#1\relax
- \ifnum\rigidcolumns=1
- \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox
+ {\ifnum\rigidcolumns=1 % tzt ook h/d correctie
+ \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi#1\relax
\else
- \hbox to \savedrigidhsize % was \hsize
- {\vbadness=10000
- \tabskip\!!zeropoint
+ \vbox
+ {\forgetall
+ \dontcomplain
\setbox\rigidcolumnbox=\vbox
- {\unvbox\rigidcolumnbox
- \unpenalty\removelastskip}% get rid of \blank's
- \splittopskip=\openstrutheight
-\splittopskip=\!!zeropoint
- %\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}}%
+ {\line{}\goodbreak\unvbox#1\removebottomthings}%
+ \splittopskip=\openstrutheight
+ \setbox\scratchbox=\vsplit\rigidcolumnbox to \!!zeropoint
+ \scratchdimen=\ht\rigidcolumnbox
+ \divide\scratchdimen by \rigidcolumns
+ \getnoflines\scratchdimen
+ \scratchdimen=\noflines\lineheight
+ \setbox\scratchbox=\hbox to \savedrigidhsize
+ {\dorecurse{\rigidcolumns}
+ {\setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen
+ \dp\scratchbox=\openstrutdepth
+ \vtop
+ \ifalignrigidcolumns to
+ \ifstretchrigidcolumns\vsize\else\scratchdimen\fi
+ \fi
+ {\unvbox\scratchbox}%
+ \hfill}%
+ \hfillneg}%
+ \advance\scratchdimen by -\openstrutdepth
+ \setbox\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}
+ \dp\scratchbox=\openstrutdepth
+ \ht\scratchbox=\scratchdimen
+ \box\scratchbox}
\fi}
%D Is this a better default?
@@ -410,127 +516,56 @@
\def\stopgeheel
{\stopregelcorrectie}
-%D Can save lots of mpgraph files when using pdftex:
+%D Under construction:
-\newif\ifrecycleMPslots \recycleMPslotsfalse
-
-\def\allocateMPslot#1%
- {\ifrunMPgraphics
- \ifcase\pdfoutput \recycleMPslotsfalse \fi
- \else
- \recycleMPslotsfalse
- \fi
- \ifrecycleMPslots
- \doloop
- {\doifundefined{\recurselevel MP}
- {\global\letvalue{\recurselevel MP}=\empty
- \global#1=\recurselevel\exitloop}}%
- %\message{[MP slot + \number#1]%
- \else
- \global\advance#1 by 1
- \fi}
-
-\def\deallocateMPslot#1%
- {\ifrunMPgraphics
- \ifcase\pdfoutput \recycleMPslotsfalse \fi
- \else
- \recycleMPslotsfalse
- \fi
- \ifrecycleMPslots
- \global\letbeundefined{\number#1MP}%
- %\message{[MP slot - \number#1]}%
- \fi}
-
-%D For Taco and David: (to be documented and added to
-%D setupb too).
-
-\def\definereferenceformat%
- {\dodoubleargument\dodefinereferenceformat}
-
-\def\dodefinereferenceformat[#1][#2]%
- {\iffirstargument
- \getparameters[\??rf#1]
- [\c!links={[},
- \c!rechts={]},
- \c!tekst=,
- \c!label=,
- \c!commando=\in,
- #2]%
- \unexpanded\setvalue{#1}{\doexecutereferenceformat{#1}}%
- \fi}
+\def\resetpositions%
+ {\let\someposition=\gobblesevenarguments % old
+ \let\pxypos =\gobblefourarguments % new
+ \let\pxywhdpos =\gobblesevenarguments} % new
-\def\noexecutelabelreferenceformat#1%
- {\doifvaluesomething{\??rf#1\c!tekst}
- {\gdef\textofreference{\getvalue{\??rf#1\c!tekst}}}%
- \getvalue{\??rf#1\c!commando}}
-
-\def\doexecutelabelreferenceformat#1%
- {\getvalue{\??rf#1\c!commando}%
- {\leftlabeltext {\getvalue{\??rf#1\c!label}}}%
- {\rightlabeltext{\getvalue{\??rf#1\c!label}}}}
-
-\def\doexecutereferenceformat#1%
- {\gdef\leftofreference {\getvalue{\??rf#1\c!links }}%
- \gdef\rightofreference{\getvalue{\??rf#1\c!rechts}}%
- \global\let\textofreference\empty % otherwise ~ added
- \doifelsevaluenothing{\??rf#1\c!label}
- {\let\next\noexecutelabelreferenceformat}
- {\let\next\doexecutelabelreferenceformat}%
- \next{#1}}
-
-\let\leftofreference \relax
-\let\rightofreference\relax
-\let\textofreference \relax
-
-\def\dodododoinatreference#1#2#3[#4]%
- {\ifx\next\bgroup
- \dododododoinatreference
- {\leftofreference#1\ignorespaces#3\rightofreference}{#2}[#4]%
- \else
- \dododododoinatreference
- {\leftofreference#1\rightofreference}{#2#3}[#4]%
- \fi}
+\resetpositions
-\def\dododododoinatreference#1#2[#3]%
+%D Some more box stuff, related to positioning (under
+%D construction). Nice stuff for a tips and tricks maps
+%D article.
+%D
+%D \starttypen
+%D \raisebox{100pt}\hbox{test}
+%D \raisebox50pt\hbox{test}
+%D \hsmash{\raisebox{100pt}\hbox{test}}
+%D \stoptypen
+
+\def\doraiselowerbox#1#2% a nice trick us used to accept
+ {\def\next% % both direct and {} dimensions
+ {\dowithnextbox
+ {\setbox\nextbox=\hbox{#1\scratchdimen\box\nextbox}%
+ \ht\nextbox=\ht\strutbox
+ \dp\nextbox=\dp\strutbox
+ \box\nextbox}}%
+ \afterassignment\next\scratchdimen=#2}
+
+\def\raisebox{\doraiselowerbox\raise}
+\def\lowerbox{\doraiselowerbox\raise}
+
+%D It's more convenient to use \type {\columnwidth} instead
+%D of messing around with boxes each time.
+
+\newdimen\columnwidth
+\newdimen\gutterwidth
+
+\def\determinecolumnwidth%
{\bgroup
- \forgetall
- \leaveoutervmode
- \doifreferencefoundelse{#3}
- {\bgroup
- \let\ignorespaces \empty % rather dirty trick, but ok
- \let\leftofreference \empty % the same, again ok
- \let\rightofreference\empty % and once more
- \def\textofreference {#2}% % temporary value
- \ifx\textofreference\empty % simple expansion
- \doifelsenothing{#1}
- {\egroup\dosymbolreference{#1}{\textofreference}[#3]}
- {\egroup\dowantedreference{#1}{\textofreference}[#3]}%
- \else
- \doifelsenothing{#1}
- {\egroup\dosymbolreference{#1}{#2}[#3]}
- {\egroup\dowantedreference{#1}{#2}[#3]}%
- \fi}
- {\dounknownreference{#1}{#2}[#3]}%
- \referentieinfo{<}{#3}%
- \global\let\leftofreference \empty
- \global\let\rightofreference\empty
- \global\let\textofreference \empty
+ \setbox\scratchbox=\hbox
+ {\setcolumnhsize
+ \global\columnwidth=\usercolumnwidth
+ \global\gutterwidth=\intercolumnwidth}%
\egroup}
-%D The next hack is used for some exiting new feature test.
-
-\def\resetpositions%
- {\let\someposition=\gobblesevenarguments}
-
-\resetpositions
-
%D The next line can be uncommented when Taco's extensions to
%D \quote {\TEX\ The Program} are used.
% \readfile {syst-eet} {} {}
-% I have to scan for \unhbox and use the vbox/hbox trick instead
-
\protect
\endinput
diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex
index e71f15da1..5451de8b0 100644
--- a/tex/context/base/cont-old.tex
+++ b/tex/context/base/cont-old.tex
@@ -24,32 +24,21 @@
\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}
+%substitutecommand \stelopsomminginopniveau \stelopsommingin
+%substitutecommand \stelopsommingvolledigin \stelopsommingin
+%substitutecommand \stelsomsymboolin \definieersymbool
+%substitutecommand \somsymbool \symbool
-\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
-\substitutecommand \stelzetspiegelin \stellayoutin
-\substitutecommand \stelmargesin \stellayoutin
-\substitutecommand \steloffsetin \stellayoutin
+ %def \randbreedte {\rechterrandbreedte}
- \def \randbreedte {\rechterrandbreedte}
-
-\substitutecommand \steldoordefinitiein \steldoordefinierenin
-\substitutecommand \steldoornummerin \steldoornummerenin
-\substitutecommand \steldoorsprongin \steldoorspringenin
+%substitutecommand \steldoordefinitiein \steldoordefinierenin
+%substitutecommand \steldoornummerin \steldoornummerenin
+%substitutecommand \steldoorsprongin \steldoorspringenin
\substitutecommand \volgendehoofdstuk {\stelkopnummerin[hoofdstuk][+1]}
\substitutecommand \volgendeparagraaf {\stelkopnummerin[paragraaf][+1]}
@@ -67,32 +56,32 @@
\substitutecommand \definieersynoniem \definieersynoniemen
-\substitutecommand \stelvoetnootin \stelvoetnotenin
+%substitutecommand \stelvoetnootin \stelvoetnotenin
-\substitutecommand \karakters \uitgerekt
+%substitutecommand \karakters \uitgerekt
-\substitutecommand \diepevoetnoot \voetnoot
+%substitutecommand \diepevoetnoot \voetnoot
% english:
\substitutecommand \setupformulas \setupformulae
-\substitutecommand \useexternalfigures \setupexternalfigures
+%substitutecommand \useexternalfigures \setupexternalfigures
\substitutecommand \setupintermezzos \setupintermezzi
-\substitutecommand \leftlined \leftaligned
-\substitutecommand \middlelined \midaligned
-\substitutecommand \rightlined \rightaligned
+%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
+%substitutecommand \setupcorps \setupbodyfont
+%substitutecommand \switchtocorps \switchtobodyfont
+%substitutecommand \definecorps \definebodyfont
+%substitutecommand \definecorpsenvironment \definebodyfontenvironment
+%substitutecommand \showcorps \showbodyfont
+%substitutecommand \showcorpsenvironment \showbodyfontenvironment
- \def \corpssize {\bodyfontsize}
+ %def \corpssize {\bodyfontsize}
\protect
\endinput
diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori
index db2526542..161c076c0 100644
--- a/tex/context/base/cont-usr.ori
+++ b/tex/context/base/cont-usr.ori
@@ -32,6 +32,7 @@
\definefilesynonym [lang-en.pat] [ushyph1.tex]
\definefilesynonym [lang-fi.pat] [fihyph.tex]
\definefilesynonym [lang-fr.pat] [frhyph.tex]
+\definefilesynonym [lang-hr.pat] [hrhyph.tex]
\definefilesynonym [lang-it.pat] [ithyph.tex]
\definefilesynonym [lang-la.pat] [lahyph7.tex]
\definefilesynonym [lang-nl.pat] [nehyph.tex]
@@ -41,7 +42,6 @@
\definefilesynonym [lang-sk.pat] [skhyph.tex]
\definefilesynonym [lang-sp.pat] [sphyph.tex]
\definefilesynonym [lang-sv.pat] [sehyph.tex]
-\definefilesynonym [lang-hr.pat] [hrhyph.tex]
\definefilesynonym [lang-tr.pat] [trhyph.tex]
\definefilesynonym [lang-uk.pat] [ukhyphen.tex]
\definefilesynonym [lang-us.pat] [ushyph1.tex]
@@ -51,9 +51,9 @@
%D moment) we specify encodings here.
\installlanguage [\s!cz] [\s!mapping=il2,\s!encoding=il2]
-\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2]
\installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0]
-\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2] % ans ?
+\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
%D Sometimes these are not wanted:
@@ -66,24 +66,26 @@
%D first. Normally you don't have to change a byte.
% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans
+% \installlanguage [\s!cz] [\c!status=\v!start] % czech
% \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!hr] [\c!status=\v!start] % croatian
% \installlanguage [\s!it] [\c!status=\v!start] % italian
% \installlanguage [\s!la] [\c!status=\v!start] % latin
% \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!sk] [\c!status=\v!start] % slovak
% \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 [\s!hr] [\c!status=\v!start] % croatian
-\installlanguage [deo] [\c!status=\v!start] % old german
+% \installlanguage [deo] [\c!status=\v!start] % old german
% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit
%D The next lines can be used for setting the language to be
@@ -96,6 +98,7 @@
% \setupcurrentlanguage[\s!en]
% \setupcurrentlanguage[\s!fi]
% \setupcurrentlanguage[\s!fr]
+% \setupcurrentlanguage[\s!hr]
% \setupcurrentlanguage[\s!it]
% \setupcurrentlanguage[\s!la]
% \setupcurrentlanguage[\s!nl]
@@ -106,7 +109,6 @@
% \setupcurrentlanguage[\s!sp]
% \setupcurrentlanguage[\s!sv]
% \setupcurrentlanguage[\s!tr]
-% \setupcurrentlanguage[\s!hr]
%D Local font settings can go here. Normally suitable
%D defaults are already preloaded, almost certainly the
@@ -114,9 +116,9 @@
%D next line is only meant as sample, take a look at the
%D format related files first.
-% \definefilesynonym [font-cmr] [font-csr]
-% \definefilesynonym [font-cmr] [font-plr]
+% \definefilesynonym [font-cmr] [font-csr] % czech & slovak
+% \definefilesynonym [font-cmr] [font-plr] % polish
%D Don't remove the next few lines.
-\protect
+\protect \endinput
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index a55ad272a..0c18656cc 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -13,7 +13,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{1999.12.30}
+\def\contextversion{2000.5.11}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
@@ -62,6 +62,7 @@
\input supp-pdf.tex
\input supp-spe.tex
\input supp-mps.tex
+\input supp-mpe.tex
\input supp-tpi.tex
\input supp-mat.tex
\input supp-ran.tex
@@ -132,9 +133,12 @@
\input symb-ini.tex
%D Next we load some core macro's. These implement the
-%D macros' that are seen by the users.
+%D macros' that are seen by the users. The order of loading
+%D is important, due to dependancies.
\input core-gen.tex
+\input core-uti.tex
+\input core-mar.tex
\input core-mak.tex
\input core-mat.tex
\input core-dat.tex
@@ -148,14 +152,22 @@
\input core-nav.tex
\input core-ref.tex
\input core-obj.tex
-\input core-01a.tex
-\input core-mul.tex
+\input core-buf.tex
+\input core-lst.tex
+\input core-num.tex
+\input core-itm.tex
+\input core-des.tex
+\input core-syn.tex
+\input core-mul.tex % moved
+\input main-001.tex % still to be split
+\input core-sec.tex
\input core-pag.tex
\input core-tbl.tex
\input core-mis.tex
\input core-mps.tex
+\input core-int.tex
-%D A few more languages, that have specifics use core
+%D A few more languages, that have specifics using core
%D functionality:
\input lang-chi.tex
@@ -183,18 +195,11 @@
\input core-fnt.tex
\input core-not.tex
-\input core-01b.tex
-\input core-01c.tex
+\input main-002.tex % still to be split
+\input main-003.tex % still to be split
\input core-fig.tex
-
-\input core-01d.tex
-\input core-01e.tex
-
-% core-02a.tex % obsolete, replaced by core-dat.tex
-% core-02b.tex
-% core-02c.tex
-\input core-02d.tex
+\input core-par.tex
%D The next two modules implement some additional
%D functionality concenring classes of documents and output.
@@ -266,7 +271,8 @@
\writestring{Tento balik pouziva balik TaBlE, ktery vytvoril M. J. Wichura (1988).}
\writestring{Je generovano jen nekolik pomocnych souboru, z nichz nektere musi byt}
\writestring{zpracovany programem TeXUtil (\utilityversion). Aktualni verze}
-\writestring{blok-maker je \blockversion.}
+\writestring{}
+\writestring{THE CZECH USER INTERFACE IS STILL UNDER DEVELOPMENT!}
\stopinterface
diff --git a/tex/context/base/core-01d.tex b/tex/context/base/core-01d.tex
deleted file mode 100644
index fe6a6f069..000000000
--- a/tex/context/base/core-01d.tex
+++ /dev/null
@@ -1,2331 +0,0 @@
-%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. See mreadme.pdf for
-%C details.
-
-\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 czech library: interactions
- title: interakce
- 1: pomer -- x -- (s x v)
- 2: aktivni
- 3: neaktivni
- 4: zadna strankova synchronizace (--) v 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
-
-\startmessages czech library: versions
- title: verze
- 1: postradam @+
- 2: oznacuji se strany
- 3: oznacene strany: --
-\stopmessages
-
-%I n=Interacteren
-%I c=\setupinteraction,\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 \setupinteraction[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}}%
- \doif{\@@scwachttijd}{\v!geen}{\def\@@scwachttijd{0}}}
-
-\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
- \processaction
- [\@@scoptie]
- [ \v!max=>\!!counte=1,
- \v!bookmark=>\!!counte=2,
- \s!unknown=>\!!counte=0,
- \s!default=>\!!counte=0]%
- %\doifelse{\@@scoptie}{\v!max}
- % {%\doif{\@@lyplaats}{\v!midden} % werkt niet goed / bovendien niet gewenst
- % % {\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}
- % {\doifelse{\@@scoptie}{\v!bookmark}
- % {\!!counte=2}
- % {\!!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 / www.pragma-ade.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{\box\locationbox}}}%{\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
- \ifcase0\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]%
- {\doifreferencepermittedelse{#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%
- {\ifdim#2>\!!zeropoint % new
- \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
- \fi}
-
-\def\vertikaalinteractiemenu#1#2#3#4%
- {\ifdim#2>\!!zeropoint % new
- \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
- \fi}
-
-\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
- \setupinteraction[\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
- \setupinteraction[\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
- \setupinteraction[\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
- \setupinteraction[\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
- \setupinteraction[\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
- \setupinteraction[\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]%
- {\iflocation
- \par % needed for pdftex
- \bgroup
- \dosetprofilepage
- \dogetprofilepage
- \def\processoneprofile##1##2%
- {\ExpandBothAfter\doifinsetelse{##2}{\processedprofiles}%
- {\doifsomething{##1}{(##1)}}%
- {\addtocommalist{##2}\processedprofiles
- ##1\relax
- \ifcase#1\relax
- \dobeginofprofile
- {##2}
- {\number\papierbreedte}{\number\papierhoogte}
- {\profilepage}%
- \else
- \doendofprofile
- \fi}}%
- \def\processedprofiles{}%
- \def\doprocessprofile##1%
- {\doifelse{\@@pfoptie}{\v!test}%
- {\goodbreak\blanko\nobreak\tt[\spatie
- \ifcase#1\v!start\else\v!stop\fi 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[#2]\doprocessprofile
- \egroup
- \par % needed for pdftex
- \fi}
-
-\def\startprofiel[#1]%
- {\iflocation
- \bgroup
- \addtocommalist{#1}\actualprofile
- \def\stopprofiel%
- {\processprofile1[#1]%
- \egroup}%
- \DoAfterFi\processprofile0[#1]%
- \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.
-%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]%
- {\doifelsenothing{#1}
- {\doifnot{\@@scwachttijd}{\v!geen}
- {\let\setpagetransition\setsomepagedelay}}
- {\doifelse{#1}{\v!start}
- {\doifnot{\@@scwachttijd}{\v!geen}
- {\let\setpagetransition\setsomepagedelay}}
- {\doglobal\newcounter\currentpagetransition
- \doifinsetelse{#1}{\v!reset,\v!stop}
- {\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\setsomepagedelay%
- {\expanded{\dosetpagetransition{0}{\@@scwachttijd}}}
-
-\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
- \doifelse{\@@scwachttijd}{\v!geen}
- {\expanded{\dosetpagetransition{\commalistelement}{0}}}
- {\expanded{\dosetpagetransition{\commalistelement}{\@@scwachttijd}}}%
- \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
- \doifassignmentelse{#1}
- {\getparameters[\??cc][#1]}
- {\getparameters[\??cc][\c!titel=#1,#2]}%
- \bgroup
- \obeylines
- \doif{\@@ccspatie}{\v!ja}{\obeyspaces}%
- \long\def\docommando##1%
- {\egroup
- \global\setbox\commentbox=\hbox
- {\!!widtha=\@@ccbreedte
- \!!heighta=\@@cchoogte
- \doinsertcomment
- {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
- {\@@cckleur}{0}{\@@ccsymbool}{##1}%
- \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi
- \box\commentbox
- \egroup}}%
- \grabuntil{\e!stop\e!commentaar}\docommando}
-
-\def\commentaar%
- {\dodoubleempty\docommentaar}
-
-\def\docommentaar[#1][#2]#3%
- {\bgroup
- \doifassignmentelse{#1}
- {\getparameters[\??cc][#1]}
- {\getparameters[\??cc][\c!titel=#1,#2]}%
- \!!widtha=\@@ccbreedte
- \!!heighta=\@@cchoogte
- \hbox to \!!zeropoint
- {\hskip-\@@ccmarge
- \raise\ht\strutbox\hbox
- {\doPDFinsertcomment
- {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
- {\@@cckleur}{0}{\@@ccsymbool}{#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
-%
-% \startcommentaar[symbool=Balloon]
-% Do we want this kind of rubish? And, why isn't this and
-% some more features related to text annotations so poorly
-% (actually not) documented? Anyhow, by providing this
-% functionality we demonstrate that \pdfTeX\ can do it. By
-% the way, it's funny that when in Acrobat we scale up the
-% text, the symbols scale down.
-% \stopcommentaar
-
-%D \macros
-%D {registermenubuttons}
-%D
-%D A still undocumented macro that generates a clickable
-%D alphabet to a register.
-
-\def\doregistermenubuttons[#1][#2]% [menu id] [register]
- {\bgroup
- \ifsecondargument
- \stelinteractiemenuin
- [#1][\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]%
- \def\docommando##1%
- {\noindent
- \menubutton[#1]{##1}[#2:##1]%
- \space}%
- \else
- \def\docommando##1%
- {\noindent
- \button[\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]{##1}[#1:##1]%
- \space}%
- \fi
- \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando
- \egroup}
-
-\def\registermenubuttons%
- {\dodoubleempty\doregistermenubuttons}
-
-\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,
- \c!wachttijd=\v!geen]
-
-\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!contrastkleur=\@@iacontrastkleur,
- \c!zelfdepagina=\v!ja,
- \c!onbekendeverwijzing=\v!ja]
-
-\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,
- \c!titel=,
- \c!spatie=\v!nee,
- \c!symbool=\v!normaal]
-
-\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-02a.tex b/tex/context/base/core-02a.tex
deleted file mode 100644
index b7f9ac411..000000000
--- a/tex/context/base/core-02a.tex
+++ /dev/null
@@ -1,198 +0,0 @@
-%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. See mreadme.pdf for
-%C details.
-
-\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
-
-\startmessages czech library: addresses
- title: adresy
- 1: --
- 2: primarni baze --
- 3: sekundarni baze --
-\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
deleted file mode 100644
index 52428d1ed..000000000
--- a/tex/context/base/core-02b.tex
+++ /dev/null
@@ -1,171 +0,0 @@
-%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. See mreadme.pdf for
-%C details.
-
-\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
deleted file mode 100644
index d667a8079..000000000
--- a/tex/context/base/core-02d.tex
+++ /dev/null
@@ -1,49 +0,0 @@
-%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. See mreadme.pdf for
-%C details.
-
-\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-buf.tex b/tex/context/base/core-buf.tex
new file mode 100644
index 000000000..445abc564
--- /dev/null
+++ b/tex/context/base/core-buf.tex
@@ -0,0 +1,871 @@
+%D \module
+%D [ file=core-buf,
+%D version=2000.01.05,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Buffers and Blockmoves,
+%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. See mreadme.pdf for
+%C details.
+
+% investigate etex's \readline and \scantokens
+
+\writestatus{loading}{Context Core Macros / Buffers and Blockmoves}
+
+\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 czech library: textblocks
+ title: textovyblok
+ 1: nova verze, je treba druhy beh
+ 2: zapisuji bloky do --
+ 3: ctu bloky z --
+ 4: je treba druhy beh
+ 5: -- neni skryto
+ 6: -- skryto a zpracovano
+ 7: -- skryto
+ 8: -- vysazeno
+ 9: -- nevysazeno
+ 10: -- nacteno a zpracovano
+ 11: -- nacteno a vysazeno
+ 12: -- preskoceno
+\stopmessages
+
+\unprotect
+
+% PAS OP!
+
+\def\checknummer#1%
+ {\bgroup
+%\message{\the\blocklevel}\wait
+ \ifdoingblocks
+ \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\maakvoorafgaandenummer[#1]%
+ {\bgroup
+%\message{\the\blocklevel}\wait
+ \ifdoingblocks
+ \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}
+
+% \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
+ \ifx\next\emptybufferline
+ \ifsegmentatebuffer \emptybufferlinetrue \fi
+ \def\next{#3}%
+ \else
+ \emptybufferlinefalse
+ \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}}}%
+ \fi
+ \next}
+
+\def\dostartbuffer%
+ {\bgroup
+ \obeylines % nodig, anders gaat 't fout als direct \starttabel (bv)
+ \doquadrupleempty\dodostartbuffer}
+
+\def\dodostartbuffer[#1][#2][#3][#4]% upward compatible
+ {\iffourthargument
+ \def\next{\dododostartbuffer[#1][#2][#3][#4]}%
+ \else
+ \def\next{\dododostartbuffer[][#1][#2][#3]}%
+ \fi
+ \next}
+
+\def\dododostartbuffer[#1][#2][#3][#4]%
+ {\showmessage{\m!systems}{15}{#2}%
+ \doifelsevalue{\??bu#1\c!alinea}{\v!ja}
+ {\segmentatebuffertrue}
+ {\doifnumberelse{\getvalue{\??bu#1\c!alinea}}
+ {\segmentatebuffertrue}
+ {\segmentatebufferfalse}}%
+ \doifelse{#4}{}
+ {\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{#4}% \letvalue{#4}=\relax % \undefined
+ \@EA\convertargument\csname#3\endcsname\to\beginofblock
+ \@EA\convertargument\csname#4\endcsname\to\endofblock}%
+ \def\closeblock%
+ {\ifsegmentatebuffer
+ \immediate\write\tmpblocks{\string\stopbufferparagraph}%
+ \fi
+ \immediate\closeout\tmpblocks
+ \egroup
+ \getvalue{#4}}%
+ \doifelsenothing{#2}
+ {\immediate\openout\tmpblocks=\TEXbufferfile{\jobname}}
+ {\immediate\openout\tmpblocks=\TEXbufferfile{#2}}%
+ \ifsegmentatebuffer
+ \immediate\write\tmpblocks{\string\startbufferparagraph}%
+ \fi
+ \newcounter\nestedbufferlevel
+ \setupcopyblock
+ \let\writeoutblocks\gobbleoneargument
+ \copyblockline}
+
+\letvalue{\e!start\e!buffer}\dostartbuffer
+
+% \setbuffer[name]#2\endbuffer : saves to file #1.tmp
+
+\def\setbuffer[#1]#2\endbuffer%
+ {\immediate\openout\tmpblocks=\TEXbufferfile{#1}%
+ \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
+ \doifdefinedelse{\??bu##1\c!nummer}
+ {#3{\TEXbufferfile{def-\getvalue{\??bu##1\c!nummer}}}{}{}}
+ {#3{\TEXbufferfile{##1}}{}{}}%
+ \endrestorecatcodes}%
+ \doifelsenothing{#2}
+ {\dodobuffer\jobname}
+ {\processcommalist[#2]\dodobuffer}}
+
+\def\haalbuffer%
+ {\dodoubleempty\dohaalbuffer}
+
+\def\dohaalbuffer[#1][#2]%
+ {\ifsecondargument
+ \dodohaalbuffer[#1][#2]%
+ \else
+ \dodohaalbuffer[][#1]%
+ \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{\??bu#1\c!nummer}{\nofdefinedbuffers}%
+ \setvalue {\??bu#1\c!alinea}{\v!nee}%
+ \setevalue{\e!start#1}%
+ {\noexpand\dostartbuffer[#1][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}
+
+% TODO: no grouping due to sidefloats
+
+\expandafter \convertargument \gobbleoneargument @ \to \emptybufferline
+
+\newif\ifsegmentatebuffer
+\newif\ifemptybufferline
+
+\def\skippedbufferparagraphs{0}
+
+\let\startbufferparagraph\relax
+\let\stopbufferparagraph \par % \relax
+
+\newcount\currentbufferparagraph
+
+\def\getbufferparagraphs%
+ {\dodoubleempty\dogetbufferparagraphs}
+
+\def\dosetbufferoffset#1%
+ {\doifnumberelse{\getvalue{\??bu#1\c!alinea}}
+ {\currentbufferparagraph=-\getvalue{\??bu#1\c!alinea}}
+ {\currentbufferparagraph=0}%
+ \relax}
+
+\def\dogetbufferparagraphs[#1][#2]%
+ {\iffirstargument
+ \ifsecondargument
+ \dosetbufferoffset{#1}%
+ \doifelse{#2}{\v!alles}
+ {\def\startbufferparagraph{\normalbufferparagraph{#1}}}
+ {\def\startbufferparagraph{\filterbufferparagraph{#1}{#2}}}%
+ \def\stopbufferparagraph{\dostopbufferparagraph{#1}}%
+ \def\next{\getparagraphedbuffer[#1]}%
+ \else
+ \dosetbufferoffset\empty
+ \def\startbufferparagraph{\filterbufferparagraph{}{#1}}%
+ \def\stopbufferparagraph{\dostopbufferparagraph{}}%
+ \def\next{\getparagraphedbuffer[]}%
+ \fi
+ \else
+ \dosetbufferoffset\empty
+ \def\startbufferparagraph{\normalbufferparagraph{}}%
+ \def\stopbufferparagraph{\dostopbufferparagraph{}}%
+ \def\next{\getparagraphedbuffer[]}%
+ \fi
+ \next}
+
+\def\getparagraphedbuffer[#1]%
+ {\dobuffer{16}[#1]\readjobfile}
+
+\def\dostopbufferparagraph#1%
+ {\getvalue{\??bu#1\c!na}\par}
+
+\def\dostartbufferparagraph#1%
+ {\par\getvalue{\??bu#1\c!voor}}
+
+\def\normalbufferparagraph%
+ {\advance\currentbufferparagraph 1
+ \ifnum\currentbufferparagraph>0
+ \expandafter\dostartbufferparagraph
+ \else
+ \expandafter\gobbleoneargument
+ \fi}
+
+\def\filterbufferparagraph#1#2%
+ {\advance\currentbufferparagraph 1
+ \ifnum\currentbufferparagraph>0
+ \doifinsetelse{\the\currentbufferparagraph}{#2}
+ {\let\next\dostartbufferparagraph}
+ {\let\next\fakebufferparagraph}%
+ \else
+ \let\next\gobblebufferparagraph
+ \fi
+ \next{#1}}
+
+\long\def\gobblebufferparagraph#1#2\stopbufferparagraph%
+ {}
+
+\def\fakebufferparagraph#1%
+ {\bgroup
+ \def\stopbufferparagraph{\dostopbufferparagraph{#1}\egroup\egroup}%
+ \setbox\scratchbox=\vbox\bgroup\dostartbufferparagraph{#1}}
+
+\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}
+
+\let\blockstatus\empty
+
+\def\setblockcounters%
+ {\ifx\blockstatus\empty \else
+ \@EA\dosetblockcounters\@EA[\blockstatus]%
+ \fi}
+
+\def\getblockstatus#1%
+ {\dosetblklevel{\getvalue{\??by\@@bscriterium}}%
+ \doifblklevelelse[#1]
+ {\global\blockpermittedtrue}
+ {\global\blockpermittedfalse}%
+ \def\blockstatus{#1}}
+
+\def\setupblockparameters%
+ {\dodoubleargument\dosetupblockparameters}
+
+\def\dosetupblockparameters[#1][#2]%
+ {\getparameters[\??tb#1][#2]}
+
+\beginTEX
+
+\def\blockparameter#1#2%
+ {\csname\@EA\ifx\csname\??tb#1#2\endcsname\relax empty\else\??tb#1#2\fi\endcsname}
+
+\endTEX
+
+\beginETEX \ifcsname
+
+\def\blockparameter#1#2%
+ {\@EA\csname\ifcsname\??tb#1#2\endcsname\??tb#1#2\else empty\fi\endcsname}
+
+\endETEX
+
+\ifx\outblocks\undefined \newwrite\outblocks \fi
+\ifx\inpblocks\undefined \newread \inpblocks \fi
+\ifx\tmpblocks\undefined \newwrite\tmpblocks \fi
+\ifx\blockbox \undefined \newbox \blockbox \fi
+
+\newif\ifcopyingblocks
+\newif\ifvisible \visibletrue
+\newif\ifblockpermitted
+\newif\iftmpblockstarted
+\newif\ifoldinbijlagen
+\newif\ifdoingblocks
+
+\newcount\blocklevel \blocklevel=0
+
+\def\setblocklevel#1%
+ {\global\advance\blocklevel by #11
+ \ifnum\blocklevel>2\relax\doingblockstrue\else\doingblocksfalse\fi}
+
+\def\opentmpblock%
+ {\immediate\openout\tmpblocks=\TEXbufferfile{\f!utilityfilename\the\blocklevel}}
+
+\def\closetmpblock%
+ {\immediate\write\tmpblocks{}% een lege regel is handig voor \par commando's
+ \immediate\closeout\tmpblocks}
+
+\def\writetmpblock#1%
+ {\iftmpblockstarted
+ \ifsegmentatebuffer
+ \ifemptybufferline
+ \immediate\write\tmpblocks{\string\stopbufferparagraph }%
+ \immediate\write\tmpblocks{\string\startbufferparagraph}%
+ \else
+ \immediate\write\tmpblocks{#1}%
+ \fi
+ \else
+ \immediate\write\tmpblocks{#1}%
+ \fi
+ \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\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%
+ {\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
+ \ifx\next\emptybufferline
+ \ifsegmentatebuffer \emptybufferlinetrue \fi
+ \def\next{#3}%
+ \else
+ \emptybufferlinefalse
+ \doifinstringelse{\endofblock}{\next}
+ {\def\next{#2}}
+ {\def\next{#3}}%
+ \fi
+ \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\@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%
+ {\edef\blockfilename{\TEXbufferfile{\f!utilityfilename\the\blocklevel}}%
+ \setblocklevel+%
+ \readjobfile{\blockfilename}{}{}%
+ \setblocklevel-}%
+
+\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]%
+ {\doifassignmentelse{#3}
+ {\def\next{\dodoverbergblok[#1][#2][][#3]}}
+ {\def\next{\dodoverbergblok[#1][#2][#3][]}}%
+ \next}
+
+\def\dodoverbergblok[#1][#2][#3][#4]%
+ {\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}{#4}}%
+ \saveblock{#1}{#3#4}}%
+ \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#4}}}%
+ {\showwarning{\m!textblocks}{7}{\bloktitel}%
+ \def\next%
+ {\def\dobeforeblock####1####2%
+ {\begingroup
+ \globaldefs=-1\relax}%
+ \def\doafterblock####1####2%
+ {\endgroup}%
+ \copyblock{#1}{#3#4}}}%
+ \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#2%
+ {\blockpermittedtrue % ?
+ \bgroup % before \c!voor (think of: \c!voor=\startitemize)
+ \dosetupblockparameters[#1][#2]% voor 'voor'?
+ \getvalue{\??tb#1\c!voor}%
+ \doattributes{\??tb#1}\c!letter\c!kleur{}%
+ \visibletrue
+ \catcode`\^^M=\@@endofline\relax
+ \getvalue{\??tb#1\c!binnen}%
+ \loadoneblock
+ \par
+ \getvalue{\??tb#1\c!na}
+ \egroup}
+
+\def\dohandhaafblok[#1][#2][#3]%
+ {\doifassignmentelse{#3}
+ {\def\next{\dodohandhaafblok[#1][#2][][#3]}}
+ {\def\next{\dodohandhaafblok[#1][#2][#3][]}}%
+ \next}
+
+\def\dodohandhaafblok[#1][#2][#3][#4]%
+ {\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}{#4}}%
+ \else
+ \showwarning{\m!textblocks}{9}{\bloktitel}%
+ \fi
+ \saveblock{#1}{#3#4}}
+
+\def\dohandhaafblokken[#1][#2]%
+ {\def\docommando##1%
+ {\setvalue{\e!beginvan##1}%
+ {\bgroup\obeylines\dotripleempty\dohandhaafblok[##1][#2]}}%
+ \processcommalist[#1]\docommando}
+
+\def\handhaafblokken%
+ {\dodoubleempty\dohandhaafblokken}
+
+\newconditional\processblockstatus
+\newconditional\dummyblockstatus
+\newconditional\blockassignmentstatus
+
+\def\dodogebruikblok#1#2#3#4%
+ {\getblockstatus{#2}%
+ \ifblockpermitted
+ \setfalse\dummyblockstatus
+ \doifassignmentelse{#3}
+ {\settrue \blockassignmentstatus}
+ {\setfalse\blockassignmentstatus}%
+ \doifelsenothing{#4}
+ {\edef\bloktitel{#1}}
+ {\ifconditional\blockassignmentstatus
+ \edef\bloktitel{#1}%
+ \else
+ \doifnotcommon{#3}{#4}
+ {\ifconditional\processblockstatus
+ \settrue\dummyblockstatus
+ \else
+ \global\blockpermittedfalse
+ \fi}%
+ \edef\bloktitel{#1:#3}%
+ \fi}%
+ \else
+ \edef\bloktitel{#1}%
+ \fi
+ \ifblockpermitted
+ \setblocklevel+%
+ \ifconditional\blockassignmentstatus \else
+ \doifinset{-}{#3}{\settrue\dummyblockstatus}%
+ \fi
+ \ifconditional\dummyblockstatus
+ \showwarning{\m!textblocks}{10}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par
+ \egroup
+ \setblocklevel-}%
+ \def\next%
+ {\setbox0=\vbox\bgroup
+ \ifconditional\blockassignmentstatus
+ \dosetupblockparameters[#1][#3]%
+ \fi}%
+ \else
+ \showwarning{\m!textblocks}{11}{\bloktitel}%
+ \setvalue{\s!thiswasblock#1}%
+ {\par
+ \getvalue{\??tb#1\c!na}%
+ \egroup
+ \setblocklevel-}%
+ \def\next%
+ {\bgroup
+ \ifconditional\blockassignmentstatus
+ \dosetupblockparameters[#1][#3]%
+ \fi
+ \getvalue{\??tb#1\c!voor}%
+ \doattributes{\??tb#1}\c!letter\c!kleur{}%
+ \visibletrue
+ \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}}
+
+% the buffer mechanism handles nesting, add some switch
+
+\setvalue{\e!start\e!verbergen}%
+ {\dostartbuffer[buf-\nofpostponedblocks]
+ [\e!start\e!verbergen][\e!stop\e!verbergen]}
+
+\stelbufferin
+ [\c!alinea=\v!nee,
+ \c!voor=,
+ \c!na=]
+
+\protect \endinput
diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex
index 7acd94912..b378db9d9 100644
--- a/tex/context/base/core-con.tex
+++ b/tex/context/base/core-con.tex
@@ -246,40 +246,29 @@
\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
+ \!!counta=#3\relax
+ \advance\!!counta -1
+ \!!countb=\!!counta
+ \multiply\!!countb 365
+ \advance\!!countb \ifcase#2\relax
+ 0 \or 0 \or 31 \or 59 \or 90 \or120 \or151 \or
+ 181 \or212 \or243 \or273 \or304 \or334 \or365 \fi
+ \advance\!!countb #1\relax
+ \ifnum#2>2
+ \doifleapyearelse{#3}{\advance\!!countb 1}{}\relax
\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}
+ \!!countc=\!!counta
+ \DoDiv\!!countc by4to\!!countc
+ \advance\!!countb \!!countc
+ \!!countc=\!!counta
+ \DoDiv\!!countc by100to\!!countc
+ \advance\!!countb -\!!countc
+ \!!countc=\!!counta
+ \DoDiv\!!countc by400to\!!countc
+ \advance\!!countb \!!countc
+ \DoMod\!!countb by7to\!!countb
+ \advance\!!countb 1
+ \@EA\egroup\@EA\normalweekday\the\!!countb\relax}
\def\dayoftheweek#1#2#3%
{\getdayoftheweek{#1}{#2}{#3}\doconvertday{\normalweekday}}
@@ -440,6 +429,8 @@
%D \haalbuffer
%D \stopregels
+\def\kenmerkdatumpatroon{j,mm,dd} % jj,mm,dd changed at januari 1-1-2000
+
\def\complexcurrentdate[#1]%
{\bgroup
\let\labellanguage=\currentlanguage
@@ -455,7 +446,7 @@
j=>\the\normalyear,
y=>\the\normalyear,
w=>\betweendates\dayoftheweek\normalday\normalmonth\normalyear,
- \v!kenmerk=>{\complexcurrentdate[jj,mm,dd]},
+ \v!kenmerk=>\expanded{\complexcurrentdate[\kenmerkdatumpatroon]},
\v!dag=>\betweendates\the\normalday,
\v!maand=>\betweendates\month\normalmonth,
\v!MAAND=>\betweendates\MONTH\normalmonth,
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
new file mode 100644
index 000000000..c28867ae2
--- /dev/null
+++ b/tex/context/base/core-des.tex
@@ -0,0 +1,860 @@
+%D \module
+%D [ file=core-des,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Descriptions,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Descriptions}
+
+\unprotect
+
+% 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}% NAAR BUITENSTE NIVEAU !
+ {\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}}% copy ?
+% \@@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\@@definitielinkspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \leftskip\@@leftdefinitieskip
+ \rightskip\@@rightdefinitieskip
+ \advance\leftskip by \!!widtha
+ \@@makedefinitiepurebox{#1}\raggedright
+ \advance\leftskip by \!!widthb
+ \llap
+ {\hbox to \leftskip
+ {\hskip\@@leftdefinitieskip
+ \copy\@@definitiebox\hss}}%
+ \@@dodefinitie{#1}}
+
+\def\@@definitierechtspure#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}%
+ \leftskip\@@leftdefinitieskip
+ \rightskip\@@rightdefinitieskip
+ \advance\rightskip by \!!widtha
+ \@@makedefinitiepurebox{#1}\raggedleft
+ \rlap
+ {\hskip\hsize
+ \hskip-\leftskip
+ \hskip-\rightskip
+ \copy\@@definitiebox
+ \hskip\@@rightdefinitieskip}%
+ \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!boven}#1[#2]#3%
+ {%\pagina[\v!voorkeur]% % Weg ermee!
+ %\dosomebreak{\goodbreak}% % Dit is beter en nodig!
+ \dohandelpaginaafX1 % En dit moet het maar worden.
+ \@@dostartdefinitie{#1}[#2]{\let\\=\space#3}%
+ \copy\@@definitiebox\par
+ \nobreak
+ \getvalue{\??dd#1\c!tussen}%
+ \nobreak
+ \@@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
+ \hskip\!!widthb % toegevoegd
+ \@@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}}
+
+\setvalue{@@definitie\v!hangend}#1[#2]#3%
+ {\@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
+ \advance\leftskip by -\leftskipadaption
+ \ifdim\leftskipadaption=\!!zeropoint
+ \leftskipadaption=1.5em % just some default
+ \ifnum\insidedefinition=1 \ifdim\leftskip>\!!zeropoint
+ \leftskipadaption=\leftskip
+ \fi \fi
+ \fi
+ \ifnum\insidedefinition=1
+ \advance\leftskip by \leftskipadaption
+ \fi
+ \hskip-\leftskipadaption
+ \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}}}}}}%
+% \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}
+
+%D A new key 'titeluitlijnen' in definitions.
+
+\chardef\insidedefinition=0
+
+\let\@@leftdefinitieskip \!!zeropoint
+\let\@@rightdefinitieskip\!!zeropoint
+
+\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}%
+ \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
+ \doifelsevalue{\??dd#1\c!titeluitlijnen}{\v!nee}
+ {\edef\@@leftdefinitieskip {\the\leftskip }%
+ \edef\@@rightdefinitieskip{\the\rightskip}}
+ {\ifcase\insidedefinition
+ \edef\@@leftdefinitieskip {\the\leftskip }%
+ \edef\@@rightdefinitieskip{\the\rightskip}%
+ \fi}%
+ \ifcase\insidedefinition
+ \chardef\insidedefinition=1
+ \or
+ \chardef\insidedefinition=2
+ \fi
+ \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}
+
+\def\showdnpuretext#1%
+ {\strut\getvalue{\??dd#1\c!tekst}} % geen spatie
+
+\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\special@@definitiewoord#1#2#3#4[#5]#6#7%
+ {\strut
+ \doifelsevalue{\??dd#1\c!nummer}{\v!nee}
+ {\!!doneafalse}
+ {\doifelse{#5}{-}
+ {\!!doneafalse}
+ {\!!doneatrue}}%
+ \chardef\definitiekoppeling=0
+ \iflocation
+ \doifvaluesomething{\??dd#1\c!koppeling}
+ {\processaction % genereert > of <
+ [\getvalue{\??dd#1\c!koppelwijze}]
+ [ \v!lokaal=>\chardef\definitiekoppeling=1, % old: default
+ \v!globaal=>\chardef\definitiekoppeling=2]}% new: global crosslinking
+ \fi
+ \stelnummerin % the number is called indirectly
+ [\getvalue{\??dd#1\??dd\c!nummer}]
+ [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]%
+ \if!!donea
+ \getvalue{\e!volgende#2#1}%
+ \iflocation
+ \bgroup
+ \setvalue{\??dd#1\c!sectienummer}{\v!ja}%
+ \protectconversion
+ %\maakvoorafgaandenummer[#1]%
+ \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
+ \ifcase\definitiekoppeling \or
+ \xdef\internaldoornummer{#3{#1}}%
+ \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ \or
+ \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}%
+ \rawreference{\s!num}{#1:\internaldoornummer}{}%
+ \fi
+ \egroup
+ \fi
+ %\maakvoorafgaandenummer[#1]%
+ \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
+ \hbox
+ {\let\normalkap\relax % sorry, uppercase causes troubles
+ \doattributes % \nocase primitive needed
+ {\??dd#1}\c!kopletter\c!kopkleur
+{\getvalue{\??dd#1\c!commando}%
+ {\showdntext{#2#1}%
+ \domakednnummer#3{#1}%
+ \getvalue{\??dd#1\c!afsluiter}}%
+}%
+ \iflocation\ifcase\definitiekoppeling \else
+ \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
+ \doifreferencefoundelse{\localconnection}
+ {\in[\localconnection]}{}% genereert > of <
+ %\in[\localconnection]%
+ \fi\fi}%
+ \doifnot{#5}{-}{\rawreference{\s!num}{#5}{#3{#1}}}%
+ \else % Why was this strange expansion needed?
+ \hbox
+ {\edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
+ \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
+{\noexpand\getvalue{\??dd#1\c!commando}%
+ {\!!stringa}}%
+}%
+ \doifnot{#5}{-}{\rawreference{\s!num}{#5}{}}}%
+ \fi}
+
+\def\@@ddsetsubsubsubnummer#1%
+ {\edef\doornummer{\getvalue{\??dd#1\??dd\c!nummer}}%
+ \setnummer[\v!sub\v!sub\v!sub\doornummer]}
+
+\def\@@ddsetsubsubnummer#1%
+ {\@@ddresetsubsubsubnummer{#1}%
+ \setnummer[\v!sub\v!sub\doornummer]}
+
+\def\@@ddsetsubnummer#1%
+ {\@@ddresetsubsubnummer{#1}%
+ \setnummer[\v!sub\doornummer]}
+
+\def\@@ddsetnummer#1%
+ {\@@ddresetsubnummer{#1}%
+ \setnummer[\doornummer]}
+
+\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]%
+ \doifdefined{\??dd#1\c!start}
+ {\stelnummerin[#1][\c!start=\getvalue{\??dd#1\c!start}]}%
+ \stelnummerin[#1][\c!conversie=\getvalue{\??dd#1\c!conversie}]}
+
+\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%
+ {\makecounter{\??dd\c!koppeling#1}% new: global cross linking
+ \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=,\c!koppelwijze=\v!lokaal,#4]}%
+ {\doifelsenothing{#4}
+ {\getparameters[\??dd#3#1]%
+ [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
+ \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=,#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,\c!koppelwijze]%
+ \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!set#3#1}%
+ {\dosetdoornummer[#1][#3]}%
+ \setvalue{\s!reset#3#1}%
+ {\doresetdoornummer[#1][#3]}%
+ \setvalue{\e!volgende#3#1}%
+ {\dotripleempty\dovolgendedoornummer[#1][#3]}}
+
+\def\dovolgendedoornummer[#1][#2]%
+ {\pluscounter{\??dd\c!koppeling#1}% new: global crosslinking
+ \getvalue{\??dd\c!volgende#2\c!nummer}{#1}}%
+
+\def\doresetdoornummer[#1][#2]%
+ {\getvalue{\??dd\s!reset#2\c!nummer}{#1}}%
+
+\def\dosetdoornummer[#1][#2]%
+ {\getvalue{\??dd\s!set#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}
+
+% 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}}}
+ {\getvalue{\??ds#1\c!afstand}}%
+ \advance\!!widtha by \getvalue{\??ds#1\c!afstand}%
+ \setbox2=\hbox to \!!widtha
+ {\doattributes
+ {\??ds#1}\c!kopletter\c!kopkleur
+ {\strut
+ \getvalue{\??ds#1\c!tekst}%
+ \hss
+ \getvalue{\??ds#1\c!scheider}%
+ \hskip\getvalue{\??ds#1\c!afstand}}}%
+ \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,\c!afstand]%
+ \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}
+
+\def\dodoorlabel[#1][#2]%
+ {\getvalue{\s!number#1\c!voor}%
+ \bgroup
+ \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]}}
+
+\def\doorlabelen%
+ {\dodoubleargumentwithset\dodoorlabelen}
+
+\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=]
+
+\steldoorspringenin
+ [\c!letter=\v!normaal,
+ \c!kopletter=\v!normaal,
+ \c!kleur=,
+ \c!kopkleur=,
+ \c!breedte=\v!passend,
+ \c!tekst=\unknown,
+ \c!monster=,
+ \c!voor=\blanko,
+ \c!na=\blanko,
+ \c!afstand=1em,
+ \c!scheider={ :}]
+
+\protect \endinput
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index 5ae559434..954f88c12 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -232,12 +232,11 @@
%D Should be a special!
\def\dogetfiguresizetex#1#2#3#4#5#6% file pagina ...
- {\ifx\@@efextension\c!tex \else \ifx\@@efextension\c!tmp \else
- \doifnumberelse{\@@efextension}
- {\executedfalse}
- {\ExpandBothAfter\doifinset{\@@efextension}{\figuretypes}
- {\executedfalse}}%
- \fi \fi
+ {\doifinset{\@@efextension}{\c!tex,\c!tmp}
+ {\doifnumberelse{\@@efextension}
+ {\executedfalse}
+ {\ExpandBothAfter\doifinset{\@@efextension}{\figuretypes}
+ {\executedfalse}}}%
\ifexecuted
\global\setbox\foundexternalfigure=\vbox
{\insidefloattrue
@@ -273,22 +272,20 @@
\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
+ \ifexecuted % searching for mps, eps found, but no valid mps
+ \doif{\@@efcurrenttype}{\c!mps}{\ifcase\EPScreator\executedfalse\fi}%
+ \fi
% until here
\ifexecuted
\chardef\figurestatus=3
- \ifx\@@efcurrenttype\c!eps
- \ifcase\EPScreator
+ \doifelse{\@@efcurrenttype}{\c!eps}
+ {\ifcase\EPScreator
\@@eftrace{found}%
- \else
- \let\@@efcurrenttype\c!mps
- \@@eftrace{mps found}%
- \fi
- \else
- \@@eftrace{found}%
- \fi
+ \else
+ \let\@@efcurrenttype\c!mps
+ \@@eftrace{mps found}%
+ \fi}
+ {\@@eftrace{found}}%
\geteparameters % e !
[\??ep]
[\c!x=\the\!!widtha,\c!y=\the\!!heighta,
@@ -335,21 +332,20 @@
\def\getfiguredimensionsC%
{\ifcase\figurestatus\ifrunutilityfile\ifcase\figurefilemode\else
- \ifx\@@efcurrenttype\c!tex\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
+ \doif{\@@efcurrenttype}{\c!tex}
+ {\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
+ \popendofline
+ \@@eftrace{\ifcase\figurestatus not \fi found}}
+ {}}%
\fi\fi\fi}
\def\presetfigureB[#1][#2]%
@@ -563,32 +559,42 @@
\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
+ \divide\dimen2 by \!!thousand
+ \divide\dimen0 by \dimen2
+ \figxsca=\dimen0 % x scale
+ \figysca=\dimen0 % 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
+ \divide\dimen2 by \!!thousand
+ \multiply\dimen2 by \dimen0
+ #3=\dimen2 } % #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
+ \divide\dimen2 by \!!thousand
+ \divide\dimen0 by \dimen2
+ #3=\dimen0 } % #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}
+ \ifcase0\@@efschaal\relax
+ #3=\!!thousand
+ \else
+ #3=\@@efschaal
+ \fi
+ \relax % important !
+ \ifnum#3=\!!thousand\else
+ \divide#1 by \!!thousand
+ \multiply#1 by #3\relax
+ \fi}
\def\doapplyfiguresize%
{\ifinner
\teksthoogte=\vsize
\scratchdimen=\teksthoogte
+ \else\ifinpagebody
+ \teksthoogte=\vsize
+ \scratchdimen=\teksthoogte
\else
\ifdim\pagegoal<\maxdimen
\ifdim\pagetotal<\pagegoal
@@ -600,7 +606,7 @@
\else
\scratchdimen=\teksthoogte
\fi
- \fi
+ \fi\fi
\doifelsenothing{\@@efhoogte}
{\edef\@@efvsize{\the\scratchdimen}}
{\let\@@efvsize=\@@efhoogte}%
@@ -610,9 +616,10 @@
\def\convertfigureinsertscale#1#2#3#4%
{\scratchdimen=#1\relax
- %\advance\scratchdimen by .0005pt
- \divide\scratchdimen by \!!thousand
- \multiply\scratchdimen by #3\relax
+ \ifnum#3=\!!thousand\else % better 1000 100 10 ranges, evt round 2sp
+ \divide\scratchdimen by \!!thousand
+ \multiply\scratchdimen by #3\relax
+ \fi
\scratchdimen=-\scratchdimen % beter hier - dan in driver
\edef#2{\number\scratchdimen}%
\scratchdimen=#3pt
@@ -667,15 +674,14 @@
\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
+ \doif{\@@efextension}{\c!mov}{\presetfiguremov}%
#1[#4][#5][#6]%
- \ifx\@@eftype\c!mov \presetfiguremov \fi
- \ifx\@@eftype\v!buffer
- \ifx\@@efextension\empty
- \let\@@efextension\c!tmp
- \fi
- \let\@@eftype\c!tex
- \fi
+ \doif{\@@eftype}{\c!mov}{\presetfiguremov}%
+ \doif{\@@eftype}{\v!buffer}
+ {\ifx\@@efextension\empty
+ \let\@@efextension\c!tmp
+ \fi
+ \let\@@eftype\c!tex}%
\processaction
[\@@efextension]
[ \c!tex=>\let\@@eftype\c!tex,
@@ -692,12 +698,11 @@
\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
+ \doif{\@@effilename}{\jobname}
+ {\@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes
+ \let\@@efextension=\empty
+ \showmessage{\m!figures}{9}{\@@effilename,\jobsuffix}%
+ \donefalse}%
\ifdone
\getobjectdimensions{FIG}{\@@efobjectname}%
\geteparameters % e !
@@ -806,12 +811,13 @@
{\addtocommalist\v!preview\@@efoptions}%
\doif{\@@efherhaal}{\v!ja}
{\addtocommalist\v!herhaal\@@efoptions}%
-\ifx\@@eftype\c!mps\ifcase\EPSspecial\else\ifinobject\else
- \@@eftrace{special mps, object forced}%
- \doglobal\increment\forcedMPSobject
- \edef\@@efobjectname{\c!mps::\forcedMPSobject}%
- \let\@@efobject\v!ja
-\fi\fi\fi
+\doif{\@@eftype}{\c!mps}
+ {\ifcase\EPSspecial\else\ifinobject\else
+ \@@eftrace{special mps, object forced}%
+ \doglobal\increment\forcedMPSobject
+ \edef\@@efobjectname{\c!mps::\forcedMPSobject}%
+ \let\@@efobject\v!ja
+ \fi\fi}%
\global\let\lastfigureobjectname\@@efobjectname
\doifelse{\@@efobject}{\v!nee}
{\donefalse}
@@ -884,18 +890,19 @@
\let\lastfigureobjectname\empty
\def\calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]%
- {\ifx\@@efscherm\empty\else\ifx\@@efobject\v!nee\else
- \doifobjectssupportedelse
- {\doifspecialavailableelse\doregisterfigure
- {\bgroup
- #1[#4][#5][#6]%
- \doregisterfigure{FIG}{\lastfigureobjectname}%
- \let\@@ef@@scherm\@@efscherm
- \calculateexternalfigure[#1][\@@ef@@scherm][\@@ef@@scherm][#4,\c!scherm=][#5][#6]%
- \egroup}
- {}}
- {}%
- \fi\fi}
+ {\ifx\@@efscherm\empty\else
+ \doifnot{\@@efobject}{\v!nee}
+ {\doifobjectssupportedelse
+ {\doifspecialavailableelse\doregisterfigure
+ {\bgroup
+ #1[#4][#5][#6]%
+ \doregisterfigure{FIG}{\lastfigureobjectname}%
+ \let\@@ef@@scherm\@@efscherm
+ \calculateexternalfigure[#1][\@@ef@@scherm][\@@ef@@scherm][#4,\c!scherm=][#5][#6]%
+ \egroup}
+ {}}
+ {}}%
+ \fi}
\let\dowithfigure\relax
@@ -903,12 +910,15 @@
\let\naturalfigurewidth =\!!zeropoint
\let\figureheight =\!!zeropoint
\let\figurewidth =\!!zeropoint
+\def\noffigurepages {1}
\def\getfiguredimensions%
{\dodoubleempty\dogetfiguredimensions}
+\gdef\noffigurepages{\nofinsertpages}
+
\def\dogetfiguredimensions[#1][#2]%
- {{\let\immediate\relax % very dirty but prevents flushing
+ {{\let\immediate\relax % very dirty but prevents flushing, will change
\setbox0=\hbox{\externalfigure[#1][#2,\c!scherm=,\c!object=\v!nee]}}}
\presetlocalframed[\??ef]
@@ -961,10 +971,6 @@
\getparameters[\??ep][##5]}%
\getvalue{\??ef\??ef#1}}
-\def\getnumberoffigurepages#1%
- {\gdef#1{1}% the default
- \dogetnofinsertpages#1}
-
% \useexternalfigure[alpha][koe]
% \useexternalfigure[beta] [koe] [breedte=1cm]
% \useexternalfigure[gamma][koe][alpha]
@@ -1098,6 +1104,8 @@
\pagina
\getfiguredimensions
[#1][#2]
+ \getparameters
+ [\??ex][\c!offset=\!!zeropoint,#2]
\scratchdimen=\@@exoffset
\dimen0=\figurewidth \advance\dimen0 2\scratchdimen\edef\figurewidth {\the\dimen0}
\dimen0=\figureheight\advance\dimen0 2\scratchdimen\edef\figureheight{\the\dimen0}
@@ -1393,47 +1401,6 @@
%D
%D \showsetup{setupclipping}
-% \def\doclip[#1]% nb top->bottom left->right
-% {\bgroup
-% \getparameters[\??cp][#1]%
-% \dowithnextbox
-% {\ifdim\@@cpbreedte>\!!zeropoint
-% \dimen0=\@@cpbreedte
-% \dimen4=\@@cphoffset
-% \else
-% \dimen0=\wd\nextbox
-% \divide\dimen0 \@@cpnx
-% \dimen4=\@@cpx\dimen0
-% \advance\dimen4 -\dimen0
-% \fi
-% \relax % sure
-% \ifdim\@@cphoogte>\!!zeropoint
-% \dimen2=\@@cphoogte
-% \dimen6=\ht\nextbox
-% \advance\dimen6 by -\@@cpvoffset
-% \advance\dimen6 by -\dimen2
-% \else
-% \dimen2=\ht\nextbox
-% \divide\dimen2 \@@cpny
-% \dimen6=-\@@cpy\dimen2
-% \advance\dimen6 \ht\nextbox
-% \fi
-% \setbox\nextbox=\hbox
-% {\hskip-\dimen4\lower\dimen6\box\nextbox}%
-% \wd\nextbox=\!!zeropoint
-% \ht\nextbox=\!!zeropoint
-% \dp\nextbox=\!!zeropoint
-% \setbox\nextbox=\hbox
-% {\dostartclipping{\@@cpmp}{\number\dimen0}{\number\dimen2}%
-% \box\nextbox
-% \dostopclipping}%
-% \wd\nextbox=\dimen0
-% \ht\nextbox=\dimen2
-% \dp\nextbox=\!!zeropoint
-% \box\nextbox
-% \egroup}%
-% \hbox}
-
\def\doclip[#1]% nb top->bottom left->right
{\bgroup
\getparameters[\??cp][#1]%
@@ -1484,11 +1451,37 @@
\def\setupclipping%
{\dodoubleargument\getparameters[\??cp]}
+%D defining sound tracks:
+%D
+%D \starttypen
+%D \useexternalsoundtrack[label][file]
+%D \stoptypen
+%D
+%D associated actions: StartSound StopSound PauseSound ResumeSound
+%D
+%D Todo: like external figures, also search on path,
+%D although, they need to be present ar viewing time, so ...
+
+\def\useexternalsoundtrack%
+ {\dodoubleargument\douseexternalsoundtrack}
+
+\def\douseexternalsoundtrack[#1][#2]%
+ {\setgvalue{\??sd#1}{#2}}
+
+\def\checksoundtrack#1%
+ {\iflocation
+ \doifdefined{\??sd#1}{\doifvaluesomething{\??sd#1}
+ {\doinsertsoundtrack{\getvalue{\??sd#1}}{#1}{}%
+ \setgvalue{\??sd#1}{}}}%
+ \fi}
+
+\setexecutecommandcheck {startsound} \checksoundtrack
+
\appendtoks \setupexternalfigures[\c!optie=\v!leeg] \to \everyfastmode
\appendtoks \runMPgraphicsfalse \to \everyfastmode
\appendtoks \insertMPgraphicsfalse \to \everyfastmode
-\appendtoks \flushMPgraphics \to \everylastshipout
+\appendtoks \flushMPgraphics \to \everygoodbye % \everylastshipout
\setupexternalfigures
[\c!optie=,
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 987fcb2c7..c67aa1702 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -189,6 +189,39 @@
\def\convertMPcolorfile%
{\bufferprefix metacmyk.tmp}
+%D Temporarily here:
+
+\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}}
+
+%D This will be perfected / changed / weeded.
+
\protect
\endinput
diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex
index 2d1b0b7eb..33b77f9ad 100644
--- a/tex/context/base/core-fld.tex
+++ b/tex/context/base/core-fld.tex
@@ -120,7 +120,7 @@
\@@fdformatteer,\@@fdvalideer,\@@fdbereken}}
\def\presetpushfield%
- {\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed
+ {%\edef\@@FieldValues{{\@@FieldValues}}% makes sure {a,b,c} is passed
\presetfieldsymbols[\@@FieldValues]%
\dopresetpushfield
{\@@FieldName}
@@ -273,18 +273,32 @@
\newif\ifdefinemainfield \definemainfieldfalse
+%D We used to have:
+%D
+%D \starttyping
+%D \def\getmainfieldkids#1%
+%D {\let\@@FieldKids\empty
+%D \ifdefinemainfield
+%D \definetwopasslist{fld:#1}% defined by system
+%D \doloop
+%D {\gettwopassdata{fld:#1}%
+%D \iftwopassdatafound
+%D %\addtocommalist\twopassdata\@@FieldKids
+%D \appendtocommalist\twopassdata\@@FieldKids
+%D \else
+%D \exitloop
+%D \fi}%
+%D \fi}
+%D \stoptyping
+%D
+%D The next alternative is much faster when we have a field
+%D with thousands of clones, somthing not that imaginary.
+
\def\getmainfieldkids#1%
{\let\@@FieldKids\empty
\ifdefinemainfield
- \definetwopasslist{fld:#1}% defined by system
- \doloop
- {\gettwopassdata{fld:#1}%
- \iftwopassdatafound
- %\addtocommalist\twopassdata\@@FieldKids
- \appendtocommalist\twopassdata\@@FieldKids
- \else
- \exitloop
- \fi}%
+ \definerawpasslist{fld:#1}% runtime defined by system
+ \moverawpasslist{fld:#1}\@@FieldKids
\fi}
\newcounter\nofmainfieldkids
@@ -314,7 +328,7 @@
\savecurrentvalue\totalnumberoffields\numberoffields
\fi}
-\appendtoks \savenumberoffields \to \everylastshipout
+\appendtoks \savenumberoffields \to \everybye % \everylastshipout
% \def\presetfieldreferences%
% {\ifnum\totalnumberoffields>0
diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex
index b6c11dbd3..a7ce7f68f 100644
--- a/tex/context/base/core-fnt.tex
+++ b/tex/context/base/core-fnt.tex
@@ -259,6 +259,41 @@
%D \typebuffer
%D \macros
+%D {stretcheduppercase}
+%D
+%D A convenient alternative is:
+%D
+%D \starttypen
+%D \stretcheduppercase{Is this what you like?}
+%D \stoptypen
+%D
+%D \typebuffer
+%D
+%D this one uses fixed skips and kerns.
+%D
+%D \startvoorbeeld
+%D \haalbuffer
+%D \stopvoorbeeld
+%D
+%D The default skip can be set with:
+
+\def\stretchedspaceamount{.25em}
+
+\unexpanded\def\stretcheduppercase#1%
+ {\bgroup
+ \the\everyuppercase
+ \uppercase{\def\textstring{#1}}%
+ \ifdim\stretchedspaceamount>\!!zeropoint
+ \def\textkern{\kern \stretchedspaceamount}%
+ \def\textskip{\hskip\stretchedspaceamount}%
+ \@EA\processtokens\@EA\relax\@EA\textskip\@EA\relax\@EA
+ {\@EA\textkern\@EA\textkern\@EA}\@EA{\textstring}%
+ \else
+ \textstring
+ \fi
+ \egroup}
+
+%D \macros
%D {underbar,underbars,
%D overbar,overbars,
%D overstrike,overstrikes,
@@ -425,6 +460,62 @@
\def\setupunderbar%
{\dodoubleargument\getparameters[\??on]}
+%D \macros
+%D {low, high, lohi}
+%D
+%D Although \TEX\ is pretty well aware of super- and
+%D subscripts, its mechanism is mainly tuned for math mode.
+%D The next few commands take care of script texts both modes.
+%D
+%D \startbuffer
+%D The higher\high{one goes} the lower\low{one drops}, or\lohi{yes}{no}?
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \getbuffer
+%D
+%D Note the different placement of \type {\lohi}, where we
+%D need a bit more space. The implementation looks a bit
+%D fuzzy, since some \type {\fontdimen}'s are involved to
+%D determine the optimal placement.
+
+\def\dodohighlow%
+ {\ifx\fontsize\empty
+ \ifmmode
+ \ifnum\fam<0 \tx \else \holamathfont \fi
+ \else
+ \tx
+ \fi
+ \else
+ \tx
+ \fi}
+
+\def\dohighlow#1#2#3#4#5%
+ {\bgroup
+ \scratchdimen=
+ \ifdim\fontdimen5\textfont2=1ex\fontdimen#2\textfont2\else#3ex\fi
+ \advance\scratchdimen by #4ex
+ \kern.1ex
+ \setbox\scratchbox=\hbox{#1\scratchdimen\hbox{\dodohighlow#5}}%
+ \ht\scratchbox\strutheight
+ \dp\scratchbox\strutdepth
+ \box\scratchbox
+ \egroup}
+
+\unexpanded\def\high{\dohighlow\raise{14}{.86}{0}}
+\unexpanded\def\low {\dohighlow\lower{16}{.48}{0}}
+
+\unexpanded\def\lohi#1#2%
+ {\hbox
+ {\setbox4=\hbox{\dohighlow\lower{16}{.48}{.1}{#1}}%
+ \setbox6=\hbox{\dohighlow\raise{14}{.86}{.1}{#2}}%
+ \ifdim\wd4<\wd6
+ \wd4=\!!zeropoint\box4\box6
+ \else
+ \wd6=\!!zeropoint\box6\box4
+ \fi}}
+
%D This module has only a few setups:
\setupunderbar
diff --git a/tex/context/base/core-gen.tex b/tex/context/base/core-gen.tex
index 9ecded535..3876db095 100644
--- a/tex/context/base/core-gen.tex
+++ b/tex/context/base/core-gen.tex
@@ -135,10 +135,10 @@
\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}]}
+ [ \v!klein=>\edef#2{#3},
+ \v!middel=>\edef#2{#4},
+ \v!groot=>\edef#2{#5},
+ \s!unknown=>\edef#2{#1}]}
%D \macros
%D {assignwidth}
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index e1dcd4b9d..f5518afec 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -57,7 +57,7 @@
%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 When visualize the first example looks like:
%D
%D {\showbaselinecorrection\haalbuffer[1]}
%D
@@ -260,8 +260,7 @@
\newif\iftracegridsnapping
\newif\ifshowfuzzyskips
-\def\snaptogrid#1% #1 == \hbox or \vbox
- {\ifgridsnapping\expandafter\dosnaptogrid\expandafter#1\fi}
+\chardef\@@alignsnap=0
\def\tracesnapping%
{\iftracegridsnapping
@@ -279,9 +278,25 @@
\vl\currentsnap\vl}}%
\fi}
-\def\dosnaptogrid%
+\def\snaptogrid% [#1]#2 -> #2 == \hbox|\vbox
+ {\dosingleempty\dosnaptogrid}
+
+\def\dosnaptogrid[#1]%
+ {\ifgridsnapping
+ \iffirstargument\verplaatsopgrid[#1]\fi\expandafter\dodosnaptogrid
+ \fi}
+
+\def\dodosnaptogrid%
{\dowithnextbox
{\bgroup
+ \ifcase\@@alignsnap\else % 1=top 2=high 3=middle 4=low
+ \getnoflines{\ht\nextbox}
+ \setbox\nextbox=\vbox to \noflines\lineheight
+ {\ifnum\@@alignsnap=1 \kern\lineheight\kern-\topskip\fi
+ \ifnum\@@alignsnap>2 \vfill\fi
+ \box\nextbox
+ \ifnum\@@alignsnap<4 \vfill\fi}
+ \fi
\forgetall
\par
\ifvbox\nextbox
@@ -364,6 +379,7 @@
\fi
\extrasnapreset
\enablepresnapcorrection
+ \global\chardef\@@alignsnap0
\egroup}}
\def\snaptomathgrid% probably not working ok
@@ -456,6 +472,7 @@
\def\doverplaatsopgrid[#1]%
{\ifgridsnapping
+ \global\chardef\@@alignsnap0
\processaction
[#1]
[ \v!boven=>\gridwarning+\positiveextrasnap\extrasnapbefore,
@@ -464,6 +481,11 @@
-\v!boven=>\gridwarning-\negativeextrasnap\extrasnapbefore,
-\v!onder=>\gridwarning-\negativeextrasnap\extrasnapafter,
-\v!beide=>\negativeextrasnap\extrasnaparound,
+ \v!pagina=>\global\chardef\@@alignsnap1, % topskip
+ \v!hoog=>\global\chardef\@@alignsnap2,
+ \v!midden=>\global\chardef\@@alignsnap3,
+ \v!laag=>\global\chardef\@@alignsnap4,
+ \v!reset=>\positiveextrasnap\extrasnapreset,
\s!default=>\positiveextrasnap\extrasnaparound,
\s!unknown=>\positiveextrasnap\extrasnapreset]%
\fi}
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 74377e35a..e99c6af56 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -15,6 +15,66 @@
\writestatus{loading}{Context Core Macros / Interaction}
+\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 czech library: interactions
+ title: interakce
+ 1: pomer -- x -- (s x v)
+ 2: aktivni
+ 3: neaktivni
+ 4: zadna strankova synchronizace (--) v 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
+
+\startmessages czech library: versions
+ title: verze
+ 1: postradam @+
+ 2: oznacuji se strany
+ 3: oznacene strany: --
+\stopmessages
+
\unprotect
\definesystemconstant {link}
@@ -168,6 +228,1761 @@
\fi
\egroup}
+\let\setupinteractionscreens\empty
+
+\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}}%
+ \doif{\@@scwachttijd}{\v!geen}{\def\@@scwachttijd{0}}}
+
+\def\initializeidentity% The macro is not to be changed;
+ {\iflocation % only the \@@ia-variables may be set!
+ \dosetupidentity % Although ConTeXt is the producer
+ {\@@iatitel} % we no longer set this field, since
+ {\@@iasubtitel} % we don't want to be bothered with
+ {\@@iaauteur} % remarks about third party documents
+ {\jobname.tex} % and/or associated with documents
+ {\@@iadatum}% % produced outside our control.
+ \global\let\initializeidentity\relax
+ \fi}
+
+\appendtoks \initializeidentity \to \everyshipout
+
+\def\initializepaper%
+ {\bgroup
+ \doif\@@pcstatus\v!start\locationfalse
+ \iflocation % without screen settings
+ \egroup
+ \dosetuppaper
+ {\papierformaat}
+ {\the\papierbreedte}
+ {\the\papierhoogte}%
+ \else
+ \egroup
+ \dosetuppaper
+ {\printpapierformaat}
+ {\the\printpapierbreedte}
+ {\the\printpapierhoogte}%
+ \fi}
+
+\def\doinitializepaper%
+ {\bgroup
+ \berekeninteractiescherm
+ \ifdim\!!widtha>\papierbreedte\ifdim\!!widtha>\!!zeropoint
+ \papierbreedte=\!!widtha
+ \fi\fi
+ \ifdim\!!heighta>\papierhoogte\ifdim\!!heighta>\!!zeropoint
+ \papierhoogte=\!!heighta
+ \fi\fi
+ \dosetuppaper
+ {\printpapierformaat}
+ {\the\papierbreedte}
+ {\the\papierhoogte}%
+ \egroup}
+
+\def\dosetupinteractionscreens% met a, b en \number
+ {\doifnot{\@@pcstatus}{\v!start}
+ {\bgroup
+ \berekeninteractiescherm
+ \processaction
+ [\@@scoptie]
+ [ \v!max=>\!!counte=1,
+ \v!bookmark=>\!!counte=2,
+ \s!unknown=>\!!counte=0,
+ \s!default=>\!!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}%
+ \egroup}}
+
+\def\dostelinteractieschermin[#1]%
+ {\getparameters[\??sc][#1]%
+ \ifproductionrun
+ \let\initializepaper\doinitializepaper
+ \let\setupinteractionscreens\dosetupinteractionscreens
+ \fi}
+
+\def\stelinteractieschermin%
+ {\dosingleempty\dostelinteractieschermin}
+
+%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{\box\locationbox}}}%{\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
+ \ifcase0\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]%
+ {\doifreferencepermittedelse{#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\\% pas op! offset
+ {\@@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\ignorespaces}}
+
+\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%
+ {\ifdim#2>\!!zeropoint % new
+ \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
+ \fi}
+
+\def\vertikaalinteractiemenu#1#2#3#4%
+ {\ifdim#2>\!!zeropoint % new
+ \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
+ \fi}
+
+\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
+
+\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}
+
+% 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
+ \setupinteraction[\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
+ \setupinteraction[\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}
+
+% 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
+ \setupinteraction[\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
+ \setupinteraction[\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
+ \setupinteraction[\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
+ \setupinteraction[\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#3%
+ {\ifdim\@@ibbreedte=\!!zeropoint\def\@@ibbreedte{#1}\fi
+ \doifnothing{\@@ibhoogte}{\def\@@ibhoogte{#2}}%
+ \doifnothing{\@@ibdiepte}{\def\@@ibdiepte{#3}}}
+
+\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 % breedte defaults !
+ [\@@ibvariant]
+ [ c=>\checkinteractiebalk{.5em}\v!max \v!max,
+ d=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint,
+ e=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint,
+ f=>\checkinteractiebalk{.5em}{.5em} \!!zeropoint,
+ \s!default=>\checkinteractiebalk{10em}\v!ruim\!!zeropoint,
+ \s!unknown=>\checkinteractiebalk{10em}\v!ruim\!!zeropoint]%
+ \doifelse{\@@ibsymbool}{\v!ja}
+ {\balksymbooltrue}{\balksymboolfalse}%
+ \getvalue{interactiebalk\@@ibvariant}%
+ \stopinteractie}%
+ \fi
+ \egroup}}
+
+\definecomplexorsimpleempty\interactiebalk
+
+\def\stelinteractiebalkin%
+ {\dodoubleargument\getparameters[\??ib]}
+
+% 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]%
+ {\iflocation
+ \par % needed for pdftex
+ \bgroup
+ \dosetprofilepage
+ \dogetprofilepage
+ \def\processoneprofile##1##2%
+ {\ExpandBothAfter\doifinsetelse{##2}{\processedprofiles}%
+ {\doifsomething{##1}{(##1)}}%
+ {\addtocommalist{##2}\processedprofiles
+ ##1\relax
+ \ifcase#1\relax
+ \dobeginofprofile
+ {##2}
+ {\number\papierbreedte}{\number\papierhoogte}
+ {\profilepage}%
+ \else
+ \doendofprofile
+ \fi}}%
+ \def\processedprofiles{}%
+ \def\doprocessprofile##1%
+ {\doifelse{\@@pfoptie}{\v!test}%
+ {\goodbreak\blanko\nobreak\tt[\spatie
+ \ifcase#1\v!start\else\v!stop\fi 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[#2]\doprocessprofile
+ \egroup
+ \par % needed for pdftex
+ \fi}
+
+\def\startprofiel[#1]%
+ {\iflocation
+ \bgroup
+ \addtocommalist{#1}\actualprofile
+ \def\stopprofiel%
+ {\processprofile1[#1]%
+ \egroup}%
+ \DoAfterFi\processprofile0[#1]%
+ \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}
+
+\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]%
+ {\doifelsenothing{#1}
+ {\doifnot{\@@scwachttijd}{\v!geen}
+ {\let\setpagetransition\setsomepagedelay}}
+ {\doifelse{#1}{\v!start}
+ {\doifnot{\@@scwachttijd}{\v!geen}
+ {\let\setpagetransition\setsomepagedelay}}
+ {\doglobal\newcounter\currentpagetransition
+ \doifinsetelse{#1}{\v!reset,\v!stop}
+ {\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\setsomepagedelay%
+ {\expanded{\dosetpagetransition{0}{\@@scwachttijd}}}
+
+\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
+ \doifelse{\@@scwachttijd}{\v!geen}
+ {\expanded{\dosetpagetransition{\commalistelement}{0}}}
+ {\expanded{\dosetpagetransition{\commalistelement}{\@@scwachttijd}}}%
+ \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
+ \doifassignmentelse{#1}
+ {\getparameters[\??cc][#1]}
+ {\getparameters[\??cc][\c!titel=#1,#2]}%
+ \bgroup
+ \obeylines
+ \doif{\@@ccspatie}{\v!ja}{\obeyspaces}%
+ \long\def\docommando##1%
+ {\egroup
+ \global\setbox\commentbox=\hbox
+ {\!!widtha=\@@ccbreedte
+ \!!heighta=\@@cchoogte
+ \doinsertcomment
+ {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
+ {\@@cckleur}{0}{\@@ccsymbool}{##1}%
+ \hskip\ifvoid\commentbox\@@ccmarge\else\@@ccafstand\fi
+ \box\commentbox
+ \egroup}}%
+ \grabuntil{\e!stop\e!commentaar}\docommando}
+
+\def\commentaar%
+ {\dodoubleempty\docommentaar}
+
+\def\docommentaar[#1][#2]#3%
+ {\bgroup
+ \doifassignmentelse{#1}
+ {\getparameters[\??cc][#1]}
+ {\getparameters[\??cc][\c!titel=#1,#2]}%
+ \!!widtha=\@@ccbreedte
+ \!!heighta=\@@cchoogte
+ \hbox to \!!zeropoint
+ {\hskip-\@@ccmarge
+ \raise\ht\strutbox\hbox
+ {\doPDFinsertcomment
+ {\@@cctitel}{\number\!!widtha}{\number\!!heighta}
+ {\@@cckleur}{0}{\@@ccsymbool}{#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
+%
+% \startcommentaar[symbool=Balloon]
+% Do we want this kind of rubish? And, why isn't this and
+% some more features related to text annotations so poorly
+% (actually not) documented? Anyhow, by providing this
+% functionality we demonstrate that \pdfTeX\ can do it. By
+% the way, it's funny that when in Acrobat we scale up the
+% text, the symbols scale down.
+% \stopcommentaar
+
+\def\doregistermenubuttons[#1][#2]% [menu id] [register]
+ {\bgroup
+ \ifsecondargument
+ \stelinteractiemenuin
+ [#1][\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]%
+ \def\docommando##1%
+ {\noindent
+ \menubutton[#1]{##1}[#2:##1]%
+ \space}%
+ \else
+ \def\docommando##1%
+ {\noindent
+ \button[\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]{##1}[#1:##1]%
+ \space}%
+ \fi
+ \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando
+ \egroup}
+
+\def\registermenubuttons%
+ {\dodoubleempty\doregistermenubuttons}
+
\stelkoppelingenin
[\c!afstand=.25em,
\c!breedte=\v!passend,
@@ -178,6 +1993,165 @@
\c!achtergrondraster=\@@rsraster,
\c!achtergrondkleur=]
-\protect
+\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,
+ \c!wachttijd=\v!geen]
+
+\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!contrastkleur=\@@iacontrastkleur,
+ \c!zelfdepagina=\v!ja,
+ \c!onbekendeverwijzing=\v!ja]
+
+\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,
+ \c!titel=,
+ \c!spatie=\v!nee,
+ \c!symbool=\v!normaal]
+
+\stelversiesin % beware, @ is made active here,
+ [\c!nummer=1, % therefore we set this one at the end
+ \c!letter=\ss,
+ \c!kleur=]
-\endinput
+\protect \endinput
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
new file mode 100644
index 000000000..702c5fe5d
--- /dev/null
+++ b/tex/context/base/core-itm.tex
@@ -0,0 +1,583 @@
+%D \module
+%D [ file=core-itm,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Itemize,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Itemize}
+
+\startmessages dutch library: layouts
+ 9: momenteel maximaal -- niveaus in opsommingen
+\stopmessages
+
+\startmessages english library: layouts
+ 9: currently no more than -- levels in itimezations
+\stopmessages
+
+\startmessages german library: layouts
+ 9: z.Z. nicht mehr als -- Niveaus in Posten
+\stopmessages
+
+\startmessages czech library: layouts
+ 9: aktualne ne vice nez -- urovne/urovni vyctu
+\stopmessages
+
+\unprotect
+
+% - meerdere niveaus (moet niet moeilijk zijn)
+% - instellingen in macro
+% - \defineitemize
+% - [0] voor start op 0
+
+\newif\ifsubsom \subsomfalse
+\newif\ifsymsom \symsomfalse
+\newif\ifkopsom \kopsomfalse
+\newif\ifsomintro \somintrofalse
+\newif\ifsomautointro \somautointrofalse
+\newif\ifoptimizeitems \optimizeitemstrue
+\newif\ifpackeditems \packeditemsfalse
+\newif\iffirstlist \firstlistfalse
+\newif\ifparagraphitems \paragraphitemsfalse
+
+\newcounter \itemcolumndepth
+
+\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!inspringen,
+ \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{\maxitemlevel}{\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!vanelkaar*=>\packeditemsfalse,
+ \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!alinea*=>{\paragraphitemstrue
+ \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#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
+ \doifvaluesomething{\??op\itemlevel\c!inspringen}
+ {\expanded{\stelinspringenin[\getvalue{\??op\itemlevel\c!inspringen}]}}%
+ \doifinset{\v!kolommen}{#1}%
+ {\ifbinnenkolommen\else\ifnum\itemcolumndepth=0
+ \global\let\itemcolumndepth\itemlevel
+ \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, % netter \??op\itemlevel\c!n
+ \c!hoogte=,
+ \c!lijn=\v!uit,
+ \c!balanceren=\v!ja,
+ \c!uitlijnen=\v!nee]%
+ \fi\fi}%
+ \doifinsetelse{\v!intro}{#1}
+ {\somintrotrue}
+ {\somintrofalse}%
+ \doglobal\increment\noflists
+ \let\currentlist=\noflists
+ \newcounter\noflistelements
+ \kopsomfalse
+ \subsomfalse
+ \symsomfalse
+ \let\marsymbol=\relax
+ \global\let\somdestination=\empty
+ \def\symsymbol{}%
+ \def\som%
+ {\dosom}%
+ \def\but[##1]%
+ {\gdef\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}% \noexpand, else problems in non-etex with chinese
+ %{\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}%
+ {\edef\@@opsymbool{\noexpand\getvalue{\??op\c!symbool\s!global\itemlevel}}%
+ \getvalue{\??op\v!verder\itemlevel}}
+ %{\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
+ {\edef\@@opsymbool{\noexpand\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
+ \ifparagraphitems
+ \ifnum\itemlevel>1 \doassign[\??op\itemlevel][\c!tussen=]\fi
+ \else\ifpackeditems
+ \doassign[\??op\itemlevel][\c!tussen=]%
+ \fi\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
+ \ifnum\itemcolumndepth=0 \dolistreference \fi % beware !
+ \iffirstlist \else \endgroup \fi % toegevoegd, eerste \som opent groep
+ \ifnum\itemcolumndepth=\itemlevel\relax
+ \stopkolommen
+ \doglobal\newcounter\itemcolumndepth
+ \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% evt aantal items opslaan per niveau, scheelt zoeken
+ {\par
+ \ignorespaces
+ \increment\noflistelements
+ \ifnum\itemcolumndepth=0\relax\ifoptimizeitems
+ \ifnum\noflistelements=1 % tgv bv kolommen/nesting
+ \findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
+ \fi % verstoord, vandaar \find
+ \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]}}%
+ {\setbox8=\hbox{\naar{\box8}[\somdestination]}}%
+ \global\let\somdestination=\empty
+ \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}}% problems with \uchar
+ {\noexpand\getvalue{\??op\c!symbool\s!local\itemlevel}}%
+ \kopsomfalse
+ \subsomfalse
+ \symsomfalse
+ \EveryPar{\ignorespaces}%
+ \ignorespaces}
+
+\def\complexdosom[#1]%
+ {\par
+ \ignorespaces
+ \doadvanceitem
+ \ifnum\itemcolumndepth=0\relax\ifnum\noflistelements>0\relax
+ \dosomebreak\nobreak
+ \fi\fi
+ \iffirstlist
+ \firstlistfalse
+ \begingroup
+ \ifcase\itemlevel
+ \or % 1
+ \ifnum\itemcolumndepth=0\relax
+ \ifsomintro\dosomebreak\nobreak\fi
+ \getvalue{\??op1\c!voor}%
+ \ifsomintro\dosomebreak\nobreak\fi
+ \fi
+ \else % 2 en hoger
+ \ifparagraphitems \else
+ \let\previtemlevel=\itemlevel
+ \decrement\previtemlevel
+ \getvalue{\??op\previtemlevel\c!tussen}% = itemlevel-1
+ \fi
+ \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}}%
+ \strut % added 11-08-99
+ \ignorespaces}
+
+\def\complexsom[#1]#2\par% todo: no two pass data
+ {\startopsomming[#1]
+ \complexdosom[]\ignorespaces\begstrut#2\unskip\endstrut\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
+% \noindentation}
+
+\def\complexdokop[#1]#2\par% % beter in \complexdosom hangen met een if
+ {\iffirstlist\else\dosomebreak\allowbreak\fi
+ \ifpackeditems\else\itemuse\c!kopvoor\fi
+ \iffirstlist\ifsomintro\else\ifcase\itemlevel % incr in \complexdosom
+ %\dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
+ \dosomebreak\allowbreak
+ \fi\fi\fi
+ \complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
+ {\ignorespaces#2}}\par
+ \dosomebreak\nobreak
+ \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}
+
+\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!inspringen=, % untouched if empty
+ \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,
+ \c!binnen=,
+ \c!n=2,
+ \c!items=4,
+ \c!symbool=\itemlevel]
+
+\protect \endinput
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
new file mode 100644
index 000000000..a9e4d4142
--- /dev/null
+++ b/tex/context/base/core-lst.tex
@@ -0,0 +1,889 @@
+%D \module
+%D [ file=core-lst,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Lists,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Lists}
+
+\unprotect
+
+% \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
+ \convertexpanded{\??li#1}{#3}\asciilistentry
+ \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}%
+ {\asciilistentry}%
+ {\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%
+ {\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!maxbreedte=,
+ \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!tussen=,
+ \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 % interactie ?
+ [\??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,\c!tussen,\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
+ \dosetlistmode}
+
+\def\dosetlistmode%
+ {\iflijstgeplaatst
+ \enablemode [\systemmodeprefix\v!lijst]%
+ \else
+ \disablemode[\systemmodeprefix\v!lijst]%
+ \fi}
+
+\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% kan iets efficienter met \ifdone
+ {\doifvalue{\??li#1\c!label}{\v!ja}{\leftlabeltext{#1}}%
+ \strut\splitlistsymbol\getvalue{\??li#1\c!scheider}%
+ \doifvalue{\??li#1\c!label}{\v!ja}{\rightlabeltext{#1}}}]}
+
+\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}%
+ {\def\dosomelijstelement{\dodofreevlijstelement}}
+
+\setvalue{dodolijstelement\v!vertikaal}%
+ {\def\dosomelijstelement{\dodofreevlijstelement}}
+
+\setvalue{dodolijstelement\v!horizontaal}%
+ {\def\dosomelijstelement{\dodofreehlijstelement}}
+
+\setvalue{dodolijstelement\v!commando}%
+ {\let\dosomelijstelement\dodocommandlijstelement}
+
+% 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\newlineinlist{\space}
+
+\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
+ \setfullsectionnumber{\??li#1}%
+ \dosetlistsymbol{#1}{#3}%
+ \dosomelijstelement{#1}{#2}{#3}{#4}{#5}{#6}%
+ \global\utilitydonetrue}
+ {}}
+
+\def\dolistattributes#1#2#3%
+ {\doifvaluesomething{\??li#1#3}
+ {\setupinteraction[\c!kleur=,\c!contrastkleur=]}%
+ \doattributes{\??li#1}{#2}{#3}}
+
+\def\dodocommandlijstelement#1#2#3#4#5#6%
+ {\doifdefinedelse{\??li#1\c!commando}
+ {\getvalue{\??li#1\c!commando}
+ {#3}{#4}{\paginaprefix\??li#1[#5]\translatednumber[#5]}}
+ {[#1: #3 - #4 - \paginaprefix\??li#1[#5]\translatednumber[#5]]}}
+
+\def\dodofreelijstelement#1#2#3#4#5#6#7#8%
+ {\def\makelijstelement##1##2%
+ {\hbox
+ {\doifelsevalue{\??li#1\c!interactie}{##1}
+ {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
+ \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\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]}}}
+ {#7%
+ \vbox
+ {\forgetall
+ \makelijstelement\v!alles
+ {\makelijstelement\v!sectienummer
+ {\dolistattributes{#1}\c!nummerletter\c!nummerkleur
+ {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
+ \makelijstelement\v!tekst
+ {\dolistattributes{#1}\c!tekstletter\c!tekstkleur
+ {\let\\=\newlineinlist
+ \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]}}}}}}}%
+ #8}%
+ \getvalue{\??li#1\c!na}}
+
+\def\dodofreehlijstelement#1#2#3#4#5#6%
+ {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6}
+ {\noindent}{}}
+
+\def\dodofreevlijstelement#1#2#3#4#5#6% % \nointerlineskip nodig,
+ {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6} % anders verkeerde spatiering
+ {\ifvmode\nointerlineskip\fi} % bij multi-line lijsten
+ {\nointerlineskip\endgraf\allowbreak}} %
+
+\def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden
+ {\endgraf
+ \leftskip=\getvalue{\??li#1\c!marge}% na de \endgraf !
+ \getvalue{\??li#1\c!voor}%
+ \!!widthc=\getvalue{\??li#1\c!afstand}%
+ \doifelsevalue{\??li#1\c!breedte}{\v!passend}
+ {\!!widtha=\!!zeropoint}
+ {\doifelsenothing{#3}
+ {\doifelsevalue{\??li#1\c!titeluitlijnen}{\v!ja}
+ {\!!widtha=\!!zeropoint
+ \!!widthc=\!!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}{\box0}}%{\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=\!!widthc % \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
+ {\let\\=\newlineinlist
+ \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}{\box0}}%{\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
+ {\let\\=\newlineinlist
+ \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
+ {\setupinteraction[\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
+ \let\\=\newlineinlist
+ \setbox0=\hbox
+ {#2{\showcontrastlocation{\??ia}{#8}
+ {\dostartattributes{\??li#3}\c!letter\c!kleur{}%
+ \ignorespaces\dontconvertfont\setstrut
+ \begstrut
+ \doifelsenothing{\??li#3\c!maxbreedte}
+ {\getvalue{\??li#3\c!tekstcommando}{#6}}
+ {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}%
+ \endstrut % struts new
+ \dostopattributes}}}%
+ \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}%
+ \par
+ \getvalue{\??li#3\c!tussen}}
+
+\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
+ {\let\\=\newlineinlist
+ \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
+ \dosetlistmode}
+
+\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]%
+ {\hbox\bgroup % the \hbox is needed to bypass
+ \let\referenceprefix=\empty % \dontleavehmode in \naarbox
+ \setupinteraction[\c!kleur=,\c!contrastkleur=,\c!strut=]%
+ \setupreferencing[\c!prefix=]%
+ \naarbox{\hbox{\ignorespaces#1}}[#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}
+% {\doglobal\increment\referencecounter
+% \referentiebutton
+% {#3%
+% \pagereference[\r!from\referencecounter]%
+% \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
+% [\r!to\referencecounter]}
+% {#3}}
+
+\def\schrijfnaarreferentielijst[#1]#2% #1=class #2=data #3=visualization
+ {\dowithnextbox
+ {\doifelsevalue{\??rl#1\c!status}{\v!start}
+ {\doglobal\increment\referencecounter % must be resolved due to #2
+ \referentiebutton
+ {\box\nextbox
+ \pagereference[\r!from\referencecounter]%
+ \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
+ [\r!to\referencecounter]}
+ {\box\nextbox}}
+ \hbox} % \vbox ?
+
+\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}
+
+\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
+ \dosetlistmode}
+
+\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}
+
+\protect \endinput
diff --git a/tex/context/base/core-mar.tex b/tex/context/base/core-mar.tex
new file mode 100644
index 000000000..836dd64b6
--- /dev/null
+++ b/tex/context/base/core-mar.tex
@@ -0,0 +1,126 @@
+%D \module
+%D [ file=core-mar,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Markings,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Markings}
+
+\unprotect
+
+% 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{\unknown\ }%
+ \setfullsectionnumber{\??mk#1}%
+ \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}%
+% \honorunexpanded
+% \getvalue{\??mk\hoofdmarkering{#1}}{#2}%
+ \expandafter\setmark\csname\??mk\hoofdmarkering{#1}\endcsname{#2}%
+ \egroup}
+
+\def\marking%
+ {\dosingleargument\domarking}
+
+\protect \endinput
diff --git a/tex/context/base/core-mps.tex b/tex/context/base/core-mps.tex
index c92aee271..724402983 100644
--- a/tex/context/base/core-mps.tex
+++ b/tex/context/base/core-mps.tex
@@ -15,9 +15,22 @@
\unprotect
-%D Let's first load the auxiliary file.
+%D Let's first preload a few auxiliary \METAPOST\ files.
-\appendtoks input mp-tool ;\to \MPinitializations
+\appendtoks
+ input mp-tool ;
+ input mp-spec ;
+ _inline_shading_ := true ;
+\to \MPinitializations
+
+%D We save the number of graphics for the sake of \TEXEXEC.
+
+\newcounter\totalnumberofMPgraphics
+\def\thecurrentMPgraphic{\the\currentMPgraphic}
+
+\appendtoks
+ \savecurrentvalue\totalnumberofMPgraphics\thecurrentMPgraphic
+\to \everybye
%D The next few macros tell \METAPOST\ how the \CONTEXT\
%D pagebody looks.
@@ -54,7 +67,9 @@
\writeMPpagedata RightMarginWidth \rechtermargebreedte
\writeMPpagedata RightEdgeDistance \rechterrandafstand
\writeMPpagedata RightEdgeWidth \rechterrandbreedte
- \writeMPpagedata PageOffset {\getvalue{\??ma\v!pagina\c!offset}}%
+ \doifelsevalue{\??ma\v!pagina\c!offset}{\v!overlay}
+ {\writeMPpagedata PageOffset {0pt}}
+ {\writeMPpagedata PageOffset {\getvalue{\??ma\v!pagina\c!offset}}}%
\writeMPpagedata PageDepth {\getvalue{\??ma\v!pagina\c!diepte}}%
\immediate\closeout\scratchwrite
\egroup}
@@ -80,6 +95,49 @@
\to \MPinitializations
\let\prepareMPpagedata\relax}
+%D \macros
+%D {startuniqueMPgraphic, uniqueMPgraphic}
+%D
+%D This macros is probably of most use to myself, since I like
+%D to use graphics that adapt themselves. The next \METAPOST\
+%D kind of graphic is both unique and reused when possible.
+%D
+%D \starttypen
+%D \defineoverlay[example][\uniqueMPgraphic{test}]
+%D
+%D \startuniqueMPgraphic {test}
+%D draw unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D \stopuniqueMPgraphic
+%D \stoptypen
+
+\long\def\startuniqueMPgraphic#1#2\stopuniqueMPgraphic%
+ {\setvalue{MP:#1}%
+ {\startreusableMPgraphic{\overlaystamp:#1}#2\stopreusableMPgraphic
+ \reuseMPgraphic{\overlaystamp:#1}}}
+
+\def\uniqueMPgraphic#1%
+ {\getvalue{MP:#1}}
+
+\def\overlaystamp%
+ {\overlaywidth:\overlayheight:\overlaydepth:\overlaycolor}
+
+%D We redefine a macro from \type {supp-mps.tex}:
+
+\def\MPdatafile%
+ {\bufferprefix mpd-\the\currentMPgraphic.tmp}
+
+%D We also have to make sure that \METAPOST\ knows this:
+
+\appendtoks
+ if not known _data_prefix_ :
+ string _data_prefix_ , _data_suffix_ ;
+ fi ;
+ _data_prefix_ := "\bufferprefix mpd-" ;
+ _data_suffix_ := ".tmp" ;
+\to \MPinitializations
+
+%D Happy drawing.
+
\protect
\endinput
diff --git a/tex/context/base/core-mul.tex b/tex/context/base/core-mul.tex
index ae8055f98..f358604e0 100644
--- a/tex/context/base/core-mul.tex
+++ b/tex/context/base/core-mul.tex
@@ -139,6 +139,8 @@
%D
%D \interface \type{\nofcolumns} \\
%D the number of columns \\
+%D \interface \type{\minbalancetoplines}
+%D the minimum number op balanced top lines
%D \interface \type{\betweencolumns} \\
%D the stuff between columns \\
%D \interface \type{\finaloutput{action}{box}} \\
@@ -246,10 +248,11 @@
%D are applied to columns. The final values are used when
%D flushing the columns.
-\newcount\nofcolumns \nofcolumns=2
+\newcount\nofcolumns \nofcolumns=2
-\def\maxnofcolumns {16}
-\def\allocatednofcolumns {0}
+\def\maxnofcolumns {16}
+\def\allocatednofcolumns {0}
+\def\minbalancetoplines {1}
\newif\ifbalancecolumns \balancecolumnsfalse
\newif\ifstretchcolumns \stretchcolumnsfalse
@@ -268,6 +271,11 @@
\newtoks\singlecolumnout
+%D The next dimension reports the final column height
+
+\newdimen\finalcolumnheights
+\newcount\finalcolumnlines
+
%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
@@ -414,7 +422,7 @@
%D The local column width is available in the dimension
%D register \type{\localcolumnwidth}, which is calculated as:
-\def\setcolumnhsize%
+\def\setcolumnhsize% beware, this one is available for use in macros
{\setbox0=\hbox
{\parindent\!!zeropoint\betweencolumns}%
\intercolumnwidth=\wd0
@@ -648,70 +656,6 @@
\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}
-
\def\flushcolumnedpage%
{\bgroup
\forgetall
@@ -776,6 +720,9 @@
\prevdepth\openstrutdepth
\nointerlineskip
\dp0=\!!zeropoint
+ \global\finalcolumnheights=\ht0
+ \getnoflines\finalcolumnheights
+ \global\finalcolumnlines=\noflines
\box0
\egroup}
@@ -959,17 +906,6 @@
\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
@@ -1028,7 +964,7 @@
%D mode was entered, or floats that migrate to next columns.
%D Flushing floats is a delicate process.
-\def\continuousmulticolumnsout%
+\def\continuousmulticolumnsout%
{\bgroup
\forgetall
\setmulticolumnsout
@@ -1095,8 +1031,6 @@
% \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.
@@ -1105,13 +1039,36 @@
%D \type{\box4} garantees a more robust check when skips are
%D used.
-\def\balancedmulticolumnsout%
+\def\balancedmulticolumnsout%
{\bgroup
\setmulticolumnsout
\dontshowcomposition
\widowpenalty=0
\setbox0=\vbox{\unvbox\normalpagebox}%
- \ifdim\ht0>\openlineheight
+\ifdim\ht0>\openlineheight % at least one line
+ \ifnum\minbalancetoplines<2 % balance anyway
+ \donetrue
+ \else % check criterium to available lines
+ \getnoflines{\ht0}%
+ \divide\noflines by \nofcolumns \relax
+ \ifnum\noflines<\minbalancetoplines \relax
+ \dimen0=\ht0
+ \advance\dimen0 by \ht\firsttopcolumnbox
+ \advance\dimen0 by \openlineheight \relax % let's play safe
+ \ifdim\dimen0>\columntextheight % column exceeding text height
+ \donetrue
+ \else % it seems to fit
+ \donefalse
+ \fi
+ \else % balance indeed
+ \donetrue
+ \fi
+ \fi
+\else % balancing does not make sense
+ \donefalse
+\fi
+\ifdone % start balancing
+ %\ifdim\ht0>\openlineheight
\dimen0=\ht0
\advance\dimen0 by \topskip
\advance\dimen0 by -\baselineskip
diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex
index 49f7f9794..acbbeec47 100644
--- a/tex/context/base/core-nav.tex
+++ b/tex/context/base/core-nav.tex
@@ -61,6 +61,11 @@
\showmessage{\m!interactions}{3}{\ifusepagedestinations\space(PAGE)\fi}%
\global\locationfalse
\fi}%
+ \iflocation
+ \enablemode [\systemmodeprefix\v!interactie]%
+ \else
+ \disablemode[\systemmodeprefix\v!interactie]%
+ \fi
\doifsomething{\@@iabereken}
{\doregistercalculationset\@@iabereken}%
\doifelse{\@@iastrut}{\v!ja}
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 6e02e0144..610d89aae 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -30,16 +30,29 @@
%
% \startnotmode [list]
% \stopnotmode
-
+%
+% system modes have a * as prefix
+%
% to be implemented: mode naar texutil/scherm + message
+% : geen #2 en nesting (\startregels)
+
+\def\systemmodeprefix{*}
\let\currentmode=\empty
+% \def\enablemode[#1]%
+% {\expandafter\addtocommalist\expandafter{#1}\currentmode}
+%
+% \def\disablemode[#1]%
+% {\expandafter\removefromcommalist\expandafter{#1}\currentmode}
+%
+% this one fails in removing system modes
+
\def\enablemode[#1]%
- {\expandafter\addtocommalist\expandafter{#1}\currentmode}
+ {\expanded{\addtocommalist{#1}\noexpand\currentmode}}
\def\disablemode[#1]%
- {\expandafter\removefromcommalist\expandafter{#1}\currentmode}
+ {\expanded{\removefromcommalist{#1}\noexpand\currentmode}}
\def\doifmodeelse%
{\unprotect\dodoifmodeelse}
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 3bf022fed..7b88a254b 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -350,17 +350,17 @@
{\bgroup
\unskip\unskip
\ifdim\lastkern=\footnotesignal
- \hoog{\kern\@@vnafstand}% gets the font right, hack !
+ \high{\kern\@@vnafstand}% gets the font right, hack !
\fi
\ignorespaces
\nobreak
\iflocation
\naarbox
- {\hoog{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}
+ {\high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}}
[\s!fnt:t:\internalfootreference]%
\rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
\else
- \hoog{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
+ \high{\tx\footnotenumber\domovednote\v!vorigepagina\v!volgendepagina}%
\ifconditional\pagewisefootnotes
\rawreference{\s!fnt}{\s!fnt:f:\internalfootreference}{}%
\fi
@@ -418,7 +418,7 @@
{\iffootnotesenabled
\bgroup
\unskip
- \naarbox{\hoog{\tx\currenttextreference}}[#1]%
+ \naarbox{\high{\tx\currenttextreference}}[#1]%
\egroup
\fi}
@@ -613,7 +613,7 @@
\newbox\localpostponedfootnotes
\def\collectlocalfootnotes%
- {\gdef\localfootinsert##1%
+ {\def\localfootinsert##1% was \gdef, but never reset!
{%\message{[local footnote]}%
\global\setbox\localpostponedfootnotes=\vbox\bgroup
\unvbox\localpostponedfootnotes
@@ -755,7 +755,7 @@
%\c!breedte=\ifdim\hsize<\zetbreedte\hsize\else\zetbreedte\fi,
\c!breedte=\defaultfootnotewidth,
\c!hoogte=\teksthoogte,
- \c!nummercommando=\hoog,
+ \c!nummercommando=\high,
\c!n=1]
\protect
diff --git a/tex/context/base/core-num.tex b/tex/context/base/core-num.tex
new file mode 100644
index 000000000..45ce75092
--- /dev/null
+++ b/tex/context/base/core-num.tex
@@ -0,0 +1,133 @@
+%D \module
+%D [ file=core-num,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Numbering,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Numbering}
+
+\unprotect
+
+% 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]
+% \savenumber[naam]
+% \restorenumber[naam]
+
+\newif\ifnummeren
+
+\def\dostelnummerin[#1][#2]%
+ {\@EA\let\@EA\savedstartnumber\csname\s!number#1\c!start\endcsname
+ \getparameters[\s!number#1][\c!start=,#2]%
+ \doifelsevaluenothing{\s!number#1\c!start}
+ {\letvalue{\s!number#1\c!start}=\savedstartnumber}
+ {\setcounter{\s!number#1}{\getvalue{\s!number#1\c!start}}}}
+
+\def\stelnummerin%
+ {\dodoubleargument\dostelnummerin}
+
+\def\dodefinieernummer[#1][#2]% ook overal class als localframed
+ {\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]%
+ \makecounter{\s!number#1}%
+ \setcounter{\s!number#1}{\getvalue{\s!number#1\c!start}}}
+
+% \c!nummer=#1 ; nogal veel copieen nodig
+%
+% \def\@@thenumber#1{\s!number\getvalue{\s!number#1\c!nummer}}
+
+\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\nummer[#1]%
+ {\convertnumber
+ {\getvalue{\s!number#1\c!conversie}}
+ {\countervalue{\s!number#1}}}
+
+\def\ruwenummer[#1]%
+ {\countervalue{\s!number#1}}
+
+% ook de pag nummers hierheen halen ivm \@@nrwijze
+
+\def\dostelnummerenin[#1]% globaal
+ {\getparameters[\??nr][#1]%
+ \doifelse{\@@nrstatus}{\v!start}
+ {\global\nummerentrue}
+ {\global\nummerenfalse}}%
+
+\def\stelnummerenin%
+ {\dosingleargument\dostelnummerenin}
+
+\stelnummerenin
+ [\c!wijze=\v!per\v!hoofdstuk,
+ \c!blokwijze=,
+ \c!sectienummer=\v!ja,
+ \c!status=\v!start]
+
+\protect \endinput
diff --git a/tex/context/base/core-pag.tex b/tex/context/base/core-pag.tex
index 68d94c50d..6ed2f3475 100644
--- a/tex/context/base/core-pag.tex
+++ b/tex/context/base/core-pag.tex
@@ -472,9 +472,10 @@
{\dodoinsertpages[#1][][#2]}
{\dodoinsertpages[#1][#2][#3]}}
-\def\dodoinsertpages[#1][#2][#3]%
+\def\dodoinsertpages[#1][#2][#3]%
{\bgroup
\mindermeldingen
+ \getfiguredimensions[#1]%
\getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]%
\dorecurse{\@@ipn}
{\dofilterpage{#1}{\recurselevel}%
@@ -484,9 +485,10 @@
\def\filterpages%
{\dotripleempty\dofilterpages}
-\def\dofilterpages[#1][#2][#3]%
+\def\dofilterpages[#1][#2][#3]% % \noffigurepages not yet supported
{\bgroup
\mindermeldingen
+ \getfiguredimensions[#1]%
\getparameters[\??ip][\c!n=\noffigurepages,\c!breedte=\!!zeropoint,#3]%
\doifelse{#2}{\v!even}
{\dorecurse{\@@ipn}
@@ -514,12 +516,23 @@
{\dodoubleempty\docopypages}
\def\docopypages[#1][#2]%
- {\getparameters[\??ip][\c!n=\noffigurepages,#2]%
+ {\bgroup
+ \getfiguredimensions[#1]%
+ \getparameters[\??ip][\c!n=\noffigurepages,\c!schaal=\!!thousand,\c!offset=\!!zeropoint,#2]%
\dorecurse{\@@ipn}
{\vbox to \teksthoogte
{\hsize=\tekstbreedte
- \centeredbox{\externalfigure[#1][\c!pagina=\recurselevel,#2]}}
- \pagina}}
+ \scratchdimen=\@@ipoffset
+ \centeredbox
+ {\ifdim\scratchdimen>\!!zeropoint\relax
+ \advance\vsize by -2\scratchdimen
+ \advance\hsize by -2\scratchdimen
+ \externalfigure[#1][\c!pagina=\recurselevel,#2,\c!schaal=,\c!factor=\v!max,\c!offset=\v!overlay]%
+ \else
+ \externalfigure[#1][\c!pagina=\recurselevel,#2,\c!offset=\v!overlay]%
+ \fi}}
+ \pagina}
+ \egroup}
%D \macros
%D {combinepages}
@@ -553,7 +566,7 @@
\def\docombinepages[#1][#2]%
{\bgroup
- \def\noffigurepages{1}%
+ \getfiguredimensions[#1]%
\getparameters
[\??ip]
[\c!n=\noffigurepages,\c!nx=2,\c!ny=2,
@@ -567,7 +580,7 @@
\doloop
{\vbox to \teksthoogte
{\mindermeldingen
- \hsize=\tekstbreedte
+ \hsize=\tekstbreedte
\scratchdimen=\@@ipafstand
\!!widtha=\hsize
\advance\!!widtha by -\@@ipnx\scratchdimen
@@ -589,7 +602,6 @@
{\@@iplinks
\ifnum\combinedpagescounter>\@@ipn \else
\externalfigure[#1][\c!pagina=\combinedpagescounter,\c!factor=\v!max,\c!kader=\@@ipkader]%
- \getnumberoffigurepages\noffigurepages
\fi
\@@iprechts}
\@@iponder}%
@@ -625,11 +637,11 @@
{\stelpapierformaatin[\c!links=\hskip\@@pcoffset]%
\adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\@@pcafstand\@@pchoogte\to\@@pcpaperheight
\adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\to\@@pcpaperwidth
- \definieeroverlay[pagecomment][\placepagecommentTB]}
+ \defineoverlay[pagecomment][\placepagecommentTB]}
{\stelpapierformaatin[\c!boven=\vskip\@@pcoffset]%
\adddimenmacro\papierhoogte\@@pcoffset\@@pcoffset\to\@@pcpaperheight
\adddimenmacro\papierbreedte\@@pcoffset\@@pcoffset\@@pcafstand\@@pcbreedte\to\@@pcpaperwidth
- \definieeroverlay[pagecomment][\placepagecommentLR]}%
+ \defineoverlay[pagecomment][\placepagecommentLR]}%
\processaction
[\@@pcplaats]
[ \v!onder=>{\stelpapierformaatin[\c!onder =\vss,\c!boven =\vskip\@@pcoffset]},
diff --git a/tex/context/base/core-01e.tex b/tex/context/base/core-par.tex
index afb3debef..1235d74b4 100644
--- a/tex/context/base/core-01e.tex
+++ b/tex/context/base/core-par.tex
@@ -1,8 +1,8 @@
%D \module
-%D [ file=core-01e,
+%D [ file=core-par,
%D version=1997.03.31,
%D title=\CONTEXT\ Core Macros,
-%D subtitle=1E (to be split),
+%D subtitle=Paragraph Tricks,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Core Macros (e)}
+\writestatus{loading}{ConTeXt Pararaph Tricks}
\unprotect
@@ -75,7 +75,7 @@
{\bgroup
\resetparagraphlines
\EveryPar
- {\strut\inlinkermarge{\tf{\tx\paragraphnumber}\kern2em}%
+ {\strut\inleftmargin{\tf{\tx\paragraphnumber}\kern2em}%
\ignorespaces}}
\def\doresetparagraph%
{\resetparagraphlines
@@ -205,9 +205,6 @@
\global\let\nofparagraphs=\totalnofparagraphs
\doglobal\decrement(\nofparagraphs,\discardedparagraphs)}
-% \steluitlijnenin[onder]
-% \stelwitruimtein[groot]
-%
% \toonkader
%
% \numberparagraphlines
@@ -295,128 +292,5 @@
% \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
+\protect \endinput
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 6996d6ead..8604bafab 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -17,7 +17,7 @@
%
% uitprinten
% engels maken
-% rommel voorlopig naar core-01d
+% rommel voorlopig naar core-int/core-nav
% programma, profiel etc als methode
% \macro toevoegen
@@ -833,9 +833,8 @@
\fi
\fi
\fi
-% \ifx\currentfullreference\v!geen % DOCUMENT THIS ONE!
-% \global\referencefoundfalse
-% \fi
+% \doif{\currentfullreference}{\v!geen} % DOCUMENT THIS ONE!
+% {\global\referencefoundfalse}
\iftracereferences
\doshowcurrentreference\space
\writestatus{\m!references}{\currentreferenceshow}%
@@ -902,9 +901,8 @@
\fi
\fi
\fi
-% \ifx\currentfullreference\v!geen % DOCUMENT THIS ONE!
-% \global\referencefoundfalse
-% \fi
+% \doif{\currentfullreference}{\v!geen} % DOCUMENT THIS ONE!
+% {\global\referencefoundfalse}%
\iftracereferences
\doshowcurrentreference\space
\writestatus{\m!references}{\currentreferenceshow}%
@@ -1340,7 +1338,7 @@
%D produce \CDROM's conforming to ISO9660. We consider is the
%D savest to enable this feature by default. We cannot handle
%D uppercase here, since the suffix is handled in the special
-%D driver. COnversion is taken care of by:
+%D driver. Conversion is taken care of by:
%D
%D \startypen
%D \setreferencefilename somefilename\to\SomeFileName
@@ -1520,7 +1518,8 @@
\definesystemreferencehandler \rt!list \handlelistreference
\def\handleexecreference#1%
- {\executecommand{\currentdatareference}{\currentreferencearguments}}
+ {\checkexecutecommand{\currentdatareference}{\currentreferencearguments}%
+ \executecommand{\currentdatareference}{\currentreferencearguments}}
\def\handlepagereference#1%
{\gotorealpage{}{}{\currentdatareference}}
@@ -1528,6 +1527,24 @@
\def\handlelistreference#1% is deze nog echt nodig?
{\gotodestination{}{}{\currentdatareference}{\getvalue{\currentdatareference}}}
+%D \macros
+%D {setexecutecommandcheck}
+%D
+%D In case a command action needs to do some checking in
+%D advance, one can assign an check function by:
+%D
+%D \starttypen
+%D \setexecutecommandcheck{startsound}\checksoundtrack
+%D \stoptypen
+
+\def\setexecutecommandcheck#1#2% #2 permits \first \second
+ {\setvalue{\s!do\s!do#1}{#2}}
+
+\def\checkexecutecommand#1#2%
+ {\def\docheckexecutecommand##1%
+ {\doifdefined{\s!do\s!do#1}{\getvalue{\s!do\s!do#1}{##1}}}%
+ \processcommacommand[#2]\docheckexecutecommand}
+
%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
@@ -1541,20 +1558,24 @@
\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!PauseMovie {pausemovie}
+\setglobalsystemreference \rt!exec \v!PauseSound {pausesound}
\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!SaveForm {exportform}
+\setglobalsystemreference \rt!exec \v!LoadForm {importform}
+\setglobalsystemreference \rt!exec \v!ResetForm {resetform}
+\setglobalsystemreference \rt!exec \v!ResumeMovie {resumemovie}
+\setglobalsystemreference \rt!exec \v!ResumeSound {resumesound}
\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!StartMovie {startmovie}
+\setglobalsystemreference \rt!exec \v!StartSound {startsound}
+\setglobalsystemreference \rt!exec \v!StopMovie {stopmovie}
+\setglobalsystemreference \rt!exec \v!StopSound {stopsound}
+\setglobalsystemreference \rt!exec \v!SubmitForm {submitform}
\setglobalsystemreference \rt!exec \v!SwapViewer {swap}
\setglobalsystemreference \rt!exec \v!ViewerHelp {help}
\setglobalsystemreference \rt!exec \v!HideField {hide}
@@ -1853,19 +1874,19 @@
\ifx\currentreferencespecial\empty
\ifx\currentouterreference\empty
\ifnum0\currentrealreference=0
- \ifhmode\strut\hoog{\symbol[\v!nergens]}\fi
+ \ifhmode\strut\high{\symbol[\v!nergens]}\fi
\else\ifnum0\currentrealreference>\realpageno
- \dodosymbolreference{#2}{\hoog{\symbol[\v!volgende]}}%
+ \dodosymbolreference{#2}{\high{\symbol[\v!volgende]}}%
\else\ifnum0\currentrealreference<\realpageno
- \dodosymbolreference{#2}{\hoog{\symbol[\v!vorige]}}%
+ \dodosymbolreference{#2}{\high{\symbol[\v!vorige]}}%
\else
- \ifhmode\strut\hoog{\symbol[\v!nergens]}\fi
+ \ifhmode\strut\high{\symbol[\v!nergens]}\fi
\fi\fi\fi
\else
- \gotoouterlocation{#3}{\showlocation{\hoog{\symbol[\v!ergens]}}}%
+ \gotoouterlocation{#3}{\showlocation{\high{\symbol[\v!ergens]}}}%
\fi
\else
- \gotospeciallocation{#3}{\showlocation{\hoog{\symbol[\v!ergens]}}}%
+ \gotospeciallocation{#3}{\showlocation{\high{\symbol[\v!ergens]}}}%
\fi
\egroup}
@@ -1901,41 +1922,103 @@
\let\dowantedreference=\docompletereference
-%D [ref] here when ok
-
-% \chapter[a]{first}
-%
-% \placeformula[b] \startformula a = b + c \stopformula
-%
-% \placeformula[for:c] \startformula a = b + c \stopformula
-%
-% \blank
-%
-% \in{chapter}[a] and \in{formula}[b] and \in{formula}[for:c] \par
-% \at{page}[a] and \at{page}[b] and \at{page}[for:c]
-%
-% \definereferenceformat[informula]
-%
-% \informula[b] and \informula[for:c] \par
-% the \informula{formulas}[b] \informula{en}[for:c]
-%
-% \definereferenceformat[informula][left=(,right=)]
-%
-% \informula[b] en \informula[for:c] \par
-% the \informula{formulas}[b] \informula{and}[for:c]
-%
-% \definereferenceformat[informula] [left=(,right=),text=formula]
-% \definereferenceformat[informulas] [left=(,right=),text=formulas]
-% \definereferenceformat[andformula] [left=(,right=),text=and]
-% \definereferenceformat[andformulas][left=(,right=),text=and]
-%
-% \informula[b] and \informula[for:c] \par
-% the \informula{formulas}[b] \informula{and}[for:c] \par
-% the \informulas{formulas}[b] \informula{and}[for:c] \par
-% the \informulas[b] \informula{en}[for:c] \par
-% the \informulas[b] \andformula[for:c] \par
-%
-% Instead of a text, one can specify a label.
+%D \macros
+%D {definereferenceformat}
+%D
+%D The next few macros were made for for David Arnold and Taco
+%D Hoekwater. They can be used for predefining reference
+%D texts, and thereby stimulate efficiency.
+%D
+%D [more documentation will be added]
+%D
+%D \starttypen
+%D \definereferenceformat[informula] [left=(,right=),text=formula]
+%D \definereferenceformat[informulas] [left=(,right=),text=formulas]
+%D \definereferenceformat[andformula] [left=(,right=),text=and]
+%D \definereferenceformat[andformulas][left=(,right=),text=and]
+%D
+%D \informula [b] and \informula [for:c]
+%D the \informula {formulas}[b] \informula {and} [for:c]
+%D the \informulas {formulas}[b] \informula {and} [for:c]
+%D the \informulas [b] \informula {en} [for:c]
+%D the \informulas [b] \andformula [for:c]
+%D \stoptypen
+%D
+%D Instead of a text, one can specify a label, which should
+%D be defined with \type {\setuplabeltext}.
+
+\def\definereferenceformat%
+ {\dodoubleargument\dodefinereferenceformat}
+
+\def\dodefinereferenceformat[#1][#2]%
+ {\iffirstargument
+ \getparameters[\??rf#1]
+ [\c!links=, % of the number
+ \c!rechts=, % of the number
+ \c!tekst=, % before the number
+ \c!label=, % can be {left}{right}
+ \c!commando=\in,
+ #2]%
+ \unexpanded\setvalue{#1}{\doexecutereferenceformat{#1}}%
+ \fi}
+
+\def\noexecutelabelreferenceformat#1%
+ {\doifvaluesomething{\??rf#1\c!tekst}
+ {\gdef\textofreference{\getvalue{\??rf#1\c!tekst}}}%
+ \getvalue{\??rf#1\c!commando}}
+
+\def\doexecutelabelreferenceformat#1%
+ {\getvalue{\??rf#1\c!commando}%
+ {\leftlabeltext {\getvalue{\??rf#1\c!label}}}%
+ {\rightlabeltext{\getvalue{\??rf#1\c!label}}}}
+
+\def\doexecutereferenceformat#1%
+ {\gdef\leftofreference {\getvalue{\??rf#1\c!links }}%
+ \gdef\rightofreference{\getvalue{\??rf#1\c!rechts}}%
+ \global\let\textofreference\empty % otherwise ~ added
+ \doifelsevaluenothing{\??rf#1\c!label}
+ {\let\next\noexecutelabelreferenceformat}
+ {\let\next\doexecutelabelreferenceformat}%
+ \next{#1}}
+
+\let\leftofreference \relax
+\let\rightofreference\relax
+\let\textofreference \relax
+
+\def\dodododoinatreference#1#2#3[#4]%
+ {\ifx\next\bgroup
+ \dododododoinatreference
+ {\leftofreference#1\ignorespaces#3\rightofreference}{#2}[#4]%
+ \else
+ \dododododoinatreference
+ {\leftofreference#1\rightofreference}{#2#3}[#4]%
+ \fi}
+
+\def\dododododoinatreference#1#2[#3]%
+ {\bgroup
+ \forgetall
+ \leaveoutervmode
+ \doifreferencefoundelse{#3}
+ {\bgroup
+ \let\ignorespaces \empty % rather dirty trick, but ok
+ \let\leftofreference \empty % the same, again ok
+ \let\rightofreference\empty % and once more
+ \def\textofreference {#2}% % temporary value
+ \ifx\textofreference\empty % simple expansion
+ \doifelsenothing{#1}
+ {\egroup\dosymbolreference{#1}{\textofreference}[#3]}
+ {\egroup\dowantedreference{#1}{\textofreference}[#3]}%
+ \else
+ \doifelsenothing{#1}
+ {\egroup\dosymbolreference{#1}{#2}[#3]}
+ {\egroup\dowantedreference{#1}{#2}[#3]}%
+ \fi}
+ {\dounknownreference{#1}{#2}[#3]}%
+ \referentieinfo{<}{#3}%
+ \global\let\leftofreference \empty
+ \global\let\rightofreference\empty
+ \global\let\textofreference \empty
+ \egroup}
%D In interactive documents going to a specific location is not
%D bound to cross references. The \type{\goto} commands can be
@@ -1970,7 +2053,7 @@
{\doifelsenothing{#1}
{\dosymbolreference{}{}[#2]}
{\donaarspace{#1}[#2]}}
- {\unknownreference{#2}#1}%
+ {\unknownreference{#2}#1\relax}% \relax catches lookahead
\referentieinfo{<}{#2}}
\unexpanded\def\naar#1#2%
@@ -2198,14 +2281,22 @@
%D \type{\setouterlocation} and now is the time to define this
%D one.
+\newconditional\forceURLlocation
+
\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}}%
+ {\ifconditional\forceURLlocation
+ \edef\otherURL {#1}%
+ \let\otherfile\empty
+ \else
+ \let\otherURL\empty
+ \edef\otherfile{#1}%
+ \fi}%
+ \setfalse\forceURLlocation
\doifparentfileelse{\otherfile}
{\let\otherURL=\empty
\let\otherfile=\empty
@@ -2261,13 +2352,13 @@
%D
%D The fastest implementation would be:
-\definespecialtest\v!file {\handlespecialFILEandURL}
-\definespecialtest\v!URL {\handlespecialFILEandURL}
-\definespecialtest\v!url {\handlespecialFILEandURL}
+\definespecialtest\v!file {\setfalse\forceURLlocation\handlespecialFILEandURL}
+\definespecialtest\v!URL {\settrue \forceURLlocation\handlespecialFILEandURL}
+\definespecialtest\v!url {\settrue \forceURLlocation\handlespecialFILEandURL}
-\definespeciallocation\v!file {\handlespecialallocationFILEandURL}
-\definespeciallocation\v!URL {\handlespecialallocationFILEandURL}
-\definespeciallocation\v!url {\handlespecialallocationFILEandURL}
+\definespeciallocation\v!file{\setfalse\forceURLlocation\handlespecialallocationFILEandURL}
+\definespeciallocation\v!URL {\settrue \forceURLlocation\handlespecialallocationFILEandURL}
+\definespeciallocation\v!url {\settrue \forceURLlocation\handlespecialallocationFILEandURL}
\def\handlespecialFILEandURL%
{\doifreferencefoundelse
@@ -2702,7 +2793,7 @@
\doif{\@@ibstatus}{\v!stop}{\locationfalse}%
\iflocation
\ifsecondargument
- \checkinteractiebalk\v!ruim\!!zeropoint % brrrrr
+ \checkinteractiebalk{1.5em}\v!ruim\!!zeropoint % brrrrr
\setbox2=\hbox
{\setupsymbolset[\@@iasymboolset]%
\localframed[\??ib][]{\symbol[\v!vorigepagina]}}%
@@ -2716,7 +2807,7 @@
[ \v!pagina=>\advance\!!counta by 4,
\v!sub\v!pagina=>\advance\!!counta by 4,
\s!unknown=>\advance\!!counta by 1]%
- \ifdim\@@ibbreedte=\!!zeropoint
+ \ifdim\@@ibbreedte=\!!zeropoint\relax
\!!widtha=2em
\advance\!!widtha by \@@ibafstand % new
\!!widthb=\!!counta\!!widtha
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 6b58ae107..c978983c8 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -15,8 +15,6 @@
\newif \ifautoregisterhack % for the moment a private hack
-% for the moment \e!register ipv #1 (evt nog \v!register)
-
\unprotect
%D Isolated but still indocumented.
@@ -71,7 +69,7 @@
\def\getlastregisterentry#1%
{\def\docommando##1%
{\def\!!stringa{##1}}%
- \processconcanatedlist[#1][+]\docommando
+ \processseparatedlist[#1][+]\docommando
\!!stringa}
\def\doprocesspageregister[#1]#2%
@@ -454,8 +452,8 @@
\fi
\fi
% aangepast
- \def\dodocommando[####1-####2]%
- {\gotonextinternal{\s!ind}{####1}{####2}{\box0}}%
+ \def\dodocommando[##1-##2]%
+ {\gotonextinternal{\s!ind}{##1}{##2}{\box0}}%
\doifelsevalue{\??id#1\c!interactie}{\v!paginanummer}
{\limitedregisterentry{#1}{#2}} % paginanummer
{{\setbox0=\hbox{\limitedregisterentry{#1}{\begstrut#2}}%
@@ -471,12 +469,12 @@
\doifvalue{\??id#1\c!nummer}{\v!ja}
{\hskip\getvalue{\??id#1\c!afstand}(\commalistsize)}%
\doifnotvalue{\??id#1\c!interactie}{\v!tekst} % paginanummer,alles
- {\def\docommando####1####2%
- {{\setbox0=\hbox{\showlocation{\hbox to 1em{\hss\symbol[####2]\hss}}}%
- \ifx####1\empty
+ {\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]%
+ \expandafter\dodocommando\expandafter[##1]%
\fi}}%
\hskip\getvalue{\??id#1\c!afstand}%
\docommando\firstlistreference\v!vorige
@@ -666,7 +664,7 @@
\setvalue{#1\s!entry}##1%
{\dosetpageregisterletter{#1}{##1}}}
-\def\dosetautoregisterentrya#1#2% for the moment \e!register ipv #1
+\def\dosetautoregisterentrya#1#2%
{\global\utilitydonetrue
\c!entryletter
\iflocation
@@ -678,7 +676,7 @@
\setupinteraction[\c!kleur=,\c!contrastkleur=,\c!letter=]% kan sneller
\naarbox
{\limitedregisterentry{#1}{\begstrut#2}}%
- [JS(SetRegisterEntry{\e!register,\countervalue{autolink:#1},#2,{\alllistreferences}})]%
+ [JS(SetRegisterEntry{\v!register,\countervalue{autolink:#1},#2,{\alllistreferences}})]%
\egroup
\else
\endgraf\noindent\c!entryreference
@@ -703,31 +701,31 @@
%D much faster, but is conceptually pretty weak.
\def\complexregisterfield[#1]%
- {\definefield[#1:\realfolio][line][\e!register]%
+ {\definefield[#1:\realfolio][line][\v!register]%
\field[#1:\realfolio]}
\def\simpleregisterfield%
- {\complexregisterfield[\e!register]}
+ {\complexregisterfield[\v!register]}
\definecomplexorsimple\registerfield
\setupfield
- [\e!register]
+ [\v!register]
[\c!breedte=10em,
\c!hoogte=3ex,
\c!uitlijnen=\v!midden,
\c!optie=\v!alleenleesbaar,
\c!plaats=\v!laag]
-\def\doinitializeautoregister#1% for the moment \e!register ipv #1
+\def\doinitializeautoregister#1%
{\useJSscripts[reg]%
\useJSpreamblenow{LinkedRegisters}%
- \setupinteraction[\c!openpaginaactie=JS(UpdateRegisterField{\e!register})]%
- \definereference[\v!reset \e!register][JS(ResetRegisterEntry{\e!register})]%
- \definereference[\v!eerste \e!register][JS(GotoFirstRegisterEntry{\e!register})]%
- \definereference[\v!vorige \e!register][JS(GotoPreviousRegisterEntry{\e!register})]%
- \definereference[\v!volgende\e!register][JS(GotoNextRegisterEntry{\e!register})]%
- \definereference[\v!laatste \e!register][JS(GotoLastRegisterEntry{\e!register})]}
+ \setupinteraction[\c!openpaginaactie=JS(UpdateRegisterField{\v!register})]%
+ \definereference[\v!reset \v!register][JS(ResetRegisterEntry{\v!register})]%
+ \definereference[\v!eerste \v!register][JS(GotoFirstRegisterEntry{\v!register})]%
+ \definereference[\v!vorige \v!register][JS(GotoPreviousRegisterEntry{\v!register})]%
+ \definereference[\v!volgende\v!register][JS(GotoNextRegisterEntry{\v!register})]%
+ \definereference[\v!laatste \v!register][JS(GotoLastRegisterEntry{\v!register})]}
\def\doinitializelinkregister#1%
{}
@@ -830,8 +828,12 @@
\setbox0=\vbox
{\doutilities{#1}{\jobname}{#1}{}{}}%
\endgroup
- \ifregistergeplaatst\enablemode[\e!register]\else\disablemode[\e!register]\fi}
-
+ \ifregistergeplaatst
+ \enablemode [\systemmodeprefix\v!register]%
+ \else
+ \disablemode[\systemmodeprefix\v!register]%
+ \fi}
+
\def\bepaalregisterkenmerken%
{\dodoubleempty\dobepaalregisterkenmerken}
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index b790ff1dd..c25fa87fb 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -177,7 +177,7 @@
{\bgroup
\doifelse{#4}{\v!rond}
{\dimen0=#5\relax % just in case of .x\bodyfontsize
- \ifdim\dimen0=\!!zeropoint
+ \ifzeropt\dimen0
\dofilledlinedbox\width#1\height#2\depth#3\\%
\else
\dofilledroundbox\width#1\height#2\depth#3\radius#5\\%
@@ -314,6 +314,10 @@
\scratchdimen=#5%
\edef\overlaydepth{\the\scratchdimen}%
\edef\overlaycolor{#6}%
+\prependtoks
+ \hsize=\overlaywidth
+ \vsize=\overlayheight
+\to\everyoverlay
%\writestatus
% {overlay}
% {#1\space w=\overlaywidth/h+d=\overlayheight/d=\overlaydepth]}%
@@ -400,7 +404,8 @@
%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.
+%D by \TEX\ itself, the latter one depends on the driver. This
+%D macro also support a negative offset.
\def\dooutlinebox#1\color#2\offset#3\corner#4\radius#5\depth#6\toggle#7\\%
{\vbox % rules on top of box
@@ -408,17 +413,22 @@
\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
+ \ifdim\dimen6<\!!zeropoint
+ \advance\dimen4 by \dimen6 \dimen8=-\dimen6 \dimen6=\!!zeropoint
+ \else
+ \dimen8=\!!zeropoint
+ \fi
\setbox\extraframebox=\hbox
{\dostrokedbox\width\dimen2\height\dimen4\depth\dimen6%
\corner#4\radius#5\toggle#7\\}%
\setbox\extraframebox=\hbox
- {\vbox{\moveleft#3\box\extraframebox}}%
+ {\raise\dimen8\vbox{\moveleft#3\box\extraframebox}}%
\wd\extraframebox=\wd#1%
\ht\extraframebox=\ht#1%
\dp\extraframebox=\dp#1%
\hbox
{%\copy#1\hskip-\wd#1%
- \box#1\hskip-\wd\extraframebox % faster
+ \box#1\hskip-\wd\extraframebox % faster
\doifelsenothing{#2} % speeds up a little
{\box\extraframebox}
{\color[#2]{\box\extraframebox}}}}}
@@ -427,7 +437,7 @@
{\bgroup
\doifelse{#4}{\v!rond}
{\dimen0=#5\relax % just in case of .x\bodyfontsize
- \ifdim\dimen0=\!!zeropoint
+ \ifzeropt\dimen0
\dostrokedlinedbox\width#1\height#2\depth#3\toggle#6\\%
\else
\dostrokedroundbox\width#1\height#2\depth#3\radius#5\toggle#6\\%
@@ -567,7 +577,7 @@
\def\localframed%
{\bgroup
\inframedtrue
- \dodoubleargument\startlocalframed}
+ \dodoubleempty\startlocalframed}
%D Before we go into details, we present (and implement) the
%D main framing routine. I saw no real reason for splitting the
@@ -575,11 +585,23 @@
%D collected in a horizontal or vertical box with fixed or free
%D dimensions and specific settings concerning aligment and
%D offsets.
+%D
+%D In the first few lines, we pre||expand the frame and
+%D background offsets. We do so, because the can be defined in
+%D terms of the main offset. However, see for instance page
+%D backgrounds, when \type {#2} sets the offset to \type
+%D {overlay}, both offsets become invalid.
\def\startlocalframed[#1][#2]%
{\bgroup
- \edef\@@framed{#1}%
- \getparameters[\@@framed][#2]%
+ \edef\@@framed{#1}%
+ \scratchdimen\getvalue{\@@framed\c!kaderoffset}%
+ \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}%
+ \scratchdimen\getvalue{\@@framed\c!achtergrondoffset}%
+ \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}%
+ \ifsecondargument % faster
+ \getparameters[\@@framed][#2]% here !
+ \fi
\edef\localoffset{\getvalue{\@@framed\c!offset}}%
\edef\localwidth{\getvalue{\@@framed\c!breedte}}%
\edef\localheight{\getvalue{\@@framed\c!hoogte}}%
@@ -590,9 +612,9 @@
\doifelsenothing{\localformat}
{\boxhasformatfalse}
{\boxhasformattrue
- \edef\beforeframedbox{\getvalue{\@@framed\c!boven}}%
- \edef\afterframedbox{\getvalue{\@@framed\c!onder}}%
- \dosetraggedcommand{\localformat}}%
+ \dosetraggedcommand{\localformat}%
+ \edef\beforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}%
+ \edef\afterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}}%
\doifelse{\localoffset}{\v!geen}
{\boxhasoffsetfalse
\boxhasstrutfalse
@@ -631,7 +653,7 @@
\setlocalhsize
\!!widtha=\localhsize
\fi
- \advance\!!widtha by -2\@@localoffset
+ \advance\!!widtha by -2\@@localoffset
\advance\!!heighta by -2\@@localoffset
\doif{\localstrut}{\v!nee}
{\boxhasstrutfalse}%
@@ -641,12 +663,12 @@
\let\localendstrut=\endstrut
\let\localstrut =\strut
\else
- \let\localbegstrut=\pseudostrut % was: \relax
- \let\localendstrut=\relax
- \let\localstrut =\pseudostrut % was: \relax
+ \let\localbegstrut=\pseudobegstrut % was: \relax
+ \let\localendstrut=\pseudoendstrut % was: \relax
+ \let\localstrut =\pseudostrut % was: \relax
%\ifboxhasheight\ifdim\!!heighta<\ht\strutbox % saveguard
- % \let\localbegstrut=\relax
- % \let\localstrut =\relax
+ % \let\localbegstrut=\relax % but not that
+ % \let\localstrut =\relax % save afterall
%\fi\fi
\fi
\ifboxhasheight
@@ -684,7 +706,8 @@
\fi
\fi
\def\dowithframedbox%
- {\aftergroup\stoplocalframed}%
+ {\let\postprocessframebox\undefined %new
+ \aftergroup\stoplocalframed}%
\edef\framedwidth % a new feature
{\ifdim\!!widtha >\!!zeropoint\the\!!widtha \else\!!zeropoint\fi}%
\edef\framedheight% a new feature
@@ -692,6 +715,7 @@
\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.
@@ -732,6 +756,9 @@
\ifboxisoverlaid \else
\dolocateframebox
\fi
+ \ifx\postprocessframebox\undefined \else
+ \postprocessframebox\framebox
+ \fi
\doifelsevalue{\@@framed\c!kader}{\v!overlay}
{\edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}%
\edef\overlaylinewidth{\the\linewidth}}%
@@ -852,7 +879,7 @@
\def\mframed%
{\dodoubleempty\domframed[\donetrue]}
-\def\minframed%
+\def\inmframed%
{\dodoubleempty\domframed[\donefalse]}
%D So instead of the rather versatile \type {\framed}, we ue
@@ -860,7 +887,8 @@
%D
%D \startbuffer
%D \startformule
-%D x \times \mframed{y} \times y^{z_z}
+%D x \times \mframed{y} \times y^{z_z}
+%D x \times \inmframed{y} \times y^{z_z}
%D \stopformule
%D \stopbuffer
%D
@@ -911,8 +939,8 @@
%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 For inline use, we also provide the \type {\inmframed}
+%D alternative: we want $x \times \inmframed{y}$ in inline
%D math, right?
%D This previous framing macros needs a lot of alternatives for
@@ -1582,7 +1610,7 @@
\def\dostopmarginrule%
{\endofshapebox
\reshapebox
- {\hbox{\inlinkermarge{\dodrawmarginrule}\box\shapebox}}%
+ {\hbox{\inleftmargin{\dodrawmarginrule}\box\shapebox}}%
\flushshapebox
\egroup}
@@ -1710,7 +1738,7 @@
\def\thinrule%
{\strut
\leaders
- \hrule\!!height\@@dlhoogte\!!depth\@@dlhoogte
+ \hrule\!!height.5\linewidth\!!depth.5\linewidth
\hfill
\strut}
@@ -1720,8 +1748,7 @@
\endgraf}
\def\dosetupthinrules[#1]%
- {\getparameters[\??dl][#1]%
- \assignvalue{\@@dlafstand}{\@@dl@@afstand}{1.0}{1.5}{2.0}}
+ {\getparameters[\??dl][#1]}
\def\setupthinrules%
{\dosingleargument\dosetupthinrules}
@@ -1730,10 +1757,14 @@
{\bgroup
\dosetupthinrules[#1]%
\@@dlvoor
- \spacing\@@dl@@afstand
+ \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}%
+ \spacing\@@dlinterlinie
\dorecurse
{\@@dln}
- {\thinrule\ifnum\recurselevel<\@@dln\endgraf\fi}%
+ {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else
+ \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi
+ \thinrule
+ \ifnum\recurselevel<\@@dln \endgraf \fi}%
\@@dlna
\egroup}
@@ -1741,6 +1772,17 @@
{\dosingleempty\dothinrules}
%D \macros
+%D {optimizethinrules}
+%D
+%D By saying \type {\thinrulestrue} or \type {-false}, we
+%D can influence the way dangling lines are handled.
+
+\newif\ifoptimizethinrules \optimizethinrulestrue
+
+\def\dothinrulesnobreak%
+ {\ifoptimizethinrules\penalty500\fi}
+
+%D \macros
%D {startframedtext, setupframedtexts,
%D defineframedtext, start<<framedtext>>, <<framedtext>>}
%D
@@ -1891,11 +1933,11 @@
\def\dododostartframedtext[#1][#2][#3]%
{\processaction
[#2]
- [ \v!links=>\letvalue{\??kd#1\c!links}=\relax
+ [ \v!links=>\letvalue{\??kd#1\c!links }=\relax
\letvalue{\??kd#1\c!rechts}=\hfill,
- \v!rechts=>\letvalue{\??kd#1\c!links}=\hfill
+ \v!rechts=>\letvalue{\??kd#1\c!links }=\hfill
\letvalue{\??kd#1\c!rechts}=\relax,
- \v!midden=>\letvalue{\??kd#1\c!links}=\hfill
+ \v!midden=>\letvalue{\??kd#1\c!links }=\hfill
\letvalue{\??kd#1\c!rechts}=\hfill]%
\forgetparindent
\setbox\framebox=\vbox
@@ -1906,7 +1948,7 @@
\blanko[\v!blokkeer]%
\let\\=\endgraf
\getvalue{\??kd#1\c!binnen}%
- \dostartattributes\??kd\c!letter\c!kleur{}}
+ \dostartattributes{\??kd#1}\c!letter\c!kleur{}}
\def\dostopframedtext[#1]%
{\endgraf
@@ -1936,7 +1978,7 @@
\blanko[\v!blokkeer]%
\let\\=\endgraf
\getvalue{\??kd#1\c!binnen}%
- \dostartattributes\??kd\c!letter\c!kleur{}%
+ \dostartattributes{\??kd#1}\c!letter\c!kleur{}%
\bgroup
\aftergroup\docloseframedtext
\let\next=}
@@ -2065,7 +2107,7 @@
\@@tltussen
\endgraf}
-\def\dodobottomtextrule#1%
+\def\dodobottomtextrule#1#2%
{\ifhmode
\endgraf
\fi
@@ -2078,7 +2120,7 @@
\advance\dimen0 by .5ex
\vskip\dimen0
\@@tltussen
- \doifelsenothing{#1}
+ \doifelsenothing{#2}
{\bgroup
\advance\hsize by -\rightskip
\advance\hsize by -\leftskip
@@ -2087,18 +2129,16 @@
{\color[\@@tllijnkleur]
{\hrule\!!depth\linewidth\!!height\!!zeropoint\!!width\hsize}}%
\egroup}
- {\docomplextextrule{#1}}%
- \prevdepth\!!zeropoint} % look at this
-
-\def\dobottomtextrule#1%
- {\dodobottomtextrule{#1}%
- \@@tlna
+ {\docomplextextrule{#2}}%
+ \ifvmode\prevdepth\!!zeropoint\fi
+ #1%
\pagina[\v!voorkeur]}
-\def\domiddletextrule#1%
- {\dodobottomtextrule{#1}%
- \@@tltussen
- \pagina[\v!voorkeur]}
+\def\dobottomtextrule%
+ {\dodobottomtextrule\@@tlna}
+
+\def\domiddletextrule%
+ {\dodobottomtextrule\@@tltussen}
\def\dounknowntextrule%
{\iffirstargument
@@ -2153,7 +2193,8 @@
\def\complexfillinrules[#1]%
{\def\docomplexfillinrules##1##2%
- {\dodocomplexfillinrules[#1]{##1}{##2}{\thinrules[n=\@@iln]}}%
+ {\dodocomplexfillinrules[#1]{##1}{##2}{\thinrules
+ [\c!n=\@@iln,\c!interlinie=\@@ilinterlinie,\c!voor=,\c!na=]}}%
\dodoublegroupempty\docomplexfillinrules}
\def\dodocomplexfillinrules[#1]#2#3#4%
@@ -2164,23 +2205,22 @@
\noindent
\doifelse{\@@ilbreedte}{\v!passend}
{\let\@@ilafstand=\!!zeropoint
- \setbox0=\hbox}
+ \hbox}
{\doifelse{\@@ilbreedte}{\v!ruim}
- {\setbox0=\hbox}
- {\setbox0=\hbox to \@@ilbreedte}}
- \bgroup
+ {\hbox}
+ {\hbox to \@@ilbreedte}}
+ \bgroup
\doattributes\??il\c!letter\c!kleur{\strut#2\hfill\@@ilscheider}%
\hskip\@@ilafstand
\egroup
- \hangindent=\wd0\relax
- \parindent=\hangindent
- \box0\relax
+ %\hangindent=\wd0\relax % tzt hang=yes,n
+ %\parindent=\hangindent
+ %\box0\relax
\stelwitruimtein[\v!groot]%
\ignorespaces
#4%
\doifsomething{#3}
- {\doifnot{\@@ilbreedte}{\v!passend}
- {\kern\@@ilafstand}
+ {\kern\@@ilafstand
\doattributes\??il\c!letter\c!kleur{#3\strut}}%
\endgroup
\endgraf
@@ -2197,7 +2237,7 @@
\definecomplexorsimpleempty\fillintext
-\def\complexfillintext[#1]%
+\def\complexfillintext[#1]% rather rough, using an \unhbox is suboptimal
{\def\docomplexfillintext##1##2%
{\dowithnextbox
{\dodocomplexfillinrules[#1]{##1}{\hfill##2}{\unhbox\nextbox\unskip}}%
@@ -2494,10 +2534,8 @@
\c!dikte=\@@kadefaultwidth\linewidth]
\setupthinrules
- [\c!afstand=\v!klein,
+ [\c!interlinie=\v!klein,
\c!n=3,
- \c!hoogte=.5\linewidth,
- \c!diepte=\@@dlhoogte,
\c!voor=,
\c!na=]
@@ -2519,6 +2557,7 @@
\c!voor=\blanko,
\c!na=\blanko,
\c!n=1,
+ \c!interlinie=\v!klein,
\c!scheider=,
\c!letter=\v!normaal,
\c!kleur=]
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
new file mode 100644
index 000000000..ea24cf852
--- /dev/null
+++ b/tex/context/base/core-sec.tex
@@ -0,0 +1,1491 @@
+%D \module
+%D [ file=core-sec,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Sectioning,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Sectioning}
+
+\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
+
+\startmessages czech library: structures
+ title: struktury
+ 1: zacatek oddilu (sekce) --
+ 2: konec oddilu (sekce) --
+\stopmessages
+
+\unprotect
+
+\def\dodochecknummer#1#2#3%
+ {\bgroup
+ \doifinstringelse{.0}{.#2} % waarom \instring en \@koscheider
+ {\doifnot{#3}{\v!per}
+ {%\debuggerinfo{\m!systems}{number #1 #3 becomes \getnumbervariable{#1\c!wijze}}%
+ \setevalue{\s!number#1\c!wijze}{#3}% geen \xdef, gaat mis met \subpage
+ \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]%
+ {\bgroup % added
+ \global\let\voorafgaandenummer\empty
+ \ifsectienummer
+ \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % added
+ {\doifelsevalue{\s!number#1\c!sectienummer}{\v!ja}
+ {\donetrue}{\donefalse}%
+ \doifvalue{\s!number#1\c!sectienummer}{\v!nummer}
+ {\donetrue\let\@@sectionconversion\gobbleoneargument}%
+ \ifdone
+ \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}%
+ \fi
+ \egroup}
+
+\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\maakhetnummer[#1]%
+ {\maakvoorafgaandenummer[#1]%
+ \xdef\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}}
+
+% sectioning
+
+\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}
+\setvalue{\??by\v!per\v!pagina}{\v!tekst} % see footnotes
+
+%%%%%%%%% old
+
+\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}
+
+%%%%%%%%% new, multilingual
+
+\def\dostelsectiein[#1][#2][#3]%
+ {\ifthirdargument
+ \getparameters[\??se#1#2][#3]%
+ \else
+ \getparameters[\??se#1][#2]%
+ \fi
+ \doifelsevalue{\??se#1\c!vorigenummer}{\v!ja}
+ {\setvalue{#1\c!nummer}{\@@longsectionnumber{#1}}}
+ {\setvalue{#1\c!nummer}{\@@shortsectionnumber{#1}}}}
+
+\def\stelsectiein%
+ {\dotripleempty\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}}}
+
+% suited for chinese too:
+
+\def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber
+ {\ifnum#2=0 0\else % else troubles with \uchar
+ \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
+ \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
+ #2%
+ \else
+ \getvalue{\??cv\getvalue{\??se#1\c!conversie}}{#2}%
+ \fi
+ \else
+ \getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}{#2}%
+ \fi
+ \fi}
+
+\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
+ \global\let\currentlevel\empty
+ \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
+ \global\let\currentlevel\empty}
+ {\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
+ \global\let\currentlevel\empty
+ \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}
+
+\let\currentlevel\empty
+
+\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}
+
+% suited for chinese too:
+
+\def\@@shortsectionnumber#1%
+ {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
+ \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
+ \@@sectionvalue{#1}%
+ \else
+ \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
+ \fi
+ \else
+ \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
+ \fi}
+
+\def\dosetlocalsectieblok#1#2#3%
+ {\def\@@sectiontype{#1}%
+ \def\@@sectieblok{#2}%
+ \def\@@sectieblokken{#3}}
+
+\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}%
+ \getvalue{\??sb#1}%
+ \expandafter\csname#2true\endcsname % vervangen door mode
+ \enablemode[\systemmodeprefix#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}
+
+% We used to use the first char as id, but a counter is
+% better, because in english we get a name clash.
+
+\newcounter\currentsectionblock
+
+\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
+ \doglobal\increment\currentsectionblock
+ \setevalue{\??sb#1}%
+ {\noexpand\dosetlocalsectieblok{\currentsectionblock}{#1}{#2}}%
+ \setvalue{\e!start#2}%
+ {\dostartsectieblok{#1}{#2}}%
+ \setvalue{\e!stop#2}%
+ {\dostopsectieblok}}
+
+\def\definieersectieblok%
+ {\dotripleargument\dodefinieersectieblok}
+
+\def\sectiebloklabel#1#2%
+ {\@EA\ifx\csname\??ko#1\@@sectieblok\c!label\endcsname\relax
+ \labeltexts{#1}{#2}%
+ \else
+ \labeltexts{\getvalue{\??ko#1\@@sectieblok\c!label}}{#2}%
+ \fi}
+
+\dosetlocalsectieblok{2}{\v!hoofdtekst}{\v!hoofdteksten} % hm, dirty
+
+\def\setsectiontype[#1]%
+ {\getvalue{\??sb#1}}
+
+\def\writesection#1#2#3% #3 -> \asciititle
+ {\bgroup
+ \edef\!!stringa{#1}%
+ \@EA\writestatus\@EA
+ {\!!stringa}
+ {\ifsectienummer#2\else(#2)\fi\normalspace\asciititle}%
+ \egroup}
+
+\def\@@koniveau{1} \def\kopniveau{\@@koniveau}
+
+\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\dohandelpaginaafX#1% zie doordefinieren / boven
+ {\bgroup
+ \!!countb=\@@koniveau
+ \advance\!!countb by #1
+ \multiply\!!countb by 500
+ \!!counta=20000
+ \advance\!!counta by \!!countb
+ \dosomebreak{\penalty\!!counta}%
+ \egroup}
+
+\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}
+% {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}%
+% \doifvaluesomething{\??ko#1\c!tolerantie}
+% {\ExpandFirstAfter\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}%
+% \def\\{\crlf\strut\ignorespaces}}
+
+\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels
+ {\forgetall
+ \doifvaluesomething{\??ko#1\c!uitlijnen}
+ {\expanded{\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}}%
+ \doifvaluesomething{\??ko#1\c!tolerantie}
+ {\expanded{\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}}%
+ \def\\{\crlf\strut\ignorespaces}}
+
+\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
+ \ifsomeheadconversion
+ \@@shortsectionnumber{\@@sectie}%
+ \else
+ \getvalue{\@@sectie\c!nummer}%
+ \fi
+ \fi}
+
+\def\dododosomekop#1#2#3#4%
+ {\iffourthargument
+ \def\next%
+ {\dodododosomekop{#1}[#2]{#1}{#3}{#4}}%
+ \else
+ \def\next%
+ {\dodododosomekop{#1}[#2]{#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]}
+
+\newif\ifsomeheadconversion
+
+\def\setsomeheadconversion#1#2%
+ {\someheadconversionfalse
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\def\someheadconversion{#2}}
+ {\bepaalkopnummer[#1]%
+ \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax
+ \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\relax
+ \def\someheadconversion{#2}%
+ \else
+ \@EA\ifx\csname\??se\@@sectie\c!kopconversie\endcsname\empty
+ \def\someheadconversion{#2}%
+ \else
+ \someheadconversiontrue
+ \def\someheadconversion%
+ {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\c!kopconversie}}{#2}}%
+ \fi
+ \fi
+ \else
+ \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\empty
+ \def\someheadconversion{#2}%
+ \else
+ \someheadconversiontrue
+ \def\someheadconversion%
+ {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}%
+ \fi
+ \fi}}
+
+\def\writtenfullsectionnumber{\string\fullsectionnumber}
+\def\ignoredfullsectionnumber#1#2#3{#3}
+\let\storedfullsectionnumber\relax
+\unexpanded\def\naturalfullsectionnumber#1#2#3{\sectiebloklabel{#1}{\getvalue{\??cv#2}{#3}}}
+\unexpanded\def\limitedfullsectionnumber#1#2#3{\getvalue{\??cv#2}{#3}}
+
+\def\setfullsectionnumber#1%
+ {\doifelsevalue{#1\c!kopconversie}{\v!ja}
+ {\doifelsevalue{#1\c!koplabel}{\v!ja}
+ {\let\fullsectionnumber\naturalfullsectionnumber}
+ {\let\fullsectionnumber\limitedfullsectionnumber}}
+ {\let\fullsectionnumber\ignoredfullsectionnumber}}
+
+%\let\fullsectionnumber\naturalfullsectionnumber
+\let\fullsectionnumber\limitedfullsectionnumber
+
+% \dodododosomekop IS NON GROUPED, SO WE NEED TO RESTORE !!!!
+%
+% dit kan dus beter \everyaroundhead zijn
+
+\def\dodododosomekop#1[#2]#3#4#5% % pas met \ExpandFirstAfter op bij twee||taligheid
+ {\flushingcolumnfloatsfalse % #3=#1=redundant
+ \someheadconversionfalse
+% \let\fullsectionnumber\naturalfullsectionnumber
+\let\fullsectionnumber\limitedfullsectionnumber
+ \setsectieenkoppeling{#1}%
+ \doifelsevalue{\??ko#1\c!prefix}{}
+ {\kopprefixfalse}
+ {\kopprefixtrue}%
+ \ifkopprefix
+ \doifelsevalue{\??ko#1\c!prefix}{+}
+ {\doifelsenothing{#2}
+ {\def\localkopprefix{+}}
+ {\def\localkopprefix{#2}}} % eigenlijk alleen eerste
+ {\edef\localkoprefix{\getvalue{\??ko#1\c!prefix}}}%
+ \fi
+ \doifelsevalue{\??ko#1\c!plaatskop}{\v!ja}
+ {\plaatskoptrue}
+ {\plaatskopfalse}%
+ \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
+ \convertexpanded{\??ko#1}{#5}\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
+\setsomeheadconversion{#1}{#4}%
+\ifsomeheadconversion
+ \let\fullsectionnumber\naturalfullsectionnumber
+ \doplaatskopnummertekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+% \let\fullsectionnumber\storedfullsectionnumber
+ \let\fullsectionnumber\writtenfullsectionnumber
+ \rawreference{\s!sec}{#2}{{\someheadconversion}{\asciititle}}%
+ \resetsectionmarks[\@@sectie]%
+ \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \let\fullsectionnumber\writtenfullsectionnumber
+ \doschrijfnaarlijst{\@@koppeling}{\someheadconversion}{#5}{\v!kop}}%
+ {\someheadconversion}
+ {#5}
+ {\marking[#1]{#5}%
+ \let\fullsectionnumber\storedfullsectionnumber
+ \expanded{\marking[#1\v!nummer]{\someheadconversion}}}%
+ \let\fullsectionnumber\ignoredfullsectionnumber
+ \writesection{#1}{\someheadconversion}{#5}%
+\else
+ \doplaatskopnummertekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+ \rawreference{\s!sec}{#2}{{#4}{\asciititle}}%
+ \resetsectionmarks[\@@sectie]%
+ \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}}
+ {\sectiebloklabel{#3}{#4}}
+ {#5}
+ {\marking[#1]{#5}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja} % rommelig omdat
+ {\edef\finalsectionnumber{#4}} % #4 al is toegekend
+ {\bepaalkopnummer[#1]}% migreert naar 3e argument
+ \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
+ \writesection{#1}{#4}{#5}%
+ \fi
+ \else
+ \doplaatskoptekst
+ {#1}
+ {\setsectionlistreference{\@@sectie}{#1}%
+ \ExpandFirstAfter\soortpagina[\@@koppeling]%
+ \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}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\edef\finalsectionnumber{#4}}
+ {\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}%
+ \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
+ {\edef\finalsectionnumber{#4}}
+ {\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}{\asciititle}}%
+ \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}%
+ \writesection{#1}{#4}{#5}%
+ \else
+ \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}
+ {\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
+ \someheadconversionfalse
+% \let\fullsectionnumber\naturalfullsectionnumber
+\let\fullsectionnumber\limitedfullsectionnumber
+ \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%
+ {\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
+ \else
+ \stelspatieringin
+ \fi
+ #2%
+ \getvalue{\??ko#1\c!voorcommando}%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#3\endstrut
+ \xdef\localheaddepth{\the\dp\strutbox}%
+ \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
+ \else
+ \stelspatieringin
+ \fi
+ #2%
+ \getvalue{\??ko#1\c!tekstcommando}%
+ {\ifdisplaysectionhead
+ \setstrut\begstrut#4\endstrut
+ \xdef\localheaddepth{\the\dp\strutbox}%
+ \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
+ \gdef\localheaddepth{\dp\strutbox}%
+ \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
+ \setupinteraction
+ [\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
+ \ifautocrossdocument
+ \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
+ \else
+ \hbox{\box0}%
+ \fi
+ \else
+ \hbox{\box0}%
+ \fi
+ \doflushfootnotes}% new
+ \endgraf
+ \nointerlineskip
+ \dosomebreak\nobreak
+ #2%
+ \else
+ \strut
+ \doflushfootnotes % new
+ \iflocation
+ \ifautocrossdocument
+ \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
+ \else
+ \unhbox0
+ \global\let\headlastlinewidth\!!zeropoint
+ \fi
+ #2%
+ \dimen0=\numberheaddistance
+ \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
+ \hskip\headsignal\ignorespaces
+ \fi
+ \ifdisplaysectionhead
+ \ifgridsnapping % important, font related depth, see comment
+ \prevdepth\dp\strutbox
+ \else
+ \prevdepth\localheaddepth
+ \fi
+ \fi
+ \stopsynchronisatie
+ \egroup
+ \egroup
+ \doflushfootnotes % new, still needed?
+ \ifdisplaysectionhead
+ \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
+ \else
+ \nonoindentation % recently added, was a bug
+ \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\complexkopnummer[#1]%
+ {\bgroup
+ \edef\huidigekopnummer{#1}%
+ \doifinsetelse{-}{#1}
+ {\removefromcommalist{-}\huidigekopnummer
+ \setsectieenkoppeling\huidigekopnummer
+ \stelsectiein[\@@sectie][\c!vorigenummer=\v!nee]}%
+ {\setsectieenkoppeling\huidigekopnummer}%
+ \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
+ \doifnot{\huidigekopnummer}{0}{\finalsectionnumber}%
+ \egroup}
+
+\def\simplekopnummer%
+ {\huidigekopnummer}
+
+\definecomplexorsimple\kopnummer
+
+\def\alinea%
+ {\par}
+
+\def\plaatskopalinea#1#2%
+ {\vbox
+ {\localkopsetup
+ \begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}}
+
+\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 % no stretch in distance
+ \doifsomething{#1}{{#1}\kern\numberheaddistance}{\begstrut#2}%
+ \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!tolerantie=,
+ \c!file=,
+ \c!expansie=,
+ #2]%
+ \ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}}
+ {\doifsomething{\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!tolerantie,\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}]}}%
+% \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]}}
+ {\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!tolerantie,\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,
+ \v!alinea=>\def\@@plaatskop{\plaatskopalinea},
+ \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}
+
+\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]
+ \c!default=\v!sub\v!paragraaf] % nieuw
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-6,
+ %\c!default=\v!paragraaf]
+ \c!default=\v!sub\v!sub\v!paragraaf] % nieuw
+
+\definieerkop
+ [\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
+ [\c!sectie=\v!sectionlevel-7,
+ %\c!default=\v!paragraaf]
+ \c!default=\v!sub\v!sub\v!sub\v!paragraaf] % nieuw
+
+\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]
+
+\stelkopin % nieuw
+ [\v!sub\v!paragraaf]
+ [\c!pagina=]
+
+\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]
+
+\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]
+
+% hm
+
+\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=]
+
+\protect \endinput
diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex
new file mode 100644
index 000000000..ad19dc973
--- /dev/null
+++ b/tex/context/base/core-syn.tex
@@ -0,0 +1,395 @@
+%D \module
+%D [ file=core-syn,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Synonyms and Sorts,
+%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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Synonyms and Sorts}
+
+\unprotect
+
+% 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}{}{\unknown}{#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}}} % 3 argumenten
+ {\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
+ \convertexpanded{\??sm#1}{#3}\asciisynonym
+ \convertexpanded{\??sm#1}{#4}\asciimeaning
+ \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {\asciimeaning}}%
+ \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}
+
+% 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}} % 1 argument
+ {\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
+ \convertexpanded{\??so#1}{#3}\asciisynonym
+ \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {}}%
+ \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}}
+%
+% Better because it catches nested logo's:
+
+\def\executesort#1#2#3%
+ {\bgroup
+ \def\executesort##1##2##3{##3}% Trick needed for nested logo's.
+ \preexecutesort{#1}{#2}{#3}%
+ \processsort{#1}{#3}{#2}%
+ \egroup}
+
+\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}
+
+\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]
+
+\protect \endinput
diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex
index a8370143d..b216cf448 100644
--- a/tex/context/base/core-tab.tex
+++ b/tex/context/base/core-tab.tex
@@ -90,15 +90,13 @@
\newif\ifsplittables
%D \macros
-%D {iftracetables}
+%D {tracetablestrue}
%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
+\newif\iftracetables
%D We show this feature in an eample that also shows some of
%D the basic table typesetting commands.
@@ -367,8 +365,10 @@
\newif\ifForgetTableBarAndQuote \ForgetTableBarAndQuotetrue
\bgroup
+
\catcode`\|=\@@active
\catcode`\"=\@@active
+
\gdef\pushouterbarandquote%
{\ifForgetTableBarAndQuote
\ifnum\catcode`\|=\@@active \else
@@ -382,6 +382,7 @@
\fi
\let\outertablequote="%
\fi}
+
\gdef\popouterbarandquote%
{\ifForgetTableBarAndQuote
\let|=\outertablebar
@@ -389,11 +390,13 @@
\else
\redefinetablebarandquote
\fi}
+
\gdef\ObeyTableBarAndQuote%
{\ForgetTableBarAndQuotefalse
\ifintable
\redefinetablebarandquote
\fi}
+
\egroup
%D \macros
@@ -475,11 +478,11 @@
\def\BeginTableParBox#1%
{\setbox\scratchbox=\vtop\bgroup % \setbox added
- \hsize=#1
+ \hsize=#1\relax
\normalbaselines
\let~=\!ttTie
\let\-=\!ttDH
- \blanko[\v!blokkeer] % added
+ \blanko[\v!blokkeer]% % added
\the\EveryTableParBox}
\def\EndTableParBox%
@@ -764,7 +767,7 @@
####%
\noexpand\hfil
\noexpand\stopglobalTABLEcolor % added
- \the\!taRuleColumnTemplate}
+ \the\!taRuleColumnTemplate}%
\!tfAdjoinPriorColumn}
\def\!ttShortHruleA%
@@ -859,8 +862,8 @@
\def\stoptabel%
{\TABLEtail
- \global\let\TABLEhead\empty
- \global\let\TABLEtail\empty
+ \global\let\@@TABLEhead\empty
+ \global\let\@@TABLEtail\empty
\finishTABLE
\ifinsidefloat\else
\stopbaselinecorrection % \outer..
@@ -909,12 +912,14 @@
% \catcode`\|=\@@other
% \dodoubleargument\dodefinetabletemplate}
+\def\douseTABLEtemplate#1#2#3%
+ {\gdef\TABLEhead{\getvalue{@@TABLEhead#2}}%
+ \gdef\TABLEtail{\getvalue{@@TABLEtail#3}}%
+ \complexsecondstagestartTABLE[#1]}
+
\def\dodefinetabletemplate[#1][#2][#3][#4]%
{\ifsecondargument
- \setgvalue{\c!Table#1}%
- {\gdef\TABLEhead{\getvalue{@@TABLEhead#3}}%
- \gdef\TABLEtail{\getvalue{@@TABLEtail#4}}%
- \complexsecondstagestartTABLE[#2]}%
+ \setgvalue{\c!Table#1}{\douseTABLEtemplate{#2}{#3}{#4}}%
\fi
\egroup}
@@ -1125,22 +1130,6 @@
%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}
@@ -1157,12 +1146,6 @@
{\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.
@@ -1369,7 +1352,8 @@
\chardef\TABLErowzero=0
\def\checkTABLErow#1% pure for message purposes
- {\ifTABLEgraydone
+ {\unskip % added
+ \ifTABLEgraydone
\convertargument #1\to\asciiA
\convertcommand\TABLEendBCL\to\asciiB
\ifx\asciiA\asciiB \else
@@ -1729,7 +1713,10 @@
{\ifnum\currentTABLEcolumn>\maxTABLEcolumn
\chuckTABLEautorow
\else\ifnum\currentTABLEcolumn=0
- \chuckTABLEautorow
+ %\chuckTABLEautorow
+ \TABLEnoalign
+ {\global\let\checkTABLEautorow=\empty
+ \global\let\chuckTABLEautorow=\empty}%
\else
\setTABLEerror\TABLEmissingcolumn
\handleTABLEerror
@@ -2278,12 +2265,13 @@
\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\SPAN##1{\use{##1}}%
+ \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
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index a1ec0887b..db534fca7 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -49,9 +49,11 @@
% j i<n> skip right of column
% k i<n> skip around column
-% Still to be done
+% g g{char} align at char
+% . align at .
+% , align at ,
-% nesting, push en pop gebruiken
+% Still to be done
% N math numbers (best hook into existing digits mechanism)
% n numbers (best hook into existing digits mechanism)
@@ -60,6 +62,8 @@
% ~ \hskip.5em
% | check
+% nesting
+
% 10 evt auto stack; dan wel andere signal dan void nodig
% present but not yet 100% ok
@@ -80,41 +84,82 @@
% 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
+% new:
+%
+% \starttabulate[|cg{.}|cg{,}|cg{,}|]
+% \NC period \NC comma \NC comma \NC\NR
+% \NG 100.000,00 \NG 100.000,00 \NG 100,00 \NC\NR
+% \NG 10.000,00 \NG 10.000,00 \NG 1000,00 \NC\NR
+% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
+% \NG 10 \NG 10 \NG 0,00 \NC\NR
+% \stoptabulate
+%
+% \starttabulate[|c.|c,|c,|]
+% \NC period \NC comma \NC comma \NC\NR
+% \NG 100.000,00 \NG 100.000,00 \NG 100,00 \NC\NR
+% \NG 10.000,00 \NG 10.000,00 \NG 1000,00 \NC\NR
+% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
+% \NG 10 \NG 10 \NG 0,00 \NC\NR
+% \stoptabulate
+
+\newtoks \tabulatepreamble
+\newtoks \tabulatebefore
+\newtoks \tabulateafter
+\newtoks \tabulatebmath
+\newtoks \tabulateemath
+\newtoks \tabulatefont
+\newtoks \tabulatesettings
+\newtoks \tabulatedummy
+
+\newcounter \nofautotabulate
+\newcounter \tabulatecolumns
+\newcounter \tabulateminplines
+\newcounter \tabulatemaxplines
+
+\newif \ifautotabulate
+\newif \ifsplittabulate \splittabulatetrue
+\newif \ifhandletabulatepbreak \handletabulatepbreaktrue
+\newif \iftabulateequal
+\newif \iftracetabulate
+
+\newdimen \tabulatepwidth
+\newdimen \tabulatewidth
+\newdimen \tabulateunit
+\newdimen \tabulatemaxpheight
+
+\newbox \tabulatebox
+
+\let\handletabulatecharalign\empty
\def\noftabcolumns{16} % quick and dirty stack
-\def\@@tabbox@@ {@@tabbox@}
-\def\@@tabhook@@{@@tabhook@}
+\def\@@tabbox@@ {@@tabbox@}
+\def\@@tabhook@@ {@@tabhook@}
+\def\@@tabalign@@{@@tabalign@}
\dorecurse\noftabcolumns
{\@EA\newbox\csname\@@tabbox@@\recurselevel\endcsname}
+\def\dotabulatenobreak%
+ {\noalign
+ {\nobreak
+ \iftracetabulate
+ \red\hrule\!!height.5\linewidth\!!depth.5\linewidth
+ \par
+ \kern-\linewidth
+ \nobreak
+ \fi}}
+
+\let\notabulatehook\empty
+
\def\checktabulatehook%
{\ifnum\tabulatetype<2
- \let\tabulatehook\relax
+ %\global\let\tabulatehook\relax
+ \global\let\tabulatehook\notabulatehook
\fi}
\def\dodosettabulatepreamble#1#2%
- {\ifdim\tabulatewidth=\!!zeropoint\relax
+ {\ifzeropt\tabulatewidth
\ifcase\tabulatemodus\relax
\let\preamblebox\empty
\else
@@ -126,34 +171,52 @@
\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
+ \fi
+ %
+ % less bytes
+ %
+ %\edef\preamblebox%
+ % {\ifcase\tabulatewidth
+ % \ifcase\tabulatemodus\relax\else\noexpand\autotabulatetrue\fi
+ % \els
+ % \ifcase\tabulatemodus\relax\hbox to\else\hsize\fi\the\tabulatewidth
+ % \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\endgraf\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
+ \@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
+ %
+ %\doifdefinedelse{\@@tabalign@@\tabulatecolumns}
+ % {\appendtoks\handletabulatecharalign## \to\!!toksa}
+ % {\appendtoks\tabulatehook ##\to \!!toksa}%
+ % waarom kan ik hier geen \xx{##} geven, om een of
+ % andere reden passeert dan tex de hele regel (incl \NC's)
+ % als argument; elke delimiter <> space gaat trouwens fout
+ \appendtoks \unskip\unskip\ifmmode\else\endgraf\fi\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\postabskip\pretabskip
\let\gettabulateexit\dogettabulateexit
\tabulatewidth\!!zeropoint}
@@ -162,57 +225,35 @@
\let\nextnext\relax
\else
\let\nextnext\settabulatepreamble
- \ifx x\next
- \chardef\tabulatealign=0
- \else\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
+ \ifx x\next \chardef\tabulatealign=0
+ \else\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\ifx g\next \let\nextnext\gettabulatealign
+ \else\ifx .\next \def\nextnext{\gettabulatealign.}%
+ \else\ifx ,\next \def\nextnext{\gettabulatealign,}%
+ \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\fi\fi \fi
\fi
\nextnext}
@@ -224,25 +265,25 @@
\def\gettabulatepreskip#1%
{\doifnumberelse{#1}
- {\dimen0=#1\tabulateunit\let\next\empty}
- {\dimen0=.5\tabulateunit\def\next{#1}}%
- \edef\pretabskip{\the\dimen0}%
- \@EA\settabulatepreamble\next}
+ {\scratchdimen=#1\tabulateunit\let\next\empty}
+ {\scratchdimen=.5\tabulateunit\def\next{#1}}%
+ \edef\pretabskip{\the\scratchdimen}%
+ \@EA\settabulatepreamble\next}
\def\gettabulateposskip#1%
{\doifnumberelse{#1}
- {\dimen0=#1\tabulateunit\let\next\empty}
- {\dimen0=.5\tabulateunit\def\next{#1}}%
- \edef\postabskip{\the\dimen0}%
+ {\scratchdimen=#1\tabulateunit\let\next\empty}
+ {\scratchdimen=.5\tabulateunit\def\next{#1}}%
+ \edef\postabskip{\the\scratchdimen}%
\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}%
+ {\scratchdimen=#1\tabulateunit\let\next\empty}
+ {\scratchdimen=.5\tabulateunit\def\next{#1}}%
+ \edef\pretabskip{\the\scratchdimen}%
+ \let\postabskip\pretabskip
\let\gettabulateexit\settabulatepreamble
\@EA\settabulatepreamble\next}
@@ -250,6 +291,10 @@
{\setvalue{\@@tabhook@@\tabulatecolumns}{#1}%
\settabulatepreamble}
+\def\gettabulatealign#1%
+ {\setvalue{\@@tabalign@@\tabulatecolumns}{#1}%
+ \settabulatepreamble}
+
\def\gettabulatebefore#1%
{\tabulatebefore{#1}%
\settabulatepreamble}
@@ -306,12 +351,12 @@
{\chardef\tabulatealign=\@@tabulatealign
\chardef\tabulatemodus=0
\chardef\tabulatedimen=0
- \tabulatebefore{}%
- \tabulateafter{}%
- \tabulatebmath{}%
- \tabulateemath{}%
- \tabulatefont{}%
- \tabulatesettings{}%
+ \tabulatebefore \emptytoks
+ \tabulateafter \emptytoks
+ \tabulatebmath \emptytoks
+ \tabulateemath \emptytoks
+ \tabulatefont \emptytoks
+ \tabulatesettings\emptytoks
\doglobal\increment\tabulatecolumns
\settabulatepreamble#1\relax\relax % permits i without n
\ifcase\tabulatemodus\relax
@@ -342,10 +387,11 @@
\fi}
\def\splitofftabulatebox%
- {\mindermeldingen
+ {\dontcomplain
\@EA\global\@EA\setbox\@EA\tabulatebox\@EA
\vsplit\csname\@@tabbox@@\tabulatecolumn\endcsname to \lineheight
- \setbox\tabulatebox=\vbox{\unvbox\tabulatebox}%
+ \setbox\tabulatebox=\vbox
+ {\unvbox\tabulatebox}%
\setbox\tabulatebox=\hbox to \wd\tabulatebox
{\hss\dotabulatehook{\box\tabulatebox}\hss}%
\ht\tabulatebox=\ht\strutbox
@@ -355,6 +401,59 @@
\def\dotabulatehook%
{\getvalue{\@@tabhook@@\tabulatecolumn}}
+\def\dotabulatealign%
+ {\getvalue{\@@tabalign@@\tabulatecolumn}}
+
+\def\resettabulatepheight%
+ {\xdef\tabulateminplines{1}%
+ \getnoflines\tabulatemaxpheight
+ \xdef\tabulatemaxplines{\the\noflines}%
+ \global\tabulatemaxpheight=\!!zeropoint}
+
+\def\settabulatepheight%
+ {\scratchdimen=\ht\csname\@@tabbox@@\tabulatecolumn\endcsname\relax
+ \ifdim\scratchdimen>\tabulatemaxpheight
+ \global\tabulatemaxpheight=\scratchdimen
+ \fi}
+
+\def\handletabulatepbreak%
+ {\TABLEnoalign
+ {\ifhandletabulatepbreak \ifnum\tabulatemaxplines>1
+ \ifnum\tabulateminplines=1
+ \dotabulatenobreak
+ \fi
+ \doglobal\increment\tabulateminplines
+ \ifnum\tabulateminplines=\tabulatemaxplines\relax
+ \dotabulatenobreak
+ \fi
+ \fi \fi}}
+
+%D \startbuffer
+%D \starttabulatie[|c|p|p|]
+%D \NC \bf Alpha \NC \bf Beta \NC \bf Gamma \NC\NR
+%D \NC 1 \NC right indeed \NC definitely wrong \NC\NR
+%D \NC 2 \NC \thinrules[n=3] \NC \thinrules[n=3] \NC\NR
+%D \NC 3 \NC oh yes \NC simply no \NC\NR
+%D \NC 4 \NC very true \NC as false as can be \NC\NR
+%D \NC 5 \NC \thinrules[n=5] \NC \thinrules[n=5] \NC\NR
+%D \NC 6 \NC \thinrules[n=3] \NC \thinrules[n=4] \NC\NR
+%D \stoptabulate
+%D \stopbuffer
+%D
+%D \typebuffer {\tracetabulatetrue\haalbuffer}
+%D
+%D \startbuffer
+%D \starttabulatie[|c|p|p|]
+%D \NC \bf Alpha \NC \bf Beta \NC \bf Gamma \NC\NR
+%D \NC 1 \NC right indeed \NC definitely wrong \NC\NR
+%D \NC 2 \NC oh yes \NC simply no \NC\NR
+%D \NC 3 \NC very true \NC as false as can be \NC\NR
+%D \NC 4 \NC the whole truth \NC but the truth \NC\NR
+%D \stoptabulatie
+%D \stopbuffer
+%D
+%D \typebuffer {\tracetabulatetrue\haalbuffer}
+
% \definetabulate
% \redefinetabulate
% \starttabulate[preamble]
@@ -368,11 +467,11 @@
\doifundefined{\??tt#1::\c!eenheid}
{\copyparameters
[\??tt#1::][\??tt\e!tabulate::]%
- [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,
+ [\c!afstand,\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,
\c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]}%
\copyparameters
[\??tt#1::#2][\??tt#1::]%
- [\c!eenheid,\c!voor,\c!na,\c!binnen,\c!inspringen,
+ [\c!eenheid,\c!afstand,\c!voor,\c!na,\c!binnen,\c!inspringen,
\c!uitlijnen,\c!lijnkleur,\c!lijndikte,EQ]%
\setvalue{\e!start#1::#2}{\dofinalstarttabulate[#1][#2][#3]}%
\setvalue{\e!start#1}{\bgroup\dosubstarttabulate[#1]}%
@@ -402,6 +501,9 @@
\fi
\next}
+\newtoks\everytabulate
+\chardef\tabulatepass=0
+
\def\dofinalstarttabulate[#1][#2][#3]% identifier sub preamble
{\edef\currenttabulate{#1::#2}%
\ifinsidefloat \else
@@ -409,13 +511,15 @@
\getvalue{\??tt\currenttabulate\c!voor}%
\fi
\bgroup
+ \chardef\tabulatepass=1
+ \the\everytabulate
\getvalue{\??tt\currenttabulate\c!binnen}%
- \dimen0=\leftskip
- \advance\dimen0 by \hangindent
+ \scratchdimen=\leftskip
+ \advance\scratchdimen by \hangindent
\doifvalue{\??tt\currenttabulate\c!inspringen}{\v!ja}
- {\advance\dimen0 by \parindent}% \voorwit}%
- \edef\tabulateindent{\the\dimen0}%
- \!!toksb{}%
+ {\advance\scratchdimen by \parindent}% \voorwit
+ \edef\tabulateindent{\the\scratchdimen}%
+ \!!toksb\emptytoks
\def\dorepeat*##1##2%
{\dorecurse{##1}{\appendtoks##2\to\!!toksb}\do}%
\def\do%
@@ -499,7 +603,8 @@
\newif\iftolerantTABLEbreak
-%D
+%D The main processing macro is large but splitting it up
+%D would make things less clear.
\def\processtabulate[|#1|]% in the process of optimizing
{\tabulateunit=\getvalue{\??tt\currenttabulate\c!eenheid}%
@@ -511,8 +616,7 @@
\s!default=>\def\@@tabulatealign{0},
\s!unknown=>\def\@@tabulatealign{0}]%
\dorecurse\noftabcolumns % NEW
- {\@EA\global\@EA\setbox\csname\@@tabbox@@\recurselevel\endcsname
- =\box\voidb@x}%
+ {\global\setbox\csname\@@tabbox@@\recurselevel\endcsname=\box\voidb@x}%
\let\pretabskip\!!zeropoint
\def\postabskip{.5\tabulateunit}%
\doglobal\newcounter\tabulatecolumns
@@ -522,21 +626,28 @@
\let\minusnoftabulatelines\noftabulatelines
\global\tabulatepwidth=\!!zeropoint
\global\tabulateequalfalse
+ \resettabulatepheight
\def\NC{\tabulatenormalcolumn0}%
\def\RC{\tabulatenormalcolumn1}%
\def\HC{\tabulatenormalcolumn2}%
\def\EQ{\tabulateequalcolumn 0}%
\def\RQ{\tabulateequalcolumn 1}%
\def\HQ{\tabulateequalcolumn 2}%
+ \def\NG{\NC\handletabulatecharalign}%
\def\NR% next row
{\doglobal\increment\noftabulatelines
\global\tabulateequalfalse
\xdef\tabulatecolumn{0}%
+ \resettabulatepheight
\unskip\unskip\crcr\flushtabulated
\TABLEnoalign
{\iftolerantTABLEbreak\else
- \ifnum\noftabulatelines=1 \noalign{\nobreak}%
- \else\ifnum\noftabulatelines=\minusnoftabulatelines\noalign{\nobreak}%
+ \ifnum\noftabulatelines=1
+ \dotabulatenobreak
+ \else\ifnum\noftabulatelines=\minusnoftabulatelines
+ \ifnum\tabulatemaxplines<2
+ \dotabulatenobreak
+ \fi
\fi\fi
\fi}}%
\let\HL\empty \let\SR\NR \let\AR\NR
@@ -553,9 +664,10 @@
\appendtoks\doglobal\increment\tabulatecolumn\to\!!toksa
\appendtoks\NC\unskip\unskip\crcr\flushtabulated\to\tabulatedummy % no count
\xdef\tabulatecolumn{0}%
+ \resettabulatepheight
\def\bskip%
{\setbox\tabulatebox=\vbox\bgroup
- \global\let\tabulatehook\empty}%
+ \global\let\tabulatehook\notabulatehook}%
\def\eskip
{\par\egroup
\global\let\tabulatehook\dotabulatehook}%
@@ -568,7 +680,7 @@
\else
\setlocalhsize \hsize=\localhsize
\fi
- \mindermeldingen
+ \dontcomplain
\forgetall
\setbox0=\vbox % outside if because of line counting
{\footnotesenabledfalse
@@ -586,34 +698,36 @@
\splittopskip\ht\strutbox
\global\let\flushtabulatedindeed\empty
\long\def\bbskip%
- {\@EA\ifvoid\csname\@@tabbox@@\tabulatecolumn\endcsname
+ {\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
+ {\ifvoid\csname\@@tabbox@@\tabulatecolumn\endcsname
+ \global\setbox\csname\@@tabbox@@\tabulatecolumn\endcsname=\vbox
\bgroup
- \global\let\tabulatehook\empty
+ \global\let\tabulatehook\notabulatehook
\ifautotabulate\hsize\tabulatewidth\fi
%\begstrut % interferes with pre-\pars
\ignorespaces
\def\eskip%
{\par\egroup
+ \settabulatepheight
\global\let\tabulatehook\dotabulatehook
\splitofftabulatebox}%
\else
\let\eskip\empty
- \mindermeldingen
+ \dontcomplain
\global\let\tabulatehook\dotabulatehook
\expandafter\splitofftabulatebox
\fi}%
\gdef\flushtabulated%
- {\noalign % no interference !
+ {\TABLEnoalign % noalign % no interference !
{\global\let\flushtabulatedindeed\empty
+ \handletabulatepbreak
\dorecurse\noftabcolumns
- {\@EA\ifvoid\csname\@@tabbox@@\recurselevel\endcsname\else
+ {\ifvoid\csname\@@tabbox@@\recurselevel\endcsname\else
\gdef\flushtabulatedindeed{\the\tabulatedummy}%
\fi}}%
\flushtabulatedindeed}%
@@ -644,14 +758,14 @@
\baselinecorrection}%
\def\FL{\TABLEnoalign
{\ifinsidefloat\else
- \doifemptyvalue{\??tt\currenttabulate\c!voor\endcsname} % no expansion
+ \doifemptyvalue{\??tt\currenttabulate\c!voor} % no expansion
{\tablebaselinecorrection}%
\fi
\tabulaterule
- \nobreak
+ \dotabulatenobreak
\tabulateruleseperator
\prevdepth\dp\strutbox
- \nobreak}}%
+ \dotabulatenobreak}}%
\def\ML{\TABLEnoalign
{\tabulateruleseperator
\tabulaterule
@@ -661,16 +775,17 @@
\fi\fi
\tabulateruleseperator}}%
\def\LL{\TABLEnoalign
- {\nobreak
+ {\dotabulatenobreak
\tabulateruleseperator
- \nobreak
+ \dotabulatenobreak
\tabulaterule
\ifinsidefloat\else
- \doifemptyvalue{\??tt\currenttabulate\c!na\endcsname} % no expansion
+ \doifemptyvalue{\??tt\currenttabulate\c!na} % no expansion
{\vskip\dp\strutbox
\vbox{\strut}
\vskip-\lineheight}%
\fi}}%
+ \chardef\tabulatepass=2
\@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}%
\prevdepth\dp\strutbox % nog eens beter, temporary hack
\egroup
diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex
new file mode 100644
index 000000000..721ca9e69
--- /dev/null
+++ b/tex/context/base/core-uti.tex
@@ -0,0 +1,368 @@
+%D \module
+%D [ file=core-uti,
+%D version=1997.03.31,
+%D title=\CONTEXT\ Core Macros,
+%D subtitle=Utility File 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. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{Context Core Macros / Utility File Handling}
+
+\unprotect
+
+% 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}
+
+% no longer needed, since texutil is now multi platform
+%
+% \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}
+% {}}}
+
+\def\checkutilityfile%
+ {}
+
+\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}
+
+% Saving the sort vector:
+
+\def\savesortkeys%
+ {\setbox\scratchbox=\hbox
+ \bgroup
+ \def\flushsortkey##1##2##3##4%
+ {\convertargument{##1}{##2}{##3}{##4}\to\ascii
+ \immediatewriteutility{k {\currentlanguage}{\currentencoding}\ascii}}%
+ \let\definesortkey\flushsortkey
+ \flushsortkeys
+ \egroup
+ \global\let\savesortkeys\relax}
+
+\prependtoks \savesortkeys \to \everystarttext
+
+% 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
+%
+% also:
+%
+% \definerawpasslist{\s!xxx}
+% \moverawpasslist\s!xxx\to\somemacro
+
+\let\alltwopasslists\empty % with 0,0 -> stepwise commalist
+\let\allrawpasslists\empty % without 0,0 -> raw commalist
+
+\newif\iftwopassdatafound
+
+\def\twopassentry#1%
+ {\executeifdefined{@@#1\s!pass}\gobbletwoarguments}
+
+\def\appendtwopasselement#1#2#3%
+ {%\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}%
+ \@EA\ifx\csname#1:\s!list\endcsname\empty
+ \setxvalue{#1:\s!list}{#3}%
+ \else
+ \setxvalue{#1:\s!list}{\getvalue{#1:\s!list},#3}%
+ \fi}
+
+\def\dodefinetwopasslist#1%
+ {\doifundefined{#1:\s!list}
+ {%\debuggerinfo{\m!systems}{defining twopass class #1}%
+ \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}}%
+ \doglobal\addtocommalist{#1}\alltwopasslists}
+
+\def\definerawpasslist#1%
+ {\expanded{\dodefinetwopasslist{#1}}%
+ \doglobal\addtocommalist{#1}\allrawpasslists}
+
+\def\doloadtwopassdata#1%
+ {\doifundefined{#1:\s!list}
+ {\global\letvalue{#1:\s!list}\empty
+ \doutilities{#1\s!pass}{\jobname}{}{}{}%
+ \ifx\twopassdata\empty\else
+ \appendtwopasselement{#1}{0}\twopassdata
+ \fi}}
+
+\def\loadtwopassdata%
+ {\ifx\alltwopasslists\empty\else
+ \def\twopassdata{0,0}% end condition
+ \processcommacommand[\alltwopasslists]\doloadtwopassdata
+ \global\let\alltwopassdata\empty
+ \fi
+ \ifx\allrawpasslists\empty\else
+ \let\twopassdata\empty
+ \processcommacommand[\allrawpasslists]\doloadtwopassdata
+ \global\let\allrawpassdata\empty
+ \fi}
+
+\def\moverawpasslist#1#2% erases the old one, like the others do
+ {\loadtwopassdata
+ \@EA\let\@EA#2\csname#1:\s!list\endcsname
+ \@EA\let\csname#1:\s!list\endcsname\empty}
+
+\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}}
+
+% Default-instellingen (verborgen)
+
+\prependtoks \resetutilities \to \everyjob
+
+\protect \endinput
diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex
index d42f57784..2b17ef1c5 100644
--- a/tex/context/base/core-var.tex
+++ b/tex/context/base/core-var.tex
@@ -15,15 +15,31 @@
\unprotect
+%D \macros
+%D {every...}
+%D
+%D A few every's.
+
\newevery \everyshipout \relax
\newevery \everybeforeshipout \relax
\newevery \everyaftershipout \relax
\newevery \everylastshipout \relax
\newevery \everybye \relax
+\newevery \everygoodbye \relax
\newevery \everystarttext \relax
\newevery \everystoptext \relax
\newevery \everypagebody \relax
+%D \macros
+%D {ifproductionrun}
+%D
+%D This boolean can be used to bypass certain
+%D initializations.
+
+\newif\ifproductionrun
+
+\appendtoks \productionruntrue \to \everydump
+
%D \macros
%D {fastmode}
%D
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index 5b2e0a8c3..e85f23c7a 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -486,9 +486,9 @@
\def\initializetyping#1%
{\donefalse
\scratchskip=\getvalue{\??tp#1\c!onevenmarge}\relax
- \ifdim\scratchskip=\!!zeropoint\relax\else\donetrue\fi
+ \ifzeropt\scratchskip\else\donetrue\fi
\scratchskip=\getvalue{\??tp#1\c!evenmarge}\relax
- \ifdim\scratchskip=\!!zeropoint\relax\else\donetrue\fi
+ \ifzeropt\scratchskip\else\donetrue\fi
\ifdone
\def\doopenupverbatimline%
{\getpagestatus
@@ -804,7 +804,7 @@
\def\typefile#1%
{\getvalue{\??tp\v!file\c!voor}%
- \doiffileelse{#1}
+ \doiflocfileelse{\pathplusfile\f!currentpath{#1}}
{\startopelkaar % includes \bgroup
\startcolor[\getvalue{\??tp\v!file\c!kleur}]%
\doifinset{\getvalue{\??tp\v!file\c!optie}}{\v!commandos,\v!schuin,\v!normaal}
@@ -813,7 +813,7 @@
{\expandafter\aftersplitstring#1\at.\to\prettyidentifier
\letvalue{\??tp\v!file\c!optie}=\prettyidentifier}%
\initializetyping\v!file
- \processfileverbatim{#1}%
+ \processfileverbatim{\pathplusfile\f!currentpath{#1}}%
\stopcolor
\stopopelkaar} % includes \egroup
{{\tttf[\makemessage{\m!verbatims}{1}{#1}]}%
diff --git a/tex/context/base/core-vis.tex b/tex/context/base/core-vis.tex
index d39482ee6..5c76ad84f 100644
--- a/tex/context/base/core-vis.tex
+++ b/tex/context/base/core-vis.tex
@@ -651,9 +651,9 @@
\fi}
\def\pushwhatsit%
- {\ifdim\lastskip=\!!zeropoint
- \ifnum\lastpenalty=0
- \ifnum\lastkern=0
+ {\ifzeropt\lastskip
+ \ifcase\lastpenalty
+ \ifzeropt\lastkern
\ifhmode
\let\popwhatsit\relax
\else
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 55ffd06e9..79bb55d67 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -130,7 +130,7 @@
\definecharacter oe 156
\definecharacter O 216
\definecharacter o 248
-\definecharacter ss 223
+\definecharacter sz 223
\definecharacter SS 223
\definecharacter aa 229
diff --git a/tex/context/base/enco-chi.tex b/tex/context/base/enco-chi.tex
index b5c5161c7..2e420a9f7 100644
--- a/tex/context/base/enco-chi.tex
+++ b/tex/context/base/enco-chi.tex
@@ -94,21 +94,37 @@
\defineuclass 2 162 88
\defineuclass 2 163 223
-\defineudigit 0 185 115
-\defineudigit 1 164 64
-\defineudigit 2 164 71
-\defineudigit 3 164 84
-\defineudigit 4 165 124
-\defineudigit 5 164 173
-\defineudigit 6 164 187
-\defineudigit 7 164 67
-\defineudigit 8 164 75
-\defineudigit 9 164 69
-\defineudigit 10 164 81
-\defineudigit 100 166 202
-\defineudigit 1000 164 100
-\defineudigit 10000 201 69
-\defineudigit 100000000 187 245
+\defineudigit 0 162 179
+\defineudigit 1 164 64
+\defineudigit 2 164 71
+\defineudigit 3 164 84
+\defineudigit 4 165 124
+\defineudigit 5 164 173
+\defineudigit 6 164 187
+\defineudigit 7 164 67
+\defineudigit 8 164 75
+\defineudigit 9 164 69
+\defineudigit 10 164 81
+\defineudigit 100 166 202
+\defineudigit 1000 164 100
+\defineudigit 10000 201 69
+\defineudigit 100000000 187 245
+
+\defineudigit 0* 185 115
+\defineudigit 1* 179 252
+\defineudigit 2* 182 76
+\defineudigit 3* 176 209
+\defineudigit 4* 184 118
+\defineudigit 5* 165 238
+\defineudigit 6* 179 176
+\defineudigit 7* 172 110
+\defineudigit 8* 174 195
+\defineudigit 9* 168 104
+\defineudigit 10* 172 66
+\defineudigit 100* 168 213
+\defineudigit 1000* 165 97
+\defineudigit 10000* 184 85
+\defineudigit 100000000* 187 245
\stopencoding
@@ -162,21 +178,37 @@
\defineuclass 2 163 221
\defineuclass 2 163 253
-\defineudigit 0 193 227
-\defineudigit 1 210 187
-\defineudigit 2 182 254
-\defineudigit 3 200 253
-\defineudigit 4 203 196
-\defineudigit 5 206 229
-\defineudigit 6 193 249
-\defineudigit 7 198 223
-\defineudigit 8 176 203
-\defineudigit 9 190 197
-\defineudigit 10 202 174
-\defineudigit 100 176 217
-\defineudigit 1000 199 167
-\defineudigit 10000 205 242
-\defineudigit 100000000 210 218
+\defineudigit 0 161 240
+\defineudigit 1 210 187
+\defineudigit 2 182 254
+\defineudigit 3 200 253
+\defineudigit 4 203 196
+\defineudigit 5 206 229
+\defineudigit 6 193 249
+\defineudigit 7 198 223
+\defineudigit 8 176 203
+\defineudigit 9 190 197
+\defineudigit 10 202 174
+\defineudigit 100 176 217
+\defineudigit 1000 199 167
+\defineudigit 10000 205 242
+\defineudigit 100000000 210 218
+
+\defineudigit 0* 193 227
+\defineudigit 1* 210 188
+\defineudigit 2* 183 161
+\defineudigit 3* 200 254
+\defineudigit 4* 203 193
+\defineudigit 5* 206 233
+\defineudigit 6* 194 189
+\defineudigit 7* 198 226
+\defineudigit 8* 176 198
+\defineudigit 9* 190 193
+\defineudigit 10* 202 176
+\defineudigit 100* 176 219
+\defineudigit 1000* 199 170
+\defineudigit 10000* 200 102
+\defineudigit 100000000* 210 218
\stopencoding
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
index 5a377e54b..611523885 100644
--- a/tex/context/base/enco-ec.tex
+++ b/tex/context/base/enco-ec.tex
@@ -173,8 +173,8 @@
\definecharacter OE 215
\definecharacter o 248
\definecharacter O 216
-\definecharacter ss 255
-\definecharacter SS 223
+\definecharacter sz 255 % was 223
+\definecharacter SS 255 % was 223
\definecharacter th 254
\definecharacter TH 222
diff --git a/tex/context/base/enco-ibm.tex b/tex/context/base/enco-ibm.tex
index 28d84d4fa..382c87795 100644
--- a/tex/context/base/enco-ibm.tex
+++ b/tex/context/base/enco-ibm.tex
@@ -50,7 +50,7 @@
\defineactivecharacter ¤ {\~n}
-\defineactivecharacter á {\SS}
+\defineactivecharacter á {\SS{}}
\defineactivecharacter ® {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
\defineactivecharacter ¯ {\prewordbreak\rightguillemot}
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index f2e6986ad..25767ea4f 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -104,9 +104,10 @@
\definecharacter ae 26 \definecharacter AE 29
\definecharacter oe 27 \definecharacter OE 30
\definecharacter o 28 \definecharacter O 31
-\definecharacter i 16
+\definecharacter i 16 \definecharacter sz 25
\definecharacter j 17 \definecharacter SS 25
+
%D Some rather \PLAIN\ \TEX\ redefinitions.
\defineaccentcommand b {\ilencodedb}
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 0ff61d384..874114eb9 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -167,7 +167,7 @@
%D This command is typically used in coding definitions,
%D like the \UNICODE\ one.
-\def\dodefineactivedecimal#1#2%
+\def\dodefineactivedecimal#1#2% \unexpanded ? pdfdoc encoding
{\catcode#1=\active % maybe \protectregimetrue
\scratchcounter=\the\uccode`~
\uccode`~=#1\relax
@@ -493,7 +493,7 @@
%D \stoptypen
%D
%D The first argument denotes the string to be treated. The
-%D second argument is the raw replacement, while the second
+%D second argument is the raw replacement, while the third
%D argument determines the sort order given the replacement.
%D The last argument is used as entry in the index (a, b, etc).
%D
@@ -817,6 +817,7 @@
%\appendtoks \def\i{I}\to \everyuppercase
%\appendtoks \def\j{J}\to \everyuppercase
+%\appendtoks \def\sz{sz}\to \everyuppercase % \sz <= \ss
%\appendtoks \def\SS{SS}\to \everyuppercase % \SS <= \ss
%
%\appendtoks \let\l=\L \to \everyuppercase
@@ -895,6 +896,11 @@
\unexpanded\def\udigit#1#2{\getvalue{@#1@uc\number#2}}
+%D Just to be sure, we save the original values of \type {\ss}.
+
+\ifx\undefined\SS \let\SS=\ss \fi
+\ifx\undefined\sz \let\sz=\ss \fi
+
%D Here come the definitions.
\redefineaccent ' % grave
@@ -920,7 +926,7 @@
\redefinecharacter OE % OE
\redefinecharacter o % oslash
\redefinecharacter O % Oslash
-\redefinecharacter ss % germandbls
+\redefinecharacter sz % germandbls
\redefinecharacter SS % germandbls
\redefinecharacter aa % aring
\redefinecharacter AA % Aring
@@ -944,12 +950,18 @@
\defineaccent ' i {\'\i} \defineaccent ' j {\'\j}
\defineaccent ~ i {\~\i} \defineaccent ~ j {\~\j}
+\redefinecharacter leftguillemot
+\redefinecharacter rightguillemot
+\redefinecharacter leftsubguillemot
+\redefinecharacter rightsubguillemot
+
%D Some more:
\startmapping[\s!default]
\defineuppercasecom \i {I}
\defineuppercasecom \j {J}
+\defineuppercasecom \sz {SS}
\defineuppercasecom \SS {SS}
\defineuppercasecom \l \L
\defineuppercasecom \ae \AE
diff --git a/tex/context/base/enco-lat.tex b/tex/context/base/enco-lat.tex
index 49f7485ea..a8e1525c1 100644
--- a/tex/context/base/enco-lat.tex
+++ b/tex/context/base/enco-lat.tex
@@ -24,8 +24,8 @@
\defineactivecharacter © {\v{S}}
\defineactivecharacter ¾ {\v{z}}
\defineactivecharacter ® {\v{Z}}
-\defineactivecharacter ð {\pseudoencodeddj}
-\defineactivecharacter Ð {\pseudoencodedDJ}
+\defineactivecharacter ð {\pseudoencodeddj{}}
+\defineactivecharacter Ð {\pseudoencodedDJ{}}
\stopregime
diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex
index 5b3729660..a4fbfdac2 100644
--- a/tex/context/base/enco-pdf.tex
+++ b/tex/context/base/enco-pdf.tex
@@ -94,7 +94,7 @@
\definecharacter OA ^^c5
\definecharacter oa ^^e5
\definecharacter oe ^^9c
-\definecharacter ss ^^df
+\definecharacter sz ^^df
\definecharacter SS ^^df
\definecharacter leftguillemot ^^ab
diff --git a/tex/context/base/enco-vis.tex b/tex/context/base/enco-vis.tex
index 38ac6b0af..77f18fdb2 100644
--- a/tex/context/base/enco-vis.tex
+++ b/tex/context/base/enco-vis.tex
@@ -96,7 +96,7 @@
\defineactivecharacter 206 {\~{I}}
\defineactivecharacter 207 {\`{y}}
-\defineactivecharacter 208 {\DJ}
+\defineactivecharacter 208 {\DJ{}}
\defineactivecharacter 209 {\'{hu}}
\defineactivecharacter 210 {\`{O}}
\defineactivecharacter 211 {\'{O}}
@@ -130,7 +130,7 @@
\defineactivecharacter 238 {\~{i}}
\defineactivecharacter 239 {\h{i}}
-\defineactivecharacter 240 {\dj}
+\defineactivecharacter 240 {\dj{}}
\defineactivecharacter 241 {\d{hu}}
\defineactivecharacter 242 {\`{o}}
\defineactivecharacter 243 {\'{o}}
diff --git a/tex/context/base/enco-win.tex b/tex/context/base/enco-win.tex
index 73140490c..e31fb311a 100644
--- a/tex/context/base/enco-win.tex
+++ b/tex/context/base/enco-win.tex
@@ -21,16 +21,16 @@
\defineactivecharacter  {\^A}
\defineactivecharacter à {\~A}
\defineactivecharacter Ä {\"A}
-\defineactivecharacter Å {\AA}
-\defineactivecharacter Æ {\AE}
+\defineactivecharacter Å {\AA{}}
+\defineactivecharacter Æ {\AE{}}
\defineactivecharacter à {\`a}
\defineactivecharacter á {\'a}
\defineactivecharacter â {\^a}
\defineactivecharacter ã {\~a}
\defineactivecharacter ä {\"a}
-\defineactivecharacter å {\aa}
-\defineactivecharacter æ {\ae}
+\defineactivecharacter å {\aa{}}
+\defineactivecharacter æ {\ae{}}
\defineactivecharacter Ç {\c C}
\defineactivecharacter ç {\c c}
@@ -63,20 +63,20 @@
\defineactivecharacter Ô {\^O}
\defineactivecharacter Õ {\~O}
\defineactivecharacter Ö {\"O}
-\defineactivecharacter Œ {\OE}
-\defineactivecharacter Ø {\O}
+\defineactivecharacter Œ {\OE{}}
+\defineactivecharacter Ø {\O{}}
\defineactivecharacter ò {\`o}
\defineactivecharacter ó {\'o}
\defineactivecharacter ô {\^o}
\defineactivecharacter õ {\~o}
\defineactivecharacter ö {\"o}
-\defineactivecharacter œ {\oe}
-\defineactivecharacter ø {\o}
+\defineactivecharacter œ {\oe{}}
+\defineactivecharacter ø {\o{}}
\defineactivecharacter Š {\v{S}}
\defineactivecharacter š {\v{s}}
-\defineactivecharacter ß {\SS}
+\defineactivecharacter ß {\SS{}}
\defineactivecharacter Ù {\`U}
\defineactivecharacter Ú {\'U}
@@ -94,26 +94,26 @@
\defineactivecharacter ¿ {?`}
\defineactivecharacter ¡ {!`}
-\defineactivecharacter † {\dag}
-\defineactivecharacter ‡ {\ddag}
-\defineactivecharacter ¶ {\P}
-\defineactivecharacter § {\S}
+\defineactivecharacter † {\dag{}}
+\defineactivecharacter ‡ {\ddag{}}
+\defineactivecharacter ¶ {\P{}}
+\defineactivecharacter § {\S{}}
\defineactivecharacter – {--}
\defineactivecharacter — {---}
-\defineactivecharacter … {\dots}
-\defineactivecharacter © {\copyright}
-\defineactivecharacter £ {\pounds}
-
-\defineactivecharacter „ {\char44\kern-.1em\char44}
-\defineactivecharacter “ {\char96\kern-.1em\char96}
-\defineactivecharacter ” {\char34}
-\defineactivecharacter ‘ {\upperleftsinglesixquote}
-\defineactivecharacter ’ {\char39}
-\defineactivecharacter › {\rightsubguillemot}
-\defineactivecharacter ‹ {\leftsubguillemot}
+\defineactivecharacter … {\dots{}}
+\defineactivecharacter © {\copyright{}}
+\defineactivecharacter £ {\pounds{}}
+
+\defineactivecharacter „ {\char44\kern-.1em\char44 }
+\defineactivecharacter “ {\char96\kern-.1em\char96 }
+\defineactivecharacter ” {\char34 }
+\defineactivecharacter ‘ {\upperleftsinglesixquote{}}
+\defineactivecharacter ’ {\char39 }
+\defineactivecharacter › {\rightsubguillemot{}}
+\defineactivecharacter ‹ {\leftsubguillemot{}}
\defineactivecharacter « {\ifvmode\leavevmode\fi\leftguillemot\prewordbreak}
-\defineactivecharacter » {\prewordbreak\rightguillemot}
+\defineactivecharacter » {\prewordbreak\rightguillemot{}}
\stopregime
diff --git a/tex/context/base/font-ber.tex b/tex/context/base/font-ber.tex
index f18bdd868..e748305bd 100644
--- a/tex/context/base/font-ber.tex
+++ b/tex/context/base/font-ber.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
\definefontsynonym [Baskerville] [mbvr8t] [encoding=ec]
\definefontsynonym [Baskerville-Italic] [mbvri8t] [encoding=ec]
@@ -18,37 +18,44 @@
\definefontsynonym [Baskerville-SemiBold] [mbvs8t] [encoding=ec]
\definefontsynonym [Baskerville-SemiBoldItalic] [mbvsi8t] [encoding=ec]
-\definefontsynonym [Courier] [pcrr8t] [encoding=ec]
-\definefontsynonym [Courier-Bold] [pcrb8t] [encoding=ec]
-\definefontsynonym [Courier-Oblique] [pcrro8t] [encoding=ec]
-\definefontsynonym [Courier-BoldOblique] [pcrbo8t] [encoding=ec]
+\definefontsynonym [Courier] [pcrr8t] [encoding=ec]
+\definefontsynonym [Courier-Bold] [pcrb8t] [encoding=ec]
+\definefontsynonym [Courier-Oblique] [pcrro8t] [encoding=ec]
+\definefontsynonym [Courier-BoldOblique] [pcrbo8t] [encoding=ec]
-\definefontsynonym [Helvetica] [phvr8t] [encoding=ec]
-\definefontsynonym [Helvetica-Oblique] [phvro8t] [encoding=ec]
-\definefontsynonym [Helvetica-Bold] [phvb8t] [encoding=ec]
-\definefontsynonym [Helvetica-BoldOblique] [phvbo8t] [encoding=ec]
+\definefontsynonym [Helvetica] [phvr8t] [encoding=ec]
+\definefontsynonym [Helvetica-Oblique] [phvro8t] [encoding=ec]
+\definefontsynonym [Helvetica-Bold] [phvb8t] [encoding=ec]
+\definefontsynonym [Helvetica-BoldOblique] [phvbo8t] [encoding=ec]
-\definefontsynonym [Times-Roman] [ptmr8t] [encoding=ec]
-\definefontsynonym [Times-Italic] [ptmri8t] [encoding=ec]
-\definefontsynonym [Times-Bold] [ptmb8t] [encoding=ec]
-\definefontsynonym [Times-BoldItalic] [ptmbi8t] [encoding=ec]
+\definefontsynonym [Times-Roman] [ptmr8t] [encoding=ec]
+\definefontsynonym [Times-Italic] [ptmri8t] [encoding=ec]
+\definefontsynonym [Times-Bold] [ptmb8t] [encoding=ec]
+\definefontsynonym [Times-BoldItalic] [ptmbi8t] [encoding=ec]
-\definefontsynonym [AntykwaTorunska-Regular] [zatr8t] [encoding=ec]
-\definefontsynonym [AntykwaTorunska-Italic] [zatri8t] [encoding=ec]
-\definefontsynonym [AntykwaTorunska-Bold] [zatb8t] [encoding=ec]
+\definefontsynonym [AntykwaTorunska-Regular] [zatr8t] [encoding=ec]
+\definefontsynonym [AntykwaTorunska-Italic] [zatri8t] [encoding=ec]
+\definefontsynonym [AntykwaTorunska-Bold] [zatb8t] [encoding=ec]
-\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]
+\definefontsynonym [Palatino-Roman] [uplr8r] [encoding=ec]
+\definefontsynonym [Palatino-Italic] [uplri8r] [encoding=ec]
+\definefontsynonym [Palatino-Slanted] [uplro8r] [encoding=ec]
+\definefontsynonym [Palatino-Bold] [uplb8r] [encoding=ec]
+\definefontsynonym [Palatino-BoldItalic] [uplbi8r] [encoding=ec]
+\definefontsynonym [Palatino-BoldSlanted] [uplbo8r] [encoding=ec]
+\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-chi.tex b/tex/context/base/font-chi.tex
index 25fafaa82..9c2d8d5ce 100644
--- a/tex/context/base/font-chi.tex
+++ b/tex/context/base/font-chi.tex
@@ -1,18 +1,3 @@
-% still to be implemented:
-%
-% - columns left right touch
-% - distance = (hsize-n*bodyfontsize)/(n-1)
-% - char grids
-% - char tables
-% - all kind of rotated combinations
-% - hanging puctuation
-% - a few more encodings
-% - rotation list
-%
-% currently under testing: big5
-%
-% misschien een andere suffix: tux of tuc
-
%D \module
%D [ file=font-chi,
%D version=1999.10.10,
@@ -29,6 +14,19 @@
\writestatus{loading}{Context Font Macros / Chinese}
+%D Still to be implemented:
+%D
+%D \startopsomming
+%D \som columns left right touch
+%D \som distance = (hsize-n*bodyfontsize)/(n-1)
+%D \som char grids
+%D \som char tables
+%D \som all kind of rotated combinations
+%D \som hanging puctuation
+%D \som a few more encodings
+%D \som rotation list
+%D \stopopsomming
+
%M \stelkorpsin[chi]
%M
%M \def\WangLei%
@@ -475,22 +473,22 @@
%D \def\DoIt #1 #2 %
%D {\hbox{\hbox to 2em{\uchar{#1}{#2}\hss}#1 #2}\par}
%D
-%D \startcolumns[n=5]
+%D \startkolommen[n=5]
%D \DoIt 161 162 \DoIt 161 163 \DoIt 161 164 \DoIt 161 167 \DoIt 161 173
%D \DoIt 161 175 \DoIt 161 177 \DoIt 161 179 \DoIt 161 181 \DoIt 161 183
%D \DoIt 161 185 \DoIt 161 187 \DoIt 161 189 \DoIt 161 191 \DoIt 161 227
%D \DoIt 161 228 \DoIt 161 229 \DoIt 163 161 \DoIt 163 162 \DoIt 163 167
%D \DoIt 163 169 \DoIt 163 172 \DoIt 163 174 \DoIt 163 186 \DoIt 163 187
%D \DoIt 163 190 \DoIt 163 191 \DoIt 163 221 \DoIt 163 253
-%D \stopcolumns
+%D \stopkolommen
%D
%D A linebreak is not permitted after the following glyphs:
%D
-%D \startcolumns[n=5]
+%D \startkolommen[n=5]
%D \DoIt 161 174 \DoIt 161 176 \DoIt 161 178 \DoIt 161 180 \DoIt 161 182
%D \DoIt 161 184 \DoIt 161 186 \DoIt 161 188 \DoIt 161 190 \DoIt 163 168
%D \DoIt 163 219 \DoIt 163 224 \DoIt 163 251
-%D \stopcolumns
+%D \stopkolommen
%D \macros
%D {tracechinesetrue, showchinesetracelegend}
@@ -504,7 +502,8 @@
\newif\iftracechinese
\def\showchinesetracelegend%
- {\starttabulate[|c|l|l|l|]
+ {\definetabulate[\s!dummy][|c|l|l|l|]%
+ \startdummy
\HL \NC \bf key \NC \bf meaning \NC \bf glyph \NC \bf keys \NC \NR \HL
\NC u \NC unknown character type \NC \color[green]{current} \NC u l r \NC\NR
\NC l \NC left boundary character \NC \color[red]{previous} \NC u l r c n \NC\NR
@@ -512,7 +511,7 @@
\NC c \NC chinese character \NC \NC \NC\NR
\NC s \NC following space \NC \NC \NC\NR
\NC n \NC no preceding space \NC \NC \NC\NR \HL
- \stoptabulate}
+ \stopdummy}
\def\tracedchineseglyph%
{\leavevmode
@@ -635,8 +634,24 @@
% \fi\fi\fi\fi\fi\fi}
% \stoptypen
+%D We use a dirty trick to enable Chinese Capital Digits. In
+%D the encoding vectors, we define these by appending a suffix
+%D \type {*} to the digit. For the moment this method works ok.
+%D With \type {\capstyle} one can switch to those capitalized
+%D digits.
+
+\def\enablechinesecapdigits%
+ {\def\chinesedigitsuffix{*}}
+
+\def\disablechinesecapdigits%
+ {\let\chinesedigitsuffix\empty}
+
+\disablechinesecapdigits
+
+\let\capstyle\enablechinesecapdigits
+
\def\chinesedigit#1%
- {\udigit{\chineseencoding}{\number#1}}
+ {\udigit{\chineseencoding}{\number#1\chinesedigitsuffix}}
\def\chinesenumber#1%
{\expandafter\dochinesenumber\number#1\relax}
@@ -718,11 +733,11 @@
\chinesedigit{100000000}%
\dododochinesenumber#3\relax}
-%D The next gtable demonstates the correctness of the
+%D The next table demonstates the correctness of the
%D conversion macro.
%D
-%D \starybuffer
-%D \starttable[|l|l|l|l|l|l|]
+%D \startbuffer
+%D \starttabel[|l|l|l|l|l|l|]
%D \HL
%D \NC number \NC converter \NC hard coded \NC
%D number \NC converter \NC hard coded\NC \SR
@@ -755,10 +770,10 @@
%D \NC 1111111111 \NC \chinesenumber{1111111111} \NC ʮһÒÚһǧһ°ÙһʮһÍòһǧһ°Ùһʮһ \NC
%D 1000000000 \NC \chinesenumber{1000000000} \NC Ê®ÒÚ \NC\LR
%D \HL
-%D \stoptable
+%D \stoptabel
%D \stopbuffer
%D
-%D \plaatstabel{Some Chinese number examples.}{\getbuffer}
+%D \plaatstabel{Some Chinese number examples.}{\haalbuffer}
%D Although the conversion can be hooked into most commands
%D that deal with numbers |<|those familiar with \TEX\ macro
@@ -806,6 +821,8 @@
%D trick is to move the encoding value from the current font
%D definition to the \type {\chineseencoding} macro.
+\let\chineseencoding\empty
+
\def\setchineseencoding% normally SomeChineseRegular
{\getfontfileparameters\unicodestyle
\ifx\currentfontfileencoding\undefined \else
@@ -887,38 +904,38 @@
%D Now it's time for some real Chinese. This example
%D also shows that font switching is supported.
%D
-%D \startnarrower
-%D \midalligned{\bfb Ë®µ÷¸èÍ·}
-%D \blank
-%D \midaligned{\sl ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£}
-%D \blank
-%D \midaligned{\bs ËÕéø}
-%D \blank
+%D \startsmaller
+%D \regelmidden{\tfd Ë®µ÷¸èÍ·}
+%D \blanko
+%D \regelmidden{\tfb ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£}
+%D \blanko
+%D \regelmidden{\tfb ËÕéø}
+%D \blanko
%D Ã÷Ô¼¸Ê±ÓУ¿°Ñ¾ÆÎÊÇàÌì¡£²»ÖªÌìÉϹ¬ãÚ£¬½ñϦÊǺÎÄꣿÎÒÓû³Ë·ç¹éÈ¥
%D £¬ÓÖ¿ÖÇíÂ¥ÓñÓ¸ß´¦²»Ê¤º®¡£ÆðÎèŪÇåÓ°£¬ºÎËÆÔÚÈ˼䣿
-%D \blank
+%D \blanko
%D תÖì¸ó£¬µÍ»§£¬ÕÕÎÞÃß¡£²»Ó¦Óкޣ¬ºÎÊÂÆ«Ïò±ðʱԲ£¿ÈËÓб¯»¶ÀëºÏ£¬
%D ÔÂÓÐÒõÇçԲȱ£¬´ËʹÅÄÑÈ«¡£µ«Ô¸È˳¤¾Ã£¬Ç§Àﹲ濾ꡣ
-%D \stopnarrower
+%D \stopsmaller
%D
%D The english translation is:
%D
-%D \startnarrower
-%D \midaligned{\slb Tune: Prelude to the Melody of Water}
-%D \blank
-%D \midaligned{\sl On the night of the Mid||Autumn Festival of
+%D \startsmaller
+%D \regelmidden{\tfd Tune: Prelude to the Melody of Water}
+%D \blanko
+%D \regelmidden{\tfb On the night of the Mid||Autumn Festival of
%D 1076, I drank happily till dawn and wrote this in my cups
%D while thinking of Zi||you.}
-%D \blank
-%D \midaligned{\bf Su Shi}
-%D \blank
+%D \blanko
+%D \regelmidden{\tfb Su Shi}
+%D \blanko
%D How long will the bright moon appear? Wine||cup in hand, I
%D ask the sky. I do not know waht time of year it would be
%D tonight in the palace on high. Riding the wind, there I
%D would fly, yet I fear the crystal palace would be far too
%D high and cold for me. I rise and dance, with my shadow I
%D play. On high as on earth, would it be as gay?
-%D \blank
+%D \blanko
%D The moon goes round the mansion red though gauze||draped
%D windows soft to shed her light upon the sleepless bed.
%D Against man she should have no spite. Why then when people
@@ -928,7 +945,7 @@
%D olden days. So let us wish that man will live long as he
%D can! Though miles apart, we'll share the beauty she
%D displays.
-%D \stopnarrower
+%D \stopsmaller
%D This package is written in the city of Hasselt, a pretty
%D small town in the |<|compare to China real small|>|
diff --git a/tex/context/base/font-cmr.tex b/tex/context/base/font-cmr.tex
index 8927b08f2..eccc2c1cb 100644
--- a/tex/context/base/font-cmr.tex
+++ b/tex/context/base/font-cmr.tex
@@ -52,7 +52,7 @@
\definefontsynonym [Fraktur] [eufm10]
\definefontsynonym [Gothic] [eufm10]
-\definefontsynonym [Caligraphic] [cmsy10]
+\definefontsynonym [Calligraphic] [cmsy10]
%D What follows next is the main definition part.
@@ -450,6 +450,10 @@
bfb=cmbx10 scaled \magstep2,
bfc=cmbx10 scaled \magstep3,
bfd=cmbx10 scaled \magstep4,
+ ita=cmti10 scaled \magstep1,
+ itb=cmti10 scaled \magstep2,
+ itc=cmti10 scaled \magstep3,
+ itd=cmti10 scaled \magstep4,
sla=cmsl10 scaled \magstep1,
slb=cmsl10 scaled \magstep2,
slc=cmsl10 scaled \magstep3,
diff --git a/tex/context/base/font-fil.tex b/tex/context/base/font-fil.tex
index 3a71f9529..9daebf9fc 100644
--- a/tex/context/base/font-fil.tex
+++ b/tex/context/base/font-fil.tex
@@ -11,105 +11,98 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\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 [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 [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 [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 [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 [Courier-Bold] [cob] [encoding=texnansi]
+\definefontsynonym [Courier-BoldOblique] [cobo] [encoding=texnansi]
-\definefontsynonym [Courier] [com] [encoding=texnansi]
-\definefontsynonym [Courier-Oblique] [coo] [encoding=texnansi]
-\definefontsynonym [Courier-Bold] [cob] [encoding=texnansi]
-\definefontsynonym [Courier-BoldOblique] [cobo] [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 [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 [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 [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 [AntykwaTorunska-Regular] [zatr8t]
-[encoding=ec]
-\definefontsynonym [AntykwaTorunska-Italic] [zatri8t]
-[encoding=ec]
-\definefontsynonym [AntykwaTorunska-Bold] [zatb8t]
-[encoding=ec]
+\definefontsynonym [AntykwaTorunska-Bold] [anttb] [encoding=texnansi]
+\definefontsynonym [AntykwaTorunska-Regular] [anttr] [encoding=texnansi]
+\definefontsynonym [AntykwaTorunska-Italic] [anttri] [encoding=texnansi]
-\definefontsynonym [ContextNavigation] [contnav]
+\definefontsynonym [ContextNavigation] [contnav]
-\definefontsynonym [RalfSmithFormalScript] [rsfs10]
+\definefontsynonym [RalfSmithFormalScript] [rsfs10]
\endinput
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index 61ee1b90b..258c60125 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -888,8 +888,15 @@
\def\definefont%
{\dodoubleargument\dodefinefont}
+% \def\dodefinefont[#1][#2]%
+% {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}}
+%
+% A more friendly version, which defaults to \type {sa 1} is:
+
\def\dodefinefont[#1][#2]%
- {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}}
+ {\doifinstringelse{ }{#2}
+ {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}}
+ {\dodefinefont[#1][#2 sa 1]}}
\def\dododefinefont#1#2sa #3sa#4*%
{\edef\fontscale{#3}%
@@ -986,7 +993,7 @@
\endTEX
-\beginETEX
+\beginETEX \ifcsname
\def\currentfontscale%
{\ifcsname\??ft\s!default\xfontsize\endcsname
@@ -2198,22 +2205,22 @@
%D On behalf of {\frac Tobias Burnus}, we define some more of
%D these:
-\definefont [frak] [Fraktur sa \currentfontscale]
-\definefont [goth] [Gothic sa \currentfontscale]
-\definefont [cal] [Caligraphic sa \currentfontscale]
+\definefont [frak] [Fraktur sa \currentfontscale]
+\definefont [goth] [Gothic sa \currentfontscale]
+\definefont [cal] [Calligraphic sa \currentfontscale]
-\definefontsynonym [Fraktur] [Serif]
-\definefontsynonym [Gothic] [Serif]
-\definefontsynonym [Caligraphic] [Serif]
+\definefontsynonym [Fraktur] [Serif]
+\definefontsynonym [Gothic] [Serif]
+\definefontsynonym [Calligraphic] [Serif]
%D \macros
-%D {fraktur, gothic, caligraphic}
+%D {fraktur, gothic, calligraphic}
%D
%D For Tobias and friends:
-\def\fraktur #1{\ifmmode\hbox\fi{\frak#1}}
-\def\gothic #1{\ifmmode\hbox\fi{\goth#1}}
-\def\caligraphic#1{\ifmmode\hbox\fi{\cal #1}}
+\def\fraktur #1{\ifmmode\hbox\fi{\frak#1}}
+\def\gothic #1{\ifmmode\hbox\fi{\goth#1}}
+\def\calligraphic#1{\ifmmode\hbox\fi{\cal #1}}
%D In \type {font-cmr} we will link these to real file names.
@@ -2249,7 +2256,7 @@
%D system calls and are defined by the bodyfontenvironment.
\def\setsmallbodyfont%
- {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\v!klein}]%
+ {\doswitchpoints[\getvalue{\??ft\normalizedbodyfontsize\interfaced\v!klein}]%
\doswitchstyle[\fontstyle]}
\def\setmainbodyfont%
@@ -2462,7 +2469,8 @@
\newconditional\emneeded
\unexpanded\def\em%
- {\ifdim\fontdimen1\font>\!!zeropoint\relax
+ {\relax
+ \ifdim\fontdimen1\font>\!!zeropoint\relax
\settrue\emneeded
\else
\setfalse\emneeded
@@ -2494,7 +2502,8 @@
{\let\normalbf\bf
\let\setemphasisboldface\relax
\def\bf%
- {\ifnum\fam=\itfam
+ {\relax
+ \ifnum\fam=\itfam
\bi
\else\ifnum\fam=\slfam
\bs
@@ -2667,15 +2676,15 @@
\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
+ \def\next##1%
+ {&&\getvalue{\??ft##1\s!text}%
+ &&\getvalue{\??ft##1\s!script}%
+ &&\getvalue{\??ft##1\s!scriptscript}%
+ &&\getvalue{\??ft##1\c!x}%
+ &&\getvalue{\??ft##1\c!xx}%
+ &&\getvalue{\??ft##1\interfaced{\v!klein}}%
+ &&\getvalue{\??ft##1\interfaced{\v!groot}}&\cr
\noalign{\hrule}}
- \def\donext##1%
- {\doifdefined{\??ft##1\s!text}{\next\do{##1}}}
\setlocalhsize
\halign to \localhsize
{##&\vrule##\strut
@@ -2687,8 +2696,10 @@
\noalign{\hrule}
&\multispan{15}{\vrule\hfil\tttf\strut[\title]\hfil}\vrule\cr
\noalign{\hrule}
- \next\bf\relax
- \@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\donext}}
+ &&\bf\s!text&&\bf\s!script&&\bf\s!scriptscript
+ &&\bf\c!x&&\bf\c!xx&&\bf\v!klein&&\bf\v!groot&\cr
+ \noalign{\hrule}
+ \@EA\globalprocesscommalist\@EA[\bodyfontenvironmentlist]\next}}
\stopbaselinecorrection}
%D \macros
@@ -2704,13 +2715,16 @@
%D as one can see, it does obey the small and even smaller
%D sizes.
+% \def\getglyph#1#2%
+% {{\ifcase\currentxfontsize\or
+% \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!x}%
+% \else
+% \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!xx}%
+% \fi
+% \font\temp=\truefontname{#1} at \bodyfontsize \temp#2\relax}}
+
\def\getglyph#1#2%
- {{\ifcase\currentxfontsize\or
- \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!x}%
- \else
- \bodyfontsize=\getvalue{\??ft\normalizedbodyfontsize\c!xx}%
- \fi
- \font\temp=\truefontname{#1} at \bodyfontsize \temp#2\relax}}
+ {{\definefont[\s!dummy][#1 sa \currentfontscale]\dummy#2}}
%D Fonts can only be used when loaded. In \CONTEXT\ we
%D postpone the loading of fonts, even when we load \PLAIN.
@@ -2756,14 +2770,15 @@
\let\setplainfonts=\undefined
%D \macros
-%D {ss, SS}
+%D {ss, SS, sz}
%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
+\ifx\undefined\SS \let\SS=\ss \fi
+\ifx\undefined\sz \let\sz=\ss \fi
%D \macros
%D {xi}
@@ -2903,6 +2918,26 @@
\c!em=\v!schuin]
\definebodyfontenvironment
+ [20.7pt]
+ [ \s!text=20.7pt,
+ \s!script=\!!fourteenpointfour,
+ \s!scriptscript=\!!twelvepoint,
+ \c!x=17.3pt,
+ \c!xx=\!!fourteenpointfour,
+ \c!groot=20.7pt, % !!!!
+ \c!klein=17.3pt]
+
+\definebodyfontenvironment
+ [17.3pt]
+ [ \s!text=17.3pt,
+ \s!script=\!!twelvepoint,
+ \s!scriptscript=\!!tenpoint,
+ \c!x=\!!fourteenpointfour,
+ \c!xx=\!!twelvepoint,
+ \c!groot=20.7pt,
+ \c!klein=\!!fourteenpointfour]
+
+\definebodyfontenvironment
[\!!fourteenpointfour]
[ \s!text=\!!fourteenpointfour,
\s!script=\!!elevenpoint,
@@ -3021,39 +3056,6 @@
\definebodyfontswitch [vii] [\!!sevenpoint]
\definebodyfontswitch [vi] [\!!sixpoint]
-%D Well, why not define a few more big ones. Nowadays memory
-%D is not so much a problem any more.
-
-\definebodyfontenvironment
- [14.4pt]
- [ \s!text=14.4pt,
- \s!script=11pt,
- \s!scriptscript=9pt,
- \c!x=12pt,
- \c!xx=10pt,
- \c!groot=17.3pt,
- \c!klein=12pt]
-
-\definebodyfontenvironment
- [17.3pt]
- [ \s!text=17.3pt,
- \s!script=12pt,
- \s!scriptscript=10pt,
- \c!x=14.4pt,
- \c!xx=12pt,
- \c!groot=20.7pt,
- \c!klein=14.4pt]
-
-\definebodyfontenvironment
- [20.7pt]
- [ \s!text=20.7pt,
- \s!script=14.4pt,
- \s!scriptscript=12pt,
- \c!x=17.3pt,
- \c!xx=14.4pt,
- \c!groot=20.7pt, % !!!!
- \c!klein=17.3pt]
-
%D So far.
\definefontstyle [\c!rm,\v!roman,\v!serif,\v!regular] [\c!rm]
diff --git a/tex/context/base/font-map.tex b/tex/context/base/font-map.tex
index fcdeca0d8..a124f63b9 100644
--- a/tex/context/base/font-map.tex
+++ b/tex/context/base/font-map.tex
@@ -8,7 +8,7 @@
%D copyright=NTG Maps]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
%C details.
\startnotmode[localfonts]
diff --git a/tex/context/base/font-ppl.tex b/tex/context/base/font-ppl.tex
new file mode 100644
index 000000000..9bd34ba35
--- /dev/null
+++ b/tex/context/base/font-ppl.tex
@@ -0,0 +1,26 @@
+%D \module
+%D [ file=font-ppl,
+%D version=2000.3.17,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Palatino,
+%D author=J. Hagen,
+%D date=\currentdate,
+%D copyright=J. Hagen]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This file load the Palatino.
+
+\definefontsynonym [Serif] [Palatino-Roman]
+\definefontsynonym [SerifBold] [Palatino-Bold]
+\definefontsynonym [SerifItalic] [Palatino-Italic]
+\definefontsynonym [SerifSlanted] [Palatino-Slanted]
+\definefontsynonym [SerifBoldItalic] [Palatino-BoldItalic]
+\definefontsynonym [SerifBoldSlanted] [Palatino-BoldSlanted]
+\definefontsynonym [SerifCaps] [Palatino-Roman]
+
+\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm] [default]
+
+\endinput
diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex
index 8f0a0bfbd..800a45235 100644
--- a/tex/context/base/font-uni.tex
+++ b/tex/context/base/font-uni.tex
@@ -144,11 +144,6 @@
\handleunicodeglyph
\egroup}
-\unexpanded\def\uc#1#2% used in tricky situations
- {\bgroup
- \edef\unicodeone{#1}%
- \afterassignment\dohandleunicodeflowglyph\chardef\nexttoken}
-
\unexpanded\def\uchar#1#2% use as standalone glyph
{\bgroup
\let\nextglyph\relax
@@ -157,6 +152,17 @@
\unicodeposition=\unicodeone\unicodetwo\relax
\handleunicodeglyph
\egroup}
+
+\def\dohandleucflowglyph%
+ {\unicodeposition=\unicodeone\unicodetwo\relax
+ \handleunicodeglyph
+ \egroup}
+
+\unexpanded\def\uc#1#2% used in tricky situations
+ {\bgroup
+ \edef\unicodeone{#1}%
+ \edef\unicodetwo{#2}%
+ \futurelet\nextglyph\dohandleucflowglyph}
% Alternative, handles [char >127]{number} too.
%
diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex
index 885292578..d3c4aff0b 100644
--- a/tex/context/base/java-ini.tex
+++ b/tex/context/base/java-ini.tex
@@ -442,7 +442,7 @@
\fi\fi
\fi\fi}
-\def\finalflushJSpreamble%
+\def\finalflushJSpreamble% kan direct in \everylastshipout, testen
{\iflocation
\flushJSpreamble
\ifcase\currentJSpreamble\relax\else
@@ -452,7 +452,7 @@
\fi}
\prependtoks \flushJSpreamble \to \everyshipout
-\prependtoks \finalflushJSpreamble \to \everylastshipout
+\prependtoks \finalflushJSpreamble \to \everylastshipout
%D \macros
%D {doPSsanitizeJScode}
diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex
index beb746f33..e721219ae 100644
--- a/tex/context/base/lang-alt.tex
+++ b/tex/context/base/lang-alt.tex
@@ -37,28 +37,28 @@
\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]
+\setupheadtext [\s!tr] [\v!tabellen=Tablolar]
+\setupheadtext [\s!tr] [\v!figuren=\c{S}ekiller]
+\setupheadtext [\s!tr] [\v!grafieken=Grafikler]
+\setupheadtext [\s!tr] [\v!intermezzos=...]
+\setupheadtext [\s!tr] [\v!index=\.Index]
+\setupheadtext [\s!tr] [\v!afkortingen=K\i saltmalar]
+\setupheadtext [\s!tr] [\v!logos=Logolar]
+\setupheadtext [\s!tr] [\v!eenheden=Birimler]
-\setuplabeltext [\s!tr] [\v!tabel=Cetrel ]
-\setuplabeltext [\s!tr] [\v!figuur=Risim ]
-\setuplabeltext [\s!tr] [\v!intermezzo=Entermezzo ]
+\setuplabeltext [\s!tr] [\v!tabel=Tablo ]
+\setuplabeltext [\s!tr] [\v!figuur=\c{S}ekil ]
+\setuplabeltext [\s!tr] [\v!intermezzo=... ]
\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!hoofdstuk=] % [\v!hoofdstuk=Konu ]
+\setuplabeltext [\s!tr] [\v!paragraaf=] % [\v!paragraaf=Paragraf ]
+\setuplabeltext [\s!tr] [\v!sub\v!paragraaf=] % [\c!sub\v!paragraaf=Altparagraf ]
\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!bijlage=] % [\v!bijlage=Ek ]
+\setuplabeltext [\s!tr] [\v!deel=Cilt ]
\setuplabeltext [\s!tr] [\v!regel=sat\i r ]
-\setuplabeltext [\s!tr] [\v!regels=sat\i r ]
+\setuplabeltext [\s!tr] [\v!regels=sat\i rlar ]
\setuplabeltext [\s!tr] [\v!january=ocak]
\setuplabeltext [\s!tr] [\v!february=\c{s}ubat]
diff --git a/tex/context/base/lang-chi.tex b/tex/context/base/lang-chi.tex
index bb80bb249..31829073e 100644
--- a/tex/context/base/lang-chi.tex
+++ b/tex/context/base/lang-chi.tex
@@ -76,15 +76,54 @@
\startlanguagespecifics[\s!cn]
-\stelsectiein[\v!sectionlevel-1][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-2][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-3][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-4][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-5][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-6][\c!conversie=\s!chinese]
-\stelsectiein[\v!sectionlevel-7][\c!conversie=\s!chinese]
-
-% \stelblokkopjesin[\c!conversie=\s!chinese]
+\startencoding[gbk]
+
+\setuplabeltext [\s!cn] [\v!january=\uchar{210}{187}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!february=\uchar{182}{254}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!march=\uchar{200}{253}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!april=\uchar{203}{196}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!may=\uchar{206}{229}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!june=\uchar{193}{249}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!july=\uchar{198}{223}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!august=\uchar{176}{203}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!september=\uchar{190}{197}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!october=\uchar{202}{174}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!november=\uchar{202}{174}\uchar{210}{187}\uchar{212}{194}]
+\setuplabeltext [\s!cn] [\v!december=\uchar{202}{174}\uchar{182}{254}\uchar{212}{194}]
+
+\setuplabeltext [\s!cn] [\v!sunday=\uchar{208}{199}\uchar{198}{218}\uchar{200}{213}]
+\setuplabeltext [\s!cn] [\v!monday=\uchar{208}{199}\uchar{198}{218}\uchar{210}{187}]
+\setuplabeltext [\s!cn] [\v!tuesday=\uchar{208}{199}\uchar{198}{218}\uchar{182}{254}]
+\setuplabeltext [\s!cn] [\v!wednesday=\uchar{208}{199}\uchar{198}{218}\uchar{200}{253}]
+\setuplabeltext [\s!cn] [\v!thursday=\uchar{208}{199}\uchar{198}{218}\uchar{203}{196}]
+\setuplabeltext [\s!cn] [\v!friday=\uchar{208}{199}\uchar{198}{218}\uchar{206}{229}]
+\setuplabeltext [\s!cn] [\v!saturday=\uchar{208}{199}\uchar{198}{218}\uchar{193}{249}]
+\stopencoding
+
+\startencoding[big5]
+
+\setuplabeltext [\s!cn] [\v!january=\uchar{164} {64}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!february=\uchar{164} {71}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!march=\uchar{164} {84}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!april=\uchar{165}{124}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!may=\uchar{164}{173}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!june=\uchar{164}{187}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!july=\uchar{164} {67}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!august=\uchar{164} {75}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!september=\uchar{164} {69}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!october=\uchar{164} {81}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!november=\uchar{164} {81}\uchar{164} {64}\uchar{164}{235}]
+\setuplabeltext [\s!cn] [\v!december=\uchar{164} {81}\uchar{164} {71}\uchar{164}{235}]
+
+\setuplabeltext [\s!cn] [\v!sunday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{233}]
+\setuplabeltext [\s!cn] [\v!monday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{64}]
+\setuplabeltext [\s!cn] [\v!tuesday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{71}]
+\setuplabeltext [\s!cn] [\v!wednesday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{84}]
+\setuplabeltext [\s!cn] [\v!thursday=\uchar{172} {80}\uchar{180}{193}\uchar{165}{124}]
+\setuplabeltext [\s!cn] [\v!friday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{173}]
+\setuplabeltext [\s!cn] [\v!saturday=\uchar{172} {80}\uchar{180}{193}\uchar{164}{187}]
+
+\stopencoding
\stoplanguagespecifics
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index 0281c164e..e539bdc70 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -223,7 +223,7 @@
\startencoding[pdfdoc]
\startlanguagespecifics[\s!de]% hm, a % is needed
- \defineactivecharacter " {\"}
+ \defineactivecharacter " {\"} % no {\simplifiedcompoundcharacter"}
\stoplanguagespecifics
\stopencoding
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 8a15a3136..53b4f6e88 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -278,8 +278,12 @@
%D
%D \showsetup{\y!setuplanguage}
-\def\setuplanguage[#1]%
- {\dodoubleargument\getparameters[\??la#1]}
+\def\setuplanguage%
+ {\dodoubleargument\dosetuplanguage}
+
+\def\dosetuplanguage[#1][#2]%
+ {\getparameters[\??la#1][#2]% % we need to make sure
+ \doif{#1}{\currentlanguage}{\language[#1]}} % that settings apply
%D The values \type {\c!leftsentence} and \type
%D {\c!rightsentence} can be (and are) used to implement
@@ -385,8 +389,10 @@
% {\edef\currentmainlanguage{#1}} % We expand indeed!
\def\mainlanguage[#1]%
- {\@EA\let\@EA\currentmainlanguage\csname\l!prefix!#1\endcsname
- \language[#1]}
+ {\doifsomething{#1}
+ {\doifdefined{\l!prefix!#1}
+ {\@EA\let\@EA\currentmainlanguage\csname\l!prefix!#1\endcsname
+ \language[#1]}}}
%D \macros
%D {defaultlanguage,languagedefault}
@@ -542,13 +548,6 @@
\def\rightsubguillemot%
{\hbox{\raise.25ex\hbox{$\scriptscriptstyle>$}}}
-%D We enable proper substititutions by:
-
-\redefinecharacter leftguillemot
-\redefinecharacter rightguillemot
-\redefinecharacter leftsubguillemot
-\redefinecharacter rightsubguillemot
-
%D Just like with subsentence boundary symbols, quotes
%D placement depends on the current language, therefore we show
%D the defaults here.
diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex
index 83b36e2ca..8df66aa90 100644
--- a/tex/context/base/lang-sla.tex
+++ b/tex/context/base/lang-sla.tex
@@ -230,7 +230,7 @@
\setuplabeltext [\s!pl] [\v!tabel=Tabela ]
\setuplabeltext [\s!cz] [\v!tabel=Tabulka ]
\setuplabeltext [\s!sk] [\v!tabel=Tabu\v{l}ka ]
-\setuplabeltext [\s!hr] [\v!tabel=Tablica ]
+\setuplabeltext [\s!hr] [\v!tabel=T\'abl\'azat ] % [\v!tabel=Tablica ]
\setuplabeltext [\s!pl] [\v!figuur=Ilustracja ]
\setuplabeltext [\s!cz] [\v!figuur=Obr\'azek ]
diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex
index 481368416..7598da088 100644
--- a/tex/context/base/m-chart.tex
+++ b/tex/context/base/m-chart.tex
@@ -143,6 +143,7 @@
\c!focus=,
\c!achtergrond=, % \v!kleur,
\c!achtergrondkleur=white,
+ \c!lijndikte=\linewidth,
\c!kader=\v!uit,
\c!kaderkleur=]
@@ -465,44 +466,43 @@
\ifx\FLOWshape\empty
\global\let\FLOWshape\@@FLOSdefault
\fi
- \ifx\FLOWshape\v!geen \else
- \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes}
- {\edef\FLOWshapetag{shape_\FLOWshape}%
- \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}}
- {\doifnumberelse{\FLOWshape}
- {\let\FLOWshapetag\FLOWshape}
- {\let\FLOWshapetag\empty}}%
- \ifx\FLOWshapetag\empty \else
- \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines}
- {\chardef\FLOWstate=0 }
- {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus}
- {\chardef\FLOWstate=1 }
- {\chardef\FLOWstate=2 }}%
- \startMPdrawing
- begin_sub_chart ;
- \ifcase\FLOWstate
- shape_line_color := \MPcolor{\@@FLOLkleur} ;
- shape_fill_color := \MPcolor{\@@FLOLkleur} ;
- shape_line_width := \@@FLOLlijndikte ;
- \or
- shape_line_color := \MPcolor{\@@FLOFkaderkleur} ;
- shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ;
- shape_line_width := \@@FLOFlijndikte ;
- \or
- shape_line_color := \MPcolor{\@@FLOSkaderkleur} ;
- shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ;
- shape_line_width := \@@FLOSlijndikte ;
- \fi
- \ifx\FLOWoverlay\empty
- peepshape := false ;
- \else
- peepshape := true ;
- \fi
- new_shape(\FLOWlocation,\FLOWshapetag) ;
- end_sub_chart ;
- \stopMPdrawing
- \fi
- \fi
+ \doifnot{\FLOWshape}{\v!geen}
+ {\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes}
+ {\edef\FLOWshapetag{shape_\FLOWshape}%
+ \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}}
+ {\doifnumberelse{\FLOWshape}
+ {\let\FLOWshapetag\FLOWshape}
+ {\let\FLOWshapetag\empty}}%
+ \ifx\FLOWshapetag\empty \else
+ \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines}
+ {\chardef\FLOWstate=0 }
+ {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus}
+ {\chardef\FLOWstate=1 }
+ {\chardef\FLOWstate=2 }}%
+ \startMPdrawing
+ begin_sub_chart ;
+ \ifcase\FLOWstate
+ shape_line_color := \MPcolor{\@@FLOLkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOLkleur} ;
+ shape_line_width := \@@FLOLlijndikte ;
+ \or
+ shape_line_color := \MPcolor{\@@FLOFkaderkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ;
+ shape_line_width := \@@FLOFlijndikte ;
+ \or
+ shape_line_color := \MPcolor{\@@FLOSkaderkleur} ;
+ shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ;
+ shape_line_width := \@@FLOSlijndikte ;
+ \fi
+ \ifx\FLOWoverlay\empty
+ peepshape := false ;
+ \else
+ peepshape := true ;
+ \fi
+ new_shape(\FLOWlocation,\FLOWshapetag) ;
+ end_sub_chart ;
+ \stopMPdrawing
+ \fi}%
\ignorespaces}%
\haalbuffer[flw-\currentFLOWnumber]%
\long\def\startFLOWcell##1\stopFLOWcell%
@@ -555,7 +555,7 @@
\def\MPareapath##1##2##3##4%
{\def\areaMPllx{##1bp}\def\areaMPlly{##2bp}%
\def\areaMPurx{##3bp}\def\areaMPury{##4bp}}%
- \readfile{mpgraph.tmp}{}{}%
+ \readfile{\MPdatafile}{}{}%
\doglobal\newcounter\FLOWcomment
\long\def\startFLOWcell##1\stopFLOWcell%
{\resetFLOWcell
@@ -602,11 +602,9 @@
m=>{\setupframed[\c!uitlijnen=\v!midden]},
c=>{\setupframed[\c!uitlijnen=\v!midden]}]%
\fi
- \ifx\FLOWshape\v!geen
- \setupframed[\c!offset=\v!overlay]%
- \else
- \setupframed[\c!offset=.5\bodyfontsize]%
- \fi
+ \doifelse{\FLOWshape}{\v!geen}
+ {\setupframed[\c!offset=\v!overlay]}
+ {\setupframed[\c!offset=.5\bodyfontsize]}%
\framed
[\c!kader=\v!uit,\c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight]
{\FLOWtext}}%
@@ -782,17 +780,17 @@
\hfill}}}
\vfill}}}%
\wd8=\wd0\ht8=\ht0\dp8=\dp0
- \framed
+ \framed
[\c!offset=\v!overlay,\c!kaderkleur=green]
- {\hbox{\box4\hskip-\wd0 \raise1pt \box0\hskip-\wd2\box2\hskip-\wd6\box6\hskip-\wd8\box8}}}
+ {\hbox{\box4\hskip-\wd0\box0\hskip-\wd2\box2\hskip-\wd6\box6\hskip-\wd8\box8}}}
{\framed
[\c!offset=\v!overlay,
\c!kader=\@@FLOWkader,
+\c!lijndikte=\@@FLOWlijndikte,
\c!kaderkleur=\@@FLOWkaderkleur,
\c!achtergrond=\@@FLOWachtergrond,
\c!achtergrondkleur=\@@FLOWachtergrondkleur]
-% {\hbox{\box4\hskip-\wd0 \raise1pt \box0\hskip-\wd2\box2}}}% raise is a bug
- {\hbox{\box4\hskip-\wd0 \box0\hskip-\wd2\box2}}}%
+ {\hbox{\box4\hskip-\wd0\box0\hskip-\wd2\box2}}}%
%\message{[\FLOWcells]}\wait
\egroup}
diff --git a/tex/context/base/m-chemic.tex b/tex/context/base/m-chemic.tex
index f03dc4260..cfefdf83f 100644
--- a/tex/context/base/m-chemic.tex
+++ b/tex/context/base/m-chemic.tex
@@ -13,7 +13,13 @@
%C details.
\ifx\beginpicture\undefined
+ \let\normalgrid\grid
+ \let\normalaxis\axis
\input pictex.tex \relax
+ \let\pictexgrid\grid
+ \let\pictexaxis\axis
+ \let\grid\normalgrid
+ \let\axis\normalaxis
\fi
\input ppchtex.tex \relax
diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex
index 182cdc027..ac74c1d6b 100644
--- a/tex/context/base/m-pictex.tex
+++ b/tex/context/base/m-pictex.tex
@@ -14,23 +14,36 @@
%D This module is one big hack. This hack is not needed when
%D using \ETEX, so there we simply load \PICTEX\ and quit.
-\ifx\eTeXversion\undefined \else
-
- \ifx\undefined\fiverm
- \font\fiverm=cmr5
- \fi
-
- \ifx\beginpicture\undefined
- \ifx\newenvironment\undefined
- \input pictex.tex \relax
- \else
- \input prepictex.tex \relax
- \input pictex.tex \relax
- \input postpictex.tex \relax
- \fi
- \fi
-
-\expandafter \endinput \fi
+%D Not every package defines \type{\fiverm}, \PICTEX's pixel,
+%D so let's take care of that omision here. The actual loading
+%D of \PICTEX\ depends on the package. For \LATEX\ users we
+%D take care of loading the auxiliary ones too.
+
+\def\loadpictex%
+ {\ifx\grid\undefined \else \let\normalgrid\grid \fi
+ \ifx\axis\undefined \else \let\normalaxis\axis \fi
+ \ifx\undefined\fiverm
+ \font\fiverm=cmr5
+ \fi
+ \ifx\beginpicture\undefined
+ \ifx\newenvironment\undefined
+ \input pictex.tex \relax
+ \else
+ \input prepictex.tex \relax
+ \input pictex.tex \relax
+ \input postpictex.tex \relax
+ \fi
+ \fi
+ \ifx\normalgrid\undefined \else
+ \let\pictexgrid\grid
+ \let\grid\normalgrid
+ \fi
+ \ifx\normalaxis\undefined \else
+ \let\pictexaxis\axis
+ \let\axis\normalaxis
+ \fi}
+
+\ifx\eTeXversion\undefined \else \loadpictex \expandafter \endinput \fi
%D When not in \ETEX\ and not in \CONTEXT, we load a few
%D auxiliary macros.
@@ -224,26 +237,9 @@
\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.
+%D Now we can load \PICTEX:
-\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
+\loadpictec
%D Finally we restore the old definitions of \type{\newdimen}
%D and \type{\newskip}:
diff --git a/tex/context/base/core-01a.tex b/tex/context/base/main-001.tex
index 17b8ea1e9..db1a16b4a 100644
--- a/tex/context/base/core-01a.tex
+++ b/tex/context/base/main-001.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=core-01a,
+%D [ file=main-001,
%D version=1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=1A (to be split),
@@ -11,11 +11,15 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D This module is still to be split and documented.
+
% nog oplossen: voetnoot setten ivm later veranderde
% witruimte; probleem: als lijn graphic
% The %I etc thing will be replaced by documentation. Some
% years ago they served as helpinfo blocks for our editor.
+
+\writestatus{loading}{Context Core Macros (1)}
\newevery \everybodyfont \Everybodyfont % just to be sure
@@ -47,7 +51,6 @@
\protect
-\writestatus{loading}{Context Core Macros (a)}
\unprotect
@@ -175,70 +178,6 @@
27: verze
\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 czech library: textblocks
- title: textovyblok
- 1: nova verze, je treba druhy beh
- 2: zapisuji bloky do --
- 3: ctu bloky z --
- 4: je treba druhy beh
- 5: -- neni skryto
- 6: -- skryto a zpracovano
- 7: -- skryto
- 8: -- vysazeno
- 9: -- nevysazeno
- 10: -- nacteno a zpracovano
- 11: -- nacteno a vysazeno
- 12: -- preskoceno
-\stopmessages
-
\startmessages dutch library: floatblocks
title: plaatsblokken
1: -- hernummerd / -- => --
@@ -313,7 +252,6 @@
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
@@ -328,7 +266,6 @@
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
@@ -343,7 +280,6 @@
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
@@ -358,34 +294,9 @@
6: sada stran -- zpracovana (velikost --)
7: pocita se misto pro logo
8: pocita se pozadi
- 9: aktualne ne vice nez -- urovne/urovni vyctu
10: -- a -- nedava dohromady 1.0
11: svisla mezera -- neni povolena v pevnem radkovem rejstriku
\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
-
-\startmessages czech library: structures
- title: struktury
- 1: zacatek oddilu (sekce) --
- 2: konec oddilu (sekce) --
-\stopmessages
% \CONTEXTtrue % Now we know that we can use ConTeXt commands.
@@ -453,6 +364,9 @@
% Om ongewenste witruimte te voorkomen kan met \dosomebreak{\break}
% een \penalty v¢¢r witruimte worden geplaatst.
+\def\removelastskip% a redefinition of plain
+ {\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi\fi}
+
\def\dosomebreak#1%
{\skip0=\lastskip
\removelastskip
@@ -529,20 +443,6 @@
% 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{}}
@@ -767,7 +667,6 @@
\newdimen\openlineheight
\newdimen\openstrutheight
\newdimen\openstrutdepth
-
\def\strutheightfactor {.72}
\def\strutdepthfactor {.28}
@@ -864,7 +763,15 @@
\strutdimen=#3\strutdimen % kan afwijken van de globale
\edef#1{\the\strutdimen}} % strut
-\let\normalstrut=\strut
+% plain definition:
+%
+% \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
+%
+% could be:
+%
+% \def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
+
+\let\normalstrut=\strut
% The double \hbox construction enables us to \backtrack
% boxes.
@@ -924,7 +831,12 @@
% so:
\def\pseudostrut%
- {\noindent}
+ {\noindent} % better: \dontleavehmode
+
+\let\pseudobegstrut\pseudostrut
+
+\def\pseudoendstrut% removes all kind of signals
+ {\ifhmode\unskip\unskip\unskip\unskip\fi}
\def\resetteststrut%
{\let\strutwidth=\!!zeropoint
@@ -933,12 +845,6 @@
\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
@@ -948,14 +854,6 @@
\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%
@@ -1045,357 +943,7 @@
% 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}
-
-% no longer needed, since texutil is now multi platform
-%
-% \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}
-% {}}}
-
-\def\checkutilityfile%
- {}
-
-\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}
-
-% Saving the sort vector:
-
-\def\savesortkeys%
- {\setbox\scratchbox=\hbox
- \bgroup
- \def\flushsortkey##1##2##3##4%
- {\convertargument{##1}{##2}{##3}{##4}\to\ascii
- \immediatewriteutility{k {\currentlanguage}{\currentencoding}\ascii}}%
- \let\definesortkey\flushsortkey
- \flushsortkeys
- \egroup
- \global\let\savesortkeys\relax}
-
-\prependtoks \savesortkeys \to \everystarttext
-
-% 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
-%
-% also:
-%
-% \definerawpasslist{\s!xxx}
-% \moverawpasslist\s!xxx\to\somemacro
-
-\let\alltwopasslists\empty % with 0,0 -> stepwise commalist
-\let\allrawpasslists\empty % without 0,0 -> raw commalist
-
-\newif\iftwopassdatafound
-
-\def\twopassentry#1%
- {\executeifdefined{@@#1\s!pass}\gobbletwoarguments}
-
-\def\appendtwopasselement#1#2#3%
- {%\debuggerinfo{\m!systems}{twopass data #1 - #2 = #3}%
- \@EA\ifx\csname#1:\s!list\endcsname\empty
- \setxvalue{#1:\s!list}{#3}%
- \else
- \setxvalue{#1:\s!list}{\getvalue{#1:\s!list},#3}%
- \fi}
-
-\def\dodefinetwopasslist#1%
- {\doifundefined{#1:\s!list}
- {%\debuggerinfo{\m!systems}{defining twopass class #1}%
- \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}}%
- \doglobal\addtocommalist{#1}\alltwopasslists}
-
-\def\definerawpasslist#1%
- {\expanded{\dodefinetwopasslist{#1}}%
- \doglobal\addtocommalist{#1}\allrawpasslists}
-
-\def\doloadtwopassdata#1%
- {\doifundefined{#1:\s!list}
- {\global\letvalue{#1:\s!list}\empty
- \doutilities{#1\s!pass}{\jobname}{}{}{}%
- \ifx\twopassdata\empty\else
- \appendtwopasselement{#1}{0}\twopassdata
- \fi}}
-
-\def\loadtwopassdata%
- {\ifx\alltwopasslists\empty\else
- \def\twopassdata{0,0}% end condition
- \processcommacommand[\alltwopasslists]\doloadtwopassdata
- \global\let\alltwopassdata\empty
- \fi
- \ifx\allrawpasslists\empty\else
- \let\twopassdata\empty
- \processcommacommand[\allrawpasslists]\doloadtwopassdata
- \global\let\allrawpassdata\empty
- \fi}
-
-\def\moverawpasslist#1#2% erases the old one, like the others do
- {\loadtwopassdata
- \@EA\let\@EA#2\csname#1:\s!list\endcsname
- \@EA\let\csname#1:\s!list\endcsname\empty}
-
-\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}}
+\let\mindermeldingen\dontcomplain
% Maten
%
@@ -1519,9 +1067,6 @@
\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}
@@ -1546,6 +1091,8 @@
\def\calculatehsizes%
{\tekstbreedte=\zetbreedte
+ \doifsomething{\@@lytekstbreedte} % may be set to \tekstbreedte
+ {\tekstbreedte=\@@lytekstbreedte} % which is tricky but ok
\sethsize}
\def\sethsize%
@@ -1587,30 +1134,6 @@
% 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.
%
@@ -1765,17 +1288,6 @@
\let\stelpapierformaatin\relax
\fi
-%\def\dodefinieerpapierformaat[#1][#2]%
-% {\ifsecondargument
-% \getparameters
-% [\??pp#1] % geen \c!schaal, scheelt hash ruimte
-% [\c!breedte=\@@ppbreedte,\c!hoogte=\@@pphoogte,
-% \c!offset=\@@ppoffset,#2]%
-% \else
-% \definieerpapierformaat[][#1]%
-% \stelpapierformaatin
-% \fi}
-
\def\dodefinieerpapierformaat[#1][#2]%
{\ifsecondargument
\getparameters
@@ -1831,49 +1343,6 @@
\fi
-% \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}
-% {\global\papierbreedte=\getvalue{\??pp##1\c!breedte}%
-% \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}%
-% \calculatepaperoffsets{##1}%
-% \xdef\papierformaat{##1}}}}%
-% \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}%
-% \xdef\printpapierformaat{##1}}}}%
-% \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]%
-% \else\ifx\papierformaat\undefined\else
-% \stelpapierformaatin[\papierformaat][\printpapierformaat]%
-% \fi\fi\fi}
-
\def\dostelpapierformaatin[#1][#2]%
{\doifinstringelse{=}{#1}
{\getparameters[\??pp][#1]}
@@ -1961,7 +1430,10 @@
\stelblankoin
\doifelse{\@@lybreedte}{\v!midden}
{\global\zetbreedte=\papierbreedte
- \global\advance\zetbreedte by -2\rugwit}
+ \global\advance\zetbreedte by -\rugwit
+ \doifelsenothing{\@@lysnijwit}
+ {\global\advance\zetbreedte by -\rugwit}
+ {\global\advance\zetbreedte by -\@@lysnijwit}}
{\doifelse{\@@lybreedte}{\v!passend}
{\global\zetbreedte=\papierbreedte
\global\advance\zetbreedte by -\rugwit
@@ -1984,7 +1456,10 @@
\doifelse{\@@lyregels}{}
{\doifelse{\@@lyhoogte}{\v!midden}
{\global\zethoogte=\papierhoogte
- \global\advance\zethoogte by -2\kopwit}
+ \global\advance\zethoogte by -\kopwit
+ \doifelsenothing{\@@lybodemwit}
+ {\global\advance\zethoogte by -\kopwit}
+ {\global\advance\zethoogte by -\@@lybodemwit}}
{\doifelse{\@@lyhoogte}{\v!passend}
{\global\zethoogte=\papierhoogte
\global\advance\zethoogte by -\kopwit
@@ -2019,22 +1494,10 @@
\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
+ {\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!midden=>{\stelpapierformaatin[\c!links=\hss,\c!rechts=\hss,\c!boven=\vss,\c!onder=\vss]},
\v!links=>{\stelpapierformaatin[\c!links=,\c!rechts=\hss]},
\v!rechts=>{\stelpapierformaatin[\c!links=\hss,\c!rechts=]},
@@ -2076,12 +1539,6 @@
\def\adaptedpages{}
-% \def\adaptpagedimensions%
-% {\rawdoifinsetelse{\realfolio}{\adaptedpages}
-% {\getvalue{\??za\realfolio}%
-% \letvalue{\??za\realfolio}=\relax}
-% {}}
-
\def\adaptpagedimensions%
{\rawdoifinsetelse{\realfolio}{\adaptedpages}
{\getvalue{\??za\realfolio}%
@@ -2234,22 +1691,22 @@
\processaction
[\@@mbplaats]
[ \v!inmarge=>\doifbothsidesoverruled
- \rightmarginbox
- \orsideone
- \rightmarginbox
- \orsidetwo
- \leftmarginbox
- \od,
+ \rightmarginbox
+ \orsideone
+ \rightmarginbox
+ \orsidetwo
+ \leftmarginbox
+ \od,
\v!midden=>\doifbothsidesoverruled
- \rightmarginbox
- \orsideone
- \leftmarginbox
- \orsidetwo
- \rightmarginbox
- \od,
+ \rightmarginbox
+ \orsideone
+ \leftmarginbox
+ \orsidetwo
+ \rightmarginbox
+ \od,
\v!links=>\leftmarginbox,
\v!rechts=>\rightmarginbox,
- \s!unknown=>\setbox\preparedmarginbox=\hbox{}]}
+ \s!unknown=>\setbox\preparedmarginbox=\hbox{}]}
\def\dostartmargeblok% % 2 maal \vbox ivm \unvbox elders
{\global\setbox\marginbox=\vtop\bgroup\vbox\bgroup
@@ -2341,231 +1798,6 @@
\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
- {\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]%
- \makecounter{\s!number#1}%
- \setcounter{\s!number#1}{\getvalue{\s!number#1\c!start}}}
-
-% \c!nummer=#1 ; nogal veel copieen nodig
-%
-% \def\@@thenumber#1{\s!number\getvalue{\s!number#1\c!nummer}}
-
-\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\domaakvoorafgaandenummer[#1]%
- {\bgroup % added
- \global\let\voorafgaandenummer\empty
- \ifsectienummer
- \doifvalue{\??sb\@@sectieblok\c!nummer}{\v!ja} % added
- {\doifelsevalue{\s!number#1\c!sectienummer}{\v!ja}
- {\donetrue}{\donefalse}%
- \doifvalue{\s!number#1\c!sectienummer}{\v!nummer}
- {\donetrue\let\@@sectionconversion\gobbleoneargument}%
- \ifdone
- \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}%
- \fi
- \egroup}
-
-\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
@@ -2799,14 +2031,9 @@
\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}
@@ -2884,7 +2111,10 @@
{\setbox0=\hbox{#1}% just in case there are objects there
\setbox\scratchbox=\hbox
{\the\everyshipout
- \ifnum\realpageno=\lastpage\relax\the\everylastshipout\fi}%
+ \ifnum\realpageno=\lastpage\relax
+ \the\everylastshipout
+ \global\everylastshipout\emptytoks
+ \fi}%
\smashbox\scratchbox
\box\scratchbox
\box\postponedcontent % evt ver naar links !
@@ -2999,81 +2229,8 @@
% \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\dopagecontents#1#2% \box<n> \unvbox<n>
- {\bgroup
+\def\dopagecontents#1#2% \box<n> \unvbox<n>
+ {\bgroup % niet breedte zetten, kan fractie zijn!
\forgetall
\boxmaxdepth=\maxdepth
\setbox0=\vbox \ifbottomnotes to \teksthoogte \fi
@@ -3168,7 +2325,7 @@
\newtoks\afterpage \newtoks\aftereverypage
\newtoks\beforepage \newtoks\beforeeverypage
-\newif\ifshowgrid
+\newif\ifshowgrid \showgridfalse
\def\toongrid%
{\tracegridsnappingtrue
@@ -3177,10 +2334,17 @@
\def\doplaatstekstblok#1#2%
{\bgroup
\setbox0=\hbox to \zetbreedte
- {\vbox to \teksthoogte
- {\offinterlineskip
- \boxmaxdepth\maxdepth
- \dopagecontents#1#2}}%
+ {\hss % new
+ \vbox to \teksthoogte % can be < \makeupwidth
+ {\offinterlineskip % so don't change this
+ \tekstbreedte=\zetbreedte %
+ \doifsomething{\@@lytekstbreedte} %
+ {\tekstbreedte=\@@lytekstbreedte}%
+ \hsize=\tekstbreedte % local variant of \sethsize
+ \boxmaxdepth\maxdepth %
+ \noindent % the contents can be < \hsize
+ \dopagecontents#1#2}%
+ \hss}% new
\ht0=\teksthoogte
\wd0=\zetbreedte
\ifshowgrid
@@ -3222,55 +2386,24 @@
\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\centerpagebox#1%
{\printpapierbreedte=\papierschaal\printpapierbreedte
\printpapierhoogte =\papierschaal\printpapierhoogte
\setbox#1=\vbox to \printpapierhoogte
{\@@ppboven
- %\toppagebox
\hbox to \printpapierbreedte
{\ifdoublesidedprint
\doifbothsides
- %\leftpagebox\box#1\rightpagebox
\@@pplinks\box#1\@@pprechts
\orsideone
- %\leftpagebox\box#1\rightpagebox
\@@pplinks\box#1\@@pprechts
\orsidetwo
- %\rightpagebox\box#1\leftpagebox
\@@pprechts\box#1\@@pplinks
\od
\else
- %\leftpagebox\box#1\rightpagebox
\@@pplinks\box#1\@@pprechts
\fi}%
\par
- %\bottompagebox
\@@pponder}}
\def\offsetprintbox#1%
@@ -3385,44 +2518,6 @@
{\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
-% {\offinterlineskip
-% \ifpagebodyornaments
-% \getbackgroundbox
-% \getlogobox
-% \bgroup % else footnotes get inconsistent font/baseline
-% \doconvertfont{\@@lyletter}{}%
-% \offinterlineskip
-% \gettextboxes
-% \egroup
-% \fi
-% \getmainbox#1#2}% including footnotes
-% \buildpagebox0
-% \ifpagebodyornaments
-% \addpagebackground0
-% \fi
-% \ifarrangingpages \else
-% \addpagecutmarks0
-% \replicatepagebox0
-% \scalepagebox0
-% \mirrorpaperbox0
-% \rotatepaperbox0
-% \addpagecolormarks0
-% \centerpagebox0
-% \mirrorprintbox0
-% \rotateprintbox0
-% \offsetprintbox0
-% \negateprintbox0
-% \fi
-% \box0
-% \endrestorecatcodes}}
-
\def\buildpagebody#1#2%
{\vbox
{\beginrestorecatcodes
@@ -3978,27 +3073,10 @@
\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
+\newif\ifwitruimteflexibel \witruimteflexibeltrue
\def\dodostelwitruimtein[#1]%
- {\witruimteflexibeltrue
+ {%\witruimteflexibeltrue
\processallactionsinset
[#1]
[\v!herstel=>,
@@ -4138,8 +3216,6 @@
\def\toonregelcorrectie {\showbaselinecorrection}
\def\regelcorrectie {\baselinecorrection}
-%\def\startregelcorrectie {\startbaselinecorrection}
-%\def\stopregelcorrectie {\stopbaselinecorrection}
\definecomplexorsimpleempty\startregelcorrectie
@@ -4351,14 +3427,6 @@
\def\skipfactor {.75}
\def\skipgluefactor {.25}
-%\def\normalskipamount%
-% {\openlineheight
-% \ifblankoflexibel
-% \!!plus\skipgluefactor\openlineheight
-% \!!minus\skipgluefactor\openlineheight
-% \fi
-% \relax}
-
\def\normalskipamount%
{\openlineheight
\ifgridsnapping \else \ifblankoflexibel
@@ -4391,12 +3459,37 @@
\newif\iffuzzyvskip
+% old
+%
+% \def\doblanko#1%
+% {\processallactionsinset
+% [#1]
+% [ \v!groot=>\dosingleblanko\v!groot, % happens often
+% \v!buiten=>\ifvmode\ifinner\blankobuitentrue\fi\fi,
+% \v!reset=>\global\blankoresettrue,
+% \v!flexibel=>\global\lokaalblankoflexibeltrue,
+% \v!vast=>\global\lokaalblankovasttrue,
+% \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}]}
+%
+% new, see below
+
\def\doblanko#1%
{\processallactionsinset
[#1]
[ \v!groot=>\dosingleblanko\v!groot, % happens often
\v!buiten=>\ifvmode\ifinner\blankobuitentrue\fi\fi,
\v!reset=>\global\blankoresettrue,
+ \v!flexibel=>\global\lokaalblankoflexibeltrue,
+ \v!vast=>\global\lokaalblankovasttrue,
\v!back=>\geenblanko,
\v!wit=>\global\advance\blankoskip by \parskip,
\v!formule=>\global\advance\blankoskip by \medskipamount,
@@ -4406,21 +3499,30 @@
\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}]}
+ \s!unknown=>\doindirectblanko{#1}]}
\def\oldprevdepth{\prevdepth}%
\def\newprevdepth{-1001pt}
-\def\mindimen{0.00002pt}
+\def\mindimen{0.00002pt} % beter 1sp
+
+\newif\iflokaalblankovast
+\newif\iflokaalblankoflexibel
\def\docomplexdoblanko[#1]% pas op \relax's zijn nodig ivm volgende \if
{\global\blankoresetfalse
\global\blankoblokkeerfalse
\global\blankogeenwitfalse
- \global\blankoskip=\!!zeropoint\relax
+ \global\lokaalblankoflexibelfalse
+ \global\lokaalblankovastfalse
+ \global\blankoskip=\!!zeropoint
\global\blankoforceerfalse
\blankobuitenfalse
\processcommalist[#1]\doblanko
+\ifdim\blankoskip=\!!zeropoint\relax
+ \iflokaalblankoflexibel \dosingleblanko\currentblanko \fi
+ \iflokaalblankovast \dosingleblanko\currentblanko \fi
+\fi
\ifblankobuiten
\else
\par
@@ -4463,6 +3565,17 @@
\fi
\fi
\fi
+\ifblankoflexibel \else
+ \blankoskip=1\blankoskip
+\fi
+\iflokaalblankovast
+ \blankoskip=1\blankoskip
+\fi
+\iflokaalblankoflexibel
+ \blankoskip=1\blankoskip
+ \!!plus\skipgluefactor\blankoskip
+ \!!minus\skipgluefactor\blankoskip
+\fi
\ifdim\prevdepth=\newprevdepth
\else
\iffuzzyvskip
@@ -4497,41 +3610,95 @@
\expanded{\docomplexdoblanko[#1]}% \expanded = nieuw
\fi}
+% old
+%
+% \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}}}}
+%
+% new, more robust
+%
+% \def\doindirectblanko#1%
+% {\edef\ascii{#1}\convertcommand\ascii\to\ascii
+% \ifundefined{\??bo\ascii}% <-etex \expandafter\ifx\csname\??bo#1\endcsname\rel
+% \herhaalmetcommando[#1]\dosingleblanko
+% \else
+% \expandafter\complexdoblanko\expandafter[\csname\??bo\ascii\endcsname]%
+% \fi}
+%
+% even more robust
+
\def\doindirectblanko#1%
- {\ifundefined{\??bo#1}% <-etex \expandafter\ifx\csname\??bo#1\endcsname\relax
- \expanded{\complexdodoblanko[#1]}%
+ {\edef\ascii{#1}\convertcommand\ascii\to\ascii
+ \ifundefined{\??bo\ascii}% <-etex \expandafter\ifx\csname\??bo#1\endcsname
+ \expanded{\herhaalmetcommando[#1]\noexpand\dosingleblanko}%
\else
- \expandafter\complexdoblanko\expandafter[\csname\??bo#1\endcsname]%
+ \expandafter\complexdoblanko\expandafter[\csname\??bo\ascii\endcsname]%
\fi}
\def\complexdoblanko[#1]% enables [force,8\bodyfontsize]
- {\doifinstringelse{,}{#1}
- {\expanded{\complexdodoblanko[#1]}}
- {\doifnumberelse{#1}
- {\expanded{\complexdodoblanko[#1]}}
- {\doindirectblanko{#1}}}}
+ {\expanded{\complexdodoblanko[#1]}}
\def\currentblanko%
{\v!groot}
+%D For a long time we had:
+%D
+%D \startypen
+%D \def\simpledoblanko%
+%D {\doifelse{\currentwitruimte}{\v!geen}
+%D {\blanko[\currentblanko]}
+%D {\blanko[\currentwitruimte]}}
+%D \stoptypen
+%D
+%D But Berend de Boer wanted more control, so now we have:
+
\def\simpledoblanko%
{\doifelse{\currentwitruimte}{\v!geen}
{\blanko[\currentblanko]}
- {\blanko[\currentwitruimte]}}
+ {\blanko[\s!default]}}
+
+%D Another useful definition would be:
+%D
+%D \starttypen
+%D \definieerblanko
+%D [\s!default]
+%D [\v!groot]
+%D \stoptypen
\def\blanko% % the \relax is definitely needed due to the many \if's
{\relax\complexorsimple\doblanko}
+%\def\dostelblankoin#1%
+% {\bgroup % rommelig
+% \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\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}%
+ {\bigskipamount=#1\relax
+ \ifblankoflexibel \else
+ \bigskipamount=1\bigskipamount
+ \fi
+ \smallskipamount=\bigskipamount
+ \medskipamount=\bigskipamount
+ \divide\medskipamount by 2
+ \divide\smallskipamount by 4 }%
\def\complexstelblankoin[#1]%
{\ifgridsnapping
@@ -4578,7 +3745,8 @@
\definecomplexorsimpleempty\stelblankoin
\def\dodefinieerblanko[#1][#2]%
- {\setvalue{\??bo#1}{#2}}
+ {\def\docommando##1{\setvalue{\??bo##1}{#2}}%
+ \processcommalist[#1]\docommando}
\def\definieerblanko%
{\dodoubleargument\dodefinieerblanko}
@@ -4594,6 +3762,12 @@
\else
\noexpand\blankoflexibelfalse
\fi}}
+
+%D Now.
+
+\definieerblanko
+ [\s!default]
+ [\v!wit]
%I n=Inspringen
%I c=\inspringen,\nietinspringen,\welinspringen
@@ -4660,64 +3834,6 @@
\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=Positioneren
%I c=\startpositioneren,\stelpositionerenin
%I
@@ -4811,38 +3927,76 @@
{\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}
+% \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 % kan beter.
+% {\vskip\ypositie
+% \hbox to \!!zeropoint
+% {\hskip\xpositie
+% \box0
+% \hskip-\xpositie}%
+% \vskip-\ypositie}%
+% \ignorespaces}
+
+\def\berekenpositioneren#1#2#3#4#5#6#7#8#9%
+ {\setdimensionwithunit\scratchskip{#1}\@@pseenheid % \scratchskip=#1\@@pseenheid
+ \scratchskip=#8\scratchskip
+ \scratchskip=#9\scratchskip
+ \advance\scratchskip by #4\relax
+ \doif{#2}{\v!relatief}%
+ {\advance\scratchskip by #3%
+ \let#4\!!zeropoint}%
+ #3=\scratchskip\relax
+ \doifnot{\@@psstatus}{\v!overlay}
+ {\scratchskip=#5\relax
+ \advance\scratchskip by #3\relax
+ \ifdim#3<-#7\relax\global#7=-#3\relax\fi
+ \ifdim\scratchskip>#6\relax\global#6=\scratchskip\relax\fi}}
+
+\def\positioneer%
+ {\dosingleempty\dopositioneer}
+
+\def\dopositioneer[#1]#2(#3,#4)%
+ {\dowithnextbox
+ {\bgroup
+ \stelpositionerenin[#1]%
+ \dontcomplain
+ \berekenpositioneren{#3}{\@@psxstap}{\xpositie}
+ {\@@psxoffset}{\wd\nextbox}{\xafmeting}{\xoffset}
+ {\@@psxschaal}{\@@psxfactor}%
+ \scratchdimen=\ht\nextbox \advance\scratchdimen \dp\nextbox
+ \berekenpositioneren{#4}{\@@psystap}{\ypositie}
+ {\@@psyoffset}{\scratchdimen}{\yafmeting}{\yoffset}
+ {\@@psyschaal}{\@@psyfactor}%
+ \setbox\nextbox=\hbox
+ {\hskip\xpositie\lower\ypositie\box\nextbox}%
+ \smashbox\nextbox
+ \box\nextbox
+ \egroup
+ \ignorespaces}
+ \hbox}
%I n=Kolommen
%I c=\stelkolommenin,\startkolommen,\kolom
@@ -4878,7 +4032,17 @@
\binnenkolommenfalse
\def\stelkolommenin%
- {\dodoubleargument\getparameters[\??kl]}
+ {\dodoubleargument\dostelkolommenin}
+
+\def\stelkolommenin[#1]%
+ {\getparameters[\??kl][#1]%
+ \nofcolumns=\@@kln\relax
+ \processaction
+ [\@@kllijn]
+ [ \v!aan=>\let\betweencolumns=\linebetweencolumns,
+ \v!uit=>\let\betweencolumns=\spacebetweencolumns,
+ \s!default=>\let\betweencolumns=\spacebetweencolumns,
+ \s!unknown=>\let\betweencolumns=\@@kllijn]}
\def\linebetweencolumns%
{\bgroup
@@ -4932,12 +4096,6 @@
\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}%
@@ -4967,6 +4125,7 @@
\restorecurrentwitruimte}%
%
\edef\fixedcolumnheight{\@@klhoogte}%
+\edef\minbalancetoplines{\@@klnboven}%
\steltolerantiein[\@@kltolerantie]% %% \startkolommen
\stelblankoin[\@@klblanko]%
\ifdim\tussenwit>\!!zeropoint
@@ -5251,1599 +4410,6 @@
\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\ifsubsom \subsomfalse
-\newif\ifsymsom \symsomfalse
-\newif\ifkopsom \kopsomfalse
-\newif\ifsomintro \somintrofalse
-\newif\ifsomautointro \somautointrofalse
-\newif\ifoptimizeitems \optimizeitemstrue
-\newif\ifpackeditems \packeditemsfalse
-\newif\iffirstlist \firstlistfalse
-
-\newcounter \itemcolumndepth
-
-\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!inspringen,
- \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!vanelkaar*=>\packeditemsfalse,
- \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
-\doifvaluesomething{\??op\itemlevel\c!inspringen}
- {\expanded{\stelinspringenin[\getvalue{\??op\itemlevel\c!inspringen}]}}%
- \doifinset{\v!kolommen}{#1}%
- {\ifbinnenkolommen\else\ifnum\itemcolumndepth=0
- \global\let\itemcolumndepth\itemlevel
- \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, % neter \??op\itemlevel\c!n
- \c!hoogte=,
- \c!lijn=\v!uit,
- \c!balanceren=\v!ja,
- \c!uitlijnen=\v!nee]%
- \fi\fi}%
- \doifinsetelse{\v!intro}{#1}
- {\somintrotrue}
- {\somintrofalse}%
- \doglobal\increment\noflists
- \let\currentlist=\noflists
- \newcounter\noflistelements
- \kopsomfalse
- \subsomfalse
- \symsomfalse
- \let\marsymbol=\relax
- \global\let\somdestination=\empty
- \def\symsymbol{}%
- \def\som%
- {\dosom}%
- \def\but[##1]%
- {\gdef\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}% \moexpand, else problems in non-etex with chinese
- %{\edef\@@opsymbool{\getvalue{\??op\c!symbool\s!global\itemlevel}}%
- {\edef\@@opsymbool{\noexpand\getvalue{\??op\c!symbool\s!global\itemlevel}}%
- \getvalue{\??op\v!verder\itemlevel}}
- %{\edef\@@opsymbool{\getvalue{\??op\itemlevel\c!symbool}}%
- {\edef\@@opsymbool{\noexpand\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
- \ifnum\itemcolumndepth=0 \dolistreference \fi % beware !
- \iffirstlist \else \endgroup \fi % toegevoegd, eerte \som opent groep
- \ifnum\itemcolumndepth=\itemlevel\relax
- \stopkolommen
- \doglobal\newcounter\itemcolumndepth
- \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% evt aantal items opslaan per niveau, scheelt zoeken
- {\par
- \ignorespaces
- \increment\noflistelements
- \ifnum\itemcolumndepth=0\relax\ifoptimizeitems
- \ifnum\noflistelements=1 % tgv bv kolommen/nesting
- \findtwopassdata{\s!list}{\noflists:}% % wordt soms de volgorde
- \fi % verstoord, vandaar \find
- \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]}}%
- {\setbox8=\hbox{\naar{\box8}[\somdestination]}}%
- \global\let\somdestination=\empty
- \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}}% problems with \uchar
- {\noexpand\getvalue{\??op\c!symbool\s!local\itemlevel}}%
- \kopsomfalse
- \subsomfalse
- \symsomfalse
- \EveryPar{\ignorespaces}%
- \ignorespaces}
-
-\def\complexdosom[#1]%
- {\par
- \ignorespaces
- \doadvanceitem
- \ifnum\itemcolumndepth=0\relax\ifnum\noflistelements>0\relax
- \dosomebreak\nobreak
- \fi\fi
- \iffirstlist
- \firstlistfalse
- \begingroup
- \ifcase\itemlevel
- \or % 1
- \ifnum\itemcolumndepth=0\relax
- \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}}%
- \strut % added 11-08-99
- \ignorespaces}
-
-\def\complexsom[#1]#2\par%
- {\startopsomming[#1]
- \complexdosom[]\ignorespaces\begstrut#2\unskip\endstrut\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
-% \noindentation}
-
-\def\complexdokop[#1]#2\par% % beter in \complexdosom hangen met een if
- {\iffirstlist\else\dosomebreak\allowbreak\fi
- \ifpackeditems\else\itemuse\c!kopvoor\fi
- \iffirstlist\ifsomintro\else\ifcase\itemlevel % incr in \complexdosom
- %\dosomebreak{\pagina[\v!voorkeur]}% geen \goodbreak ! \allowbreak testen
- \dosomebreak\allowbreak
- \fi\fi\fi
- \complexdosom[#1]{\doattributes{\??op\itemlevel}\c!kopletter\c!kopkleur
- {\ignorespaces#2}}\par
- \dosomebreak\nobreak
- \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}% NAAR BUITENSTE NIVEAU !
- {\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}}% copy ?
-% \@@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\@@definitielinkspure#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \leftskip\@@leftdefinitieskip
- \rightskip\@@rightdefinitieskip
- \advance\leftskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedright
- \advance\leftskip by \!!widthb
- \llap
- {\hbox to \leftskip
- {\hskip\@@leftdefinitieskip
- \copy\@@definitiebox\hss}}%
- \@@dodefinitie{#1}}
-
-\def\@@definitierechtspure#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}%
- \leftskip\@@leftdefinitieskip
- \rightskip\@@rightdefinitieskip
- \advance\rightskip by \!!widtha
- \@@makedefinitiepurebox{#1}\raggedleft
- \rlap
- {\hskip\hsize
- \hskip-\leftskip
- \hskip-\rightskip
- \copy\@@definitiebox
- \hskip\@@rightdefinitieskip}%
- \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!boven}#1[#2]#3%
- {%\pagina[\v!voorkeur]% % Weg ermee!
- %\dosomebreak{\goodbreak}% % Dit is beter en nodig!
- \dohandelpaginaafX1 % En dit moet het maar worden.
- \@@dostartdefinitie{#1}[#2]{\let\\=\space#3}%
- \copy\@@definitiebox\par
- \nobreak
- \getvalue{\??dd#1\c!tussen}%
- \nobreak
- \@@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
- \hskip\!!widthb % toegevoegd
- \@@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}}
-
-\setvalue{@@definitie\v!hangend}#1[#2]#3%
- {\@@dostartdefinitie{#1}[#2]{#3}% % adds \c!marge to \leftskip
- \advance\leftskip by -\leftskipadaption
- \ifdim\leftskipadaption=\!!zeropoint
- \leftskipadaption=1.5em % just some default
- \ifnum\insidedefinition=1 \ifdim\leftskip>\!!zeropoint
- \leftskipadaption=\leftskip
- \fi \fi
- \fi
- \ifnum\insidedefinition=1
- \advance\leftskip by \leftskipadaption
- \fi
- \hskip-\leftskipadaption
- \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}}}}}}%
-% \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}
-
-%D A new key 'titeluitlijnen' in definitions.
-
-\chardef\insidedefinition=0
-
-\let\@@leftdefinitieskip \!!zeropoint
-\let\@@rightdefinitieskip\!!zeropoint
-
-\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}%
- \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
- \doifelsevalue{\??dd#1\c!titeluitlijnen}{\v!nee}
- {\edef\@@leftdefinitieskip {\the\leftskip }%
- \edef\@@rightdefinitieskip{\the\rightskip}}
- {\ifcase\insidedefinition
- \edef\@@leftdefinitieskip {\the\leftskip }%
- \edef\@@rightdefinitieskip{\the\rightskip}%
- \fi}%
- \ifcase\insidedefinition
- \chardef\insidedefinition=1
- \or
- \chardef\insidedefinition=2
- \fi
- \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}} % geen spatie
-
-\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\special@@definitiewoord#1#2#3#4[#5]#6#7%
- {\strut
- \doifelsevalue{\??dd#1\c!nummer}{\v!nee}
- {\!!doneafalse}
- {\doifelse{#5}{-}
- {\!!doneafalse}
- {\!!doneatrue}}%
- \chardef\definitiekoppeling=0
- \iflocation
- \doifvaluesomething{\??dd#1\c!koppeling}
- {\processaction % genereert > of <
- [\getvalue{\??dd#1\c!koppelwijze}]
- [ \v!lokaal=>\chardef\definitiekoppeling=1, % old: default
- \v!globaal=>\chardef\definitiekoppeling=2]}% new: global crosslinking
- \fi
- \stelnummerin % the number is called indirectly
- [\getvalue{\??dd#1\??dd\c!nummer}]
- [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]%
- \if!!donea
- \getvalue{\e!volgende#2#1}%
- \iflocation
- \bgroup
- \setvalue{\??dd#1\c!sectienummer}{\v!ja}%
- \protectconversion
- %\maakvoorafgaandenummer[#1]%
- \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
- \ifcase\definitiekoppeling \or
- \xdef\internaldoornummer{#3{#1}}%
- \rawreference{\s!num}{#1:\internaldoornummer}{}%
- \or
- \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}%
- \rawreference{\s!num}{#1:\internaldoornummer}{}%
- \fi
- \egroup
- \fi
- %\maakvoorafgaandenummer[#1]%
- \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
-%\getvalue{\??dd#1\c!commando}{%
- \hbox
- {\let\normalkap\relax % sorry, uppercase causes troubles
- \doattributes % \nocase primitive needed
- {\??dd#1}\c!kopletter\c!kopkleur
- {\showdntext{#2#1}%
- \domakednnummer#3{#1}%
- \getvalue{\??dd#1\c!afsluiter}}%
- \iflocation\ifcase\definitiekoppeling \else
- \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
- \doifreferencefoundelse{\localconnection}
- {\in[\localconnection]}{}% genereert > of <
- %\in[\localconnection]%
- \fi\fi}%
- \doifnot{#5}{-}{\rawreference{\s!num}{#5}{#3{#1}}}%
-%}%
- \else
-%\getvalue{\??dd#1\c!commando}{%
- \edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded
- \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur
- {\!!stringa}}%
- \doifnot{#5}{-}{\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%
- {\makecounter{\??dd\c!koppeling#1}% new: global cross linking
- \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=,\c!koppelwijze=\v!lokaal,#4]}%
- {\doifelsenothing{#4}
- {\getparameters[\??dd#3#1]%
- [\c!tekst=#1,\??dd\c!nummer=#1,\c!conversie=,
- \c!links=,\c!rechts=,\c!koppeling=,\c!koppelwijze=,#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,\c!koppelwijze]%
- \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]%
- {\pluscounter{\??dd\c!koppeling#1}% new: global crosslinking
- \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,
@@ -6971,6 +4537,8 @@
% \tolerance >= 1500 % was 200
% \raggedness = 2 .. 6\korpsgrootte
+\chardef\raggedstatus=0 % normal left center right
+
\def\leftraggedness {2\bodyfontsize}
\def\rightraggedness {2\bodyfontsize}
\def\middleraggedness {6\bodyfontsize}
@@ -6986,71 +4554,72 @@
\let\updateraggedskips\relax
-\def\setraggedskips#1#2#3#4#5#6% never change this name
+\def\setraggedskips#1#2#3#4#5#6#7% never change this name
{\def\updateraggedskips%
- {\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}}%
+ {\dosetraggedskips{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
\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\dosetraggedskips#1#2#3#4#5#6#7%
+ {\chardef\raggedstatus=#1\relax
+ \leftskip=1\leftskip\!!plus#2\relax % zie: Tex By Topic 8.1.3
+ \rightskip=1\rightskip\!!plus#3\relax % zie: Tex By Topic 8.1.3
+ \spaceskip#4\relax
+ \xspaceskip#5\relax
+ \parfillskip\!!zeropoint\!!plus#6\relax
+ \parindent#7\relax}
\def\notragged%
- {\setraggedskips{0em}{0em}{0em}{0em}{1fil}{\parindent}}
+ {\setraggedskips{0}{0em}{0em}{0em}{0em}{1fil}{\parindent}}
\def\raggedleft%
{\setraggedness\leftraggedness
- \setraggedskips{\leftraggedness}{0em}{.3333em}{.5em}{0em}{0em}}
+ \setraggedskips{1}{\leftraggedness}{0em}{.3333em}{.5em}{0em}{0em}}
\def\raggedcenter%
{\setraggedness\middleraggedness
- \setraggedskips{\middleraggedness}{\middleraggedness}{.3333em}{.5em}{0em}{0em}}
+ \setraggedskips{2}{\middleraggedness}{\middleraggedness}{.3333em}{.5em}{0em}{0em}}
%D We used to have:
%D
%D \starttypen
%D \def\raggedright%
%D {\setraggedness\rightraggedness
-%D \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}}
+%D \setraggedskips{3}{0em}{\rightraggedness}{.3333em}{.5em}{0em}{\parindent}}
%D \stoptypen
%D
%D However, the next alternative, suggested by Taco, is better.
\def\raggedright%
{\setraggedness\rightraggedness
- \setraggedskips{0em}{\rightraggedness}{.3333em}{.5em}{1fil}{\parindent}}
+ \setraggedskips{3}{0em}{\rightraggedness}{.3333em}{.5em}{1fil}{\parindent}}
\def\veryraggedleft%
- {\setraggedskips{1fil}{0em}{.3333em}{.5em}{0em}{0em}}
+ {\setraggedskips{1}{1fil}{0em}{.3333em}{.5em}{0em}{0em}}
%D When we want the last line to have a natural width:
%D
%D \starttypen
%D \def\veryraggedleft%
-%D {\setraggedskips{1fil}{0em}{.3333em}{.5em}{0em}{-1fil}}
+%D {\setraggedskips{1}{1fil}{0em}{.3333em}{.5em}{0em}{-1fil}}
%D \stoptypen
%D
%D but this one is not accepted by the macros.
\def\veryraggedcenter%
- {\setraggedskips{1fil}{1fil}{.3333em}{.5em}{0em}{0em}}
+ {\setraggedskips{2}{1fil}{1fil}{.3333em}{.5em}{0em}{0em}}
\def\veryraggedright%
- {\setraggedskips{0em}{1fil}{.3333em}{.5em}{0em}{\parindent}}
+ {\setraggedskips{3}{0em}{1fil}{.3333em}{.5em}{0em}{\parindent}}
\def\ttraggedright%
{\tttf
- \setraggedskips{0em}{\rightraggedness}{0em}{0em}{0em}{\parindent}} % {\voorwit}}
+ \setraggedskips{3}{0em}{\rightraggedness}{0em}{0em}{0em}{\parindent}} % {\voorwit}}
%D A bonus one:
\def\raggedwidecenter%
{\setraggedness\middleraggedness
- \setraggedskips{.5fil}{.5fil}{.3333em}{.5em}{0em}{0em}}
+ \setraggedskips{2}{.5fil}{.5fil}{.3333em}{.5em}{0em}{0em}}
\def\dodosteluitlijnenin[#1]%
{\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}%
@@ -7061,6 +4630,9 @@
\v!onder=>\raggedbottom,
\v!hoogte=>\normalbottom,
\v!breedte=>\notragged,
+ \v!normaal=>\notragged,
+ \v!ja=>\notragged,
+ \v!nee=>\raggedright,
\v!binnen=>\setraggedparagraphmode\raggedleft\raggedright,
\v!buiten=>\setraggedparagraphmode\raggedright\raggedleft,
\v!links=>\if!!donea\veryraggedleft \else\raggedleft \fi,
@@ -7500,12 +5072,23 @@
\doglobal\newcounter\margincontent
\egroup}
+\def\docomplexmargewoord#1#2#3%
+ {\@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA
+ {\@EA\stelinmargein\@EA[\margincontent][]% see next macro
+ \flushmargincontent[#1][#2]{#3}}}
+
\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}}}
+ \ifsecondargument
+ \doifnumberelse{#1}
+ {\docomplexmargewoord{#2}{#1}{#3}}
+ {\docomplexmargewoord{#1}{#2}{#3}}%
+ \else
+ \doifnumberelse{#1}
+ {\docomplexmargewoord{}{#1}{#3}}
+ {\docomplexmargewoord{#1}{}{#3}}%
+ \fi}
\def\margewoordpositie[#1]#2%
{\ifnum#1>\margincontent
@@ -7657,7 +5240,7 @@
% dit zijn voorlopig lokale commando's
-\def\woordinlinker {\inlinkermarge} % vervallen
+\def\woordinlinker {\inleftmargin} % vervallen
\def\woordinrechter{\inrechtermarge} % vervallen
\def\woordinmarge%
@@ -7881,14 +5464,18 @@
%\fi
\od
\filluparrangedpages},
- \s!unknown=>\doifnumberelse{#1}
- {\ejectinsert
- \ejectpage
- \loop
- \ifnum\userpageno<#1\relax
- \insertdummypage
- \repeat}
- {}]%
+ \s!unknown=>\doifinstringelse{+}{#1}
+ {\ejectinsert\ejectpage
+ \dorecurse{#1}{\insertdummypage}}
+ {\doifnumberelse{#1}
+ {\ejectinsert\ejectpage
+ \doloop
+ {\ifnum\userpageno<#1\relax
+ \insertdummypage
+ \else
+ \exitloop
+ \fi}}
+ {}}]%
\egroup}
\def\complexpagina[#1]%
@@ -8197,8 +5784,8 @@
\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
+ {\hbox % \hss's niet meer wijzigen
+ {\hbox to \linkerrandbreedte
{\hsize\linkerrandbreedte
\hss\getvalue{\??tk#1\v!rand#2}}%
\hskip\linkerrandafstand
@@ -8342,28 +5929,28 @@
\vskip-\bovenhoogte
\vskip-\bovenafstand
\plaatsbovenregel
-\vskip-\bovenhoogte
-\plaatsboventekstblok
+ \vskip-\bovenhoogte
+ \plaatsboventekstblok
\vskip\bovenafstand
\plaatshoofdregel
\vskip\hoofdafstand
-\plaatspositieanchors
-\vskip-\teksthoogte
+ \placepositionanchors
+ \vskip-\teksthoogte
\plaatstekstregel
\vskip\voetafstand
\plaatsvoetregel
\vskip\onderafstand
\plaatsonderregel
-\vskip-\onderhoogte
-\plaatsondertekstblok
+ \vskip-\onderhoogte
+ \plaatsondertekstblok
\plaatsversieaanduiding
\vfilll}%
\smashbox0
\box0
\egroup}
-\ifx\undefined\plaatspositieanchors
- \def\plaatspositieanchors{\vskip\teksthoogte}
+\ifx\undefined\placepositionanchors
+ \def\placepositionanchors{\vskip\teksthoogte}
\fi
%\def\@@plaatspaginascheider%
@@ -8460,14 +6047,6 @@
{\setvalue{#1\getvalue{\??by##1}\v!nummer}{\v!ja}}}%
\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\dopaginaprefix#1#2%
{\let\normaluchar\uchar\let\uchar\relax % ugly but needed
\doifelsevalue{#1#2\v!nummer}{\v!ja} % \v! and no \c!
@@ -8519,1338 +6098,6 @@
\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{\unknown\ }%
- \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}%
-% \honorunexpanded
-% \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}
-\setvalue{\??by\v!per\v!pagina}{\v!tekst} % see footnotes
-
-\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}}}
-
-% suited for chinese too:
-
-\def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber
- {\ifnum#2=0 0\else % else troubles with \uchar
- \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
- \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
- #2%
- \else
- \getvalue{\??cv\getvalue{\??se#1\c!conversie}}{#2}%
- \fi
- \else
- \getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}{#2}%
- \fi
- \fi}
-
-\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
- \global\let\currentlevel\empty
- \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
- \global\let\currentlevel\empty}
- {\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
- \global\let\currentlevel\empty
- \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}
-
-\let\currentlevel\empty
-
-\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}
-
-% suited for chinese too:
-
-\def\@@shortsectionnumber#1%
- {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax
- \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax
- \@@sectionvalue{#1}%
- \else
- \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
- \fi
- \else
- \@@sectionconversion{#1}{\@@sectionvalue{#1}}%
- \fi}
-
-\def\dosetlocalsectieblok#1#2#3%
- {\def\@@sectiontype{#1}%
- \def\@@sectieblok{#2}%
- \def\@@sectieblokken{#3}}
-
-\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}%
- \getvalue{\??sb#1}%
- \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}
-
-% We used to use the first char as id, but a counter is
-% better, because in english we get a name clash.
-
-\newcounter\currentsectionblock
-
-\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
- \doglobal\increment\currentsectionblock
- \setevalue{\??sb#1}%
- {\noexpand\dosetlocalsectieblok{\currentsectionblock}{#1}{#2}}%
- \setvalue{\e!start#2}%
- {\dostartsectieblok{#1}{#2}}%
- \setvalue{\e!stop#2}%
- {\dostopsectieblok}}
-
-\def\definieersectieblok%
- {\dotripleargument\dodefinieersectieblok}
-
-\def\sectiebloklabel#1#2%
- {\@EA\ifx\csname\??ko#1\@@sectieblok\c!label\endcsname\relax
- \labeltexts{#1}{#2}%
- \else
- \labeltexts{\getvalue{\??ko#1\@@sectieblok\c!label}}{#2}%
- \fi}
-
-\dosetlocalsectieblok{2}{\v!hoofdtekst}{\v!hoofdteksten} % hm, dirty
-
-\def\setsectiontype[#1]%
- {\getvalue{\??sb#1}}
-
-\def\writesection#1#2#3% #3 -> \asciititle
- {\bgroup
- \edef\!!stringa{#1}%
- \@EA\writestatus\@EA
- {\!!stringa}
- {\ifsectienummer#2\else(#2)\fi\normalspace\asciititle}%
- \egroup}
-
-\def\@@koniveau{1} \def\kopniveau{\@@koniveau}
-
-\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\dohandelpaginaafX#1% zie doordefinieren / boven
- {\bgroup
- \!!countb=\@@koniveau
- \advance\!!countb by #1
- \multiply\!!countb by 500
- \!!counta=20000
- \advance\!!counta by \!!countb
- \dosomebreak{\penalty\!!counta}%
- \egroup}
-
-\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}
-% {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}%
-% \doifvaluesomething{\??ko#1\c!tolerantie}
-% {\ExpandFirstAfter\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}%
-% \def\\{\crlf\strut\ignorespaces}}
-
-\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels
- {\forgetall
- \doifvaluesomething{\??ko#1\c!uitlijnen}
- {\expanded{\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}}%
- \doifvaluesomething{\??ko#1\c!tolerantie}
- {\expanded{\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}}%
- \def\\{\crlf\strut\ignorespaces}}
-
-\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]{#1}{#3}{#4}}%
- \else
- \def\next%
- {\dodododosomekop{#1}[#2]{#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}}} % eigenlijk alleen eerste
- {\edef\localkoprefix{\getvalue{\??ko#1\c!prefix}}}%
- \fi
- \doifelsevalue{\??ko#1\c!plaatskop}{\v!ja}
- {\plaatskoptrue}
- {\plaatskopfalse}%
- \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
- \convertexpanded{\??ko#1}{#5}\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}{\asciititle}}%
- \resetsectionmarks[\@@sectie]%
- \stellijstin[\@@koppeling][\c!expansie=\getvalue{\??ko#1\c!expansie}]%
- \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}}
- {\sectiebloklabel{#3}{#4}}
- {#5}
- {\marking[#1]{#5}%
- \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\bepaalkopnummer[#1]}%
- \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}%
- \writesection{#1}{#4}{#5}%
- \else
- \doplaatskoptekst
- {#1}
- {\setsectionlistreference{\@@sectie}{#1}%
- \ExpandFirstAfter\soortpagina[\@@koppeling]%
- \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}%
- \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\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}%
- \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja}
- {\edef\finalsectionnumber{#4}}
- {\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}{\asciititle}}%
- \doschrijfnaarlijst{\@@koppeling}{#4}{#5}{\v!kop}%
- \writesection{#1}{#4}{#5}%
- \else
- \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}
- {\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%
- {\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
- \setupinteraction
- [\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
- \ifautocrossdocument
- \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]%
- \else
- \hbox{\box0}%
- \fi
- \else
- \hbox{\box0}%
- \fi
- \doflushfootnotes}% new
- \endgraf
- \nointerlineskip
- \dosomebreak\nobreak
- #2%
- \else
- \strut
- \doflushfootnotes % new
- \iflocation
- \ifautocrossdocument
- \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
- \else
- \unhbox0
- \global\let\headlastlinewidth\!!zeropoint
- \fi
- #2%
- \dimen0=\numberheaddistance
- \hskip\dimen0 \!!plus \dimen0 \!!minus .25\dimen0
- \hskip\headsignal\ignorespaces
- \fi
- %#2%
- \ifdisplaysectionhead
- \prevdepth\dp\strutbox % important, font related depth, see comment
- \fi
- \stopsynchronisatie
- \egroup
- \egroup
-\doflushfootnotes % new, still needed?
- \ifdisplaysectionhead
- \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}%
- \else
- \nonoindentation % recently added, was a bug
- \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\complexkopnummer[#1]%
- {\bgroup
- \edef\huidigekopnummer{#1}%
- \doifinsetelse{-}{#1}
- {\removefromcommalist{-}\huidigekopnummer
- \setsectieenkoppeling\huidigekopnummer
- \stelsectiein[\@@sectie][\c!vorigenummer=\v!nee]}%
- {\setsectieenkoppeling\huidigekopnummer}%
- \xdef\huidigekopnummer{\@@sectionvalue{\@@sectie}}%
- \doifnot{\huidigekopnummer}{0}{\finalsectionnumber}%
- \egroup}
-
-\def\simplekopnummer%
- {\huidigekopnummer}
-
-\definecomplexorsimple\kopnummer
-
-\def\alinea%
- {\par}
-
-\def\plaatskopalinea#1#2%
- {\vbox{\begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}}
-
-\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!tolerantie=,
- \c!file=,
- \c!expansie=,
- #2]%
- \ConvertToConstant\doifnot{#1}{\getvalue{\??ko#1\c!default}}
- {\doifsomething{\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!tolerantie,\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}]}}%
-% \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]}}
- {\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!tolerantie,\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,
- \v!alinea=>\def\@@plaatskop{\plaatskopalinea},
- \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
@@ -10149,12 +6396,15 @@
\futurelet\next\dobetweenthelines}%
\GotoPar}
+% \def\dobetweenthelines%
+% {\convertcommand \next \to\!!stringa % very ugly and fuzzy
+% \convertargument\obeyedline\to\!!stringb % but needed anyway
+% \ifx\!!stringa\!!stringb % but alas, it fails
+% \@@rgtussen % hopelessly in non
+% \fi} % etex
+
\def\dobetweenthelines%
- {\convertcommand \next \to\!!stringa % very ugly and fuzzy
- \convertargument\obeyedline\to\!!stringb % but needed anyway
- \ifx\!!stringa\!!stringb
- \@@rgtussen
- \fi}
+ {\doifmeaningelse{\next}{\obeyedline}{\@@rgtussen}{}}
\def\stopregels%
{\endgroup
@@ -10162,6 +6412,7 @@
\newcount\linenumber
\newcount\linestepper
+\newif\ifinregelnummeren
% het gebruik van \setlocalreference scheelt een hash entry
@@ -10220,6 +6471,7 @@
\def\startregelnummeren%
{\bgroup
+ \inregelnummerentrue
\complexorsimpleempty\startregelnummeren}
\def\doschrijfregelnummer%
@@ -10386,11 +6638,45 @@
\egroup}
\def\crlf%
- {\ifhmode\unskip\else\strut\fi\hfil\break}
+ {\ifhmode\unskip\else\strut\fi\ifcase\raggedstatus\hfil\fi\break}
\def\opeenregel%
{\def\crlf{\ifhmode\unskip\fi\space}\let\\\crlf}
+\newcount\internalparagraphnumber
+
+\def\stelparagraafnummerenin%
+ {\dosingleempty\dostelparagraafnummerenin}
+
+\def\dostelparagraafnummerenin[#1]%
+ {\getparameters
+ [\??ph][#1]%
+ \processaction
+ [\@@phstatus]
+ [\v!start=>\let\showparagraphnumber\doshowparagraphnumberA,
+ \v!stop=>\let\showparagraphnumber\relax,
+ \v!regel=>\let\showparagraphnumber\doshowparagraphnumberB,
+ \v!reset=>\global\internalparagraphnumber=0
+ \let\showparagraphnumber\doshowparagraphnumberA]}
+
+\def\dodoshowparagraphnumber%
+ {\global\advance\internalparagraphnumber 1
+ \inleftmargin % \tf normalizes em
+ {\tf{\doattributes\??ph\c!letter\c!kleur{\the\internalparagraphnumber}}%
+ \kern\@@phafstand}}
+
+\def\doshowparagraphnumberA%
+ {\ifprocessingverbatim
+ \iflinepar\dodoshowparagraphnumber\fi
+ \else
+ \dodoshowparagraphnumber
+ \fi}
+
+\def\doshowparagraphnumberB%
+ {\ifinregelnummeren
+ \doshowparagraphnumberA
+ \fi}
+
%I n=Opmaak
%I c=\definieeropmaak,\testopmaak,\startstandaardopmaak
%I
@@ -10696,6 +6982,7 @@
[ \v!links=>\let\raggedbox\regellinks,
\v!rechts=>\let\raggedbox\regelrechts,
\v!midden=>\let\raggedbox\regelmidden,
+ \v!normaal=>\let\raggedbox\hbox,
\s!default=>\let\raggedbox\hbox,
\s!unknown=>\let\raggedbox\hbox]}
@@ -10706,7 +6993,7 @@
\v!rechts=>\def\raggedcommand{\raggedright},
\v!midden=>\def\raggedcommand{\raggedcenter},
\v!nee=>\def\raggedcommand{\raggedright},
-% \v!normaal=>\let\raggedcommand\relax,
+ \v!normaal=>\let\raggedcommand\relax,
\s!default=>\def\raggedcommand{\raggedcenter},
\s!unknown=>\let\raggedcommand\relax]}
@@ -11027,6 +7314,7 @@
\everypar ={\flushfootnotes
\ifinner\else\checksidefloat\fi
\checkindentation
+ \showparagraphnumber % here ?
\flushmargincontents
\flushcomments}
\neverypar ={}
@@ -11508,19 +7796,6 @@
% 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
@@ -11958,26 +8233,37 @@
\newbox\captionbox
-\def\putcompletecaption%
- {\mindermeldingen
- \begstrut\dofloatnummer\dofloattekst\endstrut}
+\def\putcompletecaption#1#2#3#4%
+ {\noindent
+ \xdef\floatcaptionnumber{#1}%
+ \doattributes{\??kj#1}\c!letter\c!kleur
+ {\doifvalue{\??kj#1\c!nummer}{\v!ja}
+ {\hbox{\doattributes{\??kj#1}\c!kopletter\c!kopkleur{\strut#2\floatcaptionsuffix}}%
+ \ConvertToConstant\doifnot{#3}{}
+ {\ifcase#4\relax
+ \tfskip\emergencystretch=.5em
+ \else
+ \ifx\@@kjkjtussen\empty\else\unskip\@@kjkjtussen\fi
+ \fi}}%
+ \begstrut#3\endstrut\endgraf}}
\def\dosetpagfloat#1#2#3#4% \copy wegwerken
{\bgroup
\forgetall
+ \postponefootnotes
+ \mindermeldingen
%\showcomposition
\putborderedfloat#4\in4\\%
\def\locatefloat%
{\doregelplaats\@@flflplaats}%
\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}%
+ {\global\setbox\floatbox=\vbox % pas op als wd groter dan hsize
+ {\ifbinnenkolommen\ifdim\wd4>\hsize
+ \let\locatefloat\relax
+ \fi\fi
+ \locatefloat{\box4}}}
+ {\setbox2=\hbox
+ {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}%
\doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag}
{\dimen0=\hsize
\advance\dimen0 by -\wd4\relax
@@ -11992,17 +8278,12 @@
{\forgetall
\hsize=\dimen0\relax
\raggedright
- \begstrut\dofloatnummer
- \ifx\@@kjkjtussen\empty \else
- \unskip\@@kjkjtussen
- \fi
- \dofloattekst
- \endstrut}}
+ \putcompletecaption{#4}{#2}{#3}{1}}}
{\doifelse{\@@kjkjbreedte}{\v!max}
{\dosetraggedvbox{\@@kjkjuitlijnen}%
\setbox2=\raggedbox
{\hsize\wd4\relax
- \putcompletecaption}}
+ \putcompletecaption{#4}{#2}{#3}{0}}}
{\ifdim\wd2>\wd4\relax
\doifelse{\@@kjkjbreedte}{\v!passend}
{\ifdim\wd4<15\korpsgrootte\relax
@@ -12014,12 +8295,18 @@
\setbox0=\vbox
{\forgetall
\hsize=1.0\wd4
- \putcompletecaption}%
+ \footnotesenabledfalse
+ \putcompletecaption{#4}{#2}{#3}{0}}%
\ifdim\ht0>\lineheight\relax
\setbox2=\vbox
{\forgetall
\hsize=0.9\wd4
- \putcompletecaption}%
+ \putcompletecaption{#4}{#2}{#3}{0}}%
+ \else
+ \setbox0=\vbox
+ {\forgetall
+ \hsize=1.0\wd4
+ \putcompletecaption{#4}{#2}{#3}{0}}%
\fi
\else
\setbox0=\vbox
@@ -12028,7 +8315,8 @@
\ifdim\dimen2<\hsize
\hsize=\dimen2\relax
\fi
- \putcompletecaption}%
+ \footnotesenabledfalse
+ \putcompletecaption{#4}{#2}{#3}{0}}%
\ifdim\ht0>\lineheight\relax
\setbox2=\vbox
{\forgetall
@@ -12036,13 +8324,21 @@
\ifdim\dimen2<\hsize
\hsize=\dimen2\relax
\fi
- \putcompletecaption}%
+ \putcompletecaption{#4}{#2}{#3}{0}}%
+ \else
+ \setbox0=\vbox
+ {\forgetall
+ \dimen2=1.5\dimen0\relax
+ \ifdim\dimen2<\hsize
+ \hsize=\dimen2\relax
+ \fi
+ \putcompletecaption{#4}{#2}{#3}{0}}%
\fi
\fi}
{\dosetraggedvbox{\@@kjkjuitlijnen}%
\setbox2=\raggedbox
{\hsize\@@kjkjbreedte
- \putcompletecaption}}%
+ \putcompletecaption{#4}{#2}{#3}{0}}}%
\fi}}%
\global\setbox\floatbox=\vbox
{\forgetall
@@ -12090,34 +8386,30 @@
\def\dosetparfloat#1#2#3#4%
{\bgroup
- %\showcomposition
\forgetall
+ \postponefootnotes
+ \mindermeldingen
+ %\showcomposition
\putborderedfloat#4\in4\\
\ConvertToConstant\doifelse{#3}{\v!geen}
{\global\setbox\floatbox=\vbox{\box4}}
- {\dosetfloatcaption{#4}{#2}{#3}%
- \setbox2=\hbox
- {\forgetall
- \putcompletecaption}%
+ {\setbox2=\hbox
+ {\forgetall\putcompletecaption{#4}{#2}{#3}{0}}%
\doifelse{\@@kjkjbreedte}{\v!max}
{\dosetraggedvbox{\@@kjkjuitlijnen}%
\setbox2=\raggedbox
- {\hsize\wd4
- \putcompletecaption}}
+ {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}%
{\doifelse{\@@kjkjbreedte}{\v!passend}
{\ifdim\wd2>\wd4\relax
\setbox2=\vbox
- {\forgetall
- \hsize\wd4
- \putcompletecaption}%
+ {\forgetall\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}%
\else
\setbox2=\hbox to \wd4
{\hss\box2\hss}%
\fi}
{\dosetraggedvbox{\@@kjkjuitlijnen}%
\setbox2=\raggedbox
- {\hsize\wd4
- \putcompletecaption}}}%
+ {\hsize\wd4\putcompletecaption{#4}{#2}{#3}{0}}}}%
\global\setbox\floatbox=\vbox
{\processaction
[\@@kjkjplaats]
@@ -12158,7 +8450,7 @@
{\setbox\floatbox=\vbox
{\parindent\!!zeropoint
\ifvoorlopig
- \inlinkermarge{\framed{\infofont\the\totalnoffloats}}%
+ \inleftmargin{\framed{\infofont\the\totalnoffloats}}%
\fi
\box\floatbox}}%
\wd\floatbox=\floatwidth
@@ -12567,92 +8859,6 @@
%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
@@ -12709,2252 +8915,6 @@
\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
- \convertexpanded{\??li#1}{#3}\asciilistentry
- \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}%
- {\asciilistentry}%
- {\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%
- {\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!maxbreedte=,
- \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!tussen=,
- \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,\c!tussen,\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% kan iets efficienter met \ifdone
- {\doifvalue{\??li#1\c!label}{\v!ja}{\leftlabeltext{#1}}%
- \strut\splitlistsymbol\getvalue{\??li#1\c!scheider}%
- \doifvalue{\??li#1\c!label}{\v!ja}{\rightlabeltext{#1}}}]}
-
-\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}%
- {\def\dosomelijstelement{\dodofreevlijstelement}}
-
-\setvalue{dodolijstelement\v!vertikaal}%
- {\def\dosomelijstelement{\dodofreevlijstelement}}
-
-\setvalue{dodolijstelement\v!horizontaal}%
- {\def\dosomelijstelement{\dodofreehlijstelement}}
-
-\setvalue{dodolijstelement\v!commando}%
- {\let\dosomelijstelement\dodocommandlijstelement}
-
-% 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\newlineinlist{\space}
-
-\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}
- {\setupinteraction[\c!kleur=,\c!contrastkleur=]}%
- \doattributes{\??li#1}{#2}{#3}}
-
-\def\dodocommandlijstelement#1#2#3#4#5#6%
- {\doifdefinedelse{\??li#1\c!commando}
- {\getvalue{\??li#1\c!commando}
- {#3}{#4}{\paginaprefix\??li#1[#5]\translatednumber[#5]}}
- {[#1: #3 - #4 - \paginaprefix\??li#1[#5]\translatednumber[#5]]}}
-
-\def\dodofreelijstelement#1#2#3#4#5#6#7#8%
- {\def\makelijstelement##1##2%
- {\hbox
- {\doifelsevalue{\??li#1\c!interactie}{##1}
- {\setbox0=\hbox{\showcontrastlocation{\??ia}{#6}{##2}}%
- \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\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]}}}
- {#7%
- \vbox
- {\forgetall
- \makelijstelement\v!alles
- {\makelijstelement\v!sectienummer
- {\dolistattributes{#1}\c!nummerletter\c!nummerkleur
- {\getvalue{\??li#1\c!nummercommando}{\listsymbol}}}%
- \makelijstelement\v!tekst
- {\dolistattributes{#1}\c!tekstletter\c!tekstkleur
- {\let\\=\newlineinlist
- \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]}}}}}}}%
- #8}%
- \getvalue{\??li#1\c!na}}
-
-\def\dodofreehlijstelement#1#2#3#4#5#6%
- {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6}
- {\noindent}{}}
-
-\def\dodofreevlijstelement#1#2#3#4#5#6% % \nointerlineskip nodig,
- {\dodofreelijstelement{#1}{#2}{#3}{#4}{#5}{#6} % anders verkeerde spatiering
- {\ifvmode\nointerlineskip\fi} % bij multi-line lijsten
- {\nointerlineskip\endgraf\allowbreak}} %
-
-\def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden
- {\endgraf
- \leftskip=\getvalue{\??li#1\c!marge}% na de \endgraf !
- \getvalue{\??li#1\c!voor}%
- \doifelsevalue{\??li#1\c!breedte}{\v!passend}
- {\!!widtha=\!!zeropoint}
- {\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}{\box0}}%{\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
- {\let\\=\newlineinlist
- \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}{\box0}}%{\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
- {\let\\=\newlineinlist
- \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
- {\setupinteraction[\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
- \let\\=\newlineinlist
- \setbox0=\hbox
- {#2{\showcontrastlocation{\??ia}{#8}
- {\dostartattributes{\??li#3}\c!letter\c!kleur{}%
- \ignorespaces\dontconvertfont\setstrut
- \begstrut
- \doifelsenothing{\??li#3\c!maxbreedte}
- {\getvalue{\??li#3\c!tekstcommando}{#6}}
- {\getvalue{\??li#3\c!tekstcommando}{\limitatetext{#6}{\getvalue{\??li#3\c!maxbreedte}}{\unknown}}}%
- \endstrut % struts new
- \dostopattributes}}}%
- \linklisttoelement{#3}{#4}{#7}{#8}{\box0}}%{\copy0}}%
- \par
- \getvalue{\??li#3\c!tussen}}
-
-\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
- {\let\\=\newlineinlist
- \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]%
- {\hbox\bgroup % the \hbox is needed to bypass
- \let\referenceprefix=\empty % \dontleavehmode in \naarbox
- \setupinteraction[\c!kleur=,\c!contrastkleur=,\c!strut=]%
- \setupreferencing[\c!prefix=]%
- \naarbox{\hbox{\ignorespaces#1}}[#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}
-% {\doglobal\increment\referencecounter
-% \referentiebutton
-% {#3%
-% \pagereference[\r!from\referencecounter]%
-% \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
-% [\r!to\referencecounter]}
-% {#3}}
-
-\def\schrijfnaarreferentielijst[#1]#2% #1=class #2=data #3=visualization
- {\dowithnextbox
- {\doifelsevalue{\??rl#1\c!status}{\v!start}
- {\doglobal\increment\referencecounter % must be resolved due to #2
- \referentiebutton
- {\box\nextbox
- \pagereference[\r!from\referencecounter]%
- \doschrijfnaarreferentielijst{#1}{\referencecounter}{#2}}%
- [\r!to\referencecounter]}
- {\box\nextbox}}
- \hbox} % \vbox ?
-
-\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}{}{\unknown}{#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}}} % 3 argumenten
- {\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
- \convertexpanded{\??sm#1}{#3}\asciisynonym
- \convertexpanded{\??sm#1}{#4}\asciimeaning
- \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {\asciimeaning}}%
- \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}} % 1 argument
- {\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
- \convertexpanded{\??so#1}{#3}\asciisynonym
- \immediatewriteutility{s e {#1} {#2} {\asciisynonym} {}}%
- \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}}
-%
-% Better because it catches nested logo's:
-
-\def\executesort#1#2#3%
- {\bgroup
- \def\executesort##1##2##3{##3}% Trick needed for nested logo's.
- \preexecutesort{#1}{#2}{#3}%
- \processsort{#1}{#3}{#2}%
- \egroup}
-
-\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=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}%
- %{\immediate\openout\tmpblocks=\bufferprefix\jobname.\f!temporaryextension}
- %{\immediate\openout\tmpblocks=\bufferprefix#1.\f!temporaryextension}%
- {\immediate\openout\tmpblocks=\TEXbufferfile{\jobname}}
- {\immediate\openout\tmpblocks=\TEXbufferfile{#1}}%
- \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 #1.tmp
-
-\def\setbuffer[#1]#2\endbuffer%
- {\immediate\openout\tmpblocks=\TEXbufferfile{#1}%
- \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{\TEXbufferfile{##1}}{}{}%
- \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=\TEXbufferfile{\f!utilityfilename}}
-
-\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{\TEXbufferfile{\f!utilityfilename}}{}{}}
-
-\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
@@ -15000,34 +8960,9 @@
\newbox\leftbackground
\newbox\rightbackground
-% \getvalue{\??ma#1\c!commando} is obsolete; replaced by overlay
-%
-% \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\doaddpagebackground#1#2%
-% {\doifvaluesomething{\??ma#1\c!achtergrond}
-% {\edef\setpagebackgrounddepth%
-% {\dp#2=\the\dp#2}%
-% \setbox#2=\vbox\localframed
-% [\??ma#1]
-% [\c!strut=\v!nee,\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
-% {\dp#2=\!!zeropoint\box#2}%
-% \setpagebackgrounddepth}}
-
\def\ifsomebackgroundfound#1%
{\edef\!!stringe{\??ma#1}%
- \doifelsevaluenothing{\!!stringe\c!achtergrond}
+ \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
@@ -15048,7 +8983,8 @@
{\dp#2=\the\dp#2}%
\setbox#2=\vbox\localframed
[\??ma#1]
- [\c!strut=\v!nee,\c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
+ [\c!strut=\v!nee,\c!offset=\v!overlay,
+ \c!breedte=\papierbreedte,\c!hoogte=\papierhoogte]
{\dp#2=\!!zeropoint\box#2}%
\setpagebackgrounddepth
\fi}
@@ -15077,7 +9013,7 @@
\localframed
[\??ma#3#4]
[\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay]
- {\getvalue{\??ma#3#4\c!commando}}%
+ {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....}
\else
\hskip#1%
\fi}
@@ -15186,35 +9122,6 @@
\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\dostelachtergrondenin[#1][#2][#3]%
{\ifthirdargument
\docheckbackgrounddefinitions
@@ -15537,16 +9444,6 @@
\xdef\texcommentsymbol{%}
\egroup
-%\def\loadoptionfile% tzt \unlinkfile
-% {\readjobfile{\f!optfilename}
-% {\showmessage{\m!systems}{2}{\f!optfilename}}%
-% {}%
-% \doiffileelse{\f!optfilename}
-% {\immediate\openout\scratchwrite=\f!optfilename
-% \immediate\write\scratchwrite{\texcommentsymbol\space see backup copy}%
-% \immediate\closeout\scratchwrite}
-% {}}
-
\def\loadoptionfile%
{\readjobfile{\jobname.\f!optionextension}
{\showmessage{\m!systems}{2}{\jobname.\f!optionextension}}%
@@ -15567,15 +9464,18 @@
\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 \setupfootnotes \to \everyjob % pas op: hangt af van korps
+\appendtoks \pagina[\v!laatste] \pagina \to \everybye
+\appendtoks \ifarrangingpages\poparrangedpages\fi \to \everybye
\appendtoks \registreerfileinfo[end]{\jobname} \to \everybye
-\appendtoks \stopcopyingblocks \to \everybye
-\appendtoks \closeutilities \to \everybye
-\appendtoks \closespecialfile \to \everybye
+
+\appendtoks \savenofpages \to \everybye
+\appendtoks \savenofsubpages \to \everybye
+
+\appendtoks \closeutilities \to \everygoodbye
+\appendtoks \stopcopyingblocks \to \everygoodbye
+\appendtoks \closespecialfile \to \everygoodbye
\appendtoks \checkreferences \to \everystarttext % nieuw 4-12-1999
@@ -15595,8 +9495,10 @@
{\doglobal\decrement\textlevel\relax
\ifnum\textlevel>0 \else
\the\everystoptext
- \the\everybye
- \expandafter\normalend
+ %\the\everybye %
+ %\the\everygoodbye % == \end (new)
+ %\expandafter\normalend %
+ \expandafter\end
\fi}
\let\normalend=\end
@@ -15604,6 +9506,9 @@
\def\end%
{\ifnum\textlevel>0 \else
\the\everybye
+ \the\everygoodbye
+ \global\everygoodbye\emptytoks % rather unneeded
+ \global\everybye\emptytoks % but for sure
\expandafter\normalend
\fi}
@@ -15628,7 +9533,7 @@
{\def\startomgeving ##1 {}%
\let\stopomgeving=\relax
\startreadingfile
- \readlocfile{#1}{}{}%
+ \processfile{#1}% \readlocfile{#1}{}{}%
\stopreadingfile}
\newcounter\filelevel
@@ -15645,15 +9550,6 @@
\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
@@ -15798,6 +9694,8 @@
\def\versie%
{\dosingleargument\doversie}
+% this will be inserts some day
+
\newbox\referentieinfobox
\newbox\registerinfobox
\newbox\floatinfobox
@@ -15816,7 +9714,7 @@
\strut
\expandafter\doboundtext\expandafter
{\extratestinfo}
- {8em}
+ {12em}
{..}%
\quad}}}%
\endgroup
@@ -16004,7 +9902,9 @@
\c!commandos=,
\c!letter=,
#2]%
- \setvalue{#1}%
+% \setvalue{\e!stel#1\e!in}[##1]%
+% {\dodoubleargument\getparameters[\??be##1]}%
+ \unexpanded\setvalue{#1}%
{\groupedcommand
{\getvalue{\??be#1\c!commandos}%
\dostartattributes{\??be#1}\c!letter\c!kleur}
@@ -16021,21 +9921,9 @@
\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]}
+\def\stelstartstopin[#1]%
+ {\dodoubleargument\getparameters[\??be#1]}
% gejat van Knuth (zie \copyright, p356)
@@ -16132,6 +10020,7 @@
\c!rechterrand=\@@lyrand,
\c!kopoffset=\!!zeropoint,
\c!rugoffset=\!!zeropoint,
+ \c!tekstbreedte=, % dangerous here \tekstbreedte
\c!letter=,
\c!markering=\v!uit,
\c!plaats=\v!enkelzijdig,
@@ -16141,7 +10030,9 @@
\c!dx=\!!zeropoint,
\c!dy=\!!zeropoint,
\c!grid=\v!nee,
- \c!regels=]
+ \c!regels=,
+ \c!snijwit=,
+ \c!bodemwit=]
% instellingen hierop terugvallen, bijvoorbeeld de volgende:
@@ -16219,6 +10110,7 @@
\stelkolommenin
[\c!n=2,
+ \c!nboven=1,
\c!commando=,
\c!richting=\v!rechts,
\c!lijn=\v!uit,
@@ -16265,7 +10157,7 @@
\stelbovenin [\c!voor=\vss,\c!na=\vss]
\stelonderin [\c!voor=\vss,\c!na=\vss]
-\stelhoofdin
+\stelhoofdin % \get??tk#1#2#3 would save quite some 3K in fmt size
[\v!tekst]
[\c!strut=\v!ja,
\c!letter=,
@@ -16522,23 +10414,6 @@
\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]
@@ -16554,164 +10429,6 @@
\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]
- \c!default=\v!sub\v!paragraaf] % nieuw
-
-\definieerkop
- [\v!sub\v!sub\v!sub\v!paragraaf]
- [\c!sectie=\v!sectionlevel-6,
- %\c!default=\v!paragraaf]
- \c!default=\v!sub\v!sub\v!paragraaf] % nieuw
-
-\definieerkop
- [\v!sub\v!sub\v!sub\v!sub\v!paragraaf]
- [\c!sectie=\v!sectionlevel-7,
- %\c!default=\v!paragraaf]
- \c!default=\v!sub\v!sub\v!sub\v!paragraaf] % nieuw
-
-\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]
-
-\stelkopin % nieuw
- [\v!sub\v!paragraaf]
- [\c!pagina=]
-
-\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,
@@ -16769,53 +10486,6 @@
\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!inspringen=, % untouched if empty
- \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,
- \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=\unknown,
- \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=,
@@ -16871,6 +10541,12 @@
\c!prefix=,
\c!refereren=\v!aan]
+\stelparagraafnummerenin
+ [\c!status=\v!stop,
+ \c!letter=,
+ \c!kleur=,
+ \c!afstand=\ifregelnummersinmarge2em\else\!!zeropoint\fi]
+
\definieeropmaak
[\v!standaard]
[\c!breedte=\zetbreedte,
@@ -16896,50 +10572,6 @@
\c!tussen=\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]
@@ -16979,34 +10611,6 @@
[\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,
@@ -17033,56 +10637,14 @@
\c!achtergrond=,
\c!raster=\@@rsraster,
\c!kleur=,
- \c!kaderoffset=\getvalue{\??ma\v!pagina\c!offset},
+ \c!kaderoffset=\getvalue{\??ma\v!pagina\c!offset},
\c!achtergrondoffset=\getvalue{\??ma\v!pagina\c!offset},
- \c!offset=\!!zeropoint,
+ \c!offset=\!!zeropoint, % later set to \v!overlay, watch out !
\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
-
+\protect \endinput
diff --git a/tex/context/base/core-01b.tex b/tex/context/base/main-002.tex
index 49ffc182f..169f5a0aa 100644
--- a/tex/context/base/core-01b.tex
+++ b/tex/context/base/main-002.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=core-01b,
+%D [ file=main-002,
%D version=1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=1B (to be split),
@@ -11,7 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Core Macros (b)}
+%D This module is still to be split and documented.
+
+\writestatus{loading}{Context Core Macros (2)}
\unprotect
@@ -412,8 +414,7 @@
%I
%I Instelling vindt plaats met het commando:
%I
-%I \steltabin[monster=,breedte=,kopletter=,voor,
-%I na=]
+%I \steltabin[monster=,breedte=,kopletter=,voor,na=]
%I
%I Dit commando is een vereenvoudigde variant van het
%I commando \doordefinieren. In de regel kan volstaan
@@ -724,17 +725,6 @@
\def\startcitaat%
{\dosingleempty\dostartcitaat}
-% \def\dohandlequotation#1%
-% {\ifdim\lastkern=\quotationsignal
-% \unskip
-% \hskip\quotationskip
-% \fi
-% \strut % new, needed below
-% \getvalue{\??la\currentlanguage#1}%
-% \kern\quotationsignal}
-
-%D Better hyphenation (\prewordbreak look alike added):
-
\def\dohandlequotation#1%
{\ifdim\lastskip=\quotationsignal
\unskip\hskip\quotationskip
@@ -784,24 +774,6 @@
% 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}}
@@ -842,224 +814,6 @@
\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
@@ -1311,51 +1065,6 @@
\def\kenmerkdatum%
{\currentdate[\v!kenmerk]}
-% \def\dokenmerk[#1]%
-% {\geenhoofdenvoetregels
-% \getparameters
-% [\??km]
-% [\c!bet=\unknown,
-% \c!dat=\unknown,
-% \c!ken=\unknown,
-% \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\dokenmerk[#1]%
{\geenhoofdenvoetregels
\bgroup
@@ -1371,15 +1080,15 @@
\assigntranslation[nl=datum, en=date, du=Datum, sp=fecha]\to\@@@kmdat
\assigntranslation[nl=kenmerk, en=mark, du=Kennzeichen,sp=]\to\@@@kmken
%
- \definetabulate[\s!dummy][|le|p|]
+ \definetabulate[\s!dummy][|l|p|]
\startdummy
- \NC\@@@kmbet\NC\@@kmbet\NC\NR
- \NC\@@@kmdat\NC\@@kmdat\NC\NR
- \NC\@@@kmken\NC\kap{\@@kmken}\NC\NR
+ \NC\@@@kmbet\EQ\@@kmbet\NC\NR
+ \NC\@@@kmdat\EQ\@@kmdat\NC\NR
+ \NC\@@@kmken\EQ\kap{\@@kmken}\NC\NR
\doifsomething{\@@kmvan\@@kmaan}{\NC\NC\NC\NR}%
- \doifsomething{\@@kmvan}{\NC\@@@kmvan\NC\@@kmvan\NC\NR}%
- \doifsomething{\@@kmaan}{\NC\@@@kmaan\NC\@@kmaan\NC\NR}%
- \doifsomething{\@@kmref}{\NC\NC\NC\NR\NC\@@@kmref\NC\@@kmref\NC\NR}%
+ \doifsomething{\@@kmvan}{\NC\@@@kmvan\EQ\@@kmvan\NC\NR}%
+ \doifsomething{\@@kmaan}{\NC\@@@kmaan\EQ\@@kmaan\NC\NR}%
+ \doifsomething{\@@kmref}{\NC\NC\NC\NR\NC\@@@kmref\EQ\@@kmref\NC\NR}%
\stopdummy
\egroup}
@@ -1439,41 +1148,9 @@
\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,
diff --git a/tex/context/base/core-01c.tex b/tex/context/base/main-003.tex
index a22e76427..989e6a792 100644
--- a/tex/context/base/core-01c.tex
+++ b/tex/context/base/main-003.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=core-01c,
+%D [ file=main-003,
%D version=1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=1C (to be split),
@@ -11,7 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\writestatus{loading}{Context Core Macros (c)}
+%D This module is still to be split and documented.
+
+\writestatus{loading}{Context Core Macros (3)}
\unprotect
@@ -272,67 +274,6 @@
\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,
@@ -348,13 +289,34 @@
\bgroup&\hfil##\hfil&\tabskip\!!zeropoint \!!plus 1fill##\cr
\docombinatie}
-\def\docombinatie%
- {\dowithnextbox
+% \def\docombinatie%
+% {\dowithnextbox
+% {\setbox0=\box\nextbox
+% \dowithnextbox
+% {\setbox2=\box\nextbox
+% \dodocombinatie}
+% \hbox}
+% \hbox}
+
+\def\docombinatie% we want to add struts but still ignore an empty box
+ {\dowithnextbox%
{\setbox0=\box\nextbox
\dowithnextbox
{\setbox2=\box\nextbox
\dodocombinatie}
- \hbox}
+ \vtop\bgroup
+ \def\next%
+ {\futurelet\nexttoken\nextnext}
+ \def\nextnext%
+ {\ifx\nexttoken\egroup \else % the next box is empty
+ \hsize\wd0
+ \steluitlijnenin[\@@couitlijnen]
+ \bgroup
+ \aftergroup\endstrut
+ \aftergroup\egroup
+ \begstrut
+ \fi}
+ \afterassignment\next\let\nexttoken=}
\hbox}
\def\dodocombinatie%
@@ -364,11 +326,12 @@
{\copy0}%
\ifdim\ht2>\!!zeropoint\relax % beter dan \wd2, nu \strut mogelijk
\@@cotussen
- \vtop
- {\nointerlineskip % recently added
- \hsize\wd0
- \steluitlijnenin[\@@couitlijnen]% % \raggedcenter
- \begstrut\unhbox2\endstrut}%
+ %\vtop
+ % {\nointerlineskip % recently added
+ % \hsize\wd0
+ % \steluitlijnenin[\@@couitlijnen]% % \raggedcenter
+ % \begstrut\unhbox2\endstrut}%
+ \box2
\fi}%
\ifnum\totcombinatie>1
\global\advance\totcombinatie by -1
@@ -413,15 +376,6 @@
{\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\doplaatsondernaastelkaar%
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index e2664de00..3df62fa62 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
%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
@@ -20,8 +20,8 @@
%D the words left of the \type{:} are in dutch. In the near
%D future english will be the core language.}
%D
-%D The German translations were provided by Tobias Burnus,
-%D and the Czech ones by Tom Hudec.
+%D The German translations were provided by Tobias Burnus,
+%D and the Czech ones by Tom Hudec.
\writestatus{loading}{Context Multilingual Macros / Commands}
@@ -82,7 +82,7 @@
stopcoding: stopcodering stopcoding
stopkodierung stopkodovani
definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment
- definierefliesstextumgebung definujzakladnifont
+ definierefliesstextumgebung definebodyfontenvironment % TOM, was duplicate
setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment
stellefliesstextumgebungein nastavprostredizakladnihofont
definebodyfont: definieerkorps definebodyfont
@@ -95,6 +95,8 @@
definierestil definujstyl
definefontstyle: definieerfontstijl definefontstyle
definiereschriftstil definujstylfontu
+ setupstrut: stelstrutin setupstrut
+ setupstrut setupstrut
setuptype: steltypein setuptype
stelletipein nastavtype
@@ -187,7 +189,7 @@
convertnumber: converteernummer convertnumber
konvertierezahl konvertujcislo
- setupcapitals: stelkapitalenin setupcapitals
+ setupcapitals: stelkapitalenin setupcapitals
stelleversalienein nastavverzalky
kap: kap kap
@@ -232,7 +234,7 @@
showbodyfont: toonkorps showbodyfont
zeigefliesstext ukazzakladnifont
showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment
- zeigefliesstextumgebung ukazpostredizakladnihofont
+ zeigefliesstextumgebung ukazpostredizakladnihofontu
headtext: koptekst headtext
ueberschrifttext texthlavicky
@@ -269,7 +271,9 @@
inframed: inlijnd inframed
imumriss zaramovani
mframed: wilijnd maframed
- maframed mazaramovani
+ maumrise maoramovani
+ inmframed: inwilijnd inmaframed
+ immaumrise mazaramovani
setupframed: stelomlijndin setupframed
stelleumrahmtein nastavoramovani
@@ -306,7 +310,6 @@
defineoverlay: definieeroverlay defineoverlay
definiereoverlay definujprekryv
-
background: achtergrond background
hintergrund pozadi
startbackground: startachtergrond startbackground
@@ -351,9 +354,6 @@
marginaltitel marginalninadpis
margewoord: margewoord marginword
marginalwort marginalnislovo
-
- % dit wordt:
-
margetekst: margetekst margintext
marginaltext marginalnitext
@@ -396,7 +396,7 @@
korrigierezwischenraum korekcebilehomista
fixedspaces: vastespaties fixedspaces
festesspatium tvrdemezery
- fixedspace: vastespatie fixedspace
+ fixedspace: vastespatie fixedspace
festesspatium tvrdamezera
nospace: geenspatie nospace
keinspatium zadnamezera
@@ -439,12 +439,14 @@
startzeilen startradky
stopregels: stopregels stoplines
stopzeilen stopradky
+ stelparagraafnummerenin: stelparagraafnummerenin setupparagraphnumbering
+ stelleabsatznummerierungein nastavcislovaniodstavcu
stelregelnummerenin: stelregelnummerenin setuplinenumbering
- stellezeilennummerierungein nastavcislovaniradku
+ stellezeilennumerierungein nastavcislovaniradku
startregelnummeren: startregelnummeren startlinenumbering
- startzeilennummerierung startcislovaniradku
+ startzeilennumerierung startcislovaniradku
stopregelnummeren: stopregelnummeren stoplinenumbering
- stopzeilennummerierung stopcislovaniradku
+ stopzeilennumerierung stopcislovaniradku
startregel: startregel startline
startzeile startradek
stopregel: stopregel stopline
@@ -654,7 +656,6 @@
stelarrangerenin: stelarrangerenin setuparranging
stelleanordnenein nastavusporadani
-
versie: versie version
version verze
@@ -672,8 +673,8 @@
stelleinteraktionsmenueein nastavinterakcnimenu
definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu
definiereinteraktionsmenue definujinterakcnimenu
-% startinteractiemenu: startinteractiemenu startinteractionmenu
-% startinteraktionsmenue startinterakcnimenu
+% startinteractiemenu: startinteractiemenu startinteractionmenu
+% startinteraktionsmenue startinterakcnimenu
blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu
inaktiviereinteraktionsmenue zablokujinterakcnimenu
interactiebuttons: interactiebuttons interactionbuttons
@@ -771,7 +772,7 @@
bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics
bestimmelistencharakeristika stanovcharakteristickuseznamu
- lijstlengte: lijstlengte listlength
+ lijstlengte: lijstlengte listlength
listenlaenge delkaseznamu
lijstbreedte: lijstbreedte listwidth
listenbreite sirkaseznamu
@@ -781,7 +782,7 @@
geenlijst: geenlijst nolist
keineliste zadnyseznam
-% zal vervallen
+% zal vervallen
definieerreferentielijst: definieerreferentielijst definereferencelist
definierereferenzliste definujseznamodkazu
@@ -947,7 +948,7 @@
% marking: markeer marking
% beschriftung oznacujici
remark: toelichting remark
- bemerkung poznamka
+ bemerkung remark % other word than poznamka/note, a commenting note
colorbar: kleurenbalk colorbar
farbbalken barevnalista
@@ -978,18 +979,20 @@
referenz odkaz
definereference: definieerreferentie definereference
definierereferenz definujodkaz
+ definereferenceformat: definieerreferentieformaat definereferenceformat
+ definierereferenzformat definujformatodkazu
useJSscripts: gebruikJSscripts useJSscripts
verwendeJSscript uzijJSscripts
uit: uit from
- von z
+ von from % z
in: in in
- in v
+ in in % v
op: op at
- bei v
+ bei at % v
over: over about
- euber o
+ ueber about % o
naar: naar goto
zu jdina
atpage: oppagina atpage
@@ -997,23 +1000,28 @@
somewhere: ergens somewhere
irgendwo nekde
ref: ref ref
- ref odkaz
+ ref odk % short
naarbox: naarbox gotobox
zurbox jdinabox
naarpagina: naarpagina gotopage
zurseite jdinastranu
-% zurseite % - old but forgotten
-% startformule: startformule startformula
-% startformel startrovnice
-% stopformule: stopformule stopformula
-% stopformel stoprovnice
+% startformule: startformule startformula
+% startformel startrovnice
+% stopformule: stopformule stopformula
+% stopformel stoprovnice
plaatsformule: plaatsformule placeformula
platziereformel umistirovnici
plaatssubformule: plaatssubformule placesubformula
platziereunterformel umistipodrovnici
stelformulesin: stelformulesin setupformulae
stelleformelnein nastavrovnice
+ formulenummer: formulenummer formulanumber
+ formelnummer cislorovnice
+
+ subformulenummer: subformulenummer subformulanumber
+ unterformelnummer cislopodrovnice
+
% startgegeven: startgegeven startfact
% startgegeben startfakt
% stopgegeven: stopgegeven stopfact
@@ -1022,9 +1030,9 @@
% startlegende startlegenda
% stoplegenda: stoplegenda stoplegend
% stoplegende stoplegenda
- leg: leg leg
+ leg: leg leg
leg leg
- geg: geg fact
+ geg: geg fact
geg fakt
mathematics: wiskunde mathematics
@@ -1124,6 +1132,9 @@
stopopmaak: stopopmaak stopmakeup
stopumbruch stopuprava
+ useexternalsoundtrack: gebruikexterngeluidsfragment useexternalsoundtrack
+ verwendeexternestonstueck uzijexternizvuk
+
gebruikexternefile: gebruikexternefile useexternalfile
verwendeexternedatei uzijexternisoubor
gebruikexternefiles: gebruikexternefiles useexternalfiles
@@ -1134,11 +1145,11 @@
kenmerkdatum: kenmerkdatum referraldate
verweisdatum odkaznadatum
- hoog: hoog high
+ high: hoog high
hoch vysoky
- laho: laho lohi
+ lohi: laho lohi
hoti nivy
- laag: laag low
+ low: laag low
tief nizky
% startuitstellen: startuitstellen startpostponing
@@ -1212,8 +1223,8 @@
setupsystem: stelsysteemin setupsystem
stellesystemein nastavsystem
- usepath: gebruikgebied usepath
- benutzepfad uzijcestu
+ usepath: gebruikgebied usedirectory
+ benutzeverzeichnis uzijcestu % TOBIAS
definieeralineas: definieeralineas defineparagraphs
definiereabsaetze definujodstavce
@@ -1253,27 +1264,61 @@
tooltip: suggestie tooltip
tooltip bublinkovanapoveda
fillinfield: invulveld fillinfield
- ausfuellfeld vyplnovepole % or vyplnenepole ?
+ ausfuellfeld vyplnovepole
definefieldstack: definieerveldstapel definefieldstack
definierefeldstapel definujzasobnikpoli
fieldstack: veldstapel fieldstack
feldstapel zasobnikpoli
- setupclipping: stelclipin setupclipping
- stelleausschnittein setupclipping % TOM
- clip: clip clip
- ausschnitt clip % TOM
+ setupclipping: stelclipin setupclipping
+ stelleausschnittein nastavorez
+ clip: clip clip
+ ausschnitt orez
- placelegend: plaatslegenda placelegend
- platzierelegende placelegend % TOM
+ placelegend: plaatslegenda placelegend
+ platzierelegende umistilegendu
setuplegend: stellegendain setuplegend
- stellelegendeein setuplegend % TOM
-
- setuppagecomment: stelpaginacommentaarin setuppagecomment
- setuppagecomment setuppagecomment % TOBIAS % TOM
+ stellelegendeein nastavlegendu
+
+ setuppagecomment: stelpaginacommentaarin setuppagecomment
+ stelleseitenkommentarein nastavkomentarstrany
+
+ setupstrut: stelstrutin setupstrut
+ setupstrut setupstrut
+
+ definerule: definieerlijn definerule
+ definerule definerule
+ placerule: plaatslijn placerule
+ placerule placerule
+ setuprule: stellijnin setuprule
+ setuprule setuprule
+
+ definetextvariable: definieertekstvariabele definetextvariable
+ definetextvariable definetextvariable
+ setuptextvariable: steltekstvariabelein setuptextvariable
+ setuptextvariable setuptextvariable
+ settextvariable: kentekstvariabeletoe settextvariable
+ settextvariable settextvariable
+ placetextvariable: plaatstekstvariabele placetextvariable
+ placetextvariable placetextvariable
+ textvariable: tekstvariabele textvariable
+ textvariable textvariable
+
+ definetextposition: definieertekstpositie definetextposition
+ definetextposition definetextposition
+ setuptextposition: steltekstpositiein setuptextposition
+ setuptextposition setuptextposition
+ positiontext: positioneertekst positiontext
+ positiontext positiontext
+ definerawfont: definerawfont definerawfont
+ definerawfont definerawfont
+ switchtorawfont: switchtorawfont switchtorawfont
+ switchtorawfont switchtorawfont
\stopcommands
+% ^ ^ ^ nadenken over \settextvariable vs \setuptextvariable in nl
+
%D \stopcompressdefinitions
%D There are a lot of variables that users can use in setups
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index 03b370db8..765011727 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -75,7 +75,7 @@
\startvariables dutch english german czech
- oppagina: oppagina atpage aufseite nastrane
+ oppagina: oppagina atpage aufseite nastrance
hierboven: hierboven hencefore vorher vyse
hieronder: hieronder hereafter nachher nize
@@ -89,6 +89,8 @@
%D \startcompressdefinitions
+% to be added: sub subsub subsubsub subsubsubsub
+
\startvariables dutch english german
czech
@@ -107,8 +109,8 @@
titul
margetitel: margetitel margintitle marginaltitel
- margetitel % TOM
-
+ titulmarginalie
+
inhoud: inhoud content inhalt
obsah
inhouden: inhouden contents inhalte
@@ -275,6 +277,8 @@
predel
afstand: afstand distance abstand
vzdalenost
+ alinea: alinea paragraph absatz
+ odstavec
assenstelsel: assenstelsel axis achsen
osa
auteur: auteur author autor
@@ -291,6 +295,8 @@
prekazka
blokwijze: blokwijze blockway blockauf
dobloku
+ bodemwit: bodemwit bottomspace bottomspace
+ bottomspace
boven: boven top oben
vrsek
bovenafstand: bovenafstand topdistance obenabstand
@@ -315,6 +321,10 @@
kontrastnibarva
conversie: conversie conversion konversion
konverze
+ kopconversie: kopconversie headconversion headconversion
+ konverzehlavicky % TOBIAS
+ koplabel: koplabel headlabel headlabel
+ popisekhlavicky % TOBIAS
criterium: criterium criterium kriterium
kriterium
datum: datum date datum
@@ -330,7 +340,7 @@
doorgaan: doorgaan continue fortsetzen
pokracovat
dubbelzijdig: dubbelzijdig doublesided doppelseitig
- dvoustranny
+ oboustranne
dummy: dummy dummy dummy
dummy
eenheid: eenheid unit einheit
@@ -344,7 +354,7 @@
factor: factor factor faktor
faktor
converteerfile: converteerfile convertfile konvertieredatei
- converteerfile % TOM
+ konverzesouboru
file: file file datei
soubor
formaat: formaat size groesse
@@ -357,11 +367,12 @@
adresar
grid: grid grid gritter
mrizka
- groot: groot big gross velky
+ groot: groot big gross
+ velky
haal: haal get hole
ziskat
hang: hang hang haengend
- viset
+ zaveseni
herhaal: herhaal repeat wiederholen
opakovat
hfactor: hfactor hfactor hfaktor
@@ -409,7 +420,11 @@
kantlijn: kantlijn marginedge marginalkante
textovahrana
kantlijntekst: kantlijntekst marginedgetext marginalkantetext
- textmarginalnihookraje
+ textmarginalnihookraje
+ karakteruitlijnen: karakteruitlijnen aligncharacter aligncharacter
+ aligncharacter % TOBIAS / TOM
+ uitlijnkarakter: uitlijnkarakter alignmentcharacter alignmentcharacter
+ alignmentcharacter % TOBIAS / TOM
klein: klein small klein
male
kleur: kleur color farbe
@@ -419,19 +434,19 @@
kolomafstand: kolomafstand columndistance spaltenabstand
vzdalenostsloupcu
kopkleur: kopkleur headcolor kopffarbe
- barvahlavy
+ barvahlavicky
kopletter: kopletter headstyle kopfstil
- stylhlavy
+ stylhlavicky
kopna: kopna afterhead nachkopf
- pohlave
+ pohlavicce
kopoffset: kopoffset veroffset kopfoffset
- offsethlavy
+ offsethlavicky
koppeling: koppeling coupling verknuepfung
propojeni
koppelwijze: koppelwijze couplingway verkopplungsart
zpusobpropojeni
kopvoor: kopvoor beforehead vorkopf
- predhlavou
+ predhlavickou
kopwit: kopwit topspace kopfspatium
svrchnimezera
korps: korps bodyfont fliesstext
@@ -477,13 +492,13 @@
logos: logos logos logos
loga
lokaal: lokaal local lokal
- lokalni
+ lokalne
marge: marge margin marginalie
marginalie
margeafstand: margeafstand margindistance marginalabstand
vzdalenostokraje
margetekst: margetekst margintext marginaltext
- margetekst % TOM: must be unique
+ textmarginalie
markering: markering marking beschriftung
znaceni
markleur: markleur marcolor beschrfarbe
@@ -549,21 +564,21 @@
onevenmarge: onevenmarge oddmargin ungeraderand
lichyokraj
op: op at bei
- op % TOM: not 'na', since that's already taken by aan:
+ u % not 'na', since that's already taken by 'aan'
optie: optie option option
volba
pagina: pagina page seite
- strana
+ stranka
paginacommando: paginacommando pagecommand seitenbefehl
strankovyprikaz
paginakleur: paginakleur pagecolor seitenfarbe
- barvastrany
+ barvastranky
paginaletter: paginaletter pagestyle seitenstil
- stylstrany
+ stylstranky
paginanummer: paginanummer pagenumber seitennummer
- cislostrany
+ cislostranky
paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung
- hranicestrany
+ hranicestranky
palet: palet palet palette
paleta
papier: papier paper papier
@@ -573,9 +588,9 @@
plaatsafsluiter: plaatsafsluiter placestopper setzetrenner
predelmista
plaatsen: plaatsen place platziere
- plaatsen % TOM: must be unique, 'to place' or 'place it'
+ umistit
plaatskop: plaatskop placehead setzekopf
- hlavamista
+ umistihlavicku
prefix: prefix prefix prefix
prefix
preset: preset preset voreinstellung
@@ -633,7 +648,7 @@
rugwit: rugwit backspace rumpfspatium
zpetnamezera
richting: richting direction richtung
- richting % TOM
+ smer
schaal: schaal scale format
meritko
scheider: scheider separator seperator
@@ -646,6 +661,8 @@
oddil
sectienummer: sectienummer sectionnumber abschnittsnummer
cislooddilu
+ snijwit: snijwit cutspace cutspace
+ cutspace
soort: soort family familie
rodina
spatie: spatie space spatium
@@ -689,6 +706,8 @@
znak
tekst: tekst text text
text
+ tekstbreedte: tekstbreedte textwidth textbreite
+ sirkatextu
tekstcommando: tekstcommando textcommand textbefehl
textovyprikaz
tekstformaat: tekstformaat textsize textgroesse
@@ -710,7 +729,7 @@
tussen: tussen inbetween zwischen
mezi
type: type type typ
- type
+ typ
uitlijnen: uitlijnen align ausrichtung
zarovnani
urlspatie: urlspatie urlspace urlspatium
@@ -748,11 +767,11 @@
vorigenummer: vorigenummer previousnumber vorigenummer
predchozicislo
wachttijd: wachttijd delay wartezeit
- wachttijd % TOM
+ prodleva
wijze: wijze way art
zpusob
willekeur: willekeur random zufaellig
- willekeur % TOM
+ nahodne
wit: wit white weiss
bily
xfactor: xfactor xfactor xfaktor
@@ -776,9 +795,9 @@
ystap: ystap ystep yschritt
ykrok
zelfdepagina: zelfdepagina samepage selbeseite
- stejnastrana
+ stejnastranka
zij: zij side objektabstand
- zij % TOM: was strana must be unique, see pagina:
+ strana
veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe
barvapozadipole
@@ -793,10 +812,10 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
zavriakci
openpaginaactie: openpaginaactie openpageaction openpageaction
- openpageaction % TOBIAS % TOM
+ akceotevrenistranky % TOBIAS
sluitpaginaactie: sluitpaginaactie closepageaction closepageaction
- closepageaction % TOBIAS % TOM
-
+ akcezavrenistranky % TOBIAS
+
klikin: klikin clickin klickin
klikuvnitr
klikuit: klikuit clickout klickaus
@@ -815,21 +834,21 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
pocitat
klik: klik click klick
- klik % TOM
+ klik
vcommando: vcommando vcommand vbefehl
- vcommando % TOM
+ vprikaz
icommando: icommando icommand ibefehl
- icommando % TOM
+ iprikaz
ccommando: ccommando ccommand cbefehl
- ccommando % TOM
+ cprikaz
\stopconstants
%D \stopcompressdefinitions
%D The keywords of values are very language specific and
-%D therefore variables for the systems. This list shows soem
+%D therefore variables for the systems. This list shows some
%D overlap with the previous one.
%D \startcompressdefinitions
@@ -838,7 +857,8 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
czech
aan: aan on an
- na
+ zap % opposite of off
+
aanelkaar: aanelkaar serried kleinerabstand
semknuto
aansluitend: aansluitend joinedup keinabstand
@@ -853,8 +873,8 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
akce
afsluiter: afsluiter stopper trenner
predel
- alinea: alinea paragraph absaetze
- odstavce % TOBIAS % TOM -> singular
+ alinea: alinea paragraph absatz
+ odstavec
alles: alles all alles
vse
altijd: altijd always immer
@@ -872,7 +892,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
boven: boven top oben
vrsek
breed: breed wide breit
- siroky
+ siroce
breedte: breedte width breite
sirka
buffer: buffer buffer puffer
@@ -898,7 +918,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
definitief: definitief final endfassung
finalni
diepte: diepte depth tiefe
- hloubka
+ podlehloubky % ? hloubka
dubbelzijdig: dubbelzijdig doublesided doppelseitig
dvoustranny
eerste: eerste first erste
@@ -906,7 +926,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
elk: elk each jede
kazdy
enkelzijdig: enkelzijdig singlesided einzelseitig
- jednostranny
+ jednostranne
ergens: ergens somewhere irgendwo
nekde
nergens: nergens nowhere nirgens
@@ -918,7 +938,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
file: file file datei
soubor
flexibel: flexibel flexible flexibel
- prizpusobivy
+ prizpusobive
forceer: forceer force zwinge
sila
gebruikt: gebruikt used verwende
@@ -934,13 +954,13 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
gespiegeld: gespiegeld mirrored gespiegelt
zrcadleno
globaal: globaal global global
- globalni
+ globalne
grid: grid grid gritter
mrizka
groot: groot big gross
velky
grotevoorkeur: grotevoorkeur bigpreference grosszuegig
- velkaprednost
+ vysokapriorita
grijs: grijs gray grau
seda
halveregel: halveregel halfline halbezeile
@@ -962,7 +982,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
hoogte: hoogte height hoehe
vyska
horizontaal: horizontaal horizontal horizontal
- horizontalni
+ horizontalne
huidige: huidige current aktuell
aktualni
italic: italic italic italic
@@ -973,6 +993,8 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
naokraji
inrechter: inrechter inright imrechten
vpravo
+ interactie: interactie interaction interaktion
+ interakce
intekst: intekst intext imtext
dotextu
intro: intro intro intro
@@ -1014,11 +1036,11 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
kleinvetitalic: kleinvetitalic smallbolditalic kleinfettitalic
maletucnekurzivni
kleur: kleur color farbe
- barva
+ barevne
kolommen: kolommen columns spalten
sloupce
kop: kop head kopf
- hlava
+ hlavicka
laag: laag low tief
nizko
laatste: laatste last letzte
@@ -1026,7 +1048,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
label: label label label
popisek
lang: lang tall lang
- vysoky
+ vysoko
leeg: leeg empty leer
prazdne
Letter: Letter Character Buchstabe
@@ -1041,18 +1063,20 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
nasirku
lijn: lijn rule linie
linka
+ lijst: lijst list liste
+ seznam
linkermarge: linkermarge leftmargin linkerrand
levyokraj
linkerpagina: linkerpagina leftpage linkerseite
- levastrana
+ levastranka
linkerrand: linkerrand leftedge linkekante
levahrana
links: links left links
vlevo
lokaal: lokaal local lokal
- lokalni
+ lokalne
nieuw: nieuw new neu
- nieuw % TOM
+ novy
MAAND: MAAND MONTH MONAT
MESIC
maand: maand month monat
@@ -1068,13 +1092,13 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
middel: middel medium mittel
stredni
midden: midden middle mittig
- stredni
+ nastred
na: na after nach
po
naam: naam name name
jmeno
naast: naast opposite gegenueber
- opacny
+ naproti % ? opacna
nee: nee no nein
ne
negatief: negatief negative negativ
@@ -1098,7 +1122,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
opelkaar: opelkaar packed gepackt
zhustene
vanelkaar: vanelkaar unpacked ungepackt
- vanelkaar % TOM
+ rozbalene
opmaak: opmaak markup umbruch
zlom
opmarge: opmarge atmargin amrand
@@ -1106,17 +1130,15 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
overlay: overlay overlay overlay
prekryv
pagina: pagina page seite
- strana
+ stranka
paginanummer: paginanummer pagenumber seitennummer
- cislostrany
+ cislostranky
papier: papier paper papier
papir
scherm: scherm display bildschirm
obrazovka
passend: passend fit passend
- prizpusobivy
- per: per by pro
- skrz
+ prizpusobive
postscript: postscript postscript postscript
postscript
preview: preview preview vorschau
@@ -1136,13 +1158,15 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
rechtermarge: rechtermarge rightmargin rechterrand
pravyokraj
rechterpagina: rechterpagina rightpage rechterseite
- pravastrana
+ pravastranka
rechterrand: rechterrand rightedge rechterkante
pravahrana
rechts: rechts right rechts
vpravo
regel: regel line zeile
radek
+ register: register register register
+ rejstrik
relatief: relatief relative relativ
relativni
reset: reset reset zuruecksetzten
@@ -1156,11 +1180,11 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
Grieks: Grieks Greek Griechisch
Recky
rond: rond round rund
- kolo
+ zaobleny
roteer: roteer rotate drehe
otoc
rek: rek stretch strecken
- rek % TOM
+ natahnout
ruim: ruim broad breit
siroky
schuin: schuin slanted geneigt
@@ -1202,7 +1226,7 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
type: type type tippen
type
uit: uit off aus
- pryc
+ vyp % opposite of on
url: url url url
url
URL: URL URL URL
@@ -1230,11 +1254,11 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
voor: voor before vor
pred
voorgrond: voorgrond foreground vordergrund
- voorgrond % TOM
+ popredi
voorkeur: voorkeur preference einstellung
nastaveni
voorlopig: voorlopig temporary temporaer
- docasny
+ docasne
vooruit: vooruit forward vorwaerts
vpred
vorige: vorige previous vorig
@@ -1263,33 +1287,33 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund
smallcaps: smallcaps smallcaps smallcaps
maleverzalky
WOORD: WOORD WORD WORT
- WOORD % TOM
+ SLOVO
eerstepagina: eerstepagina firstpage ersteseite
- prvnistrana
+ prvnistranka
vorigepagina: vorigepagina previouspage vorigeseite
- predchozistrana
+ predchozistranka
volgendepagina: volgendepagina nextpage folgendeseite
- dalsistrana
+ dalsistranka
laatstepagina: laatstepagina lastpage letzteseite
- poslednistrana
+ poslednistranka
eerstesubpagina: eerstesubpagina firstsubpage ersteunterseite
- prvnipodstrana
+ prvnipodstranka
vorigesubpagina: vorigesubpagina previoussubpage vorigeunterseite
- predchozipodstrana
+ predchozipodstranka
volgendesubpagina: volgendesubpagina nextsubpage folgendeunterseite
- dalsipodstrana
+ dalsipodstranka
laatstesubpagina: laatstesubpagina lastsubpage letzteunterseite
- poslaednipodstrana
+ poslaednipodstranka
volgendeevenpagina: volgendeevenpagina nextevenpage naechstegeradeseite
- volgendeevenpagina % TOM
+ dalsisudastranka
volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungeradeseite
- volgendeonevenpagina % TOM
+ dalsilichastranka
vorigeevenpagina: vorigeevenpagina previousevenpage vorigegeradeseite
- vorigeevenpagina % TOM
+ predchozisudastranka
vorigeonevenpagina: vorigeonevenpagina previousoddpage vorigeungeradeseite
- vorigeonevenpagina % TOM
+ predchozilichastranka
alleenleesbaar: alleenleesbaar readonly nurlesbar
pouzeprocteni
@@ -1307,7 +1331,24 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
tisknutelne
bookmark: bookmark bookmark bookmark
- bookmark
+ zalozka
+
+\stopvariables
+
+%D \stopcompressdefinitions
+
+%D Maybe it's better to make the next few variables into
+%D elements as well.
+
+%D \startcompressdefinitions
+
+\startvariables dutch english german
+ czech
+
+ conversie: conversie conversion konversion
+ konverze
+ per: per by pro
+ skrz
\stopvariables
@@ -1324,6 +1365,8 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
dy: dy
nx: nx
ny: ny
+ nr: nr
+ nc: nc
sx: sx
sy: sy
n: n
@@ -1403,6 +1446,8 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
oddil
register: register register register
rejstrik
+ interactie: interactie interaction interaktion
+ interakce
synoniem: synoniem synonym synonym
synonymum
synoniemen: synoniemen synonyms synonyme
@@ -1413,12 +1458,12 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
tridit
naam: naam name name
jmeno
- blok: blok block block
- blok
- blokken: blokken blocks bloecke
- bloky
- alinea: alinea paragraph absaetze
- odstavce % TOBIAS % TOM -> singular
+ blok: blok float gleitobjekt
+ plvouciobjekt
+ blokken: blokken floats gleitobjekte
+ plvouciobjekty
+ alinea: alinea paragraph absatz
+ odstavec
framedtext: kadertekst framedtext umrahmtertext
oramovanytext
@@ -1452,7 +1497,7 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
huidigelokale: huidigelokale currentlocal aktuelllokal
aktualnelokalni
in: in - ein
- v % TOM needed?
+ - % v, not really needed
instellingen: instellingen setups einstellungen
nastaveni
interactiemenu: interactiemenu interactionmenu interaktionsmenue
@@ -1468,11 +1513,11 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
lijstmet: lijstmet listof auflistenvon
seznam
lokale: lokale local lokal
- lokalni
+ lokalne
opmaak: opmaak makeup umbruch
zlom
plaats: plaats place platziere
- misto
+ umisti % better than 'misto'
reserveer: reserveer reserve reservieren
rezervovat
start: start start start
@@ -1516,10 +1561,10 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
legenda
helptext: helptekst helptext hilfetext
- helptekst % TOM
+ textnapovedy
pagecomment: paginacommentaar pagecomment pagecomment
- pagecomment % TOBIAS % TOM
+ komentarstranky % TOBIAS
\stopelements
@@ -1537,7 +1582,7 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
FirstPage: EerstePagina FirstPage ErsteSeite
PrvniStrana
PreviousPage: VorigePagina PreviousPage VorigeSeite
- PredchoziStrana
+ JdiNaStranku
NextPage: VolgendePagina NextPage FolgendeSeite
DalsiStrana
LastPage: LaatstePagina LastPage LetzteSeite
@@ -1574,6 +1619,15 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
ResumeMovie: HervatFilm ResumeMovie FortsetzenFilm
PokracovatVeFilmu
+ StartSound: StartGeluid StartSound StartSound
+ StartZvuk % TOBIAS
+ StopSound: StopFilm StopSound StopSound
+ StopZvuk % TOBIAS
+ PauseSound: PauzeerFilm PauseSound PauseSound
+ PauzaZvuk % TOBIAS
+ ResumeSound: HervatSound ResumeSound ResumeSound
+ PokracovatZvuk % TOBIAS
+
SaveForm: BewaarFormulier SaveForm SpeicheFormular
UlozitFormular
LoadForm: LaadFormulier LoadForm LadeFormular
@@ -1597,17 +1651,17 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades
czech
New: Nieuw New Neu
- Nieuw % TOM
+ Novy
Balloon: Ballon Balloon Ballon
- Ballon % TOM
+ Bublinka
Addition: Toevoeging Addition Zusatz
- Toevoeging % TOM
+ Pridavek % Dodatek
Help: Help Help Hilfe
- Help % TOM
+ Napoveda
Paragraph: Paragraaf Paragraph Absatz
- Paragraaf % TOM
+ Odstavec
Key: Sleutel Key Schluessel
- Sleutel % TOM
+ Klic
\stopvariables
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index ffdd61f85..16e67b67f 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -436,7 +436,7 @@
\fi}
%D \macros
-%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue} % dogetvalue
+%D {dosetvalue,dosetevalue,dosetgvalue,docopyvalue,doresetvalue} % dogetvalue
%D
%D We already defined these auxiliary macros in the system
%D modules. Starting with this module however, we have to take
@@ -547,6 +547,16 @@
\@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
\fi}
+\def\dosetgvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \@EA\ifx\csname\k!prefix!#2\endcsname\relax
+ \let\c!internal!\c!internal!y
+ \@EA\gdef\csname#1#2\endcsname{#3}%
+ \else
+ \let\c!internal!\c!internal!y
+ \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
+ \fi}
+
\def\docopyvalue#1#2#3%
{\let\c!internal!\c!internal!n
\@EA\ifx\csname\k!prefix!#3\endcsname\relax
@@ -585,6 +595,16 @@
\@EA\edef\csname#1#2\endcsname{#3}%
\fi}
+\def\dosetgvalue#1#2#3%
+ {\let\c!internal!\c!internal!n
+ \ifcsname\k!prefix!#2\endcsname
+ \let\c!internal!\c!internal!y
+ \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}%
+ \else
+ \let\c!internal!\c!internal!y
+ \@EA\gdef\csname#1#2\endcsname{#3}%
+ \fi}
+
\def\docopyvalue#1#2#3%
{\let\c!internal!\c!internal!n
\ifcsname\k!prefix!#3\endcsname
@@ -1125,7 +1145,6 @@
%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:
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index 4203fda89..599d063c1 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -343,15 +343,16 @@
\definesystemvariable {ef} % ExternFiguur
\definesystemvariable {ep} % ExternfiguurPreset
\definesystemvariable {ex} % ExterneFiguren
+\definesystemvariable {ht} % HiddenText
\definesystemvariable {fd} % FielD
-\definesystemvariable {fg} % FiGuurmaten
\definesystemvariable {ff} % FontFile
+\definesystemvariable {fg} % FiGuurmaten
\definesystemvariable {fi} % FIle
\definesystemvariable {fl} % Floats
\definesystemvariable {fm} % ForMules
-\definesystemvariable {ft} % FonTs
\definesystemvariable {fp} % FilegroeP
\definesystemvariable {fs} % FileSynonym
+\definesystemvariable {ft} % FonTs
\definesystemvariable {ia} % Interactie
\definesystemvariable {ib} % InteractieBalk
\definesystemvariable {id} % Index
@@ -376,8 +377,8 @@
\definesystemvariable {kt} % KonTakten
\definesystemvariable {kw} % KontaktWaarde
\definesystemvariable {la} % LAnguage
-\definesystemvariable {lg} % taal (LanGuage)
\definesystemvariable {ld} % LegenDa
+\definesystemvariable {lg} % taal (LanGuage)
\definesystemvariable {li} % LIjst
\definesystemvariable {ln} % LijNen
\definesystemvariable {lo} % LOgos
@@ -400,6 +401,7 @@
\definesystemvariable {pc} % PageComment
\definesystemvariable {pf} % ProFiel
\definesystemvariable {pg} % KoppelPagina
+\definesystemvariable {ph} % ParagrapH
\definesystemvariable {pl} % PLaats
\definesystemvariable {pn} % PaginaNummer
\definesystemvariable {pp} % PaPier
@@ -416,6 +418,7 @@
\definesystemvariable {sa} % ScAle
\definesystemvariable {sb} % SectieBlok
\definesystemvariable {sc} % SCherm
+\definesystemvariable {sd} % SounD
\definesystemvariable {se} % SEctie
\definesystemvariable {si} % SplIt
\definesystemvariable {sk} % SectieKop
diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex
index 4d7de633e..8e3bb50e9 100644
--- a/tex/context/base/ppchtex.tex
+++ b/tex/context/base/ppchtex.tex
@@ -485,7 +485,7 @@
\endpspicture
\or
\resetchemicalcoordinates
- \setbox2=\hbox{\getMPdrawing}%
+ \setbox2=\hbox{\MPshiftdrawingtrue\getMPdrawing}%
\wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
\put {\box2} at 0 0
\endpicture
@@ -524,7 +524,7 @@
\put {\box\chemicalsymbols} at 0 0 % elders
\ifMPdrawingdone
\resetchemicalcoordinates
- \setbox2=\hbox{\getMPdrawing}%
+ \setbox2=\hbox{\MPshiftdrawingtrue\getMPdrawing}%
\wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
\put {\box2} at 0 0 %
\fi
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index d11fd3633..870dee7a7 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -129,6 +129,8 @@
\logo [WDT] {wdt}
\logo [WWW] {www}
\logo [XML] {xml}
+\logo [XSL] {xsl}
+\logo [XSLT] {xslt}
\logo [XDVI] {Xdvi}
\logo [XINDY] {Xindy}
\logo [YandY] {y\&y}
diff --git a/tex/context/base/s-chi-00.tex b/tex/context/base/s-chi-00.tex
new file mode 100644
index 000000000..36c372c00
--- /dev/null
+++ b/tex/context/base/s-chi-00.tex
@@ -0,0 +1,47 @@
+%D \module
+%D [ file=s-chi-01,
+%D version=1999.12.21,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Basic Chinese Style,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D suggestions=Wang Lei,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\mainlanguage[cn]
+
+\setupbodyfont[chi]
+
+\unprotect
+
+\stelsectiein [\v!sectionlevel-1] [\c!kopconversie=\s!chinese]
+\stelsectiein [\v!sectionlevel-2] [\c!kopconversie=\s!chinese]
+\stelsectiein [\v!sectionlevel-3] [\c!kopconversie=\s!chinese]
+
+\stelkopin [\v!hoofdstuk] [\c!afstand=1.25em]
+\stelkopin [\v!paragraaf] [\c!afstand=1.25em]
+\stelkopin [\v!sub\v!paragraaf] [\c!afstand=1.00em]
+
+\stellijstin [\v!hoofdstuk] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja,\c!breedte=5em]
+\stellijstin [\v!paragraaf] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja,\c!breedte=5em]
+
+\stelmarkeringin [\v!hoofdstuk\v!nummer] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja]
+\stelmarkeringin [\v!paragraaf\v!nummer] [\c!koplabel=\v!ja,\c!kopconversie=\v!ja]
+
+\setuplabeltext[cn][\v!sub\v!paragraaf={\symbol[S]\kern.25em}]
+\setuplabeltext[cn][\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}]
+\setuplabeltext[cn][\v!sub\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}]
+\setuplabeltext[cn][\v!sub\v!sub\v!sub\v!sub\v!paragraaf={\symbol[S]\kern.25em}]
+
+% nog taalonafhankelijk maken -> \e!tabel enz
+
+\definereferenceformat [intable] [\c!label=\v!tabel]
+\definereferenceformat [infigure] [\c!label=\v!figuur]
+\definereferenceformat [inchapter] [\c!label=\v!hoofdstuk]
+\definereferenceformat [insection] [\c!label=\v!paragraaf]
+
+\protect \endinput
diff --git a/tex/context/base/s-faq-01.tex b/tex/context/base/s-faq-01.tex
index 41618a375..f3197842d 100644
--- a/tex/context/base/s-faq-01.tex
+++ b/tex/context/base/s-faq-01.tex
@@ -75,6 +75,7 @@
\setupregister
[index]
[coupling=yes,
+ unknownreference=none,
interaction=text]
\coupleregister
@@ -120,7 +121,8 @@
\def\CurrentIndexOfFAQ%
{\bgroup
\setupinteraction[color=]%
- \menubox[bottom]{\let\index\coupledindex\IndexOfFAQ}%
+ \menubox[bottom]%
+ {\hskip-.5em\def\index{\hskip.5em\coupledindex}\IndexOfFAQ}%
\egroup}
\setupinteractionmenu
@@ -192,15 +194,13 @@
\pagereference[faqs]
\useblocks[question]}
-\def\MyFrame%
- {\startreusableMPgraphic{Frame:\overlaywidth:\overlayheight}
- path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
- pickup pencircle scaled 2pt ;
- fill p withcolor \MPcolor{\overlaycolor} ;
- draw p withcolor \MPcolor{\overlaylinecolor} ;
- \stopreusableMPgraphic
- \reuseMPgraphic{Frame:\overlaywidth:\overlayheight}}
+\startuniqueMPgraphic{Frame}
+ path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+ pickup pencircle scaled 2pt ;
+ fill p withcolor \MPcolor{\overlaycolor} ;
+ draw p withcolor \MPcolor{\overlaylinecolor} ;
+\stopuniqueMPgraphic
-\defineoverlay[MyFrame][\MyFrame]
+\defineoverlay[MyFrame][\uniqueMPgraphic{Frame}]
\endinput
diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex
index 13923377c..4f1f06dd6 100644
--- a/tex/context/base/s-map-01.tex
+++ b/tex/context/base/s-map-01.tex
@@ -542,11 +542,12 @@
\c!tussen=]
%D Gezien het brede karakter van de \MAPS\ gebruiken we andere
-%D waarden voor links geraffeld uitlijnen.
+%D waarden voor links geraffeld uitlijnen. The low level macro
+%D used here is subjected to changes!
\def\raggedleft%
{\setraggedness\leftraggedness
- \setraggedskips{1fill}{0em}{.3333em}{.5em}{1fil}{\parindent}}
+ \setraggedskips{1}{1fill}{0em}{.3333em}{.5em}{1fil}{\parindent}}
%D Standaard gebruikt \CONTEXT\ kleur bij pretty verbatim
%D printing. In the \MAPS\ gebruiken we echter fonts:
diff --git a/tex/context/base/s-pre-00.tex b/tex/context/base/s-pre-00.tex
index b04a80e6f..583d2a0ec 100644
--- a/tex/context/base/s-pre-00.tex
+++ b/tex/context/base/s-pre-00.tex
@@ -51,7 +51,7 @@
\def\presentationstep%
{\dopresentationstep0}
-\def\dopresentationstep#1%
+\def\dopresentationstep#1% not ok yet
{\global\setbox\presentationstack=\vbox
{\ifnum\presentationcounter=0
\global\presentationheight=\!!zeropoint
@@ -62,6 +62,7 @@
\scratchdimen=\textheight
\fi
\advance\scratchdimen by -\presentationheight
+ \edef\presentationstepheight{\the\scratchdimen}
\global\presentationheight=\pagetotal
\forgetall
\offinterlineskip
@@ -80,7 +81,7 @@
[\presentationshade]
\def\presentationshade%
{\presentationshield
- [\c!breedte=\tekstbreedte,\c!hoogte=\scratchdimen]{}}
+ [\c!breedte=\tekstbreedte,\c!hoogte=\presentationstepheight]{}}
\definefield[\presentationtag][check][presentation][\presentationtag][\presentationtag]
\fitfield[\presentationtag]}}
@@ -150,7 +151,9 @@
%D
%D There is also:
%D
+%D \starttypen
%D \autopresentationsteptrue
+%D \stoptypen
%D
%D One can enable this feature as \type {step} mode.
@@ -158,7 +161,8 @@
\appendtoks \ifautopresentationstep\presentationstep\fi \to \everypar
-\doifmode{step}{\enablepresentationstep}
+\doifmode{step} {\enablepresentationstep}
+\doifmode{autostep}{\autopresentationsteptrue\enablepresentationstep}
%D When in \type {comment} mode, embedded page comments are
%D processed and put below the page. The default space of
diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex
index ec4c6e372..dac9efc9c 100644
--- a/tex/context/base/s-pre-05.tex
+++ b/tex/context/base/s-pre-05.tex
@@ -81,16 +81,22 @@
background=HashFrameB,
frame=off,
offset=10pt,
- % align=middle, % this is a nice alternative
+ style=smallbold,
width=\rightedgewidth,
+ maxwidth=.8\rightedgewidth,
interaction=all,
- textcommand=\TopicLine,
before=,
after=]
\vfill
\button{Close}[CloseDocument]
\stopinteractionmenu
+\setupwhitespace
+ [big]
+
+\setupblank
+ [big]
+
%D \macros
%D {TitlePage}
%D
@@ -163,12 +169,7 @@
continue=no,
style=\tfa]
-\def\TopicLine#1%
- {\limitatetext{#1}{80pt}{...}}
-
\startMPinclusions
- input mp-tool ;
-
def random_hash_frame (expr width, height, offset, linewidth ) =
def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
diff --git a/tex/context/base/spec-dvi.tex b/tex/context/base/spec-dvi.tex
index 4266b36c4..ad80d2ee1 100644
--- a/tex/context/base/spec-dvi.tex
+++ b/tex/context/base/spec-dvi.tex
@@ -59,6 +59,46 @@
\unvbox0\setbox0=\lastbox\unhbox0
\egroup}
+%D \macros
+%D {dosetposition,
+%D dosetpositionwhd}
+%D
+%D The next specials only identify a position. It is up to
+%D a \DVI\ postprocessing utility to merge the right commands
+%D into the utility file. Since in \CONTEXT, we only deal
+%D with relative positions, the reference point is not so
+%D important.
+%D
+%D The postprocessor should translate the specials into
+%D commands and append these to \type {jobname.tuo} using the
+%D format:
+%D
+%D \starttypen
+%D \pospxy {identifier}{page}{x}{y}
+%D \pospxywhd{identifier}{page}{x}{y}{w}{h}{d}
+%D \stoptypen
+%D
+%D The postprocessor should, of course, provide the \type
+%D {page}, \type {x}, and \type {y} values.
+
+\definespecial\dosetposition#1%
+ {\special{pos:pxy "#1"}}
+
+\definespecial\dosetpositionwhd#1#2#3#4%
+ {\special{pos:pxywhd "#1" #2 #3 #4}}
+
+%D The next special tells the position postprocessor what
+%D page dimensions were used.
+
+\let\flushDVIpositionpapersize\relax
+
+\definespecial\dosetpositionpapersize#1#2%
+ {\xdef\flushDVIpositionpapersize%
+ {\special{pos:papersize #1 #2}%
+ \global\noexpand\let\noexpand\flushDVIpositionpapersize\relax}}
+
+\prependtoks \flushDVIpositionpapersize \to \everyshipout
+
\stopspecials
\protect
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index e1482d397..dd440d9aa 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -316,31 +316,36 @@
%D fast convert the command asked for. This is how the \PDF\
%D code looks like.
-\def\PDFmoviecode%
+\def\PDFmoviecode#1#2#3%
{/Movie
- /T (movie \ifx\argumentA\empty\currentmovie\else\argumentA\fi)
- /Operation\space}
+ /T (\ifcase#1movie \else sound \fi\ifx\argumentA\empty#2\else\argumentA\fi)
+ /Operation /\ifcase#3Play\or Stop\or Pause\or Resume\fi\space}
-\def\PDFexecutestart {\PDFmoviecode /Play}
-\def\PDFexecutestop {\PDFmoviecode /Stop}
-\def\PDFexecutepause {\PDFmoviecode /Pause}
-\def\PDFexecuteresume {\PDFmoviecode /Resume}
+\def\PDFexecutestartmovie {\PDFmoviecode0\currentmovie0}
+\def\PDFexecutestopmovie {\PDFmoviecode0\currentmovie1}
+\def\PDFexecutepausemovie {\PDFmoviecode0\currentmovie2}
+\def\PDFexecuteresumemovie {\PDFmoviecode0\currentmovie3}
+
+\def\PDFexecutestartsound {\PDFmoviecode1\currentsound0}
+\def\PDFexecutestopsound {\PDFmoviecode1\currentsound1}
+\def\PDFexecutespausesound {\PDFmoviecode1\currentsound2}
+\def\PDFexecuteresumesound {\PDFmoviecode1\currentsound3}
\def\PDFformcode#1%
{\doFDFiffieldset{#1}{/Field [\doFDFgetfieldset{#1}]}}
\chardef\PDFsubmitformat=1 % 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
- %/Flags \ifnum\PDFsubmitformat=1 12\fi
- %/Flags \ifnum\PDFsubmitformat=1 4\fi
- /F (\argumentA)}
+\def\PDFexecuteimportform {/Named /N /AcroForm:ImportFDF}
+\def\PDFexecuteexportform {/Named /N /AcroForm:ExportFDF}
+\def\PDFexecuteresetform {/ResetForm \PDFformcode\argumentA}
+\def\PDFexecutesubmitform {/SubmitForm \PDFformcode\argumentB
+ %/Flags \ifnum\PDFsubmitformat=1 12\fi
+ %/Flags \ifnum\PDFsubmitformat=1 4\fi
+ /F (\argumentA)}
-\def\PDFexecutehide {/Hide /T (\argumentA) /H true}
-\def\PDFexecuteshow {/Hide /T (\argumentA) /H false}
+\def\PDFexecutehide {/Hide /T (\argumentA) /H true}
+\def\PDFexecuteshow {/Hide /T (\argumentA) /H false}
\def\PDFexecutefirst {/Named /N /FirstPage}
\def\PDFexecuteprevious {/Named /N /PrevPage}
@@ -478,9 +483,11 @@
%D link}, but here is another one: the {\em movie} annotation.
%D The driver module must implement \type {setcurrentmovie}.
+\let\currentmovie\s!unknown
+
\def\doPDFinsertmov#1#2#3#4#5#6#7#8#9%
{\bgroup
- \setcurrentmovie{#1}%
+ \xdef\currentmovie{#2}% label
\ScaledPointsToBigPoints{#7}\width
\ScaledPointsToBigPoints{#8}\height
\let\pdf@@options\empty
@@ -493,7 +500,23 @@
{/Subtype /Movie
/T (movie \currentmovie)
/Movie << /F (#1) /Aspect [\width\space\height] \pdf@@options >>
- /A << \pdf@@actions>>}
+ /A << \pdf@@actions>>}%
+ \egroup}
+
+%D \macros
+%D {doPDFinsertsoundtrack}
+%D
+%D In \PDF\ sounds can be embedded like movies.
+
+\let\currentsound\s!unknown
+
+\def\doPDFinsertsoundtrack#1#2#3%
+ {\bgroup
+ \xdef\currentsound{#2}%
+ \doPDFannotation width 0 height 0 data
+ {/Subtype /Movie
+ /T (sound \currentsound)
+ /Movie <</F (#1)>>}%
\egroup}
%D \macros
@@ -716,7 +739,7 @@
\currentreferencearguments
\doPSsanitizeJScode\JScode\to\JScode
\xdef\sanitizedJScode{\sanitizedJScode\space\JScode}}
- {\invalidreference{##1}}}
+ {\illegalreference{##1}}}
{\unknownreference{##1}}}%
\@EA\processcommalist\@EA[#2]\setFDFaction % one level expansion
\ifx\sanitizedJScode\empty \else
@@ -799,7 +822,7 @@
{\FDFcollection\space\PDFobjectreference}%
\fi}
-\prependtoks \flushFDFnames \to \everylastshipout
+\prependtoks \flushFDFnames \to \everylastshipout % test \everybye
%D \macros
%D {defineFDFfonts,
@@ -1069,12 +1092,13 @@
\newif\ifFDFvalues
-\def\doFDFpresetpushcheckfield#1#2#3#4#5#6#7%
+\def\doFDFpresetpushcheckfield#1#2#3#4#5#6#7#8%
{\bgroup
+ \ifcase#8\relax\FDFvaluesfalse\else\FDFvaluestrue\fi
\setFDFswitches[#5]%
\setFDFactions[#7]%
\ifcase\currentFDFmode
- \doFDFappearance{On}{#6}%
+ \doFDFappearance{On}{#6}{#8}%
\doFDFdefault{#6}{#4}%
\doPDFannotationobject class FDF name #1 width #2 height #3 data
{/Subtype /Widget /T (#1) /FT /Btn
@@ -1096,7 +1120,7 @@
\FDFactions}%
\registerFDFobject{#1}%
\or
- \doFDFappearance{On}{#6}%
+ \doFDFappearance{On}{#6}{#8}%
\doFDFdefault{#6}{#4}%
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
@@ -1108,7 +1132,7 @@
\FDFappearance\space
\FDFactions}%
\or
- \doFDFappearance{On}{#6}%
+ \doFDFappearance{On}{#6}{#8}%
\doFDFdefault{#6}{#4}%
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
@@ -1121,12 +1145,10 @@
\egroup}
\def\doFDFpresetpushfield#1#2#3#4#5#6#7%
- {\FDFvaluesfalse
- \doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{PushButton,#5}{#6}{#7}}
+ {\doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{PushButton,#5}{#6}{#7}{0}}
\def\doFDFpresetcheckfield#1#2#3#4#5#6#7%
- {\FDFvaluestrue
- \doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
+ {\doFDFpresetpushcheckfield{#1}{#2}{#3}{#4}{#5}{#6}{#7}{1}}
\def\doFDFpresetradiofield#1#2#3#4#5#6#7%
{\bgroup
@@ -1134,7 +1156,7 @@
\setFDFswitches[#4]%
\setFDFactions[#7]%
\ifcase\currentFDFmode
- \doFDFappearance{#1}{#6}%
+ \doFDFappearance{#1}{#6}{1}%
\doPDFgetobjectreference{FDF}{#5}\PDFobjectreference
\doPDFannotationobject class FDF name #1 width #2 height #3 data
{/Subtype /Widget
@@ -1153,7 +1175,7 @@
\FDFactions}%
\registerFDFobject{#1}%
\or
- \doFDFappearance{#1}{#6}%
+ \doFDFappearance{#1}{#6}{1}%
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
@@ -1163,7 +1185,7 @@
\FDFappearance\space
\FDFactions}%
\or
- \doFDFappearance{#1}{#6}%
+ \doFDFappearance{#1}{#6}{1}%
\doPDFgetobjectreference{FDF}{\currentFDFparent}\PDFobjectreference
\global\objectreferencingtrue
\doPDFannotationobject class FDF name kids:#1 width #2 height #3 data
@@ -1188,7 +1210,8 @@
\egroup}
%D At the cost of some more references, we can save bytes,
-%D by sharing appearance dictionaries. Surprise:
+%D by sharing appearance dictionaries. This code needs more
+%D documentation. Surprise:
\def\dodoFDFappearance#1#2%
{\ifx#2\empty\else
@@ -1218,9 +1241,14 @@
\fi
\fi}
-\def\doFDFappearance#1#2%
- {\dogetcommacommandelement1\from#2,\to\yes
- \dogetcommacommandelement2\from#2,\to\no
+\def\doFDFappearance#1#2#3%
+ {\ifcase#3\relax % push only field
+ \edef\yes{#2}%
+ \let\no\empty
+ \else % on / off field
+ \dogetcommacommandelement1\from#2,\to\yes
+ \dogetcommacommandelement2\from#2,\to\no
+ \fi
\def\FDFappearance{/H /N}%
\doifobjectfoundelse{FDF}{ap:#1:\yes:\no}
{\redoFDFappearance\yes
@@ -1448,7 +1476,7 @@
\long\def\sanitizePDFdocencoding#1\to#2%
{\enablePDFcrlf
\enablePDFdocencoding
-\honorunexpanded
+ %\honorunexpanded % otherwise problems with "e etc in de
\edef#2{#1}}
\bgroup
diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex
index 8117cb8fc..f1a37104e 100644
--- a/tex/context/base/spec-ini.tex
+++ b/tex/context/base/spec-ini.tex
@@ -1,5 +1,3 @@
-% \dogetfiguresize will be a special !
-
%D \module
%D [ file=spec-ini,
%D version=1996.01.25,
@@ -17,7 +15,7 @@
%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 tried to overcome this problem by implementing specials as
%D a sort of drivers themselves.
\writestatus{loading}{Context Special Macros / Initialization}
@@ -84,6 +82,32 @@
21: -- kod vlozen
\stopmessages
+%D \TEX\ produces files in the \DVI\ format. This format is
+%D well defined and stable. In this format one||byte commands
+%D are used which can optionally be followed by length
+%D specifiers and arguments. The \DVI||format incorporates a
+%D channel to the outside world. This channel is activated by
+%D the \TEX\ primitive \type {\special}. The sequence
+%D
+%D \starttypen
+%D \special{Hello here I am.}
+%D \stoptypen
+%D
+%D results in \DVI||codes:
+%D
+%D \starttypen
+%D xxx1 16 Hello here I am.
+%D \stoptypen
+%D
+%D The \type {xxx1} is represented in byte code 239 and the
+%D number of following bytes in a~1, 2, 3 or~4 byte number. So
+%D here we get $1+1+16$ bytes of code.
+%D
+%D Translating these codes is upto the \DVI\ driver. It's
+%D common use to ignore specials that cannot be interpreted, so
+%D the example string should have no consequences for the
+%D output.
+
%D \macros
%D {everyresetspecials}
%D
@@ -580,6 +604,61 @@
%D {dostartgraymode,dostopgraymode,
%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode}
%D
+%D Switching to and from color can be done in two ways:
+%D
+%D \startopsomming[opelkaar,n]
+%D \som insert driver specific commands
+%D \som pass instructions to the output device
+%D \stopopsomming
+%D
+%D The first approach is more general and lays the
+%D responsibility at the driver side. Probably due to the fact
+%D that \TEX\ does not directly support color, we have been
+%D confronted for the last few years with changing special
+%D definitions. The need for support depends on how a macro
+%D package handles colored text that crosses the page boundary.
+%D Again, there are two approaches.
+%D
+%D \startopsomming[opelkaar,n]
+%D \som let \TEX\ do the job
+%D \som let the driver handle things
+%D \stopopsomming
+%D
+%D The first approach is as driver independant as possible and
+%D can easily be accomplished by using \TEX's mark mechanism.
+%D In \CONTEXT\ we follow this approach. More and more, drivers
+%D are starting to support color, including stacking them.
+%D
+%D Colors as well as grayscales can be represented in scales
+%D from~0 to~1. When drivers use values in the range 0..255,
+%D this value has to be adapted in the translation process.
+%D Technically it's possible to get a grayscale from combining
+%D colors. In the \kap{RGB} color system, a color with Red,
+%D Green and Blue components of 0.80 show the same gray as a
+%D Gray Scale specified 0.80. The \kap{CMYK} color system
+%D supports a Black component apart from Cyan, Magenta and
+%D Yellow.
+%D
+%D Depending on the target format, color support differs from
+%D gray support. PostScript for example offers different
+%D operators for setting gray and color. This is because
+%D printing something using three colors is someting else than
+%D printing with just black.
+%D
+%D In \CONTEXT\ we have implemented a color subsystem that
+%D supports the use of well defined colors that, when printed
+%D in black and white, still can be distinguished. This
+%D approach enables us to serve both printed and electronic
+%D versions, using colored text and illustrations. More on the
+%D fundamentals of this topic can be found in the \kap{MAPS} of
+%D the Dutch User Group, 14 (95.1).
+%D
+%D To satisfy all those needs, we define four specials which
+%D supply enough information for drivers to act upon. We
+%D could have used more general commands with the keywords
+%D 'rgb' and 'gray', but because these specials are used often,
+%D we prefer the more direct and shorter alternative.
+%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
@@ -603,13 +682,23 @@
\installspecial [\dostartgraycolormode] [or] [1]
\installspecial [\dostopcolormode] [or] [0]
+%D For some drivers, the stop special is of no use and can
+%D simply call the start one with zero arguments.
+
%D \macros
%D {doinsertfile}
%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
+%D The support of inserting files (like illustrations) comes in
+%D many flavors. Some drivers use scales, some take dimensions.
+%D Some need offsets and others act on stored characteristics.
+%D They need one thing in common: a filename. Although separate
+%D specials for different formats sometimes are more clear, we
+%D decided to combine them all in one:
+%D
%D \starttypen
%D \doinsertfile {type,method} {file,label}
%D {xscale} {yscale} {x} {y} {w} {h}
@@ -618,17 +707,33 @@
%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 occurrences of the same
-%D illustration.
-%D
+%D
+%D The special is implemented as \type{or}. Because \DVIPSONE\
+%D understands them all, a chain of alternatives would generate
+%D multiple occurrences of the same 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 No start||stop construction is needed here, because there in
+%D no further interference of \TEX. All dimensions are output
+%D as scaled points and scales as a number, where 100 equal
+%D 100\%.
+
+%D \macros
+%D {doinsertsoundtrack}
+%D
+%D Sounds are (for the moment) just files with
+%D associated options.
+%D
+%D \starttypen
+%D \doinsertsoundtrack {file} {label} {options}
+%D \stoptypen
+
+\installspecial [\doinsertsoundtrack] [or] [3]
+
%D \macros
%D {dogetnofinsertpages}
%D
@@ -637,13 +742,15 @@
%D to the total number of pages.
%D
%D \starttyping
-%D \dogetnofinsertpages\nofinsertpages
+%D \dogetnofinsertpages{filename}
%D \stoptyping
%D
-%D The number is available after the insert is placed,
+%D The number is also available after the insert is placed,
%D since inclusion may take place immediate when an insert is
%D called upon.
+\def\nofinsertpages{1} % one of the few 'talk backs'
+
\installspecial [\dogetnofinsertpages] [or] [1]
%D \macros
@@ -863,6 +970,41 @@
%D {dostartgotolocation, dostopgotolocation,
%D dostartgotorealpage, dostopgotorealpage}
%D
+%D When we want to support hypertext buttons, again we have
+%D to deal with two concepts.
+%D
+%D \startopsomming[opelkaar,n]
+%D \som let \TEX\ highlight the text
+%D \som let the driver show us where to click
+%D \stopopsomming
+%D
+%D The first approach is the most secure one. It gives us
+%D complete control over the visual appearance of hyper
+%D buttons. The second alternative lets the driver guess what
+%D part of the text needs highlighting. As long as we deal with
+%D not too complicated textual buttons, this is no problem.
+%D It's even a bit more efficient when we take long mid
+%D paragraph active regions into account. When we let \TEX\
+%D handle active sentences {\em for instance marked like this
+%D one}, we have to take care of line- and pagebreaks ourselve.
+%D However, it's no trivial matter to let a driver find out
+%D where things begin and end. Because most hyperlinks can be
+%D found in tables of contents and registers, the saving in
+%D terms of bytes can be neglected and the first approach is a
+%D clear winner.
+%D
+%D The most convenient way of cross||referencing is using named
+%D destinations. A more simple scheme is using page numbers as
+%D destinations. Because the latter alternative can often be
+%D implemented more efficient, and because we cannot be sure
+%D what scheme a driver supports, we always have to supply a
+%D pagenumber, even when we use named destinations.
+%D
+%D To enable a driver to find out what to make active, we have
+%D to provide begin and endpoints, so like with color, we use
+%D pairs of specials. The first scheme can be satisfied with
+%D proper dimensions of the areas to be made active.
+%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
@@ -893,10 +1035,14 @@
\installspecial [\dostartgotorealpage] [and] [5]
\installspecial [\dostopgotorealpage] [and] [0]
+%D One may wonder why jumps to page and location are not
+%D combined. By splitting them, we enable macro||packages to
+%D force the prefered alternative, while on the other hand
+%D drivers can pick up the alternative desired most.
+
%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
@@ -917,6 +1063,12 @@
%D {dostartthisislocation, dostopthisislocation,
%D dostartthisisrealpage, dostopthisisrealpage}
%D
+%D Before we can goto some location or page, we have to tell
+%D the system where it can be found. Because some drivers
+%D follow the \SGML\ approach of begin||end tags, we have to
+%D support pairs. A possible extension to this scheme is
+%D supplying coordinates for viewing the text.
+%D
%D The opposite commands of \type{\dogotosomething} have only
%D one argument:
%D
@@ -940,6 +1092,10 @@
\installspecial [\dostartthisisrealpage] [and] [1]
\installspecial [\dostopthisisrealpage] [and] [0]
+%D In \CONTEXT\ we don't use the \type{\stopsomething}
+%D macros because we let \TEX\ take care of typographic
+%D issues.
+
%D \macros
%D {doresetgotowhereever}
%D
@@ -1177,7 +1333,7 @@
%D \macros
%D {doinsertcomment}
%D
-%D Not so much out ot need, but to be complete, we also
+%D Not so much out of need, but to be complete, we also
%D implement text annotations, so called comment:
%D
%D \starttypen
@@ -1187,6 +1343,26 @@
\installspecial[\doinsertcomment] [and] [7]
+%D \macros
+%D {dosetposition, dosetpositionwhd, dosetpositionpapersize}
+%D
+%D Not natural to \TEX, but available in \PDFTEX, and by
+%D means of postprocessed \DVI, we can save and call upon
+%D positions.
+%D
+%D \starttypen
+%D \dosetposition {identifier}
+%D \dosetpositionwhd {identifier} {width} {height} {depth}
+%D \dosetpositionpapersize {width} {height}
+%D \stoptypen
+%D
+%D This is one of the few specials where when using \PDFTEX\
+%D the driver directly deals with the utility file.
+
+\installspecial [\dosetposition] [or] [1]
+\installspecial [\dosetpositionwhd] [or] [4]
+\installspecial [\dosetpositionpapersize] [or] [2]
+
%D So far for the installation. For quite some time the
%D \CONTEXT\ way of specifying the output format has been:
%D
diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex
index 21080bac7..377821506 100644
--- a/tex/context/base/spec-pdf.tex
+++ b/tex/context/base/spec-pdf.tex
@@ -184,14 +184,17 @@
%D \POSTSCRIPT\ drivers. We just link the movie annotation
%D handled to the file inclusion system.
-\let\currentmovie\s!unknown
-
-\def\setcurrentmovie{\xdef\currentmovie}
-
\definefileinsertion{yy}{mov}{\doPDFinsertmov}
\definefileinsertion{tr}{mov}{\doPDFinsertmov}
%D \macros
+%D {doinsertsoundtrack}
+%D
+%D Sounds look much like movies:
+
+\definespecial\doinsertsoundtrack{\doPDFinsertsoundtrack}
+
+%D \macros
%D {dostartobject,dostopobject,
%D doinsertobject}
%D
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 77a097cc7..3b6065ec9 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -61,6 +61,12 @@
\pdfimageresolution=300
+%D Another downward compatible hack:
+
+\ifx\pdflastximagepages\undefined
+ \newcount\pdflastximagepages \pdflastximagepages=1
+\fi
+
% %D Why are the Acrobat viewers so buggy? To prevent font cache
% %D mismatches, we say:
%
@@ -110,7 +116,7 @@
\appendtoks \let\defaultspecial\normalspecial \to \everyresetspecials
-\let\PDFcode=\pdfliteral
+\let\PDFcode\pdfliteral
%D \macros
%D {dosetuppaper}
@@ -151,8 +157,11 @@
%D The number of pages in (for instance an \PDF) insert
%D file, can be asked for using:
-\definespecial\dogetnofinsertpages#1% global !
- {\global\let#1\PDFimagenofpages}
+\definespecial\dogetnofinsertpages#1%
+ {\xdef\nofinsertpages{1}% global
+ \doifvalidpdfimagefileelse{#1}%
+ {\pdfximage{#1}\xdef\nofinsertpages{\the\pdflastximagepages}}
+ {}}
%D Currently we support \type{pdf} for \PDF\ files, \type{mps}
%D for \METAPOST\ graphics, \type{png} and \type{jpg} for
@@ -214,7 +223,7 @@
\doifnumberelse{\commalistelement}
{\ifcase\commalistelement\else
\edef\pdfimagepagenumber{page \commalistelement}%
- \message{(pdf image page \pdfimagepagenumber)}%
+ \message{(pdf image \pdfimagepagenumber)}%
\fi}
{}}
@@ -228,7 +237,7 @@
\pdfimagepagenumber
{#1}%
\xdef\PDFimagereference{\the\pdflastximage}%
- \xdef\PDFimagenofpages{\the\pdflastximagepages}%
+ \xdef\nofinsertpages{\the\pdflastximagepages}%
\pdfrefximage\pdflastximage}
{\framed[\c!breedte=#7sp,\c!hoogte=#8sp]{#1}}%
\egroup}
@@ -253,12 +262,14 @@
%D similar to figure inclusion. The next macro calls the
%D general \PDF\ one.
-\newcounter\currentmovie
+\definefileinsertion{tpd}{mov}{\doPDFinsertmov}
-\def\setcurrentmovie#1%
- {\doglobal\increment\currentmovie}
+%D \macros
+%D {doinsertsoundtrack}
+%D
+%D We use numbers instead of labels to keep track of sounds.
-\definefileinsertion{tpd}{mov}{\doPDFinsertmov}
+\definespecial\doinsertsoundtrack{\doPDFinsertsoundtrack}
%D \macros
%D {measureTPDfiguresizetrue}
@@ -305,7 +316,7 @@
\global\setbox\foundexternalfigure=\vbox
{\immediate\pdfximage \pdfimageattributes \pdfimagepagenumber{#2}%
\xdef\PDFimagereference{\the\pdflastximage}%
- \xdef\PDFimagenofpages{\the\pdflastximagepages}%
+ \xdef\nofinsertpages{\the\pdflastximagepages}%
\pdfrefximage\pdflastximage}%
#6=\wd\foundexternalfigure
#7=\ht\foundexternalfigure
@@ -717,6 +728,34 @@
\definespecial\doregistercalculationset{\doFDFregistercalculationset}
%D \macros
+%D {dosetposition, dosetpositionwdh}
+%D
+%D Opposite to its \DVI\ counterpart, the \PDFTEX\ backend
+%D can provide positional information directly. Since
+%D \CONTEXT\ only uses relative positions, the origin is of
+%D less importance.
+
+\def\doTPDsetposition#1#2#3%
+ {\bgroup
+ \edef\doTPDsetposition%
+ {\writeutilitycommand
+ {#1%
+ {#2}%
+ {\noexpand\realfolio}%
+ {\noexpand\number\pdflastxpos}%
+ {\noexpand\number\pdflastypos}%
+ #3}}%
+ \pdfsavepos
+ \doTPDsetposition
+ \egroup}
+
+\definespecial\dosetposition#1%
+ {\doTPDsetposition{\pospxy}{#1}{}}
+
+\definespecial\dosetpositionwhd#1#2#3#4%
+ {\doTPDsetposition{\pospxywhd}{#1}{{#2}{#3}{#4}}}
+
+%D \macros
%D {doPDFdestination}
%D
%D Finally we implement some low level macros to deal with
@@ -764,7 +803,8 @@
\xdef\lastPDFaction{<<#3>>}%
\or
\ifsharePDFactions
- \immediate\pdfobj{<<#3>>}\xdef\lastPDFaction{\the\pdflastobj\space0 R}%
+ \immediate\pdfobj{<<#3>>}%
+ \xdef\lastPDFaction{\the\pdflastobj\space0 R}%
\else
\xdef\lastPDFaction{<<#3>>}%
\fi
@@ -827,16 +867,14 @@
{\pdfcatalog}
\def\doPDFpageattribute#1%
- {\expanded{\global\pdfpageattr{\the\pdfpageattr#1}}}
+ {\expanded{\global\pdfpageattr{#1\the\pdfpageattr}}}
\def\doPDFpagesattribute#1%
- {\expanded{\global\pdfpagesattr{\the\pdfpagesattr#1}}}
+ {\expanded{\global\pdfpagesattr{#1\the\pdfpagesattr}}}
\def\doPDFresetattributes%
{\global\pdfpageattr{}}
-% \global\pdfpagesattr{}}
-
\appendtoks\doPDFresetattributes\to\everyaftershipout
%D \macros
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index 3e85c3940..abc14fc67 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -8,8 +8,8 @@
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
%D This module implements some box manipulation macros. Some
%D are quite simple, some are more advanced and when understood
@@ -63,33 +63,29 @@
%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}
+% Ok, but inefficient and/or catcode unsafe:
+%
+% \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}\smashbox 0\box0\egroup}
+% \def\vsmashed#1{\bgroup\setbox0=\normalvbox{#1}\smashbox 0\box0\egroup}
+%
+% Better, but a waste of tokens:
+%
+% \def\hsmash {\bgroup\dowithnextbox{\hsmashbox\nextbox\box\nextbox\egroup}\normalhbox}
+% \def\vsmash {\bgroup\dowithnextbox{\vsmashbox\nextbox\box\nextbox\egroup}\normalvbox}
+% \def\hsmashed{\bgroup\dowithnextbox{\smashbox \nextbox\box\nextbox\egroup}\normalhbox}
+% \def\vsmashed{\bgroup\dowithnextbox{\smashbox \nextbox\box\nextbox\egroup}\normalvbox}
+%
+% The best:
-\def\hsmashed#1%
- {\bgroup
- \setbox0=\normalhbox{#1}%
- \smashbox0%
- \box0
- \egroup}
+\def\dosomesmash#1%
+ {\bgroup\dowithnextbox{#1\nextbox\box\nextbox\egroup}}
-\def\vsmashed#1%
- {\bgroup
- \setbox0=\normalvbox{#1}%
- \smashbox0%
- \box0
- \egroup}
+\def\hsmash {\dosomesmash\hsmashbox\normalhbox}
+\def\vsmash {\dosomesmash\vsmashbox\normalvbox}
+\def\hsmashed{\dosomesmash\smashbox \normalhbox}
+\def\vsmashed{\dosomesmash\smashbox \normalvbox}
%D \macros
%D {getboxheight}
@@ -118,16 +114,16 @@
{#1=\ht#3%
\advance#1 by \dp#3\relax}
-%D \macros
+%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 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 \doiftext {data} {then branch}
%D \stoptypen
\def\doiftextelse#1#2#3%
@@ -228,8 +224,8 @@
%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 This alternative also accepts \type{\box0} and alike, but
+%D we don't really need this functionality now.
%D \macros
%D {beginofshapebox,
@@ -316,7 +312,7 @@
%D
%D \startbuffer
%D \beginofshapebox
-%D \flushshapebox
+%D \flushshapebox
%D \endofshapebox
%D
%D \reshapebox
@@ -443,9 +439,9 @@
\else
% make \prevdepth legal
% \par before the next \vskip gives far worse results
- \ifdim\parskip>\!!zeropoint\vskip\parskip\else\par\fi
+ \ifdim\parskip>\!!zeropoint\vskip\parskip\else\par\fi
% and take a look
- \ifdim\prevdepth=-1000pt
+ \ifdim\prevdepth=-1000pt
\prevdepth=\!!zeropoint
\fi
\ifdim\prevdepth<\!!zeropoint\relax
@@ -460,25 +456,25 @@
% give the previous line a normal depth
\donetrue
\vbox{\forgetall\strut}\nobreak\kern-\lineheight % geen \vskip
- \vskip-\dp\strutbox
+ \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
+ \kern\dp\strutbox
+ \prevdepth\dp\strutbox
\fi
\fi}
-%D In real inner situations we can use:
+%D In real inner situations we can use:
%D
%D \starttypen
%D \flushinnershapebox
%D \stoptypen
%D
-%D This one is used in \type{\framed}.
+%D This one is used in \type{\framed}.
\def\innerflushshapebox%
{\ifdim\ht\newshapebox=\!!zeropoint\relax
@@ -487,16 +483,16 @@
\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 For absolute control, one can use \type{\doreshapebox}
+%D directly. This macro takes four arguments, that take care
%D of:
-%D
+%D
%D \startopsomming[n,opelkaar]
%D \som \type{\shapebox}
%D \som \type{\shapepenalty}
%D \som \type{\shapekern}
%D \som \type{\shapeskip}
-%D \stopopsomming
+%D \stopopsomming
%D \macros
%D {hyphenatedword,
@@ -630,7 +626,7 @@
%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.
+%D sentinel is optional. This is about the third version.
\ifx\fakecompoundhyphen\undefined \let\fakecompoundhyphen\relax \fi
@@ -642,6 +638,8 @@
{\doifelsenothing{#1}
{\unhbox\nextbox}
{\fakecompoundhyphen
+ \widowpenalty=0
+ \clubpenalty=0
\scratchdimen=#1\relax
\ifdim\wd\nextbox>\scratchdimen
\setbox\scratchbox=\hbox{ #2}%
@@ -745,28 +743,31 @@
%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 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 When needed, spacing can be suppressed by \type
%D {\nothingbetweenisolatedwords}.
\newif\ifisolatedwords
\def\betweenisolatedwords%
- {\hskip\currentspaceskip}
+ {\hskip\currentspaceskip}
-\def\setbetweenisolatedwords#1%
- {\gdef\localbetweenisolatedwords{#1}}
+%D In order to prevent problems with nested isolated words, we
+%D do process them, but only split at the outermost level.
-\def\processisolatedwords#1#2%
- {\bgroup
+\def\processisolatedwords#1#2% todo: vbox ipv hbox ivm afbreken!
+ {\bgroup % todo: doloop
\fakecompoundhyphen
\mindermeldingen
\forgetall
- \global\let\localbetweenisolatedwords\betweenisolatedwords
- \setbox0=\hbox
- {\ignorespaces#1%
+ \widowpenalty=0
+ \clubpenalty=0
+ \def\processisolatedwords##1##2{##2{##1}}% we split only once
+ \global\let\localbetweenisolatedwords\betweenisolatedwords
+ \setbox0=\hbox % we default to spaces, but from inside out
+ {\ignorespaces#1% \localbetweenisolatedwords can be overruled
\xdef\isolatedlastskip{\the\lastskip}}%
\setbox2=\vbox
{%\hyphenpenalty10000 % this one fails in \url breaking,
@@ -775,8 +776,8 @@
\hsize\!!zeropoint
\unhcopy0}% == #1
\ifdim\ht0=\ht2
- \isolatedwordsfalse
- #2{\unhcopy0}% == #2{#1}
+ \isolatedwordsfalse
+ #2{\unhcopy0}% == #2{#1}
\else
\isolatedwordstrue
\setbox0=\hbox
@@ -794,9 +795,22 @@
\hbox{#2{\hbox{\unhbox4}}}}}%
\ifdim\ht2>\!!zeropoint \localbetweenisolatedwords \repeat
\unskip}%
- \unhbox0\unskip\hskip\isolatedlastskip
+ \unhbox0\unskip
+ \ifdim\isolatedlastskip=\!!zeropoint\else % added
+ \hskip\isolatedlastskip
+ \fi
\fi
\egroup}
+
+%D One can use the next macro to change the intersplit
+%D material. An example can be found in the \type {\url}
+%D macro. The innermost setting is used. In the url case, it
+%D means that either very small spaces are used or no spaces
+%D at all. So, the innermost settings are used, while the
+%D outermost split takes place.
+
+\def\setbetweenisolatedwords#1%
+ {\gdef\localbetweenisolatedwords{#1}}
%D \macros
%D {sbox}
@@ -914,13 +928,13 @@
\hbox}
%D For those who don't want to deal with \type {\hsize}
-%D and \type {\vsize}, we have:
-%D
+%D and \type {\vsize}, we have:
+%D
%D \starttypen
-%D \centerednextbox width 2bp height 2bp
+%D \centerednextbox width 2bp height 2bp
%D {\framed[width=100bp,height=100bp]{}}
%D \stoptypen
-%D
+%D
%D Do you see what we call this one \type {next}?
\def\centerednextbox#1#%
@@ -932,17 +946,17 @@
\egroup}
\hbox}
-%D \macros
+%D \macros
%D {centerbox}
%D
-%D Centering on the available space is done by:
+%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.
+%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
@@ -970,13 +984,13 @@
%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 Men kan het proces van breken enigzins beinvloeden met de
%D volgende twee switches:
-\newif\ifalignrigidcolumns
-\newif\ifstretchrigidcolumns
+\newif\ifalignrigidcolumns
+\newif\ifstretchrigidcolumns
-%D De eerste switch bepaald het uitlijnen, de tweede rekt de
+%D De eerste switch bepaald het uitlijnen, de tweede rekt de
%D individuele kolommen op naar \type{\vsize}.
\def\setrigidcolumnhsize#1#2#3%
@@ -1000,7 +1014,8 @@
\setbox\rigidcolumnbox=\vbox
{\unvbox\rigidcolumnbox
\unpenalty\removelastskip}% get rid of \blank's
- \splittopskip=\openstrutheight
+ %\splittopskip=\openstrutheight
+ \splittopskip=\!!zeropoint
%\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow
%\divide\scratchdimen by \rigidcolumns % therefore we need the hack:
\scratchdimen=1pt
@@ -1079,9 +1094,9 @@
\box0
\egroup}
-% % to be done: start halfway a line combined with one line
+% % to be done: start halfway a line combined with one line
% % extra to start with (skip) and one line less than counted.
-%
+%
% \def\stopvboxtohbox%
% {\egroup
% \setbox2=\vbox
@@ -1114,7 +1129,7 @@
\def\makehboxofhboxes%
{\setbox0=\hbox{}%
- \loop % \doloop { .. \exitloop .. }
+ \loop % \doloop { .. \exitloop .. }
\setbox2=\lastbox
\ifhbox2
\setbox0=\hbox{\box2\unhbox0}%
@@ -1127,11 +1142,11 @@
\unhbox0
\fi}
-%D \macros
+%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.
+%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
@@ -1140,11 +1155,13 @@
\def\unhhbox#1\with#2%
{\bgroup
+ \widowpenalty=0
+ \clubpenalty=0
\mindermeldingen
\forgetall
- \setbox\unhhedbox=\vbox{\hskip\hhboxindent\strut\unhbox#1}% => \hsize
+ \setbox\unhhedbox=\vbox{\hskip\hhboxindent\strut\unhbox#1}% => \hsize
\doloop
- {\setbox\hhbox=\vsplit\unhhedbox to \lineheight
+ {\setbox\hhbox=\vsplit\unhhedbox to \lineheight
\ifvoid\unhhedbox
\setbox\hhbox=\hbox{\strut\hboxofvbox\hhbox}%
\fi
@@ -1159,7 +1176,7 @@
\ifvoid\unhhedbox
\exitloop
\else
- \hskip\!!zeropoint \!!plus \!!zeropoint
+ \hskip\!!zeropoint \!!plus \!!zeropoint
\fi}%
\egroup}
@@ -1177,26 +1194,26 @@
%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 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 \hskip1em plus 1em minus 1em
+%D \hhboxindent=\lasthhboxwidth
%D \advance\hhboxindent by \lastskip
%D \unhhbox2\with{\ruledhbox{\box\hhbox}}
%D \stopbuffer
-%D
+%D
%D \haalbuffer
-%D
+%D
%D This piece of text was typeset by saying:
-%D
+%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
+%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}
@@ -1248,15 +1265,15 @@
%D Where the last call of course does not show up in this
%D document, but definitely generates a confusing message.
-%D \macros
+%D \macros
%D {processboxes}
%D
-%D The next macro gobble boxes and is for instance used for
+%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%
+\def\processboxes#1%
{\bgroup
\def\doprocessbox{#1}% #1 can be redefined halfway
\setbox\processbox=\box\voidb@x
@@ -1277,15 +1294,15 @@
\def\dodogetprocessbox%
{\dowithnextbox
- {\ifhmode\unskip\fi\doprocessbox % takes \nextbox makes \processbox
+ {\ifhmode\unskip\fi\doprocessbox % takes \nextbox makes \processbox
\afterassignment\dogetprocessbox\let\next=}
\hbox\bgroup}
-%D \macros
+%D \macros
%D {startoverlay}
-%D
+%D
%D We can overlay boxes by saying:
-%D
+%D
%D \startbuffer
%D \startoverlay
%D {\omlijnd{hans}}
@@ -1293,15 +1310,15 @@
%D {\omlijnd[hoogte=2cm]{oeps}}
%D \stopoverlay
%D \stopbuffer
-%D
+%D
%D \typebuffer
%D
-%D shows up as:
+%D shows up as:
%D
%D \leavevmode\haalbuffer
% \def\dooverlaybox%
-% {\ifhmode\unskip\fi
+% {\ifhmode\unskip\fi
% \ifdim\ht\nextbox>\ht\processbox
% \setbox\processbox=\vbox to \ht\nextbox
% {\vss\box\processbox\vss}%
@@ -1310,16 +1327,16 @@
% {\vss\box\nextbox\vss}%
% \fi
% \scratchdimen=\wd
-% \ifdim\wd\nextbox>\wd\processbox
+% \ifdim\wd\nextbox>\wd\processbox
% \nextbox
% \else
% \processbox
-% \fi
+% \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
@@ -1358,31 +1375,31 @@
\let\stopoverlay\egroup
\processboxes\dooverlaybox}
-% %D \macros
+% %D \macros
% %D {starthspread}
-% %D
-% %D In a similar way we can build a horizontal box, spread
+% %D
+% %D In a similar way we can build a horizontal box, spread
% %D over the available width.
-% %D
+% %D
% %D \startbuffer
% %D \starthspread
% %D {hans}
% %D {ton}
% %D {oeps}
% %D \stophspread
-% %D
+% %D
% %D \stopbuffer
-% %D
+% %D
% %D \typebuffer
% %D
-% %D shows up as:
+% %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
@@ -1390,15 +1407,15 @@
%D \macros
%D {fakebox}
-%D
-%D The next macro is a rather silly one, but saves space.
+%D
+%D The next macro is a rather silly one, but saves space.
%D
%D \starttypen
-%D \hbox{\fakebox0}
+%D \hbox{\fakebox0}
%D \stoptypen
%D
-%D returns an empty box with the dimensions of the box
-%D specified, here being zero.
+%D returns an empty box with the dimensions of the box
+%D specified, here being zero.
\def\dofakebox%
{\setbox\scratchbox=\null
@@ -1412,7 +1429,7 @@
{\bgroup
\afterassignment\dofakebox\scratchcounter}
-%D \macros
+%D \macros
%D {lbox,rbox,cbox,tbox,bbox}
%D
%D Here are some convenient alternative box types:
@@ -1422,11 +1439,11 @@
%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.
+%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}
@@ -1437,10 +1454,10 @@
\let\\=\endgraf
\forgetall#1\let\next=}
-%D The alternatives \type {\tbox} and \type {\bbox} can be used
+%D The alternatives \type {\tbox} and \type {\bbox} can be used
%D to properly allign boxes, like in:
-%D
-%D \startbuffer
+%D
+%D \startbuffer
%D \starttabel[|||]
%D \HL
%D \VL \tbox{\externfiguur[koe][hoogte=3cm,kader=aan]} \VL top aligned \VL\SR
@@ -1449,20 +1466,20 @@
%D \HL
%D \stoptabel
%D \stopbuffer
-%D
+%D
%D \typebuffer
-%D
-%D The positioning depends on the strut settings:
-%D
+%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%
+\def\tbbox#1#2%
{\hbox\bgroup
- \dowithnextbox
- {\scratchdimen=\ht\nextbox
+ \dowithnextbox
+ {\scratchdimen=\ht\nextbox
\advance\scratchdimen\dp\nextbox
\advance\scratchdimen-#1\strutbox
#1\nextbox=#1\strutbox
@@ -1478,15 +1495,15 @@
%D \macros
%D {boxofsize}
%D
-%D Sometimes we need to construct a box with a height or
-%D width made up of several dimensions. Instead of cumbersome
-%D additions, we can use:
+%D Sometimes we need to construct a box with a height or
+%D width made up of several dimensions. Instead of cumbersome
+%D additions, we can use:
%D
%D \starttypen
%D \boxofsize \vbox 10cm 3cm -5cm {the text to be typeset}
%D \stoptypen
%D
-%D This example demonstrates that one can use positive and
+%D This example demonstrates that one can use positive and
%D negative values. Dimension registers are also accepted.
\newdimen\sizeofbox
@@ -1525,7 +1542,7 @@
\unhbox\nextbox}
\hbox}
-\def\fittoptobaselinegrid% weg hier
+\def\fittoptobaselinegrid% weg hier
{\dowithnextbox
{\bgroup
\par
@@ -1545,7 +1562,7 @@
\egroup}
\vbox}
-%D Some more undocumented macros (used in m-chart).
+%D Some more undocumented macros (used in m-chart).
\newif\iftraceboxplacement % \traceboxplacementtrue
@@ -1624,12 +1641,12 @@
\def\middlebox#1%
{\hbox{\setbox0=\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}}
-%D \macros
+%D \macros
%D {removedepth, obeydepth}
%D
-%D While \type {\removedepth} removes the preceding depth,
-%D \type {\obeydepth} makes sure we have depth. Both macros
-%D leave the \type {\prevdepth} untouched.
+%D While \type {\removedepth} removes the preceding depth,
+%D \type {\obeydepth} makes sure we have depth. Both macros
+%D leave the \type {\prevdepth} untouched.
\def\removedepth%
{\ifvmode \ifdim\prevdepth>\!!zeropoint \kern-\prevdepth \fi \fi}
@@ -1672,17 +1689,17 @@
%D
%D \typebuffer
%D \haalbuffer
-%
+%
% \def\dodonormbox#1#2#3#4#5#6#7%
% {\doifnumberelse{#1}
-% {\dimen0=#1}{\setbox0=#3{#1}\dimen0=#50}%
+% {\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
+% #7\nextbox
% \counttoken a\in#2\to\!!counta\dorecurse{\!!counta}{#6}#6}}
-%
+%
% \def\donormbox[#1][#2]%
% {\bgroup
% \doifinstringelse{v}{#2}
@@ -1698,7 +1715,7 @@
% \fi
% \egroup}%
% \next}
-%
+%
% \def\normbox%
% {\dodoubleempty\donormbox}
diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex
index 24e9da14c..ad16fd760 100644
--- a/tex/context/base/supp-eps.tex
+++ b/tex/context/base/supp-eps.tex
@@ -74,13 +74,12 @@
\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
+ #2=\EPSllx bp % Using \EPSllx bp instead of
+ #4=\EPSurx bp % \dimen0=1bp and \EPSllx\dimen0
+ #3=\EPSlly bp % is more accurate (.005pt).
+ #5=\EPSury bp
+ \scratchdimen=\EPSllx bp \advance#4 -\scratchdimen
+ \scratchdimen=\EPSlly bp \advance#5 -\scratchdimen
\else
#2=\!!zeropoint
#3=\!!zeropoint
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex
index 94fb6ed8c..59e21a663 100644
--- a/tex/context/base/supp-fil.tex
+++ b/tex/context/base/supp-fil.tex
@@ -342,7 +342,7 @@
\doopenin{#1}{\pathplusfile{#2}{#3}}}
%D \macros
-%D {doiffileelse,doiflocfileelse}
+%D {doiffileelse,doiflocfileelse,doifjobfileelse}
%D
%D The next alternative only looks if a file is present. No
%D loading is done. This one obeys the standard \TEX\
@@ -353,7 +353,7 @@
%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 file first. We also provide the alternatives:
%D
%D \starttypen
%D \doiflocfileelse {filename} {before loading} {not found}
diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex
index 769ec848f..bfddf5cd4 100644
--- a/tex/context/base/supp-fun.tex
+++ b/tex/context/base/supp-fun.tex
@@ -29,7 +29,7 @@
\fi
%D \macros
-%D {DroppedCaps}
+%D {DroppedCaps, DroppedString, DroppedIndent, DroppedLines}
%D
%D \startbuffer
%D \DroppedCaps
@@ -116,33 +116,82 @@
%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}
+\let\DroppedIndent\zeropoint \def\DroppedLines{0}
+
+\def\DroppedString%
+ {ABCDEFGHIJKLMNOPQRSTUVWXYZ}
+
+\def\DroppedCaps#1#2#3#4#5#6#7%
+ {\ExpandBothAfter\doifinstringelse{#7}{\DroppedString} %
+ {\ifvmode % this one is \EveryPar save, precede by \par if needed
+ \vskip#6\baselineskip
+ \penalty-200
+ \vskip-#6\baselineskip
+ \fi
+ \ifhmode
+ \hskip-\parindent
+ \fi
+ \setbox0=\hbox
+ {\definefont[temp][#2 at #3]\temp#1{#7}\hskip#4}%
+ \ifdim\dp0>\dp\strutbox % one of those Q's , will be option
+ \setbox2=\hbox{\raise\dp0\hbox{\lower\dp\strutbox\copy0}}%
+ \ht2=\ht0 \dp0=\dp\strutbox \setbox0=\box2
+ \fi
+ \setbox0=\hbox
+ {\lower#5\box0}%
+ \ht0=\ht\strutbox
+ \dp0=\dp\strutbox
+ \edef\DroppedIndent{\the\wd0}%
+ \edef\DroppedLines {\number#6}%
+ \hangindent\DroppedIndent
+ \hangafter-\DroppedLines
+ \noindent
+ \hskip-\DroppedIndent
+ \vbox{\forgetall\box0}%
+ \nobreak
+ \ignorespaces} % Could be a one character word !
+ {\edef\DroppedIndent{0pt}%
+ \edef\DroppedLines {\number\maxdimen}%
+ #7}}
+
%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 {command} {font}
+%D {height} {hoffset} {voffset} {lines}
%D \stoptypen
+%D \macros
+%D {LineDroppedCaps, NiceDroppedCaps}
+%D
+%D To save definitions, we also provide:
+%D
+%D \starttypen
+%D \LineDroppedCaps {command} {font} {hoffset} {lines}
+%D \NiceDroppedCaps {command} {font} {hoffset} {lines}
+%D \stoptypen
+%D
+%D The first command scales the font to the exact height, while
+%D the second command scales the font to a nice 2.5 times the
+%D line height, a value that gives a pleasant grayness.
+
+\def\DoLineDroppedCaps#1#2#3#4#5% compensation command font offset lines
+ {\scratchcounter=#5%
+ \advance\scratchcounter by -1
+ \scratchdimen=\scratchcounter\baselineskip
+ \advance\scratchdimen by #1%
+ \NormalizeFontHeight\DummyFont{W}{\scratchdimen}{#3}%
+ \DroppedCaps{#2}{#3}{\TheNormalizedFontSize}{#4}
+ {\scratchcounter\baselineskip}{#5}}
+
+\def\LineDroppedCaps% command font offset lines
+ {\DoLineDroppedCaps{\ht\strutbox}}
+
+\def\NiceDroppedCaps% command font offset lines
+ {\DoLineDroppedCaps{.5\baselineskip}}
+
%D \macros
%D {TreatFirstLine}
%D
@@ -358,7 +407,8 @@
%D \typebuffer[b]
%D \macros
-%D {NormalizeFontHeight, NormalizeFontWidth}
+%D {NormalizeFontHeight, NormalizeFontWidth,
+%D TheNormalizedFontSize}
%D
%D Next we introduce some font manipulation macros. When we
%D want to typeset some text spread in a well defined area, it
@@ -388,12 +438,17 @@
\divide\dimen4 by \dimen2
\divide\dimen0 by 1000
\dimen0=\number\dimen4\dimen0
+ \xdef\TheNormalizedFontSize{\the\dimen0}%
\definefont[temp][#5 at \the\dimen0]%
\temp
\expandafter
\egroup
\expandafter\font\expandafter#2\expandafter=\fontname\font\relax}
+%D Afterwards, we have access to the calculated size by:
+
+\let\TheNormalizedFontSize\!!zeropoint
+
%D Consider for instance:
%D
%D \startbuffer
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index 94918583a..dc0ab5660 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -40,18 +40,18 @@
%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
%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 margin. The solution lays in saying \type
+%D {spoelwater||terugwinunit} instead of \type
+%D {spoelwater-terugwinunit}. By using a one character command
+%D like \type {|}, delimited by the same character \type {|},
+%D we get ourselves both a decent visualization (in \TEXEDIT\
+%D and colored verbatim we color these commands yellow) and an
+%D 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
@@ -113,7 +113,7 @@
%D \test {well|_|known}
%D \stoptest
%D
-%D to strees the compoundness of hyphenated words.
+%D to stress the compoundness of hyphenated words.
%D
%D Of course we also have to take care of the special case:
%D
@@ -377,7 +377,8 @@
\scratchcounter=\the\uccode`~
\uccode`~=`#1\relax
\uppercase{\def\next{~}}%
- \expandafter\unexpanded\expandafter\def\next{#2}%
+ %\expandafter\unexpanded\expandafter\def\next{#2}%
+ \expandafter\def\next{#2}% unexpanded goes wrong in pdfdoc
\uccode`~=\scratchcounter}
%D The next alternative also supports character numbers:
@@ -388,7 +389,8 @@
{\catcode #1=\@@active \uccode`~= #1\relax}
{\catcode`#1=\@@active \uccode`~=`#1\relax}%
\uppercase{\def\next{~}}%
- \expandafter\unexpanded\expandafter\def\next{#2}%
+ %\expandafter\unexpanded\expandafter\def\next{#2}%
+ \expandafter\def\next{#2}% unexpanded goes wrong in pdfdoc
\uccode`~=\scratchcounter}
%D Although adapting character codes and making characters
@@ -620,6 +622,88 @@
%D load macropackages afterwards that make use of \type{<} in
%D \type{\ifnum} or \type{\ifdim} statements.
+%D And then came the Polish users, and who can deny them? Like
+%D the German \TEX\ users demand an active \type {"}, the
+%D Polish cannot do without the \type {/}. The next alternative
+%D is a bit slower but far the most robust alternative. As a
+%D bonus it also offers \type {|^|} and even \type {|||} which
+%D both result in a breakable|^|bar.
+%D
+%D The trick we use here is to convert the argument to a
+%D string and compare this string to string'd tokens.
+
+\def\activedotextmodediscretionary#1%
+ {\bgroup
+ \let\nextnextnext\egroup
+ \def\handlecompoundcharacter##1% new, needed for polish
+ {\getvalue{\@nc@\string##1}}% where / is active
+ \def\next##1#1%
+ {\def\next{\activedododotextmodediscretionary#1{##1}}%
+ \futurelet\nextnext\next}%
+ \next}
+
+\def\activedododotextmodediscretionary#1#2%
+ {\convertargument#2\to\discretionarytoken
+ \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}%
+ \ifx#1\nextnext % takec care of ||| and +++ and ......
+ \prewordbreak\discretionary{\hbox{$#1$}}{}{\hbox{$#1$}}%
+ \allowbreak\postwordbreak
+ \def\nextnextnext{\afterassignment\egroup\let\next=}%
+ \else\ifx\discretionarytoken\empty
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak
+ \egroup
+ \else\convertargument=\to\next\ifx\next\discretionarytoken
+ \prewordbreak\textmodediscretionary
+ \else\convertargument~\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak
+ \else\convertargument_\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{\textmodediscretionary}
+ {\textmodediscretionary}{\textmodediscretionary}\prewordbreak
+ \else\convertargument(\to\next\ifx\next\discretionarytoken
+ \ifdim\lastskip>\!!zeropoint\relax
+ (\prewordbreak
+ \else
+ \prewordbreak\discretionary{}{(-}{(}\prewordbreak
+ \fi
+ \else\convertargument)\to\next\ifx\next\discretionarytoken
+ \ifx\nextnext\blankspace
+ \prewordbreak)\relax
+ \else\ifx\nextnext\space
+ \prewordbreak)\relax
+ \else
+ \prewordbreak\discretionary{-)}{}{)}\prewordbreak
+ \fi\fi
+ \else\convertargument'\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{-}{}{'}\postwordbreak
+ \else\convertargument<\to\next\ifx\next\discretionarytoken
+ \beginofsubsentence\prewordbreak\beginofsubsentencespacing
+ \else\convertargument>\to\next\ifx\next\discretionarytoken
+ \endofsubsentencespacing\prewordbreak\endofsubsentence
+ \else\convertargument^\to\next\ifx\next\discretionarytoken
+ \prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}%
+ \allowbreak\postwordbreak
+ \else
+ \checkafterdiscretionary
+ \bgroup
+ \checkbeforediscretionary
+ \prewordbreak
+ \discretionary{\hbox{#2}}{}{\hbox{#2}}%
+ \allowbreak\postwordbreak
+ \egroup
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \nextnextnext}
+
+%D Since we don't have to bother about active characters any
+%D longer, we end up with a pretty simple activating macro:
+
+\def\enableactivediscretionaries%
+ {\let\dotextmodediscretionary=\activedotextmodediscretionary}
+
+%D Done somewhere else: \type {\enableactivediscretionaries}.
+
%D \macros
%D {installcompoundcharacter}
%D
@@ -697,10 +781,9 @@
%\let\next\relax % forget "{ee} -> ee
\def\next{\handlecompoundcharacterone#1}% % ignore "{ee} -> "ee
\else\ifx\next\egroup
- \let\next\relax
+ \def\next{\getvalue{\@nc@\string#1}}%
\else\ifx\next\blankspace
- %\let\next\relax
- \def\next{\getvalue{\@nc@\string#1}}% better
+ \def\next{\getvalue{\@nc@\string#1}}%
\else
\def\next{\dodohandlecompoundcharacter#1}%
\fi\fi\fi
diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex
index c8071bf55..5fe26ba9a 100644
--- a/tex/context/base/supp-mis.tex
+++ b/tex/context/base/supp-mis.tex
@@ -141,6 +141,8 @@
\ifnocontextobject \eightbitcharacterstrue \do \newif\ifeightbitcharacters \fi
\ifnocontextobject \MPdrawingdonetrue \do \newif\ifMPdrawingdone \fi
+\ifnocontextobject \ifzeropt \do \let\ifzeropt\ifcase \fi
+
%D \macros
%D {@@...}
%D
@@ -158,6 +160,16 @@
\ifnocontextobject \@@active \do \chardef\@@active = 13 \fi
\ifnocontextobject \@@comment \do \chardef\@@comment = 14 \fi
+%D \macros
+%D {@EA,expanded}
+%D
+%D Also needed:
+
+\let\@EA=\expandafter
+
+\def\expanded#1%
+ {\edef\@@expanded{\noexpand#1}\@@expanded}
+
%D \macros
%D {everyline,EveryLine,EveryPar}
%D
diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex
new file mode 100644
index 000000000..92d2e860d
--- /dev/null
+++ b/tex/context/base/supp-mpe.tex
@@ -0,0 +1,342 @@
+%D \module
+%D [ file=supp-mpe,
+%D version=1999.07.10,
+%D title=\CONTEXT\ Support Macros,
+%D subtitle=METAPOST Special Extensions,
+%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. See mreadme.pdf for
+%C details.
+
+%D This module is still experimental and deals with some
+%D extensions to \METAPOST. When using \POSTSCRIPT\ output,
+%D these extensions can be supplied by means of proper
+%D preamble definitions, but when producing \PDF\ we have to
+%D set up the appropriate datastructures ourselves. It acts as
+%D a plug in into \type {supp-pdf}. As soon as we need more
+%D extensions, we will generalize these macro.
+
+\writestatus{loading}{MetaPost Special Extensions}
+
+%D We implement extensions by using the \METAPOST\ special
+%D mechanism. Opposite to \TEX's specials, the \METAPOST\ ones
+%D are flushed before or after the graphic data, but thereby
+%D are no longer connected to a position.
+%D
+%D We implement specials by overloading the \type {fill}
+%D operator. By counting the fills, we can let the converter
+%D treat the appropriate fill in a special way. The
+%D specification of the speciality can have two forms,
+%D determined by the setting of a boolean variable:
+%D
+%D \starttypen
+%D _inline_shading_ := false ; % comment like code (default)
+%D _inline_shading_ := true ; % command like code
+%D \stoptypen
+%D
+%D When the specification is embedded as comment, it looks
+%D like:
+%D
+%D \starttypen
+%D %%MetaPostSpecial <size> <data> <number> <identifier>
+%D \stoptypen
+%D
+%D The in||line alternative is more tuned for \POSTSCRIPT,
+%D since it permits us to define a macro \type {special}.
+%D
+%D \starttypen
+%D inline : <data> <number> <identifier> <size> special
+%D \stoptypen
+%D
+%D The \type {identifier} determines what to do, and the data
+%D can be used to accomplish this. A type~2 shading function
+%D has identifier~2. Alltogether, the number of parameters is
+%D specified in \type {size}. The \type {number} is the number
+%D of the fill that needs the special treatment. For a type~2
+%D and~3 shaded fill, the datablock contains the following
+%D data:
+%D
+%D \starttypen
+%D from to n inner_r g b x y outer_r g b x y
+%D from to n inner_r g b x y radius outer_r g b x y radius
+%D \stoptypen
+%D
+%D The implementation below, saves the data on the stack in
+%D a way similar to the macros in \type {supp-pdf.tex}, and
+%D just overload a few already defined handlers. That way,
+%D the existing macros are still generic. \voetnoot {Actually,
+%D the macros here are just as generic.}
+%D
+%D Currently the only extension concerns shading, which is
+%D accomplished by handling yet another value of \type
+%D {\finiMPpath}. The recource disctionary is stored and
+%D later picked up by the general \CONTEXT\ figure inclusion
+%D macros.
+
+\unprotect
+
+\newcount\currentPDFshade % global count
+\newcount\currentMPshade % local count
+\newcount\currentMPfill % local count
+\chardef\inlineMPspecials=0 % only needed for stack resetting
+\let\currentMPshades\empty
+
+\def\dohandleMPspecialcomment#1
+ {\setMPargument{#1}%
+ \advance\scratchcounter by -1
+ \ifcase\scratchcounter
+ \handleMPspecialcommand
+ \donetrue
+ \doresetMPstack
+ \let\handleMPsequence=\dohandleMPsequence
+ \expandafter\handleMPsequence
+ \else
+ \expandafter\dohandleMPspecialcomment
+ \fi}
+
+\def\handleMPspecialcomment #1 % number of arguments
+ {\doresetMPstack
+ \scratchcounter=#1\relax
+ \ifcase\scratchcounter % when zero, inline shading is used
+ \chardef\inlineMPspecials=1
+ \let\handleMPsequence=\dohandleMPsequence
+ \expandafter\handleMPsequence
+ \else
+ \chardef\inlineMPspecials=0
+ \expandafter\dohandleMPspecialcomment
+ \fi}
+
+\def\startMPresources%
+ {\global\let\currentMPshades\empty
+ \global\currentMPfill=0
+ \global\currentMPshade=0
+ \ifx\currentPDFresources\empty\else
+ \message{unused resources before shade \the\currentPDFshade}%
+ \fi
+ \global\let\currentPDFresources\empty}
+
+\def\stopMPresources%
+ {\ifx\currentMPshades\empty
+ \global\let\currentPDFresources\empty
+ \else
+ \xdef\currentPDFresources%
+ {/Shading << \currentMPshades >>}%
+ \fi}
+
+\def\startMPshading#1%
+ {\edef\currentMPspecial{\gMPs{#1}}}
+
+\def\stopMPshading%
+ {\global\advance\currentPDFshade by 1
+ \global\advance\currentMPshade by 1
+ \setevalue{mps:Sh:\currentMPspecial}% non global !!
+ {\the\currentPDFshade}%
+ \xdef\currentMPshades%
+ {\currentMPshades/Sh\the\currentPDFshade\space\the\pdflastobj\space0 R }}
+
+\def\processMPpath%
+ {\global\advance\currentMPfill by 1
+ \ifnum\finiMPpath=2 \ifx\currentMPshades\empty \else
+ \doifdefined{mps:Sh:\the\currentMPfill}
+ {\chardef\finiMPpath=4 \PDFcode{q /Pattern cs}}%
+ \fi \fi
+ \flushMPpath
+ \closeMPpath
+ \PDFcode
+ {\ifcase\finiMPpath
+ W n\or S\or f\or B\or W n /Sh\getvalue{mps:Sh:\the\currentMPfill} sh Q%
+ \fi}%
+ \let\handleMPsequence=\dohandleMPsequence
+ \resetMPstack
+ \nofMPsegments=0
+ \handleMPsequence}
+
+\def\handleMPspecialcommand%
+ {\ifcase\inlineMPspecials\or
+ \advance\nofMParguments by -1 % pop the size
+ \fi
+ \doifundefinedelse{\MPspecial}
+ {\message{[unknown \MPspecial]}}
+ {\getvalue{\MPspecial}}%
+ \ifcase\inlineMPspecials
+ \doresetMPstack % 0
+ \else
+ \resetMPstack % 1
+ \fi}
+
+\def\MPspecial%
+ {MP special \gMPs\nofMParguments}
+
+\def\defineMPspecial#1#2%
+ {\setvalue{MP special #1}{#2}}
+
+%D Shading is an example of a more advanced graphic feature,
+%D but users will seldom encounter those complications. Here
+%D we only show a few simple examples, but many other
+%D alternatives are possible by setting up the functions built
+%D in \PDF\ in the appropriate way.
+%D
+%D Shading has to do with interpolation between two or more
+%D points or user supplied ranges. In \PDF, the specifications
+%D of a shade has to be encapsulated in objects and passed on
+%D as resources. This is a \PDF\ level 1.3. feature. One can
+%D simulate three dimensional shades as well and define simple
+%D functions using a limited set of \POSTSCRIPT\ primitives.
+%D Given the power of \METAPOST\ and these \PDF\ features, we
+%D can achieve superb graphic effects.
+%D
+%D Since everything is hidden in \TEX\ and \METAPOST\ graphics,
+%D we can stick to high level \CONTEXT\ command, as shown in
+%D the following exmples.
+%D
+%D \startbuffer
+%D \startuniqueMPgraphic{CircularShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D circular_shade(p,0,.2red,.9red) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{LinearShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D linear_shade(p,0,.2blue,.9blue) ;
+%D \stopuniqueMPgraphic
+%D
+%D \startuniqueMPgraphic{DuotoneShade}
+%D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
+%D linear_shade(p,2,.5green,.5red) ;
+%D \stopuniqueMPgraphic
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D These graphics can be hooked into the overlay mechanism,
+%D which is available in many commands.
+%D
+%D \startbuffer
+%D \defineoverlay[demo 1][\uniqueMPgraphic{CircularShade}]
+%D \defineoverlay[demo 2][\uniqueMPgraphic {LinearShade}]
+%D \defineoverlay[demo 3][\uniqueMPgraphic {DuotoneShade}]
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \haalbuffer
+%D
+%D These backgrounds can for instance be applied to \type
+%D {\framed}:
+%D
+%D \startbuffer
+%D \setupframed[breedte=3cm,hoogte=2cm,kader=uit]
+%D \startcombinatie[3*1]
+%D {\framed[achtergrond=demo 1]{\bfd \white Demo 1}} {}
+%D {\framed[achtergrond=demo 2]{\bfd \white Demo 2}} {}
+%D {\framed[achtergrond=demo 3]{\bfd \white Demo 3}} {}
+%D \stopcombinatie
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D \startregelcorrectie
+%D \haalbuffer
+%D \stopregelcorrectie
+%D
+%D There are a few more alternatives, determined by the second
+%D parameter passed to \type {circular_shade} and alike.
+%D
+%D \def\SomeShade#1#2#3#4#5%
+%D {\startuniqueMPgraphic{Shade-#1}
+%D width := \overlaywidth ;
+%D height := \overlayheight ;
+%D path p ; p := unitsquare xscaled width yscaled height ;
+%D #2_shade(p,#3,#4,#5) ;
+%D \stopuniqueMPgraphic
+%D \defineoverlay[Shade-#1][\uniqueMPgraphic{Shade-#1}]%
+%D \framed[achtergrond=Shade-#1,breedte=2cm,hoogte=2cm,kader=uit]{}}
+%D
+%D \startregelcorrectie
+%D \startcombinatie[5*1]
+%D {\SomeShade{10}{circular}{0}{.3blue}{.9blue}} {circular 0}
+%D {\SomeShade{11}{circular}{1}{.3blue}{.9blue}} {circular 1}
+%D {\SomeShade{12}{circular}{2}{.3blue}{.9blue}} {circular 2}
+%D {\SomeShade{13}{circular}{3}{.3blue}{.9blue}} {circular 3}
+%D {\SomeShade{14}{circular}{4}{.3blue}{.9blue}} {circular 4}
+%D \stopcombinatie
+%D \stopregelcorrectie
+%D
+%D \blanko
+%D
+%D \startregelcorrectie
+%D \startcombinatie[5*1]
+%D {\SomeShade{20}{circular}{0}{.9green}{.3green}} {circular 0}
+%D {\SomeShade{21}{circular}{1}{.9green}{.3green}} {circular 1}
+%D {\SomeShade{22}{circular}{2}{.9green}{.3green}} {circular 2}
+%D {\SomeShade{23}{circular}{3}{.9green}{.3green}} {circular 3}
+%D {\SomeShade{24}{circular}{4}{.9green}{.3green}} {circular 4}
+%D \stopcombinatie
+%D \stopregelcorrectie
+%D
+%D \blanko
+%D
+%D \startregelcorrectie
+%D \startcombinatie[4*1]
+%D {\SomeShade{30}{linear}{0}{.3red}{.9red}} {linear 0}
+%D {\SomeShade{31}{linear}{1}{.3red}{.9red}} {linear 1}
+%D {\SomeShade{32}{linear}{2}{.3red}{.9red}} {linear 2}
+%D {\SomeShade{33}{linear}{3}{.3red}{.9red}} {linear 3}
+%D \stopcombinatie
+%D \stopregelcorrectie
+%D
+%D These macros closely cooperate with the \METAPOST\ module
+%D \type {mp-spec.mp}, which is part of the \CONTEXT\
+%D distribution.
+%D
+%D The low level (\PDF) implementation is based on the \TEX\
+%D based \METAPOST\ to \PDF\ converter. Shading is supported
+%D by overloading the \type {fill} operator as implemented
+%D earlier. In \PDF\ type~2 and~3 shading functions are
+%D specified in terms of:
+%D
+%D \starttabulatie[|Tl|l|]
+%D \NC /Domain \NC sort of meeting range \NC \NR
+%D \NC /C0 \NC inner shade \NC \NR
+%D \NC /C1 \NC outer shade \NC \NR
+%D \NC /N \NC smaller values, bigger inner circles \NC \NR
+%D \stoptabulatie
+
+\defineMPspecial{2}
+ {\startMPshading{14}% type 2
+ \immediate\pdfobj
+ {<</FunctionType 2
+ /Domain [\gMPs1 \gMPs2]
+ /C0 [\gMPs4 \gMPs5 \gMPs6]
+ /C1 [\gMPs9 \gMPs{10} \gMPs{11}]
+ /N \gMPs3>>}%
+ \immediate\pdfobj
+ {<</ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Function \the\pdflastobj\space 0 R
+ /Coords [\gMPs7 \gMPs8 \gMPs{12} \gMPs{13}]
+ /Extend [true true]>>}%
+ \stopMPshading}
+
+\defineMPspecial{3}
+ {\startMPshading{16}% type 3
+ \immediate\pdfobj
+ {<</FunctionType 2
+ /Domain [\gMPs1 \gMPs2]
+ /C0 [\gMPs4 \gMPs5 \gMPs6]
+ /C1 [\gMPs{10} \gMPs{11} \gMPs{12}]
+ /N \gMPs3>>}%
+ \immediate\pdfobj
+ {<</ShadingType 3
+ /ColorSpace /DeviceRGB
+ /Function \the\pdflastobj\space 0 R
+ /Coords [\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}]
+ /Extend [true true]>>}%
+ \stopMPshading}
+
+\protect \endinput
diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex
index 51ea39dea..20885bebc 100644
--- a/tex/context/base/supp-mps.tex
+++ b/tex/context/base/supp-mps.tex
@@ -70,7 +70,7 @@
%D \macros
%D {startMPrun}
%D
-%D If we just wat to run \METAPOST\ code, that is, not to
+%D If we just want 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
@@ -195,7 +195,7 @@
%D \MPinclusions{input mp-mine}
%D \stoptypen
%D
-%D The token register type {\MPinitializations} is expanded
+%D The token register \type {\MPinitializations} is expanded
%D before all other inclusions.
\newtoks \MPinitializations
@@ -346,7 +346,8 @@
\let\stopwritingMPgraphic=\relax
\let\flushMPgraphics =\relax
-%D By default each graphic gets its own slot (number):
+%D By default each graphic gets its own slot (number). Later
+%D on we will define a recycle bin.
\def \allocateMPslot#1{\global\advance#1 by 1 }
\def\deallocateMPslot#1{}
@@ -417,8 +418,17 @@
{\setbox\MPgraphicbox=\hbox
{\ifinsertMPgraphics\insertMPfile{#1}{#2}\fi}}
+% \def\placeMPgraphic%
+% {\box\MPgraphicbox}
+
\def\placeMPgraphic%
- {\box\MPgraphicbox}
+ {\ifMPshiftdrawing
+ \dimen0=\MPllx bp
+ \dimen2=\MPlly bp
+ \hbox{\hskip\dimen0\raise\dimen2\box\MPgraphicbox}%
+ \else
+ \box\MPgraphicbox
+ \fi}
%D \macros
%D {startreusableMPgraphic, reuseMPgraphic, useMPbox}
@@ -649,7 +659,7 @@
%D inclusion macros. A decent plain \TEX\ alternative is:
%D
%D \starttypen
-%D \def\includeMPgraphics#1%
+%D \def\includeMPgraphic#1%
%D {\hbox\bgroup
%D \includeMPfonts{#1}%
%D \dogetEPSboundingbox{#1}{\dimen2}{\dimen4}{\dimen6}{\dimen8}%
@@ -672,7 +682,7 @@
%D scaling. For \LATEX\ users the next one wil do:
%D
%D \starttypen
-%D \def\includeMPgraphics#1#%
+%D \def\includeMPgraphic#1#%
%D {\hbox\bgroup
%D \def\includeMPgraphics##1%
%D {\includeMPfonts{##1}%
@@ -1074,7 +1084,7 @@
\let\MPdrawingdata\empty
\newif\ifMPdrawingdone \MPdrawingdonefalse
-\newif\ifMPshiftdrawing \MPshiftdrawingtrue
+\newif\ifMPshiftdrawing \MPshiftdrawingfalse
\def\resetMPdrawing%
{\global\let\MPdrawingdata\empty
@@ -1087,22 +1097,28 @@
\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}
+
\def\getMPdrawing%
{\ifMPdrawingdone
- \bgroup
- \setbox0=\hbox
- {\expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic
- \loadcurrentMPgraphic\empty
-%\deallocateMPslot\currentMPgraphic
- \placeMPgraphic}%
- \ifMPshiftdrawing
- \dimen0=\MPllx bp
- \dimen2=\MPlly bp
- \hbox{\hskip\dimen0\raise\dimen2\box0}%
- \else
- \box0
- \fi
- \egroup
+ \expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic
+ \loadcurrentMPgraphic\empty
+ \placeMPgraphic
\fi}
\long\def\startMPdrawing#1\stopMPdrawing%
@@ -1188,6 +1204,47 @@
\egroup}
\egroup
+%D \macros
+%D {recycleMPslots}
+%D
+%D When coding and embedding many \METAPOST\ figures in a
+%D document, one can save quite some disk space by using
+%D \PDFTEX\ and setting the next switch:
+
+\newif\ifrecycleMPslots \recycleMPslotsfalse
+
+\def\allocateMPslot#1%
+ {\ifrunMPgraphics
+ \ifcase\pdfoutput \recycleMPslotsfalse \fi
+ \else
+ \recycleMPslotsfalse
+ \fi
+ \ifrecycleMPslots
+ \doloop
+ {\doifundefined{\recurselevel MP}
+ {\global\letvalue{\recurselevel MP}=\empty
+ \global#1=\recurselevel\exitloop}}%
+ %\message{[MP slot + \number#1]%
+ \else
+ \global\advance#1 by 1
+ \fi}
+
+\def\deallocateMPslot#1%
+ {\ifrunMPgraphics
+ \ifcase\pdfoutput \recycleMPslotsfalse \fi
+ \else
+ \recycleMPslotsfalse
+ \fi
+ \ifrecycleMPslots
+ \global\letbeundefined{\number#1MP}%
+ %\message{[MP slot - \number#1]}%
+ \fi}
+
+%D Experimental:
+
+\def\MPdatafile%
+ {mp-\the\currentMPgraphic.tmp}
+
\protect
\endinput
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 972a4b02a..83205eb13 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=supp-pdf,
-%D version=1998.10.15,
+%D version=2000.04.28,
%D title=\CONTEXT\ Support Macros,
%D subtitle=\METAPOST\ to \PDF\ conversion,
%D author=Hans Hagen,
@@ -36,7 +36,7 @@
\ifx\pdfliteral\undefined
\def\PDFcode#1{\message{[ignored pdfliteral: #1]}}
\else
- \let\PDFcode=\pdfliteral
+ \let\PDFcode\pdfliteral
\fi
%D \macros
@@ -356,7 +356,7 @@
%D
%D \starttypen
%D \gMPa {number}
-%D \sMPa {number}
+%D \gMPs {number}
%D \stoptypen
%D
%D When scanning a path specification, we also save the
@@ -404,10 +404,10 @@
{\do#1}}
\def\gMPa#1%
- {\csname\@@MP0#1\endcsname}
+ {\csname\@@MP0\number#1\endcsname}
\def\gMPs#1%
- {\csname\@@MP\the\nofMPsegments#1\endcsname}
+ {\csname\@@MP\the\nofMPsegments\number#1\endcsname}
\def\setMPkeyword#1
{\expandafter\def\csname\@@MP\the\nofMPsegments0\endcsname{#1}%
@@ -577,6 +577,7 @@
\PDFcode{\gMPa1 M}%
\resetMPstack
\else\ifx\somestring\PSfshow
+ \PDFcode{n}%
\handleMPfshow
\resetMPstack
\else\ifx\somestring\PSsetlinecap
@@ -661,6 +662,7 @@
\dimen0=\MPxscale\dimen0
\xdef\MPwidth{\the\dimen0}%
\advance\dimen2 by #5bp
+ \xdef\MPyshift{\the\dimen2}% unscaled
\dimen2=\MPyscale\dimen2
\xdef\MPheight{\the\dimen2}%
\chardef\currentMPboundingbox=#1\relax
@@ -714,12 +716,13 @@
%D take care of \type{(split arguments)}.
\def\handleMPfshow%
- {\setbox0=\hbox
+ {\bgroup
+ \setbox\scratchbox=\hbox
{\obeyMPspecials
- \edef\size{\gMPa{\the\nofMParguments}}%
+ \edef\size{\gMPa\nofMParguments}%
\ifx\size\PSnfont % round font size (to pt)
\advance\nofMParguments by -1
- \expandafter\scratchdimen\gMPa{\the\nofMParguments}pt
+ \expandafter\scratchdimen\gMPa\nofMParguments pt
\ifdim\scratchdimen<1pt
\def\size{1pt}%
\else
@@ -731,7 +734,7 @@
\edef\size{\size bp}%
\fi
\advance\nofMParguments by -1
- \font\temp=\gMPa{\the\nofMParguments} at \size
+ \font\temp=\gMPa\nofMParguments\space at \size
\advance\nofMParguments by -1
\temp
\ifnum\nofMParguments=1
@@ -739,27 +742,41 @@
\gMPa1%
\else
\scratchcounter=1
- \def\do(##1{\if##1 \char32\else##1\fi}%
- \gMPa{\the\scratchcounter}\space
- \def\do{}%
+ \def\dodo##1%
+ {\edef\!!stringa{##1}\ifx\!!stringa\space\char32\else##1\fi}%
+ \def\do(##1{\dodo{##1}}%
+ \gMPa\scratchcounter\space
+ \let\do\relax
\loop
\advance\scratchcounter by 1
\ifnum\scratchcounter<\nofMParguments
- \gMPa{\the\scratchcounter}\space
+ [\gMPa\scratchcounter]\space
\repeat
- \def\do##1){\if##1 \char32\else##1\fi}%
- \gMPa{\the\scratchcounter}%
+ \def\do##1){\dodo{##1}}%
+ \gMPa\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}}
+ %
+ % this fails in latest pdftex's
+ %
+ % \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}%
+ % \egroup}
+ %
+ \setbox\scratchbox=\hbox
+ {\hskip\lastMPmoveX bp\raise\lastMPmoveY bp\box\scratchbox}%
+ \ht\scratchbox\!!zeropoint
+ \dp\scratchbox\!!zeropoint
+ \wd\scratchbox\!!zeropoint
+ \box\scratchbox
+ \egroup}
%D Most operators are just converted and keep their
%D arguments. Dashes however need a bit different treatment,
@@ -776,10 +793,10 @@
\scratchcounter=1
\loop
\ifnum\scratchcounter<\nofMParguments
- \edef\somestring{\somestring\space\gMPa{\the\scratchcounter}}%
+ \edef\somestring{\somestring\space\gMPa\scratchcounter}%
\advance\scratchcounter by 1
\repeat
- \edef\somestring{\somestring]\gMPa{\the\scratchcounter} d}%
+ \edef\somestring{\somestring]\gMPa\scratchcounter\space d}%
\PDFcode{\somestring}%
\egroup}
@@ -1342,6 +1359,14 @@
\let\currentPDFresources\empty
+\def\convertMPtoPDF#1#2#3%
+ {\bgroup
+ \setbox\scratchbox=\vbox\bgroup
+ \forgetall
+ \offinterlineskip
+ \startMPresources
+ \doprocessMPtoPDFfile{#1}{#2}{#3}} % {#1}{0#2}{0#3} would be saver
+
\def\processMPtoPDFfile% file xscale yscale
{\bgroup
\let\finishMPgraphic=\egroup
@@ -1360,43 +1385,49 @@
\input#1\relax
\deleteMPgraphic{#1}}
-\def\convertMPtoPDF#1#2#3%
- {\bgroup
- \setbox0=\vbox\bgroup
- \forgetall
- \offinterlineskip
- \PDFcode{q}%
- \startMPresources
- \doprocessMPtoPDFfile{#1}{#2}{#3}}
-
-\def\finishMPgraphic%
+\def\finishMPgraphic%
{\stopMPresources
- \PDFcode{Q}%
\egroup
- \wd0=\MPwidth
\ifx\pdftexversion\undefined\else\ifnum\pdftexversion<14 % for the moment
\chardef\makeMPintoPDFobject=0
\fi\fi
- \ifcase\makeMPintoPDFobject\or
- \setbox0=
- \or\ifx\currentPDFresources\empty\else
- \chardef\makeMPintoPDFobject=1 \setbox0=
+ \ifcase\makeMPintoPDFobject\or\or\ifx\currentPDFresources\empty\else
+ \chardef\makeMPintoPDFobject=1
\fi\fi
- \vbox to \MPheight
+ \setbox\scratchbox=\vbox
{\forgetall
- \vfill
- \PDFcode{q \MPxscale\space 0 0 \MPyscale\space
- \MPxoffset\space \MPyoffset\space cm}%
- \box0
- \PDFcode{Q}}%
- \ifcase\makeMPintoPDFobject\or
- \immediate\pdfxform attr{\currentPDFresources}0%
+ \hbox
+ {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space \MPyoffset\space cm}%
+ \lower\MPyshift\box\scratchbox % unscaled shift
+ \PDFcode{Q}}}%
+ \ht\scratchbox\MPheight
+ \wd\scratchbox\MPwidth
+ \dp\scratchbox\!!zeropoint
+ \ifcase\makeMPintoPDFobject
+ \box\scratchbox
+ \or
+ \immediate\pdfxform attr{\currentPDFresources}\scratchbox
\xdef\lastPDFMPobject{\the\pdflastxform}%
\pdfrefxform\lastPDFMPobject
\global\let\currentPDFresources\empty
+ \else
+ \box\scratchbox
\fi
\egroup}
+% \setbox\scratchbox=\vbox
+% {\forgetall
+% \dimen0=\MPllx bp
+% \dimen2=\MPlly bp
+% \setbox\scratchbox=\hbox{\hskip-\dimen0\raise-\dimen2\box\scratchbox}%
+% \ht\scratchbox=\!!zeropoint
+% \dp\scratchbox=\!!zeropoint
+% \wd\scratchbox=\!!zeropoint
+% \hbox
+% {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space 0 0 cm}%
+% \lower\MPheight\box\scratchbox
+% \PDFcode{Q}}}%
+
%D \macros
%D {deleteMPgraphic,
%D startMPresources,
diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex
index b58a496d2..16a05c096 100644
--- a/tex/context/base/symb-ini.tex
+++ b/tex/context/base/symb-ini.tex
@@ -89,8 +89,8 @@
{\doifdefinedelse{\??ss#1}{\getvalue{\??ss#1}}{#1}}%
\fi}
-\unexpanded\def\symbol%
- {\dodoubleempty\dosymbol}
+\unexpanded\def\symbol% % This one always gobbles spaces,
+ {\dodoubleempty\dosymbol} % so never change it again!
%D \macros
%D {definefiguresymbol}
@@ -274,6 +274,13 @@
\definesymbol [\v!achteruit] [{\symbol[\v!vorigepagina]}]
\definesymbol [\v!vooruit] [{\symbol[\v!volgendepagina]}]
+%D The next two symbols (\symbol[P] and \symbol[S]) are
+%D variations in their math counterparts. The following ones
+%D {\em do} scale.
+
+\definesymbol[S][\getglyph{MathSymbol}{\char"78}]
+\definesymbol[P][\getglyph{MathSymbol}{\char"7B}]
+
%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
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 1c8ad40e0..229883caf 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -224,7 +224,7 @@
%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 This macro can take any action depending on the previous
%D signal. Signals must be unique and the next macro takes care
%D of that.
%D
@@ -235,12 +235,12 @@
%D Signals old dimensions and can be used in skips, kerns and
%D tests like \type{\ifdim}.
-\newdimen\currentsignal
+\newdimen\maximumsignal % step is about 0.00025pt
\def\newsignal#1%
{\ifx#1\undefined
- \advance\currentsignal by 0.00025pt
- \edef#1{\the\currentsignal}%
+ \advance\maximumsignal by 2sp % to be save in rounding
+ \edef#1{\the\maximumsignal}%
\fi}
%D \macros
@@ -248,7 +248,7 @@
%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 possible one should use:
%D
%D \starttypen
%D \newskimen\tempskimen
@@ -334,6 +334,19 @@
\let\ifconditional = \ifcase
%D \macros
+%D {ifzeropt}
+%D
+%D The next macro is both cosmetic and byte saving. It is
+%D pretty \type{\if}||safe too. It can be used in cases
+%D like:
+%D
+%D \starttypen
+%D \ifzeropt \somedimen ... \else ... \fi
+%D \stoptypen
+
+\let\ifzeropt\ifcase
+
+%D \macros
%D {dorecurse,recurselevel,recursedepth,
%D dostepwiserecurse,
%D for}
@@ -765,6 +778,25 @@
%D argument are completely redundant.
%D \macros
+%D {doifmeaningelse}
+%D
+%D We can use both commands in testing, but alas, not all
+%D meanings expand to something \type {->}. This is no problem
+%D in the \ETEX\ implementation, but since we want
+%D compatibility, we need:
+%D
+%D \starttypen
+%D \doifmeaningelse {\next} {\something} {true} {false}
+%D \stoptypen
+%D
+%D Watch the one level expansion of the second argument.
+
+\def\doifmeaningelse#1#2#3#4%
+ {\edef\!!stringa{\meaning#1}%
+ \def\!!stringb{#2}\edef\!!stringb{\meaning\!!stringb}%
+ \ifx\!!stringa\!!stringb#3\else#4\fi}
+
+%D \macros
%D {ExpandFirstAfter,ExpandSecondAfter,ExpandBothAfter}
%D
%D These three commands support expansion of arguments before
@@ -1496,45 +1528,65 @@
%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}
+% haha, far to complex
+%
+% \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}
-\def\dodoappendtoks#1%
- {\dododoappendtoks{{#1}}}
+\def\appendtoks%
+ {\doappendtoks\relax}
-\def\dododoappendtoks#1\to#2%
- {\scratchtoks={#1}%
- \edef\scratchtoken{\noexpand#2={\the#2\the\scratchtoks}}%
+\long\def\doappendtoks#1\to#2%
+ {\@EA\scratchtoks\@EA{\gobbleoneargument#1}%
+ \long\edef\scratchtoken{\noexpand#2={\the#2\the\scratchtoks}}%
\scratchtoken
\dodoglobal#2=#2}
\def\prependtoks%
- {\bgroup
- \let\bgroup\relax
- \futurelet\scratchtoken\doprependtoks}
+ {\doprependtoks\relax}
-\def\doprependtoks%
- {\ifx\scratchtoken\normalbgroup
- \egroup\expandafter\dodoprependtoks
- \else
- \egroup\expandafter\dododoprependtoks
- \fi}
-
-\def\dodoprependtoks#1%
- {\dododoprependtoks{{#1}}}
-
-\def\dododoprependtoks#1\to#2%
+\long\def\doprependtoks#1\to#2%
{\scratchtoks={#1}%
- \edef\scratchtoken{\noexpand#2={\the\scratchtoks\the#2}}%
+ \long\edef\scratchtoken{\noexpand#2={\the\scratchtoks\the#2}}%
\scratchtoken
\dodoglobal#2=#2}
@@ -1745,6 +1797,12 @@
\aftersplitstring#3\at,,\to#3\relax
\beforesplitstring#3\at,,\to#3}
+\def\removefromcommalist#1#2%
+ {\doremovefromcommalist{ }{#1}{#2}%
+ \doremovefromcommalist{}{#1}{#2}%
+ \dofrontstrip#2%
+ \dodoglobal\edef#2{#2}}
+
\def\dodofrontstrip[#1#2]#3%
{\ifx#1\space
\def#3{#2}%
@@ -1759,12 +1817,6 @@
\@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 {replaceincommalist}
%D
@@ -2318,37 +2370,82 @@
%D global character.
%D \macros
-%D {processconcanatedlist}
+%D {processseparatedlist}
%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 \processseparatedlist[list][separator]\command
%D \stoptypen
%D
%D One can think of things like:
%D
%D \starttypen
-%D \processconcanatedlist[alfa+beta+gamma][+]\message
+%D \processseparatedlist[alfa+beta+gamma][+]\message
%D \stoptypen
-\def\processconcanatedlist[#1][#2]#3%
- {\def\doprocessconcanatedlist##1##2#2%
+%D First we show the simple alternative:
+%D
+%D \starttypen
+%D \def\processseparatedlist[#1][#2]#3%
+%D {\def\doprocessseparatedlist##1##2#2%
+%D {\if]##1%
+%D \let\next=\relax
+%D \else\if]##2%
+%D \let\next=\relax
+%D \else\ifx\blankspace##2%
+%D #3{##1}%
+%D \let\next=\doprocessseparatedlist
+%D \else
+%D #3{##1##2}%
+%D \let\next=\doprocessseparatedlist
+%D \fi\fi\fi
+%D \next}%
+%D \doprocessseparatedlist#1#2]#2}
+%D \stoptypen
+%D
+%D However, we want to handle all situations, like:
+%D
+%D \starttypen
+%D \processseparatedlist[{aap noot}] [ ]{\def\xxx} \show\xxx
+%D \processseparatedlist[{aap} {noot}][ ]{\def\xxx} \show\xxx
+%D \processseparatedlist[aap {noot}] [ ]{\def\xxx} \show\xxx
+%D \processseparatedlist[aap noot] [ ]{\def\xxx} \show\xxx
+%D \stoptypen
+%D
+%D Therefore we smuggle a \type {\relax} in front of the
+%D argument, which we remove afterwards.
+
+\def\doprocessseparatedlist#1]#2[#3]#4%
+ {\def\dodoprocessseparatedlist##1##2#3%
{\if]##1%
- \let\next=\relax
+ \let\dodoprocessseparatedlist\relax
\else\if]##2%
- \let\next=\relax
+ \let\dodoprocessseparatedlist\relax
\else\ifx\blankspace##2%
- #3{##1}%
- \let\next=\doprocessconcanatedlist
+ #4{##1}%
\else
- #3{##1##2}%
- \let\next=\doprocessconcanatedlist
+ #4{##1##2}%
\fi\fi\fi
- \next}%
- \doprocessconcanatedlist#1#2]#2}
+ \dodoprocessseparatedlist}%
+ \@EA\dodoprocessseparatedlist\gobbleoneargument#1#3]#3}
+
+\def\processseparatedlist[%
+ {\doprocessseparatedlist\relax}
+
+% %D \macros
+% %D {dohonorgroupedargument}
+% %D
+% %D The previous macro uses yet another auxiliary macro to
+% %D handle the special case.
+%
+% \def\dohonorgroupedargument#1[%
+% {\doifnextcharelse\bgroup{\dodohonorgroupedargument#1}{#1[}}
+%
+% \def\dodohonorgroupedargument#1#2%
+% {#1[{{#2}}}
%D \macros
%D {processassignlist}
@@ -2949,6 +3046,20 @@
\def\@Not #1{0\ifcase#11 \or\@EA 1\else \@EA 0\fi}
\def\@And #1#2{0\ifcase#1#2 \@EA 0\else \@EA 1\fi}
+%D \macros
+%D {setdimensionwithunit}
+%D
+%D The next assignments are all valid:
+%D
+%D \starttypen
+%D \setdimensionwithunit\scratchdimen{10} {cm}
+%D \setdimensionwithunit\scratchdimen{10cm}{cm}
+%D \setdimensionwithunit\scratchdimen{10cm}{}
+%D \stoptypen
+
+\def\setdimensionwithunit#1#2#3% number unit dimension / nice trick
+ {\afterassignment\gobblefourarguments#1=#2#3pt\relax\relax\relax\relax\relax}
+
\protect
\endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index 83879d0fa..2d42c944d 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -108,6 +108,14 @@
%D \writestatus{laden}{Context Systeem Macro's (a)}
%D \stoptypen
+%D The next few macros are needed in case this module is
+%D used outside \CONTEXT.
+
+\ifx\beginTEX\undefined
+ \long\def\beginETEX#1\endETEX{}
+ \let\beginTEX\relax \let\endTEX\relax
+\fi
+
%D \macros
%D [beschermen]
%D {protect,unprotect}
@@ -264,6 +272,7 @@
\newdimen\!!widtha \newdimen\!!heighta \newdimen\!!deptha
\newdimen\!!widthb \newdimen\!!heightb \newdimen\!!depthb
+\newdimen\!!widthc \newdimen\!!heightc \newdimen\!!depthc
\newif\if!!donea \newif\if!!doneb \newif\if!!donec
@@ -397,7 +406,10 @@
%D \stoptypen
%D
%D However complicated it may look, I'm still glad I stumbled
-%D into this construction.
+%D into this construction. Saving and restoring \type {\:} is
+%D needed when we use \PPCHTEX\ in \LATEX.
+
+\let\next\:
\def\:{\let\blankspace= } \:
@@ -405,6 +417,8 @@
\expandafter\def\: {\futurelet\nexttoken\inspectnextcharacter}
+\let\:\next
+
%D \macros
%D {setvalue,setgvalue,setevalue,setxvalue,
%D letvalue,
@@ -452,6 +466,17 @@
{\expandafter\let\csname#1\endcsname\empty}
%D \macros
+%D {showvalue,showargument}
+%D
+%D A handy macro for testing purposes only, is the following:
+
+\def\showvalue#1%
+ {\expandafter\show\csname#1\endcsname}
+
+\def\showargument#1%
+ {\convertargument#1\to\ascii\show\ascii}
+
+%D \macros
%D {donottest,unexpanded}
%D
%D When expansion of a macro gives problems, we can precede it
@@ -1303,42 +1328,65 @@
\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}]}.
+%D
+%D \starttypen
+%D \def\processcommalist[%
+%D {\futurelet\nexttoken\docheckcommaitem}
+%D
+%D \def\docheckcommaitem%
+%D {\ifx\nexttoken]%
+%D \let\nextcommaitem\gobbletwoarguments
+%D \else\ifx\nexttoken\bgroup
+%D \let\nextcommaitem\doprocesscommalistA
+%D \else
+%D \let\nextcommaitem\doprocesscommalistB
+%D \fi\fi
+%D \nextcommaitem}
+%D
+%D \def\doprocesscommalistA#1#2]#3%
+%D {\global\advance\commalevel 1
+%D \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+%D {#3{##1}\doprocesscommaitem}%
+%D \doprocesscommaitem{#1}#2,]\relax
+%D \global\advance\commalevel -1 }
+%D
+%D \def\doprocesscommalistB#1]#2%
+%D {\global\advance\commalevel 1
+%D \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+%D {#2{##1}\doprocesscommaitem}%
+%D \doprocesscommaitem#1,]\relax
+%D \global\advance\commalevel -1 }
+%D \stoptypen
+%D
+%D However, this is not a the most straightforward solution!
+%D We can misuse one of \TEX's hidden features, and prepend
+%D and remove a \type {\relax}. By the way, although it
+%D involves less testing, this cleaner alternative is not
+%D faster.
+
+\def\processcommalist[%
+ {\futurelet\nexttoken\docheckcommaitem}
\def\docheckcommaitem%
{\ifx\nexttoken]%
- \let\nextcommaitem\gobbletwoarguments
- \else\ifx\nexttoken\bgroup
- \let\nextcommaitem\doprocesscommalistA
+ \expandafter\gobblethreearguments
\else
- \let\nextcommaitem\doprocesscommalistB
- \fi\fi
- \nextcommaitem}
+ \expandafter\doprocesscommalist
+ \fi
+ \relax} % this one preserved the next {}
-\def\processcommalist[%
- {\futurelet\nexttoken\docheckcommaitem}
+\def\doprocesscommalist#1]#2%
+ {\global\advance\commalevel 1
+ \long\expandafter\def\csname\s!next\the\commalevel\endcsname##1,%
+ {#2{##1}\doprocesscommaitem}%
+ \@EA\dodoprocesscommaitem\gobbleoneargument#1,]\relax
+ \global\advance\commalevel -1 }
%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}
@@ -1860,7 +1908,7 @@
%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.
+%D rather dirty one.
\long\def\doifnumberelse#1#2#3%
{\bgroup\donefalse
@@ -2028,7 +2076,7 @@
% \fi}
%D \macros
-%D {dosetvalue,dosetevalue,docopyvalue,doresetvalue,
+%D {dosetvalue,dosetevalue,dosetgvalue,docopyvalue,doresetvalue,
%D dogetvalue}
%D
%D When we are going to do assignments, we have to take
@@ -2038,6 +2086,7 @@
%D \starttypen
%D \dosetvalue {label} {variable} {value}
%D \dosetevalue {label} {variable} {value}
+%D \dosetgvalue {label} {variable} {value}
%D \docopyvalue {to label} {from label} {variable}
%D \doresetvalue {label} {variable}
%D \stoptypen
@@ -2051,6 +2100,9 @@
\def\dosetevalue#1#2% #3
{\@EA\edef\csname#1#2\endcsname} % {#3}}
+\def\dosetevalue#1#2% #3
+ {\@EA\gdef\csname#1#2\endcsname} % {#3}}
+
\def\doresetvalue#1#2%
{\@EA\def\csname#1#2\endcsname{}}
@@ -2129,7 +2181,7 @@
{\dosetvalue{#1}{#2}{#3}}}
%D \macros
-%D {getparameters,geteparameters} % ,forgetparameters}
+%D {getparameters,geteparameters,getgparameters} % ,forgetparameters}
%D
%D Using the assignment commands directly is not our
%D ideal of user friendly interfacing, so we take some further
@@ -2210,6 +2262,9 @@
\def\geteparameters%
{\dogetparameters\dosetevalue}
+\def\getgparameters%
+ {\dogetparameters\dosetgvalue}
+
% \def\forgetparameters%
% {\dogetparameters\doresetvalue}
diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex
index de41c84f5..5d0bc72c6 100644
--- a/tex/context/base/syst-tex.tex
+++ b/tex/context/base/syst-tex.tex
@@ -130,7 +130,7 @@
\fi
%D When applicable, we also load the \ETEX\ source and
-%D defintion files.
+%D definition files.
\bgroup \obeylines
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index e9ac25290..5cc8f7676 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -446,6 +446,7 @@
\edef\endofverbatimcommand{\csname\verbatimname\endcsname}%
\edef\endofverbatimcommand{\meaning\endofverbatimcommand}%
\verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
+ \global\linepartrue % needed for paragraph numbering
\setupcopyverbatim
\initializeverbatimline
\copyverbatimline}
@@ -664,11 +665,11 @@
\iflinepar\else\EveryPar{}\fi
\leavevmode
\xdef\dokeepverbatimlinedata%
- {\parindent=\the\parindent
+ {\parindent =\the\parindent
\hangindent=\the\hangindent
- \hangafter=\the\hangafter
- \leftskip =\the\leftskip
- \rightskip=\the\rightskip}%
+ \hangafter =\the\hangafter
+ \leftskip =\the\leftskip
+ \rightskip =\the\rightskip}%
\egroup
\dokeepverbatimlinedata
\doopenupverbatimline
@@ -827,7 +828,7 @@
\obeypages
\obeycharacters
\ignoreeofs
- \openin\verbatiminput=#1
+ \openin\verbatiminput=#1\relax
\skipfirstverbatimlinefalse
\initializeverbatimline
\def\readline%
@@ -1709,6 +1710,7 @@
\expandafter\convertargument\csname\verbatimname\endcsname
\to\endofverbatimcommand
\verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip
+ \global\linepartrue % needed for paragraph numbering
\setupcopyverbatim
\initializeverbatimline
\copyverbatimline}
diff --git a/tex/context/config/cont-cz.ini b/tex/context/config/cont-cz.ini
new file mode 100644
index 000000000..2317e4266
--- /dev/null
+++ b/tex/context/config/cont-cz.ini
@@ -0,0 +1,2 @@
+\input cont-cz.tex
+\endinput \ No newline at end of file
diff --git a/tex/context/config/cont-de.ini b/tex/context/config/cont-de.ini
new file mode 100644
index 000000000..f4ec36007
--- /dev/null
+++ b/tex/context/config/cont-de.ini
@@ -0,0 +1,2 @@
+\input cont-de.tex
+\endinput \ No newline at end of file
diff --git a/tex/context/config/cont-en.ini b/tex/context/config/cont-en.ini
new file mode 100644
index 000000000..de2df5ef5
--- /dev/null
+++ b/tex/context/config/cont-en.ini
@@ -0,0 +1,2 @@
+\input cont-en.tex
+\endinput \ No newline at end of file
diff --git a/tex/context/config/cont-nl.ini b/tex/context/config/cont-nl.ini
new file mode 100644
index 000000000..1bd2bd47f
--- /dev/null
+++ b/tex/context/config/cont-nl.ini
@@ -0,0 +1,2 @@
+\input cont-nl.tex
+\endinput \ No newline at end of file
diff --git a/tex/context/config/cont-uk.ini b/tex/context/config/cont-uk.ini
new file mode 100644
index 000000000..467026bd2
--- /dev/null
+++ b/tex/context/config/cont-uk.ini
@@ -0,0 +1,2 @@
+\input cont-uk.tex
+\endinput \ No newline at end of file
diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex
index db2526542..161c076c0 100644
--- a/tex/context/config/cont-usr.tex
+++ b/tex/context/config/cont-usr.tex
@@ -32,6 +32,7 @@
\definefilesynonym [lang-en.pat] [ushyph1.tex]
\definefilesynonym [lang-fi.pat] [fihyph.tex]
\definefilesynonym [lang-fr.pat] [frhyph.tex]
+\definefilesynonym [lang-hr.pat] [hrhyph.tex]
\definefilesynonym [lang-it.pat] [ithyph.tex]
\definefilesynonym [lang-la.pat] [lahyph7.tex]
\definefilesynonym [lang-nl.pat] [nehyph.tex]
@@ -41,7 +42,6 @@
\definefilesynonym [lang-sk.pat] [skhyph.tex]
\definefilesynonym [lang-sp.pat] [sphyph.tex]
\definefilesynonym [lang-sv.pat] [sehyph.tex]
-\definefilesynonym [lang-hr.pat] [hrhyph.tex]
\definefilesynonym [lang-tr.pat] [trhyph.tex]
\definefilesynonym [lang-uk.pat] [ukhyphen.tex]
\definefilesynonym [lang-us.pat] [ushyph1.tex]
@@ -51,9 +51,9 @@
%D moment) we specify encodings here.
\installlanguage [\s!cz] [\s!mapping=il2,\s!encoding=il2]
-\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
+\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2]
\installlanguage [\s!pl] [\s!mapping=pl0,\s!encoding=pl0]
-\installlanguage [\s!hr] [\s!mapping=il2,\s!encoding=il2] % ans ?
+\installlanguage [\s!sk] [\s!mapping=il2,\s!encoding=il2]
%D Sometimes these are not wanted:
@@ -66,24 +66,26 @@
%D first. Normally you don't have to change a byte.
% \installlanguage [\s!af] [\c!status=\v!start] % afrikaans
+% \installlanguage [\s!cz] [\c!status=\v!start] % czech
% \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!hr] [\c!status=\v!start] % croatian
% \installlanguage [\s!it] [\c!status=\v!start] % italian
% \installlanguage [\s!la] [\c!status=\v!start] % latin
% \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!sk] [\c!status=\v!start] % slovak
% \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 [\s!hr] [\c!status=\v!start] % croatian
-\installlanguage [deo] [\c!status=\v!start] % old german
+% \installlanguage [deo] [\c!status=\v!start] % old german
% \installlanguage [nlx] [\c!status=\v!start] % dutch 8 bit
%D The next lines can be used for setting the language to be
@@ -96,6 +98,7 @@
% \setupcurrentlanguage[\s!en]
% \setupcurrentlanguage[\s!fi]
% \setupcurrentlanguage[\s!fr]
+% \setupcurrentlanguage[\s!hr]
% \setupcurrentlanguage[\s!it]
% \setupcurrentlanguage[\s!la]
% \setupcurrentlanguage[\s!nl]
@@ -106,7 +109,6 @@
% \setupcurrentlanguage[\s!sp]
% \setupcurrentlanguage[\s!sv]
% \setupcurrentlanguage[\s!tr]
-% \setupcurrentlanguage[\s!hr]
%D Local font settings can go here. Normally suitable
%D defaults are already preloaded, almost certainly the
@@ -114,9 +116,9 @@
%D next line is only meant as sample, take a look at the
%D format related files first.
-% \definefilesynonym [font-cmr] [font-csr]
-% \definefilesynonym [font-cmr] [font-plr]
+% \definefilesynonym [font-cmr] [font-csr] % czech & slovak
+% \definefilesynonym [font-cmr] [font-plr] % polish
%D Don't remove the next few lines.
-\protect
+\protect \endinput
diff --git a/tex/context/config/context.ini b/tex/context/config/context.ini
new file mode 100644
index 000000000..403a3063f
--- /dev/null
+++ b/tex/context/config/context.ini
@@ -0,0 +1,2 @@
+\input context.tex
+\endinput \ No newline at end of file
diff --git a/tex/generic/context/m-ch-de.tex b/tex/generic/context/m-ch-de.tex
deleted file mode 100644
index 467cdc670..000000000
--- a/tex/generic/context/m-ch-de.tex
+++ /dev/null
@@ -1,10 +0,0 @@
-% 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/generic/context/m-ch-en.tex b/tex/generic/context/m-ch-en.tex
deleted file mode 100644
index 8c55a5669..000000000
--- a/tex/generic/context/m-ch-en.tex
+++ /dev/null
@@ -1,10 +0,0 @@
-% 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/generic/context/m-ch-nl.tex b/tex/generic/context/m-ch-nl.tex
deleted file mode 100644
index c9d77733a..000000000
--- a/tex/generic/context/m-ch-nl.tex
+++ /dev/null
@@ -1,10 +0,0 @@
-% 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/generic/context/m-metapo.tex b/tex/generic/context/m-metapo.tex
deleted file mode 100644
index 6c2fa6fee..000000000
--- a/tex/generic/context/m-metapo.tex
+++ /dev/null
@@ -1,89 +0,0 @@
-%D \module
-%D [ file=m-metapo,
-%D version=1999.03.26,
-%D title=\LATEX\ Modules,
-%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\ distribution and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D We quit when \CONTEXT\ is found and use some deep down
-%D macro to trigger this:
-
-\ifx\undefined\dodoplaceexternalfigure \else \expandafter \endinput \fi
-
-%D \macros
-%D {includeMPgraphics}
-%D
-%D This rather small \LATEX\ module is dedicated to David
-%D Arnold. It takes care of including the fonts used in
-%D \METAPOST\ graphics in the file. This hack is needed when
-%D one uses another \DVI\ driver than \DVIPS. This module
-%D falls back on the generic \CONTEXT\ support module:
-
-\ifx\undefined\includeMPfonts \input supp-mps.tex \relax \fi
-
-%D Instead of using \type {\includegraphics}, one should use its
-%D little brother \type {\includeMPgraphics}. This macro takes
-%D the same arguments.
-
-\def\includeMPgraphics#1#%
- {\leavevmode\vbox\bgroup\hbox\bgroup
- \def\includeMPgraphics##1%
- {\includeMPfonts{##1}%
- \includegraphics#1{##1}%
- \egroup\egroup}%
- \includeMPgraphics}
-
-%D An example of using this module is given below:
-%D
-%D \starttypen
-%D \documentclass[10pt]{article}
-%D
-%D \usepackage{graphicx}
-%D \usepackage{m-metapo}
-%D
-%D \begin{document}
-%D \includeMPgraphics{somefile.1}
-%D \includeMPgraphics[angle=90]{somefile.2}
-%D \end{document}
-%D \stoptypen
-%D
-%D This module needs \type {supp-mps} and \type {supp-mis},
-%D that both are present in the \CONTEXT\ path.
-%D
-%D Pleas do not forget to say \type {prologues:=2} at the
-%D top of the metapost file!
-%D
-%D For non \LATEX\ (and \CONTEXT) users we provide an
-%D alternative inclusion macro. This one has no optional
-%D arguments.
-
-\ifx\includegraphics\undefined
-
- \ifx\undefined\dogetEPSboundingbox \input supp-eps.tex \relax \fi
-
- \def\includeMPgraphics#1%
- {\hbox\bgroup
- \includeMPfonts{#1}%
- \dogetEPSboundingbox{#1}{\dimen2}{\dimen4}{\dimen6}{\dimen8}%
- \vbox to \dimen8
- {\forgetall
- \hsize\dimen6
- \vfill
- \hbox to \hsize
- {\special
- {PSfile="#1"\space
- llx=\EPSllx\space
- lly=\EPSlly\space
- urx=\EPSurx\space
- ury=\EPSury\space}}}%
- \egroup}
-
-\fi
-
-\endinput
diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc
deleted file mode 100644
index 7e47e1563..000000000
--- a/tex/generic/context/ppchtex.noc
+++ /dev/null
@@ -1,205 +0,0 @@
-%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. See licen-en.pdf for
-%C details.
-
-%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/latex/context/m-ch-de.sty b/tex/latex/context/m-ch-de.sty
deleted file mode 100644
index d52078728..000000000
--- a/tex/latex/context/m-ch-de.sty
+++ /dev/null
@@ -1 +0,0 @@
-\input m-ch-de.tex \relax \endinput
diff --git a/tex/latex/context/m-ch-en.sty b/tex/latex/context/m-ch-en.sty
deleted file mode 100644
index ba5a5e16c..000000000
--- a/tex/latex/context/m-ch-en.sty
+++ /dev/null
@@ -1 +0,0 @@
-\input m-ch-en.tex \relax \endinput
diff --git a/tex/latex/context/m-ch-nl.sty b/tex/latex/context/m-ch-nl.sty
deleted file mode 100644
index 492f5efd3..000000000
--- a/tex/latex/context/m-ch-nl.sty
+++ /dev/null
@@ -1 +0,0 @@
-\input m-ch-nl.tex \relax \endinput
diff --git a/tex/latex/context/m-metapo.sty b/tex/latex/context/m-metapo.sty
deleted file mode 100644
index 1df781eae..000000000
--- a/tex/latex/context/m-metapo.sty
+++ /dev/null
@@ -1 +0,0 @@
-\input m-metapo.tex \relax \endinput
diff --git a/tex/latex/context/m-pictex.sty b/tex/latex/context/m-pictex.sty
deleted file mode 100644
index da9c18ed7..000000000
--- a/tex/latex/context/m-pictex.sty
+++ /dev/null
@@ -1 +0,0 @@
-\input m-pictex.tex \relax \endinput