summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-ini.tex22
-rw-r--r--tex/context/base/colo-pra.tex2
-rw-r--r--tex/context/base/colo-rgb.tex2
-rw-r--r--tex/context/base/colo-run.tex2
-rw-r--r--tex/context/base/colo-xwi.tex2
-rw-r--r--tex/context/base/cont-new.tex293
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-box.tex6
-rw-r--r--tex/context/base/core-des.tex181
-rw-r--r--tex/context/base/core-fig.tex31
-rw-r--r--tex/context/base/core-grd.tex91
-rw-r--r--tex/context/base/core-ins.tex2
-rw-r--r--tex/context/base/core-int.tex42
-rw-r--r--tex/context/base/core-itm.tex7
-rw-r--r--tex/context/base/core-lst.tex4
-rw-r--r--tex/context/base/core-mis.tex22
-rw-r--r--tex/context/base/core-new.tex2
-rw-r--r--tex/context/base/core-not.tex4
-rw-r--r--tex/context/base/core-ntb.tex58
-rw-r--r--tex/context/base/core-ref.tex28
-rw-r--r--tex/context/base/core-reg.tex9
-rw-r--r--tex/context/base/core-rul.tex2
-rw-r--r--tex/context/base/core-sec.tex29
-rw-r--r--tex/context/base/core-spa.tex175
-rw-r--r--tex/context/base/core-syn.tex4
-rw-r--r--tex/context/base/core-sys.tex50
-rw-r--r--tex/context/base/core-tbl.tex9
-rw-r--r--tex/context/base/enco-ans.tex8
-rw-r--r--tex/context/base/enco-def.tex2
-rw-r--r--tex/context/base/enco-ec.tex2
-rw-r--r--tex/context/base/enco-ecm.tex2
-rw-r--r--tex/context/base/enco-il2.tex2
-rw-r--r--tex/context/base/enco-mis.tex2
-rw-r--r--tex/context/base/enco-pdf.tex2
-rw-r--r--tex/context/base/enco-pol.tex2
-rw-r--r--tex/context/base/enco-run.tex4
-rw-r--r--tex/context/base/enco-tbo.tex2
-rw-r--r--tex/context/base/font-ini.tex8
-rw-r--r--tex/context/base/font-map.tex2
-rw-r--r--tex/context/base/font-uni.tex4
-rw-r--r--tex/context/base/hand-def.tex2
-rw-r--r--tex/context/base/meta-dum.tex13
-rw-r--r--tex/context/base/meta-ini.tex19
-rw-r--r--tex/context/base/meta-nav.tex4
-rw-r--r--tex/context/base/meta-txt.tex2
-rw-r--r--tex/context/base/mult-com.tex20
-rw-r--r--tex/context/base/mult-ini.tex30
-rw-r--r--tex/context/base/page-flt.tex4
-rw-r--r--tex/context/base/page-ini.tex57
-rw-r--r--tex/context/base/page-lay.tex4
-rw-r--r--tex/context/base/page-lin.tex2
-rw-r--r--tex/context/base/page-mak.tex2
-rw-r--r--tex/context/base/page-mul.tex6
-rw-r--r--tex/context/base/page-not.tex2
-rw-r--r--tex/context/base/regi-ibm.tex2
-rw-r--r--tex/context/base/regi-il1.tex4
-rw-r--r--tex/context/base/s-abr-03.tex2
-rw-r--r--tex/context/base/s-dtk-01.tex18
-rw-r--r--tex/context/base/s-map-01.tex22
-rw-r--r--tex/context/base/s-mod-01.tex4
-rw-r--r--tex/context/base/s-mod-02.tex2
-rw-r--r--tex/context/base/s-pre-05.tex2
-rw-r--r--tex/context/base/setupa.tex2
-rw-r--r--tex/context/base/setupb.tex26
-rw-r--r--tex/context/base/spec-fdf.tex4
-rw-r--r--tex/context/base/spec-mis.tex7
-rw-r--r--tex/context/base/supp-ali.tex2
-rw-r--r--tex/context/base/supp-box.tex18
-rw-r--r--tex/context/base/supp-fun.tex6
-rw-r--r--tex/context/base/supp-lan.tex14
-rw-r--r--tex/context/base/supp-ran.tex3
-rw-r--r--tex/context/base/syst-ext.tex48
-rw-r--r--tex/context/base/syst-gen.tex209
-rw-r--r--tex/context/base/thrd-ran.tex2
-rw-r--r--tex/context/base/type-akb.tex202
-rw-r--r--tex/context/base/type-buy.tex13
-rw-r--r--tex/context/base/type-ini.tex2
-rw-r--r--tex/context/base/verb-js.tex2
-rw-r--r--tex/context/base/verb-jv.tex2
-rw-r--r--tex/context/base/x-res-00.tex6
-rw-r--r--tex/context/base/x-res-01.tex14
-rw-r--r--tex/context/base/x-res-02.tex6
-rw-r--r--tex/context/base/x-res-08.tex1
-rw-r--r--tex/context/base/x-res-09.tex10
-rw-r--r--tex/context/base/x-res-10.tex75
-rw-r--r--tex/context/base/x-res-11.tex110
-rw-r--r--tex/context/base/x-xml-01.tex65
-rw-r--r--tex/context/base/x-xml-02.tex6
-rw-r--r--tex/context/base/xtag-ent.tex15
-rw-r--r--tex/context/base/xtag-ini.tex7
90 files changed, 1537 insertions, 686 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 73a03b91d..9f45f42ec 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=colo-ini,
-%D version=1997.4.1,
+%D version=1997.04.01,
%D title=\CONTEXT\ Color Macros,
%D subtitle=Initialization,
%D author=Hans Hagen,
@@ -1795,11 +1795,27 @@
%D therefore implement \type{\color} as:
\unexpanded\def\color[#1]%
+ {\groupedcommand{\startcolor[#1]}\stopcolor}
+
+% \let\switchtocolor\color
+
+%D When \type {\somecolor} is issued, we can savely assume
+%D grouping. Using \type {\groupedcommand} here (i.e.\ the
+%D definition of \type {\color}) is unsafe because in
+%D interferes with for instance switching attributes.
+
+%D Also wrong, test in combinations: \type{...{}{\red test}}
+%D
+%D \def\switchtocolor[#1]%
+%D {\startcolor[#1]\aftergroup\stopcolor}
+
+\def\switchtocolor[#1]% grouping is realy needed, else migration
+ {\bgroup\startcolor[#1]\aftergroup\stopcolor\aftergroup\egroup}
+
+\unexpanded\def\color[#1]%
{\groupedcommand
{\startcolor[#1]}\stopcolor}
-\let\switchtocolor\color
-
\unexpanded\def\graycolor[#1]% not \gray because this is a color
{\groupedcommand
{\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}\stopcolor}
diff --git a/tex/context/base/colo-pra.tex b/tex/context/base/colo-pra.tex
index a915762cb..228df546a 100644
--- a/tex/context/base/colo-pra.tex
+++ b/tex/context/base/colo-pra.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=colo-pra,
-%D version=1997.1.3,
+%D version=1997.01.03,
%D title=\CONTEXT\ Color Macros,
%D subtitle=PRAGMA,
%D author=Hans Hagen,
diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex
index 25322b70c..7554ed344 100644
--- a/tex/context/base/colo-rgb.tex
+++ b/tex/context/base/colo-rgb.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=colo-rgb,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Color Macros,
%D subtitle=RGB,
%D author=Hans Hagen,
diff --git a/tex/context/base/colo-run.tex b/tex/context/base/colo-run.tex
index 8c5e89a83..9e03627da 100644
--- a/tex/context/base/colo-run.tex
+++ b/tex/context/base/colo-run.tex
@@ -132,7 +132,7 @@
\let\colorstyle\empty
\setupcolor[#1]%
\fi
- \stelwitruimtein[\v!geen]
+ \setupwhitespace[\v!geen]
\def\rule
{\vrule\!!width4em\!!height\strutht\!!depth\strutdp}
\def\docommand##1%
diff --git a/tex/context/base/colo-xwi.tex b/tex/context/base/colo-xwi.tex
index 863165230..81e09d871 100644
--- a/tex/context/base/colo-xwi.tex
+++ b/tex/context/base/colo-xwi.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=colo-xwi,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Color Macros,
%D subtitle=X Windows,
%D author=Hans Hagen,
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index daef14d56..62c7d926a 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -17,13 +17,13 @@
\unprotect
-\def\tabulaterule
+\def\tabulaterule % to be redone, not correct
{\dotabulaterule
{\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
\doifvalue{\??tt\currenttabulate\c!afstand}\v!grid
{\kern-\scratchdimen}}} % experimental tm-prikkels
-% todo: \stelinterliniein[regel=vast] => ==\the\baselineskip
+% todo: \setupinterlinespace[\c!regel=\v!vast] => ==\the\baselineskip
%%%%%%%% todo: \chardef\snapstruts=1 => d=l-h
@@ -45,98 +45,6 @@
\stopXMLignore
\stopnointerference}
-\long\def\preservePSpar#1\to#2%
- {\bgroup
- \def\par{\rawcharacter{12}\rawcharacter{12}}%
- \expanded{\egroup\noexpand\def\noexpand#2{#1}}}
-
-\appendtoks\optimizeverbatimfalse\to\everytabulate
-
-\def\filterfromvalue#1#2#3% value max n
- {\@EA\@EAEAEA\csname
- \ifcase#2\or
- \ifcase#3\or
- \strippedcsname\firstofoneargument
- \else
- \strippedcsname\gobbleoneargument
- \fi
- \or
- \ifcase#3\or
- \strippedcsname\firstoftwoarguments
- \or
- \strippedcsname\secondoftwoarguments
- \else
- \strippedcsname\gobbletwoarguments
- \fi
- \or
- \ifcase#3\or
- \strippedcsname\firstofthreearguments
- \or
- \strippedcsname\secondofthreearguments
- \or
- \strippedcsname\thirdofthreearguments
- \else
- \strippedcsname\gobblethreearguments
- \fi
- \fi
- \endcsname\csname#1\endcsname}
-
-% \setvalue{xx}{{A}{B}{C}}
-
-% \filterfromvalue{xx}{3}{3}
-% \filterfromvalue{xx}{3}{2}
-% \filterfromvalue{xx}{3}{1}
-
-% new, needed for icare first col of 'doeltabel', experimental
-
-\newif\ifsqueezeTBLspan % \squeezeTBLspantrue
-
-\def\settblspn #1{\setvalue {\@@tblprefix#1:s}{1}}
-\def\doifelsetblspn#1{\doifelsevalue{\@@tblprefix#1:s}{1}}
-
-\long\def\dohandleTBLcellA#1#2[#3]#4%
- {\setbox\scratchbox\hbox
- {\setupTBLcell{#1}{#2}%
- \localframed
- [\@@tbl\@@tbl]
- [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster
- {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}%
- \scratchdimen\gettblwid\colTBL\relax
- \ifdim\wd\scratchbox>\scratchdimen
- \ifsqueezeTBLspan
- \ifnum0\number\gettblcol{#1}{#2}>1\relax \settblspn\colTBL \fi
- \fi
- \doifelsetblspn\colTBL
- \donothing{\settblwid\colTBL{\the\wd\scratchbox}}% auto set
- \fi
- \let\rowTBLx\rowTBL\increment\rowTBLx
- \scratchdimen\gettblhei\rowTBLx\relax
- \ifdim\ht\scratchbox<\scratchdimen
- \settblhei\rowTBLx{\the\ht\scratchbox}% auto set
- \fi
- \settblht{#1}{#2}{\the\ht\scratchbox}%
- \settblwd{#1}{#2}{\the\wd\scratchbox}%
- \ifautoTBLcheckwidth
- \ifdim\wd\scratchbox<.75\hsize
- \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
- \scratchdimen\gettblaut\colTBL\relax % figure or so
- \ifdim\scratchdimen=\zeropoint
- % side effect: when width is set to 0pt,
- % we can force a span that fits the sum of spans widths
- \settblaut\colTBL{\the\scratchdimen}%
- \else\ifdim\wd\scratchbox>\scratchdimen
-% unless span
- \settblaut\colTBL{\the\wd\scratchbox}%
- % to be translated
- \writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
- \fi\fi
- \fi
- \fi
- \fi
- \setbox2\null
- \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
- \box2}
-
\def\processlinetableXMLfile#1%
{\bgroup
\let\startlinetable\donothing
@@ -169,81 +77,6 @@
\fi
\fi}
-\def\centertogrid % meant for special situations
- {\ifgridsnapping
- \dowithnextboxcontent
- {\ignorespaces}
- {\bgroup
- \par
- \scratchdimen\nextboxht
- \advance\scratchdimen \nextboxdp
- \getnoflines\scratchdimen
- \setbox\nextbox\vbox to \noflines\lineheight
- {\forgetall
- \vss
- \topbaselinecorrection
- \copy\nextbox
- \botbaselinecorrection
- \vss}%
- \setbox\nextbox\hbox{\lower\strutdp\flushnextbox}%
- \noindent\snaptogrid\vbox{\flushnextbox}%
- \egroup}
- \vbox % was \hbox
- \fi}
-
-% \strut Bruggetje
-% \startlinecorrection
-% \startcombination
-% {\framed{test}} {} {\framed{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection
-% \startcombination[2*2]
-% {\framed{test}} {} {\framed{test}} {}
-% {\framed{test}} {} {\framed{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection[blank]
-% \startcombination
-% {\framed{test}} {} {\framed{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection[blank]
-% \startcombination[2*2]
-% {\framed{test}} {} {\framed{test}} {}
-% {\framed{test}} {} {\framed{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection
-% \startcombination
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection
-% \startcombination[2*2]
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection[blank]
-% \startcombination
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% \stopcombination
-% \stoplinecorrection
-% \strut Bruggetje
-% \startlinecorrection[blank]
-% \startcombination[2*2]
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
-% \stopcombination
-% \stoplinecorrection
-
% experimental: \synchronizegrid bla bla bla
\newcounter\currentgridsync
@@ -322,59 +155,6 @@
% so far
-\def\setstrut
- {\strutdimen\normallineheight
- \strutdimen\strutheightfactor\strutdimen
- \strutdimen\spacingfactor\strutdimen
- \edef\strutheight{\the\strutdimen}%
- \strutdimen\normallineheight
- \ifgridsnapping
- \advance\strutdimen-\strutheight
- \else
- \strutdimen\strutdepthfactor\strutdimen
- \strutdimen\spacingfactor\strutdimen
- \fi
- \edef\strutdepth{\the\strutdimen}%
- \dosetstrut}
-
-% \setupinteraction[state=start]
-%
-% \useattachment[whatever][[new name]][test.tex]
-%
-% % \setupattachments[\c!symbool={symbol-normal,symbol-down}]
-%
-% \starttext \attachment[whatever] \stoptext
-
-\definesystemvariable{at}
-
-\def\useattachment
- {\dotripleempty\douseattachment}
-
-\def\douseattachment[#1][#2][#3]%
- {\setgvalue{\??at :#1}{#2}%
- \setgvalue{\??at::#1}{#3}%
- \doifvaluenothing{\??at :#1}{\setxvalue{\??at :#1}{#1}}%
- \doifvaluenothing{\??at::#1}{\setxvalue{\??at::#1}{\getvalue{\??at:#1}}}}
-
-\def\attachment[#1]%
- {\ifundefined{\??at:#1}\else \iflocation
- \doif\@@atstatus\v!start
- {\doiffileelse{\getvalue{\??at:#1}}%
- {\doPDFattachfile
- {\getvalue{\??at::#1}}%
- {1em}{1ex}\@@atkleur\@@atsymbool
- {\getvalue{\??at:#1}}}%
- {}}%
- \fi \fi}
-
-\def\setupattachments
- {\dodoubleempty\getparameters[\??at]}
-
-\setupattachments
- [\c!status=\v!start,
- \c!kleur=\@@iakleur,
- \c!symbool=]
-
% test this prikkels/pascal margin text before heads (mode
% 1) as well as uitwerkingen (mode 2)
@@ -454,39 +234,12 @@
\long \def\tableiftextelse#1{\tableifelse{\doiftextelse{#1}}}
-\def\ejectinsert
- {\flushnotes
- \bgroup
- \noftopfloats\plusthousand
- \nofbotfloats\zerocount
- % this is needed in case a float that has been stored
- % ends up at the current page; this border case occurs when
- % the calculated room is 'eps' smaller that the room available
- % when just flushing; so now we have (maybe optional):
- \pagebaselinecorrection
- % alas, this is tricky but needed (first surfaced in prikkels)
- \doflushfloats
- \egroup}
-
\def\overloaded#1#2%
{\appendtoks
\writestatus\m!systems{overloaded: \string#2}%
\to \everybye
#1#2}
-\def\toplinebox
- {\dowithnextbox
- {\ifdim\nextboxdp>\strutdepth
- \scratchdimen\nextboxdp
- \advance\scratchdimen-\strutdepth
- \getnoflines\scratchdimen
- \struttedbox{\flushnextbox}%
- \dorecurse\noflines\verticalstrut
- \else
- \flushnextbox
- \fi}%
- \tbox}
-
\def\expandifnonempty#1%
{\@EA\ifx\csname#1\endcsname\empty
\expandafter\secondoftwoarguments
@@ -530,25 +283,6 @@
\def\tightvtop
{\dowithnextbox{\nextboxht\zeropoint\flushnextbox}\vtop}
-\def\startpagefigure
- {\dodoubleempty\dostartpagefigure}
-
-\def\dostartpagefigure[#1][#2]%
- {\bgroup
- \getparameters[\??ex][\c!offset=\!!zeropoint,#2]%
- \startTEXpage[\c!offset=\@@exoffset]%
- \externalfigure[#1][#2]\ignorespaces}
-
-\def\stoppagefigure
- {\stopTEXpage
- \egroup}
-
-\def\pagefigure
- {\dodoubleempty\dopagefigure}
-
-\def\dopagefigure[#1][#2]%
- {\dostartpagefigure[#1][#2]\stoppagefigure}
-
% pretty important (esp since we now ignore shipouts)
%
% actually we should nil all writes, marks, specials
@@ -586,29 +320,6 @@
% \aftergroup\stopcolor
% \aftergroup\egroup}
-% test this for a long time, esp since from now on, by default
-% \commands are not expanded
-
-\setupreferencing
- [\c!expansie=\v!nee]
-
-\def\dotextreference[#1]#2%
- {\bgroup
- \def\asciia{#1}%
- \convertexpanded\??rf{#2}\asciib
- \@EA\rawtextreference\@EA\s!txt\@EA\asciia\@EA{\asciib}%
- \egroup}
-
-\def\dopagereference[#1]%
- {\rawpagereference\s!pag{#1}}
-
-\def\doreference[#1]#2%
- {\bgroup
- \def\asciia{#1}%
- \convertexpanded\??rf{#2}\asciib
- \@EA\rawreference\@EA\s!ref\@EA\asciia\@EA{\asciib}%
- \egroup}
-
% what is this stupid macro meant for:
\def\hyphenationpoint
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 280f25526..40c9a36a1 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -15,7 +15,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2003.7.21}
+\def\contextversion{2003.8.8}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex
index d3a1ce572..1bca2cd24 100644
--- a/tex/context/base/core-box.tex
+++ b/tex/context/base/core-box.tex
@@ -297,7 +297,7 @@
\setcollector
[caption][#1]
{\getparameters[\??du][#2]%
- \dosetfontattribute\??du\c!letter\stelinterliniein
+ \dosetfontattribute\??du\c!letter\setupinterlinespace
\framed % watch the special setting of kader/overlay
[\c!kader=\v!overlay,#2]
{\doattributes\??du\c!letter\c!kleur{#3}}}%
@@ -342,7 +342,7 @@
[caption]
[#1]
{\getparameters[\??du][#2]%
- \dosetfontattribute\??du\c!letter\stelinterliniein
+ \dosetfontattribute\??du\c!letter\setupinterlinespace
\framed
[\c!kader=\v!overlay,,#2]
{\doattributes\??du\c!letter\c!kleur{#3}}}%
@@ -577,7 +577,7 @@
\dowithnextboxcontent
{\forgetall
\hsize\@@lxbreedte
- \expanded{\steluitlijnenin[\@@lxuitlijnen]}%
+ \expanded{\setupalign[\@@lxuitlijnen]}%
\dosetfontattribute\??lx\c!letter}
{\setlayer[#1][#2]{\strut\color[\@@lxkleur]{\flushnextbox}}%
\egroup}%
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index b6bb525ca..2b27f7d25 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -39,12 +39,19 @@
\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}}
+
\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}}
+ {\getvalue{\??dd#1\c!commando}{#4}}% NAAR BUITENSTE NIVEAU !
+ \rawreference\s!def{#2}{#3}} % brrr moet in #4
+
\setvalue{@@definitie\v!links}#1%
{\@@definitiehang{#1}\@@definitielinkspure\@@definitielinkshang}
@@ -97,7 +104,7 @@
\hsize\!!widtha
\leftskip\zeropoint
\rightskip\zeropoint
- #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]%
+ #2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]%
\unhcopy\@@definitiebox}%
\ht\@@definitiebox\strutht
\dp\@@definitiebox\strutdp}
@@ -136,7 +143,7 @@
{\forgetall
\mindermeldingen
\hsize\!!widtha
- #2\steluitlijnenin[\getvalue{\??dd#1\c!uitlijnen}]#3%
+ #2\setupalign[\getvalue{\??dd#1\c!uitlijnen}]#3%
\unhcopy\@@definitiebox}%
\ht\@@definitiebox\strutht
\dp\@@definitiebox\strutdp
@@ -243,18 +250,51 @@
\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}%
+% % \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}%
+% \expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}%
+% \ifcase\insidedefinition % better a system mode
+% \chardef\insidedefinition\plusone
+% \or
+% \chardef\insidedefinition\plustwo
+% \fi} % now happens elsewhere : \noindent\ignorespaces
+
\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}%
@@ -268,7 +308,16 @@
{\??dd#1}\c!kopletter\c!kopkleur
{\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
{\!!widthb}%
-% \parindent\zeropoint\relax
+ \setbox\@@definitiebox\hbox
+ {\forgetall
+ \mindermeldingen
+ \let\\\endgraf
+ \doifelsevalue{\??dd#1\c!plaats}\v!aanelkaar
+ {\@@definitiewoord{#1}[#2]{#3}%
+ {\begstrut\getvalue{\??dd#1\c!tekst}#3\endstrut}}
+ {\@@definitiewoord{#1}[#2]{#3}%
+ {\vtop{\hsize\!!widtha\advance\hsize-\!!widthb
+ \begstrut\getvalue{\??dd#1\c!tekst}\ignorespaces#3\endstrut}}}}%
\doifelsevalue{\??dd#1\c!titeluitlijnen}\v!nee
{\edef\@@leftdefinitieskip {\the\leftskip }%
\edef\@@rightdefinitieskip{\the\rightskip}}
@@ -276,7 +325,7 @@
\edef\@@leftdefinitieskip {\the\leftskip }%
\edef\@@rightdefinitieskip{\the\rightskip}%
\fi}%
-\expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}%
+ \expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}%
\ifcase\insidedefinition % better a system mode
\chardef\insidedefinition\plusone
\or
@@ -364,10 +413,17 @@
\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\showdntext#1%
{\doifelsevaluenothing{\??dd#1\c!tekst}
{\ignorespaces}
- {\strut\getvalue{\??dd#1\c!tekst}\fixedspace}}
+ {\strut
+ \getvalue{\??dd#1\c!tekst}%
+ \removeunwantedspaces\fixedspace}}
% \def\showdnnummer#1%
% {\voorafgaandenummer
@@ -401,13 +457,68 @@
% #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}%
+% \chardef\definitiekoppeling\zerocount
+% \iflocation
+% \doifvaluesomething{\??dd#1\c!koppeling}
+% {\processaction % genereert > of <
+% [\getvalue{\??dd#1\c!koppelwijze}]
+% [ \v!lokaal=>\chardef\definitiekoppeling1, % old: default
+% \v!globaal=>\chardef\definitiekoppeling2]}% 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
+% \letvalue{\??dd#1\c!sectienummer}\v!ja
+% \protectconversion
+% \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
+% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
+% \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[\getvalue{\??dd#1\??dd\c!nummer}]%
+% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
+% \hbox
+% {\let\normalkap\relax % sorry, uppercase causes troubles
+% \doattributes % \nocase primitive needed
+% {\??dd#2#1}\c!kopletter\c!kopkleur
+% {\getvalue{\??dd#1\c!commando}% hook for taco
+% {\showdntext{#2#1}%
+% \domakednnummer{#1}{#2}{#3}}}%
+% \iflocation\ifcase\definitiekoppeling \else
+% \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
+% \doifreferencefoundelse\localconnection
+% % {\in[\localconnection]}{}% genereert > of <
+% \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\special@@definitiewoord#1#2#3#4[#5]#6#7%
{\strut
\doifelsevalue{\??dd#1\c!nummer}\v!nee
- \!!doneafalse
- {\doifelse{#5}{-}
- \!!doneafalse
- \!!doneatrue}%
+ \!!doneafalse{\doifelse{#5}{-}\!!doneafalse\!!doneatrue}%
\chardef\definitiekoppeling\zerocount
\iflocation
\doifvaluesomething{\??dd#1\c!koppeling}
@@ -438,25 +549,23 @@
\fi
\maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]%
\preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber
- \hbox
- {\let\normalkap\relax % sorry, uppercase causes troubles
- \doattributes % \nocase primitive needed
- {\??dd#2#1}\c!kopletter\c!kopkleur
- {\getvalue{\??dd#1\c!commando}% hook for taco
- {\showdntext{#2#1}%
- \domakednnummer{#1}{#2}{#3}}}%
- \iflocation\ifcase\definitiekoppeling \else
- \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
- \doifreferencefoundelse\localconnection
- {\in[\localconnection]}{}% genereert > of <
- \fi\fi}%
+ \let\normalkap\relax % sorry, uppercase causes troubles
+ \doattributes % \nocase primitive needed
+ {\??dd#1}\c!kopletter\c!kopkleur
+ {\getvalue{\??dd#1\c!commando}% hook for taco
+ {\showdntext{#2#1}%
+ \domakednnummer{#1}{#2}{#3}}}%
+ \iflocation\ifcase\definitiekoppeling \else
+ \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}%
+ \doifreferencefoundelse\localconnection
+ {\in[\localconnection]}\donothing % genereert > of <
+ \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}{}}}%
+ \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%
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index 5a1157b68..f9e202528 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -1609,17 +1609,36 @@
\popendofline
\egroup}
-\def\pagefigure
- {\dodoubleempty\dopagefigure}
+% \def\pagefigure
+% {\dodoubleempty\dopagefigure}
+%
+% \def\dopagefigure[#1][#2]%
+% {\bgroup
+% \getparameters[\??ex][\c!offset=\v!overlay,#2]%
+% \startTEXpage[\c!offset=\@@exoffset]%
+% \externalfigure[#1][#2]%
+% \stopTEXpage
+% \egroup}
-\def\dopagefigure[#1][#2]%
+\def\startpagefigure
+ {\dodoubleempty\dostartpagefigure}
+
+\def\dostartpagefigure[#1][#2]%
{\bgroup
- \getparameters[\??ex][\c!offset=\!!zeropoint,#2]%
+ \getparameters[\??ex][\c!offset=\v!overlay,#2]%
\startTEXpage[\c!offset=\@@exoffset]%
- \externalfigure[#1][#2]%
- \stopTEXpage
+ \externalfigure[#1][#2]\ignorespaces}
+
+\def\stoppagefigure
+ {\stopTEXpage
\egroup}
+\def\pagefigure
+ {\dodoubleempty\dopagefigure}
+
+\def\dopagefigure[#1][#2]%
+ {\dostartpagefigure[#1][#2]\stoppagefigure}
+
% \starttext \pagefigure[two.1] \stoptext
\def\doshowexternalfigures[#1]%
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 27387c9d6..2e5675c9e 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -976,7 +976,32 @@
\hbox
\fi}
-\def\centertogrid % meant for special situations
+% \def\centertogrid % meant for special situations
+% {\ifgridsnapping
+% \dowithnextboxcontent
+% {\ignorespaces}
+% {\bgroup
+% \par
+% \scratchdimen\nextboxht
+% \advance\scratchdimen \nextboxdp
+% \getnoflines\scratchdimen
+% \setbox\nextbox\vbox to \noflines\lineheight
+% {\forgetall
+% \vskip\zeropoint \!!plus \nextboxht
+% \copy\nextbox
+% \kern.5\strutdp % VOORLOPIGE WAARDE
+% \vskip\zeropoint \!!plus \nextboxdp}%
+% \noindent\snaptogrid\vbox{\flushnextbox}%
+% \egroup}
+% \vbox % was \hbox
+% \fi}
+
+% The next implementation is sub-optimal
+%
+% \def\centertogrid % usage: see ie pascal / stepcharts
+% {\snaptogrid[\v!midden,.5\strutdp]\vbox}
+
+\def\centertogrid % meant for special situations
{\ifgridsnapping
\dowithnextboxcontent
{\ignorespaces}
@@ -987,19 +1012,71 @@
\getnoflines\scratchdimen
\setbox\nextbox\vbox to \noflines\lineheight
{\forgetall
- \vskip\zeropoint \!!plus \nextboxht
+ \vss
+ \topbaselinecorrection
\copy\nextbox
- \kern.5\strutdp % VOORLOPIGE WAARDE
- \vskip\zeropoint \!!plus \nextboxdp}%
+ \botbaselinecorrection
+ \vss}%
+ \setbox\nextbox\hbox{\lower\strutdp\flushnextbox}%
\noindent\snaptogrid\vbox{\flushnextbox}%
\egroup}
\vbox % was \hbox
\fi}
-% The next implementation is sub-optimal
+% testbed for \centertogrid
%
-% \def\centertogrid % usage: see ie pascal / stepcharts
-% {\snaptogrid[\v!midden,.5\strutdp]\vbox}
+% \strut Bruggetje
+% \startlinecorrection
+% \startcombination
+% {\framed{test}} {} {\framed{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection
+% \startcombination[2*2]
+% {\framed{test}} {} {\framed{test}} {}
+% {\framed{test}} {} {\framed{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection[blank]
+% \startcombination
+% {\framed{test}} {} {\framed{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection[blank]
+% \startcombination[2*2]
+% {\framed{test}} {} {\framed{test}} {}
+% {\framed{test}} {} {\framed{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection
+% \startcombination
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection
+% \startcombination[2*2]
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection[blank]
+% \startcombination
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% \stopcombination
+% \stoplinecorrection
+% \strut Bruggetje
+% \startlinecorrection[blank]
+% \startcombination[2*2]
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% {\framed[lines=1]{test}} {} {\framed[lines=1]{test}} {}
+% \stopcombination
+% \stoplinecorrection
\ifx\startbaselinecorrection\undefined \wait \fi % change order
diff --git a/tex/context/base/core-ins.tex b/tex/context/base/core-ins.tex
index 1cb08e0af..c1185f7de 100644
--- a/tex/context/base/core-ins.tex
+++ b/tex/context/base/core-ins.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-ins,
-%D version=2002.4.16,
+%D version=2002.04.16,
%D title=\CONTEXT\ Insertion Macros,
%D subtitle=Insertions,
%D author=Hans Hagen,
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 14ffe5b98..771887a6d 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-int,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Core Macros,
%D subtitle=Interaction,
%D author=Hans Hagen,
@@ -872,7 +872,7 @@
\advance\dimen0 -\getvalue{\??am#3\c!onderoffset}%
\setbox0\vbox to \dimen0
{\forgetall % Voor't geval de afstand
- %\stelblankoin[\v!standaard]% % (tijdelijk) is aangepast.
+ %\setupblank[\v!standaard]% % (tijdelijk) is aangepast.
\restorestandardblank
\hsize#2\relax
\executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na}%
@@ -2233,6 +2233,44 @@
\def\placecomments
{\doflushcomments}
+% \setupinteraction[state=start]
+%
+% \useattachment[whatever][[new name]][test.tex]
+%
+% % \setupattachments[\c!symbool={symbol-normal,symbol-down}]
+%
+% \starttext \attachment[whatever] \stoptext
+
+\definesystemvariable{at}
+
+\def\useattachment
+ {\dotripleempty\douseattachment}
+
+\def\douseattachment[#1][#2][#3]%
+ {\setgvalue{\??at :#1}{#2}%
+ \setgvalue{\??at::#1}{#3}%
+ \doifvaluenothing{\??at :#1}{\setxvalue{\??at :#1}{#1}}%
+ \doifvaluenothing{\??at::#1}{\setxvalue{\??at::#1}{\getvalue{\??at:#1}}}}
+
+\def\attachment[#1]%
+ {\ifundefined{\??at:#1}\else \iflocation
+ \doif\@@atstatus\v!start
+ {\doiffileelse{\getvalue{\??at:#1}}%
+ {\doPDFattachfile
+ {\getvalue{\??at::#1}}%
+ {1em}{1ex}\@@atkleur\@@atsymbool
+ {\getvalue{\??at:#1}}}%
+ {}}%
+ \fi \fi}
+
+\def\setupattachments
+ {\dodoubleempty\getparameters[\??at]}
+
+\setupattachments
+ [\c!status=\v!start,
+ \c!kleur=\@@iakleur,
+ \c!symbool=]
+
% jammer, tussen/midden had erin gemoeten; \c!commando toevoegen
\def\registermenucommand#1%
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 445b634d4..ad83c0da5 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -365,7 +365,7 @@
% \fi
% \dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand
% \doifsomething{\getitemparameter\itemlevel\c!inspringen}
-% {\expanded{\stelinspringenin[\getitemparameter\itemlevel\c!inspringen]}}%
+% {\expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}%
% \doifinset\v!kolommen{#1}%
% {\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount
% \globallet\itemcolumndepth\itemlevel
@@ -481,7 +481,8 @@
\fi
\dosetraggedcommand{\getitemparameter\itemlevel\c!uitlijnen}\raggedcommand
\doifsomething{\getitemparameter\itemlevel\c!inspringen}
- {\expanded{\stelinspringenin[\getitemparameter\itemlevel\c!inspringen]}}%
+ {% is \expanded needed?
+ \expanded{\setupindenting[\getitemparameter\itemlevel\c!inspringen]}}%
\doifinset\v!kolommen{#1}%
{\ifbinnenkolommen\else\ifnum\itemcolumndepth=\zerocount
\globallet\itemcolumndepth\itemlevel
@@ -772,7 +773,7 @@
\ignorespaces
\dolistitem
\ifpackeditems
- \stelwitruimtein[\v!geen]%
+ \setupwhitespace[\v!geen]%
\fi
\getitemparameter\itemlevel\c!binnen
\marsymbol
diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex
index a512b5562..535cfddb1 100644
--- a/tex/context/base/core-lst.tex
+++ b/tex/context/base/core-lst.tex
@@ -452,7 +452,7 @@
\edef\lijstelementen
{\getvalue{\??li#1\c!paginaovergangen}}%
\ExpandBothAfter\doifinset{#3}\lijstelementen
- {\showmessage{\m!systems}{14}{#3}%
+ {\showmessage\m!systems{14}{#3}%
\pagina}%
\egroup
\mindermeldingen
@@ -576,7 +576,7 @@
\translatednumber[#5]}}}}}}}%
\vbox
{\hsize\!!widthb
- \expanded{\steluitlijnenin[\getvalue{\??li#1\c!uitlijnen}]}%
+ \setupalign[\getvalue{\??li#1\c!uitlijnen}]%
\ifdim\!!widtha<\hsize
\hangindent=\wd2
\dimen2=\!!widthc % \getvalue{\??li#1\c!afstand}%
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex
index 85270dec0..fae009b7b 100644
--- a/tex/context/base/core-mis.tex
+++ b/tex/context/base/core-mis.tex
@@ -334,9 +334,9 @@
\hsize\!!widtha % setting \wd afterwards removed
\getvalue{\??al#1\the\alteller\c!binnen}%
\edef\!!stringa{\getvalue{\??al#1\the\alteller\c!uitlijnen}}% nodig?
- \expandafter\steluitlijnenin\expandafter[\!!stringa]%
+ \expandafter\setupalign\expandafter[\!!stringa]%
\edef\!!stringa{\getvalue{\??al#1\the\alteller\c!tolerantie}}% nodig?
- \expandafter\steltolerantiein\expandafter[\!!stringa]%
+ \expandafter\setuptolerance\expandafter[\!!stringa]%
\ignorespaces
\endgraf
\ignorespaces
@@ -1739,7 +1739,7 @@
\def\insidesecondpairedbox
{\forgetall
- \steluitlijnenin[\@@lduitlijnen]%
+ \setupalign[\@@lduitlijnen]%
\tolerantTABLEbreaktrue % hm.
\blanko[\v!blokkeer]%
\everypar{\begstrut}}
@@ -1845,7 +1845,7 @@
\def\nextnext
{\ifx\nexttoken\egroup \else % the next box is empty
\hsize\wd0
- \steluitlijnenin[\combinationparameter\c!uitlijnen]%
+ \setupalign[\combinationparameter\c!uitlijnen]%
\dostartattributes{\??co\currentcombination}\c!letter\c!kleur\empty
\bgroup
\aftergroup\endstrut
@@ -1861,7 +1861,7 @@
%
% \def\dodocombination
% {\vbox
-% {\forgetall % \stelwitruimtein[\v!geen]%
+% {\forgetall % \setupwhitespace[\v!geen]%
% \let\next\vbox
% \ExpandFirstAfter\processallactionsinset
% [\combinationparameter\c!plaats]
@@ -1873,7 +1873,7 @@
% %\vtop % wrong code
% % {\nointerlineskip % recently added
% % \hsize\wd0
-% % \steluitlijnenin[\combinationparameter\c!uitlijnen]% % \raggedcenter
+% % \setupalign[\combinationparameter\c!uitlijnen]% % \raggedcenter
% % \begstrut\unhbox2\endstrut}%
% \box2
% \fi}%
@@ -1883,7 +1883,7 @@
% \ifnum\horcombination=\zerocount
% \def\next
% {\cr\noalign
-% {\forgetall % \stelwitruimtein[\v!geen]% no
+% {\forgetall % \setupwhitespace[\v!geen]% no
% \nointerlineskip
% \combinationparameter\c!na
% \combinationparameter\c!voor
@@ -1903,7 +1903,7 @@
\def\dodocombination
{\vbox
- {\forgetall % \stelwitruimtein[\v!geen]%
+ {\forgetall % \setupwhitespace[\v!geen]%
\let\next\vbox
\ExpandFirstAfter\processallactionsinset
[\combinationparameter\c!plaats]
@@ -1920,7 +1920,7 @@
{\cr
\flushcombinationstack
\noalign
- {\forgetall % \stelwitruimtein[\v!geen]% no
+ {\forgetall % \setupwhitespace[\v!geen]% no
\global\setbox\combinationstack\emptybox
\nointerlineskip
\combinationparameter\c!na
@@ -2005,10 +2005,10 @@
\aftergroup\doplaatsondernaastelkaar
\let\next=}
-\def\plaatsonderelkaar
+\def\placeontopofeachother
{\plaatsondernaastelkaar\halign\hss}
-\def\plaatsnaastelkaar
+\def\placesidebyside
{\plaatsondernaastelkaar\valign\vss}
\def\dogebruikexternefiles[#1][#2]%
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 28d667cab..a675ce0ed 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=core-nav,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Core Macros,
%D subtitle=New ones,
%D author=Hans Hagen,
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 77eec6bc7..1340bbb59 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -895,8 +895,8 @@
{\let\setfootnotebodyfont\relax
\restoreglobalbodyfont
\switchtobodyfont[\@@vnkorps]%
- \steltolerantiein[\@@vntolerantie]%
- \steluitlijnenin[\@@vnuitlijnen]}
+ \setuptolerance[\@@vntolerantie]%
+ \setupalign[\@@vnuitlijnen]}
%D The footnote mechanism defaults to a traditional one
%D column way of showing them. By default we precede them by
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index d66707523..e7589d82c 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -110,8 +110,13 @@
\def\doiftblcol #1#2{\doifdefined {\@@tblprefix#1:#2:c}}
\def\doifnottblcol #1#2{\doifundefined {\@@tblprefix#1:#2:c}}
-\def\settblspn#1#2{\setvalue {\@@tblprefix#1:s}{#2}}
-\def\doiftblspn #1{\doifelsevalue{\@@tblprefix#1:s}{1}}
+% \def\settblspn#1#2{\setvalue {\@@tblprefix#1:s}{#2}}
+% \def\doiftblspn #1{\doifelsevalue{\@@tblprefix#1:s}{1}}
+
+\newif\ifsqueezeTBLspan % \squeezeTBLspantrue
+
+\def\settblspn #1{\setvalue {\@@tblprefix#1:s}{1}}
+\def\doifelsetblspn#1{\doifelsevalue{\@@tblprefix#1:s}{1}}
\def\settbltxt#1#2{\long\setvalue{\@@tblprefix:#1:#2:t}}
\def\gettbltxt#1#2{\csname\@@tblprefix:#1:#2:t\endcsname}
@@ -866,6 +871,47 @@
\setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}%
\ignorespaces}
+% \long\def\dohandleTBLcellA#1#2[#3]#4%
+% {\setbox\scratchbox\hbox
+% {\setupTBLcell{#1}{#2}%
+% \localframed
+% [\@@tbl\@@tbl]
+% [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster
+% {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}%
+% \scratchdimen\gettblwid\colTBL\relax
+% \ifdim\wd\scratchbox>\scratchdimen
+% \settblwid\colTBL{\the\wd\scratchbox}% auto set
+% \fi
+% \let\rowTBLx\rowTBL\increment\rowTBLx
+% \scratchdimen\gettblhei\rowTBLx\relax
+% \ifdim\ht\scratchbox<\scratchdimen
+% \settblhei\rowTBLx{\the\ht\scratchbox}% auto set
+% \fi
+% \settblht{#1}{#2}{\the\ht\scratchbox}%
+% \settblwd{#1}{#2}{\the\wd\scratchbox}%
+% \ifautoTBLcheckwidth
+% \ifdim\wd\scratchbox<.75\hsize
+% \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
+% \scratchdimen\gettblaut\colTBL\relax % figure or so
+% \ifdim\scratchdimen=\zeropoint
+% % side effect: when width is set to 0pt,
+% % we can force a span that fits the sum of spans widths
+% \settblaut\colTBL{\the\scratchdimen}%
+% \else\ifdim\wd\scratchbox>\scratchdimen
+% % unless span
+% \settblaut\colTBL{\the\wd\scratchbox}%
+% % to be translated
+% \writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
+% \fi\fi
+% \fi
+% \fi
+% \fi
+% \setbox2\null
+% \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
+% \box2}
+
+% new, needed for icare first col of 'doeltabel', experimental
+
\long\def\dohandleTBLcellA#1#2[#3]#4%
{\setbox\scratchbox\hbox
{\setupTBLcell{#1}{#2}%
@@ -875,7 +921,11 @@
{\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}%
\scratchdimen\gettblwid\colTBL\relax
\ifdim\wd\scratchbox>\scratchdimen
- \settblwid\colTBL{\the\wd\scratchbox}% auto set
+ \ifsqueezeTBLspan
+ \ifnum0\number\gettblcol{#1}{#2}>1\relax \settblspn\colTBL \fi
+ \fi
+ \doifelsetblspn\colTBL
+ \donothing{\settblwid\colTBL{\the\wd\scratchbox}}% auto set
\fi
\let\rowTBLx\rowTBL\increment\rowTBLx
\scratchdimen\gettblhei\rowTBLx\relax
@@ -893,7 +943,7 @@
% we can force a span that fits the sum of spans widths
\settblaut\colTBL{\the\scratchdimen}%
\else\ifdim\wd\scratchbox>\scratchdimen
-% unless span
+ % unless span
\settblaut\colTBL{\the\wd\scratchbox}%
% to be translated
\writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex
index 479b64d47..7c60bcc3a 100644
--- a/tex/context/base/core-ref.tex
+++ b/tex/context/base/core-ref.tex
@@ -148,10 +148,31 @@
\def\reference {\dosingleargument\doreference }
%D These are implemented in a low level form as:
+%D
+%D \starttypen
+%D \def\dotextreference[#1]{\rawtextreference\s!txt{#1}} % #2
+%D \def\dopagereference[#1]{\rawpagereference\s!pag{#1}}
+%D \def\doreference [#1]{\rawreference \s!ref{#1}} % #2
+%D \stoptypen
+%D
+%D or without expansion problems:
+
+\def\dotextreference[#1]#2%
+ {\bgroup
+ \def\asciia{#1}%
+ \convertexpanded\??rf{#2}\asciib
+ \@EA\rawtextreference\@EA\s!txt\@EA\asciia\@EA{\asciib}%
+ \egroup}
+
+\def\dopagereference[#1]%
+ {\rawpagereference\s!pag{#1}}
-\def\dotextreference[#1]{\rawtextreference\s!txt{#1}} % #2
-\def\dopagereference[#1]{\rawpagereference\s!pag{#1}}
-\def\doreference [#1]{\rawreference \s!ref{#1}} % #2
+\def\doreference[#1]#2%
+ {\bgroup
+ \def\asciia{#1}%
+ \convertexpanded\??rf{#2}\asciib
+ \@EA\rawreference\@EA\s!ref\@EA\asciia\@EA{\asciib}%
+ \egroup}
%D Actually there is not much difference between a text and a
%D full reference, but it's the concept that counts. The low
@@ -3568,6 +3589,7 @@
\c!links=\citaat\bgroup,
\c!rechts=\egroup,
\c!globaal=\v!nee,
+ \c!expansie=\v!nee,
\c!scheider=\nonbreakablespace]
\let\nonbreakablespace=~
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 0a1e95929..3149c800c 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -108,10 +108,13 @@
\def\donoregister[#1]%
{\dodoregister[#1]{}}
+% \def\dodoregister[#1]#2#3%
+% {\doprocesspageregister[#1]{#2}{#3}%
+% \ifvmode\nobreak\fi
+% \GotoPar}
+
\def\dodoregister[#1]#2#3%
- {\doprocesspageregister[#1]{#2}{#3}%
- \ifvmode\nobreak\fi
- \GotoPar}
+ {\dogotopar{\doprocesspageregister[#1]{#2}{#3}}}
\def\writetoregister[#1]% to be documented
{\doregister{#1}}
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index e333bdccb..dee031305 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -2720,7 +2720,7 @@
%\hangindent=\wd0\relax % tzt hang=yes,n
%\parindent=\hangindent
%\box0\relax
- \stelwitruimtein[\v!groot]%
+ \setupwhitespace[\v!groot]%
\ignorespaces
#4%
\doifsomething{#3}
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 1697a775d..d00732031 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -938,8 +938,17 @@
{\doifvaluesomething{\??ko#1#3}
{\setuplayouttext[#2][\c!status=\getvalue{\??ko#1#3}]}}}
+% \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}]%
+% \dohandelpaginaafBB{#1}\v!hoofd\c!hoofd
+% \dohandelpaginaafBB{#1}\v!tekst\c!tekst
+% \dohandelpaginaafBB{#1}\v!voet \c!voet}}
+
\def\dohandelpaginaafB#1%
- {\doifinset{\getvalue{\??ko#1\c!pagina}}{\v!ja,\v!rechts,\v!links}
+ {\doifvaluesomething{\??ko#1\c!pagina}
{\def\resetcurrentsectionmarks% toegevoegd, zie \pagina
{\resetsectionmarks{\previoussection\@@sectie}}%
\pagina[\getvalue{\??ko#1\c!pagina}]%
@@ -978,17 +987,17 @@
%\def\dolocalheadsetup#1% koppeling met standaard kopcommando / engels
% {\forgetall
% \doifvaluesomething{\??ko#1\c!uitlijnen}
-% {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}%
+% {\ExpandFirstAfter\setupalign[\getvalue{\??ko#1\c!uitlijnen}]}%
% \doifvaluesomething{\??ko#1\c!tolerantie}
-% {\ExpandFirstAfter\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}%
+% {\ExpandFirstAfter\setuptolerance[\getvalue{\??ko#1\c!tolerantie}]}%
% \def\\{\crlf\strut\ignorespaces}}
\def\dolocalheadsetup#1% koppeling met standaard kopcommando / engels
{\forgetall % traag dus ...
\doifvaluesomething{\??ko#1\c!uitlijnen} % wordt al expanded in spa
- {\expanded{\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}}%
+ {\expanded{\setupalign[\getvalue{\??ko#1\c!uitlijnen}]}}%
\doifvaluesomething{\??ko#1\c!tolerantie} % wordt al expanded in spa
- {\expanded{\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}}%
+ {\expanded{\setuptolerance[\getvalue{\??ko#1\c!tolerantie}]}}%
\def\\{\crlf\strut\ignorespaces}}
\def\localkopsetup{\localheadsetup} % kan tzt weg
@@ -1511,7 +1520,7 @@
\dostartattributes\@@sectie\c!letter\c!kleur\empty
\dontconvertfont
\dostartattributes\@@sectie{#1}{#2}\empty
- \stelinterliniein % \setupinterlinespace
+ \setupinterlinespace
\begstrut\haalmarkering[\hoofdmarkering{#4#3}]\endstrut
\endgraf
\dostopattributes
@@ -1560,9 +1569,9 @@
\dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
\dontconvertfont
\ifdisplaysectionhead
- \stelinterliniein
+ \setupinterlinespace
\else
- \stelspatieringin
+ \setupspacing
\fi
\ifcase\headtimingmode#2\fi
\getvalue{\??ko#1\c!voorcommando}%
@@ -1618,9 +1627,9 @@
\dostartattributes{\??ko#1}\c!tekstletter\c!tekstkleur\empty
\dontconvertfont
\ifdisplaysectionhead
- \stelinterliniein
+ \setupinterlinespace
\else
- \stelspatieringin
+ \setupspacing
\fi
\ifcase\headtimingmode#2\fi
\placeheadmargintexts{#1}% binnen #3?
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 7a0872e84..3c231c6b6 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -25,22 +25,22 @@
\appendtoks \settopskip \to \everybodyfont
\appendtoks \setmaxdepth \to \everybodyfont
\appendtoks \spacing 1\to \everybodyfont
-\appendtoks \simplestelinspringenin \to \everybodyfont
-\appendtoks \simplestelblankoin \to \everybodyfont
-\appendtoks \simplestelwitruimtein \to \everybodyfont
+\appendtoks \simplesetupindenting \to \everybodyfont
+\appendtoks \simplesetupblank \to \everybodyfont
+\appendtoks \simplesetupwhitespace \to \everybodyfont
%appendtoks \checknotes \to \everybodyfont % not
-\appendtoks \simplestelspatieringin \to \everybodyfont % nieuw
+\appendtoks \simplesetupspacing \to \everybodyfont % nieuw
\appendtoks \setdisplayskips \to \everybodyfont % nieuw
\appendtoks \updateraggedskips \to \everyfontswitch % under test
\prependtoks \let\par\endgraf \to \everypagebody % see \fillinline
-\appendtoks \simplestelspatieringin \to \everydefinedfont
+\appendtoks \simplesetupspacing \to \everydefinedfont
\def\stelfactorenin
- {\simplestelwitruimtein
- \simplestelblankoin
+ {\simplesetupwhitespace
+ \simplesetupblank
\settopskip
\setmaxdepth}
@@ -79,7 +79,7 @@
%D There are two ways to influence the interline spacing. The
%D most general and often most consistent way is using
%D
-%D \showsetup{\y!stelinterliniein}
+%D \showsetup{\y!setupinterlinespace}
%D
%D For instance
%D
@@ -153,22 +153,22 @@
\s!unknown=>\assignvalue{#1}\regelwit{1.00}{1.25}{1.50}%
\spacing\regelwit]}
-\def\complexstelinterliniein[#1]% \commalistelement ipv #1
+\def\complexsetupinterlinespace[#1]% \commalistelement ipv #1
{\doifassignmentelse{#1}
\setupspecifiedinterlinespace\setuprelativeinterlinespace[#1]}
\def\setuplocalinterlinespace[#1]%
{\localinterlinespacetrue
- \stelinterliniein[#1]%
+ \setupinterlinespace[#1]%
\localinterlinespacefalse}
-\def\simplestelinterliniein
+\def\simplesetupinterlinespace
{\localinterlinespacetrue
\setfontparameters
\updateraggedskips % funny one here
\localinterlinespacefalse}
-\definecomplexorsimple\stelinterliniein
+\definecomplexorsimple\setupinterlinespace
% In earlier versions \type{\bigskipamount} was
% \type{\ht\strutbox} and the stretch was plus or minus
@@ -731,7 +731,7 @@
%D [\v!groot]
%D \stoptypen
-\def\dostelblankoin#1% amount are an plain inheritance
+\def\dosetupblank#1% amount are an plain inheritance
{\bigskipamount#1\relax
\ifblankoflexibel \else
\bigskipamount1\bigskipamount
@@ -739,7 +739,7 @@
\medskipamount \bigskipamount \divide\medskipamount 2
\smallskipamount\bigskipamount \divide\smallskipamount 4 }%
-\def\complexstelblankoin[#1]% more \let's
+\def\complexsetupblank[#1]% more \let's
{\ifgridsnapping
\blankoflexibelfalse
\else
@@ -750,18 +750,18 @@
\fi
\ExpandFirstAfter\processallactionsinset
[#1]
- [ \v!flexibel=>\dostelblankoin\deblankoskip,
- \v!vast=>\dostelblankoin\deblankoskip,
+ [ \v!flexibel=>\dosetupblank\deblankoskip,
+ \v!vast=>\dosetupblank\deblankoskip,
\v!regel=>\edef\deblankoskip{\regelafstand}%
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!groot,
\v!halveregel=>\scratchskip.5\regelafstand
\edef\deblankoskip{\the\scratchskip}%
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!middel,
\v!groot=>\ifgridsnapping
\edef\deblankoskip{\regelafstand}%
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\fi
\let\currentblanko\v!groot % was \def, why ?
\let\deblanko\v!groot,
@@ -769,35 +769,35 @@
\let\deblanko\v!middel,
\v!klein=>\let\currentblanko\v!klein % was \def, why ?
\let\deblanko\v!klein,
- \v!normaal=>\dostelblankoin\deblankoskip
+ \v!normaal=>\dosetupblank\deblankoskip
\let\deblanko\v!groot,
\v!standaard=>\edef\deblankoskip{\skipfactor\regelafstand}%
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!groot,
- \s!default=>\dostelblankoin\deblankoskip
+ \s!default=>\dosetupblank\deblankoskip
\let\deblanko\v!groot,
\s!unknown=>\let\deblankoskip\commalistelement
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!groot]%
- \simplestelwitruimtein}
+ \simplesetupwhitespace}
-% \definecomplexorsimpleempty\stelblankoin
+% \definecomplexorsimpleempty\setupblank
%
% speed gain: 60 sec -> 30 sec
-\definecomplexorsimple\stelblankoin
+\definecomplexorsimple\setupblank
-\def\simplestelblankoin % == snelle \stelblankoin[\s!default]
+\def\simplesetupblank % == snelle \setupblank[\s!default]
{\ifgridsnapping
\blankoflexibelfalse
\fi
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!groot
- \simplestelwitruimtein}
+ \simplesetupwhitespace}
\def\restorestandardblank% \v!standaard
{\edef\deblankoskip{\skipfactor\regelafstand}%
- \dostelblankoin\deblankoskip
+ \dosetupblank\deblankoskip
\let\deblanko\v!groot}
\def\dodefinieerblanko[#1][#2]%
@@ -837,18 +837,18 @@
\def\presetindentation
{\doifoutervmode{\ifindentfirstparagraph\else\noindentation\fi}}
-\definecomplexorsimple\stelinspringenin
+\definecomplexorsimple\setupindenting
-\def\complexstelinspringenin[#1]%
+\def\complexsetupindenting[#1]%
{\processallactionsinset
[#1]
[ \v!eerste=>\indentfirstparagraphtrue,
\v!volgende=>\indentfirstparagraphfalse,
- \s!default=>\simplestelinspringenin,
+ \s!default=>\simplesetupindenting,
\s!unknown=>\edef\currentvoorwit{\commalistelement}%
- \simplestelinspringenin]}
+ \simplesetupindenting]}
-\def\simplestelinspringenin
+\def\simplesetupindenting
{\assigndimension\currentvoorwit\voorwit{1em}{1.5em}{2em}%
\parindent\voorwit\relax}
@@ -906,14 +906,14 @@
\definespacingmethod[\v!opelkaar]{\newfrenchspacing}
\definespacingmethod[\v!ruim ]{\nonfrenchspacing}
-\def\complexstelspatieringin[#1]%
+\def\complexsetupspacing[#1]%
{\executeifdefined{\??sg\??sg#1}\relax
\updateraggedskips}
-\def\simplestelspatieringin
+\def\simplesetupspacing
{\updateraggedskips}
-\definecomplexorsimple\stelspatieringin
+\definecomplexorsimple\setupspacing
\catcode`\~=\@@active % to be sure
@@ -1121,17 +1121,17 @@
\def\currentwitruimte {\zeropoint}
% \def\stelwitruimteopnieuwin
-% {\expanded{\stelwitruimtein[\currentwitruimte]}}
+% {\expanded{\setupwhitespace[\currentwitruimte]}}
%
% \newif\ifwitruimteflexibel \witruimteflexibeltrue
%
-% \definecomplexorsimple\stelwitruimtein
+% \definecomplexorsimple\setupwhitespace
%
-% \def\complexstelwitruimtein[#1]%
-% {\expanded{\dostelwitruimtein[#1]}%
-% \dodostelwitruimtein}
+% \def\complexsetupwhitespace[#1]%
+% {\expanded{\dosetupwhitespace[#1]}%
+% \dodosetupwhitespace}
%
-% \def\dostelwitruimtein[#1]%
+% \def\dosetupwhitespace[#1]%
% {\processallactionsinset
% [#1]
% [\v!herstel=>,
@@ -1143,7 +1143,7 @@
% \s!unknown=>\@EA\assigndimension\@EA{\commalistelement} % \@EA is nodig
% \tussenwit\blankokleinmaat\blankomiddelmaat\blankogrootmaat]} % te vangen
%
-% \def\dodostelwitruimtein
+% \def\dodosetupwhitespace
% {\edef\currentwitruimte
% {\ifdim\tussenwit=\zeropoint
% \v!geen
@@ -1161,26 +1161,26 @@
% \fi
% \parskip\tussenwit}
%
-% \def\simplestelwitruimtein% == snelle \stelwitruimtein[\s!default]
+% \def\simplesetupwhitespace% == snelle \setupwhitespace[\s!default]
% {\doifnot\currentwitruimte\v!geen\stelwitruimteopnieuwin
-% \dodostelwitruimtein}
+% \dodosetupwhitespace}
-\definecomplexorsimple\stelwitruimtein
+\definecomplexorsimple\setupwhitespace
-\def\simplestelwitruimtein
- {\doifnot\currentwitruimte\v!geen\dostelwitruimtein}
+\def\simplesetupwhitespace
+ {\doifnot\currentwitruimte\v!geen\dosetupwhitespace}
-\def\complexstelwitruimtein[#1]%
+\def\complexsetupwhitespace[#1]%
{\doifelsenothing{#1}
- {\simplestelwitruimtein}
+ {\simplesetupwhitespace}
{\edef\currentwitruimte{#1}%
- \dostelwitruimtein}}
+ \dosetupwhitespace}}
-\def\dostelwitruimtein
+\def\dosetupwhitespace
{\processcommacommand[\currentwitruimte]\dowhitespacemethod
- \dodostelwitruimtein}
+ \dodosetupwhitespace}
-\def\dodostelwitruimtein
+\def\dodosetupwhitespace
{\ifgridsnapping
\witruimteflexibelfalse
\tussenwit1\tussenwit
@@ -1284,7 +1284,7 @@
\opelkaarfalse
\opelkaartrue
\blanko[\v!blokkeer] % dit is nog niet ok, gaat fout
- \stelwitruimtein[\v!geen] % bovenin vtop (dwz, baseline)
+ \setupwhitespace[\v!geen] % bovenin vtop (dwz, baseline)
\fi}
\def\stopopelkaar
@@ -1539,9 +1539,24 @@
% \!!depth \strutdepth
% \normalkern-\strutwidth}}}
+% \def\setstrut
+% {\setstrutdimen\strutheight\strutheightfactor\spacingfactor
+% \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor
+% \dosetstrut}
+
\def\setstrut
- {\setstrutdimen\strutheight\strutheightfactor\spacingfactor
- \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor
+ {\strutdimen\normallineheight
+ \strutdimen\strutheightfactor\strutdimen
+ \strutdimen\spacingfactor\strutdimen
+ \edef\strutheight{\the\strutdimen}%
+ \strutdimen\normallineheight
+ \ifgridsnapping
+ \advance\strutdimen-\strutheight
+ \else
+ \strutdimen\strutdepthfactor\strutdimen
+ \strutdimen\spacingfactor\strutdimen
+ \fi
+ \edef\strutdepth{\the\strutdimen}%
\dosetstrut}
\def\setcharstrut#1%
@@ -1809,7 +1824,7 @@
{\par % else skips forgotten
\egroup}
-\def\stelsmallerin
+\def\setupnarrower
{\dodoubleargument\getparameters[\??sl]}
\newdimen\@@effectivehsize \def\effectivehsize {\hsize}
@@ -2076,10 +2091,10 @@
%\def\forgetparindent
% {\forgeteverypar
% \indentfirstparagraphtrue % recently added
-% \stelinspringenin[\v!geen]}
+% \setupindenting[\v!geen]}
%\def\forgetparskip
-% {\stelwitruimtein[\v!geen]}
+% {\setupwhitespace[\v!geen]}
\def\forgetparindent
{\forgeteverypar
@@ -2694,7 +2709,7 @@
\newif\if@@asragged \@@asraggedtrue % old method
-\def\dodosteluitlijnenin[#1]%
+\def\dodosetupalign[#1]%
{\doifinsetelse\v!ruim {#1}\!!doneatrue\!!doneafalse
\doifinsetelse\v!breed{#1}\!!donebtrue\!!donebfalse
\ExpandFirstAfter\processallactionsinset
@@ -2723,15 +2738,15 @@
\v!nieuw=>\@@asraggedfalse, % so new will give you consistency
\v!reset=>\notragged\normalbottom]}
-\def\dosteluitlijnenin[#1]%
- {\expanded{\dodosteluitlijnenin[#1]}}
+\def\dosetupalign[#1]%
+ {\expanded{\dodosetupalign[#1]}}
-\def\steluitlijnenin
- {\dosingleargument\dosteluitlijnenin}
+\def\setupalign
+ {\dosingleargument\dosetupalign}
\def\startuitlijnen
{\bgroup
- \steluitlijnenin}
+ \setupalign}
\def\stopuitlijnen
{\par
@@ -2798,7 +2813,7 @@
%D ...
-\def\dosteltolerantiein[#1]%
+\def\dosetuptolerance[#1]%
{\doifinsetelse\v!vertikaal{#1}%
{\ExpandFirstAfter\processallactionsinset
[#1]
@@ -2815,8 +2830,8 @@
\v!soepel=>\tolerance3000,
\v!zeersoepel=>\tolerance4500]}}
-\def\steltolerantiein
- {\dosingleargument\dosteltolerantiein}
+\def\setuptolerance
+ {\dosingleargument\dosetuptolerance}
% \def\woordrechts
% {\groupedcommand{\hfill\hbox}{\parfillskip\zeropoint}}
@@ -3007,16 +3022,16 @@
\def\fixedspaceamount#1%
{#1\fontdimen2\font}
-\stelwitruimtein
+\setupwhitespace
[\v!geen]
\inspringen
[\v!nooit]
-\stelinspringenin
+\setupindenting
[\v!geen]
-\stelblankoin
+\setupblank
[\v!standaard,
\v!groot]
@@ -3031,7 +3046,7 @@
\def\@@blankotussen{\blanko[\v!tussen]} % scheelt 5 tokens == >20 bytes
\def\@@blankona {\blanko[\v!na]} %
-\stelinterliniein
+\setupinterlinespace
[\c!hoogte=.72,
\c!diepte=.28,
\c!boven=1.0,
@@ -3040,22 +3055,22 @@
\c!regel=2.8ex,
\c!rek=0]
-\stelsmallerin
+\setupnarrower
[\c!links=1.5em,
\c!rechts=1.5em,
\c!midden=1.5em]
-\steltolerantiein
+\setuptolerance
[\v!horizontaal,\v!zeerstreng]
-\steltolerantiein
+\setuptolerance
[\v!vertikaal,\v!streng]
-\steluitlijnenin
+\setupalign
[\v!onder,
\v!breedte]
-\stelspatieringin
+\setupspacing
[\v!opelkaar]
\protect \endinput
diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex
index 1791899fb..61c46c1e3 100644
--- a/tex/context/base/core-syn.tex
+++ b/tex/context/base/core-syn.tex
@@ -76,7 +76,7 @@
\c!kopletter=,
\c!letter=]%
%
- \stelwitruimtein[\v!geen]%
+ \setupwhitespace[\v!geen]%
\doutilities{#1}\jobname{#2}\relax\par
\endgroup
\ifutilitydone\else\geenwitruimte\fi}
@@ -257,7 +257,7 @@
\def\doplaatslijstmetsorteren#1% NOG EEN RUWE VERSIE MAKEN
{\witruimte % ZONDER WITRUIMTE ETC ETC
\begingroup
- \stelwitruimtein[\v!geen]%
+ \setupwhitespace[\v!geen]%
\doutilities{#1}\jobname{#1}\relax\par
\endgroup
\ifutilitydone\else\geenwitruimte\fi}
diff --git a/tex/context/base/core-sys.tex b/tex/context/base/core-sys.tex
index 746103037..18c38da72 100644
--- a/tex/context/base/core-sys.tex
+++ b/tex/context/base/core-sys.tex
@@ -31,33 +31,73 @@
\appendtoks \splitjobfilename \to \everyjob
+% Some mechanisms (see x-res-01) use either \jobfilename or
+% \jobfilename.somesuffix, in which case we need to use the
+% full name if given or a default (like \jobfilename.xml);
+% this comes down to replacing the default tex suffix.
+
+\def\jobfullname{\jobfilename.\jobfilesuffix}
+
+\def\setjobfullname#1% #1 = default if not given
+ {\doifelsenothing\jobfilename
+ {\let\jobfullname\empty}
+ {\doif\jobfilesuffix\c!tex{\edef\jobfullname{\jobfilename.#1}}}}
+
+% ...
+
\def\dosetupsystem[#1]%
{\getparameters[\??sv][#1]%
\setuprandomize[\@@svwillekeur]%
\beforesplitstring\@@svresolutie\at dpi\to\@@svresolutie
\let\outputresolution\@@svresolutie
+ \ifcase\@@svn
+ % % 0 : unknown
+ \or
+ \setsystemmode\v!eerste % 1 : first run
+ \or
+ % % 2 : successive run
+ \or
+ \setsystemmode\v!eerste % 3 : first and only run
+ \or
+ \setsystemmode\v!laatste % 4 : extra last run
+ \fi
\splitjobfilename}
\def\setupsystem
{\dosingleargument\dosetupsystem}
+%D The system modes set by the setup command can be used in
+%D situations like:
+%D
+%D \starttypen
+%D \startmode[*first]
+%D \executesystemcommand{cleanupxml text.xml clean-text.xml}
+%D \stopmode
+%D
+%D \starttext
+%D \typefile{clean-text.xml}
+%D \stoptext
+%D \stoptypen
+
\def\setuprandomize[#1]%
{\doifsomething{#1}
{\bgroup
- \setrandomseed\minusone
+ \setrandomseed\minusone % signals thrd-ran to reseed
+ % tex's time is in minutes
\processaction
[#1]
- [ \v!klein=>\divide\time 900, % 15 taco vragen hoe
- \v!middel=>\divide\time 1800, % 30 time werkt; nodig voor
- \v!groot=>\divide\time 3600, % 60 random pos deadlock
+ [ \v!klein=>\divide\normaltime 15, % 900,
+ \v!middel=>\divide\normaltime 30, % 1800,
+ \v!groot=>\divide\normaltime 60, % 3600,
\v!normaal=>,
\s!default=>,
- \s!unknown=>\time=#1]%
+ \s!unknown=>\normaltime=#1]%
\nextrandom
\egroup}}
\setupsystem
[\c!gebied=,
+ \c!n=0, % 0:unknown 1: one run 2: first 3: successive 4: final run
\c!resolutie=600dpi,
\c!willekeur=,
\c!file=\jobname,
diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex
index 92a791e70..b0a11202c 100644
--- a/tex/context/base/core-tbl.tex
+++ b/tex/context/base/core-tbl.tex
@@ -689,7 +689,16 @@
\fi
\next}
+% The much neede hook:
+
\newtoks\everytabulate
+
+% An example of its usage:
+
+\appendtoks \optimizeverbatimfalse \to \everytabulate
+
+% A status variable:
+
\chardef\tabulatepass=0
\def\dofinalstarttabulate[#1][#2][#3]% identifier sub preamble
diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex
index 8d41449c7..a4d255202 100644
--- a/tex/context/base/enco-ans.tex
+++ b/tex/context/base/enco-ans.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-ans,
-%D version=2000.5.7, % 1995.1.1,
+%D version=2000.05.07, % 1995.01.01,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=\YandY\ texnansi Encoding,
%D author={Patrick Gundlach, Hans Hagen},
@@ -47,6 +47,9 @@
\definecasemap 241 241 209 \definecasemap 209 241 209
\definecasemap 245 245 213 \definecasemap 213 245 213
+\definecasemap 240 240 208 \definecasemap 208 240 208
+\definecasemap 254 254 222 \definecasemap 222 254 222
+
\stopmapping
\startencoding[texnansi]
@@ -81,6 +84,9 @@
\definecharacter thorn 254
\definecharacter Thorn 222
+\definecharacter Eth 208
+\definecharacter eth 240
+
\definecharacter exclamdown 161
\definecharacter questiondown 191
diff --git a/tex/context/base/enco-def.tex b/tex/context/base/enco-def.tex
index d7d9ca82d..0ab1f4850 100644
--- a/tex/context/base/enco-def.tex
+++ b/tex/context/base/enco-def.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-def,
-%D version=2000.5.7, % 2000.20.12, % split from less verbose base file
+%D version=2000.05.07, % 2000.20.12, % split from less verbose base file
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Default Character Definitions,
%D author=Hans Hagen,
diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex
index 0a65c4e3c..f202b4c99 100644
--- a/tex/context/base/enco-ec.tex
+++ b/tex/context/base/enco-ec.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-ec,
-%D version=2000.5.7, % 1999.16.7,
+%D version=2000.05.07, % 1999.16.07,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=\LATEX\ EC Encoding,
%D author={Patrick Gundlach, Hans Hagen, Taco Hoekwater},
diff --git a/tex/context/base/enco-ecm.tex b/tex/context/base/enco-ecm.tex
index 329f66a9c..5fbbe1c8c 100644
--- a/tex/context/base/enco-ecm.tex
+++ b/tex/context/base/enco-ecm.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-ec,
-%D version=2000.5.7,
+%D version=2000.05.07,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Glyphs that may not be present in EC,
%D author=Hans Hagen,
diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex
index e8348195f..042ccf075 100644
--- a/tex/context/base/enco-il2.tex
+++ b/tex/context/base/enco-il2.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-il2,
-%D version=2000.5.7, % 1998.12.1,
+%D version=2000.05.07, % 1998.12.01,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Czech and Slovak ISO Latin 2 Encoding,
%D author=Hans Hagen,
diff --git a/tex/context/base/enco-mis.tex b/tex/context/base/enco-mis.tex
index d80202994..152e78542 100644
--- a/tex/context/base/enco-mis.tex
+++ b/tex/context/base/enco-mis.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-mis,
-%D version=2000.5.7, % 1999.11.11,
+%D version=2000.05.07, % 1999.11.11,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Missing Glyphs,
%D author=Hans Hagen,
diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex
index 4579c0b54..ca8c96b74 100644
--- a/tex/context/base/enco-pdf.tex
+++ b/tex/context/base/enco-pdf.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-pdf,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=\YandY\ texnansi Encoding,
%D author=Hans Hagen,
diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex
index 36336c03a..108969702 100644
--- a/tex/context/base/enco-pol.tex
+++ b/tex/context/base/enco-pol.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-pol,
-%D version=2000.5.7, % 1999.28.8,
+%D version=2000.05.07, % 1999.28.8,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=Polish Mixed Encoding,
%D author={Taco Hoekwater \& Hans Hagen},
diff --git a/tex/context/base/enco-run.tex b/tex/context/base/enco-run.tex
index a12f82f53..b88c4111a 100644
--- a/tex/context/base/enco-run.tex
+++ b/tex/context/base/enco-run.tex
@@ -37,7 +37,7 @@
\setuptextrules[\c!korps=,\c!letter=]
\starttextrule{\visualizecharacterslegend}
\witruimte
- \restorefont\stelinterliniein
+ \restorefont\setupinterlinespace
\visualizecharacters
\def\do##1%
{{\def\dodo####1%
@@ -85,7 +85,7 @@
\edef\enccols{\number\dimen0}
\visualizecharacters
\startcolumns[\c!n=\enccols,\c!afstand=2em]
- \restorefont\stelinterliniein
+ \restorefont\setupinterlinespace
\def\definecharacter ##1 ##2 %
{\setbox0=\hbox to \hsize{\localcolortrue\hbox to \encwidth{\getvalue{##1}\hss}\tttf##1}%
\ht0\strutheight \dp0\strutdepth \box0 \allowbreak}
diff --git a/tex/context/base/enco-tbo.tex b/tex/context/base/enco-tbo.tex
index 26ea374cf..3e9719c2a 100644
--- a/tex/context/base/enco-tbo.tex
+++ b/tex/context/base/enco-tbo.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=enco-tbo,
-%D version=2000.5.7, % 2001.8.4,
+%D version=2000.05.07, % 2001.8.4,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=TeXBaseOne Encoding,
%D author={Patrick Gundlach, Hans Hagen},
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index f72d547e9..387e12e3a 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -1673,9 +1673,9 @@
%\def\redodefinefont#1#2#3%
% {\dododefinefont{#1}{#2}%
% \doifnumberelse{#3}
-% {\stelinterliniein[#3]\stelspatieringin}
+% {\setupinterlinespace[#3]\setupspacing}
% {\doifassignmentelse{#3}
-% {\stelinterliniein[#3]\stelspatieringin}
+% {\setupinterlinespace[#3]\setupspacing}
% {\setups[#3]}}} % so, we can have setups associated to fonts !
\def\redodefinefont#1#2#3%
@@ -1683,7 +1683,7 @@
\doifsetupselse{#3}
{\setups[#3]} % don't forget to document this !
{\setuplocalinterlinespace[#3]%
- \stelspatieringin}} % needed ?
+ \setupspacing}} % needed ?
% \def\defineclassfont
% {\doquadrupleempty\dodefineclassfont}
@@ -3733,7 +3733,7 @@
%D some typing:
\def\setfont% geen \dosetfont mogelijk
- {\def\next{\nextfont\stelinterliniein}%
+ {\def\next{\nextfont\setupinterlinespace}%
\afterassignment\next\font\nextfont=}
%D One can call this macro as:
diff --git a/tex/context/base/font-map.tex b/tex/context/base/font-map.tex
index a9eccba69..4d4362009 100644
--- a/tex/context/base/font-map.tex
+++ b/tex/context/base/font-map.tex
@@ -2,7 +2,7 @@
%D \module
%D [ file=font-map,
-%D version=1998.3.13,
+%D version=1998.03.13,
%D title=\CONTEXT\ Font Macros,
%D subtitle=Postscript for Maps,
%D author=Taco Hoekwater,
diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex
index 269c0f771..baca33983 100644
--- a/tex/context/base/font-uni.tex
+++ b/tex/context/base/font-uni.tex
@@ -488,8 +488,8 @@
\def\unicodedepth {\getvalue{\??uc#1\c!diepte}}%
\def\unicodedigits {\getvalue{\??uc#1\c!conversie}}%
\def\handleunicodeglyph {\getvalue{\??uc#1\c!commando}}%
- \enableregime[unicode]%
- \doifvalue{\??uc#1\c!interlinie}\v!ja{\stelinterliniein\relax}%
+ \enableregime[unicode]% the following \relax's are realy needed
+ \doifvalue{\??uc#1\c!interlinie}\v!ja\setupinterlinespace\relax
\getvalue{\??uc#1\c!commandos}\relax}
%D \macros
diff --git a/tex/context/base/hand-def.tex b/tex/context/base/hand-def.tex
index 581dc3065..5c6593e0e 100644
--- a/tex/context/base/hand-def.tex
+++ b/tex/context/base/hand-def.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=hand-def, % was enco-pro
-%D version=2000.29.9,
+%D version=2000.29.09,
%D title=\CONTEXT\ Handling Macros,
%D subtitle=Default Protruding Factors,
%D author=Hans Hagen,
diff --git a/tex/context/base/meta-dum.tex b/tex/context/base/meta-dum.tex
index 5e77e8229..644a809b0 100644
--- a/tex/context/base/meta-dum.tex
+++ b/tex/context/base/meta-dum.tex
@@ -70,7 +70,9 @@
[placeholder]
[1=red,2=green,3=blue,4=cyan,5=magenta,6=yellow]
-\newcounter\figurereplacementcycle
+% \newcounter \figurereplacementcycle
+
+\let\figurereplacementcycle\relax
\setupexternalfigures
[\c!reductie=0,
@@ -78,7 +80,12 @@
\def\externalfigurereplacement#1#2#3%
{\getpaletsize[placeholder]%
- \doglobal\increment\figurereplacementcycle
+ \ifx\figurereplacementcycle\relax
+ \getrandomnumber \figurereplacementcycle \!!plusone \paletsize
+ \globallet \figurereplacementcycle \figurereplacementcycle
+ \else
+ \doglobal\increment\figurereplacementcycle
+ \fi
\ifnum\figurereplacementcycle>\paletsize
\globallet\figurereplacementcycle\!!plusone
\fi
@@ -100,7 +107,7 @@
\c!achtergrond=\s!dummy,
\c!voorgrondkleur=white]}%
{\doif\@@eftekst\v!ja
- {\infofont\stelinterliniein \nohyphens
+ {\infofont \setupinterlinespace \nohyphens
\doifelse{#1}\s!dummy \!!doneafalse\!!doneatrue
\doifelse{#2}\s!dummy \!!donebfalse\!!donebtrue
\doifelse{#3}\s!unknown\!!donecfalse\!!donectrue
diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex
index 8b6e71042..ee0354d52 100644
--- a/tex/context/base/meta-ini.tex
+++ b/tex/context/base/meta-ini.tex
@@ -795,6 +795,25 @@
\consultutilityfilefalse
\to \everyinsertMPfile
+%D One more: (still needed?)
+
+\appendtoks
+ def initialize_form_numbers =
+ do_initialize_numbers ;
+ enddef ;
+\to \MPinitializations
+
+\appendtoks
+ HSize := \the\hsize ;
+ VSize := \the\vsize ;
+ vardef ForegroundBox =
+ unitsquare xysized(HSize,VSize)
+ enddef ;
+ vardef PageFraction =
+ if \lastpage>1 : (\realfolio-1)/(\lastpage-1) else : 1 fi
+ enddef ;
+\to \MPinitializations
+
%D And some more. These are not really needed since we
%D don't use the normal figure inclusion macros any longer.
diff --git a/tex/context/base/meta-nav.tex b/tex/context/base/meta-nav.tex
index 5628e6f7b..41067a998 100644
--- a/tex/context/base/meta-nav.tex
+++ b/tex/context/base/meta-nav.tex
@@ -11,8 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\unprotect
-
\startuniqueMPgraphic{navplus}{size,color,type,mode}
color c ; numeric s, t ; path p ;
t := \MPvar{type} ; c := \MPvar{color} ; s := \MPvar{size} ;
@@ -59,6 +57,8 @@
[attach-down]
[\uniqueMPgraphic{navplus}{type=2,color=navplus:attach,mode=1}]
+\unprotect
+
\setupcomment [\c!symbool={comment-normal,comment-down}]
\setupattachments[\c!symbool={attach-normal,attach-down}]
diff --git a/tex/context/base/meta-txt.tex b/tex/context/base/meta-txt.tex
index 85d12d68e..58ebb399c 100644
--- a/tex/context/base/meta-txt.tex
+++ b/tex/context/base/meta-txt.tex
@@ -48,7 +48,7 @@
\expanded{\switchtobodyfont[\@@shkorps]}%
\dontcomplain
\hsize\parwidth
- \steltolerantiein[\v!zeersoepel,\v!rek]%
+ \setuptolerance[\v!zeersoepel,\v!rek]%
\!!counta=0
\!!toksa=\emptytoks
\def\docommando##1%
diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex
index 217e62763..09f437e42 100644
--- a/tex/context/base/mult-com.tex
+++ b/tex/context/base/mult-com.tex
@@ -518,7 +518,7 @@ atrightmargin: oprechtermarge atrightmargin
blanko: blanko blank
blanko preskoc
rigovuoto blanc
- stelblankoin: stelblankoin setupblank
+ setupblank: stelblankoin setupblank
stelleblankoein nastavpreskok
impostarigovuoto seteazablanc
corrigeerwitruimte: corrigeerwitruimte correctwhitespace
@@ -572,7 +572,7 @@ atrightmargin: oprechtermarge atrightmargin
inspringen: inspringen indenting
einziehen odsazovani
rientro aliniat
- stelinspringenin: stelinspringenin setupindenting
+ setupindenting: stelinspringenin setupindenting
stelleeinziehenein nastavodsazovani
impostarientro seteazaaliniat
startuitlijnen: startuitlijnen startalignment
@@ -626,7 +626,7 @@ emptylines: legeregels emptylines
stopsmaller: stopsmaller stopnarrower
stopenger stopzuzeni
terminapiustretto stopingust
- stelsmallerin: stelsmallerin setupnarrower
+ setupnarrower: stelsmallerin setupnarrower
stelleengerein nastavzuzeni
impostapiustretto seteazaingust
definetabulate: definieertabulatie definetabulate
@@ -928,10 +928,10 @@ setuppaper: stelpapierin setuppaper
setupbackgrounds: stelachtergrondenin setupbackgrounds
stellehintergruendeein nastavpozadi
impostasfondi seteazafundaluri
- steluitlijnenin: steluitlijnenin setupalign
+ setupalign: steluitlijnenin setupalign
stelleausrichtungein nastavzarovnani
impostaallineamento seteazaalinierea
- stelwitruimtein: stelwitruimtein setupwhitespace
+ setupwhitespace: stelwitruimtein setupwhitespace
stellezwischenraumein nastavbilamista
impostaspaziobianco seteazaspatiualb
setupinteraction: stelinteractiein setupinteraction
@@ -1167,10 +1167,10 @@ defineplacement: definieerplaats defineplacement
stopcombination: stopcombinatie stopcombination
stopkombination stopspojeni
terminacombinazione stopcombinare
- plaatsnaastelkaar: plaatsnaastelkaar placesidebyside
+ placesidebyside: plaatsnaastelkaar placesidebyside
platzierenebeneinander umistivedlesebe
mettifiancoafianco punefatainfata
- plaatsonderelkaar: plaatsonderelkaar placeontopofeachother
+ placeontopofeachother: plaatsonderelkaar placeontopofeachother
platziereuntereinander umistinadsebe
mettiunosullaltro punedeasuprafiecareia
stelblokkopjein: stelblokkopjein setupcaption
@@ -1668,13 +1668,13 @@ moveformula: verplaatsformule moveformula
stelkoppeltekenin: stelkoppeltekenin setuphyphenmark
stellebindestrichein nastavdelitko
impostasegnosillabazione seteazaliniesilabe % GB
- stelinterliniein: stelinterliniein setupinterlinespace
+ setupinterlinespace: stelinterliniein setupinterlinespace
stellezeilenabstandein nastavmeziradkovoumezeru
impostainterlinea seteazaspatiuinterliniar
- stelspatieringin: stelspatieringin setupspacing
+ setupspacing: stelspatieringin setupspacing
stellespatiumein nastavradkovani
impostaspaziatura seteazaspatiu
- steltolerantiein: steltolerantiein setuptolerance
+ setuptolerance: steltolerantiein setuptolerance
stelletoleranzein nastavtoleranci
impostatolleranza seteazatoleranta
setupsystem: stelsysteemin setupsystem
diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex
index d6f6d4c5b..9902b6b55 100644
--- a/tex/context/base/mult-ini.tex
+++ b/tex/context/base/mult-ini.tex
@@ -1379,20 +1379,38 @@
\newif\ifinterfacetranslation
+% for a long time:
+%
+% \def\getinterfaceconstant#1%
+% {\ifinterfacetranslation
+% \doifdefinedelse{\x!prefix!#1}
+% {\getvalue{\x!prefix!#1}}
+% {#1}%
+% \else
+% #1%
+% \fi}
+%
+% \def\getinterfacevariable#1%
+% {\ifinterfacetranslation
+% \doifdefinedelse{\y!prefix!#1}
+% {\getvalue{\y!prefix!#1}}
+% {#1}%
+% \else
+% #1%
+% \fi}
+%
+% more compact
+
\def\getinterfaceconstant#1%
{\ifinterfacetranslation
- \doifdefinedelse{\x!prefix!#1}
- {\getvalue{\x!prefix!#1}}
- {#1}%
+ \executeifdefined{\x!prefix!#1}{#1}%
\else
#1%
\fi}
\def\getinterfacevariable#1%
{\ifinterfacetranslation
- \doifdefinedelse{\y!prefix!#1}
- {\getvalue{\y!prefix!#1}}
- {#1}%
+ \executeifdefined{\y!prefix!#1}{#1}%
\else
#1%
\fi}
diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex
index ba581cdf7..2dad35404 100644
--- a/tex/context/base/page-flt.tex
+++ b/tex/context/base/page-flt.tex
@@ -981,7 +981,7 @@
\setbox\floattext\vbox to \floattextheight}
{\setbox\floattext\vbox}%
\bgroup
- \forgetall\stelblankoin\stelwitruimtein % new, also needed for footnotes
+ \forgetall \setupblank \setupwhitespace % new, also needed for footnotes
\blanko[\v!blokkeer]
\hsize\floattextwidth
\ignorespaces}
@@ -1918,7 +1918,7 @@
\unvbox\marginbox
\@@mbtussen
\fi
- \steluitlijnenin[\@@mbuitlijnen]%
+ \setupalign[\@@mbuitlijnen]%
\dostartattributes\??mb\c!letter\c!kleur{}%
\begstrut\ignorespaces}
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index c71f85cb2..e7cded9e8 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -868,12 +868,26 @@
\def\superejectpage{\doejectpage\supereject}
% floats
+%
+% \def\ejectinsert
+% {\flushnotes
+% \bgroup
+% \noftopfloats\plusthousand
+% \nofbotfloats\zerocount
+% \doflushfloats
+% \egroup}
\def\ejectinsert
{\flushnotes
\bgroup
\noftopfloats\plusthousand
\nofbotfloats\zerocount
+ % this is needed in case a float that has been stored
+ % ends up at the current page; this border case occurs when
+ % the calculated room is 'eps' smaller that the room available
+ % when just flushing; so now we have (maybe optional):
+ \pagebaselinecorrection
+ % alas, this is tricky but needed (first surfaced in prikkels)
\doflushfloats
\egroup}
@@ -1049,7 +1063,7 @@
\gdef\totaltestinfo
{\global\setbox#1\vbox
{\unvbox#1\relax
- \infofont \stelinterliniein
+ \infofont \setupinterlinespace
\hbox
{\strut
\expandafter\doboundtext\expandafter
@@ -1582,6 +1596,26 @@
\od
\filluparrangedpages}
+% nb: \executepagebreakhandler\v!hoofd in other ones
+
+\installpagebreakhandler \v!hoofd
+ {\doifnotvalue{\??tk\v!hoofd\c!status}\v!stop
+ {\setupheader[\c!status=\v!leeg]}}
+
+\installpagebreakhandler \v!voet
+ {\doifnotvalue{\??tk\v!voet\c!status}\v!stop
+ {\setupfooter[\c!status=\v!leeg]}}
+
+% \definepagebreak
+% [chapter]
+% [yes,header,right]
+%
+% \setuphead
+% [chapter]
+% [page=chapter,
+% header=empty,
+% footer=chapter]
+
% public page handler, beware: definepage already in use (core-ref)
%
% \definepagebreak[instance][forsure]
@@ -1640,6 +1674,27 @@
%let\nextcolumn\columnbreak
\let\column \columnbreak
+% We don't want spurious last pages (due to left over marks):
+
+\def\doignorerestoftext
+ {\ifarrangingpages \else
+ \ifnum\textlevel>\zerocount \else
+ \gdef\shipout
+ {\writestatus\m!systems{ignoring further shipouts}%
+ \dowithnextbox{\deadcycles\zerocount}}%
+ \fi
+ \fi}
+
+\let\ignorerestoftext\donothing
+
+\prependtoks % only ignore in a symmetrical doc
+ \globallet\ignorerestoftext\doignorerestoftext
+\to \everystarttext
+
+\appendtoks
+ \ignorerestoftext
+\to \everylastshipout
+
\newif\ifgeselecteerd \geselecteerdtrue
\newif\ifselecteren \selecterenfalse
\newif\ifverwerken \verwerkentrue
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index ff12825e6..c05dab034 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -460,8 +460,8 @@
\widowpenalty\defaultwidowpenalty
\clubpenalty \defaultclubpenalty
\fi
- \simplestelwitruimtein
- \simplestelblankoin
+ \simplesetupwhitespace
+ \simplesetupblank
\global\snijwit\layoutparameter\c!snijwit
\relax
\doifelse{\layoutparameter\c!breedte}\v!midden
diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex
index 8038e45b9..31dcdfff1 100644
--- a/tex/context/base/page-lin.tex
+++ b/tex/context/base/page-lin.tex
@@ -43,7 +43,7 @@
\v!even=>\def\@@rgstepno {\parindent\zeropoint }%
\def\@@rgstepyes{\parindent\@@rgparindent}]%
\inregelstrue
- \stelwitruimtein[\v!geen]%
+ \setupwhitespace[\v!geen]%
\obeylines
\let\checkindentation\relax
\@@rgstepno
diff --git a/tex/context/base/page-mak.tex b/tex/context/base/page-mak.tex
index c44ddc59d..4461e021a 100644
--- a/tex/context/base/page-mak.tex
+++ b/tex/context/base/page-mak.tex
@@ -131,7 +131,7 @@
\forgetall
\hsize\makeupparameter\c!breedte
\doifsomething{\makeupparameter\c!uitlijnen}
- {\expanded{\steluitlijnenin[\makeupparameter\c!uitlijnen]}}%
+ {\setupalign[\makeupparameter\c!uitlijnen]}%
\makeupparameter\c!boven}
\def\dodostopmakeup
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index e9ea246a7..4ee48d37d 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -1534,10 +1534,10 @@
%
\edef\fixedcolumnheight{\@@klhoogte}%
\edef\minbalancetoplines{\@@klnboven}%
- \steltolerantiein[\@@kltolerantie]% %% \startkolommen
- \stelblankoin[\@@klblanko]%
+ \setuptolerance[\@@kltolerantie]% %% \startkolommen
+ \setupblank[\@@klblanko]%
\ifdim\tussenwit>\zeropoint\relax
- \stelwitruimtein[\@@klblanko]%
+ \setupwhitespace[\@@klblanko]%
\fi
\def\stopkolommen
{\endmulticolumns
diff --git a/tex/context/base/page-not.tex b/tex/context/base/page-not.tex
index b8bd84e90..505b1a5c1 100644
--- a/tex/context/base/page-not.tex
+++ b/tex/context/base/page-not.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=page-not,
-%D version=2002.4.16,
+%D version=2002.04.16,
%D title=\CONTEXT\ Page Macros,
%D subtitle=Footnotes,
%D author=Hans Hagen,
diff --git a/tex/context/base/regi-ibm.tex b/tex/context/base/regi-ibm.tex
index 8f066198b..aebd4951a 100644
--- a/tex/context/base/regi-ibm.tex
+++ b/tex/context/base/regi-ibm.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=regi-ibm,
-%D version=1995.1.1,
+%D version=1995.01.01,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=The Good Old MSDOS IBM codepage,
%D author=Hans Hagen,
diff --git a/tex/context/base/regi-il1.tex b/tex/context/base/regi-il1.tex
index f02a6f397..7c1838fec 100644
--- a/tex/context/base/regi-il1.tex
+++ b/tex/context/base/regi-il1.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=regi-il1,
-%D version=200.5.7,
+%D version=2000.05.07,
%D title=\CONTEXT\ Encoding Macros,
%D subtitle=ISO Latin 1 keys,
%D author={Daniel Flipo, Hans Hagen, Denis Roegel},
@@ -70,7 +70,7 @@
\defineactivetoken 177 {\textpm}
\defineactivetoken 254 {\thorn}
-\defineactivetoken 222 {\THorn}
+\defineactivetoken 222 {\Thorn}
\defineactivetoken 223 {\ssharp}
diff --git a/tex/context/base/s-abr-03.tex b/tex/context/base/s-abr-03.tex
index 3dfe080d9..b746383f6 100644
--- a/tex/context/base/s-abr-03.tex
+++ b/tex/context/base/s-abr-03.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-abr-03,
-%D version=1998.8.10,
+%D version=1998.08.10,
%D title=\CONTEXT\ Style File,
%D subtitle=General Abbreviations 3,
%D author=Hans Hagen,
diff --git a/tex/context/base/s-dtk-01.tex b/tex/context/base/s-dtk-01.tex
index dc0e4032a..6f4a80c98 100644
--- a/tex/context/base/s-dtk-01.tex
+++ b/tex/context/base/s-dtk-01.tex
@@ -17,7 +17,7 @@
%D Temp hack.
-\def\doverbatimgoodbreak{}
+\let\doverbatimgoodbreak\donothing
%D Fonts.
@@ -98,8 +98,8 @@
%D Spacing.
-\stelwitruimtein [\v!halveregel]
-\stelblankoin [\v!halveregel]
+\setupwhitespace [\v!halveregel]
+\setupblank [\v!halveregel]
%D Itemize.
@@ -190,10 +190,10 @@
\setupheader[\c!status=\v!leeg]
\stelpaginanummerin[\c!nummer=\DTKPagina]
\bgroup
- \stelwitruimtein[\v!geen]
+ \setupwhitespace[\v!geen]
\bgroup
\switchtobodyfont[14.4pt,ss]
- \steluitlijnenin[\v!rechts]
+ \setupalign[\v!rechts]
\let\\=\par
\DTKTitel\par
\doifsomething{\DTKSubtitel}
@@ -213,20 +213,20 @@
\vskip12pt
\bgroup
\switchtobodyfont[9pt]
- \stelsmallerin[voor=,na=]
+ \setupnarrower[\c!voor=,\c!na=]
\startsmaller[.05\hsize]
- \stelwitruimtein[\v!halveregel]
+ \setupwhitespace[\v!halveregel]
\haalbuffer[abstract]
\stopsmaller
\egroup
\vskip20pt
\egroup}
-\def\startBijdrage%
+\def\startBijdrage
{\starttekst
\dosingleempty\dostartBijdrage}
-\def\stopBijdrage%
+\def\stopBijdrage
{\stoptekst}
%D Sectioning.
diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex
index 4410a5f9d..f99a874e8 100644
--- a/tex/context/base/s-map-01.tex
+++ b/tex/context/base/s-map-01.tex
@@ -143,7 +143,7 @@
%D Waar nodig springen we in. We willen echter niet inspringen
%D na een witruimte, vandaar het trefwoord \type{volgende}.
-\stelinspringenin
+\setupindenting
[\v!volgende,9.5pt]
%D Hoewel niet strikt noodzakelijk, definities en dergelijke
@@ -263,10 +263,10 @@
{\witruimte
\snaptogrid\vbox\bgroup
\forgetall
- \steluitlijnenin[\v!rechts]
+ \setupalign[\v!rechts]
\parfillskip 0pt plus 1 fill
- \steltolerantiein[\v!zeersoepel]
- \stelinspringenin[\v!geen]
+ \setuptolerance[\v!zeersoepel]
+ \setupindenting[\v!geen]
{\ssbf#1}\par
\switchtobodyfont[8pt]
\ss\tf
@@ -421,11 +421,11 @@
\stelpaginanummerin[\c!nummer=\MapsPagina]
\setuplayout[\c!grid=\MapsGrid]
\ifgridsnapping % nog controleren
- \stelblankoin[\v!regel]
+ \setupblank[\v!regel]
\definieerblanko[mapsvoor][\v!halveregel]
\definieerblanko[mapstussen][\v!regel]
\else
- \stelblankoin[\v!halveregel]
+ \setupblank[\v!halveregel]
\definieerblanko[\v!middel][\v!halveregel]
\definieerblanko[mapsvoor][\v!halveregel]
\definieerblanko[mapstussen][\v!halveregel]
@@ -436,7 +436,7 @@
\bgroup
\topskip 0pt
\forgetall
- \ifMapsInKolommen \steluitlijnenin[\v!links] \fi
+ \ifMapsInKolommen \setupalign[\v!links] \fi
\noindent\tf\MapsAffiliatieA
\ifx\MapsCategorie\Bericht
~\strut
@@ -449,9 +449,9 @@
\forgetall
\kern 7.5pt
\ifMapsInKolommen
- \steluitlijnenin[\v!links]
+ \setupalign[\v!links]
\else
- \steluitlijnenin[\v!rechts]
+ \setupalign[\v!rechts]
\fi
{\bf\MapsTitel\par}
{\bfx\MapsSubtitel\par}
@@ -608,9 +608,9 @@
{\witruimte
\snaptogrid\vbox\bgroup
\forgetall
- \steluitlijnenin[\v!links]
+ \setupalign[\v!links]
\steltolerantiein[\v!zeersoepel]
- \stelinspringenin[\v!geen]
+ \setupindenting[\v!geen]
\switchtobodyfont[8pt]
\noindent{\ssbf#1}\par
\ss\tf
diff --git a/tex/context/base/s-mod-01.tex b/tex/context/base/s-mod-01.tex
index 800287ccc..bb901bf93 100644
--- a/tex/context/base/s-mod-01.tex
+++ b/tex/context/base/s-mod-01.tex
@@ -24,10 +24,10 @@
\mainlanguage
[en]
-\stelwitruimtein
+\setupwhitespace
[\v!groot]
-\steltolerantiein
+\setuptolerance
[\v!soepel]
\emergencystretch=5em
diff --git a/tex/context/base/s-mod-02.tex b/tex/context/base/s-mod-02.tex
index 0d7f707f6..c65bad451 100644
--- a/tex/context/base/s-mod-02.tex
+++ b/tex/context/base/s-mod-02.tex
@@ -18,6 +18,8 @@
\input s-mod-00.tex
+% todo: internationalize + setups
+
\stelkopin[paragraaf][expansie=commando]
\def\complexmodule[#1]% redefined
diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex
index 88d69f6e2..f095ae091 100644
--- a/tex/context/base/s-pre-05.tex
+++ b/tex/context/base/s-pre-05.tex
@@ -123,7 +123,7 @@
\setuplayout[width=550pt,rightedge=0pt]
\startstandardmakeup
\switchtobodyfont[24pt]
- \bfd\stelinterliniein
+ \bfd\setupinterlinespace
\setupalign[middle]
\vfil
\let\\=\vfil}
diff --git a/tex/context/base/setupa.tex b/tex/context/base/setupa.tex
index 770a6404c..6df0fb376 100644
--- a/tex/context/base/setupa.tex
+++ b/tex/context/base/setupa.tex
@@ -564,7 +564,7 @@ sectionnumber: numero sezione
\advance\hsize by -\leftskip
\advance\hsize by -\rightskip
\getvalue{\e!start setuptext}
- \stelwitruimtein[\v!geen]%
+ \setupwhitespace[\v!geen]%
\bgroup
\verbatimsetupvariablepart \edef\first {#2*}%
\protectsetupvariablepart \edef\second{#2}%
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index 9881a5566..6af370078 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -3422,7 +3422,7 @@
\startsetup
\command
- [\y!stelinterliniein]
+ [\y!setupinterlinespace]
\type
[\c!opt!\c!or!\c!val!\c!vars!]
\value
@@ -3525,7 +3525,7 @@
\startsetup
\command
- [\y!stelsmallerin]
+ [\y!setupnarrower]
\type
[\c!vars!]
\variable
@@ -4710,7 +4710,7 @@
\startsetup
\command
- [\y!stelblankoin]
+ [\y!setupblank]
\type
[\c!opt!\c!val!]
\value
@@ -4729,7 +4729,7 @@
[\c!identifier!]
[]
\inheritvalues
- [\y!stelblankoin]
+ [\y!setupblank]
[]
\stopsetup
@@ -4880,7 +4880,7 @@
\startsetup
\command
- [\y!stelwitruimtein]
+ [\y!setupwhitespace]
\type
[\c!opt!\c!val!]
\value
@@ -4890,7 +4890,7 @@
\startsetup
\command
- [\y!stelinspringenin]
+ [\y!setupindenting]
\type
[\c!vals!]
\value
@@ -5954,7 +5954,7 @@
\startsetup
\command
- [\y!steluitlijnenin]
+ [\y!setupalign]
\type
[\c!val!]
\value
@@ -5970,13 +5970,13 @@
\type
[\c!stp!\c!opt!\c!val!]
\inheritvariables
- [\y!steluitlijnenin]
+ [\y!setupalign]
[]
\stopsetup
\startsetup
\command
- [\y!stelspatieringin]
+ [\y!setupspacing]
\type
[\c!val!]
\value
@@ -5986,7 +5986,7 @@
\startsetup
\command
- [\y!steltolerantiein]
+ [\y!setuptolerance]
\type
[\c!vals!]
\value
@@ -7518,7 +7518,7 @@
\startsetup
\command
- [\y!plaatsnaastelkaar]
+ [\y!placesidebyside]
\type
[\c!arg!\c!arg!]
\value
@@ -7531,7 +7531,7 @@
\startsetup
\command
- [\y!plaatsonderelkaar]
+ [\y!placeontopofeachother]
\type
[\c!arg!\c!arg!]
\value
@@ -8980,7 +8980,7 @@
[\c!font!]
[]
\inheritvariables
- [\y!stelinterliniein]
+ [\y!setupinterlinespace]
[]
\stopsetup
diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex
index e530f3d1b..387f07b10 100644
--- a/tex/context/base/spec-fdf.tex
+++ b/tex/context/base/spec-fdf.tex
@@ -2240,8 +2240,8 @@
{\doifelsenothing{#1}
{\let\PDFattributes\empty}
{\def\PDFattributes{/C \FDFcolor{#1}}}%
- \def\width {18pt}%
- \def\height{24pt}%
+ \def\width {1.5\bodyfontsize}%
+ \def\height{\bodyfontsize}%
\doifelsenothing{#2}
{\let\PDFsymbol\empty}
{\ifundefined{PDFsymbol#2}%
diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex
index 72f76a810..49c7d40dd 100644
--- a/tex/context/base/spec-mis.tex
+++ b/tex/context/base/spec-mis.tex
@@ -178,9 +178,14 @@
\fi
\egroup}
+% \long\def\preservePSpar#1\to#2%
+% {\bgroup
+% \def\par{\rawcharacter{12}}%
+% \expanded{\egroup\noexpand\def\noexpand#2{#1}}}
+
\long\def\preservePSpar#1\to#2%
{\bgroup
- \def\par{\rawcharacter{12}}%
+ \def\par{\rawcharacter{12}\rawcharacter{12}}%
\expanded{\egroup\noexpand\def\noexpand#2{#1}}}
%D \macros
diff --git a/tex/context/base/supp-ali.tex b/tex/context/base/supp-ali.tex
index 87a844e7f..f19497e1d 100644
--- a/tex/context/base/supp-ali.tex
+++ b/tex/context/base/supp-ali.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=supp-ali,
-%D version=2000.4.17,
+%D version=2000.04.17,
%D title=\CONTEXT\ Support Macros,
%D subtitle=Alignment,
%D author=Hans Hagen,
diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex
index ce000ed40..ad8889d78 100644
--- a/tex/context/base/supp-box.tex
+++ b/tex/context/base/supp-box.tex
@@ -2238,6 +2238,24 @@
{\normalhbox{\setbox0\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}}
%D \macros
+%D {toplinebox}
+%D
+%D See core-tbl.tex for an example of its usage:
+
+\def\toplinebox
+ {\dowithnextbox
+ {\ifdim\nextboxdp>\strutdepth
+ \scratchdimen\nextboxdp
+ \advance\scratchdimen-\strutdepth
+ \getnoflines\scratchdimen
+ \struttedbox{\flushnextbox}%
+ \dorecurse\noflines\verticalstrut
+ \else
+ \flushnextbox
+ \fi}%
+ \tbox}
+
+%D \macros
%D {initializeboxstack,savebox,foundbox}
%D
%D At the cost of some memory, but saving box registers, we
diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex
index 547ad1365..4cbdf359f 100644
--- a/tex/context/base/supp-fun.tex
+++ b/tex/context/base/supp-fun.tex
@@ -741,7 +741,7 @@
{\bgroup
\forgetall
\dontcomplain
- \steltolerantiein[\v!zeersoepel]% == \tolerance4500
+ \setuptolerance[\v!zeersoepel]% == \tolerance4500
\hsize#1%
\def\\{\softbreak}%
\!!heighta#4%
@@ -789,7 +789,7 @@
#1%
{\def\+{\global\settrue\NFSpread\gobbleuntil\relax}%
\def\\{\gobbleuntil\relax}% newline
- \stelspatieringin
+ \setupspacing
#6\relax}%
{\scratchdimen}%
{#4}%
@@ -806,7 +806,7 @@
\def\GapText#1#2#3#4#5% width distance font spec title
{\bgroup
\NormalizeFontWidthSpread\DummyFont{#1}{#2}{#3}{#4}{#5}%
- \DummyFont\stelspatieringin\SpreadGapText{#2}{#5}\endgraf
+ \DummyFont\setupspacing\SpreadGapText{#2}{#5}\endgraf
\egroup}
\protect \endinput
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex
index a15b137ad..f05279c3a 100644
--- a/tex/context/base/supp-lan.tex
+++ b/tex/context/base/supp-lan.tex
@@ -547,9 +547,17 @@
\newsignal\compoundbreakpoint
- \def\fakecompoundhyphen%
- {\def|##1|%
- {\doifelsenothing{##1}{\compoundhyphen}{##1}%
+ % \def\fakecompoundhyphen%
+ % {\def|##1|%
+ % {\doifelsenothing{##1}{\compoundhyphen}{##1}%
+ % \kern\compoundbreakpoint\allowbreak}}
+
+ \def\fakecompoundhyphen
+ {\def\|{\mathortext\vert\dofakecompoundhyphen}}
+
+ \def\dofakecompoundhyphen
+ {\def##1|%
+ {\doifelsenothing{##1}\compoundhyphen{##1}%
\kern\compoundbreakpoint\allowbreak}}
\fi
diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex
index 06875fca9..fc056813b 100644
--- a/tex/context/base/supp-ran.tex
+++ b/tex/context/base/supp-ran.tex
@@ -77,8 +77,7 @@
\def\nextrandom
{\bgroup
\normalnextrandom
- \gdef\nextrandom
- {\ifcase\randomseedfrozen\normalnextrandom\fi}%
+ \gdef\nextrandom{\ifcase\randomseedfrozen\normalnextrandom\fi}%
\egroup}
% avoid scratch dimens 0 and 2 (already recoded in third-ran
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index 1e34137e2..d5c3d53b3 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -218,6 +218,8 @@
%
% And this is the one optimized for speed:
+% maxcounter = 2\maxdimen=1
+
\def\!!zerocount {0} % alongside \zerocount
\def\!!minusone {-1} % alongside \minusone
\def\!!plusone {1} % alongside \plusone
@@ -4292,6 +4294,9 @@
\def\thelasttwodigits#1#2#3% 0 dig ... \relax
{\ifx#3\relax#1#2\else\@EA\thelasttwodigits\@EA#2\@EA#3\fi}
+%D \macros
+%D {serializecommalist}
+%D
%D Concatenate commalists:
\def\serializecommalist[#1]%
@@ -4299,6 +4304,9 @@
\def\docommando##1{\edef\serializedcommalist{\serializedcommalist##1}}%
\processcommacommand[#1]\docommando}
+%D \macros
+%D {purenumber}
+%D
%D Sometimes we need control over when \TEX\ stops reading a
%D number, especially in full expandable macros where using
%D \type {\relax} would lead to disasters.
@@ -4314,4 +4322,44 @@
\def\purenumber#1{\@EA\firstofoneargument\@EA{\number#1}}
+%D \macros
+%D {filterfromvalue}
+%D
+%D \starttypen
+%D \setvalue{xx}{{A}{B}{C}}
+%D
+%D \filterfromvalue{xx}{3}{3}
+%D \filterfromvalue{xx}{3}{2}
+%D \filterfromvalue{xx}{3}{1}
+%D \stoptypen
+
+\def\filterfromvalue#1#2#3% value max n
+ {\@EA\@EAEAEA\csname
+ \ifcase#2\or
+ \ifcase#3\or
+ \strippedcsname\firstofoneargument
+ \else
+ \strippedcsname\gobbleoneargument
+ \fi
+ \or
+ \ifcase#3\or
+ \strippedcsname\firstoftwoarguments
+ \or
+ \strippedcsname\secondoftwoarguments
+ \else
+ \strippedcsname\gobbletwoarguments
+ \fi
+ \or
+ \ifcase#3\or
+ \strippedcsname\firstofthreearguments
+ \or
+ \strippedcsname\secondofthreearguments
+ \or
+ \strippedcsname\thirdofthreearguments
+ \else
+ \strippedcsname\gobblethreearguments
+ \fi
+ \fi
+ \endcsname\csname#1\endcsname}
+
\protect \endinput
diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex
index efe4ddf85..58ca5f964 100644
--- a/tex/context/base/syst-gen.tex
+++ b/tex/context/base/syst-gen.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=syst-gen,
-%D version=1996.3.20,
+%D version=1996.03.20,
%D title=\CONTEXT\ System Macros,
%D subtitle=General,
%D author=Hans Hagen,
@@ -1348,6 +1348,68 @@
%
% \endETEX
+% then we had:
+%
+% \def\p!docheckiteminset#1%
+% {\edef\!!stringb{#1}%
+% \ifx\!!stringa\!!stringb
+% \donetrue
+% \expandafter\quitcommalist
+% \fi}
+%
+% \beginTEX
+%
+% \def\p!doifinsetelse#1#2%
+% {\let\donottest\dontprocesstest
+% \donefalse
+% \edef\!!stringa{#1}%
+% \ifx\!!stringa\empty
+% \else
+% \processcommalist[#2]\p!docheckiteminset
+% \fi
+% \let\donottest\doprocesstest
+% \ifdone}
+%
+% \endTEX
+%
+% % can be sped up with processnext...
+%
+% \beginETEX \protected
+%
+% \def\p!doifinsetelse#1#2%
+% {\donefalse
+% \edef\!!stringa{#1}%
+% \ifx\!!stringa\empty
+% \else
+% \processcommalist[#2]\p!docheckiteminset
+% \fi
+% \ifdone}
+%
+% \endETEX
+%
+% \long\def\doifinsetelse#1#2%
+% {\p!doifinsetelse{#1}{#2}%
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+%
+% \long\def\doifinset#1#2%
+% {\p!doifinsetelse{#1}{#2}%
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\gobbleoneargument
+% \fi}
+%
+% \long\def\doifnotinset#1#2%
+% {\p!doifinsetelse{#1}{#2}%
+% \expandafter\gobbleoneargument
+% \else
+% \expandafter\firstofoneargument
+% \fi}
+%
+% now we have
+
\def\p!docheckiteminset#1%
{\edef\!!stringb{#1}%
\ifx\!!stringa\!!stringb
@@ -1357,54 +1419,40 @@
\beginTEX
-\def\p!doifinsetelse#1#2%
+\def\p!doifinsetelse#1#2#3#4%
{\let\donottest\dontprocesstest
\donefalse
- \edef\!!stringa{#1}%
+ \edef\!!stringa{#3}%
\ifx\!!stringa\empty
\else
- \processcommalist[#2]\p!docheckiteminset
+ \processcommalist[#4]\p!docheckiteminset
\fi
\let\donottest\doprocesstest
- \ifdone}
+ \ifdone\expandafter#1\else\expandafter#2\fi}
\endTEX
-% can be sped up with processnext...
-
\beginETEX \protected
-\def\p!doifinsetelse#1#2%
+\def\p!doifinsetelse#1#2#3#4%
{\donefalse
- \edef\!!stringa{#1}%
+ \edef\!!stringa{#3}%
\ifx\!!stringa\empty
\else
- \processcommalist[#2]\p!docheckiteminset
+ \processcommalist[#4]\p!docheckiteminset
\fi
- \ifdone}
+ \ifdone\expandafter#1\else\expandafter#2\fi}
\endETEX
-\long\def\doifinsetelse#1#2%
- {\p!doifinsetelse{#1}{#2}%
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
+\long\def\doifinsetelse
+ {\p!doifinsetelse\firstoftwoarguments\secondoftwoarguments}
-\long\def\doifinset#1#2%
- {\p!doifinsetelse{#1}{#2}%
- \expandafter\firstofoneargument
- \else
- \expandafter\gobbleoneargument
- \fi}
+\long\def\doifinset
+ {\p!doifinsetelse\firstofoneargument\gobbleoneargument}
-\long\def\doifnotinset#1#2%
- {\p!doifinsetelse{#1}{#2}%
- \expandafter\gobbleoneargument
- \else
- \expandafter\firstofoneargument
- \fi}
+\long\def\doifnotinset
+ {\p!doifinsetelse\gobbleoneargument\firstofoneargument}
%D \macros
%D {doifcommon,doifnotcommon,doifcommonelse}
@@ -1493,6 +1541,62 @@
%
% \endETEX
+% \def\p!dodocommoncheck#1%
+% {\edef\!!stringb{#1}%
+% \ifx\!!stringa\!!stringb
+% \donetrue
+% \expandafter\quitprevcommalist
+% \fi}
+%
+% \beginTEX
+%
+% \def\p!doifcommonelse#1#2%
+% {\donefalse
+% \let\donottest\dontprocesstest
+% \def\p!docommoncheck##1%
+% {\edef\!!stringa{##1}%
+% \def\commalistelement{##1}% no let to stringa
+% \processcommalist[#2]\p!dodocommoncheck}%
+% \processcommalist[#1]\p!docommoncheck
+% \let\donottest\doprocesstest
+% \ifdone}
+%
+% \endTEX
+%
+% \beginETEX \protected
+%
+% \def\p!doifcommonelse#1#2%
+% {\donefalse
+% \def\p!docommoncheck##1%
+% {\edef\!!stringa{##1}%
+% \def\commalistelement{##1}%
+% \processcommalist[#2]\p!dodocommoncheck}%
+% \processcommalist[#1]\p!docommoncheck
+% \ifdone}
+%
+% \endETEX
+%
+% \long\def\doifcommonelse#1#2% % #3#4%
+% {\p!doifcommonelse{#1}{#2}% % #3\else#4\fi}
+% \expandafter\firstoftwoarguments
+% \else
+% \expandafter\secondoftwoarguments
+% \fi}
+%
+% \long\def\doifcommon#1#2%
+% {\p!doifcommonelse{#1}{#2}%
+% \expandafter\firstofoneargument
+% \else
+% \expandafter\gobbleoneargument
+% \fi}
+%
+% \long\def\doifnotcommon#1#2%
+% {\p!doifcommonelse{#1}{#2}%
+% \expandafter\gobbleoneargument
+% \else
+% \expandafter\firstofoneargument
+% \fi}
+
\def\p!dodocommoncheck#1%
{\edef\!!stringb{#1}%
\ifx\!!stringa\!!stringb
@@ -1502,52 +1606,40 @@
\beginTEX
-\def\p!doifcommonelse#1#2%
+\def\p!doifcommonelse#1#2#3#4%
{\donefalse
\let\donottest\dontprocesstest
\def\p!docommoncheck##1%
{\edef\!!stringa{##1}%
\def\commalistelement{##1}% no let to stringa
- \processcommalist[#2]\p!dodocommoncheck}%
- \processcommalist[#1]\p!docommoncheck
+ \processcommalist[#4]\p!dodocommoncheck}%
+ \processcommalist[#3]\p!docommoncheck
\let\donottest\doprocesstest
- \ifdone}
+ \ifdone\expandafter#1\else\expandafter#2\fi}
\endTEX
\beginETEX \protected
-\def\p!doifcommonelse#1#2%
+\def\p!doifcommonelse#1#2#3#4%
{\donefalse
\def\p!docommoncheck##1%
{\edef\!!stringa{##1}%
\def\commalistelement{##1}%
- \processcommalist[#2]\p!dodocommoncheck}%
- \processcommalist[#1]\p!docommoncheck
- \ifdone}
+ \processcommalist[#4]\p!dodocommoncheck}%
+ \processcommalist[#3]\p!docommoncheck
+ \ifdone\expandafter#1\else\expandafter#2\fi}
\endETEX
-\long\def\doifcommonelse#1#2% % #3#4%
- {\p!doifcommonelse{#1}{#2}% % #3\else#4\fi}
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
+\def\doifcommonelse
+ {\p!doifcommonelse\firstoftwoarguments\secondoftwoarguments}
-\long\def\doifcommon#1#2%
- {\p!doifcommonelse{#1}{#2}%
- \expandafter\firstofoneargument
- \else
- \expandafter\gobbleoneargument
- \fi}
+\def\doifcommon
+ {\p!doifcommonelse\firstofoneargument \gobbleoneargument}
-\long\def\doifnotcommon#1#2%
- {\p!doifcommonelse{#1}{#2}%
- \expandafter\gobbleoneargument
- \else
- \expandafter\firstofoneargument
- \fi}
+\def\doifnotcommon
+ {\p!doifcommonelse\gobbleoneargument \firstofoneargument}
%D \macros
%D {processcommalist,processcommacommand,quitcommalist,
@@ -2010,7 +2102,7 @@
\fi
\fi}
-\def\doprocessallactionsinset%
+\def\doprocessallactionsinset
{\csname\s!do\the\processlevel\endcsname}
\def\processallactionsinset[#1]#2[#3]% faster version follows
@@ -2132,10 +2224,7 @@
%D By default we expand actions:
-\def\expandactions%
- {\let\expandedaction\edef}
-
-\expandactions
+\def\expandactions{\let\expandedaction\edef} \expandactions
%D But when needed we convert the strings to meaningful
%D sequences of characters.
diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex
index ea19c7a20..057e51127 100644
--- a/tex/context/base/thrd-ran.tex
+++ b/tex/context/base/thrd-ran.tex
@@ -134,7 +134,7 @@
\global\advance\randomi-\!!countd % random mod 127773
\global\multiply\randomi 16807
\multiply\!!countc 2836
- \global\advance\randomi-\!!countc
+ \global\advance\randomi-\!!countc\relax
\ifnum\randomi<\zerocount
\global\advance\randomi 2147483647
\fi
diff --git a/tex/context/base/type-akb.tex b/tex/context/base/type-akb.tex
new file mode 100644
index 000000000..937e67ac0
--- /dev/null
+++ b/tex/context/base/type-akb.tex
@@ -0,0 +1,202 @@
+%D \module
+%D [ file=type-akb,
+%D version=2001.07.08,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Adobe's Famous Gang of Fonts,
+%D author=Patrick Gundlach,
+%D date=\currentdate,
+%D 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 Last Change: Tue Mar 18 16:01:03 2003
+
+%D This module is written by Patrick Gundlach (patrick@gundla.ch)
+%D and maps to the standard postscript fonts conforming the
+%D psnfss system as used by \LaTeX.
+%D
+%D \starttypen
+%D \setupencoding[default=texnansi]
+%D \usetypescript[adobekb][\defaultencoding]
+%D \stoptypen
+%D
+%D The following is not needed since the file is already
+%D registered:
+%D
+%D \starttypen
+%D \usetypescriptfile[akb]
+%D \stoptypen
+
+\starttypescript [adobekb] [8r]
+
+\definefontsynonym [8r-utmr8a] [ptmr8r] [encoding=8r]
+\definefontsynonym [8r-utmri8a] [ptmri8r] [encoding=8r]
+\definefontsynonym [8r-utmb8a] [ptmb8r] [encoding=8r]
+\definefontsynonym [8r-utmbi8a] [ptmbi8r] [encoding=8r]
+
+\definefontsynonym [8r-utmr8a-slanted-167] [ptmro8r] [encoding=8r]
+\definefontsynonym [8r-utmb8a-slanted-167] [ptmbo8r] [encoding=8r]
+
+\definefontsynonym [8r-uhvr8a] [phvr8r] [encoding=8r]
+\definefontsynonym [8r-uhvro8a] [phvro8r] [encoding=8r]
+\definefontsynonym [8r-uhvb8a] [phvb8r] [encoding=8r]
+\definefontsynonym [8r-uhvbo8a] [phvbo8r] [encoding=8r]
+
+\definefontsynonym [8r-ucrr8a] [pcrr8r] [encoding=8r]
+\definefontsynonym [8r-ucrb8a] [pcrb8r] [encoding=8r]
+\definefontsynonym [8r-ucrro8a] [pcrro8r] [encoding=8r]
+\definefontsynonym [8r-ucrbo8a] [pcrbo8r] [encoding=8r]
+
+\definefontsynonym [8r-uplr8a] [pplr8r] [encoding=8r]
+\definefontsynonym [8r-uplri8a] [pplri8r] [encoding=8r]
+\definefontsynonym [8r-uplb8a] [pplb8r] [encoding=8r]
+\definefontsynonym [8r-uplbi8a] [pplbi8r] [encoding=8r]
+\definefontsynonym [8r-uplr8a-slanted-167] [pplro8r] [encoding=8r]
+\definefontsynonym [8r-uplb8a-slanted-167] [pplbo8r] [encoding=8r]
+\definefontsynonym [8r-uplr8a-capitalized-800] [pplr8r] [encoding=8r]
+
+\definefontsynonym [8r-ubkl8a] [pbkl8r] [encoding=8r]
+\definefontsynonym [8r-ubkli8a] [pbkli8r] [encoding=8r]
+\definefontsynonym [8r-ubkd8a] [pbkd8r] [encoding=8r]
+\definefontsynonym [8r-ubkdi8a] [pbkdi8r] [encoding=8r]
+\definefontsynonym [8r-ubkl8a-slanted-167] [pbklo8r] [encoding=8r]
+\definefontsynonym [8r-ubkd8a-slanted-167] [pbkdo8r] [encoding=8r]
+\definefontsynonym [8r-ubkl8a-capitalized-800] [pbkl8r] [encoding=8r]
+
+\definefontsynonym [8r-uzcmi8a] [pzcmi8r] [encoding=8r]
+
+\definefontsynonym [8r-putr8a] [putr8r] [encoding=8r]
+\definefontsynonym [8r-putri8a] [putri8r] [encoding=8r]
+\definefontsynonym [8r-putb8a] [putr8r] [encoding=8r]
+\definefontsynonym [8r-putbi8a] [putbi8r] [encoding=8r]
+\definefontsynonym [8r-putr8a-slanted-167] [putro8r] [encoding=8r]
+\definefontsynonym [8r-putb8a-slanted-167] [putbo8r] [encoding=8r]
+\definefontsynonym [8r-putr8a-capitalized-800] [putr8r] [encoding=8r]
+
+\definefontsynonym [8r-bchr8a] [bchr8r] [encoding=8r]
+\definefontsynonym [8r-bchri8a] [bchri8r] [encoding=8r]
+\definefontsynonym [8r-bchb8a] [bchb8r] [encoding=8r]
+\definefontsynonym [8r-bchbi8a] [bchbi8r] [encoding=8r]
+\definefontsynonym [8r-bchr8a-slanted-167] [bchro8r] [encoding=8r]
+\definefontsynonym [8r-bchb8a-slanted-167] [bchbo8r] [encoding=8r]
+\definefontsynonym [8r-bchr8a-capitalized-800] [bchr8r] [encoding=8r]
+
+\stoptypescript
+
+\starttypescript [adobekb] [ec]
+
+\definefontsynonym [ec-utmr8a] [ptmr8t] [encoding=ec]
+\definefontsynonym [ec-utmri8a] [ptmri8t] [encoding=ec]
+\definefontsynonym [ec-utmb8a] [ptmb8t] [encoding=ec]
+\definefontsynonym [ec-utmbi8a] [ptmbi8t] [encoding=ec]
+
+\definefontsynonym [ec-utmr8a-slanted-167] [ptmro8t] [encoding=ec]
+\definefontsynonym [ec-utmb8a-slanted-167] [ptmbo8t] [encoding=ec]
+
+\definefontsynonym [ec-uhvr8a] [phvr8t] [encoding=ec]
+\definefontsynonym [ec-uhvro8a] [phvro8t] [encoding=ec]
+\definefontsynonym [ec-uhvb8a] [phvb8t] [encoding=ec]
+\definefontsynonym [ec-uhvbo8a] [phvbo8t] [encoding=ec]
+
+\definefontsynonym [ec-ucrr8a] [pcrr8t] [encoding=ec]
+\definefontsynonym [ec-ucrb8a] [pcrb8t] [encoding=ec]
+\definefontsynonym [ec-ucrro8a] [pcrro8t] [encoding=ec]
+\definefontsynonym [ec-ucrbo8a] [pcrbo8t] [encoding=ec]
+
+\definefontsynonym [ec-uplr8a] [pplr8t] [encoding=ec]
+\definefontsynonym [ec-uplri8a] [pplri8t] [encoding=ec]
+\definefontsynonym [ec-uplb8a] [pplb8t] [encoding=ec]
+\definefontsynonym [ec-uplbi8a] [pplbi8t] [encoding=ec]
+\definefontsynonym [ec-uplr8a-slanted-167] [pplro8t] [encoding=ec]
+\definefontsynonym [ec-uplb8a-slanted-167] [pplbo8t] [encoding=ec]
+\definefontsynonym [ec-uplr8a-capitalized-800] [pplr8t] [encoding=ec]
+
+\definefontsynonym [ec-ubkl8a] [pbkl8t] [encoding=ec]
+\definefontsynonym [ec-ubkli8a] [pbkli8t] [encoding=ec]
+\definefontsynonym [ec-ubkd8a] [pbkd8t] [encoding=ec]
+\definefontsynonym [ec-ubkdi8a] [pbkdi8t] [encoding=ec]
+\definefontsynonym [ec-ubkl8a-slanted-167] [pbklo8t] [encoding=ec]
+\definefontsynonym [ec-ubkd8a-slanted-167] [pbkdo8t] [encoding=ec]
+\definefontsynonym [ec-ubkl8a-capitalized-800] [pbkl8t] [encoding=ec]
+
+\definefontsynonym [ec-uzcmi8a] [pzcmi8t] [encoding=ec]
+
+\definefontsynonym [ec-putr8a] [putr8t] [encoding=ec]
+\definefontsynonym [ec-putri8a] [putri8t] [encoding=ec]
+\definefontsynonym [ec-putb8a] [putr8t] [encoding=ec]
+\definefontsynonym [ec-putbi8a] [putbi8t] [encoding=ec]
+\definefontsynonym [ec-putr8a-slanted-167] [putro8t] [encoding=ec]
+\definefontsynonym [ec-putb8a-slanted-167] [putbo8t] [encoding=ec]
+\definefontsynonym [ec-putr8a-capitalized-800] [putr8t] [encoding=ec]
+
+\definefontsynonym [ec-bchr8a] [bchr8t] [encoding=ec]
+\definefontsynonym [ec-bchri8a] [bchri8t] [encoding=ec]
+\definefontsynonym [ec-bchb8a] [bchb8t] [encoding=ec]
+\definefontsynonym [ec-bchbi8a] [bchbi8t] [encoding=ec]
+\definefontsynonym [ec-bchr8a-slanted-167] [bchro8t] [encoding=ec]
+\definefontsynonym [ec-bchb8a-slanted-167] [bchbo8t] [encoding=ec]
+\definefontsynonym [ec-bchr8a-capitalized-800] [bchr8t] [encoding=ec]
+
+\stoptypescript
+
+% the following fonts are normally not present on tex live
+
+\starttypescript [adobekb] [texnansi]
+
+\definefontsynonym [texnansi-utmr8a] [ptmr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-utmri8a] [ptmri8y] [encoding=texnansi]
+\definefontsynonym [texnansi-utmb8a] [ptmb8y] [encoding=texnansi]
+\definefontsynonym [texnansi-utmbi8a] [ptmbi8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-utmr8a-slanted-167] [ptmro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-utmb8a-slanted-167] [ptmbo8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-uhvr8a] [phvr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uhvro8a] [phvro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uhvb8a] [phvb8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uhvbo8a] [phvbo8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-ucrr8a] [pcrr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ucrb8a] [pcrb8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ucrro8a] [pcrro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ucrbo8a] [pcrbo8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-uplr8a] [pplr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplri8a] [pplri8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplb8a] [pplb8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplbi8a] [pplbi8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplr8a-slanted-167] [pplro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplb8a-slanted-167] [pplbo8y] [encoding=texnansi]
+\definefontsynonym [texnansi-uplr8a-capitalized-800] [pplr8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-ubkl8a] [pbkl8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkli8a] [pbkli8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkd8a] [pbkd8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkdi8a] [pbkdi8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkl8a-slanted-167] [pbklo8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkd8a-slanted-167] [pbkdo8y] [encoding=texnansi]
+\definefontsynonym [texnansi-ubkl8a-capitalized-800] [pbkl8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-uzcmi8a] [pzcmi8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-putr8a] [putr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putri8a] [putri8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putb8a] [putr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putbi8a] [putbi8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putr8a-slanted-167] [putro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putb8a-slanted-167] [putbo8y] [encoding=texnansi]
+\definefontsynonym [texnansi-putr8a-capitalized-800] [putr8y] [encoding=texnansi]
+
+\definefontsynonym [texnansi-bchr8a] [bchr8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchri8a] [bchri8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchb8a] [bchb8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchbi8a] [bchbi8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchr8a-slanted-167] [bchro8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchb8a-slanted-167] [bchbo8y] [encoding=texnansi]
+\definefontsynonym [texnansi-bchr8a-capitalized-800] [bchr8y] [encoding=texnansi]
+
+\stoptypescript
+
+\endinput
diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex
index 148c193f6..b87dfe6e9 100644
--- a/tex/context/base/type-buy.tex
+++ b/tex/context/base/type-buy.tex
@@ -1,3 +1,16 @@
+%D \module
+%D [ file=type-buy,
+%D version=2003.07.08, % 2001.04.12,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=A Few Commercial Fonts,
+%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.
+
% fallback
% todo \typescriptthree
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index 9de348af5..effbf2f53 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -30,6 +30,8 @@
\usetypescriptfile[\f!typeprefix spe] % special macros
\usetypescriptfile[\f!typeprefix exa] % some examples
\usetypescriptfile[\f!typeprefix loc] % local scripts
+\usetypescriptfile[\f!typeprefix akb] % adobe karl berry names
+
%usetypescriptfile[\f!typeprefix pre] % predefined scripts (compatible)
%usetypescriptfile[typeface] % project scripts
diff --git a/tex/context/base/verb-js.tex b/tex/context/base/verb-js.tex
index 78184c94f..e8c2e6b5d 100644
--- a/tex/context/base/verb-js.tex
+++ b/tex/context/base/verb-js.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=verb-js,
-%D version=1998.02.7,
+%D version=1998.02.07,
%D title=\CONTEXT\ Verbatim Macros,
%D subtitle=Pretty \JAVASCRIPT\ Verbatim,
%D author=Hans Hagen,
diff --git a/tex/context/base/verb-jv.tex b/tex/context/base/verb-jv.tex
index a7bad3c43..d55394d2c 100644
--- a/tex/context/base/verb-jv.tex
+++ b/tex/context/base/verb-jv.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=verb-jv,
-%D version=2002.2.27,
+%D version=2002.02.27,
%D title=\CONTEXT\ Verbatim Macros,
%D subtitle=Pretty \JAVA\ Verbatim,
%D author=Hans Hagen,
diff --git a/tex/context/base/x-res-00.tex b/tex/context/base/x-res-00.tex
index 8cf8606d8..46a278768 100644
--- a/tex/context/base/x-res-00.tex
+++ b/tex/context/base/x-res-00.tex
@@ -29,7 +29,7 @@
\defineXMLpush [rl:product]
\defineXMLpush [rl:project]
-% resource library entries
+% resource library entries (better use XMLignore)
\defineXMLignore [rl:applet]
\defineXMLignore [rl:application]
@@ -37,6 +37,10 @@
\defineXMLignore [rl:movie]
\defineXMLignore [rl:sound]
+\defineXMLpush [rl:type]
+\defineXMLpush [rl:state]
+\defineXMLpush [rl:width]
+\defineXMLpush [rl:height]
\defineXMLpush [rl:file]
\defineXMLpush [rl:label]
\defineXMLpush [rl:original]
diff --git a/tex/context/base/x-res-01.tex b/tex/context/base/x-res-01.tex
index 7928f5a95..d3f888376 100644
--- a/tex/context/base/x-res-01.tex
+++ b/tex/context/base/x-res-01.tex
@@ -55,8 +55,10 @@
\setupoutput[pdftex] \overcomePDFspacefalse
-\doifnothing {\jobfilename} {\end}
-\doiffileelse {\jobfilename.xml} {} {\end}
+\setjobfullname {xml} % default suffix
+
+\doifnothing {\jobfullname} {\end}
+\doiffileelse {\jobfullname} {} {\end}
\def\StartDescription
{\bgroup}
@@ -337,7 +339,7 @@
\doglobal\newcounter\CurrentPage
-\processXMLfilegrouped{\jobfilename.xml}
+\processXMLfilegrouped{\jobfullname}
\increment\NumberOfFigures
@@ -346,7 +348,7 @@
\doglobal\newcounter\CurrentPage
-\processXMLfilegrouped{\jobfilename.xml}
+\processXMLfilegrouped{\jobfullname}
\setuppapersize
[S6][S6]
@@ -363,7 +365,7 @@
\doglobal\newcounter\CurrentPage
-\processXMLfilegrouped{\jobfilename.xml} \page
+\processXMLfilegrouped{\jobfullname} \page
\subject [list] {List of figures}
@@ -444,6 +446,6 @@
\doglobal\newcounter\CurrentPage
-\processXMLfilegrouped{\jobfilename.xml} \page
+\processXMLfilegrouped{\jobfullname} \page
\stoptext
diff --git a/tex/context/base/x-res-02.tex b/tex/context/base/x-res-02.tex
index 4a7ea35d5..19584f921 100644
--- a/tex/context/base/x-res-02.tex
+++ b/tex/context/base/x-res-02.tex
@@ -34,8 +34,8 @@
\usemodule[res-00]
-\doifnothing {\jobfilename} {\end}
-\doiffileelse {\jobfilename.xml} {} {\end}
+\doifnothing {\jobfullname} {\end}
+\doiffileelse {\jobfullname} {} {\end}
\defineXMLenvironment [rl:figurelibrary] \StartLibrary \StopLibrary
\defineXMLenvironment [rl:library] \StartLibrary \StopLibrary
@@ -67,6 +67,6 @@
\starttext
-\processXMLfilegrouped{\jobfilename.xml}
+\processXMLfilegrouped{\jobfullname}
\stoptext
diff --git a/tex/context/base/x-res-08.tex b/tex/context/base/x-res-08.tex
index c7452d1ee..28a48460b 100644
--- a/tex/context/base/x-res-08.tex
+++ b/tex/context/base/x-res-08.tex
@@ -36,6 +36,7 @@
\def\openXMLresourcelog
{%\global\let\openXMLresourcelog\relax
\immediate\openout\XMLrllog\jobname.rlg\relax
+ \immediate\write\XMLrllog{\XMLbanner\empty}%
\immediate\write\XMLrllog{\writtenXMLstart{\XMLrlprefix library}}}
\def\closeXMLresourcelog
diff --git a/tex/context/base/x-res-09.tex b/tex/context/base/x-res-09.tex
index 12ee02a6f..608236156 100644
--- a/tex/context/base/x-res-09.tex
+++ b/tex/context/base/x-res-09.tex
@@ -19,7 +19,7 @@
\defineXMLenvironment [rl:usage]
{\bgroup}
- {\setups[rl:usage]%
+ {\doifnot{\XMLflush{rl:file}}{dummy}{\setups[rl:usage]}%
\egroup}
\defineXMLsave [rl:base] % base
@@ -47,7 +47,11 @@
\startsetups[rl:usage]
-\starttabulate[|lw(4.5em)|p|]
+% by using a dedicated tabulation, we permit usage in dutch interface
+
+\definetabulate[XMLRLG][|lw(4.5em)|p|]
+
+\startXMLRLG
\XMLrlentry {base} {rl:base} {0}
\XMLrlentry {type} {rl:type} {0}
\XMLrlentry {state} {rl:state} {0}
@@ -58,7 +62,7 @@
\XMLrlentry {width} {rl:width} {1}
\XMLrlentry {height} {rl:height} {1}
\XMLrlentry {comment}{rl:comment}{0}
-\stoptabulate
+\stopXMLRLG
\stopsetups
diff --git a/tex/context/base/x-res-10.tex b/tex/context/base/x-res-10.tex
new file mode 100644
index 000000000..f23c50358
--- /dev/null
+++ b/tex/context/base/x-res-10.tex
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=x-fig-10,
+%D version=2003.08.02,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Resource Dummy 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.
+
+\usemodule[res-00]
+
+\defineXMLenvironment [rl:library]
+ {\starttext}
+ {\stoptext}
+
+\defineXMLenvironment [rl:usage]
+ {\bgroup}
+ {\doif{\XMLflush{rl:type}-\XMLflush{rl:state}}{figure-missing}
+ {\doifnot{\XMLflush{rl:file}}{dummy}{\setups[rl:usage]}}
+ \egroup}
+
+\defineXMLsave [rl:type] % figure
+\defineXMLsave [rl:state] % found|missing
+\defineXMLsave [rl:file] % filename
+
+\defineXMLsavecontent [rl:width] {12cm} % width in pt
+\defineXMLsavecontent [rl:height] {9cm} % height in pt
+
+\useMPlibrary
+ [dum]
+
+\setupcolors
+ [state=start]
+
+\defineoverlay
+ [rl:banner]
+ [\setups{rl:banner}]
+
+\startsetups[rl:banner]
+
+ \framed [frame=off,offset=none,align={lohi,middle}]
+ \bgroup
+ \tt \white \XMLflush{rl:file}
+ \egroup
+
+\stopsetups
+
+\startsetups[rl:usage]
+
+ \startTEXpage
+
+ % \externalfigure
+ % [\XMLflush{rl:file}] % goes wrong when file present
+ % [object=no,
+ % backgroundcolor=green,background={foreground,color,rl:banner},
+ % width=\XMLflush{rl:width},
+ % height=\XMLflush{rl:height}]
+
+ \def\figurewidth {\XMLflush{rl:width}}
+ \def\figureheight{\XMLflush{rl:height}}
+
+ \externalfigurereplacement
+ {\XMLflush{rl:file}}
+ {\XMLflush{rl:file}}
+ {\XMLflush{rl:state}}
+
+ \stopTEXpage
+
+\stopsetups
+
+\endinput
diff --git a/tex/context/base/x-res-11.tex b/tex/context/base/x-res-11.tex
new file mode 100644
index 000000000..c58f868c0
--- /dev/null
+++ b/tex/context/base/x-res-11.tex
@@ -0,0 +1,110 @@
+%D \module
+%D [ file=x-fig-11,
+%D version=2003.02.08,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Resource Reporting (3),
+%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.
+
+\usemodule[res-00]
+
+\defineXMLenvironment [rl:library]
+ {\starttext
+ \doiffileelse{\outputfilename.zip}{\setups[rl:attach]}{}
+ \disablemode[rl:used]}
+ {\doifnotmode{rl:used}{No images processed.}
+ \page
+ \stoptext}
+
+\defineXMLenvironment [rl:usage]
+ {\bgroup}
+ {\doifnot{\XMLflush{rl:file}}{dummy}
+ {\setups[rl:usage]
+ \enablemode[rl:used]}
+ \egroup}
+
+\defineXMLsave [rl:base] % base
+\defineXMLsave [rl:type] % figure
+\defineXMLsave [rl:state] % found|missing
+\defineXMLsave [rl:label] % label
+\defineXMLsave [rl:file] % filename
+\defineXMLsave [rl:suffix] % filesuffix
+\defineXMLsave [rl:comment] % text
+\defineXMLsave [rl:width] % width in pt
+\defineXMLsave [rl:height] % height in pt
+\defineXMLsave [rl:page] % page from file
+
+\def\XMLbpentry#1%
+ {\PointsToWholeBigPoints{\XMLflush{#1}}\temp\temp bp}
+
+\def\XMLrlentry#1#2#3%
+ {\tableiftextelse{\XMLflush{#2}}
+ {\NC\bf#1\NC\XMLflush{#2}\doif{#3}{1}{ (\XMLbpentry{#2})}\NC\NR}{}}
+
+\unprotect
+
+\setuplayout[\v!midden]
+
+\startsetups[rl:figure]
+
+ \externalfigure[\XMLflush{rl:file}][\c!breedte=4cm]
+
+\stopsetups
+
+\startsetups[rl:table]
+
+% by using a dedicated tabulation, we permit usage in dutch interface
+
+\definetabulate[XMLRLG][|lw(4.5em)|p|]
+
+\startXMLRLG
+ \XMLrlentry {base} {rl:base} {0}
+ \XMLrlentry {type} {rl:type} {0}
+ \XMLrlentry {state} {rl:state} {0}
+ \XMLrlentry {file} {rl:file} {0}
+ \XMLrlentry {label} {rl:label} {0}
+ \XMLrlentry {suffix} {rl:suffix} {0}
+ \XMLrlentry {page} {rl:page} {0}
+ \XMLrlentry {width} {rl:width} {1}
+ \XMLrlentry {height} {rl:height} {1}
+ \XMLrlentry {comment}{rl:comment}{0}
+\stopXMLRLG
+
+\stopsetups
+
+\startsetups[rl:usage]
+
+ \startfiguretext {\v!geen} {\setups[rl:figure]}
+ \setups[rl:table]
+ \stopfiguretext
+
+\stopsetups
+
+\startsetups[rl:attach]
+
+ \useMPlibrary[nav]
+
+ \setupcolors[\c!status=\v!start]
+
+ \setupinteraction[\c!status=\v!start]
+
+ \useattachment[whatever][\outputfilename.zip]
+
+ \startlocalsetups[rl:attach:button]
+
+ \inframed
+ [\c!offset=\v!overlay,\c!kader=\v!uit]
+ {\attachment[whatever]}
+
+ \stoplocalsetups
+
+ \setupfootertexts[archive with dummies: \setups{rl:attach:button}]
+
+\stopsetups
+
+\protect \endinput
diff --git a/tex/context/base/x-xml-01.tex b/tex/context/base/x-xml-01.tex
index 570641c5e..9660b288c 100644
--- a/tex/context/base/x-xml-01.tex
+++ b/tex/context/base/x-xml-01.tex
@@ -20,7 +20,7 @@
\doifnothing {\inputfilename} {\end}
\doiffileelse {\inputfilename} {} {\end}
-% makes pdftotext too slow
+% The following makes pdftotext too slow:
%
% \definepapersize
% [mine]
@@ -40,49 +40,70 @@
% [A0][A0]
%
% but normal A4 combined with 1 pt font size is the best
-
+%
+% An alternative is to use a small size, but this leads to
% too many messages
%
% \setupbodyfont
% [1pt,tt]
%
-% so:
-
-\setupbodyfont
- [tt,10pt]
+% so we stick to a more normal alternive.
-\setuptolerance
- [verytolerant]
+\unprotect
-\setupalign
- [broad,right]
+% \setuplayout
+% [backspace=0cm,
+% topspace=0cm,
+% %width=40em,
+% width=middle,
+% height=middle,
+% header=0cm,
+% footer=0cm]
\setuplayout
- [backspace=0cm,
- topspace=0cm,
- width=middle,
-% width=40em,
- height=middle,
- header=0cm,
- footer=0cm]
+ [\c!rugwit=0cm,
+ \c!kopwit=0cm,
+ %\c!breedte=40em,
+ \c!breedte=\v!midden,
+ \c!hoogte=\v!midden,
+ \c!hoofd=0cm,
+ \c!voet=0cm]
+
+% \setupbodyfont [tt,10pt]
+% \setuptolerance [verytolerant]
+% \setupalign [broad,right]
+% \setupXMLfile [level=2]
+
-\setupXMLfile
- [level=2]
+\setupbodyfont [tt,10pt]
+\setuptolerance [\v!zeersoepel]
+\setupalign [\v!ruim,\v!rechts]
+\setupXMLfile [\c!niveau=2]
\startmode[wide]
- \setuplayout[width=250cm]
+% \setuplayout [width=250cm]
+ \setuplayout [\c!breedte=250cm]
\stopmode
\startmode[packed]
- \setupXMLfile[inbetween=]
+% \setupXMLfile [inbetween=]
+ \setupXMLfile [\c!tussen=]
\stopmode
+\protect
+
+% The main text:
+
+\def\XMLbannerprocessor#1{\string<\string ?xml #1\string ?\string>\endgraf}
+
+\defineXMLprocessor [xml] {\XMLbannerprocessor}
+
\starttext
-\dontcomplain \showXMLfile{\inputfilename}
+ \dontcomplain \showXMLfile{\inputfilename}
\stoptext
diff --git a/tex/context/base/x-xml-02.tex b/tex/context/base/x-xml-02.tex
index 2f0d18d65..c5b52573c 100644
--- a/tex/context/base/x-xml-02.tex
+++ b/tex/context/base/x-xml-02.tex
@@ -41,7 +41,7 @@
[style=type]
\setupbodyfont
- [10pt]
+ [10pt,tt]
\setuptolerance
[verytolerant]
@@ -81,6 +81,10 @@
[exa:resolve,exa:include]
\stopmode
+\def\XMLbannerprocessor#1{\string<\string ?xml #1\string ?\string>\endgraf}
+
+\defineXMLprocessor [xml] {\XMLbannerprocessor}
+
\starttext
\showXMLfile{\inputfilename}
diff --git a/tex/context/base/xtag-ent.tex b/tex/context/base/xtag-ent.tex
index 4ca930894..1d9706b80 100644
--- a/tex/context/base/xtag-ent.tex
+++ b/tex/context/base/xtag-ent.tex
@@ -1,3 +1,16 @@
+%D \module
+%D [ file=xtag-ent,
+%D version=2000.12.20,
+%D title=\CONTEXT\ XML Support,
+%D subtitle=A bunch of Entities,
+%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.
+
% Here we also define fallbacks
\defineXMLentities [tex] {tex} {\TeX}
@@ -50,7 +63,7 @@
\defineXMLentity [Ugrave] {\Ugrave}
\defineXMLentity [ugrave] {\ugrave}
-\defineXMLentity [THORN] {\THorn}
+\defineXMLentity [THORN] {\Thorn}
\defineXMLentity [thorn] {\thorn}
\defineXMLentity [Aring] {\Aring}
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index 5391cb245..d275fc986 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -123,6 +123,13 @@
\protect
+%D Formally an \XML\ file starts with an unique sequence
+%D \type {<?xml}, but in most of the unilities that come with
+%D \CONTEXT\ we will be more tolerant, and gobble preceding
+%D spaces.
+
+\def\XMLbanner#1{\string<\string ?xml version='1.0' #1\string ?\string>}
+
%D We will be dealing with elements, which means that we have
%D to take care of \type {<this>} and \type {</that>}, but
%D also with \type {<such/>} and \type {<so />}. In some cases